all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org
Subject: Re: defvar'ing constants
Date: Mon, 01 Aug 2005 10:39:29 +0900	[thread overview]
Message-ID: <87slxu5tbi.fsf@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87vf41vokk.fsf@vh213602.truman.edu> (Jay Belanger's message of "Sat, 25 Jun 2005 21:28:43 -0500")

Sorry this is old; getting back into emacs-devel after a long hiatus.

>>>>> "Jay" == Jay Belanger <belanger@truman.edu> writes:

    Jay> That would be nice.  A while back, there was a discussion
    Jay> along the lines of doing something similar for functions,
    Jay> (defun foo) to keep the compiler happy.  I recall the idea
    Jay> (not mine) meeting approval.  Perhaps it's still planned for
    Jay> a future release?

XEmacs has a whole suite of macros for checking whether things are
boundp or fboundp, and for locally declaring them to be f?boundp to
the compiler without using def* macros.  We have found them very
useful in suppressing spurious compiler warnings.  If there is
interest in using this code, they are not yet assigned to the FSF, but
at the present time they are 100% written by Ben Wing <ben@xemacs.org>
as far as I know.  You might ask Ben to assign the code and avoid
redundant work on this.

The only advantage I see over the (defvar foo) approach is that you
avoid spurious tags, but this can be convenient.

These macros do not require any changes to the byte-compiler (in
XEmacs, anyway), and can even be placed in a separate library and
require'd only in the files where they are used.  (I don't recommend
this, just demonstrating that they don't interfere with the normal byte
compiler.)

Cheers,

-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

  reply	other threads:[~2005-08-01  1:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24  3:54 defvar'ing constants Juanma Barranquero
2005-06-25  0:31 ` Richard M. Stallman
2005-06-25  4:14   ` Jay Belanger
2005-06-25 13:05     ` Juanma Barranquero
2005-06-25 21:31     ` David Kastrup
2005-06-26  2:28       ` Jay Belanger
2005-08-01  1:39         ` Stephen J. Turnbull [this message]
2005-08-01 16:46           ` Richard M. Stallman
2005-06-25 12:59   ` Juanma Barranquero
2005-06-28  5:06   ` Stefan Monnier
2005-06-28  7:40     ` Juanma Barranquero
2005-06-28 21:29     ` Richard M. 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=87slxu5tbi.fsf@tleepslib.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --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.