changeset 26580:d779cb4aa2ae

(Info-build-node-completions, Info-search, Info-follow-reference) (Info-complete-menu-item, Info-menu, Info-index, Info-get-token) (Info-find-emacs-command-nodes): Avoid properties on matched text which may appear in minibuffer.
author Dave Love <fx@gnu.org>
date Wed, 24 Nov 1999 19:53:56 +0000
parents c1df0a0b6ed1
children b679911f6f28
files lisp/info.el
diffstat 1 files changed, 18 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Wed Nov 24 16:21:12 1999 +0000
+++ b/lisp/info.el	Wed Nov 24 19:53:56 1999 +0000
@@ -963,15 +963,13 @@
 		  (goto-char marker)
 		  (while (re-search-forward "\nNode: \\(.*\\)\177" nil t)
 		    (setq compl
-			  (cons (list (buffer-substring (match-beginning 1)
-							(match-end 1)))
+			  (cons (list (match-string-no-properties 1))
 				compl))))
 	      (widen)
 	      (goto-char (point-min))
 	      ;; If the buffer begins with a node header, process that first.
 	      (if (Info-node-at-bob-matching node-regexp)
-		  (setq compl (list (buffer-substring (match-beginning 1)
-						      (match-end 1)))))
+		  (setq compl (list (match-string-no-properties 1))))
 	      ;; Now for the rest of the nodes.
 	      (while (search-forward "\n\^_" nil t)
 		(forward-line 1)
@@ -979,8 +977,7 @@
 		  (forward-line 1)
 		  (if (re-search-backward node-regexp beg t)
 		      (setq compl 
-			    (cons (list (buffer-substring (match-beginning 1)
-							  (match-end 1)))
+			    (cons (list (match-string-no-properties 1))
 				  compl))))))))
 	(setq compl (cons '("*") compl))
 	(setq Info-current-file-completions compl))))
@@ -1039,8 +1036,7 @@
 		      (re-search-forward "\\(^.*\\): [0-9]+$")
 		      (goto-char (+ (match-end 1) 2))
 		      (setq list (cons (cons (read (current-buffer))
-					     (buffer-substring
-					      (match-beginning 1) (match-end 1)))
+					     (match-string-no-properties 1))
 				       list))
 		      (goto-char (1+ (match-end 0))))
 		    (setq list (nreverse list)
@@ -1158,7 +1154,7 @@
 
        (goto-char (point-min))
        (while (re-search-forward "\\*note[ \n\t]*\\([^:]*\\):" nil t)
-	 (setq str (buffer-substring
+	 (setq str (buffer-substring-no-properties
 		    (match-beginning 1)
 		    (1- (point))))
 	 ;; See if this one should be the default.
@@ -1266,12 +1262,10 @@
 	       (goto-char (point-min))
 	       (search-forward "\n* Menu:")
 	       (while (re-search-forward pattern nil t)
-		 (setq completions (cons (cons (format "%s"
-						       (buffer-substring
-							(match-beginning 1)
-							(match-end 1)))
-					       (match-beginning 1))
-					 completions))))
+		 (setq completions
+		       (cons (cons (match-string-no-properties 1)
+				   (match-beginning 1))
+			     completions))))
 	     (try-completion string completions predicate)))
 	  ((eq action t)
 	   (let (completions
@@ -1283,11 +1277,9 @@
 	       (goto-char (point-min))
 	       (search-forward "\n* Menu:")
 	       (while (re-search-forward pattern nil t)
-		 (setq completions (cons (cons (format "%s"
-						       (buffer-substring
-							(match-beginning 1)
-							(match-end 1)))
-					       (match-beginning 1))
+		 (setq completions (cons (cons
+					  (match-string-no-properties 1)
+					  (match-beginning 1))
 					 completions))))
 	     (all-completions string completions predicate)))
 	  (t
@@ -1321,9 +1313,7 @@
 	      (goto-char p)
 	      (end-of-line)
 	      (if (re-search-backward "\n\\* +\\([^:\t\n]*\\):" beg t)
-		  (setq default (format "%s" (buffer-substring
-					      (match-beginning 1)
-					      (match-end 1))))))))
+		  (setq default (match-string-no-properties 1))))))
      (let ((item nil))
        (while (null item)
 	 (setq item (let ((completion-ignore-case t)
@@ -1660,15 +1650,11 @@
 		(goto-char (point-min))
 		(while (re-search-forward pattern nil t)
 		  (setq matches
-			(cons (list (buffer-substring (match-beginning 1)
-						      (match-end 1))
-				    (buffer-substring (match-beginning 2)
-						      (match-end 2))
+			(cons (list (match-string-no-properties 1)
+				    (match-string-no-properties 2)
 				    Info-current-node
 				    (string-to-int (concat "0"
-							   (buffer-substring
-							    (match-beginning 3)
-							    (match-end 3)))))
+							   (match-string 3))))
 			      matches)))
 		(and (setq node (Info-extract-pointer "next" t))
 		     (string-match "\\<Index\\>" node)))
@@ -1790,7 +1776,7 @@
 					  (> (match-end 0) pos))))))
 	(if (and found (<= (match-beginning 0) pos)
 		 (> (match-end 0) pos))
-	    (buffer-substring (match-beginning 1) (match-end 1))
+	    (match-string-no-properties 1)
 	  (cond ((null errorstring)
 		 nil)
 		((eq errorstring t)
@@ -2176,9 +2162,7 @@
       (goto-char (point-max))
       (while (re-search-backward cmd-desc nil t)
 	  (setq where (cons (list Info-current-file
-				  (buffer-substring
-				   (match-beginning 1)
-				   (match-end 1))
+				  (match-string-no-properties 1)
 				  0)
 			    where)))
       where)))