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: Alan Mackenzie
Subject: bug#29478: [Patch 2]: bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event
Date: Sun, 24 Dec 2017 08:43:48 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Andreas.

On Sat, Dec 23, 2017 at 15:48:38 +0100, Andreas Schwab wrote:
> On Dez 23 2017, Alan Mackenzie <address@hidden> 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.

Yes, it can.  Thanks!  I've amended the function accordingly.

> Andreas.

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

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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