aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-04-21 04:51:23 +0000
committerRichard M. Stallman1998-04-21 04:51:23 +0000
commitae3f2f3c6b2b85dcf1132ef6263e8b3321aefb48 (patch)
tree1feeb020d7d93c8462fcc7740cb8c460b6b0523e
parent35e3c484756036407accd8ed6fc4a664b766ee13 (diff)
downloademacs-ae3f2f3c6b2b85dcf1132ef6263e8b3321aefb48.tar.gz
emacs-ae3f2f3c6b2b85dcf1132ef6263e8b3321aefb48.zip
(tmm-get-keymap): Handle new format menu item w/o cache.
(tmm-prompt): If reach an empty menu, get an error.
-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."
176 ;; This way we only ask the user one question, 176 ;; This way we only ask the user one question,
177 ;; for which element of that pane. 177 ;; for which element of that pane.
178 (setq choice (cdr (car tmm-km-list))) 178 (setq choice (cdr (car tmm-km-list)))
179 (unless tmm-km-list
180 (error "Empty menu reached"))
179 (and tmm-km-list 181 (and tmm-km-list
180 (let ((index-of-default 0)) 182 (let ((index-of-default 0))
181 (if tmm-mid-prompt 183 (if tmm-mid-prompt
@@ -220,7 +222,7 @@ Its value should be an event that has a binding in MENU."
220 (string= (substring out 0 (length tmm-c-prompt)) tmm-c-prompt) 222 (string= (substring out 0 (length tmm-c-prompt)) tmm-c-prompt)
221 (setq out (substring out (length tmm-c-prompt)) 223 (setq out (substring out (length tmm-c-prompt))
222 choice (cdr (assoc out tmm-km-list)))) 224 choice (cdr (assoc out tmm-km-list))))
223 (and (null choice) 225 (and (null choice) out
224 (setq out (try-completion out tmm-km-list) 226 (setq out (try-completion out tmm-km-list)
225 choice (cdr (assoc out tmm-km-list))))) 227 choice (cdr (assoc out tmm-km-list)))))
226 ;; CHOICE is now (STRING . MEANING). Separate the two parts. 228 ;; 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."
426 (setq km (nth 2 elt)) 428 (setq km (nth 2 elt))
427 (setq str (nth 1 elt)) 429 (setq str (nth 1 elt))
428 (and str 430 (and str
431 (consp (nth 3 elt))
429 (stringp (cdr (car (nth 3 elt)))) ; keyseq cache 432 (stringp (cdr (car (nth 3 elt)))) ; keyseq cache
430 (setq cache (cdr (car (nth 3 elt)))) 433 (setq cache (cdr (car (nth 3 elt))))
431 cache 434 cache