From unknown Mon Jun 23 18:27:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7277 <7277@debbugs.gnu.org> To: bug#7277 <7277@debbugs.gnu.org> Subject: Status: 24.0.50; Can't revert diff-buffer-with-file Reply-To: bug#7277 <7277@debbugs.gnu.org> Date: Tue, 24 Jun 2025 01:27:38 +0000 retitle 7277 24.0.50; Can't revert diff-buffer-with-file reassign 7277 emacs submitter 7277 rogers-emacs@rgrjr.dyndns.org severity 7277 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 16:26:27 2010 Received: (at submit) by debbugs.gnu.org; 24 Oct 2010 20:26:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PA798-0007OZ-Tk for submit@debbugs.gnu.org; Sun, 24 Oct 2010 16:26:27 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PA796-0007OT-Ck for submit@debbugs.gnu.org; Sun, 24 Oct 2010 16:26:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PA7Cw-0008Q8-R0 for submit@debbugs.gnu.org; Sun, 24 Oct 2010 16:30:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:50946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PA7Cw-0008Q4-Nk for submit@debbugs.gnu.org; Sun, 24 Oct 2010 16:30:22 -0400 Received: from [140.186.70.92] (port=45983 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PA7Cv-0000TA-I3 for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2010 16:30:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PA7Cu-0008Pt-6J for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2010 16:30:21 -0400 Received: from rgrjr.com ([216.146.47.5]:42387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PA7Cu-0008Pm-2o for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2010 16:30:20 -0400 Received: from rgrjr.dyndns.org (c-66-30-196-77.hsd1.ma.comcast.net [66.30.196.77]) by rgrjr.com (Postfix on CentOS) with ESMTP id 0081E1600FB for ; Sun, 24 Oct 2010 20:30:18 +0000 (UTC) Received: (qmail 27303 invoked by uid 89); 24 Oct 2010 20:30:18 -0000 Received: from unknown (HELO rgr.rgrjr.com) (192.168.57.1) by home with SMTP; 24 Oct 2010 20:30:18 -0000 Received: by rgr.rgrjr.com (Postfix, from userid 500) id C14DDA4E03; Sun, 24 Oct 2010 16:30:17 -0400 (EDT) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="OZLX+CkR23" Content-Transfer-Encoding: 7bit Message-ID: <19652.38745.217242.560815@rgr.rgrjr.com> Date: Sun, 24 Oct 2010 16:30:17 -0400 From: rogers-emacs@rgrjr.dyndns.org To: bug-gnu-emacs@gnu.org Subject: 24.0.50; Can't revert diff-buffer-with-file X-Mailer: VM 7.19 under Emacs 24.0.50.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --OZLX+CkR23 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit The problem, of course, is that the temp file is deleted shortly after "diff" exits, so the default revert-buffer function installed by "diff" fails. The simplest solution seems to be to install a new revert-buffer function that redoes the whole process of checking for a file buffer and writing the temp file. The attached patch does a minimal refactoring of "diff" and "diff-buffer-with-file" to do just that, while trying to DTRT if the user renames the diff buffer or kills the original buffer. -- Bob Rogers http://www.rgrjr.com/ --OZLX+CkR23 Content-Type: text/plain Content-Description: Content-Disposition: inline; filename="diff-buffer-revert-1.patch" Content-Transfer-Encoding: 7bit diff --git a/lisp/files.el b/lisp/files.el index d5f60b7..603c014 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4512,24 +4512,42 @@ Before and after saving the buffer, this function runs "View the differences between BUFFER and its associated file. This requires the external program `diff' to be in your `exec-path'." (interactive "bBuffer: ") - (with-current-buffer (get-buffer (or buffer (current-buffer))) + (diff-buffer-internal (get-buffer (or buffer (current-buffer))) + (get-buffer-create "*Diff*")) + ;; return always nil, so that save-buffers-kill-emacs will not move + ;; over to the next unsaved buffer when calling `d'. + nil) + +(defvar diff-buffer-buffer) ;; suppress compiler warnings. + +(defun diff-buffer-internal (buffer result-buffer) + (if (not (and buffer (buffer-name buffer))) + (error "Original buffer deleted.")) + (with-current-buffer buffer (if (and buffer-file-name (file-exists-p buffer-file-name)) (let ((tempfile (make-temp-file "buffer-content-"))) (unwind-protect (progn (write-region nil nil tempfile nil 'nomessage) - (diff buffer-file-name tempfile nil t) - (sit-for 0)) + ;; No asynch so we don't delete the temp file prematurely. + (diff-into-buffer result-buffer buffer-file-name tempfile + nil t) + (sit-for 0) + ;; Now revise the revert-buffer-function, since the + ;; default will not be able to find the temp file. + (with-current-buffer result-buffer + (set (make-local-variable 'diff-buffer-buffer) buffer) + (setq revert-buffer-function + (lambda (ignore-auto noconfirm) + (diff-buffer-internal diff-buffer-buffer + (current-buffer)))))) (when (file-exists-p tempfile) (delete-file tempfile)))) (message "Buffer %s has no associated file on disc" (buffer-name)) ;; Display that message for 1 second so that user can read it ;; in the minibuffer. - (sit-for 1))) - ;; return always nil, so that save-buffers-kill-emacs will not move - ;; over to the next unsaved buffer when calling `d'. - nil) + (sit-for 1)))) (defvar save-some-buffers-action-alist `((?\C-r diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index e79e72c..1a835b5 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -108,11 +108,16 @@ specified in `diff-switches' are passed to the diff command." (read-file-name "Diff original file: " (file-name-directory newf) nil t))) (list oldf newf (diff-switches)))) + (diff-into-buffer nil old new switches no-async)) + +(defun diff-into-buffer (buf old new &optional switches no-async) + ;; Noninteractive helper for creating and reverting diff buffers. (setq new (expand-file-name new) old (expand-file-name old)) (or switches (setq switches diff-switches)) ; If not specified, use default. + (or buf (setq buf (get-buffer-create "*Diff*"))) (let* ((old-alt (file-local-copy old)) - (new-alt (file-local-copy new)) + (new-alt (file-local-copy new)) (command (mapconcat 'identity `(,diff-command @@ -123,7 +128,6 @@ specified in `diff-switches' are passed to the diff command." ,(shell-quote-argument (or old-alt old)) ,(shell-quote-argument (or new-alt new))) " ")) - (buf (get-buffer-create "*Diff*")) (thisdir default-directory) proc) (save-excursion --OZLX+CkR23-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 22 14:52:19 2010 Received: (at 7277-done) by debbugs.gnu.org; 22 Nov 2010 19:52:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKcR0-0000Bg-0j for submit@debbugs.gnu.org; Mon, 22 Nov 2010 14:52:19 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKbt7-0008OL-8d for 7277-done@debbugs.gnu.org; Mon, 22 Nov 2010 14:17:19 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id oAMJMQed007573; Mon, 22 Nov 2010 14:22:27 -0500 Received: by pastel.home (Postfix, from userid 20848) id 43474A83C8; Mon, 22 Nov 2010 14:22:22 -0500 (EST) From: Stefan Monnier To: rogers-emacs@rgrjr.dyndns.org Subject: Re: 24.0.50; Can't revert diff-buffer-with-file Message-ID: References: <19652.38745.217242.560815@rgr.rgrjr.com> Date: Mon, 22 Nov 2010 14:22:22 -0500 In-Reply-To: <19652.38745.217242.560815@rgr.rgrjr.com> (rogers-emacs@rgrjr.dyndns.org's message of "Sun, 24 Oct 2010 16:30:17 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3687=0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 7277-done X-Mailman-Approved-At: Mon, 22 Nov 2010 14:52:16 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > The attached patch does a minimal refactoring of "diff" and > "diff-buffer-with-file" to do just that, while trying to DTRT if the > user renames the diff buffer or kills the original buffer. Thanks, installed. Actually, I then started to take a closer look at the code and ended up rewriting most of it to fix various problems. See patch below. Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-11-22 17:57:46 +0000 +++ lisp/ChangeLog 2010-11-22 19:19:24 +0000 @@ -1,3 +1,20 @@ +2010-11-22 Stefan Monnier + + * vc/diff.el (diff-old-temp-file, diff-new-temp-file): Remove. + (diff-sentinel): Get them as arguments instead. + (diff-old-file, diff-new-file, diff-extra-args): Remove. + (diff-file-local-copy, diff-better-file-name): New funs. + (diff-no-select): Rename from diff-into-buffer. + Support buffers additionally to files. Move `buf' arg. Don't display buf. + Prefer closures to buffer-local variables. + (diff): Adjust accordingly. + (diff-buffer-with-file): Move from files.el. + * files.el (diff-buffer-with-file): Move to vc/diff.el. + (diff-buffer-internal): Remove. + (diff-buffer-buffer): Remove. + (save-some-buffers-action-alist): Use diff-no-select so as not to guess + the buffer name used, and so as not to mess up windows and frames. + 2010-11-22 Bob Rogers * files.el: Make revert work with diff-buffer-with-file (bug#7277). === modified file 'lisp/files.el' --- lisp/files.el 2010-11-22 17:57:46 +0000 +++ lisp/files.el 2010-11-22 19:13:31 +0000 @@ -4487,47 +4487,6 @@ (setq buffer-backed-up nil)))))) setmodes)) -(defun diff-buffer-with-file (&optional buffer) - "View the differences between BUFFER and its associated file. -This requires the external program `diff' to be in your `exec-path'." - (interactive "bBuffer: ") - (diff-buffer-internal (get-buffer (or buffer (current-buffer))) - (get-buffer-create "*Diff*")) - ;; return always nil, so that save-buffers-kill-emacs will not move - ;; over to the next unsaved buffer when calling `d'. - nil) - -(defvar diff-buffer-buffer) ;; suppress compiler warnings. - -(defun diff-buffer-internal (buffer result-buffer) - (if (not (and buffer (buffer-name buffer))) - (error "Original buffer deleted.")) - (with-current-buffer buffer - (if (and buffer-file-name - (file-exists-p buffer-file-name)) - (let ((tempfile (make-temp-file "buffer-content-"))) - (unwind-protect - (progn - (write-region nil nil tempfile nil 'nomessage) - ;; No asynch so we don't delete the temp file prematurely. - (diff-into-buffer result-buffer buffer-file-name tempfile - nil t) - (sit-for 0) - ;; Now revise the revert-buffer-function, since the - ;; default will not be able to find the temp file. - (with-current-buffer result-buffer - (set (make-local-variable 'diff-buffer-buffer) buffer) - (setq revert-buffer-function - (lambda (ignore-auto noconfirm) - (diff-buffer-internal diff-buffer-buffer - (current-buffer)))))) - (when (file-exists-p tempfile) - (delete-file tempfile)))) - (message "Buffer %s has no associated file on disc" (buffer-name)) - ;; Display that message for 1 second so that user can read it - ;; in the minibuffer. - (sit-for 1)))) - (defvar save-some-buffers-action-alist `((?\C-r ,(lambda (buf) @@ -4542,13 +4501,14 @@ (?d ,(lambda (buf) (if (null (buffer-file-name buf)) (message "Not applicable: no file") - (save-window-excursion (diff-buffer-with-file buf)) + (require 'diff) ;for diff-no-select. + (let ((diffbuf (diff-no-select (buffer-file-name buf) buf + nil 'noasync))) (if (not enable-recursive-minibuffers) - (progn (display-buffer (get-buffer-create "*Diff*")) - (setq other-window-scroll-buffer "*Diff*")) - (view-buffer (get-buffer-create "*Diff*") - (lambda (_) (exit-recursive-edit))) - (recursive-edit))) + (progn (display-buffer diffbuf) + (setq other-window-scroll-buffer diffbuf)) + (view-buffer diffbuf (lambda (_) (exit-recursive-edit))) + (recursive-edit)))) ;; Return nil to ask about BUF again. nil) ,(purecopy "view changes in this buffer"))) === modified file 'lisp/vc/diff.el' --- lisp/vc/diff.el 2010-11-22 17:57:46 +0000 +++ lisp/vc/diff.el 2010-11-22 19:19:14 +0000 @@ -31,6 +31,8 @@ ;;; Code: +(eval-when-compile (require 'cl)) + (defgroup diff nil "Comparing files with `diff'." :group 'tools) @@ -47,11 +49,6 @@ :type 'string :group 'diff) -(defvar diff-old-temp-file nil - "This is the name of a temp file to be deleted after diff finishes.") -(defvar diff-new-temp-file nil - "This is the name of a temp file to be deleted after diff finishes.") - ;; prompt if prefix arg present (defun diff-switches () (if current-prefix-arg @@ -60,12 +57,12 @@ diff-switches (mapconcat 'identity diff-switches " "))))) -(defun diff-sentinel (code) +(defun diff-sentinel (code old-temp-file new-temp-file) "Code run when the diff process exits. CODE is the exit code of the process. It should be 0 only if no diffs were found." - (if diff-old-temp-file (delete-file diff-old-temp-file)) - (if diff-new-temp-file (delete-file diff-new-temp-file)) + (if old-temp-file (delete-file old-temp-file)) + (if new-temp-file (delete-file new-temp-file)) (save-excursion (goto-char (point-max)) (let ((inhibit-read-only t)) @@ -75,10 +72,6 @@ (t "")) (current-time-string)))))) -(defvar diff-old-file nil) -(defvar diff-new-file nil) -(defvar diff-extra-args nil) - ;;;###autoload (defun diff (old new &optional switches no-async) "Find and display the differences between OLD and NEW files. @@ -91,16 +84,15 @@ interactively for diff switches. Otherwise, the switches specified in `diff-switches' are passed to the diff command." (interactive - (let (oldf newf) - (setq newf (buffer-file-name) - newf (if (and newf (file-exists-p newf)) + (let ((newf (buffer-file-name)) + (oldf (file-newest-backup newf))) + (setq newf (if (and newf (file-exists-p newf)) (read-file-name (concat "Diff new file (default " (file-name-nondirectory newf) "): ") nil newf t) (read-file-name "Diff new file: " nil nil t))) - (setq oldf (file-newest-backup newf) - oldf (if (and oldf (file-exists-p oldf)) + (setq oldf (if (and oldf (file-exists-p oldf)) (read-file-name (concat "Diff original file (default " (file-name-nondirectory oldf) "): ") @@ -108,63 +100,82 @@ (read-file-name "Diff original file: " (file-name-directory newf) nil t))) (list oldf newf (diff-switches)))) - (diff-into-buffer nil old new switches no-async)) + (display-buffer + (diff-no-select old new switches no-async))) -(defun diff-into-buffer (buf old new &optional switches no-async) - ;; Noninteractive helper for creating and reverting diff buffers. - (setq new (expand-file-name new) - old (expand-file-name old)) +(defun diff-file-local-copy (file-or-buf) + (if (bufferp file-or-buf) + (with-current-buffer file-or-buf + (let ((tempfile (make-temp-file "buffer-content-"))) + (write-region nil nil tempfile nil 'nomessage) + tempfile)) + (file-local-copy file-or-buf))) + +(defun diff-better-file-name (file) + (if (bufferp file) file + (let ((rel (file-relative-name file)) + (abbr (abbreviate-file-name (expand-file-name file)))) + (if (< (length abbr) (length rel)) + abbr + rel)))) + +(defun diff-no-select (old new &optional switches no-async buf) + ;; Noninteractive helper for creating and reverting diff buffers + (setq new (diff-better-file-name new) + old (diff-better-file-name old)) (or switches (setq switches diff-switches)) ; If not specified, use default. + (unless (listp switches) (setq switches (list switches))) (or buf (setq buf (get-buffer-create "*Diff*"))) - (let* ((old-alt (file-local-copy old)) - (new-alt (file-local-copy new)) + (let* ((old-alt (diff-file-local-copy old)) + (new-alt (diff-file-local-copy new)) (command (mapconcat 'identity `(,diff-command ;; Use explicitly specified switches - ,@(if (listp switches) switches (list switches)) - ,@(if (or old-alt new-alt) - (list "-L" old "-L" new)) - ,(shell-quote-argument (or old-alt old)) - ,(shell-quote-argument (or new-alt new))) + ,@switches + ,@(mapcar #'shell-quote-argument + (nconc + (when (or old-alt new-alt) + (list "-L" (if (stringp old) + old (prin1-to-string old)) + "-L" (if (stringp new) + new (prin1-to-string new)))) + (list (or old-alt old) + (or new-alt new))))) " ")) - (thisdir default-directory) - proc) - (save-excursion - (display-buffer buf) - (set-buffer buf) - (setq buffer-read-only nil) + (thisdir default-directory)) + (with-current-buffer buf + (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) (let ((inhibit-read-only t)) (erase-buffer)) (buffer-enable-undo (current-buffer)) (diff-mode) - ;; Use below 2 vars for backward-compatibility. - (set (make-local-variable 'diff-old-file) old) - (set (make-local-variable 'diff-new-file) new) - (set (make-local-variable 'diff-extra-args) (list switches no-async)) (set (make-local-variable 'revert-buffer-function) + (lexical-let ((old old) (new new) + (switches switches) + (no-async no-async)) (lambda (ignore-auto noconfirm) - (apply 'diff diff-old-file diff-new-file diff-extra-args))) - (set (make-local-variable 'diff-old-temp-file) old-alt) - (set (make-local-variable 'diff-new-temp-file) new-alt) + (diff-no-select old new switches no-async (current-buffer))))) (setq default-directory thisdir) (let ((inhibit-read-only t)) (insert command "\n")) (if (and (not no-async) (fboundp 'start-process)) - (progn - (setq proc (start-process "Diff" buf shell-file-name - shell-command-switch command)) + (let ((proc (start-process "Diff" buf shell-file-name + shell-command-switch command))) (set-process-filter proc 'diff-process-filter) + (lexical-let ((old-alt old-alt) (new-alt new-alt)) (set-process-sentinel proc (lambda (proc msg) (with-current-buffer (process-buffer proc) - (diff-sentinel (process-exit-status proc)))))) + (diff-sentinel (process-exit-status proc) + old-alt new-alt)))))) ;; Async processes aren't available. (let ((inhibit-read-only t)) (diff-sentinel (call-process shell-file-name nil buf nil - shell-command-switch command))))) + shell-command-switch command) + old-alt new-alt)))) buf)) (defun diff-process-filter (proc string) @@ -203,6 +214,14 @@ (funcall handler 'diff-latest-backup-file fn) (file-newest-backup fn)))) +;;;###autoload +(defun diff-buffer-with-file (&optional buffer) + "View the differences between BUFFER and its associated file. +This requires the external program `diff' to be in your `exec-path'." + (interactive "bBuffer: ") + (with-current-buffer (get-buffer (or buffer (current-buffer))) + (diff buffer-file-name (current-buffer) nil 'noasync))) + (provide 'diff) ;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 23 14:39:07 2010 Received: (at 7277) by debbugs.gnu.org; 23 Nov 2010 19:39:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKyhm-0002kd-7h for submit@debbugs.gnu.org; Tue, 23 Nov 2010 14:39:06 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKyhk-0002kH-17 for 7277@debbugs.gnu.org; Tue, 23 Nov 2010 14:39:04 -0500 Received: from localhost ([127.0.0.1]:46558) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKymq-0000Wd-NO; Tue, 23 Nov 2010 14:44:20 -0500 To: 7277@debbugs.gnu.org Subject: Re: bug#7277: 24.0.50; Can't revert diff-buffer-with-file References: <19652.38745.217242.560815@rgr.rgrjr.com> From: Glenn Morris X-Spook: BROMURE Osama csim beanpole SCUD missile Mahmoud X-Ran: "GD0p`9k/F8j~8$n+@{q+`ZxnHx_eR`lW;]A^-N%ED`8|/,J+8pQZjdG=JoCLJN=YA/{Qr X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 23 Nov 2010 14:44:20 -0500 In-Reply-To: (Stefan Monnier's message of "Mon\, 22 Nov 2010 14\:22\:22 -0500") Message-ID: <148w0jkep7.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 7277 Cc: monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) Stefan Monnier wrote: > + (let ((newf (buffer-file-name)) > + (oldf (file-newest-backup newf))) You probably wanted let*. (This is flagged by the compiler.) From unknown Mon Jun 23 18:27:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Dec 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator