unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: David Reitter <david.reitter@gmail.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Longlines mode in menu
Date: Wed, 18 Jun 2008 23:17:01 +0200	[thread overview]
Message-ID: <48597B4D.4080103@gmail.com> (raw)
In-Reply-To: <A1AE2E91-7296-4AA7-925D-CD42A4792D86@gmail.com>

David Reitter wrote:
> On 18 Jun 2008, at 21:50, Lennart Borgman (gmail) wrote:
>>  Could you show me exactly how and what you bind. I want to test and I 
>> had some trouble with bindings like this
>>
>>    (define-key map [down] 'osxkeys-visual-line-down-in-buffers)
> 
> 
> I'm binding this:
> 
>     (define-key map '[(up)] 'visual-line-up)
>     (define-key map '[(down)] 'visual-line-down)

Thanks.

> I'm actually binding this in my mode's "low priority keymap" so that 
> other minor modes can override.
> I use the code below.
> 
> That said, it should work from the normal minor mode keymap as well.
> 
> - D
> 
> 
> (defun aquamacs-install-low-priority-global-key-map (keymap &optional 
> target)
>   "Install keys from keymap keymap into the target (or global) map."
>   (let ((target (or target (current-global-map)))
>     (overwritten (make-sparse-keymap)))
>     (map-keymap
>    (lambda (key command)
>      (let ((old (lookup-key  target `[,key])))
>        (if (keymapp command)  ; key is a prefix key
>        (if (keymapp old)
>            ;; recurse
>            (setq old (aquamacs-install-low-priority-global-key-map
>               command old)))
>      (define-key target `[,key] command))
>      ;; also save "nil" entries for unassigned keys
>        (define-key overwritten `[,key] old)))
>    keymap)
>     overwritten))

Couldn't you just use a minor mode and put it last in 
minor-mode-map-alist? AFAICS new modes are entered first in that list by 
default.




  reply	other threads:[~2008-06-18 21:17 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05  5:42 Longlines mode in menu Chong Yidong
2008-06-05  5:53 ` Miles Bader
2008-06-05 12:50   ` Chong Yidong
2008-06-05 16:41 ` Paul R
2008-06-05 18:55   ` Chong Yidong
2008-06-06 21:27 ` Chong Yidong
2008-06-12 10:48 ` David Reitter
2008-06-12 11:00   ` Miles Bader
2008-07-11 21:21     ` Kim F. Storm
2008-07-12  2:51       ` Chong Yidong
2008-07-14  3:08         ` Miles Bader
2008-06-12 15:05   ` Chong Yidong
2008-06-12 16:12     ` David Reitter
2008-06-12 16:38       ` Chong Yidong
2008-06-12 17:14         ` Chong Yidong
2008-06-12 22:32           ` Chong Yidong
2008-06-13  6:45             ` David Reitter
2008-06-12 19:38       ` Stefan Monnier
2008-06-13  3:04         ` Kevin Rodgers
2008-06-13  3:13           ` Stefan Monnier
2008-06-13  7:36             ` Lennart Borgman (gmail)
2008-06-18  6:48         ` David Reitter
2008-06-18  7:13           ` Lennart Borgman (gmail)
2008-06-18  8:38             ` David Reitter
2008-06-18 16:17               ` Lennart Borgman (gmail)
2008-06-18 16:55                 ` David Reitter
2008-06-18 20:50                   ` Lennart Borgman (gmail)
2008-06-18 20:59                     ` David Reitter
2008-06-18 21:17                       ` Lennart Borgman (gmail) [this message]
2008-06-18 21:38                         ` David Reitter
2008-06-18 21:53                           ` Lennart Borgman (gmail)
2008-06-19  0:22                     ` Miles Bader
2008-06-19  7:21                       ` Lennart Borgman
2008-06-19  7:39                         ` Miles Bader
2008-06-19  7:58                           ` Lennart Borgman (gmail)
2008-06-19 13:51                     ` Stefan Monnier
2008-06-20 18:50                       ` Lennart Borgman (gmail)
2008-06-20 19:47                         ` Stefan Monnier
2008-06-20 19:53                           ` Lennart Borgman (gmail)
2008-06-20 20:13                             ` Miles Bader
2008-06-20 20:16                               ` Lennart Borgman (gmail)
2008-06-21  0:11                                 ` Miles Bader
2008-06-21  0:15                                   ` Lennart Borgman (gmail)
2008-06-20 21:23                             ` Stefan Monnier
2008-06-20 23:39                               ` Lennart Borgman (gmail)
2008-06-21  7:19                                 ` David Reitter
2008-06-21 13:08                                   ` Lennart Borgman (gmail)
2008-06-12 19:39     ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=48597B4D.4080103@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).