emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117340: * lisp/desktop.el (desktop-save): Rename


From: Juri Linkov
Subject: [Emacs-diffs] emacs-24 r117340: * lisp/desktop.el (desktop-save): Rename arg `auto-save' to `only-if-changed'.
Date: Wed, 02 Jul 2014 23:45:18 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117340
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17873
committer: Juri Linkov <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-07-03 02:45:12 +0300
message:
  * lisp/desktop.el (desktop-save): Rename arg `auto-save' to `only-if-changed'.
  Doc fix.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/desktop.el                desktop.el-20091113204419-o5vbwnq5f7feedwu-591
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-07-02 14:42:00 +0000
+++ b/lisp/ChangeLog    2014-07-02 23:45:12 +0000
@@ -1,3 +1,8 @@
+2014-07-02  Juri Linkov  <address@hidden>
+
+       * desktop.el (desktop-save): Rename arg `auto-save' to
+       `only-if-changed'.  Doc fix.  (Bug#17873)
+
 2014-07-02  Stefan Monnier  <address@hidden>
 
        * mouse.el (mouse-yank-primary, mouse-yank-secondary):

=== modified file 'lisp/desktop.el'
--- a/lisp/desktop.el   2014-06-24 23:23:41 +0000
+++ b/lisp/desktop.el   2014-07-02 23:45:12 +0000
@@ -942,12 +942,13 @@
                            :predicate #'desktop--check-dont-save))))
 
 ;;;###autoload
-(defun desktop-save (dirname &optional release auto-save)
+(defun desktop-save (dirname &optional release only-if-changed)
   "Save the desktop in a desktop file.
 Parameter DIRNAME specifies where to save the desktop file.
 Optional parameter RELEASE says whether we're done with this desktop.
-If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
-and don't save the buffer if they are the same."
+If ONLY-IF-CHANGED is non-nil, compare the current desktop information
+to that in the desktop file, and if the desktop information has not
+changed since it was last saved then do not rewrite the file."
   (interactive (list
                 ;; Or should we just use (car desktop-path)?
                 (let ((default (if (member "." desktop-path)
@@ -1020,7 +1021,7 @@
 
          (setq default-directory desktop-dirname)
          ;; When auto-saving, avoid writing if nothing has changed since the 
last write.
-         (let* ((beg (and auto-save
+         (let* ((beg (and only-if-changed
                           (save-excursion
                             (goto-char (point-min))
                             ;; Don't check the header with changing timestamp


reply via email to

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