emacs-devel
[Top][All Lists]
Advanced

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

Re: Where is tool bar?


From: Stefan Monnier
Subject: Re: Where is tool bar?
Date: Sat, 24 Apr 2010 22:03:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> 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.

Oops, sorry pilot error: I expected only the first hunk (the added
comment) and didn't notice the other.  Could someone undo that for me?


        Stefan


> 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]