aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJay Belanger2015-09-17 22:22:18 -0500
committerJay Belanger2015-09-17 22:22:18 -0500
commitfb875ee6ff20034944df04b83a147493db7ddeb3 (patch)
tree0fb6c6387779697c0e98a82a53f7bf0002fb6add /lisp
parent644c6b414f39222890246d7fe155a369b1983246 (diff)
downloademacs-fb875ee6ff20034944df04b83a147493db7ddeb3.tar.gz
emacs-fb875ee6ff20034944df04b83a147493db7ddeb3.zip
Fix the routine for help on Calc's prefixes.
* lisp/calc/calc-ext.el (calc-prefix-help-retry): New variable. (calc-do-prefix-help): Use `read-char' to determine the next Calc command.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calc/calc-ext.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 27898fd9c97..adbb20c82f8 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -1293,6 +1293,7 @@ calc-kill calc-kill-region calc-yank))))
1293 (define-key calc-help-map "?" 'calc-help-for-help) 1293 (define-key calc-help-map "?" 'calc-help-for-help)
1294 (define-key calc-help-map "\C-h" 'calc-help-for-help)) 1294 (define-key calc-help-map "\C-h" 'calc-help-for-help))
1295 1295
1296(defvar calc-prefix-help-retry nil)
1296(defvar calc-prefix-help-phase 0) 1297(defvar calc-prefix-help-phase 0)
1297(defun calc-do-prefix-help (msgs group key) 1298(defun calc-do-prefix-help (msgs group key)
1298 (if calc-full-help-flag 1299 (if calc-full-help-flag
@@ -1300,7 +1301,7 @@ calc-kill calc-kill-region calc-yank))))
1300 (if (cdr msgs) 1301 (if (cdr msgs)
1301 (progn 1302 (progn
1302 (setq calc-prefix-help-phase 1303 (setq calc-prefix-help-phase
1303 (if (eq this-command last-command) 1304 (if calc-prefix-help-retry
1304 (% (1+ calc-prefix-help-phase) (1+ (length msgs))) 1305 (% (1+ calc-prefix-help-phase) (1+ (length msgs)))
1305 0)) 1306 0))
1306 (let ((msg (nth calc-prefix-help-phase msgs))) 1307 (let ((msg (nth calc-prefix-help-phase msgs)))
@@ -1321,7 +1322,13 @@ calc-kill calc-kill-region calc-yank))))
1321 (message "%s: %s: %c-" group (car msgs) key) 1322 (message "%s: %s: %c-" group (car msgs) key)
1322 (message "%s: (none) %c-" group key)) 1323 (message "%s: (none) %c-" group key))
1323 (message "%s: %s" group (car msgs)))) 1324 (message "%s: %s" group (car msgs))))
1324 (and key (calc-unread-command key)))) 1325 (let* ((chr (read-char))
1326 (keys (if key (string key chr) (string chr)))
1327 (bnd (local-key-binding keys)))
1328 (setq calc-prefix-help-retry (= chr ??))
1329 (if bnd
1330 (call-interactively bnd)
1331 (message (concat keys " is undefined"))))))
1325 1332
1326;;;; Commands. 1333;;;; Commands.
1327 1334