Prevent `modify-file-local-variable-prop-line' from adding extra ';'
* lisp/files-x.el (modify-file-local-variable-prop-line): Handle whitespace when checking if there's already a ';' before the variable (Bug#23294). Copyright-paperwork-exempt: yes
This commit is contained in:
parent
624e7dc778
commit
9a613d3ed0
1 changed files with 3 additions and 1 deletions
|
@ -377,7 +377,9 @@ from the -*- line ignoring the input argument VALUE."
|
|||
((eq variable 'mode) (goto-char beg))
|
||||
((null replaced-pos) (goto-char end))
|
||||
(replaced-pos (goto-char replaced-pos)))
|
||||
(if (and (not (eq (char-before) ?\;))
|
||||
(if (and (save-excursion
|
||||
(skip-chars-backward " \t")
|
||||
(not (eq (char-before) ?\;)))
|
||||
(not (equal (point) (marker-position beg)))
|
||||
;; When existing `-*- -*-' is empty, beg > end.
|
||||
(not (> (marker-position beg) (marker-position end))))
|
||||
|
|
Loading…
Add table
Reference in a new issue