chiark / gitweb /
emacs: set vm-legacy-key-bindings so "a" works
[ian-dotfiles.git] / home / emacs / ian.el
1 ; This is my real emacs start-up file (for chiark).
2
3
4 (defalias 'perl-mode 'cperl-mode)
5 (setq cperl-invalid-face nil
6       cperl-indent-level 4
7       cperl-continued-statement-offset 4)
8
9 (make-variable-buffer-local 'indent-line-function)
10 ; Un-disable narrow and eval-expression
11 (put 'narrow-to-region 'disabled nil)
12 (put 'eval-expression 'disabled nil)
13 ;(standard-display-european t)
14 ;
15 (setq browse-url-netscape-program "mozilla")
16 (setq common-lisp-hyperspec-root "/usr/share/doc/hyperspec/")
17 ;
18 ; Make sure we don't disturb links or change ownership, use numbers
19 (setq backup-by-copying-when-mismatch t)
20 (setq backup-by-copying-when-linked t)
21 ;(setq version-control t
22 ;      kept-new-versions 4
23 ;      kept-old-versions 4
24 ;      trim-versions-without-asking t)
25 ;
26 ; Various one-liners
27 (setq require-final-newline "ask")
28 (if (string= window-system 'x) (load-library "ian-x"))
29 (load-library "ian-aliases")
30 ; (load-library "auto-pgp")
31 ; (load-library "debian-changelog-mode")
32 ; (if (string= (getenv "TERM") "bbcb32") (setq term-file-prefix nil))
33 ; (setq explicit-shell-file-name "/usr/local/bin/tcsh")
34 (setq inhibit-local-variables t)
35 (setq enable-local-variables 'ask-me)
36 (setq enable-recursive-minibuffers t)
37 (setq compile-command "make")
38 (setq next-line-add-newlines t)
39 (setq diff-switches "-u")
40 (setq line-move-visual nil)
41 (display-time)
42 ;
43 (set-variable 'search-repeat-char 28)
44 (set-fringe-mode (cons 0 nil))
45 (if (string-match "^19\." emacs-version)
46     (progn
47 ;      (setq file-name-handler-alist     ; Disable nasty auto-loading of ange-ftp
48 ;            (delq (rassq 'ange-ftp-completion-hook-function file-name-handler-alist)
49 ;                  file-name-handler-alist))
50       (require 'find-alternate-18style)
51       (defun unset-down-mouse-23 ()
52         (local-set-key [mouse-2] 'mouse-yank-at-click)
53         (local-unset-key [down-mouse-2])
54         (local-unset-key [down-mouse-3])
55         (local-unset-key [C-down-mouse-3]))
56       (add-hook 'vm-mode-hook 'unset-down-mouse-23)
57       (add-hook 'vm-mail-mode-hook 'unset-down-mouse-23)
58       (add-hook 'text-mode-hook 'unset-down-mouse-23)
59       (add-hook 'Info-mode-hook
60                 (function (lambda ()
61                             (local-set-key " " 'scroll-up)
62                             (local-set-key "\7f" 'scroll-down))))
63       (add-hook 'sh-mode-hook
64                 (function (lambda ()
65                             (local-set-key "<" 'self-insert-command))))
66       (define-key isearch-mode-map "\1c" 'isearch-repeat-forward)
67       (define-key isearch-mode-map "\1d" 'isearch-quote-char)))
68 ;
69 (menu-bar-mode -1)
70 (defun terminal-keybindings ()
71   "This function should be called by the term-setup-hook mechanism"
72   (interactive)
73   ; Set my own keybindings
74   ;
75   ; Set keybindings generally (including I-search on C-\)
76 ;  (global-set-key "    " 'self-insert-command)
77   (global-set-key "\1c" 'isearch-forward)
78 ;  (global-set-key "\r" 'newline)
79   (global-set-key "\ f" 'set-mark-command)
80   (global-set-key "\1d" 'quoted-insert)
81   ;
82   ; Set keybindings on esc-map
83   (global-set-key "\e#" 'query-replace-regexp)
84   (global-set-key "\e+" 'toggle-truncate-lines)
85   (global-set-key "\eg" 'goto-line)
86   (global-set-key "\es" 'isearch-forward-regexp)
87   (global-set-key "\e\e" 'eval-expression)
88   ;
89   ; Set keybindings on ^X-map.
90   (global-set-key "\18m" 'vm-mail)
91   (global-set-key "\18\1c" 'save-buffer)
92   (global-set-key "\18\1d" 'toggle-read-only)
93   (global-set-key "\18#" 'recover-file)
94   (global-set-key "\18\12" 'bury-buffer)
95   (global-set-key "\18\v" 'quicker-compile)
96   (global-set-key "\18\18" 'exchange-point-and-mark)
97   (global-set-key "\18\1a" 'load-tramp)
98   (global-set-key "\184\16" 'scroll-other-window)
99   (global-set-key "\184m" 'vm-mail-other-window)
100   (global-set-key "\189" 'vm-visit-folder)
101   (global-set-key "\188" 'rmail-input)
102   (global-set-key "\18p" 'cite-region)
103   (global-set-key "\18F" 'mail-formletter)
104   ;
105   ; Set keybindings for Sun numeric pad.
106   (setq esc-bracket-map (make-keymap))
107   (define-key esc-bracket-map "D" 'backward-char)
108   (define-key esc-bracket-map "C" 'forward-char)
109   (define-key esc-bracket-map "A" 'previous-line)
110   (define-key esc-bracket-map "B" 'next-line)
111   (define-key esc-map "[" esc-bracket-map)
112   (global-set-key "\e[214z" 'beginning-of-buffer)
113   (global-set-key "\e[220z" 'end-of-buffer)
114   (global-set-key "\e[216z" 'scroll-down)
115   (global-set-key "\e[222z" 'scroll-up)
116   (global-set-key "\e[192z" 'save-buffer)
117   (global-set-key "\e[194z" 'save-some-buffers)
118   (global-set-key "\e[195z" 'undo)
119   (global-set-key "\e[193z" 'call-last-kbd-macro)
120   (global-set-key "\e[196z" 'switch-to-buffer-other-window)
121   (global-set-key "\e[197z" 'copy-region-as-kill)
122   (global-set-key "\e[198z" 'find-file)
123   (global-set-key "\e[199z" 'yank)
124   (global-set-key "\e[198z" 'find-alternate-file)
125   (global-set-key "\e[200z" 'find-file)
126   (global-set-key "\e[201z" 'kill-region)
127   (global-set-key "\e[-1z" 'info)
128   ;
129   ; Set keybindings for Chiarks' x11emacs
130   (global-set-key "\e[5~" 'scroll-down)
131   (global-set-key "\e[6~" 'scroll-up)
132   ;
133   ; Set keybindings for knackered vt100-like terminal emulators.
134   (global-set-key "\eOt" 'scroll-down)
135   (global-set-key "\eOu" 'scroll-up)
136   (global-set-key "\eOD" 'backward-char)
137   (global-set-key "\eOC" 'forward-char)
138   (global-set-key "\eOA" 'previous-line)
139   (global-set-key "\eOB" 'next-line))
140 (setq term-setup-hook 'terminal-keybindings)     ; remap keys in due course
141 ;
142 (setq frame-title-format
143       '(multiple-frames
144         (:eval 
145          (let*
146              ((buf (current-buffer))
147               (leaf (buffer-name buf))
148               (dir default-directory))
149            (if dir
150                (let*
151                    ((dir (abbreviate-file-name dir))
152                     (node (replace-regexp-in-string "\\..*" "" system-name)))
153                  (concat leaf "  " node ":" dir))
154              leaf)))
155         ("" invocation-name "@" system-name)))
156 ;(setq frame-title-format
157 ;      '(multiple-frames
158 ;       (:eval 
159 ;        (let*
160 ;            ((buf (current-buffer))
161 ;             (fn (buffer-file-name buf)))
162 ;          (if fn
163 ;              (let*
164 ;                  ((fn (abbreviate-file-name fn))
165 ;                   (dir (file-name-directory fn))
166 ;                   (leaf (file-name-nondirectory fn))
167 ;                   (node (replace-regexp-in-string "\\..*" "" system-name)))
168 ;                (concat leaf "  " node ":" dir))
169 ;            (buffer-name buf))))
170 ;       ("" invocation-name "@" system-name)))
171 ;
172 ; Autoload definitions
173 (autoload 'tar-mode "tar-mode")
174 (autoload 'uncompress-while-visiting "uncompress")
175 ; (autoload 'c++-mode "c++-mode" "Mode for editing C and C++ programs" t)
176 (autoload 'hide-ifdef-mode "hideif" "For editing code with #ifdefs" t)
177 ;(setq-default indent-tabs-mode nil)
178 (autoload 'dired-find-alternate-file "dired-alternate" "Find alternately" t)
179 (autoload 'dired-run-file "dired-alternate" "Run this file" t)
180 (autoload 'perl-mode "perl-mode" "Mode for Perl code" t)
181 ; (autoload 'rmail "rmail-fixed" "Patched mail reader" t)
182 (autoload 'quicker-compile "quicker-compile" "Patched Compile mode" t)
183
184 ;(autoload 'vm "vm" "Start VM on your primary inbox." t)
185 ;(autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
186 ;(autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
187 ;(autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
188 ;(autoload 'vm-mail "vm" "Send a mail message using VM." t)
189 ;(autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)
190 ;
191 ;(require 'vm-autoload)
192
193 (vm-legacy-key-bindings)
194 ;
195 ; (autoload 'info "info-fixed" "Patched info browser" t)
196 (setq shell-mode-hook
197       '(lambda ()
198          (make-variable-buffer-local 'scroll-step)
199          (setq scroll-step 1)))
200 (setq inferior-lisp-program "sbcl")
201 ;(setq jit-lock-chunk-size 100
202 ;      jit-lock-stealth-time 1.00)
203 (setq dired-mode-hook
204       '(lambda ()
205          (define-key dired-mode-map "F" 'dired-find-alternate-file)
206          (define-key dired-mode-map "X" 'dired-run-file)))
207 ;
208 ; Prevent loading of default init file and do some of the things it did
209 ; (setq inhibit-default-init t)
210 ;
211 ; Additional alist handling function
212 ;(defun alist-remove-elem (s s-list)
213 ;  "Delete the element of the alist S-LIST whose car is S"
214 ;  (if s-list (if (equal s (car (car s-list)))
215 ;                (cdr s-list)
216 ;              (cons (car s-list) (alist-remove-elem s (cdr s-list))))
217 ;    (nil)))
218 ;
219 ; Load C++ mode and edit Perl in perl mode
220 (setq auto-mode-alist
221       (append '(("\\.[ch]$" . c-mode)
222                 ("\\.[CH]$" . c++-mode)
223                 ("\\.cc$" . c++-mode)
224                 ("\\.hh$" . c++-mode)
225 ;                ("\\.tar$" . tar-mode)
226                 ("\\.pl$" . perl-mode)
227                 ("\\.ci$" . tex-mode)
228                 ("\\.asm$" . fundamental-mode)
229                 ("\\.Z$" . uncompress-while-visiting))
230               auto-mode-alist))
231 (setq interpreter-mode-alist
232       (append '(("sh" . fundamental-mode)
233                 ("bash" . fundamental-mode))
234               interpreter-mode-alist))
235 ;
236 ; Use auto-fill when editing text
237 (add-hook 'text-mode-hook '(lambda () (auto-fill-mode 1)))
238 ; (add-hook 'text-mode-hook '(lambda () (local-set-key "        " 'self-insert-command)))
239 ;
240 ; Set up newline to auto-indent & other stuff for perl, c++ and c modes.
241 (setq perl-mode-hook '(lambda () 
242                         (local-set-key ";" 'self-insert-command)))
243 (setq c++-mode-hook '(lambda ()
244                        (hide-ifdef-mode 1)
245                        (local-set-key "," 'self-insert-command)
246                        (local-set-key ":" 'electric-c++-terminator)))
247 ; c++-electric-colon
248 (setq c-mode-hook '(lambda ()
249                      (hide-ifdef-mode 1)
250                      (c-set-offset 'substatement-open 0 nil)
251                      (local-set-key "," 'self-insert-command)
252                      (local-set-key ";" 'self-insert-command)
253                      (local-set-key "/" 'self-insert-command)
254                      (local-set-key "*" 'self-insert-command)
255                      (local-set-key "#" 'self-insert-command)
256                      (local-set-key "(" 'self-insert-command)
257                      (local-set-key ")" 'self-insert-command)
258                      (local-set-key "{" 'self-insert-command)
259                      (local-set-key "\r" 'newline-and-indent)))
260 (setq c-hanging-comment-ender-p nil)
261 ;
262 (defun vm-mail-other-window ()
263   "Like `vm-mail' command, but display buffer in another window."
264   (interactive)
265   (switch-to-buffer-other-window (current-buffer))
266   (vm-mail))
267 ;
268 ; mail precedences
269 (setq mail-precedence-key-alist
270       '((?0  . "special-delivery")
271         (?1  . "air-mail")
272         (?2  . "first-class")
273         (?3  . "second-class")
274         (?5  . "third-class")
275         (?\  . nil)
276         (?6  . "bulk")
277         (?9  . "junk")))
278 ;
279 (defun mail-precedence-as-key ()
280   "Set precedence by looking up last command char in mail-precedence-key-alist"
281   (interactive)
282   (message "%s" (concat "Precedence ["
283                         (mapconcat '(lambda (c) (char-to-string (car c)))
284                                    mail-precedence-key-alist "")
285                         "] ?"))
286   (let* ((key (read-char))
287          (prec (assoc key mail-precedence-key-alist)))
288     (if prec (mail-precedence (cdr prec))
289       (error "mail-precedence-as-key `%s' not found" key))))
290 ;
291 (defun mail-precedence-as-key-send-and-exit (arg)
292   "Set precedence by looking up last command char in mail-precedence-key-alist,
293 then call send-and-exit."
294   (interactive "P")
295   (mail-precedence-as-key)
296   (execute-kbd-macro "\ 3\ 3"))
297 ;
298 (defun mail-precedence (prec)
299   (save-excursion
300     (mail-position-on-field "Precedence")
301     (let ((p (point)))
302       (beginning-of-line)
303       (delete-region (point) p)
304       (if prec
305           (insert "Precedence: " prec)
306         (delete-char 1)))))
307 ;
308 (defun mail-mode-setup-keys ()
309   (local-set-key "\ 3\10" 'mail-precedence-as-key)
310   (local-set-key "\ 3p" 'mail-precedence-as-key-send-and-exit))
311 (add-hook 'mail-mode-hook 'mail-mode-setup-keys)
312 (add-hook 'vm-mail-mode-hook 'mail-mode-setup-keys)
313 ;
314 (defun vm-mail-other-window ()
315   "Like `vm-mail' command, but display buffer in another window."
316   (interactive)
317   (switch-to-buffer-other-window (current-buffer))
318   (vm-mail))
319 ;
320 (defun mail-formletter ()
321   "Run VM-mail with ,Formletter"
322   (interactive)
323   (vm-mail)
324   (rename-buffer (generate-new-buffer-name "form letter") t)
325   (delete-region (point-min) (point-max))
326   (insert-file (concat vm-folder-directory ",Formletter")))
327 ;
328 ; This function bound to C-x C-z
329 (defun load-tramp ()
330   "Load tramp using require, if it isn't loaded already"
331   (interactive)
332   (message "Loading tramp...")
333   (require 'tramp) ; -extended
334   (message "Loading tramp...done"))
335 ;
336 ; This function bound to M-+
337 (defun toggle-truncate-lines ()
338   "Toggle truncation or folding of long lines"
339   (interactive)
340   (set-variable 'truncate-lines (not truncate-lines))
341   (redraw-display))
342 ;
343 ; RMAIL stuff
344 ;(setq rmail-file-name "~/mail/RMAIL"
345 ;      mail-archive-file-name "~/mail/Outbound"
346 ;      rmail-primary-inbox-list '("~/mbox" "~/mail/Outbound" "~/mail/Record"
347 ;                                 "~/mail/Import" "/var/spool/mail/ian")
348 ;      rmail-delete-after-output t
349 ;      rmail-last-rmail-file ""
350 ;      rmail-ignored-headers (concat
351 ;                             "^Content-Identifier:\\|^X400-[^O][A-Za-z-]+:\\|"
352 ;                             rmail-ignored-headers))
353 ;
354 (defun make-regexps-ignore-non-address (list)
355   (apply 'append (mapcar
356                   '(lambda (item)
357                      (let ((item (mapconcat
358                                   '(lambda (ch)
359                                      (let ((s (char-to-string ch)))
360                                        (if (string-match "[][.*+?^$\\]" s)
361                                            (concat "\\" s)
362                                          s)))
363                                   item "")))
364                        (list
365                         (concat "<" item ">")
366                         (concat "^" item " *\\((.*)\\)?$"))))
367                   list)))
368 ;
369 ; BBDB
370 (setq bbdb-north-american-phone-numbers-p nil
371       bbdb/mail-auto-create-p t
372       bbdb-auto-revert-p t
373       bbdb-notice-auto-save-file-p t
374       bbdb-message-caching-enabled t)      
375 ;
376 ; VM stuff
377 (if (file-exists-p "~/private/private.el")
378   (load-file "~/private/private.el"))
379 (if (file-exists-p "~/private/private2.el")
380   (load-file "~/private/private2.el"))
381 (setq vm-included-text-attribution-format "%F writes (\"%s\"):\n"
382       vm-reply-subject-prefix "Re: "
383       vm-folder-directory "~/mail/"
384       vm-delete-after-saving t
385       vm-delete-empty-folders t
386       vm-mutable-windows t
387       vm-auto-get-new-mail nil
388       vm-auto-next-message nil
389       vm-jump-to-new-messages nil
390       vm-jump-to-unread-messages nil
391       vm-auto-displayed-mime-content-types '("text" "multipart")
392       vm-mime-digest-discard-header-regexp "only-drop-this-header"
393       vm-preview-lines nil
394       vm-included-text-prefix "> "
395       vm-confirm-quit 1
396       vm-auto-center-summary t
397       vm-confirm-new-folders t
398       vm-circular-folders nil
399       vm-visit-when-saving 0
400       vm-move-after-deleting t
401       vm-keep-sent-messages t
402       vm-follow-summary-cursor t
403       vm-frame-per-composition nil
404       vm-frame-per-edit nil
405       vm-frame-per-summary nil
406       vm-frame-per-folder nil
407       vm-tale-is-an-idiot t
408       vm-primary-inbox (concat vm-folder-directory "INBOX")
409       vm-sinbin-inbox (concat vm-folder-directory "SINBOX")
410       vm-uninteresting-senders "ian"
411       vm-reply-ignored-addresses
412       (make-regexps-ignore-non-address
413        '("ian@chiark.chu.cam.ac.uk" "ian" "iwj10@cus.cam.ac.uk"
414          "ian@chiark.greenend.org.uk"
415          "ijackson@nyx.cs.du.edu" "ijackson@gnu.ai.mit.edu"))
416       vm-primary-inbox (concat vm-folder-directory "INBOX")
417
418       vm-uninteresting-senders "ian"
419       vm-reply-ignored-addresses
420       (make-regexps-ignore-non-address
421        '("ijackson@chiark.chu.cam.ac.uk" "ijackson"
422          "iwj10@thor.cam.ac.uk" "iwj10@hermes.cam.ac.uk" "iwj10@cl.cam.ac.uk"
423          "iwj10@cam.ac.uk" "Ian.Jackson@cl.cam.ac.uk"))
424       mail-archive-file-name "~/mail/Outbound"
425
426
427       vm-startup-with-summary t
428
429       user-mail-address "ijackson@chiark.greenend.org.uk"
430
431
432       vm-startup-with-summary nil
433       vm-summary-format "%3n %a %2d %3m  %-19.19F  %s\n"
434       mail-archive-file-name "~/mail/Outbound"
435       vm-mime-8bit-text-transfer-encoding '8bit)
436 ;
437 (add-hook 'vm-mode-hook
438           '(lambda ()
439              (local-set-key "Q" 'vm-quit)
440              (local-set-key "q" "###Q")))
441 ;(add-hook 'mail-mode-hook
442 ;          '(lambda ()
443 ;             (if (and (boundp 'folder-buffer)
444 ;                      folder-buffer
445 ;                      (string= (buffer-file-name folder-buffer)
446 ;                               (file-truename vm-sysadmin-inbox)))
447 ;                 (progn
448 ;                   (make-local-variable 'vm-mail-header-from)
449 ;                   (setq vm-mail-header-from
450 ;                         "sysadmin@chiark.greenend.org.uk (Ian Jackson)")
451 ;                   (make-local-variable 'mail-archive-file-name)
452 ;                   (setq mail-archive-file-name
453 ;                         "~/mail/SOutbound")))))
454 ;
455 ;;(defun vmi ()
456 ;  (interactive)
457 ;  (vm "/u/ijackson/mail/INBOX"))
458 ;;
459 ;(defun vms ()
460 ;  (interactive)
461 ;  (vm vm-sinbin-inbox))
462 ;
463 (defun make-session ()
464   "Makes this emacs hard to kill by requiring ^X^Cy to kill it
465 instead of just ^X^C."
466   (interactive)
467   (global-unset-key "\18\ 3")
468   (global-set-key "\18\ 3y" 'save-buffers-kill-emacs))
469 ;
470 ; Fix problems with M-| setting window title of emacs' parent xterm
471 ;(defun envdelete-term-termcap-windowid (list)
472 ;  (let ((l list))
473 ;    (mapcar '(lambda (x)
474 ;               (if x (delq x l)))
475 ;            (mapcar '(lambda (x)
476 ;                       (if (or (string-match "^TERM=" x)
477 ;                               (string-match "^TERMCAP=" x)
478 ;                               (string-match "^WINDOWID=" x))
479 ;                           x
480 ;                         nil))
481 ;                    l))
482 ;    l))
483 ;(setq process-environment
484 ;      (envdelete-term-termcap-windowid process-environment))
485 ;
486 (defun add-insertion-keys (table)
487   "Adds keybindings according to TABLE.  Each element of
488 TABLE should be a four-element list.
489
490 BINDING should be the key to bind; FUNCTION will be the name of the
491 function defined to do the insertion; DESCRIPTION will be inserted
492 into \"Inserts ... .\", and used as the descriptive string for the
493 generated function; STRING is the string which will actually be
494 inserted into the buffer when the keystroke is pressed."
495   (while table
496     (let* ((head (car table))
497            (key (car head))
498            (func (nth 1 head))
499            (desc (nth 2 head))
500            (string (nth 3 head)))
501       (defalias func
502         (list
503          'lambda () 
504          (concat "Inserts " desc ".")
505          '(interactive)
506          (list 'insert string)))
507       (funcall 'local-set-key key func))
508     (setq table (cdr table))))
509
510 (defun ian-sgml-setup ()
511   (interactive)
512   (add-insertion-keys
513    '(("\ 3\r" sgml-insert-new-para "new paragraph markup" "\n<p>\n")
514      ("\ 3\14" sgml-insert-tt-emph "tt emph markup" "<tt/")
515      ("\ 3\10" sgml-insert-prgn-emph "prgn emph markup" "<prgn/")
516      ("\ 3\ 5" sgml-insert-em-emph "em emfh markup" "<em/")
517      ("\ 3\16" sgml-insert-var-empfh "var emph markup" "<var/"))))
518 (setq sgml-local-catalogs '("/jura:/usr/lib/debiandoc-sgml/sgml/catalog"))
519   
520 (add-hook 'sgml-mode-hook 'ian-sgml-setup)
521 ;
522 (defvar cite-string "> " "String to insert when citing")
523 ;
524 (defun cite-region (start end)
525   "Quote each line in the region with an angle-bracket and space.
526
527 The citation string is taken from cite-string."
528   (interactive "r")
529   (save-excursion
530     (save-restriction
531       (narrow-to-region start end)
532       (goto-char (point-min))
533       (insert cite-string)
534       (while
535           (and
536            (= (forward-line) 0)
537            (> (point-max) (point)))
538         (insert cite-string)))))
539 ;
540 ;
541
542
543 ;; (defun hack-dir-local-variables ()
544 ;;   "Read per-directory local variables for the current buffer.
545 ;; Store the directory-local variables in `dir-local-variables-alist'
546 ;; and `file-local-variables-alist', without applying them."
547 ;;   (when (and enable-local-variables
548 ;;           (buffer-file-name))
549 ;;     ;; Find the variables file.
550 ;;     (let ((variables-file (dir-locals-find-file (buffer-file-name)))
551 ;;        (class nil)
552 ;;        (dir-name nil))
553 ;;       (cond
554 ;;        ((stringp variables-file)
555 ;;      (setq dir-name (file-name-directory (buffer-file-name)))
556 ;;      (setq class (dir-locals-read-from-file variables-file)))
557 ;;        ((consp variables-file)
558 ;;      (setq dir-name (nth 0 variables-file))
559 ;;      (setq class (nth 1 variables-file))))
560 ;;       (when class
561 ;;      (let ((variables
562 ;;             (dir-locals-collect-variables
563 ;;              (dir-locals-get-class-variables class) dir-name nil)))
564 ;;        (when variables
565 ;;          (dolist (elt variables)
566 ;;            (unless (memq (car elt) '(eval mode))
567 ;;              (setq dir-local-variables-alist
568 ;;                    (assq-delete-all (car elt) dir-local-variables-alist)))
569 ;;            (push elt dir-local-variables-alist))
570 ;;          (hack-local-variables-filter variables dir-name)))))))
571
572 (delete ".git/" completion-ignored-extensions)
573
574 ; End of this file.