From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Mark A. Hershberger" Newsgroups: gmane.emacs.bugs Subject: bug#32741: [PATCH] Update references in core emacs from save-place to save-place-mode Date: Sat, 15 Sep 2018 12:49:49 -0400 Message-ID: <87in367ljm.fsf@everybody.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537030150 4736 195.159.176.226 (15 Sep 2018 16:49:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Sep 2018 16:49:10 +0000 (UTC) To: 32741@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 15 18:49:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1Dkn-00015N-Ev for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Sep 2018 18:49:05 +0200 Original-Received: from localhost ([::1]:56203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1Dmt-0001Tg-Oi for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Sep 2018 12:51:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1Dmm-0001TY-Ig for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:51:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1Dmg-0003AZ-HF for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:51:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g1Dmg-00039f-BK for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g1Dmg-00016y-8L for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Mark A. Hershberger" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Sep 2018 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32741 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15370302094194 (code B ref -1); Sat, 15 Sep 2018 16:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Sep 2018 16:50:09 +0000 Original-Received: from localhost ([127.0.0.1]:41744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1Dlo-00015a-JG for submit@debbugs.gnu.org; Sat, 15 Sep 2018 12:50:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1Dln-00015I-CM for submit@debbugs.gnu.org; Sat, 15 Sep 2018 12:50:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1Dlg-0001Ch-WA for submit@debbugs.gnu.org; Sat, 15 Sep 2018 12:50:01 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1Dlg-0001Bn-Q9 for submit@debbugs.gnu.org; Sat, 15 Sep 2018 12:50:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1Dlf-0001KA-L9 for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:50:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1Dla-00015w-Lz for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:49:59 -0400 Original-Received: from nospam.nichework.com ([206.71.169.33]:42999) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1Dla-0000zU-Ce for bug-gnu-emacs@gnu.org; Sat, 15 Sep 2018 12:49:54 -0400 Original-Received: from localhost (localhost.localdmain [127.0.0.1]) by nospam.nichework.com (Postfix) with ESMTP id 500202AC006 for ; Sat, 15 Sep 2018 12:49:37 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at nospam.nichework.com Original-Received: from nospam.nichework.com ([127.0.0.1]) by localhost (nospam.nichework.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3mOyDdayig0P for ; Sat, 15 Sep 2018 12:49:37 -0400 (EDT) Original-Received: from mail.nichework.com (mail.nichework.com [108.161.151.158]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by nospam.nichework.com (Postfix) with ESMTPS id 0C9EE2AC003 for ; Sat, 15 Sep 2018 12:49:37 -0400 (EDT) Original-Received: from mail.nichework.com (localhost.localdomain [127.0.0.1]) by mail.nichework.com (Postfix) with ESMTPS id 4AE1A4E14C6 for ; Sat, 15 Sep 2018 09:49:51 -0700 (PDT) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.nichework.com (Postfix) with ESMTP id 3F1294E14AE for ; Sat, 15 Sep 2018 09:49:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at mail.nichework.com Original-Received: from mail.nichework.com ([127.0.0.1]) by localhost (mail.nichework.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9igM6onNe09t for ; Sat, 15 Sep 2018 09:49:51 -0700 (PDT) Original-Received: from slink.everybody.org (unknown [24.229.149.248]) by mail.nichework.com (Postfix) with ESMTPSA id DF63D4E0C07 for ; Sat, 15 Sep 2018 09:49:50 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150339 Archived-At: * 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