Mercurial > emacs
diff lisp/calc/calc-misc.el @ 107882:9b67d5035af2
* calc-ext.el (calc-init-extensions): Add keybinding for 'calc-option'.
Add `calc-option-prefix-help' to calc-help autoloads.
(calc-inverse): Add "Option" to message, as appropriate.
(calc-hyperbolic): Add "Option" to message, as appropriate.
(calc-option, calc-is-option): New functions.
* calc-help.el (calc-full-help): Add `calc-option-help'.
(calc-option-prefix-help): New function.
* calc-misc.el (calc-help): Add "Option" entry.
* calc.el (calc-local-var-list): Add `calc-option-flag'.
(calc-option-flag): New variable.
(calc-do): Set `calc-option-flag to nil.
(calc-set-mode-line): Add "Opt " as appropriate.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Fri, 16 Apr 2010 21:47:25 -0500 |
parents | 1d1d5d9bd884 |
children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lisp/calc/calc-misc.el Fri Apr 16 23:37:59 2010 +0300 +++ b/lisp/calc/calc-misc.el Fri Apr 16 21:47:25 2010 -0500 @@ -35,6 +35,7 @@ (declare-function calc-inv-hyp-prefix-help "calc-help" ()) (declare-function calc-inverse-prefix-help "calc-help" ()) (declare-function calc-hyperbolic-prefix-help "calc-help" ()) +(declare-function calc-option-prefix-help "calc-help" ()) (declare-function calc-explain-why "calc-stuff" (why &optional more)) (declare-function calc-clear-command-flag "calc-ext" (f)) (declare-function calc-roll-down-with-selections "calc-sel" (n m)) @@ -219,7 +220,7 @@ (let ((msgs '("Press `h' for complete help; press `?' repeatedly for a summary" "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit" - "Letter keys: SHIFT + Undo, reDo; Keep-args; Inverse, Hyperbolic" + "Letter keys: SHIFT + Undo, reDo; Keep-args; Inverse, Hyperbolic, Option" "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB" "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi" "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro" @@ -245,20 +246,22 @@ (calc-inv-hyp-prefix-help) (calc-inverse-prefix-help)) (calc-hyperbolic-prefix-help)) - (setq calc-help-phase - (if (eq this-command last-command) - (% (1+ calc-help-phase) (1+ (length msgs))) - 0)) - (let ((msg (nth calc-help-phase msgs))) - (message "%s" (if msg - (concat msg ":" - (make-string (- (apply 'max - (mapcar 'length - msgs)) - (length msg)) 32) - " [?=MORE]") - ""))))))) - + (if calc-option-flag + (calc-option-prefix-help) + (setq calc-help-phase + (if (eq this-command last-command) + (% (1+ calc-help-phase) (1+ (length msgs))) + 0)) + (let ((msg (nth calc-help-phase msgs))) + (message "%s" (if msg + (concat msg ":" + (make-string (- (apply 'max + (mapcar 'length + msgs)) + (length msg)) 32) + " [?=MORE]") + "")))))))) +