From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: compile.el: save compile-command Date: Thu, 22 Apr 2010 10:57:04 -0400 Message-ID: Reply-To: ams@gnu.org NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1271948273 24268 80.91.229.12 (22 Apr 2010 14:57:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Apr 2010 14:57:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 22 16:57:52 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O4xqf-00087x-K6 for ged-emacs-devel@m.gmane.org; Thu, 22 Apr 2010 16:57:49 +0200 Original-Received: from localhost ([127.0.0.1]:55799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4xqf-0005I6-7Y for ged-emacs-devel@m.gmane.org; Thu, 22 Apr 2010 10:57:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4xpy-000553-RU for emacs-devel@gnu.org; Thu, 22 Apr 2010 10:57:06 -0400 Original-Received: from [199.232.76.173] (port=52516 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4xpy-00054p-Bf for emacs-devel@gnu.org; Thu, 22 Apr 2010 10:57:06 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1O4xpx-000871-2I for emacs-devel@gnu.org; Thu, 22 Apr 2010 10:57:06 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:59174) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1O4xpw-00086x-Rg for emacs-devel@gnu.org; Thu, 22 Apr 2010 10:57:04 -0400 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1O4xpw-0003cC-Ln for emacs-devel@gnu.org; Thu, 22 Apr 2010 10:57:04 -0400 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124048 Archived-At: This patch stores the compile command in a variable, so that it can be reused for M-x compile or M-x recompile. 2010-04-22 Alfred M. Szmidt * progmodes/compile.el (compilation-start): Save COMMAND in file local variable. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 13cf862..5a1371e 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1266,11 +1266,11 @@ Returns the compilation buffer created." ;; Output a mode setter, for saving and later reloading this buffer. (insert "-*- mode: " name-of-mode "; default-directory: " (prin1-to-string default-directory) + "; compile-command: " (prin1-to-string command) " -*-\n" - (format "%s started at %s\n\n" + (format "%s started at %s\n" mode-name - (substring (current-time-string) 0 19)) - command "\n") + (substring (current-time-string) 0 19)) "\n") (setq thisdir default-directory)) (set-buffer-modified-p nil)) ;; Pop up the compilation buffer.