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

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

Re: need to add to a menu


From: Kevin Rodgers
Subject: Re: need to add to a menu
Date: Wed, 27 Oct 2004 14:09:31 -0600
User-agent: Mozilla Thunderbird 0.8 (X11/20040916)

Billy N. Patton wrote:
> On the menu Tools->Compile it will do a make -k and output to a buffer.
>  It will also add the menu Compile which will allow you to step through
> errors,  I like that.
> I would like to add the the Tools menu the ability to do a
> make install
> make test
> make docs
>
> How do I add to an existing menu?

(defun make-install ()
  "*Run `M-x compile RET make install RET'."
  (interactive)
  (compile "make install"))

(defun make-test ()
  "*Run `M-x compile RET make test RET'."
  (interactive)
  (compile "make test"))

(defun make-docs ()
  "*Run `M-x compile RET make docs RET'."
  (interactive)
  (compile "make docs"))

(define-key-after menu-bar-tools-menu [make-install]
  '(menu-item "Compile command: make install" make-install)
  'compile)

(define-key-after menu-bar-tools-menu [make-test]
  '(menu-item "Compile command: make test" make-test)
  'make-install)

(define-key-after menu-bar-tools-menu [make-docs]
  '(menu-item "Compile command: make docs" make-docs)
  'make-test)

--
Kevin Rodgers


reply via email to

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