(url-setup-privacy-info): Add docstring.
[bpt/emacs.git] / lisp / desktop.el
index f8be1f0..4903488 100644 (file)
@@ -293,9 +293,8 @@ modes are restored automatically; they should not be listed here."
 
 ;; We skip .log files because they are normally temporary.
 ;;         (ftp) files because they require passwords and whatnot.
-;;         TAGS files to save time (tags-file-name is saved instead).
 (defcustom desktop-buffers-not-to-save
-  "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS\\)$"
+  "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\)$"
   "Regexp identifying buffers that are to be excluded from saving."
   :type 'regexp
   :group 'desktop)
@@ -307,7 +306,9 @@ modes are restored automatically; they should not be listed here."
   :type 'regexp
   :group 'desktop)
 
-(defcustom desktop-modes-not-to-save nil
+;; We skip TAGS files to save time (tags-file-name is saved instead).
+(defcustom desktop-modes-not-to-save
+  '(tags-table-mode)
   "List of major modes whose buffers should not be saved."
   :type '(repeat symbol)
   :group 'desktop)
@@ -403,13 +404,15 @@ code like
 
 Furthermore the major mode function must be autoloaded.")
 
+;;;###autoload
 (put 'desktop-buffer-mode-handlers 'risky-local-variable t)
 (make-obsolete-variable 'desktop-buffer-handlers
                         'desktop-buffer-mode-handlers "22.1")
 
 (defcustom desktop-minor-mode-table
   '((auto-fill-function auto-fill-mode)
-    (vc-mode nil))
+    (vc-mode nil)
+    (vc-dired-mode nil))
   "Table mapping minor mode variables to minor mode functions.
 Each entry has the form (NAME RESTORE-FUNCTION).
 NAME is the name of the buffer-local variable indicating that the minor
@@ -465,6 +468,7 @@ Furthermore the minor mode function must be autoloaded.
 
 See also `desktop-minor-mode-table'.")
 
+;;;###autoload
 (put 'desktop-minor-mode-handlers 'risky-local-variable t)
 
 ;; ----------------------------------------------------------------------------
@@ -942,7 +946,7 @@ directory DIRNAME."
                                  desktop-buffer-file-name)))
                  (if desktop-missing-file-warning
                     (y-or-n-p (concat msg " Re-create? "))
-                   (message msg)
+                   (message "%s" msg)
                    nil)))
          (let* ((auto-insert nil) ; Disable auto insertion
                 (coding-system-for-read
@@ -961,10 +965,11 @@ directory DIRNAME."
 
 (defun desktop-load-file (function)
   "Load the file where auto loaded FUNCTION is defined."
-  (let ((fcell (symbol-function function)))
-    (when (and (listp fcell)
-               (eq 'autoload (car fcell)))
-      (load (cadr fcell)))))
+  (when function
+    (let ((fcell (symbol-function function)))
+      (when (and (listp fcell)
+                 (eq 'autoload (car fcell)))
+        (load (cadr fcell))))))
 
 ;; ----------------------------------------------------------------------------
 ;; Create a buffer, load its file, set its mode, ...;
@@ -1099,7 +1104,7 @@ ARGS must be an argument list for `desktop-create-buffer'."
            (msg (format "Desktop lazily opening %s (%s remaining)..."
                             buffer-name remaining)))
       (when desktop-lazy-verbose
-        (message msg))
+        (message "%s" msg))
       (let ((desktop-first-buffer nil)
             (desktop-buffer-ok-count 0)
             (desktop-buffer-fail-count 0))