summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 0b011f4c363..152f1554279 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3375,7 +3375,7 @@ local variables, but directory-local variables may still be applied."
(error "Local variables entry is missing the prefix"))
(end-of-line)
;; Discard the suffix.
- (if (looking-back suffix)
+ (if (looking-back suffix (line-beginning-position))
(delete-region (match-beginning 0) (point))
(error "Local variables entry is missing the suffix"))
(forward-line 1))