all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* easy-menu and key macros
@ 2008-04-23 21:42 Glenn Morris
  2008-04-24  1:57 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2008-04-23 21:42 UTC (permalink / raw)
  To: emacs-pretest-bug


Easy-menu doesn't seem to understand key bindings that are strings, ie
keyboard macros.

Compare the following two versions: in bar-mode, which uses
define-key, the "4 lines" menu item works; in foo-mode, which uses
easy-menu-define, it does nothing.


;; This works.
(setq bar-mode-map (make-keymap))
(suppress-keymap bar-mode-map)
(define-key bar-mode-map [menu-bar scroll]
  (cons "Scroll" (make-sparse-keymap "Scroll")))
(define-key bar-mode-map [menu-bar scroll n4]
  '("4 lines" . "4\C-n"))

(define-derived-mode bar-mode fundamental-mode "bar")
(bar-mode)


;; This doesn't.
(setq foo-mode-map (make-keymap))
(suppress-keymap foo-mode-map)
(easy-menu-define nil foo-mode-map nil
   '("Scroll"
     ["4 lines" "4\C-n"]
     ["1 line" next-line]))

(define-derived-mode foo-mode fundamental-mode "foo")
(foo-mode)




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: easy-menu and key macros
  2008-04-23 21:42 easy-menu and key macros Glenn Morris
@ 2008-04-24  1:57 ` Stefan Monnier
  2008-04-24 22:44   ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-04-24  1:57 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-pretest-bug

> Easy-menu doesn't seem to understand key bindings that are strings, ie
> keyboard macros.

Indeed it doesn't.  Is it documented to understand them?
Should it understand them?


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: easy-menu and key macros
  2008-04-24  1:57 ` Stefan Monnier
@ 2008-04-24 22:44   ` Glenn Morris
  2008-04-25  1:31     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2008-04-24 22:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug

Stefan Monnier wrote:

>> Easy-menu doesn't seem to understand key bindings that are strings, ie
>> keyboard macros.
>
> Indeed it doesn't.  Is it documented to understand them?
> Should it understand them?

It wasn't clear to me, but since you changed cal-menu-scroll-menu to
use this form in rev 1.70, I assumed it was supposed to work. I'll
happily document that it doesn't...




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: easy-menu and key macros
  2008-04-24 22:44   ` Glenn Morris
@ 2008-04-25  1:31     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2008-04-25  1:31 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-pretest-bug

>>> Easy-menu doesn't seem to understand key bindings that are strings, ie
>>> keyboard macros.
>> 
>> Indeed it doesn't.  Is it documented to understand them?
>> Should it understand them?

> It wasn't clear to me, but since you changed cal-menu-scroll-menu to
> use this form in rev 1.70,

Did I?  Hmm...

> I assumed it was supposed to work.  I'll happily document that it doesn't...

Actually, it might work now,


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-25  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 21:42 easy-menu and key macros Glenn Morris
2008-04-24  1:57 ` Stefan Monnier
2008-04-24 22:44   ` Glenn Morris
2008-04-25  1:31     ` Stefan Monnier

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.