emacs-devel
[Top][All Lists]
Advanced

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

Re: More keybindings in compilation-mode-map


From: Alan Shutko
Subject: Re: More keybindings in compilation-mode-map
Date: Tue, 13 Nov 2001 10:29:11 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i386-debian-linux-gnu)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

> But it doesn't work for M-x grep which doesn't set `compile-command'.
> It's probably better to make `recompile' use `compilation-arguments'.

Ok, try two:

2001-11-13  Alan Shutko  <address@hidden>

        * compile.el (recompile): Use compilation-arguments if set, so as
        to be able to M-x recompile the exact command which created a
        compilation-mode buffer.

*** /home/ats/compile.el.orig   Tue Nov 13 10:21:43 2001
--- /home/ats/compile.el        Tue Nov 13 10:28:23 2001
***************
*** 555,564 ****
  
  ;; run compile with the default command line
  (defun recompile ()
!   "Re-compile the program including the current buffer."
    (interactive)
    (save-some-buffers (not compilation-ask-about-save) nil)
!   (compile-internal (eval compile-command) "No more errors"))
  
  (defun grep-process-setup ()
    "Set up `compilation-exit-message-function' for `grep'."
--- 555,567 ----
  
  ;; run compile with the default command line
  (defun recompile ()
!   "Re-compile the program including the current buffer.
! If this is run in a compilation-mode buffer, re-use the arguments from the
! original use.  Otherwise, it recompiles using `compile-command'."
    (interactive)
    (save-some-buffers (not compilation-ask-about-save) nil)
!   (apply 'compile-internal (or compilation-arguments
!                             `(,(eval compile-command) "No more errors"))))
  
  (defun grep-process-setup ()
    "Set up `compilation-exit-message-function' for `grep'."

-- 
Alan Shutko <address@hidden> - In a variety of flavors!
Deliver yesterday, code today, think tomorrow.



reply via email to

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