Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

saveplace.el : Fix toggle-save-place

(toggle-save-place 0) now correctly handles the case where save-place
is already nil.

Use prefix-numeric-value to place nicely with C-u / C-- etc
  • Loading branch information...
commit 3be78ea0384d81f7a9545cac404a9b3be2fa8ceb 1 parent e7ee0d5
@PureAbstract PureAbstract authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lisp/saveplace.el
View
12 lisp/saveplace.el
@@ -145,12 +145,12 @@ To save places automatically in all files, put this in your `.emacs' file:
(interactive "P")
(if (not buffer-file-name)
(message "Buffer `%s' not visiting a file" (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"))))
(defun save-place-to-alist ()
;; put filename and point in a cons box and then cons that onto the
Please sign in to comment.
Something went wrong with that request. Please try again.