summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-10-07 18:23:30 -0500
committerCase Duckworth2021-10-07 18:23:30 -0500
commita16bbf55839713e00c0867617152b22adaf0c353 (patch)
treeef50dc1a9cda7fab496a5eaf88f2e4001e21c68c /init.el
parentHide everything but the current headline in org-mode (diff)
downloademacs-a16bbf55839713e00c0867617152b22adaf0c353.tar.gz
emacs-a16bbf55839713e00c0867617152b22adaf0c353.zip
Figure out flymake-inhibiting after reading local variables
Diffstat (limited to 'init.el')
-rw-r--r--init.el22
1 files changed, 15 insertions, 7 deletions
diff --git a/init.el b/init.el index 4eb5e3f..d3b05c8 100644 --- a/init.el +++ b/init.el
@@ -547,13 +547,21 @@ specific to most general, they are these:
547- `flymake-inhibit-major-modes': a list of major-modes in which 547- `flymake-inhibit-major-modes': a list of major-modes in which
548 to inhibit `flymake-mode'. Really only useful if you want to 548 to inhibit `flymake-mode'. Really only useful if you want to
549 generally add `flymake-mode' to `prog-mode-hook'." 549 generally add `flymake-mode' to `prog-mode-hook'."
550 (unless (or (bound-and-true-p flymake-inhibit) ; file-local variable 550 ;; The name of this hook tells you pretty much everything you need to know
551 (list-string-match-p (buffer-name) 551 ;; for this little thing right here.
552 flymake-inhibit-buffer-name-regexps) 552 (add-hook 'hack-local-variables-hook
553 (list-string-match-p (buffer-file-name) 553 (defun flymake-unless@hack-local-variables ()
554 flymake-inhibit-file-name-regexps) 554 (unless (or (cdr (assoc 'flymake-inhibit
555 (apply #'derived-mode-p flymake-inhibit-major-modes)) 555 file-local-variables-alist))
556 (flymake-mode-on))) 556 (list-string-match-p
557 (buffer-name)
558 flymake-inhibit-buffer-name-regexps)
559 (list-string-match-p
560 (buffer-file-name)
561 flymake-inhibit-file-name-regexps)
562 (apply #'derived-mode-p
563 flymake-inhibit-major-modes))
564 (flymake-mode-on)))))
557 565
558 (add-hook 'prog-mode-hook #'flymake-unless) 566 (add-hook 'prog-mode-hook #'flymake-unless)
559 567