From: Eli Zaretskii <eliz@is.elta.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: Fringe in Show/Hide menu?
Date: Tue, 2 Apr 2002 08:00:22 +0200 (IST) [thread overview]
Message-ID: <Pine.SUN.3.91.1020402074811.29725C-100000@is> (raw)
In-Reply-To: <m3hemvl4k9.fsf@Janik.cz>
On Mon, 1 Apr 2002, Pavel =?iso-8859-2?q?Jan=EDk?= wrote:
> +(define-key menu-bar-showhide-fringe-menu [right]
> + '(menu-item "On the Right"
> + (lambda ()
> + (interactive)
> + (toggle-fringe 'right-fringe))
> + :help "Turn fringe on the right on/off"
> + :visible window-system
Please try to avoid using window-system as much as you can. In this
case, it is actually incorrect, since the MS-DOS port defines a non-nil
value for window-system (for histerical reasons). More generally, use
of window-system is a time bomb: as Emacs is developed and features that
were once available to certain kinds of displays are made available on
more display types, the places that use window-system become maintenance
burden, in the need for constant attention, and a source of bug reports.
It is better to condition such menu items on some feature or function
that is required for the underlying functionality to work. For example,
(fboundp 'some-function-required-for-fringes) could be a good test in
this case. If all else fails, display-graphic-p is still better than
window-system.
next prev parent reply other threads:[~2002-04-02 6:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-01 17:19 Fringe in Show/Hide menu? Pavel Janík
2002-04-02 6:00 ` Eli Zaretskii [this message]
2002-04-02 12:04 ` Per Abrahamsen
2002-04-02 16:50 ` Pavel Janík
2002-04-04 15:45 ` Per Abrahamsen
2002-04-02 18:27 ` Richard Stallman
2002-04-02 21:52 ` Kim F. Storm
2002-04-02 22:05 ` Stefan Monnier
2002-04-06 10:01 ` Pavel Janík
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1020402074811.29725C-100000@is \
--to=eliz@is.elta.co.il \
--cc=emacs-devel@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).