unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35940: [PATCH] bookmark.el: Remove support for renaming ancient "~/.emacs-bkmrks" file
@ 2019-05-28  1:23 Stefan Kangas
  2019-05-30 12:08 ` Basil L. Contovounesios
  2019-06-09 23:49 ` bug#35940: " Paul Eggert
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Kangas @ 2019-05-28  1:23 UTC (permalink / raw)
  To: 35940

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Since at least 1995, there has been a variable `bookmark-old-default-file'
referring to an old default file name "~/.emacs-bkmrks", and some
accompanying code to rename from the old file name to the new one.

Since it's extremely unlikely that someone has a need to recover this kind
of file from before 1995 and use it in a modern Emacs, I think it's about
time to retire this code.  Please see the attached patch for a suggestion.

Thanks,
Stefan Kangas

[-- Attachment #2: 0001-Make-bookmark-old-default-file-variable-obsolete.patch --]
[-- Type: application/octet-stream, Size: 2276 bytes --]

From dceeabd76a21483300eafa15ac74681fb766af87 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Tue, 28 May 2019 02:58:54 +0200
Subject: [PATCH] Make bookmark-old-default-file variable obsolete

* bookmark.el (bookmark-old-default-file): Redefine as obsolete
variable alias for `bookmark-default-file'.
(bookmark-maybe-load-default-file): Don't try to rename file
`bookmark-old-default-file' (~/.emacs-bkmrks) to new name.
---
 etc/NEWS         |  6 ++++++
 lisp/bookmark.el | 14 +-------------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 222b86ee2b..964ddd4893 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1478,6 +1478,12 @@ the new variable 'buffer-auto-revert-by-notification' to a non-nil
 value.  Auto Revert mode can use this information to avoid polling the
 buffer periodically when 'auto-revert-avoid-polling' is non-nil.
 
+** Bookmarks
+
+---
+*** 'bookmark-old-default-file' is now an obsolete alias of
+'bookmark-default-file'.
+
 \f
 * New Modes and Packages in Emacs 27.1
 
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b1fe690dac..cfcfd0e6e8 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -78,8 +78,7 @@ bookmark-save-flag
   :group 'bookmark)
 
 
-(defconst bookmark-old-default-file "~/.emacs-bkmrks"
-  "The `.emacs.bmk' file used to be called this name.")
+(define-obsolete-variable-alias 'bookmark-old-default-file 'bookmark-default-file "27.1")
 
 
 ;; defvared to avoid a compilation warning:
@@ -1034,17 +1033,6 @@ bookmark-maybe-load-default-file
   "If bookmarks have not been loaded from the default place, load them."
   (and (not bookmarks-already-loaded)
        (null bookmark-alist)
-       (prog2
-           (and
-            ;; Possibly the old bookmark file, "~/.emacs-bkmrks", needs
-            ;; to be renamed.
-            (file-exists-p bookmark-old-default-file)
-            (not (file-exists-p bookmark-default-file))
-            (rename-file bookmark-old-default-file
-                         bookmark-default-file))
-           ;; return t so the `and' will continue...
-           t)
-
        (file-readable-p bookmark-default-file)
        (bookmark-load bookmark-default-file t t)
        (setq bookmarks-already-loaded t)))
-- 
2.21.0


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

end of thread, other threads:[~2019-06-09 23:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-28  1:23 bug#35940: [PATCH] bookmark.el: Remove support for renaming ancient "~/.emacs-bkmrks" file Stefan Kangas
2019-05-30 12:08 ` Basil L. Contovounesios
2019-05-30 12:23   ` Stefan Kangas
2019-05-30 12:50     ` Basil L. Contovounesios
2019-06-05 11:02     ` Stefan Kangas
2019-06-09 23:49 ` bug#35940: " Paul Eggert

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