diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-04-15 16:50:17 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-04-15 16:50:17 -0400 |
commit | c0c57f8b36d4472296f9bc237a16b9876488472c (patch) | |
tree | 12cb956e9134fd8567991c2e8502e0c7f2ae9ea0 /lisp/emacs-lisp/lisp-mode.el | |
parent | 59fd76c178ada8a8b3eb5e3e00609001e9f0195f (diff) | |
download | emacs-c0c57f8b36d4472296f9bc237a16b9876488472c.tar.gz |
Move some Elisp-specific code from lisp-mode.el to elisp-mode.el
* lisp/emacs-lisp/lisp-mode.el (lisp--el-font-lock-flush-elisp-buffers):
Move to elisp-mode.el.
(lisp-mode-variables): (Re)move elisp-specific settings.
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add settings removed
from lisp-mode-variables.
(elisp--font-lock-flush-elisp-buffers): New function, moved from
lisp-mode.el.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 45d5a0b410c..26a21d52370 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -218,6 +218,7 @@ (< (point) pos)))))))))) (defun lisp--el-match-keyword (limit) + ;; FIXME: Move to elisp-mode.el. (catch 'found (while (re-search-forward "(\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>" limit t) (let ((sym (intern-soft (match-string 1)))) @@ -228,17 +229,6 @@ (match-beginning 0))))) (throw 'found t)))))) -(defun lisp--el-font-lock-flush-elisp-buffers (&optional file) - ;; Don't flush during load unless called from after-load-functions. - ;; In that case, FILE is non-nil. It's somehow strange that - ;; load-in-progress is t when an after-load-function is called since - ;; that should run *after* the load... - (when (or (not load-in-progress) file) - (dolist (buf (buffer-list)) - (with-current-buffer buf - (when (derived-mode-p 'emacs-lisp-mode) - (font-lock-flush)))))) - (pcase-let ((`(,vdefs ,tdefs ,el-defs-re ,cl-defs-re @@ -583,10 +573,6 @@ font-lock keywords will not be case sensitive." (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function))) (setq-local prettify-symbols-alist lisp--prettify-symbols-alist) - (when elisp - (add-hook 'after-load-functions #'lisp--el-font-lock-flush-elisp-buffers) - (setq-local electric-pair-text-pairs - (cons '(?\` . ?\') electric-pair-text-pairs))) (setq-local electric-pair-skip-whitespace 'chomp) (setq-local electric-pair-open-newline-between-pairs nil)) |