[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-commit] emacs/lisp/mh-e ChangeLog mh-comp.el mh-e.el
From: |
Stephen Gildea |
Subject: |
[Emacs-commit] emacs/lisp/mh-e ChangeLog mh-comp.el mh-e.el |
Date: |
Sat, 25 Aug 2007 14:12:59 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Stephen Gildea <gildea> 07/08/25 14:12:58
Modified files:
lisp/mh-e : ChangeLog mh-comp.el mh-e.el
Log message:
add mh-annotate-msg-hook
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mh-e/ChangeLog?cvsroot=emacs&r1=1.255&r2=1.256
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mh-e/mh-comp.el?cvsroot=emacs&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mh-e/mh-e.el?cvsroot=emacs&r1=1.112&r2=1.113
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mh-e/ChangeLog,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -b -r1.255 -r1.256
--- ChangeLog 21 Aug 2007 12:15:37 -0000 1.255
+++ ChangeLog 25 Aug 2007 14:12:58 -0000 1.256
@@ -1,3 +1,10 @@
+2007-08-25 Stephen Gildea <address@hidden>
+
+ * mh-e.el (mh-annotate-msg-hook): New variable.
+
+ * mh-comp.el (mh-annotate-msg): Call new mh-annotate-msg-hook.
+ (mh-annotate-list): New variable, for mh-annotate-msg-hook.
+
2007-08-21 Jeffrey C Honig <address@hidden>
* mh-folder.el (mh-folder-message-menu, mh-folder-mode-map): Add
Index: mh-comp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mh-e/mh-comp.el,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- mh-comp.el 20 Aug 2007 03:05:33 -0000 1.58
+++ mh-comp.el 25 Aug 2007 14:12:58 -0000 1.59
@@ -136,6 +136,10 @@
(defvar mh-annotate-field nil
"Field name for message annotation.")
+(defvar mh-annotate-list nil
+ "Messages annotated, either a sequence name or a list of message numbers.
+This variable can be used by `mh-annotate-msg-hook'.")
+
(defvar mh-insert-auto-fields-done-local nil
"Buffer-local variable set when `mh-insert-auto-fields' called
successfully.")
(make-variable-buffer-local 'mh-insert-auto-fields-done-local)
@@ -975,18 +979,23 @@
(goto-char (point-max))
(mh-letter-next-header-field)))
-(defun mh-annotate-msg (msg buffer note &rest args)
- "Mark MSG in BUFFER with character NOTE and annotate message with ARGS.
-MSG can be a message number, a list of message numbers, or a
-sequence."
- (apply 'mh-exec-cmd "anno" buffer
+(defun mh-annotate-msg (msg folder note &rest args)
+ "Mark MSG in FOLDER with character NOTE and annotate message with ARGS.
+MSG can be a message number, a list of message numbers, or a sequence.
+The hook `mh-annotate-msg-hook' is run after annotating; see its
+documentation for variables it can use."
+ (apply 'mh-exec-cmd "anno" folder
(if (listp msg) (append msg args) (cons msg args)))
(save-excursion
- (cond ((get-buffer buffer) ; Buffer may be deleted
- (set-buffer buffer)
+ (cond ((get-buffer folder) ; Buffer may be deleted
+ (set-buffer folder)
(mh-iterate-on-range nil msg
(mh-notate nil note
- (+ mh-cmd-note mh-scan-field-destination-offset)))))))
+ (+ mh-cmd-note mh-scan-field-destination-offset))))))
+ (let ((mh-current-folder folder)
+ ;; mh-annotate-list is a sequence name or a list of message numbers
+ (mh-annotate-list (if (numberp msg) (list msg) msg)))
+ (run-hooks 'mh-annotate-msg-hook)))
(defun mh-insert-header-separator ()
"Insert `mh-mail-header-separator', if absent."
Index: mh-e.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mh-e/mh-e.el,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- mh-e.el 21 Aug 2007 12:03:41 -0000 1.112
+++ mh-e.el 25 Aug 2007 14:12:58 -0000 1.113
@@ -3032,6 +3032,15 @@
:group 'mh-alias
:package-version '(MH-E . "8.0"))
+(defcustom-mh mh-annotate-msg-hook nil
+ "Hook run by `mh-annotate-msg' after annotation.
+Variables that are useful in this hook include `mh-current-folder',
+the current folder, and `mh-annotate-list', the messages annotated."
+ :type 'hook
+ :group 'mh-hooks
+ :group 'mh-sending-mail
+ :package-version '(MH-E . "8.1"))
+
(defcustom-mh mh-before-commands-processed-hook nil
"Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing
outstanding refile and delete requests.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-commit] emacs/lisp/mh-e ChangeLog mh-comp.el mh-e.el,
Stephen Gildea <=