[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fdbe403: * lisp/files-x.el (modify-dir-local-variab
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] master fdbe403: * lisp/files-x.el (modify-dir-local-variable): Use assoc-delete-all |
Date: |
Wed, 7 Nov 2018 17:28:04 -0500 (EST) |
branch: master
commit fdbe4035ac7305c2f70274d2133c310c3480e23a
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* lisp/files-x.el (modify-dir-local-variable): Use assoc-delete-all
instead of assq-delete-all for cases when mode is a subdirectory name.
(dir-locals-to-string): Call pp-to-string and string-trim-right
on values. (Bug#32817)
---
lisp/files-x.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 9af399c..5d87a4e 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -30,6 +30,8 @@
;;; Code:
+(eval-when-compile (require 'subr-x)) ; for string-trim-right
+
;;; Commands to add/delete file-local/directory-local variables.
@@ -484,7 +486,7 @@ from the MODE alist ignoring the input argument VALUE."
(if (memq variable '(mode eval))
(cdr mode-assoc)
(assq-delete-all variable (cdr
mode-assoc))))))
- (assq-delete-all mode variables)))
+ (assoc-delete-all mode variables)))
(setq variables
(cons `(,mode . ((,variable . ,value)))
variables))))
@@ -513,9 +515,11 @@ from the MODE alist ignoring the input argument VALUE."
(car mode-variables)
(format "(%s)" (mapconcat
(lambda (variable-value)
- (format "(%S . %S)"
+ (format "(%S . %s)"
(car variable-value)
- (cdr variable-value)))
+ (string-trim-right
+ (pp-to-string
+ (cdr
variable-value)))))
(cdr mode-variables) "\n"))))
variables "\n")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master fdbe403: * lisp/files-x.el (modify-dir-local-variable): Use assoc-delete-all,
Juri Linkov <=