bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7788: 23.2.91; tmm-menubar command broken: Wrong type argument: stri


From: Stefan Monnier
Subject: bug#7788: 23.2.91; tmm-menubar command broken: Wrong type argument: stringp, nil
Date: Mon, 10 Jan 2011 21:31:14 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

close 7721
thanks

> Sometimes tmm-menubar command doesn't work because it stops with error
[...]
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   string-width(nil)
>   (- colwidth (string-width str) (string-width binding))

Thanks a lot for the backtrace.  I think it is a symptom of an invalid
entry in one of the keymaps, but indeed it's also a bug in tmm.el.
I've installed the patch below into the emacs-23 branch which should
fix it.


        Stefan


=== modified file 'lisp/tmm.el'
--- lisp/tmm.el 2011-01-02 23:50:46 +0000
+++ lisp/tmm.el 2011-01-11 02:27:23 +0000
@@ -497,7 +495,7 @@
               (if (or in-x-menu (stringp (car-safe elt)))
                   (setq str event event nil km elt)
                 (setq str event event nil km (cons 'keymap elt)))))
-        (unless (eq km 'ignore)
+        (unless (or (eq km 'ignore) (null str))
           (let ((binding (where-is-internal km nil t)))
             (when binding
               (setq binding (key-description binding))






reply via email to

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