all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tool-bars  - broken again
@ 2010-07-03 19:23 Drew Adams
  2010-07-03 22:27 ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2010-07-03 19:23 UTC (permalink / raw)
  To: 'Emacs-Devel devel'

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.




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

end of thread, other threads:[~2010-07-05 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-03 19:23 tool-bars - broken again Drew Adams
2010-07-03 22:27 ` Chong Yidong
2010-07-05 17:29   ` Drew Adams
2010-07-05 18:01     ` Chong Yidong
2010-07-05 18:59       ` Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.