diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-10-29 20:57:03 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-10-29 20:57:03 +0000 |
commit | e9bed1ef689d89df03c4f65bbd1e510b43c5a24d (patch) | |
tree | 1d52135c1f95138b9f7d8b1c28c6d2806aa3648f /lisp/tmm.el | |
parent | 8a7c2fb5c48a6159fae7c121d2347aaa26bc3d31 (diff) | |
download | emacs-e9bed1ef689d89df03c4f65bbd1e510b43c5a24d.tar.gz emacs-e9bed1ef689d89df03c4f65bbd1e510b43c5a24d.tar.bz2 emacs-e9bed1ef689d89df03c4f65bbd1e510b43c5a24d.zip |
(tmm-get-keymap): Handle case where keyseq cache is omitted.
Diffstat (limited to 'lisp/tmm.el')
-rw-r--r-- | lisp/tmm.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/tmm.el b/lisp/tmm.el index a7ca2047162..42531854e09 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -462,11 +462,11 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (or (keymapp (cdr-safe (cdr-safe elt))) (eq (car (cdr-safe (cdr-safe elt))) 'lambda)) (fboundp (cdr-safe (cdr-safe elt)))) - (setq km (cdr (cdr elt))) + (setq km (cddr elt)) (and (stringp (car elt)) (setq str (car elt))) (and str - (stringp (cdr (car (cdr elt)))) ; keyseq cache - (setq cache (cdr (car (cdr elt)))) + (stringp (cdr-safe (cadr elt))) ; keyseq cache + (setq cache (cdr (cadr elt))) cache (setq str (concat str cache)))) ((eq (car-safe elt) 'menu-item) @@ -497,18 +497,17 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda)) (fboundp (cdr-safe (cdr-safe (cdr-safe elt))))) ; New style of easy-menu - (setq km (cdr (cdr (cdr elt)))) + (setq km (cdr (cddr elt))) (and (stringp (car elt)) (setq str (car elt))) (and str - (stringp (cdr (car (cdr (cdr elt))))) ; keyseq cache + (stringp (cdr-safe (car (cddr elt)))) ; keyseq cache (setq cache (cdr (car (cdr (cdr elt))))) cache (setq str (concat str cache)))) ((stringp event) ; x-popup or x-popup element (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)) - )))) + (setq str event event nil km (cons 'keymap elt)))))) (and km (stringp km) (setq str km)) ;; Verify that the command is enabled; ;; if not, don't mention it. |