From 6b960c100e386735bedea22e9bdd771b54a39b23 Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Wed, 14 Dec 2005 18:47:38 +0000 Subject: [PATCH] * mh-customize.el (mh-speed-flists-interval): Rename to mh-speed-update-interval. (mh-speed-run-flists-flag): Delete. Setting mh-speed-flists-interval to 0 accomplishes the same thing. * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-flists): Use mh-speed-update-interval instead of mh-speed-run-flists-flag. (mh-speed-toggle, mh-speed-view, mh-speed-refresh): Sync docstrings with manual. --- lisp/mh-e/ChangeLog | 12 ++++++++++++ lisp/mh-e/mh-customize.el | 15 +++------------ lisp/mh-e/mh-speed.el | 21 ++++++++++++--------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index dafa37c6b3d..6f9e343123d 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,15 @@ +2005-12-14 Bill Wohler + + * mh-customize.el (mh-speed-flists-interval): Rename to + mh-speed-update-interval. + (mh-speed-run-flists-flag): Delete. Setting + mh-speed-flists-interval to 0 accomplishes the same thing. + + * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-flists): Use + mh-speed-update-interval instead of mh-speed-run-flists-flag. + (mh-speed-toggle, mh-speed-view, mh-speed-refresh): Sync + docstrings with manual. + 2005-12-09 Bill Wohler * mh-customize.el (mh-path): Move here from mh-init.el. diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index 49aceae3b61..e07603f69ba 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el @@ -1780,21 +1780,12 @@ and enter the number of lines you'd like to see." ;;; The Speedbar (:group 'mh-speed) -(defcustom mh-speed-flists-interval 60 - "Time between calls to flists in seconds. -If 0, flists is not called repeatedly." +(defcustom mh-speed-update-interval 60 + "Time between speedbar updates in seconds. +Set to 0 to disable automatic update." :type 'integer :group 'mh-speed) -(defcustom mh-speed-run-flists-flag t - "Non-nil means flists is used. -If non-nil, flists is executed every `mh-speed-flists-interval' seconds to -update the display of the number of unseen and total messages in each folder. -If resources are limited, this can be set to nil and the speedbar display can -be updated manually with the \\[mh-speed-flists] command." - :type 'boolean - :group 'mh-speed) - ;;; Threading (:group 'mh-thread) diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index e11ed7e3523..4b33a81a7e9 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -76,7 +76,7 @@ BUFFER is the MH-E buffer for which the speedbar buffer is to be created." (line-beginning-position) (1+ (line-beginning-position)) `(mh-folder nil mh-expanded nil mh-children-p t mh-level 0)) (mh-speed-stealth-update t) - (when mh-speed-run-flists-flag + (when (> mh-speed-update-interval 0) (mh-speed-flists nil)))) ;;;###mh-autoload @@ -292,8 +292,8 @@ Do the right thing for the different kinds of buffers that MH-E uses." ;;;###mh-autoload (defun mh-speed-toggle (&rest args) - "Toggle the display of child folders. -The otional ARGS are ignored and there for compatibilty with speedbar." + "Toggle the display of child folders in the speedbar. +The optional ARGS from speedbar are ignored." (interactive) (declare (ignore args)) (beginning-of-line) @@ -335,8 +335,8 @@ The otional ARGS are ignored and there for compatibilty with speedbar." ;;;###mh-autoload (defun mh-speed-view (&rest args) - "View folder on current line. -Optional ARGS are ignored." + "Visits the selected folder just as if you had used \\\\[mh-visit-folder]. +The optional ARGS from speedbar are ignored." (interactive) (declare (ignore args)) (let* ((folder (get-text-property (line-beginning-position) 'mh-folder)) @@ -381,7 +381,9 @@ only for that one folder." (unless mh-speed-flists-timer (setq mh-speed-flists-timer (run-at-time - nil (and mh-speed-run-flists-flag mh-speed-flists-interval) + nil (if (> mh-speed-update-interval 0) + mh-speed-update-interval + nil) (lambda () (unless (and (processp mh-speed-flists-process) (not (eq (process-status mh-speed-flists-process) @@ -502,9 +504,10 @@ next." (clrhash mh-sub-folders-cache))))) (defun mh-speed-refresh () - "Refresh the speedbar. -Use this function to refresh the speedbar if folders have been added or -deleted or message ranges have been updated outside of MH-E." + "Regenerates the list of folders in the speedbar. + +Run this command if you've added or deleted a folder, or want to update the +unseen message count before the next automatic update." (interactive) (mh-speed-flists t) (mh-speed-invalidate-map "")) -- 2.39.5