+2007-12-02 Karl Fogel <kfogel@red-bean.com>
+
+ Offer option for saveplace to be quiet about loading and saving.
+ Suggested by: David Reitter <dreitter{_AT_}inf.ed.ac.uk>
+
+ * lisp/saveplace.el (save-place-quiet): New customizable boolean.
+ (save-place-alist-to-file, load-save-place-alist-from-file): Use it
+ to determine whether to print loading/saving messages.
+
2007-12-02 Glenn Morris <rgm@gnu.org>
* mail/binhex.el: Move here from gnus/.
on this flag."
:type 'boolean :group 'save-place)
+(defcustom save-place-quiet nil
+ "If non-nil, suppress messages about loading and saving `save-place-alist'."
+ :type 'boolean :group 'save-place)
+
(defcustom save-place-skip-check-regexp
;; thanks to ange-ftp-name-format
"\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)"
(defun save-place-alist-to-file ()
(let ((file (expand-file-name save-place-file)))
(save-excursion
- (message "Saving places to %s..." file)
+ (unless save-place-quiet
+ (message "Saving places to %s..." file))
(set-buffer (get-buffer-create " *Saved Places*"))
(delete-region (point-min) (point-max))
(when save-place-forget-unreadable-files
(write-region (point-min) (point-max) file)
(file-error (message "Can't write %s" file)))
(kill-buffer (current-buffer))
- (message "Saving places to %s...done" file)))))
+ (unless save-place-quiet
+ (message "Saving places to %s...done" file))))))
(defun load-save-place-alist-from-file ()
(if (not save-place-loaded)
;; load it if it exists:
(if (file-readable-p file)
(save-excursion
- (message "Loading places from %s..." file)
+ (unless save-place-quiet
+ (message "Loading places from %s..." file))
;; don't want to use find-file because we have been
;; adding hooks to it.
(set-buffer (get-buffer-create " *Saved Places*"))
(setq s (cdr s))))))
(kill-buffer (current-buffer))
- (message "Loading places from %s...done" file)))
+ (unless save-place-quiet
+ (message "Loading places from %s...done" file))))
nil))))
(defun save-places-to-alist ()