unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 35940@debbugs.gnu.org
Subject: bug#35940: [PATCH] bookmark.el: Remove support for renaming ancient "~/.emacs-bkmrks" file
Date: Wed, 5 Jun 2019 13:02:49 +0200	[thread overview]
Message-ID: <CADwFkmkDhZE7DsoPDBFv_VuRHimy=5oZoiVroDmahbz35XS=4A@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmn12TDJ-0W3G+UG2K6EOCnFuWAzKN+WHc4zw+dbPHvGbg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 565 bytes --]

[Accidentally sent this only to Basil - sorry about that. Resending.]

Basil L. Contovounesios <contovob@tcd.ie> writes:
> Both changes LGTM, so I'll push them in the coming week if there are no
> other comments before then and no-one beats me to it.

Very good, thanks.

> But could you please first amend the commit messages to mention their
> bug#numbers and list file names relative to the project root,
> i.e. lisp/bookmark.el instead of bookmark.el?

Sure, I've attached a fixed patch here and I'll send new versions of
the others too.

Thanks,
Stefan Kangas

[-- Attachment #1.2: Type: text/html, Size: 1025 bytes --]

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

From f4c4740c0a8ab5c4e79dcec81030f497842b1c9a 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

* lisp/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.  (Bug#35940)
---
 etc/NEWS         |  6 ++++++
 lisp/bookmark.el | 14 +-------------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 8100427403..24cc8ce1fb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1480,6 +1480,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.11.0


  parent reply	other threads:[~2019-06-05 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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='CADwFkmkDhZE7DsoPDBFv_VuRHimy=5oZoiVroDmahbz35XS=4A@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=35940@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    /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).