* lisp/files-x.el (modify-dir-local-variable): Insert a newline
only after creating a new file.
(dir-locals-to-string): Remove newline to not add more newlines
on every save.
((and (symbolp (car b)) (stringp (car a))) nil)
(t (string< (car a) (car b)))))))
(current-buffer))
+ (when (eobp) (insert "\n"))
(goto-char (point-min))
(indent-sexp))))
(defun dir-locals-to-string (variables)
"Output alists of VARIABLES to string in dotted pair notation syntax."
- (format "(%s)\n"
+ (format "(%s)"
(mapconcat
(lambda (mode-variables)
(format "(%S . %s)"