From: David Kastrup <dak@gnu.org>
Subject: Bug fix in isearch.el
Date: Tue, 03 Oct 2006 11:59:30 +0200 [thread overview]
Message-ID: <85odst1zzx.fsf@lola.goethe.zz> (raw)
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
Anything speaking against the following patch? It would end the
annoyance that clicking with mouse-2 on a clickable overlay when doing
isearch would rather cause a paste to occur. This has been bothering
me for years, and now it can be fixed reasonably easy.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2358 bytes --]
Index: lisp/isearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.290
diff -u -r1.290 isearch.el
*** lisp/isearch.el 20 Sep 2006 06:13:43 -0000 1.290
--- lisp/isearch.el 3 Oct 2006 09:55:18 -0000
***************
*** 1297,1313 ****
(interactive "e")
(let* ((w (posn-window (event-start click)))
(overriding-terminal-local-map nil)
! (key (vector (event-basic-type click)))
! ;; FIXME: `key-binding' should accept an event as argument
! ;; and do all the overlay/text-properties lookup etc...
! (binding (with-current-buffer
! (if (window-live-p w) (window-buffer w) (current-buffer))
! (key-binding key))))
(if (and (window-minibuffer-p w)
(not (minibuffer-window-active-p w))) ; in echo area
(isearch-yank-x-selection)
(when (functionp binding)
! (call-interactively binding)))))
(defun isearch-yank-internal (jumpform)
--- 1297,1311 ----
(interactive "e")
(let* ((w (posn-window (event-start click)))
(overriding-terminal-local-map nil)
! ;; Should we rather use the output of `this-command-keys-vector'
! ;; instead of `(vector click)' for `keys'?
! (keys (vector click))
! (binding (key-binding keys t)))
(if (and (window-minibuffer-p w)
(not (minibuffer-window-active-p w))) ; in echo area
(isearch-yank-x-selection)
(when (functionp binding)
! (call-interactively binding nil keys)))))
(defun isearch-yank-internal (jumpform)
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10156
diff -u -r1.10156 ChangeLog
*** lisp/ChangeLog 2 Oct 2006 23:26:42 -0000 1.10156
--- lisp/ChangeLog 3 Oct 2006 09:55:50 -0000
***************
*** 1,3 ****
--- 1,10 ----
+ 2006-10-03 David Kastrup <dak@gnu.org>
+
+ * isearch.el (isearch-mouse-2): Use new semantics of `key-binding'
+ in order to better redirect mouse-2 clicks. Also allow default
+ bindings to apply, and pass the synthetic key-sequence to
+ `call-interactively'.
+
2006-10-03 Denis St^[,A|^[(Bnkel <dstuenkel@googlemail.com> (tiny change)
* ibuf-ext.el (eval, view-and-eval) <define-ibuffer-op>:
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next reply other threads:[~2006-10-03 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 9:59 David Kastrup [this message]
2006-10-03 13:58 ` Bug fix in isearch.el David Kastrup
2006-10-03 14:13 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85odst1zzx.fsf@lola.goethe.zz \
--to=dak@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).