unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to delete item from menu bar
@ 2006-05-25 18:23 Tim Johnson
  2006-05-25 20:55 ` J. David Boyd
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tim Johnson @ 2006-05-25 18:23 UTC (permalink / raw)


Hello:
I'd like to delete an item from the menu bar.
It may or it may not be created by an easy-menu function.

Specifically, the item "Scheme" in scheme-mode.

How may I do that?
Thanks
tim

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

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

* Re: How to delete item from menu bar
  2006-05-25 18:23 How to delete item from menu bar Tim Johnson
@ 2006-05-25 20:55 ` J. David Boyd
       [not found] ` <mailman.2291.1148590548.9609.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: J. David Boyd @ 2006-05-25 20:55 UTC (permalink / raw)


Tim Johnson <tim@johnsons-web.com> writes:

> Hello:
> I'd like to delete an item from the menu bar.
> It may or it may not be created by an easy-menu function.
>
> Specifically, the item "Scheme" in scheme-mode.
>
> How may I do that?
> Thanks
> tim
>
> -- 
> Tim Johnson <tim@johnsons-web.com>
>       http://www.alaska-internet-solutions.com


Doing C-h f easy-menu-remove shows:

easy-menu-remove-item is a compiled Lisp function in `easymenu.el'.
(easy-menu-remove-item map path name)

>From submenu of map with path path remove item name.
map and path are defined as in `easy-menu-add-item'.
name should be a string, the name of the element to be removed.

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

* Re: How to delete item from menu bar
       [not found] ` <mailman.2291.1148590548.9609.help-gnu-emacs@gnu.org>
@ 2006-05-25 22:34   ` Tim Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Johnson @ 2006-05-25 22:34 UTC (permalink / raw)


On 2006-05-25, J. David Boyd <david@adboyd.com> wrote:
> Tim Johnson <tim@johnsons-web.com> writes:
>
> Doing C-h f easy-menu-remove shows:
>
> easy-menu-remove-item is a compiled Lisp function in `easymenu.el'.
> (easy-menu-remove-item map path name)

 Hi:

 I've looked that up already. But no examples are shown.
 So... from a menu with the name "Scheme", I wish to remove the item
 with the name "Compile Scheme File".
 Here's what I've tried:
 (easy-menu-remove-item scheme-mode-map 
   '("Scheme") "Compile Scheme File")

 the evaluation returns nil, but the item remains.
 Other failed attempts indicate that emacs expects a series for 
 'path. 

 It occurs to me that much of emacs documentation should provide more
 information about the datatypes required.

 If I evaluate C-h v scheme-mode-map<RET>
 I see something like this:
 (menu-bar keymap
		   (scheme "Scheme" keymap
					;; .... deleted
				   (compile-file "Compile Scheme File"
								 (nil)
								 . scheme-compile-file)
					;; ... deleted
				   "Scheme"))
 The clue must be in there somewhere! :-)

>>From submenu of map with path path remove item name.
> map and path are defined as in `easy-menu-add-item'.
> name should be a string, the name of the element to be removed.

   I've looked at scheme.el and I can't locate the definition.
   Not even sure if easy-menu-* procedures are used
   (grep doesn't find easy-menu in any file that seems to be
    related or 'require'd to scheme)
Thanks
tim

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

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

* Re: How to delete item from menu bar
  2006-05-25 18:23 How to delete item from menu bar Tim Johnson
  2006-05-25 20:55 ` J. David Boyd
       [not found] ` <mailman.2291.1148590548.9609.help-gnu-emacs@gnu.org>
@ 2006-05-26 15:24 ` Kevin Rodgers
       [not found] ` <mailman.2321.1148657145.9609.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-05-26 15:24 UTC (permalink / raw)


Tim Johnson wrote:
> I'd like to delete an item from the menu bar.
> It may or it may not be created by an easy-menu function.
> 
> Specifically, the item "Scheme" in scheme-mode.
> 
> How may I do that?

(define-key scheme-mode-map [menu-bar scheme] nil)

-- 
Kevin

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

* Re: How to delete item from menu bar
       [not found] ` <mailman.2321.1148657145.9609.help-gnu-emacs@gnu.org>
@ 2006-05-26 18:01   ` Tim Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Johnson @ 2006-05-26 18:01 UTC (permalink / raw)


On 2006-05-26, Kevin Rodgers <ihs_4664@yahoo.com> wrote:
> Tim Johnson wrote:
>> I'd like to delete an item from the menu bar.
>> It may or it may not be created by an easy-menu function.
>> 
>> Specifically, the item "Scheme" in scheme-mode.
>> 
>> How may I do that?
>
> (define-key scheme-mode-map [menu-bar scheme] nil)

 Yes. That did it.
 I did find that 'easy-menu-remove-item *does* work for menu
 items created with 'easy-menu-define

 Example: Menu "Foos", items "Foo1", "Foo2", ....
 (easy-menu-remove-item nil '("Foo") "Foo1") ;; remove item
 (easy-menu-remove-item nil '() "Foo") ;; remove menu

 Thanks Kevin
 tj

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

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

end of thread, other threads:[~2006-05-26 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25 18:23 How to delete item from menu bar Tim Johnson
2006-05-25 20:55 ` J. David Boyd
     [not found] ` <mailman.2291.1148590548.9609.help-gnu-emacs@gnu.org>
2006-05-25 22:34   ` Tim Johnson
2006-05-26 15:24 ` Kevin Rodgers
     [not found] ` <mailman.2321.1148657145.9609.help-gnu-emacs@gnu.org>
2006-05-26 18:01   ` Tim Johnson

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