# HG changeset patch # User Richard M. Stallman # Date 1104371352 0 # Node ID dc445634487da3ee1addc6b542c00fd3b6495d41 # Parent a2a95f34b949a9d34fac1fcad33deb3f1841cf29 (hack-local-variables): If there is no PREFIX, set it to "^". Redundant variable PREFIXLEN removed. diff -r a2a95f34b949 -r dc445634487d lisp/files.el --- 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))