emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ff7072d 2/2: lisp/gnus/gnus-start.el: always check


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master ff7072d 2/2: lisp/gnus/gnus-start.el: always check newsrc timestamp when saving it
Date: Thu, 05 Feb 2015 11:51:18 +0000

branch: master
commit ff7072d5314768e31a4f15ad1ce0039405ddb535
Author: Ted Zlatanov <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    lisp/gnus/gnus-start.el: always check newsrc timestamp when saving it
---
 lisp/gnus/ChangeLog     |    6 ++++++
 lisp/gnus/gnus-start.el |   34 ++++++++++++----------------------
 2 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 19bf562..32d3f08 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-05  Teodor Zlatanov  <address@hidden>
+
+       * gnus-start.el (gnus-save-newsrc-file-check-timestamp): Remove
+       variable; always check the newrc timestamp.
+       (gnus-save-newsrc-file): Always check timestamp.
+
 2015-02-05  Timo Lilja  <address@hidden>  (tiny change)
 
        * mail-source.el (mail-source-call-script): If scripts exit with an
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index aa2568d..0c0246a 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -442,15 +442,6 @@ See also `gnus-before-startup-hook'."
   :group 'gnus-newsrc
   :type 'hook)
 
-(defcustom gnus-save-newsrc-file-check-timestamp nil
-  "Check the modification time of the newsrc.eld file before saving it.
-When the newsrc.eld file is updated by multiple machines,
-checking the file's modification time is a good way to avoid
-overwriting updated data."
-  :version "25.1"
-  :group 'gnus-newsrc
-  :type 'boolean)
-
 (defcustom gnus-save-newsrc-hook nil
   "A hook called before saving any of the newsrc files."
   :group 'gnus-newsrc
@@ -2833,19 +2824,18 @@ If FORCE is non-nil, the .newsrc file is read."
 
           ;; check timestamp of `gnus-current-startup-file'.eld against
           ;; `gnus-save-newsrc-file-last-timestamp'
-          (when gnus-save-newsrc-file-check-timestamp
-            (let* ((checkfile (concat gnus-current-startup-file ".eld"))
-                   (mtime (nth 5 (file-attributes checkfile))))
-              (when (and gnus-save-newsrc-file-last-timestamp
-                         (time-less-p gnus-save-newsrc-file-last-timestamp
-                                      mtime))
-                (unless (y-or-n-p
-                         (format "%s was updated externally after %s, save?"
-                                 checkfile
-                                 (format-time-string
-                                  "%c"
-                                  gnus-save-newsrc-file-last-timestamp)))
-                (error "Couldn't save %s: updated externally" checkfile)))))
+          (let* ((checkfile (concat gnus-current-startup-file ".eld"))
+                 (mtime (nth 5 (file-attributes checkfile))))
+            (when (and gnus-save-newsrc-file-last-timestamp
+                       (time-less-p gnus-save-newsrc-file-last-timestamp
+                                    mtime))
+              (unless (y-or-n-p
+                       (format "%s was updated externally after %s, save?"
+                               checkfile
+                               (format-time-string
+                                "%c"
+                                gnus-save-newsrc-file-last-timestamp)))
+                (error "Couldn't save %s: updated externally" checkfile))))
 
           (if gnus-save-startup-file-via-temp-buffer
               (let ((coding-system-for-write gnus-ding-file-coding-system)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]