# HG changeset patch # User Richard M. Stallman # Date 738095011 0 # Node ID f34f9e634b81c61c4ea5d98872c3706caebc8a6a # Parent 0dfd1927264ea2ee3e39b001318912a74b82a089 (describe-key, describe-key-briefly): Discard the click or drag that follows a down event. diff -r 0dfd1927264e -r f34f9e634b81 lisp/help.el --- a/lisp/help.el Sat May 22 17:57:17 1993 +0000 +++ b/lisp/help.el Sat May 22 18:23:31 1993 +0000 @@ -101,6 +101,14 @@ (defun describe-key-briefly (key) "Print the name of the function KEY invokes. KEY is a string." (interactive "kDescribe key briefly: ") + ;; If this key seq ends with a down event, discard the + ;; following click or drag event. Otherwise that would + ;; erase the message. + (let ((type (aref key (1- (length key))))) + (if (listp type) (setq type (car type))) + (and (symbolp type) + (memq 'down (event-modifiers type)) + (setq foo (read-event)))) (let ((defn (key-binding key))) (if (or (null defn) (integerp defn)) (message "%s is undefined" (key-description key)) @@ -127,6 +135,14 @@ (defun describe-key (key) "Display documentation of the function invoked by KEY. KEY is a string." (interactive "kDescribe key: ") + ;; If this key seq ends with a down event, discard the + ;; following click or drag event. Otherwise that would + ;; erase the message. + (let ((type (aref key (1- (length key))))) + (if (listp type) (setq type (car type))) + (and (symbolp type) + (memq 'down (event-modifiers type)) + (read-event))) (let ((defn (key-binding key))) (if (or (null defn) (integerp defn)) (message "%s is undefined" (key-description key))