[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/bookmark.el
From: |
Karl Fogel |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/bookmark.el |
Date: |
Sat, 12 Nov 2005 15:46:11 -0500 |
Index: emacs/lisp/bookmark.el
diff -c emacs/lisp/bookmark.el:1.85 emacs/lisp/bookmark.el:1.86
*** emacs/lisp/bookmark.el:1.85 Sat Nov 12 20:30:22 2005
--- emacs/lisp/bookmark.el Sat Nov 12 20:46:09 2005
***************
*** 717,722 ****
--- 717,730 ----
;;; end file-format stuff
+ ;;; Generic helpers.
+
+ (defun bookmark-maybe-message (fmt &rest args)
+ "Apply `message' to FMT and ARGS, but only if the display is fast enough."
+ (if (>= baud-rate 9600)
+ (apply 'message fmt args)))
+
+
;;; Core code:
;;;###autoload
***************
*** 1350,1357 ****
(defun bookmark-write-file (file)
(save-excursion
(save-window-excursion
! (if (>= baud-rate 9600)
! (message "Saving bookmarks to file %s..." file))
(set-buffer (get-buffer-create " *Bookmarks*"))
(goto-char (point-min))
(delete-region (point-min) (point-max))
--- 1358,1364 ----
(defun bookmark-write-file (file)
(save-excursion
(save-window-excursion
! (bookmark-maybe-message "Saving bookmarks to file %s..." file)
(set-buffer (get-buffer-create " *Bookmarks*"))
(goto-char (point-min))
(delete-region (point-min) (point-max))
***************
*** 1370,1377 ****
(write-region (point-min) (point-max) file)
(file-error (message "Can't write %s" file)))
(kill-buffer (current-buffer))
! (if (>= baud-rate 9600)
! (message "Saving bookmarks to file %s...done" file)))))))
(defun bookmark-import-new-list (new-list)
--- 1377,1384 ----
(write-region (point-min) (point-max) file)
(file-error (message "Can't write %s" file)))
(kill-buffer (current-buffer))
! (bookmark-maybe-message
! "Saving bookmarks to file %s...done" file))))))
(defun bookmark-import-new-list (new-list)
***************
*** 1437,1444 ****
(if (file-readable-p file)
(save-excursion
(save-window-excursion
! (if (and (null no-msg) (>= baud-rate 9600))
! (message "Loading bookmarks from %s..." file))
(set-buffer (let ((enable-local-variables nil))
(find-file-noselect file)))
(goto-char (point-min))
--- 1444,1451 ----
(if (file-readable-p file)
(save-excursion
(save-window-excursion
! (if (null no-msg)
! (bookmark-maybe-message "Loading bookmarks from %s..." file))
(set-buffer (let ((enable-local-variables nil))
(find-file-noselect file)))
(goto-char (point-min))
***************
*** 1461,1468 ****
(bookmark-bmenu-surreptitiously-rebuild-list))
(error "Invalid bookmark list in %s" file)))
(kill-buffer (current-buffer)))
! (if (and (null no-msg) (>= baud-rate 9600))
! (message "Loading bookmarks from %s...done" file)))
(error "Cannot read bookmark file %s" file)))
--- 1468,1475 ----
(bookmark-bmenu-surreptitiously-rebuild-list))
(error "Invalid bookmark list in %s" file)))
(kill-buffer (current-buffer)))
! (if (null no-msg)
! (bookmark-maybe-message "Loading bookmarks from %s...done" file)))
(error "Cannot read bookmark file %s" file)))