From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: featurep instead of bound tests (was: Changes to emacs/lisp/gnus/ChangeLog, v) Date: Thu, 24 Jan 2008 13:55:09 -0800 Message-ID: <200801242155.m0OLt9BW005923@sallyv1.ics.uci.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201211857 31938 80.91.229.12 (24 Jan 2008 21:57:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 21:57:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 24 22:57:56 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JIA54-0000xQ-Mf for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 22:57:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIA4e-0007Lz-Ko for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 16:57:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIA4b-0007LI-CG for emacs-devel@gnu.org; Thu, 24 Jan 2008 16:57:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIA4Z-0007Ju-C1 for emacs-devel@gnu.org; Thu, 24 Jan 2008 16:57:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIA4Z-0007Jo-9P for emacs-devel@gnu.org; Thu, 24 Jan 2008 16:57:23 -0500 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JIA4Y-0003iS-OJ for emacs-devel@gnu.org; Thu, 24 Jan 2008 16:57:23 -0500 X-ICS-MailScanner-Watermark: 1201816510.47222@BcMHbrC+RlUm0q1AOOZemQ Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m0OLt9BW005923 for ; Thu, 24 Jan 2008 13:55:09 -0800 (PST) In-Reply-To: (Reiner Steib's message of "Thu, 24 Jan 2008 22:44:37 +0100") Original-Lines: 52 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87454 Archived-At: Reiner Steib writes: > On Thu, Jan 24 2008, Dan Nicolaescu on emacs-diffs: > > > --- gnus/ChangeLog 24 Jan 2008 07:47:37 -0000 1.633 > > +++ gnus/ChangeLog 24 Jan 2008 15:14:50 -0000 1.634 > > @@ -1,3 +1,9 @@ > > +2008-01-24 Dan Nicolaescu > > + > > + * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at): > > + * message.el (message-beginning-of-line): Use featurep instead of bound > > + tests in order to resolve conditionals at compile time. > > In the past, I've been told that it's preferable to use fbound tests > instead of Emacs flavor or version tests. So I'm surprised by changes > like these... In general probably yes, but these particular cases are about functions that emacs will probably never get because it has similar facilities: overlays vs extents. > > --- gnus/sieve.el 8 Jan 2008 20:45:19 -0000 1.12 > > +++ gnus/sieve.el 24 Jan 2008 15:14:49 -0000 1.13 > > @@ -290,15 +290,15 @@ > > (get-char-property (or pos (point)) 'script-name)) > > > > (eval-and-compile > > - (defalias 'sieve-make-overlay (if (fboundp 'make-overlay) > > - 'make-overlay > > - 'make-extent)) > > - (defalias 'sieve-overlay-put (if (fboundp 'overlay-put) > > - 'overlay-put > > - 'set-extent-property)) > > - (defalias 'sieve-overlays-at (if (fboundp 'overlays-at) > > - 'overlays-at > > - 'extents-at))) > > + (defalias 'sieve-make-overlay (if (featurep 'xemacs) > > + 'make-extent > > + 'make-overlay)) > > + (defalias 'sieve-overlay-put (if (featurep 'xemacs) > > + 'set-extent-property > > + 'overlay-put)) > > + (defalias 'sieve-overlays-at (if (featurep 'xemacs) > > + 'extents-at > > + 'overlays-at))) > > Bye, Reiner. > -- > ,,, > (o o) > ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/