I use Emacs, and occasionally write Elisp code.
emacswiki at ryanb dot org– My email
The one significant piece of elisp I’ve contributed is a minor mode, Fillcode (fillcode.el), which can fill some parts of source code in many languages. Specifically, it fills function calls, prototypes, and arithmetic and boolean expressions. See the official fillcode page for details.
I’ve posted other emacs tips and tricks on snarfed.org:
I didn’t want to go through the hassle of registering for yet another site, so I’ll add a comment here instead.
In “Quoting number keys for keystrokes in Emacs” you wrote:
(global-set-ket [(control \1)] ‘foo)
Note the escaped 1. Evidently this keystroke syntax interprets numeric arguments as key ids, or something, instead of the key’s actual character. So, to make it interpret the key binding the way we want, we have to escape the 1.
The thing following
‘control’ can be a symbol or a character. GNU Emacs has no separate character object type and 1 is indistinguishable from C-a as a character.
(list 1 (type-of 1)) => (1 integer) the number 1/the char ^A (list ?\C-a (type-of ?\C-a)) => (1 integer) ditto
(list '\1 (type-of '\1)) => (\1 symbol) the symbol 1
?1 would work too:
(list ?1 (type-of ?1)) => (49 integer) the number 49/the char 1
I suggest (global-set-key (kbd “C-1”) ‘foo), btw.