I'm interested in a key-binding syntax that works with Emacs 20 through 22 (for those bindings that are acceptable to all of those versions). The (kbd ...) syntax, for instance, doesn't work with earlier Emacsen, so that choice is out, for me.
I tried (define-key my-map "\C-!" 'my-cmd), which works in Emacs 20, but gives this error in Emacs 22: "Invalid modifier in string". Based on the error message, which speaks of strings, not key bindings, I tried (setq foo "\C-!"), which gives the same error - so I guess it's a string-syntax problem, not a key-binding syntax problem. Is it normal that this was broken in moving to Emacs 22 (or 21)? Where is the explanation of this in the Elisp manual (I looked in section Strings and Characters and in the keybinding discussions). Anyway, for the key binding, I settled on (define-key my-map [C-!] 'my-cmd), after some experimentation - it seems to work for key bindings in both versions. I admit that I'm confused about the various key-binding syntaxes. I've consulted the manual, but, except for (kbd...), I don't see a universal syntax to use for all key sequences, and (kbd...) is not usable with Emacs 20. I somehow seem to always end up with collections of "\modifier-key", [(modifier fn-key)], and [modifier-key]. I'm probably just not reading the doc correctly, but I'd appreciate some light on the question. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel