From: Andy Sawyer Date: Fri, 28 Feb 2014 06:44:49 +0000 (-0800) Subject: * lisp/saveplace.el (toggle-save-place): Fix argument handling (tiny change) X-Git-Tag: emacs-24.3.90~349 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65b77347740679cf969db5bd0221c558e02ef647;p=emacs.git * lisp/saveplace.el (toggle-save-place): Fix argument handling (tiny change) Fixes: debbugs:16673 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65dbcf65e6e..1084db34775 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-02-28 Andy Sawyer (tiny change) + + * saveplace.el (toggle-save-place): + Fix argument handling. (Bug#16673) + 2014-02-28 Glenn Morris * minibuffer.el (completions-first-difference) diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 6b234109512..a25dba2e39e 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -155,12 +155,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")))) (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))