From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: cc-vars.el Date: Wed, 20 Nov 2002 10:01:19 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: <200211201501.gAKF1Jo21597@rum.cs.yale.edu> References: <200211180057.JAA24537@etlken.m17n.org> <5bbs4m8qz9.fsf@lister.roxen.com> <5bwun97ecw.fsf@lister.roxen.com> <20021119165749.GA27657@gnu.org> <5b65utkyqt.fsf@lister.roxen.com> <200211201358.gAKDwsG21304@rum.cs.yale.edu> <5xbs4kz1ox.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037804671 21595 80.91.224.249 (20 Nov 2002 15:04:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 15:04:31 +0000 (UTC) Cc: "Stefan Monnier" , Miles Bader , Martin Stjernholm , Dave Love , Kenichi Handa , rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EWOz-0005c4-00 for ; Wed, 20 Nov 2002 16:04:29 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18EWSE-0006Qs-00 for ; Wed, 20 Nov 2002 16:07:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EWMu-0002gh-00; Wed, 20 Nov 2002 10:02:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EWM5-0001qw-00 for emacs-devel@gnu.org; Wed, 20 Nov 2002 10:01:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EWM1-0001pw-00 for emacs-devel@gnu.org; Wed, 20 Nov 2002 10:01:28 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EWLy-0001mj-00; Wed, 20 Nov 2002 10:01:22 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id gAKF1Jo21597; Wed, 20 Nov 2002 10:01:19 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: storm@cua.dk (Kim F. Storm) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9565 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9565 > > But I also completely agree that we should try to make sure that pragmas > > as needed as rarely as possible, so I wholeheartedly support Dave's > > suggestion which will at least reduce the amount of useless warnings. > > One of the problems I've seen is with code which is conditioned to > differentiate between either gnu emacs and xemacs, or between different > os-types. This is irrelevant: Dave's patch doesn't impact those cases at all. > In the first case, many packages seem to have their own "xyz-xemacs-p" > function or variable, and the bytecompiler will surely have a hard time > determining whether a piece of code isn't used at all on this platform. And it shouldn't: the code should simply be fixed. In 90% of the time an fboundp check would be better (and Dave's patch would then have a chance of understanding what's going on). > A new built-in variable `emacs-type' (value = 'gnu-emacs or e.g. 'xemacs) > would fix this problem; for portability, packages may add the following > snippet to support older versions of gnu and xemacs: We don't want to encourage people to use brain dead tests like those. There's already (featurep 'xemacs) for such things. Maybe we should add to byte-opt.el the following snippet: (put 'featurep 'byte-optimizer 'byte-optimize-featurep) (defun byte-optimize-featurep (form) (if (equal '(featurep 'xemacs) form) nil form)) since Emacs-21's byte-code won't work on XEmacs anyway, there's no point keeping XEmacs code around. It makes the code shorter and gets rid of a few warnings. Stefan