summaryrefslogtreecommitdiff
path: root/lisp/tmm.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-04-21 04:51:23 +0000
committerRichard M. Stallman <rms@gnu.org>1998-04-21 04:51:23 +0000
commitae3f2f3c6b2b85dcf1132ef6263e8b3321aefb48 (patch)
tree1feeb020d7d93c8462fcc7740cb8c460b6b0523e /lisp/tmm.el
parent35e3c484756036407accd8ed6fc4a664b766ee13 (diff)
downloademacs-ae3f2f3c6b2b85dcf1132ef6263e8b3321aefb48.tar.gz
(tmm-get-keymap): Handle new format menu item w/o cache.
(tmm-prompt): If reach an empty menu, get an error.
Diffstat (limited to 'lisp/tmm.el')
-rw-r--r--lisp/tmm.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 5f96450dc5d..6aa4f50f6ca 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -176,6 +176,8 @@ Its value should be an event that has a binding in MENU."
;; This way we only ask the user one question,
;; for which element of that pane.
(setq choice (cdr (car tmm-km-list)))
+ (unless tmm-km-list
+ (error "Empty menu reached"))
(and tmm-km-list
(let ((index-of-default 0))
(if tmm-mid-prompt
@@ -220,7 +222,7 @@ Its value should be an event that has a binding in MENU."
(string= (substring out 0 (length tmm-c-prompt)) tmm-c-prompt)
(setq out (substring out (length tmm-c-prompt))
choice (cdr (assoc out tmm-km-list))))
- (and (null choice)
+ (and (null choice) out
(setq out (try-completion out tmm-km-list)
choice (cdr (assoc out tmm-km-list)))))
;; CHOICE is now (STRING . MEANING). Separate the two parts.
@@ -426,6 +428,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
(setq km (nth 2 elt))
(setq str (nth 1 elt))
(and str
+ (consp (nth 3 elt))
(stringp (cdr (car (nth 3 elt)))) ; keyseq cache
(setq cache (cdr (car (nth 3 elt))))
cache