changeset 59197:dc445634487d

(hack-local-variables): If there is no PREFIX, set it to "^". Redundant variable PREFIXLEN removed.
author Richard M. Stallman <rms@gnu.org>
date Thu, 30 Dec 2004 01:49:12 +0000
parents a2a95f34b949
children f7d2264f4990
files lisp/files.el
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Thu Dec 30 01:47:35 2004 +0000
+++ b/lisp/files.el	Thu Dec 30 01:49:12 2004 +0000
@@ -2183,7 +2183,7 @@
 						   buffer-file-name)
 						(concat "buffer "
 							(buffer-name))))))))))
-	  (let (prefix prefixlen suffix beg
+	  (let (prefix suffix beg
 		(enable-local-eval enable-local-eval))
 	    ;; The prefix is what comes before "local variables:" in its line.
 	    ;; The suffix is what comes after "local variables:" in its line.
@@ -2197,8 +2197,7 @@
 		      (buffer-substring (point)
 					(progn (beginning-of-line) (point)))))
 
-	    (if prefix (setq prefixlen (length prefix)
-			     prefix (regexp-quote prefix)))
+	    (setq prefix (if prefix (regexp-quote prefix) "^"))
 	    (if suffix (setq suffix (concat (regexp-quote suffix) "$")))
 	    (forward-line 1)
 	    (let ((startpos (point))