From: ueno Date: Sun, 8 Sep 2002 05:08:03 +0000 (+0000) Subject: * lisp/gnus-vers.el (gnus-revision-number): Increment to 02. X-Git-Tag: t-gnus-6_15_8-02-quimby~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=364bd6c3558127a5e63596248a95315ce40f6c42;p=elisp%2Fgnus.git- * lisp/gnus-vers.el (gnus-revision-number): Increment to 02. * lisp/gnus-msg.el (gnus-named-posting-styles): New variable. (gnus-summary-send-map): Bind "P" to gnus-summary-execute-command-with-posting-style. (gnus-configure-posting-styles): Expand named entries in gnus-posting-styles. (gnus-summary-execute-command-with-posting-style): New command. --- diff --git a/ChangeLog b/ChangeLog index 70835da..df5a4e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-09-08 Daiki Ueno + + * lisp/gnus-vers.el (gnus-revision-number): Increment to 02. + + * lisp/gnus-msg.el (gnus-named-posting-styles): New variable. + (gnus-summary-send-map): Bind "P" to + gnus-summary-execute-command-with-posting-style. + (gnus-configure-posting-styles): Expand named entries in + gnus-posting-styles. + (gnus-summary-execute-command-with-posting-style): New command. + 2002-09-06 Katsumi Yamaoka * lisp/gnus-vers.el (gnus-revision-number): Increment to 01. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 3a7c3df..a9be535 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -142,6 +142,9 @@ See Info node `(gnus)Posting Styles'." (variable) (sexp))))))) +(defvar gnus-named-posting-styles nil + "Alist mapping names to the user-defined posting styles.") + (defcustom gnus-gcc-mark-as-read nil "If non-nil, automatically mark Gcc articles as read." :version "21.1" @@ -351,7 +354,8 @@ Thank you for your help in stamping out bugs. "om" gnus-summary-mail-forward "op" gnus-summary-post-forward "Om" gnus-summary-digest-mail-forward - "Op" gnus-summary-digest-post-forward) + "Op" gnus-summary-digest-post-forward + "P" gnus-summary-execute-command-with-posting-style) (gnus-define-keys (gnus-send-bounce-map "D" gnus-summary-send-map) "b" gnus-summary-resend-bounced-mail @@ -1930,6 +1934,16 @@ this is a reply." (t ;; This is a form to be evaled. (eval match))))) + ;; Expand all the named elements in style. + (setq style (apply (function nconc) + (mapcar + (lambda (attribute) + (if (stringp attribute) + (copy-sequence + (cdr (assoc attribute + gnus-named-posting-styles))) + (list attribute))) + style))) ;; We have a match, so we set the variables. (dolist (attribute style) (setq element (pop attribute) @@ -2028,6 +2042,18 @@ this is a reply." (insert "From: " (message-make-from) "\n")))) nil 'local))))) +(defun gnus-summary-execute-command-with-posting-style (style command) + "Temporarily select a posting-style named STYLE and execute COMMAND." + (interactive + (let ((style (completing-read "Posting style: " + gnus-named-posting-styles nil t))) + (list style + (key-binding + (read-key-sequence + (format "Command to execute with %s:" style)))))) + (let ((gnus-posting-styles (list (list ".*" style)))) + (call-interactively command))) + ;;; @ for MIME Edit mode ;;; diff --git a/lisp/gnus-vers.el b/lisp/gnus-vers.el index b0c30e0..9e921eb 100644 --- a/lisp/gnus-vers.el +++ b/lisp/gnus-vers.el @@ -34,7 +34,7 @@ (require 'product) (provide 'gnus-vers) -(defconst gnus-revision-number "01" +(defconst gnus-revision-number "02" "Revision number for this version of gnus.") ;; Product information of this gnus.