Off-topic Emacs question
FredrikCarlén
baterista at arrhythmetic.net
Tue Jul 22 11:01:31 PDT 2003
I know, this is non-specific to FreeBSD, but I have learned to love you
all on this list, and this should be an easy nut to crack (as we say
idiomatically at least here in Sweden...):
I want to define key bindings for the function sgml-tag
like this
(global-set-key "\C-t" 'sgml-tag)
But I don't want it to be interactive: For speedy markup, I would like to
be able to do something like
(sgml-tag "head" -1)
...but I need to do it when defining a key binding, something like this I
thought, but Emacs tells me "No":
(global-set-key "\C-t" (sgml-tag "head" -1))
Isn't it possible to bind complete function calls to keys? It must be...
The doc for global-set-key only says
-------------------------------------------------
global-set-key is an interactive compiled Lisp function in `subr'.
(global-set-key KEY COMMAND)
Give KEY a global binding as COMMAND.
COMMAND is the command definition to use; usually it is
a symbol naming an interactively-callable function.
[...]
-------------------------------------------------
Notice the word "usually"?
As you might have guessed, I'm not exactly a brilliant LISP
programmer...YET!
If anyone at all *wants* to help me, thank you!
/Fredrik
More information about the freebsd-questions
mailing list