[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defvar'ing constants
From: |
Stephen J. Turnbull |
Subject: |
Re: defvar'ing constants |
Date: |
Mon, 01 Aug 2005 10:39:29 +0900 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (corn, linux) |
Sorry this is old; getting back into emacs-devel after a long hiatus.
>>>>> "Jay" == Jay Belanger <address@hidden> 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 <address@hidden>
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: defvar'ing constants,
Stephen J. Turnbull <=