all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: Re: featurep instead of bound tests (was: Changes to emacs/lisp/gnus/ChangeLog, v)
Date: Thu, 24 Jan 2008 13:55:09 -0800	[thread overview]
Message-ID: <200801242155.m0OLt9BW005923@sallyv1.ics.uci.edu> (raw)
In-Reply-To: <v9myquew56.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Thu, 24 Jan 2008 22:44:37 +0100")

Reiner Steib <reinersteib+gmane@imap.cc> 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  <dann@ics.uci.edu>
  > > +
  > > +	* 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/

  reply	other threads:[~2008-01-24 21:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1JI3n9-0003Yy-Mx@cvs.savannah.gnu.org>
2008-01-24 21:44 ` featurep instead of bound tests (was: Changes to emacs/lisp/gnus/ChangeLog, v) Reiner Steib
2008-01-24 21:55   ` Dan Nicolaescu [this message]
2008-01-24 22:48   ` featurep instead of bound tests Stefan Monnier
2008-01-25  5:49     ` Dan Nicolaescu
2008-01-25  9:45       ` Stephen J. Turnbull
2008-01-25 22:47     ` Richard Stallman
2008-01-25 22:47   ` featurep instead of bound tests (was: Changes to emacs/lisp/gnus/ChangeLog, v) Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801242155.m0OLt9BW005923@sallyv1.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.