Re: defvar'ing constants

2005-08-01 Thread Richard M. Stallman
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 <[EMAIL PROTECTED]> as far as I know. You might ask Ben to assign the code and avoid redundant work on this. Experience says it isn't wort

Re: defvar'ing constants

2005-07-31 Thread Stephen J. Turnbull
Sorry this is old; getting back into emacs-devel after a long hiatus. > "Jay" == Jay Belanger <[EMAIL PROTECTED]> 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 comp

Re: defvar'ing constants

2005-06-28 Thread Richard M. Stallman
One case I know was consciously make to work is (defvar :foo :foo) so that packages using :foo could be kept backward compatible with Emacs-19 where :foo is a normal variable because keywords don't exist. Whether we should still cater to such thing is another question. I had forgot

Re: defvar'ing constants

2005-06-28 Thread Juanma Barranquero
On 6/28/05, Stefan Monnier <[EMAIL PROTECTED]> wrote: > > For consistency: > > (defvar CONSTANT) ; should work > > (defvar CONSTANT ITS-VALUE) ; should work > > (defvar CONSTANT OTHER-VALUE) ; should fail > One case I know was consciously make to work is (

Re: defvar'ing constants

2005-06-27 Thread Stefan Monnier
> For consistency: > (defvar CONSTANT) ; should work > (defvar CONSTANT ITS-VALUE) ; should work > (defvar CONSTANT OTHER-VALUE) ; should fail > I think it is more consistent to make them all errors. > defvar should not be used on these symbols. One case

Re: defvar'ing constants

2005-06-25 Thread Jay Belanger
David Kastrup <[EMAIL PROTECTED]> writes: > Jay Belanger <[EMAIL PROTECTED]> writes: ... >> If a constant is defined in one file but used in a second, is there >> then a way of quieting the compiler when the second file is >> compiled? > > (defconst CONSTANT) > > would appear to be a nice form for

Re: defvar'ing constants

2005-06-25 Thread David Kastrup
Jay Belanger <[EMAIL PROTECTED]> writes: > "Richard M. Stallman" <[EMAIL PROTECTED]> writes: > >> For consistency: >> >> (defvar CONSTANT) ; should work >> (defvar CONSTANT ITS-VALUE) ; should work >> (defvar CONSTANT OTHER-VALUE) ; should fail >> >> I thi

Re: defvar'ing constants

2005-06-25 Thread Juanma Barranquero
> If a constant is defined in one file but used in a second, is there > then a way of quieting the compiler when the second file is compiled? "Constants", in the sense used in this thread, are not defconsts (which are really mutable), but keywords, and symbols defined in C which are marked as cons

Re: defvar'ing constants

2005-06-25 Thread Juanma Barranquero
> I think it is more consistent to make them all errors. > defvar should not be used on these symbols. OK, that's even easier. I'll implement it. -- /L/e/k/t/u ___ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/

Re: defvar'ing constants

2005-06-24 Thread Jay Belanger
"Richard M. Stallman" <[EMAIL PROTECTED]> writes: > For consistency: > > (defvar CONSTANT) ; should work > (defvar CONSTANT ITS-VALUE) ; should work > (defvar CONSTANT OTHER-VALUE) ; should fail > > I think it is more consistent to make them all errors. >

Re: defvar'ing constants

2005-06-24 Thread Richard M. Stallman
For consistency: (defvar CONSTANT) ; should work (defvar CONSTANT ITS-VALUE) ; should work (defvar CONSTANT OTHER-VALUE) ; should fail I think it is more consistent to make them all errors. defvar should not be used on these symbols. ___

defvar'ing constants

2005-06-23 Thread Juanma Barranquero
*** Welcome to IELM *** Type (describe-mode) for help. ELISP> (defvar :k) :k ELISP> (defvar :k 1) :k ELISP> (defconst :k 1) *** Eval error *** Attempt to set a constant symbol: :k ELISP> (set :k :k) :k ELISP> (set :k 1) *** Eval error *** Attempt to set a constant symbol: :k ELISP> (set-default