From: Stefan Kangas <stefan@marxist.se>
To: 35940@debbugs.gnu.org
Subject: bug#35940: [PATCH] bookmark.el: Remove support for renaming ancient "~/.emacs-bkmrks" file
Date: Tue, 28 May 2019 03:23:26 +0200 [thread overview]
Message-ID: <CADwFkmmGGiHUVZ-i3smke2_aYvAV+fLOBNNn5aHemRRbhL_08A@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2019-05-28 1:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 1:23 Stefan Kangas [this message]
2019-05-30 12:08 ` bug#35940: [PATCH] bookmark.el: Remove support for renaming ancient "~/.emacs-bkmrks" file 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmmGGiHUVZ-i3smke2_aYvAV+fLOBNNn5aHemRRbhL_08A@mail.gmail.com \
--to=stefan@marxist.se \
--cc=35940@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).