Function: copy-file-locals-to-dir-locals

copy-file-locals-to-dir-locals is an autoloaded, interactive and byte-compiled function defined in files-x.el.gz.

Signature

(copy-file-locals-to-dir-locals)

Documentation

Copy file-local variables to .dir-locals.el.

Probably introduced at or before Emacs version 23.2.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/files-x.el.gz
;;;###autoload
(defun copy-file-locals-to-dir-locals ()
  "Copy file-local variables to .dir-locals.el."
  (interactive)
  (dolist (elt file-local-variables-alist)
    (unless (assq (car elt) dir-local-variables-alist)
      (add-dir-local-variable major-mode (car elt) (cdr elt)))))