emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: featurep instead of bound tests


From: Dan Nicolaescu
Subject: Re: featurep instead of bound tests
Date: Thu, 24 Jan 2008 21:49:04 -0800

Stefan Monnier <address@hidden> writes:

  > >> --- 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  <address@hidden>
  > >> +
  > >> +        * 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...
  > 
  > Agreed.  I see 2 better solutions:
  > 1 - use (require 'outline)
  > 2 - teach the byte-optimizer that (fboundp 'make-overlay) will always be t.

That has the problem that XEmacs would have to teach its compiler that
it is always false. Or if the test was (fboundp 'make-extent) emacs will
have to know it's always false.
IMO for extents vs overlays and zmacs-* the featurep test is the best
option.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]