[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el |
Date: |
Thu, 04 Dec 2008 23:04:42 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Sam Steingold <sds> 08/12/04 23:04:41
Modified files:
lisp : ChangeLog
lisp/progmodes : compile.el
Log message:
(compilation-read-command): Extracted from compile.
(compile): Use it.
(recompile): Accept an optional argument to enable editing the command
line.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.14914&r2=1.14915
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/compile.el?cvsroot=emacs&r1=1.483&r2=1.484
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.14914
retrieving revision 1.14915
diff -u -b -r1.14914 -r1.14915
--- ChangeLog 4 Dec 2008 20:44:11 -0000 1.14914
+++ ChangeLog 4 Dec 2008 23:04:39 -0000 1.14915
@@ -1,3 +1,11 @@
+2008-12-04 Sam Steingold <address@hidden>
+
+ * progmodes/compile.el (compilation-read-command): Extracted from
+ compile.
+ (compile): Use it.
+ (recompile): Accept an optional argument to enable editing the
+ command line.
+
2008-12-04 Michael Albinus <address@hidden>
* net/tramp.el (top): Write a message, when loading Tramp.
Index: progmodes/compile.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.483
retrieving revision 1.484
diff -u -b -r1.483 -r1.484
--- progmodes/compile.el 22 Nov 2008 20:42:18 -0000 1.483
+++ progmodes/compile.el 4 Dec 2008 23:04:41 -0000 1.484
@@ -1019,6 +1019,12 @@
compilation-mode-font-lock-keywords)))
+(defun compilation-read-command (command)
+ (read-shell-command "Compile command: " command
+ (if (equal (car compile-history) command)
+ '(compile-history . 1)
+ 'compile-history)))
+
;;;###autoload
(defun compile (command &optional comint)
@@ -1052,10 +1058,7 @@
(list
(let ((command (eval compile-command)))
(if (or compilation-read-command current-prefix-arg)
- (read-shell-command "Compile command: " command
- (if (equal (car compile-history) command)
- '(compile-history . 1)
- 'compile-history))
+ (compilation-read-command command)
command))
(consp current-prefix-arg)))
(unless (equal command (eval compile-command))
@@ -1065,13 +1068,17 @@
(compilation-start command comint))
;; run compile with the default command line
-(defun recompile ()
+(defun recompile (&optional edit-command)
"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, recompile using `compile-command'."
- (interactive)
+original use. Otherwise, recompile using `compile-command'.
+If the optional argument `edit-command' is non-nil, the command can be edited."
+ (interactive "P")
(save-some-buffers (not compilation-ask-about-save) nil)
(let ((default-directory (or compilation-directory default-directory)))
+ (when edit-command
+ (setcar compilation-arguments
+ (compilation-read-command (car compilation-arguments))))
(apply 'compilation-start (or compilation-arguments
`(,(eval compile-command))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el,
Sam Steingold <=