unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16673: [saveplace] toggle-save-place doesn't toggle-save-place
@ 2014-02-06 18:57 Andy Sawyer
  2014-02-28  6:44 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Sawyer @ 2014-02-06 18:57 UTC (permalink / raw)
  To: 16673

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"))))





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#16673: [saveplace] toggle-save-place doesn't toggle-save-place
  2014-02-06 18:57 bug#16673: [saveplace] toggle-save-place doesn't toggle-save-place Andy Sawyer
@ 2014-02-28  6:44 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2014-02-28  6:44 UTC (permalink / raw)
  To: 16673-done

Version: 24.4

Thanks; applied.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-28  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 18:57 bug#16673: [saveplace] toggle-save-place doesn't toggle-save-place Andy Sawyer
2014-02-28  6:44 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).