chiark / gitweb /
emacs: hack-dir-local-variables override definition found on mariner
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 13 Jun 2016 11:36:21 +0000 (12:36 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 13 Jun 2016 11:36:21 +0000 (12:36 +0100)
was active, commit it commented out

home/emacs/ian.el

index 0d8075c..6f6bd98 100644 (file)
@@ -535,7 +535,37 @@ The citation string is taken from cite-string."
            (> (point-max) (point)))
         (insert cite-string)))))
 ;
            (> (point-max) (point)))
         (insert cite-string)))))
 ;
+;
+
 
 
+;; (defun hack-dir-local-variables ()
+;;   "Read per-directory local variables for the current buffer.
+;; Store the directory-local variables in `dir-local-variables-alist'
+;; and `file-local-variables-alist', without applying them."
+;;   (when (and enable-local-variables
+;;          (buffer-file-name))
+;;     ;; Find the variables file.
+;;     (let ((variables-file (dir-locals-find-file (buffer-file-name)))
+;;       (class nil)
+;;       (dir-name nil))
+;;       (cond
+;;        ((stringp variables-file)
+;;     (setq dir-name (file-name-directory (buffer-file-name)))
+;;     (setq class (dir-locals-read-from-file variables-file)))
+;;        ((consp variables-file)
+;;     (setq dir-name (nth 0 variables-file))
+;;     (setq class (nth 1 variables-file))))
+;;       (when class
+;;     (let ((variables
+;;            (dir-locals-collect-variables
+;;             (dir-locals-get-class-variables class) dir-name nil)))
+;;       (when variables
+;;         (dolist (elt variables)
+;;           (unless (memq (car elt) '(eval mode))
+;;             (setq dir-local-variables-alist
+;;                   (assq-delete-all (car elt) dir-local-variables-alist)))
+;;           (push elt dir-local-variables-alist))
+;;         (hack-local-variables-filter variables dir-name)))))))
 
 (delete ".git/" completion-ignored-extensions)
 
 
 (delete ".git/" completion-ignored-extensions)