diff options
| author | Wenjamin Petrenko <wenjamin.petrenko@yandex.ru> | 2018-08-14 11:44:18 +0300 | 
|---|---|---|
| committer | Noam Postavsky <npostavs@gmail.com> | 2018-08-24 21:54:16 -0400 | 
| commit | 9a613d3ed0331f9fd2528520a96d977ebba57d7d (patch) | |
| tree | a9018051473aa286e231357e2b89a00ed86eecfc /lisp | |
| parent | 624e7dc77865e0a9359dd7f7b0e861743d091313 (diff) | |
| download | emacs-9a613d3ed0331f9fd2528520a96d977ebba57d7d.tar.gz | |
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
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files-x.el | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/lisp/files-x.el b/lisp/files-x.el index 2a52792222d..92532e85f4f 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -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)))) | 
