summaryrefslogtreecommitdiff
path: root/lisp/calculator.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-07-16 17:31:53 +0000
committerRichard M. Stallman <rms@gnu.org>2005-07-16 17:31:53 +0000
commitd88757d61b84855d9860155c424ab6bfdcf5a77d (patch)
treeecc5e3081221d6baf7c15d19d166313c4be5298e /lisp/calculator.el
parentb63ecadb4c3910f9dd0388c396b8b24d44eb9ad5 (diff)
downloademacs-d88757d61b84855d9860155c424ab6bfdcf5a77d.tar.gz
(calculator-last-input): Guard uses of event-key and key-press-event-p.
(event-key, key-press-event-p): Delete definitions.
Diffstat (limited to 'lisp/calculator.el')
-rw-r--r--lisp/calculator.el11
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 923d4022098..301a27eac5f 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -1277,12 +1277,6 @@ arguments."
(if Dbound (fset 'D Dsave) (fmakunbound 'D)))))
(error 0)))
-(eval-when-compile ; silence the compiler
- (or (fboundp 'event-key)
- (defun event-key (&rest _) nil))
- (or (fboundp 'key-press-event-p)
- (defun key-press-event-p (&rest _) nil)))
-
;;;---------------------------------------------------------------------
;;; Input interaction
@@ -1301,8 +1295,9 @@ Optional string argument KEYS will force using it as the keys entered."
(setq k (aref inp i))
;; if Emacs will someday have a event-key, then this would
;; probably be modified anyway
- (and (fboundp 'event-key) (key-press-event-p k)
- (event-key k) (setq k (event-key k)))
+ (and (if (fboundp 'key-press-event-p) (key-press-event-p k))
+ (if (fboundp 'event-key)
+ (and (event-key k) (setq k (event-key k)))))
;; assume all symbols are translatable with an ascii-character
(and (symbolp k)
(setq k (or (get k 'ascii-character) ? )))