unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Juanma Barranquero" <lekktu@gmail.com>
To: "Jason Rumney" <jasonr@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>,
	matsuan@ca2.so-net.ne.jp, emacs-devel@gnu.org
Subject: Re: Emacs pretest 22.1.91
Date: Wed, 27 Feb 2008 16:49:59 +0100	[thread overview]
Message-ID: <f7ccd24b0802270749x168c146el8ae9cb0eb535ac6e@mail.gmail.com> (raw)
In-Reply-To: <f7ccd24b0802270611g32b0c0at86cff43d206928c9@mail.gmail.com>

On Wed, Feb 27, 2008 at 3:11 PM, Juanma Barranquero <lekktu@gmail.com> wrote:

>  OK, what about this simpler change then?

>  2008-02-27  Juanma Barranquero  <lekktu@gmail.com>
>
>         * faces.el (x-create-frame-with-faces): Delay call to
>         `tool-bar-setup' if invoked before loading the init files.

<sigh> What a nice can of worms.

After the patch above, with this simple .emacs:

;;;;;;;;;; emacs.el ;;;;;;;;;;
(with-temp-buffer (compilation-mode 1))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

you get an error:

  signal(wrong-type-argument (keymapp nil))
  define-key-after(nil [previous-error-no-select] (menu-item
"previous-error-no-select" previous-error-no-select :image (image
:type xpm :file "c:/emacs/trunk/etc/images/left-arrow.xpm") :rtl
"right-arrow" :help "Goto previous error"))
  tool-bar-local-item("left-arrow" previous-error-no-select
previous-error-no-select nil :rtl "right-arrow" :help "Goto previous
error")
  byte-code(...)
  (compilation-mode 1)
 [... etc ]

That's because compile.el (on the trunk) has

(defvar compilation-mode-tool-bar-map
  (if (display-graphic-p)
      (let ((map (butlast (copy-keymap tool-bar-map)))
        ...

But before calling `tool-bar-setup', `tool-bar-map' contains just '(keymap)).

This is not a new bug; if you add the tool-bar stuff from the trunk's
compile.el to the EMACS22_BASE compile.el. it fails too. It just
hadn't been noticed before.

The only way out I can see right now is promoting `tool-bar-setup' to
be a user (or at least, package-developer) visible function. For
example, to change the above code to

(defvar compilation-mode-tool-bar-map
  (when (display-graphic-p)
      (tool-bar-setup)
      (let ((map (butlast (copy-keymap tool-bar-map)))
        ...

I'm feeling deeply unclean right now.

             Juanma




  reply	other threads:[~2008-02-27 15:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 18:50 Emacs pretest 22.1.91 Chong Yidong
2008-02-19 23:59 ` Jason Rumney
2008-02-21  6:35 ` Takashi Hiromatsu
2008-02-22 16:17   ` Eli Zaretskii
2008-02-23  3:51     ` Takashi Hiromatsu
2008-02-23 15:29       ` Eli Zaretskii
2008-02-24 14:21       ` Jason Rumney
2008-02-25  1:16         ` Takashi Hiromatsu
2008-02-25  1:27           ` Juanma Barranquero
2008-02-25  1:57             ` Takashi Hiromatsu
2008-02-25  2:13               ` Juanma Barranquero
2008-02-25  2:45                 ` Takashi Hiromatsu
2008-02-25  2:44             ` Takashi Hiromatsu
2008-02-25  9:43               ` Juanma Barranquero
2008-02-25  6:16             ` Takashi Hiromatsu
2008-02-25  9:54               ` Juanma Barranquero
2008-02-25 10:58                 ` Juanma Barranquero
2008-02-25 11:28                   ` Jason Rumney
2008-02-25 11:42                     ` Juanma Barranquero
2008-02-25 20:07                   ` Eli Zaretskii
2008-02-26  1:19                     ` Juanma Barranquero
2008-02-26  4:16                       ` Eli Zaretskii
2008-02-26  9:36                         ` Juanma Barranquero
2008-02-26 19:50                           ` Eli Zaretskii
2008-02-27  1:20                             ` Juanma Barranquero
2008-02-27  1:56                               ` Juanma Barranquero
2008-02-27  4:14                                 ` Eli Zaretskii
2008-02-27 12:25                                   ` Juanma Barranquero
2008-02-27 12:41                                     ` Jason Rumney
2008-02-27 14:11                                       ` Juanma Barranquero
2008-02-27 15:49                                         ` Juanma Barranquero [this message]
2008-02-27 15:50                                         ` Stefan Monnier
2008-02-27 15:54                                           ` Juanma Barranquero
2008-02-28  1:03                                             ` Stefan Monnier
2008-02-28  4:14                                               ` Eli Zaretskii
2008-02-28  4:59                                                 ` Stefan Monnier
2008-02-29 11:03                                                   ` Eli Zaretskii
2008-03-02  5:15                                                     ` Stefan Monnier
2008-02-27 19:15                                       ` Eli Zaretskii
2008-02-28  0:48                                         ` Juanma Barranquero
2008-02-25 23:45                   ` Takashi Hiromatsu
2008-02-26  1:23                     ` Juanma Barranquero
2008-02-26  4:09                       ` Takashi Hiromatsu
2008-02-25  1:46           ` Jason Rumney
2008-02-22 19:28   ` Claus
2008-02-22 20:08     ` Eli Zaretskii

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=f7ccd24b0802270749x168c146el8ae9cb0eb535ac6e@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=matsuan@ca2.so-net.ne.jp \
    /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).