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

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

Make button


From: Joel J. Adamson
Subject: Make button
Date: Tue, 06 Apr 2010 09:17:57 -0400

Hello There,

I use Makefiles to manage many kinds of projects, and would like to have
a "Make button" on the toolbar so that when I'm using the mouse I can
save my file and then just hit the button without confirming
compile-command.  The idea is to have a button available whenever
there's a Makefile in the current directory.

I wrote the following according to what I read in the Elisp manual:

;; attempt to make a "Make" button appear in every buffer where the
;; default directory has a Makefile; perhaps cedet has something like this
;; 
(define-key global-map [tool-bar make] 
  '(menu-item "Make"
              compile 
             :visible t
             :help "Run make"
             :enable (file-exists-p (concat default-directory "Makefile"))
             :image (image :file "refresh.png")))

After I evaluate this, the screen blinks (the frame is redrawn), but no
new button appears.  What am I missing?  Is there any much easier way (a
la easymenu) to do this?

GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.6) of
2010-01-14 on x86-06.phx2.fedoraproject.org

Thanks,

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

Attachment: pgpFQMIdk2KuT.pgp
Description: PGP signature


reply via email to

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