From 5757dd514dd8b797e57c01fb0710c59a4952395f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 17 Aug 2007 07:31:52 +0000 Subject: [PATCH] T. V. Raman (tiny change) (symbol-under-point, symbol-before-point) (symbol-before-point-for-complete): Use buffer-substring-no-properties. --- lisp/ChangeLog | 6 ++++++ lisp/completion.el | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f6ee763d1d..974b1a62f63 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-17 T. V. Raman (tiny change) + + * completion.el (symbol-under-point, symbol-before-point) + (symbol-before-point-for-complete): Use + buffer-substring-no-properties. + 2007-08-17 Glenn Morris * progmodes/compile.el (compilation-get-file-structure): Make use diff --git a/lisp/completion.el b/lisp/completion.el index 99d559df967..b8bf5bd93b8 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -568,7 +568,8 @@ But only if it is longer than `completion-min-length'." (- cmpl-symbol-end cmpl-symbol-start)) (<= (- cmpl-symbol-end cmpl-symbol-start) completion-max-length)) - (buffer-substring cmpl-symbol-start cmpl-symbol-end)))))) + (buffer-substring-no-properties + cmpl-symbol-start cmpl-symbol-end)))))) ;; tests for symbol-under-point ;; `^' indicates cursor pos. where value is returned @@ -601,7 +602,8 @@ Returns nil if there isn't one longer than `completion-min-length'." ;; Return value if long enough. (if (>= cmpl-symbol-end (+ cmpl-symbol-start completion-min-length)) - (buffer-substring cmpl-symbol-start cmpl-symbol-end))) + (buffer-substring-no-properties + cmpl-symbol-start cmpl-symbol-end))) ((= cmpl-preceding-syntax ?w) ;; chars to ignore at end (let ((saved-point (point))) @@ -621,7 +623,8 @@ Returns nil if there isn't one longer than `completion-min-length'." (- cmpl-symbol-end cmpl-symbol-start)) (<= (- cmpl-symbol-end cmpl-symbol-start) completion-max-length)) - (buffer-substring cmpl-symbol-start cmpl-symbol-end))))))) + (buffer-substring-no-properties + cmpl-symbol-start cmpl-symbol-end))))))) ;; tests for symbol-before-point ;; `^' indicates cursor pos. where value is returned @@ -670,7 +673,8 @@ Returns nil if there isn't one longer than `completion-min-length'." (- cmpl-symbol-end cmpl-symbol-start)) (<= (- cmpl-symbol-end cmpl-symbol-start) completion-max-length)) - (buffer-substring cmpl-symbol-start cmpl-symbol-end)))))) + (buffer-substring-no-properties + cmpl-symbol-start cmpl-symbol-end)))))) ;; tests for symbol-before-point-for-complete ;; `^' indicates cursor pos. where value is returned -- 2.39.2