[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 9a613d3: Prevent `modify-file-local-variable-prop
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] emacs-26 9a613d3: Prevent `modify-file-local-variable-prop-line' from adding extra '; ' |
Date: |
Fri, 24 Aug 2018 21:58:51 -0400 (EDT) |
branch: emacs-26
commit 9a613d3ed0331f9fd2528520a96d977ebba57d7d
Author: Wenjamin Petrenko <address@hidden>
Commit: Noam Postavsky <address@hidden>
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
---
lisp/files-x.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 2a52792..92532e8 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))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 9a613d3: Prevent `modify-file-local-variable-prop-line' from adding extra '; ',
Noam Postavsky <=