Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* `eval' in Posting Styles
@ 2007-02-08 10:50 Kamen TOMOV
  2007-02-11  9:48 ` Reiner Steib
  0 siblings, 1 reply; 3+ messages in thread
From: Kamen TOMOV @ 2007-02-08 10:50 UTC (permalink / raw)
  To: info-gnus-english

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.

-- 
Камен

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-12  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 10:50 `eval' in Posting Styles Kamen TOMOV
2007-02-11  9:48 ` Reiner Steib
2007-02-12  7:40   ` Kamen TOMOV

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).