]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/desktop.el (desktop-save): Rename arg `auto-save' to `only-if-changed'.
authorJuri Linkov <juri@jurta.org>
Wed, 2 Jul 2014 23:45:12 +0000 (02:45 +0300)
committerJuri Linkov <juri@jurta.org>
Wed, 2 Jul 2014 23:45:12 +0000 (02:45 +0300)
Doc fix.

Fixes: debbugs:17873
lisp/ChangeLog
lisp/desktop.el

index d9224d0b747072445c611fbb9decbf9d83f5c34a..73f1f286c43cea54cad570020823769a6ee0bf14 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-02  Juri Linkov  <juri@jurta.org>
+
+       * desktop.el (desktop-save): Rename arg `auto-save' to
+       `only-if-changed'.  Doc fix.  (Bug#17873)
+
 2014-07-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mouse.el (mouse-yank-primary, mouse-yank-secondary):
index 26d288bf9cd7924b964a20500630de313f7ff04a..4bb6fba3532018eeba89c69b13cd5fdee3c615a6 100644 (file)
@@ -942,12 +942,13 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved."
                            :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 @@ and don't save the buffer if they are the same."
 
          (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