From 574988509898f8022145b047df780c9c807af4b3 Mon Sep 17 00:00:00 2001 From: Ulf Jasper Date: Thu, 27 Nov 2014 18:37:47 +0100 Subject: [PATCH] newsticker: Change wording of confirmation prompt regarding obsolete variable `newsticker-groups-filename'. Fixes: debbugs:19165 * lisp/net/newst-treeview.el (newsticker-groups-filename): Change default value to nil. Point out that variable is obsolete in doc string. (newsticker--treeview-load): Change wording of the questions the user is asked when `newsticker-groups-filename' is found to be used and we offer to read and remove the groups file. --- lisp/ChangeLog | 9 +++++++++ lisp/net/newst-treeview.el | 23 +++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d875b05e58..3665d19bcbd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2014-11-27 Ulf Jasper + + * net/newst-treeview.el (newsticker-groups-filename): Change + default value to nil. Point out that variable is obsolete in doc + string. + (newsticker--treeview-load): Change wording of the questions the + user is asked when `newsticker-groups-filename' is found to be + used and we offer to read and remove the groups file. (bug#19165) + 2014-11-27 Lars Magne Ingebrigtsen * net/eww.el (eww): Record the new URL immediately, so that if the diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 6d0720d074e..94661922cab 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -132,8 +132,9 @@ Example: (\"Topmost group\" \"feed1\" (\"subgroup1\" \"feed 2\") \"feed3\")") (defcustom newsticker-groups-filename - "~/.newsticker-groups" - "Name of the newsticker groups settings file." + nil + "Name of the newsticker groups settings file. This variable is obsolete." + :version "25.1" ; changed default value to nil :type 'string :group 'newsticker-treeview) (make-obsolete-variable 'newsticker-groups-filename 'newsticker-dir "23.1") @@ -1259,16 +1260,26 @@ Note: does not update the layout." "Load treeview settings." (let* ((coding-system-for-read 'utf-8) (filename - (or (and (file-exists-p newsticker-groups-filename) + (or (and newsticker-groups-filename + (not (string= + (expand-file-name newsticker-groups-filename) + (expand-file-name (concat newsticker-dir "/groups")))) + (file-exists-p newsticker-groups-filename) (y-or-n-p - (format "Old newsticker groups (%s) file exists. Read it? " - newsticker-groups-filename)) + (format + (concat "Obsolete variable `newsticker-groups-filename' " + "points to existing file \"%s\".\n" + "Read it? ") + newsticker-groups-filename)) newsticker-groups-filename) (concat newsticker-dir "/groups"))) (buf (and (file-exists-p filename) (find-file-noselect filename)))) (and (file-exists-p newsticker-groups-filename) - (y-or-n-p (format "Delete old newsticker groups file? ")) + (y-or-n-p (format + (concat "Delete the file \"%s\",\nto which the obsolete " + "variable `newsticker-groups-filename' points ? ") + newsticker-groups-filename)) (delete-file newsticker-groups-filename)) (when buf (set-buffer buf) -- 2.39.5