summaryrefslogtreecommitdiff
path: root/lisp/files-x.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files-x.el')
-rw-r--r--lisp/files-x.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 4db6fbd22cc..a89fc26d60b 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -507,19 +507,20 @@ from the MODE alist ignoring the input argument VALUE."
(defun dir-locals-to-string (variables)
"Output alists of VARIABLES to string in dotted pair notation syntax."
- (format "(%s)" (mapconcat
- (lambda (mode-variables)
- (format "(%S . %s)"
- (car mode-variables)
- (format "(%s)" (mapconcat
- (lambda (variable-value)
- (format "(%S . %s)"
- (car variable-value)
- (string-trim-right
- (pp-to-string
- (cdr variable-value)))))
- (cdr mode-variables) "\n"))))
- variables "\n")))
+ (format "(%s)\n"
+ (mapconcat
+ (lambda (mode-variables)
+ (format "(%S . %s)"
+ (car mode-variables)
+ (format "(%s)" (mapconcat
+ (lambda (variable-value)
+ (format "(%S . %s)"
+ (car variable-value)
+ (string-trim-right
+ (pp-to-string
+ (cdr variable-value)))))
+ (cdr mode-variables) "\n"))))
+ variables "\n")))
;;;###autoload
(defun add-dir-local-variable (mode variable value)