]> code.delx.au - gnu-emacs/commitdiff
Minor fixes in calculator.el
authorChris Zheng <chriszheng99@gmail.com>
Wed, 24 Feb 2016 20:35:18 +0000 (22:35 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 24 Feb 2016 20:35:18 +0000 (22:35 +0200)
* lisp/calculator.el (calculator-mode-map): Bind `E' for
`calculator-exp'.
(calculator-last-input): Fix a bug with pressing F1.
(Bug#20764)

Copyright-paperwork-exempt: yes

lisp/calculator.el

index 9c94023a2a2dbf9d40d11f5054ab15cf7199bbd9..bba52e225440b658a32586533631acd719d414cd 100644 (file)
@@ -394,7 +394,7 @@ Used for repeating operations in calculator-repR/L.")
                                      [kp-5] [kp-6] [kp-7] [kp-8] [kp-9])
              (calculator-op          [kp-divide] [kp-multiply])
              (calculator-decimal     "." [kp-decimal])
-             (calculator-exp         "e")
+             (calculator-exp         "e" "E")
              (calculator-dec/deg-mode "D")
              (calculator-set-register "s")
              (calculator-get-register "g")
@@ -1219,7 +1219,7 @@ arguments."
   "Last char (or event or event sequence) that was read.
 Use KEYS if given, otherwise use `this-command-keys'."
   (let ((inp (or keys (this-command-keys))))
-    (if (or (stringp inp) (not (arrayp inp)))
+    (if (or (stringp inp) (not (arrayp inp)) (member inp '([f1] [help])))
       inp
       ;; Translates kp-x to x and [tries to] create a string to lookup
       ;; operators; assume all symbols are translatable via