bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29478: [Patch 2]: bug#29478: 26.0.90; `C-h k' followed by mouse clic


From: Andreas Schwab
Subject: bug#29478: [Patch 2]: bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event
Date: Sat, 23 Dec 2017 15:48:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

On Dez 23 2017, Alan Mackenzie <acm@muc.de> wrote:

> @@ -769,6 +773,28 @@ help-read-key-sequence
>          (setq yank-menu (copy-sequence saved-yank-menu))
>          (fset 'yank-menu (cons 'keymap yank-menu))))))
>  
> +(defun help-downify-mouse-event-type (base)
> +  "Add \"down-\" to BASE if it is not already there.
> +BASE is a symbol, a mouse event type.  If the modification is done,
> +return the new symbol.  Otherwise return nil."
> +  (let ((base-s (symbol-name base)))
> +    ;; Note: the order of the components in the following string is
> +    ;; determined by `apply_modifiers_uncached' in src/keyboard.c.
> +    (string-match "\\(A-\\)?\
> +\\(C-\\)?\
> +\\(H-\\)?\
> +\\(M-\\)?\
> +\\(S-\\)?\
> +\\(s-\\)?\
> +\\(double-\\)?\
> +\\(triple-\\)?\
> +\\(up-\\)?\
> +\\(\\(down-\\)?\\)\
> +\\(\\(drag-\\)?\\)" base-s)
> +    (when (and (zerop (length (match-string 10 base-s)))  ; "down-"
> +               (zerop (length (match-string 12 base-s)))) ; "drag-"

A group that didn't match can be detected by match-string (or
match-beginning) returning nil.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]