]> code.delx.au - gnu-emacs/blobdiff - lisp/shadowfile.el
(tab-always-indent): Fix custom-type.
[gnu-emacs] / lisp / shadowfile.el
index f4f8f85689608baaa4c224490ecb9a6d37e1d811..4250e459f04f64161139c92dd6d88b8f3882bcff 100644 (file)
@@ -1,7 +1,7 @@
 ;;; shadowfile.el --- automatic file copying
 
 ;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Boris Goldowsky <boris@gnu.org>
 ;; Keywords: comm files
   :group 'files)
 
 (defcustom shadow-noquery nil
-  "*If t, always copy shadow files without asking.
+  "If t, always copy shadow files without asking.
 If nil \(the default), always ask.  If not nil and not t, ask only if there
 is no buffer currently visiting the file."
   :type '(choice (const t) (const nil) (other :tag "Ask if no buffer" maybe))
   :group 'shadow)
 
 (defcustom shadow-inhibit-message nil
-  "*If non-nil, do not display a message when a file needs copying."
+  "If non-nil, do not display a message when a file needs copying."
   :type 'boolean
   :group 'shadow)
 
@@ -510,7 +510,7 @@ Pending copies are stored in variable `shadow-files-to-copy', and in
 call it manually."
   (interactive "P")
   (if (not shadow-files-to-copy)
-      (if (interactive-p)
+      (if (called-interactively-p 'interactive)
          (message "No files need to be shadowed."))
     (save-excursion
       (map-y-or-n-p (function
@@ -574,7 +574,7 @@ site."
     (when buffer
       (set-buffer buffer)
       (condition-case i
-          (progn
+         (progn
             (write-region nil nil to)
             (shadow-remove-from-todo s))
         (error (message "Shadow %s not updated!" (cdr s)))))))
@@ -707,8 +707,7 @@ With non-nil argument also saves the buffer."
 
 (defun shadow-save-todo-file ()
   (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
-      (save-excursion
-       (set-buffer shadow-todo-buffer)
+      (with-current-buffer shadow-todo-buffer
        (condition-case nil             ; have to continue even in case of
            (basic-save-buffer)         ; error, otherwise kill-emacs might
          (error                        ; not work!