auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Re: toolbar quality.


From: David Kastrup
Subject: Re: [AUCTeX-devel] Re: toolbar quality.
Date: Sat, 02 Dec 2006 21:38:36 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Reiner Steib <address@hidden> writes:

> On Sat, Dec 02 2006, Ralf Angeli wrote:
>
>> * David Kastrup (2006-12-02) writes:
>>> toolbar-x.el:1327:
>>>
>>>     (let (tool-bar-map)
>>>       (set (make-local-variable 'tool-bar-map) (make-sparse-keymap))
>>>
>>> where the make-local-variable operates on a let-binding, a _huge_
>>> nono.
>
> No doubt that you have much more clue about Lisp subtleties than me.
> But I'm quite sure that the previous code modified the global value
> <http://thread.gmane.org/v98xknj3dd.fsf%40marauder.physik.uni-ulm.de>.
> Also Nick's report suggests that the global value was modified (using
> 11.83).
>
> What do you suggest instead of `make-local-variable'?  Or do you
> suggest to move it up before the `let' expression?

Sigh.  _Either_ one uses a let-binding, in which case any assignments
to the variable go out of scope immediately at the end of the
let-statement, not touching any buffer-local or global value, _or_ one
uses make-local-variable, in which case the buffer-local value gets
changed permanently.

But both together is dangerous nonsense.

> BTW, why do we have `setq-default' in `toolbarx-emacs-refresh' if we
> don't make the variable buffer local?  Maybe the bug is in
> `toolbarx-emacs-add-button': Does
>   (setq tool-bar-map (copy-sequence temp-tool-bar-map))
> look correct?

It is not really clear why a copy is required here.

>> Besides, I'm still waiting for a reproducible test case for the
>> tool bar becoming empty.  If somebody has such a thing ...
>
> My change wasn't for the "LaTeX tool bar appearing in non-LaTeX
> buffers" bug, but for the "tool bar becoming empty" bug.  IIRC, you
> and me both weren't able to reproduce the former bug (reported by
> Nick Roberts using 11.83) with the current code from CVS.
>
> The "tool bar becoming empty" bug was reproducible for me and my
> colleagues at my site.  But I guess there the need for some
> site-specific settings, a hook or somesuch or loading some buffers
> (via desktop?).  With «emacs -Q --eval '(load "auctex.el" nil t t)'»
> I can't tickle the bug (after reverting my change), but with a
> normal session, I can.  Iow, I don't have a simple test case at hand
> and I don't have time to dig into this, sorry.

As I said: there is a number of uses of nreverse in toolbarx which
don't appear correct to me and might destroy lists including the
toolbar.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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