[Top][All Lists]

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

bug#10062: 24.0.91; completions-first-difference

From: Stefan Monnier
Subject: bug#10062: 24.0.91; completions-first-difference
Date: Mon, 16 Jan 2012 10:52:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

> I propose the attached patch following your advice i.e. strip faces when
> used for completion. Could you take a look at it? Thanks.

Rather than prevent faces from being added, I installed a patch which
strips them before insertion.


--- lisp/minibuffer.el  2012-01-05 09:46:05 +0000
+++ lisp/minibuffer.el  2012-01-16 15:41:07 +0000
@@ -571,6 +571,10 @@
 (defun completion--replace (beg end newtext)
   "Replace the buffer text between BEG and END with NEWTEXT.
 Moves point to the end of the new text."
+  ;; The properties on `newtext' include things like
+  ;; completions-first-difference, which we don't want to include
+  ;; upon insertion.
+  (set-text-properties 0 (length newtext) nil newtext)
   ;; Maybe this should be in subr.el.
   ;; You'd think this is trivial to do, but details matter if you want
   ;; to keep markers "at the right place" and be robust in the face of

reply via email to

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