unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* describe-variable gets the defining library wrong
@ 2009-06-19 17:27 Drew Adams
  2009-06-24 21:08 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2009-06-19 17:27 UTC (permalink / raw)
  To: emacs-devel

I haven't found a recipe to reproduce this, but it happens to me quite often
with Emacs 23: `describe-variable' says "foo is a variable defined in `bar.el'"
when foo is not defined in `bar.el' at all, or at least not most recently.

I've even seen it happen when `bar.el' has only a byte-compiler quieter sexp,
such as this, which should hardly count as a definition: (defvar foo). This is a
mystery, to me.

I've also seen "defined in `.emacs'", when that is not at all where the variable
is defined. I suppose this is a fallback (copout), if Emacs can't tell where the
variable was really defined. That's understandable, I guess. (But not very
useful, and still misleading - maybe it's better to say nothing if we know
nothing.)

But saying that the current definition is in library bar.el when it was last
defined in toto.el is wrong. Emacs has always had some degree of difficulty
reporting this, but it seems like this has gotten worse in Emacs 23.

Does anyone else see this behavior, or is it just me? Sorry I don't have a
recipe to reproduce this yet.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: describe-variable gets the defining library wrong
  2009-06-19 17:27 describe-variable gets the defining library wrong Drew Adams
@ 2009-06-24 21:08 ` Stefan Monnier
  2009-06-26 17:58   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2009-06-24 21:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

> Does anyone else see this behavior, or is it just me? Sorry I don't have a
> recipe to reproduce this yet.

Doesn't ring a bell.  Please report it again with more details next time
you see it.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: describe-variable gets the defining library wrong
  2009-06-24 21:08 ` Stefan Monnier
@ 2009-06-26 17:58   ` Drew Adams
  2009-06-26 23:51     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2009-06-26 17:58 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: emacs-devel

> > Does anyone else see this behavior, or is it just me? Sorry 
> > I don't have a recipe to reproduce this yet.
> 
> Doesn't ring a bell.  Please report it again with more 
> details next time you see it.

Put this in a new file foobar.el:

(defvar text-scale-mode-amount) ; Quiet byte-compiler < Emacs 23

Byte-compile foobar.el using Emacs 20 or 21.

emacs -Q  ; Emacs 23

M-x load-library face-remap
M-x load-file foobar.elc
C-h v text-scale-mode-amount

You'll see this:

,----
| text-scale-mode-amount is a variable defined in `foobar.el'.
| Its value is 0
| 
|   Automatically becomes buffer-local when set in any fashion.
| 
| Documentation:
| Not documented as a variable.
`----






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: describe-variable gets the defining library wrong
  2009-06-26 17:58   ` Drew Adams
@ 2009-06-26 23:51     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-06-26 23:51 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

> Byte-compile foobar.el using Emacs 20 or 21.

Well, now, as you know, Emacs's backward compatibility is not 100%.
So, no, it's not considered a bug (other than a bug in Emacs-21, maybe).


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-26 23:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 17:27 describe-variable gets the defining library wrong Drew Adams
2009-06-24 21:08 ` Stefan Monnier
2009-06-26 17:58   ` Drew Adams
2009-06-26 23:51     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).