[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrong common substring highlighted in Completion buffer
From: |
Juri Linkov |
Subject: |
Re: Wrong common substring highlighted in Completion buffer |
Date: |
Mon, 12 Dec 2005 09:44:34 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
I also noticed that after using M-TAB in a Lisp buffer and selecting
a completion from the *Completion* buffer, highlighting from the
common substring is copied to the original buffer. This can be fixed
by the following patch.
Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.778
diff -c -r1.778 simple.el
*** lisp/simple.el 10 Dec 2005 01:12:25 -0000 1.778
--- lisp/simple.el 12 Dec 2005 07:43:55 -0000
***************
*** 4744,4750 ****
(error "No completion here"))
(setq beg (previous-single-property-change beg 'mouse-face))
(setq end (or (next-single-property-change end 'mouse-face) (point-max)))
! (setq completion (buffer-substring beg end))
(let ((owindow (selected-window)))
(if (and (one-window-p t 'selected-frame)
(window-dedicated-p (selected-window)))
--- 4744,4750 ----
(error "No completion here"))
(setq beg (previous-single-property-change beg 'mouse-face))
(setq end (or (next-single-property-change end 'mouse-face) (point-max)))
! (setq completion (buffer-substring-no-properties beg end))
(let ((owindow (selected-window)))
(if (and (one-window-p t 'selected-frame)
(window-dedicated-p (selected-window)))
--
Juri Linkov
http://www.jurta.org/emacs/