help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: trouble binding to <next> & <prior>


From: Mirko
Subject: Re: trouble binding to <next> & <prior>
Date: Wed, 9 Jul 2008 09:32:14 -0700 (PDT)
User-agent: G2/1.0

On Jul 7, 11:34 pm, Xah <address@hidden> wrote:
> On Jul 7, 11:59 am, Mirko <address@hidden> wrote:
>
> > Nope.  This is what I have
>
> >  (define-key iop-alert-mode-map (kbd "<prior>") 'view-previous-entry)
>
> For debugging purposes, you might try first to replace the
> “(kbd "<prior>")” with just “[prior]”. If that still doesn't work, at
> least you get rid of one possbibility of problem.
>
> Also, simply try to bind something to the PageUp key, e.g.
> (global-set-key (kbd "<next>") 'find-file)
> and see if your emacs recognize that at all.
>
> What build or platform is your emacs on?
>
> Few monhts ago i tried “Emacs.app” (the emacs build for Mac OS X and
> NeXTStep, based on cacoa), it has a known bug that it won't recognize
> keybindings on the numerical keypad. The author said he doesn't know
> what's the problem or how to fix. (“Emacs.app” has several major bugs
> that i couldn't adapt it as my emacs. The oher one is unicode ...)
>
>   Xah
>http://xahlee.org/
>
>

OK, there were a couple of problems:

1) old *.elc file
2) I was creating a derived mode
3) Outside of the define-derived-mode expression, I was separately
using the construct:
(unless iop-alert-mode-map
  (setq iop-alert-mode-map (copy-keymap text-mode-map))
 (define-key iop-alert-mode-map (kbd "<prior>") 'view-previous-entry)
...

So, what was happening most likely was that the derived mode was
creating the mode-map, and this prevented the (unless iop-alert-mode-
map  from operating.

I moved the define-key inside the define-derived-mode expression.

Thank you all for putting up with this.

Mirko


reply via email to

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