[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fringe in Show/Hide menu?
From: |
Eli Zaretskii |
Subject: |
Re: Fringe in Show/Hide menu? |
Date: |
Tue, 2 Apr 2002 08:00:22 +0200 (IST) |
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.