aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/elisp-mode.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 516e4f9cd63..7705761365c 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -256,8 +256,20 @@ Blank lines separate paragraphs. Semicolons start comments.
256 (setq-local project-vc-external-roots-function #'elisp-load-path-roots) 256 (setq-local project-vc-external-roots-function #'elisp-load-path-roots)
257 (add-hook 'completion-at-point-functions 257 (add-hook 'completion-at-point-functions
258 #'elisp-completion-at-point nil 'local) 258 #'elisp-completion-at-point nil 'local)
259 (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t) 259 ;; .dir-locals.el and lock files will cause the byte-compiler and
260 (add-hook 'flymake-diagnostic-functions #'elisp-flymake-byte-compile nil t)) 260 ;; checkdoc emit spurious warnings, because they don't follow the
261 ;; conventions of Emacs Lisp sources. Until we have a better fix,
262 ;; like teaching elisp-mode about files that only hold data
263 ;; structures, we disable the ELisp Flymake backend for these files.
264 (unless
265 (let* ((bfname (buffer-file-name))
266 (fname (and (stringp bfname) (file-name-nondirectory bfname))))
267 (or (not (stringp fname))
268 (string-match "\\`\\.#" fname)
269 (string-equal dir-locals-file fname)))
270 (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
271 (add-hook 'flymake-diagnostic-functions
272 #'elisp-flymake-byte-compile nil t)))
261 273
262;; Font-locking support. 274;; Font-locking support.
263 275