Fix `message-yank-original' so the CL functions are seen by the byte-compiler.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 29 Mar 2011 14:50:11 +0000 (09:50 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Tue, 29 Mar 2011 14:50:11 +0000 (09:50 -0500)
* message.el (message--yank-original-internal): New function to do the
insertion cleanly inside eval in `message-yank-original'.
(message-yank-original): Use it.

lisp/ChangeLog
lisp/message.el

index 82db122..ad8cf6e 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * message.el (message--yank-original-internal): New function to do the
+       insertion cleanly inside eval in `message-yank-original'.
+       (message-yank-original): Use it.
+
 2011-03-29  Julien Danjou  <julien@danjou.info>
 
        * mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with
index 3dc5647..59989f3 100644 (file)
@@ -3756,22 +3756,9 @@ To use this automatically, you may add this function to
       (while (re-search-forward citexp nil t)
        (replace-match (if remove "" "\n"))))))
 
-(defun message-yank-original (&optional arg)
-  "Insert the message being replied to, if any.
-Puts point before the text and mark after.
-Normally indents each nonblank line ARG spaces (default 3).  However,
-if `message-yank-prefix' is non-nil, insert that prefix on each line.
-
-This function uses `message-cite-function' to do the actual citing.
-
-Just \\[universal-argument] as argument means don't indent, insert no
-prefix, and don't delete any headers."
-  (interactive "P")
+(defun message--yank-original-internal (arg)
   (let ((modified (buffer-modified-p))
        body-text)
-    ;; eval the let forms contained in message-cite-style
-    (eval
-     `(let ,message-cite-style
        (when (and message-reply-buffer
                   message-cite-function)
          (when (equal message-cite-reply-position 'above)
@@ -3811,7 +3798,23 @@ prefix, and don't delete any headers."
          ;; Add a `message-setup-very-last-hook' here?
          ;; Add `gnus-article-highlight-citation' here?
          (unless modified
-           (setq message-checksum (message-checksum))))))))
+        (setq message-checksum (message-checksum))))))
+
+(defun message-yank-original (&optional arg)
+  "Insert the message being replied to, if any.
+Puts point before the text and mark after.
+Normally indents each nonblank line ARG spaces (default 3).  However,
+if `message-yank-prefix' is non-nil, insert that prefix on each line.
+
+This function uses `message-cite-function' to do the actual citing.
+
+Just \\[universal-argument] as argument means don't indent, insert no
+prefix, and don't delete any headers."
+  (interactive "P")
+  ;; eval the let forms contained in message-cite-style
+  (eval
+   `(let ,message-cite-style
+      (message--yank-original-internal ',arg))))
 
 (defun message-yank-buffer (buffer)
   "Insert BUFFER into the current buffer and quote it."