aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-10-29 20:57:03 +0000
committerChong Yidong2008-10-29 20:57:03 +0000
commite9bed1ef689d89df03c4f65bbd1e510b43c5a24d (patch)
tree1d52135c1f95138b9f7d8b1c28c6d2806aa3648f
parent8a7c2fb5c48a6159fae7c121d2347aaa26bc3d31 (diff)
downloademacs-e9bed1ef689d89df03c4f65bbd1e510b43c5a24d.tar.gz
emacs-e9bed1ef689d89df03c4f65bbd1e510b43c5a24d.zip
(tmm-get-keymap): Handle case where keyseq cache is omitted.
-rw-r--r--lisp/tmm.el13
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."
462 (or (keymapp (cdr-safe (cdr-safe elt))) 462 (or (keymapp (cdr-safe (cdr-safe elt)))
463 (eq (car (cdr-safe (cdr-safe elt))) 'lambda)) 463 (eq (car (cdr-safe (cdr-safe elt))) 'lambda))
464 (fboundp (cdr-safe (cdr-safe elt)))) 464 (fboundp (cdr-safe (cdr-safe elt))))
465 (setq km (cdr (cdr elt))) 465 (setq km (cddr elt))
466 (and (stringp (car elt)) (setq str (car elt))) 466 (and (stringp (car elt)) (setq str (car elt)))
467 (and str 467 (and str
468 (stringp (cdr (car (cdr elt)))) ; keyseq cache 468 (stringp (cdr-safe (cadr elt))) ; keyseq cache
469 (setq cache (cdr (car (cdr elt)))) 469 (setq cache (cdr (cadr elt)))
470 cache (setq str (concat str cache)))) 470 cache (setq str (concat str cache))))
471 471
472 ((eq (car-safe elt) 'menu-item) 472 ((eq (car-safe elt) 'menu-item)
@@ -497,18 +497,17 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
497 (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda)) 497 (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda))
498 (fboundp (cdr-safe (cdr-safe (cdr-safe elt))))) 498 (fboundp (cdr-safe (cdr-safe (cdr-safe elt)))))
499 ; New style of easy-menu 499 ; New style of easy-menu
500 (setq km (cdr (cdr (cdr elt)))) 500 (setq km (cdr (cddr elt)))
501 (and (stringp (car elt)) (setq str (car elt))) 501 (and (stringp (car elt)) (setq str (car elt)))
502 (and str 502 (and str
503 (stringp (cdr (car (cdr (cdr elt))))) ; keyseq cache 503 (stringp (cdr-safe (car (cddr elt)))) ; keyseq cache
504 (setq cache (cdr (car (cdr (cdr elt))))) 504 (setq cache (cdr (car (cdr (cdr elt)))))
505 cache (setq str (concat str cache)))) 505 cache (setq str (concat str cache))))
506 506
507 ((stringp event) ; x-popup or x-popup element 507 ((stringp event) ; x-popup or x-popup element
508 (if (or in-x-menu (stringp (car-safe elt))) 508 (if (or in-x-menu (stringp (car-safe elt)))
509 (setq str event event nil km elt) 509 (setq str event event nil km elt)
510 (setq str event event nil km (cons 'keymap elt)) 510 (setq str event event nil km (cons 'keymap elt))))))
511 ))))
512 (and km (stringp km) (setq str km)) 511 (and km (stringp km) (setq str km))
513 ;; Verify that the command is enabled; 512 ;; Verify that the command is enabled;
514 ;; if not, don't mention it. 513 ;; if not, don't mention it.