# HG changeset patch # User Richard M. Stallman # Date 1121535113 0 # Node ID c25db06be8ca22c98cd51dc3c4aaa221116bf270 # Parent ce8784010c3c84cc5c4f5b9dc5ac9faa25e80df5 (calculator-last-input): Guard uses of event-key and key-press-event-p. (event-key, key-press-event-p): Delete definitions. diff -r ce8784010c3c -r c25db06be8ca lisp/calculator.el --- a/lisp/calculator.el Sat Jul 16 17:24:40 2005 +0000 +++ b/lisp/calculator.el Sat Jul 16 17:31:53 2005 +0000 @@ -1277,12 +1277,6 @@ (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 @@ (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) ? )))