]> git.eshelyaron.com Git - emacs.git/commitdiff
(calculator-last-input): Guard uses of event-key and key-press-event-p.
authorRichard M. Stallman <rms@gnu.org>
Sat, 16 Jul 2005 17:31:53 +0000 (17:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 16 Jul 2005 17:31:53 +0000 (17:31 +0000)
(event-key, key-press-event-p): Delete definitions.

lisp/calculator.el

index 923d4022098fb0964f05783903d812c4ea8a31ad..301a27eac5f6ea860b050aff2caa0d47f43704c4 100644 (file)
@@ -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) ? )))