[Top][All Lists]

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

Re: defconst in lao.el

From: Kenichi Handa
Subject: Re: defconst in lao.el
Date: Wed, 17 Nov 2004 10:41:48 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Luc Teirlinck <address@hidden> writes:
> I believe that all defconst's in lao.el should be
> defvar's.  Several are changed in the file itself and
> produce compiler warnings.  I propose the patch below.  I
> am not sure what to do about the Copyright:

> ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
> ;; Licensed to the Free Software Foundation.

Please keep it as is and add a new Copyright line below it
(see leim/quail/latin-post.el) if you modify this file.


> ! (defconat lao-key-alist
> ! (defvar lao-key-alist

The original defconst doesn't yield a warning, and this
variable is surely not modified later.

> ! (defvar lao-consonant-key-alist nil)
> ! (defvar lao-semivowel-key-alist nil)
> ! (defvar lao-vowel-key-alist nil)
> ! (defvar lao-voweltone-key-alist nil)
> ! (defvar lao-tone-key-alist nil)
> ! (defvar lao-other-key-alist nil)
I used "defconst" for them because they have to be set back
to nil when lao.el is re-loaded.  They are setup in the
following (let ...) form to correct values.  If we change
them to "defvar", they are anyway set to nil in that (let
...) form.  And, conceptually, they are "constant".  So I
think "defconst" is better.

Then, how to avoid the compiler warnings?  The problem is
that their initial values are calculated at the same time
(not one by one) in the "let" form.

Ken'ichi HANDA

reply via email to

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