emacs-devel
[Top][All Lists]
Advanced

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

tool-bars - broken again


From: Drew Adams
Subject: tool-bars - broken again
Date: Sat, 3 Jul 2010 12:23:34 -0700

The latest Windows binary I have, from 6/28, breaks tool bars again.

GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-06-28 on 3249CTO

I see no problem with the previous Windows binary, from 6/21 (or prior).

I must say, and I am trying to be polite, that I am really getting tired of the
fiddling with the tool bars that has been going on for years now.  I try to have
code that works across versions.  You just won't leave it alone, it seems.

I'm sorry, but I cannot narrow this down better - I do not have a simple recipe.
In my startup code, I set `default-frame-alist' and I also turn off
`tool-bar-mode'.  Prior to the 6/28 build, the value of `tool-bar-lines' in
`default-frame-alist' was correctly set to 0 when my code turned off
`tool-bar-mode'; now it is not.

I don't know whether it was Yidong's recent change for bug #2249 that broke
things or whether it was changes to `tool-bar.el' during the same week
(6/21-6/28) that broke things - or whether those are in fact the same thing.

(BZR by HTTP is down, as usual ("Please try again..."), so I cannot track the
changes further.  I do not have the time for that anyway.
http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/files/head%3A/lisp/)

This is the diff I see in tool-bar.el, that I think might be relevant.

6/28 build
----------

  :init-value t

  (let ((val (if tool-bar-mode 1 0)))
    (dolist (frame (frame-list))
      (set-frame-parameter frame 'tool-bar-lines val)))
  (when tool-bar-mode
    (if (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
        (tool-bar-setup))))

6/21 build and prior
--------------------

  :init-value nil

  (if tool-bar-mode
      (progn
          (modify-all-frames-parameters (list (cons 'tool-bar-lines 1)))
          (if (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
              (tool-bar-setup)))
    (modify-all-frames-parameters (list (cons 'tool-bar-lines 0))))

(put 'tool-bar-mode 'standard-value '(t))


The big difference I see (but I'm no expert on this and I will not try to dig
deeper) is that previously we called `modify-all-frames-parameters', which sets
the `tool-bar-lines' setting also in `default-frames-alist' (and in
`initial-frame-alist').  Now we apparently set `tool-bar-lines' only for the
existing frames.

That alone might explain the breakage.  I have no idea whether changing the
:init-value and removing the `standard-value' setting might have something to do
with the breakage. 

Whatever the cause, the result is that although my startup code calls
`tool-bar-mode' to turn off the tool bar, all new frames (including the first
frame) are created with a tool bar.

Please, please fix this.  I spent hours today trying to figure out what's going
on (in my code), to no avail.  Please do not ask me to try to narrow things
further - I just don't have the time for this.  Thanks.




reply via email to

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