[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-commit] emacs/lisp/mh-e ChangeLog mh-customize.el mh-e.el
From: |
Stephen Gildea |
Subject: |
[Emacs-commit] emacs/lisp/mh-e ChangeLog mh-customize.el mh-e.el |
Date: |
Tue, 20 Dec 2005 03:44:32 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch:
Changes by: Stephen Gildea <address@hidden> 05/12/20 03:44:32
Modified files:
lisp/mh-e : ChangeLog mh-customize.el mh-e.el
Log message:
* mh-customize.el (mh-after-commands-processed-hook): New variable.
(mh-before-commands-processed-hook): Rename from mh-folder-updated-hook.
* mh-e.el (mh-process-commands): Rename mh-folder-updated-hook to
mh-before-commands-processed-hook, call new
mh-after-commands-processed-hook.
(mh-folders-changed): New variable (for
mh-after-commands-processed-hook).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/ChangeLog.diff?tr1=1.78&tr2=1.79&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-customize.el.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-e.el.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
Patches:
Index: emacs/lisp/mh-e/ChangeLog
diff -u emacs/lisp/mh-e/ChangeLog:1.78 emacs/lisp/mh-e/ChangeLog:1.79
--- emacs/lisp/mh-e/ChangeLog:1.78 Mon Dec 19 23:32:16 2005
+++ emacs/lisp/mh-e/ChangeLog Tue Dec 20 03:44:32 2005
@@ -1,3 +1,14 @@
+2005-12-19 Stephen Gildea
+
+ * mh-customize.el (mh-after-commands-processed-hook): New variable.
+ (mh-before-commands-processed-hook): mh-folder-updated-hook, renamed.
+
+ * mh-e.el (mh-process-commands): Rename mh-folder-updated-hook
+ to mh-before-commands-processed-hook, call new
+ mh-after-commands-processed-hook.
+ (mh-folders-changed): New variable (for use in
+ mh-after-commands-processed-hook).
+
2005-12-19 Bill Wohler <address@hidden>
* mh-acros.el:
Index: emacs/lisp/mh-e/mh-customize.el
diff -u emacs/lisp/mh-e/mh-customize.el:1.45
emacs/lisp/mh-e/mh-customize.el:1.46
--- emacs/lisp/mh-e/mh-customize.el:1.45 Mon Dec 19 23:32:16 2005
+++ emacs/lisp/mh-e/mh-customize.el Tue Dec 20 03:44:32 2005
@@ -2294,15 +2294,24 @@
:group 'mh-hooks
:group 'mh-folder)
-(defcustom mh-folder-updated-hook nil
- "Invoked when the folder actions (such as moves and deletes) are performed.
+(defcustom mh-before-commands-processed-hook nil
+ "Invoked before the folder actions (such as moves and deletes) are performed.
Variables that are useful in this hook include `mh-delete-list' and
-`mh-refile-list' which can be used to see which changes are being made to
+`mh-refile-list' which can be used to see which changes will be made to
current folder, `mh-current-folder'."
:type 'hook
:group 'mh-hooks
:group 'mh-folder)
+(defcustom mh-after-commands-processed-hook nil
+ "Invoked after the folder actions (such as moves and deletes) are performed.
+Variables that are useful in this hook include `mh-folders-changed',
+which lists which folders were affected by deletes and refiles. This
+list will always include the current folder, which is also available
+in `mh-current-folder'."
+ :type 'hook
+ :group 'mh-hooks)
+
(defcustom mh-forward-hook nil
"Invoked on the forwarded letter by \\<mh-folder-mode-map>\\[mh-forward]."
:type 'hook
Index: emacs/lisp/mh-e/mh-e.el
diff -u emacs/lisp/mh-e/mh-e.el:1.38 emacs/lisp/mh-e/mh-e.el:1.39
--- emacs/lisp/mh-e/mh-e.el:1.38 Mon Dec 19 23:32:16 2005
+++ emacs/lisp/mh-e/mh-e.el Tue Dec 20 03:44:32 2005
@@ -460,6 +460,8 @@
(defvar mh-refile-list nil) ;List of folder names in mh-seq-list.
+(defvar mh-folders-changed nil) ;For mh-after-commands-processed-hook.
+
(defvar mh-next-direction 'forward) ;Direction to move to next message.
(defvar mh-view-ops ()) ;Stack of ops that change the folder
@@ -2149,13 +2151,15 @@
(defun mh-process-commands (folder)
"Process outstanding commands for FOLDER.
-The value of `mh-folder-updated-hook' is a list of functions to be called,
-with no arguments, before the commands are processed."
+The value of `mh-before-commands-processed-hook' is a list of functions
+to be called, with no arguments, before the commands are processed.
+After all cammands are processed, the functions in
+`mh-after-commands-processed-hook' are called with no arguments."
(message "Processing deletes and refiles for %s..." folder)
(set-buffer folder)
(with-mh-folder-updating (nil)
- ;; Run the hook while the lists are still valid
- (run-hooks 'mh-folder-updated-hook)
+ ;; Run the before hook -- the refile and delete lists are still valid
+ (run-hooks 'mh-before-commands-processed-hook)
;; Update the unseen sequence if it exists
(mh-update-unseen)
@@ -2222,17 +2226,23 @@
(when (mh-speed-flists-active-p)
(apply #'mh-speed-flists t folders-changed))
(cond ((memq 'unthread mh-view-ops) (mh-thread-inc folder (point-max)))
- (mh-index-data (mh-index-insert-folder-headers)))))
+ (mh-index-data (mh-index-insert-folder-headers))))
- (and (buffer-file-name (get-buffer mh-show-buffer))
- (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer))))
- ;; If "inc" were to put a new msg in this file,
- ;; we would not notice, so mark it invalid now.
- (mh-invalidate-show-buffer))
+ (and (buffer-file-name (get-buffer mh-show-buffer))
+ (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer))))
+ ;; If "inc" were to put a new msg in this file,
+ ;; we would not notice, so mark it invalid now.
+ (mh-invalidate-show-buffer))
+
+ (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil))
+ (mh-remove-all-notation)
+ (mh-notate-user-sequences)
+
+ ;; Run the after hook -- now folders-changed is valid,
+ ;; but not the lists of specific messages.
+ (let ((mh-folders-changed folders-changed))
+ (run-hooks 'mh-after-commands-processed-hook)))
- (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil))
- (mh-remove-all-notation)
- (mh-notate-user-sequences)
(message "Processing deletes and refiles for %s...done" folder)))
(defun mh-update-unseen ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-commit] emacs/lisp/mh-e ChangeLog mh-customize.el mh-e.el,
Stephen Gildea <=