]> git.eshelyaron.com Git - emacs.git/commitdiff
(message-cite-original): If mail-citation-hook
authorRichard M. Stallman <rms@gnu.org>
Thu, 2 Jul 1998 07:00:30 +0000 (07:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 2 Jul 1998 07:00:30 +0000 (07:00 +0000)
is non-nil, just run that and do nothing else.
(message-cite-function): Don't initialize from mail-citation-hook.

lisp/gnus/message.el

index f104a6e6346c1e43561ab76c9ba1d97f2840c080..042aede04d4795707040e4c0fa9981c8d92c570e 100644 (file)
@@ -463,11 +463,11 @@ Used by `message-yank-original' via `message-yank-cite'."
 
 ;;;###autoload
 (defcustom message-cite-function
-  (if (and (boundp 'mail-citation-hook)
-          mail-citation-hook)
-      mail-citation-hook
-    'message-cite-original)
-  "*Function for citing an original message."
+  'message-cite-original
+  "*Function for citing an original message.
+Predefined functions include `message-cite-original' and
+`message-cite-original-without-signature'.
+Note that `message-cite-original' uses `mail-citation-hook'if that is non-nil."
   :type '(radio (function-item message-cite-original)
                (function-item sc-cite-original)
                (function :tag "Other"))
@@ -1629,19 +1629,22 @@ prefix, and don't delete any headers."
 
 (defun message-cite-original ()
   "Cite function in the standard Message manner."
-  (let ((start (point))
-       (functions
-        (when message-indent-citation-function
-          (if (listp message-indent-citation-function)
-              message-indent-citation-function
-            (list message-indent-citation-function)))))
-    (goto-char start)
-    (while functions
-      (funcall (pop functions)))
-    (when message-citation-line-function
-      (unless (bolp)
-       (insert "\n"))
-      (funcall message-citation-line-function))))
+  (if (and (boundp 'mail-citation-hook)
+          mail-citation-hook)
+      (run-hooks 'mail-citation-hook)
+    (let ((start (point))
+         (functions
+          (when message-indent-citation-function
+            (if (listp message-indent-citation-function)
+                message-indent-citation-function
+              (list message-indent-citation-function)))))
+      (goto-char start)
+      (while functions
+       (funcall (pop functions)))
+      (when message-citation-line-function
+       (unless (bolp)
+         (insert "\n"))
+       (funcall message-citation-line-function)))))
 
 (defun message-insert-citation-line ()
   "Function that inserts a simple citation line."