GNU bug report logs - #16673
[saveplace] toggle-save-place doesn't toggle-save-place

Previous Next

Package: emacs;

Reported by: Andy Sawyer <andy.sawyer <at> gmail.com>

Date: Thu, 6 Feb 2014 19:57:01 UTC

Severity: normal

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#16673: closed ([saveplace] toggle-save-place doesn't
 toggle-save-place)
Date: Fri, 28 Feb 2014 06:46:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Feb 2014 01:44:58 -0500
with message-id <pg7g8f7n2t.fsf <at> fencepost.gnu.org>
and subject line Re: bug#16673: [saveplace] toggle-save-place doesn't toggle-save-place
has caused the debbugs.gnu.org bug report #16673,
regarding [saveplace] toggle-save-place doesn't toggle-save-place
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
16673: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16673
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Sawyer <andy.sawyer <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [saveplace] toggle-save-place doesn't toggle-save-place
Date: Thu, 6 Feb 2014 18:57:57 +0000
Hi all,
  I noticed a while back that toggle-save-place doesn't actually toggle
save-place. Whilst I mostly run Aquamacs these days, the bug
exists in the existing codebase.

 In particular, in a buffer where save-place is nil, it is unconditionally
turned on. I submitted a path for this to the Aquamacs maintainer, and
include it here for your attention.

(I also took the opportunity to use prefix-numeric-value on the
argument, so it plays nice with C-u).

Regards,
 Andy

$ git diff saveplace.el
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 91da103..0325475 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -156,12 +156,12 @@ file:
   (if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
      dired-directory)))
       (message "Buffer `%s' not visiting a file or directory" (buffer-name))
-    (if (and save-place (or (not parg) (<= parg 0)))
- (progn
-  (message "No place will be saved in this file")
-  (setq save-place nil))
-      (message "Place will be saved")
-      (setq save-place t))))
+    (setq save-place (if parg
+                         (> (prefix-numeric-value parg) 0)
+                       (not save-place)))
+    (message (if save-place
+                 "Place will be saved"
+               "No place will be saved in this file"))))


[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 16673-done <at> debbugs.gnu.org
Subject: Re: bug#16673: [saveplace] toggle-save-place doesn't toggle-save-place
Date: Fri, 28 Feb 2014 01:44:58 -0500
Version: 24.4

Thanks; applied.


This bug report was last modified 11 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.