From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Fringe in Show/Hide menu? Date: Tue, 2 Apr 2002 08:00:22 +0200 (IST) Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1017723817 23616 127.0.0.1 (2 Apr 2002 05:03:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 2 Apr 2002 05:03:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16sGSH-00068n-00 for ; Tue, 02 Apr 2002 07:03:37 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16sGdm-0008NL-00 for ; Tue, 02 Apr 2002 07:15:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16sGRp-0008PM-00; Tue, 02 Apr 2002 00:03:09 -0500 Original-Received: from is.elta.co.il ([199.203.121.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16sGQq-0008Il-00 for ; Tue, 02 Apr 2002 00:02:09 -0500 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA29863; Tue, 2 Apr 2002 08:00:23 +0200 (IST) X-Sender: eliz@is Original-To: Pavel =?iso-8859-2?q?Jan=EDk?= In-Reply-To: Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2313 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2313 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.