Function: dir-locals-collect-mode-variables

dir-locals-collect-mode-variables is a byte-compiled function defined in files.el.gz.

Signature

(dir-locals-collect-mode-variables MODE-VARIABLES VARIABLES)

Documentation

Collect directory-local variables from MODE-VARIABLES.

VARIABLES is the initial list of variables. Returns the new list.

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun dir-locals-collect-mode-variables (mode-variables variables)
  "Collect directory-local variables from MODE-VARIABLES.
VARIABLES is the initial list of variables.
Returns the new list."
  (dolist (pair mode-variables variables)
    (let* ((variable (car pair))
	   (value (cdr pair))
	   (slot (assq variable variables)))
      ;; If variables are specified more than once, use only the last.  (Why?)
      ;; The pseudo-variables mode and eval are different (bug#3430).
      (if (and slot (not (memq variable '(mode eval))))
	  (setcdr slot value)
	;; Need a new cons in case we setcdr later.
	(push (cons variable value) variables)))))