Emacs: Fix file completion setup for Emacs Lisp

master
Pierre Neidhardt 2017-11-02 16:47:41 +01:00
parent 1c847ace2b
commit 0d01943ed1
2 changed files with 5 additions and 1 deletions

View File

@ -183,10 +183,10 @@
;;; Lisp
(dolist (hook '(lisp-mode-hook emacs-lisp-mode-hook))
(add-hook hook 'turn-on-fmt-before-save)
(add-hook hook 'turn-on-complete-filename)
(add-hook hook 'turn-on-tab-width-to-8) ; Because some existing code uses tabs.
(add-hook hook 'turn-off-indent-tabs)) ; Should not use tabs.
(define-key lisp-mode-shared-map (kbd "M-.") 'find-symbol-at-point)
(setq-mode-local emacs-lisp-mode completion-at-point-functions '(elisp-completion-at-point comint-dynamic-complete-filename t))
;;; Common LISP
(setq inferior-lisp-program "clisp")

View File

@ -493,6 +493,10 @@ This does not interfere with `subword-mode'."
"Unconditionally turn on `column-number-mode' for the current buffer."
(set (make-variable-buffer-local 'column-number-mode) t))
(defun turn-on-complete-filename ()
"Unconditionally turn on `comint-dynamic-complete-filename' for the current buffer."
(add-to-list 'completion-at-point-functions 'comint-dynamic-complete-filename))
(defun turn-on-delete-trailing-whitespace ()
"Add the `delete-trailing-whitespace' function to `before-save-hook'.
This does not affect .csv files."