emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function for deleting a key binding in a sparse keymap


From: Richard M. Stallman
Subject: Re: Function for deleting a key binding in a sparse keymap
Date: Mon, 12 Dec 2005 11:18:35 -0500

If we want to write it in pseudo-Lisp, this is much
more Lisp-like yet with much less nesting.

    (or (FIND-IN special-event-map)
        (if overriding-terminal-local-map
            (FIND-IN overriding-terminal-local-map)
          (if overriding-local-map
              (FIND-IN overriding-local-map)
            (or (FIND-IN (KEYMAP-PROPERTY-AT-POINT))
                (FIND-IN-ANY EMULATION-MODE-MAP-ALISTS)
                (FIND-IN-ANY minor-mode-overriding-map-alist)
                (FIND-IN-ANY minor-mode-map-alist)
                (FIND-IN (LOCAL-MAP-PROPERTY-AT-POINT))
                (FIND-IN (current-local-map)))))
        (FIND-IN (current-global-map)))

However, we're writing English, not Polish.  That's not necessary the
best way to structure it in the manual.  However, it might give ideas
for how to do so in the manual.

This pseudo-Lisp structure might give better ideas, since it has fewer
levels of nesting of control constructs.

    (or (FIND-IN special-event-map)
        (cond (overriding-terminal-local-map
               (FIND-IN overriding-terminal-local-map))
              (overriding-local-map
               (FIND-IN overriding-local-map))
              (t
               (or (FIND-IN (KEYMAP-PROPERTY-AT-POINT))
                   (FIND-IN-ANY EMULATION-MODE-MAP-ALISTS)
                   (FIND-IN-ANY minor-mode-overriding-map-alist)
                   (FIND-IN-ANY minor-mode-map-alist)
                   (FIND-IN (LOCAL-MAP-PROPERTY-AT-POINT))
                   (FIND-IN (current-local-map)))))
        (FIND-IN (current-global-map)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]