On Wed, Apr 6, 2011 at 6:58 AM, York Zhao <[email protected]> wrote:
Never mind, just registered a new user and I can edit the page now. I've corrected a typing mistake in the bug "bn works, but bp doesn’t<https://gitorious.org/vimpulse/pages/Bugs#bn+works,+but+bp+doesn't> ". By the way, I'm very new to emacs and lisp and couldn't find in the source code where the ex command ":bn" is being handled. Could anybody here give me some idea?
Hey York, The ex commands are stored in an association list (which is a key-value like data structure composed by a list of cells). "bn" is an abbreviation for bnext. Run this: (assoc "bnext" ex-token-alist) ;; ("bnext" "next") So it's an alias... resolve again: (assoc "next" ex-token-alist) ;; ("next" (ex-next ex-cycle-other-window)) So when you run the command "bn", ex expands to "bnext", then "next", and finally evaluates the code (ex-next ex-cycle-other-window) Tim