GNU bug report logs -
#4395
23.1; byte-compiler loses top-level (put 'x...)
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Fri, 11 Sep 2009 00:15:03 UTC
Severity: normal
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4395 in the body.
You can then email your comments to 4395 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4395
; Package
emacs
.
(Fri, 11 Sep 2009 00:15:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 11 Sep 2009 00:15:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
1.
emacs -Q
Put these sexps somewhere at the top level of a file foo.el:
(require 'bar)
...
(put 'thevar 'variable-documentation "The new doc string")
...
(provide 'foo)
Put these sexps in file bar.el:
(defvar thevar 42 "Original doc string.")
...
(provide 'bar)
Byte-compile the files.
emacs -Q
Load library foo.
C-h v the-var
The doc shown is the original doc string. The top-level `put' had no
effect.
Doing the same thing using the *.el instead of *.elc works - no
problem.
It also works, with the byte-compiled files, if you wrap the `put'
sexp in `when':
(when t (put 'foovar 'variable-documentation "The new doc string"))
(Actually, I tried with (require 'XXX) instead of t.)
2. It also works with the byte-compiled files, if you add a vacuous
defvar to foo.el:
(defvar thevar)
(put 'thevar 'variable-documentation "The new doc string")
That is the approach used in library cc-vars.el. If this is a
recommended cliche, or is the only good way to change the doc string
of a var, then it needs to be documented in the Elisp manual.
3. Feature request: Have something similar to defadvice for a
variable, at least to be able to add to its doc string.
In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4395
; Package
emacs
.
(Fri, 11 Sep 2009 02:30:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 11 Sep 2009 02:30:05 GMT)
Full text and
rfc822 format available.
Message #10 received at 4395 <at> emacsbugs.donarmstrong.com (full text, mbox):
> C-h v the-var
> The doc shown is the original doc string. The top-level `put' had no
> effect.
I cannot reproduce this. Neither with Debian's Emacs-23.1, nor with the
CVS trunk.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4395
; Package
emacs
.
(Fri, 11 Sep 2009 14:30:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 11 Sep 2009 14:30:07 GMT)
Full text and
rfc822 format available.
Message #15 received at 4395 <at> emacsbugs.donarmstrong.com (full text, mbox):
> > C-h v the-var
>
> > The doc shown is the original doc string. The top-level `put' had no
> > effect.
>
> I cannot reproduce this. Neither with Debian's Emacs-23.1,
> nor with the CVS trunk.
Perhaps it is Windows-only, then.
What is the behavior you saw? Did the put take place in the byte-compiled file?
When you used C-h v, did you see the new doc string (from the put), instead of
the original one?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4395
; Package
emacs
.
(Fri, 11 Sep 2009 19:05:11 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 11 Sep 2009 19:05:11 GMT)
Full text and
rfc822 format available.
Message #20 received at 4395 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> > C-h v the-var
>>
>> > The doc shown is the original doc string. The top-level `put' had no
>> > effect.
>>
>> I cannot reproduce this. Neither with Debian's Emacs-23.1,
>> nor with the CVS trunk.
> Perhaps it is Windows-only, then.
Everything's possible, tho it does sound unlikely.
> What is the behavior you saw? Did the put take place in the
> byte-compiled file? When you used C-h v, did you see the new doc
> string (from the put), instead of the original one?
The "expected" one. Yes. Yes.
Maybe if you give a more complete and detailed recipe (showing the
exact file content (I used files containing the code you suggested,
with the "..." stripped out), the commands you use to compile the files,
when you exit Emacs and restart it, ...) we can get to the bottom of it.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4395
; Package
emacs
.
(Fri, 11 Sep 2009 20:40:09 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 11 Sep 2009 20:40:09 GMT)
Full text and
rfc822 format available.
Message #25 received at 4395 <at> emacsbugs.donarmstrong.com (full text, mbox):
> > What is the behavior you saw? Did the put take place in the
> > byte-compiled file? When you used C-h v, did you see the new doc
> > string (from the put), instead of the original one?
>
> The "expected" one. Yes. Yes.
> Maybe if you give a more complete and detailed recipe (showing the
> exact file content (I used files containing the code you suggested,
> with the "..." stripped out), the commands you use to compile
> the files, when you exit Emacs and restart it, ...) we can get
> to the bottom of it.
I can't reproduce it now either. I'll try to find an old version of the file
that produced the problem. Probably it was user error in some way. Thx.
bug closed, send any further explanations to "Drew Adams" <drew.adams <at> oracle.com>
Request was from
Juanma Barranquero <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 22 Oct 2009 09:40:27 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Thu, 19 Nov 2009 15:24:18 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.