emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111046: * startup.el (fancy-startup-


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111046: * startup.el (fancy-startup-tail): Improve the message about auto-save files.
Date: Sat, 01 Dec 2012 09:49:29 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111046
fixes bug: http://debbugs.gnu.org/2176
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2012-12-01 09:49:29 +0800
message:
  * startup.el (fancy-startup-tail): Improve the message about auto-save files.
modified:
  lisp/ChangeLog
  lisp/startup.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-01 01:27:56 +0000
+++ b/lisp/ChangeLog    2012-12-01 01:49:29 +0000
@@ -1,3 +1,8 @@
+2012-12-01  Chong Yidong  <address@hidden>
+
+       * startup.el (fancy-startup-tail): Improve the message about
+       auto-save files (Bug#2176).
+
 2012-12-01  Glenn Morris  <address@hidden>
 
        * ido.el (ido-file-internal):

=== modified file 'lisp/startup.el'
--- a/lisp/startup.el   2012-10-29 10:14:50 +0000
+++ b/lisp/startup.el   2012-12-01 01:49:29 +0000
@@ -1569,27 +1569,23 @@
                       :face '(variable-pitch (:height 0.8))
                       emacs-copyright
                       "\n")
-  (and auto-save-list-file-prefix
-       ;; Don't signal an error if the
-       ;; directory for auto-save-list files
-       ;; does not yet exist.
-       (file-directory-p (file-name-directory
-                         auto-save-list-file-prefix))
-       (directory-files
-       (file-name-directory auto-save-list-file-prefix)
-       nil
-       (concat "\\`"
-               (regexp-quote (file-name-nondirectory
-                              auto-save-list-file-prefix)))
-       t)
-       (fancy-splash-insert :face '(variable-pitch font-lock-comment-face)
-                           "\nIf an Emacs session crashed recently, "
-                           "type "
-                           :face '(fixed-pitch font-lock-comment-face)
-                           "Meta-x recover-session RET"
-                           :face '(variable-pitch font-lock-comment-face)
-                           "\nto recover"
-                           " the files you were editing."))
+  (when auto-save-list-file-prefix
+    (let ((dir  (file-name-directory auto-save-list-file-prefix))
+         (name (file-name-nondirectory auto-save-list-file-prefix))
+         files)
+      ;; Don't warn if the directory for auto-save-list files does not
+      ;; yet exist.
+      (and (file-directory-p dir)
+          (setq files (directory-files dir nil (concat "\\`" name) t))
+          (fancy-splash-insert :face '(variable-pitch font-lock-comment-face)
+                               (if (= (length files) 1)
+                                   "\nAn auto-save file list was found.  "
+                                 "\nAuto-save file lists were found.  ")
+                               "If an Emacs session crashed recently,\ntype "
+                               :face '(fixed-pitch font-lock-comment-face)
+                               "M-x recover-session RET"
+                               :face '(variable-pitch font-lock-comment-face)
+                               " to recover the files you were editing."))))
 
   (when concise
     (fancy-splash-insert


reply via email to

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