all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: storm@cua.dk, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Function for deleting a key binding in a sparse keymap
Date: Mon, 12 Dec 2005 02:41:16 +0100	[thread overview]
Message-ID: <439CD53C.1070500@student.lu.se> (raw)
In-Reply-To: <E1ElUNq-0000TY-24@fencepost.gnu.org>

Richard M. Stallman wrote:

>But even better, don't use labels!  Gotos are not a clear way to
>express a program.  It would be clearer to try to express this as
>
>   (if overriding-terminal-local-map
>       (look-in overriding-terminal-local-map)
>     (if overriding-local-map
>         (look-in overriding-local-map)
>       (look-in (get-char-property (point) 'keymap))
>       etc.))
>
>which involves no labels or gotos.
>  
>
I a little bit doubt it is readable outside a buffer in Emacs-Lisp mode. 
Here is a version I have made to see how it looks:


(unless (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)
      (unless (FIND-IN (KEYMAP-PROPERTY-AT-POINT))
        (unless (FIND-IN-ANY EMULATION-MODE-MAP-ALISTS)
          (unless (FIND-IN-ANY minor-mode-overriding-map-alist)
            (unless (FIND-IN-ANY minor-mode-map-alist)
              (unless (FIND-IN (LOCAL-MAP-PROPERTY-AT-POINT))
                (FIND-IN (current-local-map))))))))))
(unless FOUND
  (FIND-IN (current-global-map)))
       

I think it would need some explanation too.

  reply	other threads:[~2005-12-12  1:41 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08  9:32 Function for deleting a key binding in a sparse keymap LENNART BORGMAN
2005-12-08 14:24 ` Kim F. Storm
2005-12-08 15:03   ` Lennart Borgman
2005-12-08 16:53 ` Stefan Monnier
2005-12-08 18:36   ` Lennart Borgman
2005-12-08 18:56     ` Stefan Monnier
2005-12-08 23:59       ` Lennart Borgman
2005-12-09 11:24         ` Kim F. Storm
2005-12-09 15:03         ` Richard M. Stallman
2005-12-09 20:12           ` Lennart Borgman
2005-12-10  4:13             ` Richard M. Stallman
2005-12-10 23:45               ` Lennart Borgman
2005-12-11  1:12                 ` Stefan Monnier
2005-12-11  2:16                   ` Lennart Borgman
2005-12-11  8:14                     ` Stefan Monnier
2005-12-11 16:49                     ` Richard M. Stallman
2005-12-11 16:49                 ` Richard M. Stallman
2005-12-12  1:41                   ` Lennart Borgman [this message]
2005-12-12 15:52                     ` Stefan Monnier
2005-12-12 17:02                       ` Lennart Borgman
2005-12-13 15:52                         ` Stefan Monnier
2005-12-12 16:18                     ` Richard M. Stallman
2005-12-12 19:09                       ` Lennart Borgman
2005-12-13 17:50                         ` Richard M. Stallman
2005-12-14  0:50                           ` Lennart Borgman
2005-12-14 20:02                             ` Richard M. Stallman
2005-12-10 23:40             ` Kim F. Storm
2005-12-11  0:29               ` Lennart Borgman
2005-12-11  0:54                 ` Lennart Borgman
2005-12-11 16:49                   ` Richard M. Stallman
2005-12-08 23:14     ` Function for deleting a key binding in a sparse keymap - bug in menus? Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2005-12-04 23:58 Function for deleting a key binding in a sparse keymap Lennart Borgman
2005-12-05 16:38 ` Richard M. Stallman
2005-12-05 16:55   ` Lennart Borgman
2005-12-06 16:42     ` Richard M. Stallman
2005-12-06 17:04       ` Lennart Borgman
2005-12-06 21:26         ` Stefan Monnier
2005-12-06 22:18           ` Lennart Borgman
2005-12-06 22:28             ` Stefan Monnier
2005-12-06 23:01               ` Lennart Borgman
2005-12-07  1:56                 ` Stefan Monnier
2005-12-07  9:56                   ` Lennart Borgman
2005-12-07 10:13                   ` Lennart Borgman
2005-12-07 14:33                     ` Lennart Borgman
2005-12-08  9:10                       ` Kim F. Storm
2005-12-07 17:06         ` Richard M. Stallman
2005-12-07 17:12           ` Lennart Borgman
2005-12-05 19:42 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439CD53C.1070500@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.