Gnus development mailing list
 help / color / mirror / Atom feed
* Simplify code for tooltips in menus
@ 2004-01-01 13:54 Reiner Steib
  2004-01-02 19:45 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2004-01-01 13:54 UTC (permalink / raw)


Hi,

when a menu entry has a tooltip (help echo) text, it is done in this
way:

,----[ gnus-sum.el ]
| 	   `(...
| 	      ["Rot 13" gnus-summary-caesar-message
| 	       ,@(if (featurep 'xemacs) '(t)
| 		   '(:help "\"Caesar rotate\" article by 13"))]
|             ...)
`----

Wouldn't the code be more readable (and easier to change if XEmacs
might support this too), if we'd use a utility function (or macro)?

,----[ gnus-sum.el ]
| 	   `(...
| 	      ["Rot 13" gnus-summary-caesar-message
| 	       ,@(gnus-help "\"Caesar rotate\" article by 13")]
|             ...)
`----

,----[ gnus-util.el ]
| (defmacro gnus-help (text)
|   `(if (featurep 'xemacs)
|        '(t)
|      '(:help ,text)))
`----

I'm not too familiar with the details of (macro) expansion.  Feel free
to suggest improvements.

This would also be useful for `message.el'.  Can (should) we use stuff
from `gnus-util.el' there?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

end of thread, other threads:[~2006-01-20 21:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-01 13:54 Simplify code for tooltips in menus Reiner Steib
2004-01-02 19:45 ` Lars Magne Ingebrigtsen
2004-01-02 21:04   ` Steve Youngs
2004-01-05 14:58   ` Reiner Steib
2004-01-06  4:45     ` Lars Magne Ingebrigtsen
2006-01-16 17:44       ` Small self-contained helper library for Gnus (was: Simplify code for tooltips in menus) Reiner Steib
2006-01-20 21:51         ` Small self-contained helper library for Gnus Reiner Steib

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).