emacs-devel
[Top][All Lists]
Advanced

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

Re: add-change-log-entry


From: martin rudalics
Subject: Re: add-change-log-entry
Date: Sun, 22 Jul 2007 23:00:49 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Good evening, Alan.

>>My question was non-sensical.  I should have asked instead: What is the
>>canonical way to avoid byte-compiler messages for the undefined
>
>
> Er, I have a suspicion that this is a bug in the byte compiler that I
> wrote a fix for and forgot to commit.  [Apologies to Richard, who asked
> me to commit it.]  Would you please try this patch out and tell me if it
> fixes anything:

No, it's a different issue.  I want to byte-compile the file add-log.el
without loading c-mode before, in order to simulate bootstrapping
behavior.  Hence `c-beginning-of-defun' and `c-end-of-defun' are
undefined and the byte-compiler issues its due warnings.  This is a
problem I have to resolve within add-log.el - after all people might
want to write ChangeLogs without being aware that a language like C
exists at all.

I could defeat the byte-compiler by writing either

(funcall 'c-beginning-of-defun)

or

(if (fboundp 'c-beginning-of-defun) (c-beginning-of-defun))

instead of

(c-beginning-of-defun)

Both should act just like defvars work for undefined variables.

Andreas says that I have to require cc-cmds instead.  I think he's right
but this means that I have to know where `c-beginning-of-defun' is
defined.  If you eventually decided to move `c-beginning-of-defun' to
cc-movement-cmds.el, someone would have to restart the game of finding
the definer of this.  In practice, dependency analysis is left to those
who more or less accidentally watch the warnings of the byte-compiler.





reply via email to

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