Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de>
Subject: Simplify code for tooltips in menus
Date: Thu, 01 Jan 2004 14:54:10 +0100	[thread overview]
Message-ID: <v9hdzfu64d.fsf@marauder.physik.uni-ulm.de> (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/




             reply	other threads:[~2004-01-01 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 13:54 Reiner Steib [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9hdzfu64d.fsf@marauder.physik.uni-ulm.de \
    --to=4.uce.03.r.s@nurfuerspam.de \
    --cc=reiner.steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).