X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=ian-dotfiles.git;a=blobdiff_plain;f=home%2Femacs%2Fian.el;h=6f6bd9821a62caf85eab0516bf0f8511fc98a5b5;hp=0d8075c6a4216cf8d678c36317710b51e9ca9837;hb=f5bab17e9f3b546b6a3a7c8387085c1ce8b7708a;hpb=7dafda0805538b53995db0ec64de4f3a204357f6 diff --git a/home/emacs/ian.el b/home/emacs/ian.el index 0d8075c..6f6bd98 100644 --- a/home/emacs/ian.el +++ b/home/emacs/ian.el @@ -535,7 +535,37 @@ The citation string is taken from 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)