From: keiichi Date: Thu, 19 Nov 1998 12:11:34 +0000 (+0000) Subject: (message-get-reply-buffer): Abolished. X-Git-Tag: gnus-6_8-199811302358~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ddb7c7c33e64e3194754efd97624e671eea10538;p=elisp%2Fgnus.git- (message-get-reply-buffer): Abolished. (message-get-original-reply-buffer): Abolished. (message-get-parameter): New inline function. (message-get-parameter-with-eval): New macro. (message-fetch-reply-field): Do not use `message-get-reply-buffer'. (message-yank-original): Ditto. (message-setup): Use `message-get-parameter'. (message-mime-insert-article): Use `message-get-parameter-with-eval' instead of`message-get-original-reply-buffer'. --- diff --git a/lisp/message.el b/lisp/message.el index fd73309..10c0a4d 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1024,6 +1024,22 @@ The cdr of ech entry is a function for applying the face to a region.") ;;; ;;; Utility functions. ;;; +(defun message-eval-parameter (parameter) + (condition-case () + (if (symbolp parameter) + (if (functionp parameter) + (funcall parameter) + (eval parameter)) + parameter) + (error nil))) + +(defsubst message-get-parameter (key &optional alist) + (unless alist + (setq alist message-parameter-alist)) + (cdr (assq key alist))) + +(defmacro message-get-parameter-with-eval (key &optional alist) + `(message-eval-parameter (message-get-parameter ,alist ,key))) (defmacro message-y-or-n-p (question show &rest text) "Ask QUESTION, displaying the rest of the arguments in a temp. buffer if SHOW" @@ -1100,7 +1116,7 @@ The cdr of ech entry is a function for applying the face to a region.") (defun message-fetch-reply-field (header) "Fetch FIELD from the message we're replying to." - (let ((buffer (message-get-reply-buffer))) + (let ((buffer (message-eval-parameter message-reply-buffer))) (when (and buffer (buffer-name buffer)) (save-excursion @@ -1245,22 +1261,6 @@ Return the number of headers removed." (- max rank) (1+ max))))) (message-sort-headers-1)))) - -(defun message-eval-parameter (parameter) - (condition-case () - (if (symbolp parameter) - (if (functionp parameter) - (funcall parameter) - (eval parameter)) - parameter) - (error nil))) - -(defun message-get-reply-buffer () - (message-eval-parameter message-reply-buffer)) - -(defun message-get-original-reply-buffer () - (message-eval-parameter - (cdr (assq 'original-buffer message-parameter-alist)))) ;;; @@ -1826,7 +1826,7 @@ Just \\[universal-argument] as argument means don't indent, insert no prefix, and don't delete any headers." (interactive "P") (let ((modified (buffer-modified-p)) - (buffer (message-get-reply-buffer))) + (buffer (message-eval-parameter message-reply-buffer))) (when (and buffer message-cite-function) (delete-windows-on buffer t) @@ -3561,7 +3561,7 @@ Headers already prepared in the buffer are not modified." (when actions (setq message-send-actions actions)) (setq message-reply-buffer - (or (cdr (assq 'reply-buffer message-parameter-alist)) + (or (message-get-parameter 'reply-buffer) replybuffer)) (goto-char (point-min)) ;; Insert all the headers. @@ -4443,7 +4443,8 @@ regexp varstr." (defun message-mime-insert-article (&optional message) (interactive) (let ((message-cite-function 'mime-edit-inserted-message-filter) - (message-reply-buffer (message-get-original-reply-buffer)) + (message-reply-buffer + (message-get-parameter-with-eval 'original-buffer)) (start (point))) (message-yank-original nil) ))