home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!charnel!rat!usc!sdd.hp.com!swrinde!emory!ogicse!news.u.washington.edu!news.u.washington.edu!ethanb
- From: ethanb@ptolemy.astro.washington.edu (Ethan Bradford)
- Newsgroups: comp.emacs
- Subject: Re: Getting buffers saved automatically
- Message-ID: <ETHANB.92Nov5161815@ptolemy.astro.washington.edu>
- Date: 6 Nov 92 00:18:15 GMT
- References: <1992Nov3.031152.1436@ccu1.aukuni.ac.nz>
- Sender: news@u.washington.edu (USENET News System)
- Organization: U. of Washington
- Lines: 38
- In-Reply-To: russells@ccu1.aukuni.ac.nz's message of Tue, 3 Nov 1992 03:11:52 GMT
- To: russells@ccu1.aukuni.ac.nz (Russell Street)
-
- Contrary to your complaint, I find that with your function as defined,
- save-some-buffers will save all the buffers, but compile will crash
- because it does not have an argument. If redefined as follows, your
- command works for me.
-
- (defun mycompile()
- "Save any unsaved buffers automatically and then invoke compile"
- (interactive)
- (save-some-buffers t)
- (compile compile-command)
- )
- (define-key esc-map "`" 'mycompile)
-
- If you want to be queried for the compile command string, replace
- (compile compile-command)
- with
- (call-interactively 'compile)
-
-
- In article <1992Nov3.031152.1436@ccu1.aukuni.ac.nz> russells@ccu1.aukuni.ac.nz (Russell Street) writes:
-
- I would like to bind ESC-` to 'compile' (which I have done)
- but would also like it to save all dirty buffers before invoking
- compile. i.e., I would like to run "save-some-buffers" with a
- numeric argument before running compile.
-
- I have worked out that if I put this sort of thing in my ~/.emacs file
- will ask me to save the buffers first -- before compile calls
- save-some-buffers :( -- but I can't get it to automagically save the
- buffers.
-
- (defun mycompile()
- "Save any unsaved buffers automatically and then invoke compile"
- (interactive)
- (save-some-buffers t)
- (compile)
- )
- (define-key esc-map "`" 'mycompile)
-