emacs-devel
[Top][All Lists]
Advanced

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

Re: Where is tool bar?


From: Jan Djärv
Subject: Re: Where is tool bar?
Date: Sat, 24 Apr 2010 11:28:28 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100411)

Eli Zaretskii skrev:
Date: Sat, 24 Apr 2010 08:50:01 +0200
From: Jan Djärv <address@hidden>
Cc: Emacs <address@hidden>

Details please.  What build, what toolkit, how did you get there from emacs -Q?

FWIW, I see it on MS-Windows (the native build, not the Cygwin build
used by Angelo, AFAIK), with today's trunk.  The only visible tool-bar
buttons are "Cut", "Copy", "Paste", "Customize", and "Help".

It happens immediately upon startup with -Q, no additional commands
are necessary.


Ok, thanks. I thought it was some special mode, since there was an "Index" menu entry in the screen shot.

This change introduced the error:

revno: 100010
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-04-23 12:26:11 -0400
message:
  Provide byte-compiler warnings when set-default a read-only var.
  * emacs-lisp/bytecomp.el (byte-compile-set-default): New function.
  (byte-compile-setq-default): Optimize for the
  single-var case and don't call byte-compile-form in this case to avoid
  inf-loop with byte-compile-set-default.


Well, actually it isn't that change, but in that revision tool-bar.el also changed, but there is no changelog entry for it so I don't know what it is supposed to fix or enhance. Reverting tool-bar.el (to 100009) restores the tool bar.

Here is a diff:

=== modified file 'lisp/tool-bar.el'
--- lisp/tool-bar.el    2010-04-20 18:52:07 +0000
+++ lisp/tool-bar.el    2010-04-23 16:26:11 +0000
@@ -232,6 +232,7 @@
         submap key)
     ;; We'll pick up the last valid entry in the list of keys if
     ;; there's more than one.
+    ;; FIXME: Aren't they *all* "valid"??  --Stef
     (dolist (k keys)
       ;; We're looking for a binding of the command in a submap of
       ;; the menu bar map, so the key sequence must be two or more
@@ -242,24 +243,24 @@
                 ;; Last element in the bound key sequence:
                 (kk (aref k (1- (length k)))))
             (if (and (keymapp m)
-                     (symbolp kk))
+                     (symbolp kk))      ;FIXME: Why?  --Stef
                 (setq submap m
                       key kk)))))
-    (when (and (symbolp submap) (boundp submap))
-      (setq submap (eval submap)))
-    (let ((defn (assq key (cdr submap))))
-      (if (eq (cadr defn) 'menu-item)
-          (define-key-after in-map (vector key)
-            (append (cdr defn) (list :image image-exp) props))
-        (setq defn (cdr defn))
+    (when submap
+      (let ((defn nil))
+        ;; Here, we're essentially doing a "lookup-key without get_keyelt".
+        (map-keymap (lambda (k b) (if (eq k key) (setq defn b)))
+                    submap)
         (define-key-after in-map (vector key)
-          (let ((rest (cdr defn)))
-            ;; If the rest of the definition starts
-            ;; with a list of menu cache info, get rid of that.
-            (if (and (consp rest) (consp (car rest)))
-                (setq rest (cdr rest)))
-            (append `(menu-item ,(car defn) ,rest)
-                    (list :image image-exp) props)))))))
+          (if (eq (car defn) 'menu-item)
+              (append (cdr defn) (list :image image-exp) props)
+            (let ((rest (cdr defn)))
+              ;; If the rest of the definition starts
+              ;; with a list of menu cache info, get rid of that.
+              (if (and (consp rest) (consp (car rest)))
+                  (setq rest (cdr rest)))
+              (append `(menu-item ,(car defn) ,rest)
+                      (list :image image-exp) props))))))))

 ;;; Set up some global items.  Additions/deletions up for grabs.


        Jan D.




reply via email to

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