unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* menu-bar-map variable
@ 2007-03-30  6:52 Nick Roberts
  2007-03-30 21:22 ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2007-03-30  6:52 UTC (permalink / raw)
  To: emacs-devel


An earlier thread suggested that tool bar icons should _add to_ rather than
replace existing icons.  I would like to suggest the converse for the menubar
i.e. a variable, menu-bar-map, that can be made buffer-local like tool-bar-map
can.  The reason for this is that I'd like to use the menu-bar like a tool bar
on text-only terminals, but currently the global menu items get in the way.  A
buffer-local variable would allow them to be hidden.

Actually, I don't understand why the tool-bar has it's own map, while the
menu-bar doesn't anyway.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: menu-bar-map variable
  2007-03-30  6:52 menu-bar-map variable Nick Roberts
@ 2007-03-30 21:22 ` Richard Stallman
  2007-03-31  6:10   ` Nick Roberts
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2007-03-30 21:22 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

    An earlier thread suggested that tool bar icons should _add to_ rather than
    replace existing icons.  I would like to suggest the converse for the menubar
    i.e. a variable, menu-bar-map, that can be made buffer-local like tool-bar-map
    can.  The reason for this is that I'd like to use the menu-bar like a tool bar
    on text-only terminals, but currently the global menu items get in the way.

There is a feature by which a minor mode can turn off specific global
menu items.  It should be in the manual.

    Actually, I don't understand why the tool-bar has it's own map, while the
    menu-bar doesn't anyway.

On general principles, I think the tool bar should be handled just
like the menu bar, with a phony prefix key that can be used in any
active map.

Is there any practical reason not to change that, after the release?

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

* Re: menu-bar-map variable
  2007-03-30 21:22 ` Richard Stallman
@ 2007-03-31  6:10   ` Nick Roberts
  2007-03-31 20:42     ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2007-03-31  6:10 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

 > There is a feature by which a minor mode can turn off specific global
 > menu items.  It should be in the manual.

Unfortunately tmm-menubar-mouse doesn't seem to work with this feature
(items that are no longer visible get selected).

 >     Actually, I don't understand why the tool-bar has it's own map, while the
 >     menu-bar doesn't anyway.
 > 
 > On general principles, I think the tool bar should be handled just
 > like the menu bar, with a phony prefix key that can be used in any
 > active map.
 >
 > Is there any practical reason not to change that, after the release?

I presume not.  I'll wait for this change.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: menu-bar-map variable
  2007-03-31  6:10   ` Nick Roberts
@ 2007-03-31 20:42     ` Richard Stallman
  2007-04-01  9:11       ` Nick Roberts
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2007-03-31 20:42 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

     > There is a feature by which a minor mode can turn off specific global
     > menu items.  It should be in the manual.

    Unfortunately tmm-menubar-mouse doesn't seem to work with this feature
    (items that are no longer visible get selected).

Can someone fix this?

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

* Re: menu-bar-map variable
  2007-03-31 20:42     ` Richard Stallman
@ 2007-04-01  9:11       ` Nick Roberts
  2007-04-01 21:42         ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2007-04-01  9:11 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman writes:
 >      > There is a feature by which a minor mode can turn off specific global
 >      > menu items.  It should be in the manual.
 > 
 >     Unfortunately tmm-menubar-mouse doesn't seem to work with this feature
 >     (items that are no longer visible get selected).
 > 
 > Can someone fix this?

I can localise the problem to tmm-get-keybind and these two lines:

 (setq allbind (cons (local-key-binding keyseq) allbind))
 (setq allbind (cons (global-key-binding keyseq) allbind))

If I remove a menu-item in the global map e.g file

(define-key global-map [menu-bar file] 'undefined)

the tmm handles this properly as the entry is removed from
(global-key-binding [menu-bar]):

(keymap (file . undefined)...

However, if I remove a menu-item in the local map, e.g, edit in the scratch
buffer:

(define-key lisp-interaction-mode-map [menu-bar edit] 'undefined)

then I get:

(local-key-binding [menu-bar])
(keymap (edit . undefined))

but tmm still thinks it's there because it's still in the global list

(global-key-binding [menu-bar]):

...(edit "Edit" keymap (undo ...
          ^^^^

Perhaps Emacs has it's own function to handle this.

There is no corresponding problem with a graphical display.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: menu-bar-map variable
  2007-04-01  9:11       ` Nick Roberts
@ 2007-04-01 21:42         ` Richard Stallman
  2007-04-03 21:37           ` Nick Roberts
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2007-04-01 21:42 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

    (define-key lisp-interaction-mode-map [menu-bar edit] 'undefined)

    then I get:

    (local-key-binding [menu-bar])
    (keymap (edit . undefined))

    but tmm still thinks it's there because it's still in the global list

    (global-key-binding [menu-bar]):

    ...(edit "Edit" keymap (undo ...
	      ^^^^

Well, that shows the bug.  The definition as `undefined'
in the local map should not just be discarded.  It should be kept,
so that it overrides the global binding.  Only at the last moment
should it be treated as no definition.

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

* Re: menu-bar-map variable
  2007-04-01 21:42         ` Richard Stallman
@ 2007-04-03 21:37           ` Nick Roberts
  2007-04-04 14:02             ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2007-04-03 21:37 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

 >     (define-key lisp-interaction-mode-map [menu-bar edit] 'undefined)
 > 
 >     then I get:
 > 
 >     (local-key-binding [menu-bar])
 >     (keymap (edit . undefined))
 > 
 >     but tmm still thinks it's there because it's still in the global list
 > 
 >     (global-key-binding [menu-bar]):
 > 
 >     ...(edit "Edit" keymap (undo ...
 > 	      ^^^^
 > 
 > Well, that shows the bug.  The definition as `undefined'
 > in the local map should not just be discarded.  It should be kept,
 > so that it overrides the global binding.  Only at the last moment
 > should it be treated as no definition.

I've fixed this now.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: menu-bar-map variable
  2007-04-03 21:37           ` Nick Roberts
@ 2007-04-04 14:02             ` Richard Stallman
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2007-04-04 14:02 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

Thanks.

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

end of thread, other threads:[~2007-04-04 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-30  6:52 menu-bar-map variable Nick Roberts
2007-03-30 21:22 ` Richard Stallman
2007-03-31  6:10   ` Nick Roberts
2007-03-31 20:42     ` Richard Stallman
2007-04-01  9:11       ` Nick Roberts
2007-04-01 21:42         ` Richard Stallman
2007-04-03 21:37           ` Nick Roberts
2007-04-04 14:02             ` Richard Stallman

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).