GNU bug report logs - #32741
[PATCH] Update references in core emacs from save-place to save-place-mode

Previous Next

Package: emacs;

Reported by: "Mark A. Hershberger" <mah <at> everybody.org>

Date: Sat, 15 Sep 2018 16:51:02 UTC

Severity: minor

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32741 in the body.
You can then email your comments to 32741 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32741; Package emacs. (Sat, 15 Sep 2018 16:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Mark A. Hershberger" <mah <at> everybody.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 15 Sep 2018 16:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Mark A. Hershberger" <mah <at> everybody.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Update references in core emacs from save-place to
 save-place-mode
Date: Sat, 15 Sep 2018 12:49:49 -0400
* lisp/menu-bar.el (menu-bar-options-save, menu-bar-options-menu):
* lisp/saveplace.el (save-place-to-alist, save-places-to-alist,
  save-place-find-file-hook, save-place-dired-hook): Use
  save-place-mode instead of the obsolete save-place.
* doc/lispref/customize.texi (Variable Definitions): Replace defcustom
  example from 2005 with a more recent one.
---
 doc/lispref/customize.texi | 12 ++++++------
 lisp/menu-bar.el           |  6 +++---
 lisp/saveplace.el          | 12 ++++++------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index b3528b12d5..d7e97fcae7 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -450,14 +450,14 @@ Variable Definitions
 that turns on a certain feature.  This causes Emacs to load the
 feature, if it is not already loaded, whenever the option is set.
 @xref{Common Keywords}.  Here is an example, from the library
-@file{saveplace.el}:
+@file{org-bbdb.el}:
 
 @example
-(defcustom save-place nil
-  "Non-nil means automatically save place in each file..."
-  :type 'boolean
-  :require 'saveplace
-  :group 'save-place)
+(defcustom org-bbdb-default-anniversary-format "birthday"
+  "Default anniversary class."
+  :type  'string
+  :group 'org-bbdb-anniversaries
+  :require 'bbdb)
 @end example
 
 If a customization item has a type such as @code{hook} or
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 20d5ad95d8..e626369cfb 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -689,7 +689,7 @@ menu-bar-options-save
 		   debug-on-quit debug-on-error
 		   ;; Somehow this works, when tool-bar and menu-bar don't.
 		   tooltip-mode window-divider-mode
-		   save-place uniquify-buffer-name-style fringe-mode
+		   save-place-mode uniquify-buffer-name-style fringe-mode
 		   indicate-empty-lines indicate-buffer-boundaries
 		   case-fold-search font-use-system-font
 		   current-language-environment default-input-method
@@ -1409,7 +1409,7 @@ menu-bar-options-menu
 
     (bindings--define-key menu [save-place]
       (menu-bar-make-toggle
-       toggle-save-place-globally save-place
+       toggle-save-place-globally save-place-mode
        "Save Place in Files between Sessions"
        "Saving place in files %s"
        "Visit files of previous session when restarting Emacs"
@@ -1417,7 +1417,7 @@ menu-bar-options-menu
        ;; Do it by name, to avoid a free-variable
        ;; warning during byte compilation.
        (set-default
-	'save-place (not (symbol-value 'save-place)))))
+	'save-place-mode (not (symbol-value 'save-place-mode)))))
 
     (bindings--define-key menu [uniquify]
       (menu-bar-make-toggle
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 9d3f10ac35..f8f15cabcd 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -27,7 +27,7 @@
 ;; Automatically save place in files, so that visiting them later
 ;; (even during a different Emacs session) automatically moves point
 ;; to the saved position, when the file is first found.  Uses the
-;; value of buffer-local variable save-place to determine whether to
+;; value of buffer-local variable save-place-mode to determine whether to
 ;; save position or not.
 ;;
 ;; Thanks to Stefan Schoef, who sent a patch with the
@@ -176,7 +176,7 @@ save-place-local-mode
 
 (defun save-place-to-alist ()
   ;; put filename and point in a cons box and then cons that onto the
-  ;; front of the save-place-alist, if save-place is non-nil.
+  ;; front of the save-place-alist, if save-place-mode is non-nil.
   ;; Otherwise, just delete that file from the alist.
   ;; first check to make sure alist has been loaded in from the master
   ;; file.  If not, do so, then feel free to modify the alist.  It
@@ -306,8 +306,8 @@ load-save-place-alist-from-file
           nil))))
 
 (defun save-places-to-alist ()
-  ;; go through buffer-list, saving places to alist if save-place is
-  ;; non-nil, deleting them from alist if it is nil.
+  ;; go through buffer-list, saving places to alist if save-place-mode
+  ;; is non-nil, deleting them from alist if it is nil.
   (let ((buf-list (buffer-list)))
     (while buf-list
       ;; put this into a save-excursion in case someone is counting on
@@ -332,7 +332,7 @@ save-place-find-file-hook
 	      (and (integerp (cdr cell))
 		   (goto-char (cdr cell))))
           ;; and make sure it will be saved again for later
-          (setq save-place t)))))
+          (setq save-place-mode t)))))
 
 (declare-function dired-goto-file "dired" (file))
 
@@ -357,7 +357,7 @@ save-place-dired-hook
 	       ((and (listp (cdr cell)) (assq 'dired-filename (cdr cell)))
 		(dired-goto-file (cdr (assq 'dired-filename (cdr cell)))))))
           ;; and make sure it will be saved again for later
-          (setq save-place t)))))
+          (setq save-place-mode t)))))
 
 (defun save-place-kill-emacs-hook ()
   ;; First update the alist.  This loads the old save-place-file if nec.
-- 
2.18.0





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 22 Sep 2018 08:06:01 GMT) Full text and rfc822 format available.

Notification sent to "Mark A. Hershberger" <mah <at> everybody.org>:
bug acknowledged by developer. (Sat, 22 Sep 2018 08:06:01 GMT) Full text and rfc822 format available.

Message #10 received at 32741-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Mark A. Hershberger" <mah <at> everybody.org>
Cc: 32741-done <at> debbugs.gnu.org
Subject: Re: bug#32741: [PATCH] Update references in core emacs from
 save-place to save-place-mode
Date: Sat, 22 Sep 2018 11:04:45 +0300
> From: "Mark A. Hershberger" <mah <at> everybody.org>
> Date: Sat, 15 Sep 2018 12:49:49 -0400
> 
> * lisp/menu-bar.el (menu-bar-options-save, menu-bar-options-menu):
> * lisp/saveplace.el (save-place-to-alist, save-places-to-alist,
>   save-place-find-file-hook, save-place-dired-hook): Use
>   save-place-mode instead of the obsolete save-place.
> * doc/lispref/customize.texi (Variable Definitions): Replace defcustom
>   example from 2005 with a more recent one.

Thanks.  I installed the first 2 changes on the release branch.
Instead of the last one, I preferred to use a fictitious example, to
avoid its bit-rotting with time, as the code in Emacs evolves.

Btw, your employer's disclaimer has expired, so if you are still
working for the same company, you need to ask them to renew it.  If
you changed your workplace, you may need a disclaimer from your
current employer.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Oct 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 304 days ago.

Previous Next


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