unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>
Cc: 1754@emacsbugs.donarmstrong.com
Subject: bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off
Date: Thu, 1 Jan 2009 13:28:15 -0800	[thread overview]
Message-ID: <008701c96c57$dc010a20$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <87zlibtsna.fsf@cyd.mit.edu>

> > Huh? Why is that the right thing?
> 
> Because your function `foo' tells Emacs to add a tool-bar to 
> new frames.
> Here is a much, much simpler version of your "bug":
> 
>  In foo.el;
>   (tool-bar-mode -1)
>   (defun foo ()
>     (interactive)
>     (setq default-frame-alist
>           (append (list (cons 'tool-bar-lines 1))
>                   default-frame-alist)))
> 
>  emacs -Q -l "foo.el" -f "foo"
> 
> When foo.el is loaded, that turns off tool-bar-mode (internally, this
> works by modifying default-frame-alist and changing the frame 
> parameter `tool-bar-lines' to 0).
> 
> Next, the function `foo' is run.  That modifies default-frame-alist by
> adding (tool-bar-lines . 1).  So, all new frames get a tool-bar.

No, you missed the point. I wasn't clear enough.

Use your code above, plus (setq pop-up-frames t). After starting Emacs, turn off
tool-bar mode: M-x tool-bar-mode. Thereafter, new frames do not have tool bars.
This is correct behavior - no bug.

Now do the same thing with the code I sent - with the standalone minibuffer
frame and `pop-up-frames-alist'. After you turn off tool-bar mode, new frames
have tool bars. That is the bug.

I already said that there is no bug without the three things I mentioned:
standalone minibuffer, non-nil `pop-up-frames', and `pop-up-frames-alist'.
Without those conditions, `tool-bar-mode' acts normally; it acts just like
`menu-bar-mode': it affects subsequent new frames.

I am now getting the impression that `pop-up-frames-alist' is being used for
opening new normal frames, not just for popup frames. If so, that is at least a
partial cause of the bug. I think that what Martin found is the other cause.

IOW, I think what is needed is both:

1. Martin's patch: turning off the mode should update `default-frame-alist'
also.

2. There is likely code somewhere that is now using `pop-up-frame-alist' for the
creation of ordinary frames, not popup frames. That needs to be fixed.








  reply	other threads:[~2009-01-01 21:28 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-01  3:05 bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off Chong Yidong
2009-01-01  5:17 ` Drew Adams
2009-01-01  7:03   ` Chong Yidong
2009-01-01 21:28     ` Drew Adams [this message]
2009-01-01 21:51       ` Drew Adams
2009-01-02  0:01       ` Jason Rumney
2009-01-02  1:14         ` Drew Adams
2009-01-02  2:27           ` Drew Adams
2009-01-02  2:47             ` Drew Adams
2009-01-02 11:57             ` Jason Rumney
2009-01-02 14:50               ` martin rudalics
2009-01-01  7:36   ` Jason Rumney
2009-01-01 21:28     ` Drew Adams
2009-01-01 23:53       ` Jason Rumney
2009-01-02  1:14         ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2009-01-01 13:47 grischka
2009-01-01 13:51 ` Jason Rumney
2009-01-01 14:30   ` grischka
2008-12-31 22:15 Drew Adams
2009-01-01 15:24 ` martin rudalics
2009-01-01 15:53   ` Jason Rumney
2009-01-01 16:09     ` martin rudalics
2009-01-01 21:28   ` Drew Adams
2009-01-01 21:51     ` Drew Adams
2009-01-02  7:52       ` martin rudalics
2009-01-02  7:52     ` martin rudalics
2009-01-03  3:12       ` Stefan Monnier
2009-01-03 10:13         ` martin rudalics
2009-01-05  4:10           ` Stefan Monnier
2009-01-05  7:57             ` martin rudalics
2009-01-05 22:20               ` Stefan Monnier
2009-01-06 13:37                 ` martin rudalics
2009-01-09 19:37                 ` martin rudalics
2009-01-10  2:29                   ` Stefan Monnier
2009-01-10 10:04                     ` martin rudalics
2009-01-10 22:38                       ` Stefan Monnier
2009-01-11 11:22                         ` martin rudalics
2009-01-11 14:56                           ` Stefan Monnier
2009-01-11 17:14                             ` martin rudalics
2009-01-11 23:12                               ` Stefan Monnier
2009-01-12  9:58                                 ` martin rudalics
2009-01-12 15:23                                   ` Stefan Monnier
2009-01-12 16:00                                     ` martin rudalics
2009-01-12 18:29                                       ` Stefan Monnier
2009-01-12 19:33                                         ` Lennart Borgman
2009-01-12 20:57                                           ` Stefan Monnier
2009-01-12 21:59                                         ` Drew Adams
2009-01-14 14:20                                         ` martin rudalics
2009-01-17 18:33           ` Drew Adams
2009-01-09 19:37 ` martin rudalics
2009-01-09 20:21   ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='008701c96c57$dc010a20$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=1754@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).