chiark / gitweb /
dot/emacs: Remove VCS directories from `completion-ignored-extensions'
authorMark Wooding <mdw@distorted.org.uk>
Thu, 4 Feb 2010 13:20:14 +0000 (13:20 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 4 Feb 2010 13:26:20 +0000 (13:26 +0000)
What I /want/ to do is have Emacs not ignore `.git' as a suffix on a
directory name, but still ignore the VCS directory, but it doesn't seem
to work like that.  More on this later, probably.

dot/emacs

index e5ae0b861aed09d8ef5ad17bd857171de3384136..708817f96f083c1511e6f4c7fa2faee0c81ce414 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 
 (setq completion-ignored-extensions
       (append `(".hc" ".hi") completion-ignored-extensions))
+(dolist (dir (remove-if-not (lambda (ext)
+                             (= (aref ext (- (length ext) 1)) ?/))
+                           completion-ignored-extensions))
+  (if (/= (aref dir 0) ?/)
+      (setq completion-ignored-extensions
+           (cons (concat "/" dir)
+                 (remove dir completion-ignored-extensions)))))
 
 ;; Some common local definitions.