Function: dir-locals-to-string

dir-locals-to-string is a byte-compiled function defined in files-x.el.gz.

Signature

(dir-locals-to-string VARIABLES)

Documentation

Output alists of VARIABLES to string in dotted pair notation syntax.

Source Code

;; Defined in /usr/src/emacs/lisp/files-x.el.gz
(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")))