info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`eval' in Posting Styles


From: Kamen TOMOV
Subject: `eval' in Posting Styles
Date: Thu, 08 Feb 2007 12:50:07 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (windows-nt)

Hi,

I needed to have a function executed depending on the Posting Style,
e.g. to have a things like that:

(setq gnus-posting-styles
      '(("foo"
         (eval 'bar))
        ....))

(defun bar ()
       ....)

It looks like the base was laid some time ago and I wonder why wasn't
it implemented fully.

In gnus-msg.el I changed gnus-configure-posting-styles:

      (dolist (result results)
        (add-hook 'message-setup-hook
                  (cond
                   ((eq 'eval (car result))
-                   'ignore)
+                   (cdr result))
                   ((eq 'body (car result))

This way I managed to have the functionality I needed. Do you see any
reason why not to put it into the main branch?

Any suggestions, improvements, etc. are welcome.

-- 
Камен


reply via email to

[Prev in Thread] Current Thread [Next in Thread]