dev: updating from latest pr7002

This commit is contained in:
Matt Nish-Lapidus 2024-02-03 11:07:29 -05:00
commit 8d9ec314f4
3 changed files with 22 additions and 16 deletions

View file

@ -379,6 +379,7 @@ as `+emacs-lisp-non-package-mode' will enable it and disable the other checkers.
,(read (default-toplevel-value 'flycheck-emacs-lisp-check-form))))
flycheck-disabled-checkers (cons 'emacs-lisp-checkdoc
flycheck-disabled-checkers))))
;;;###autoload
(define-minor-mode +emacs-lisp-non-package-mode
"Reduce flycheck/flymake verbosity where it is appropriate.
@ -394,15 +395,19 @@ This generally applies to your private config (`doom-user-dir') or Doom's source
:since "3.0.0"
(unless (and (or (bound-and-true-p flycheck-mode)
(bound-and-true-p flymake-mode))
(derived-mode-p 'emacs-lisp-mode)
(not (+emacs-lisp--in-package-buffer-p)))
(setq +emacs-lisp-non-package-mode nil))
(when (derived-mode-p 'emacs-lisp-mode)
(add-hook 'after-save-hook #'+emacs-lisp-non-package-mode nil t))
(let ((toggle (if +emacs-lisp-non-package-mode +1 -1)))
(cond ((modulep! :checkers syntax +flymake)
(+emacs-lisp--flymake-non-package-mode toggle))
((modulep! :checkers syntax)
(+emacs-lisp--flycheck-non-package-mode toggle)))))
(when-let ((modesym (cond ((modulep! :checkers syntax +flymake)
#'+emacs-lisp--flymake-non-package-mode)
((modulep! :checkers syntax)
#'+emacs-lisp--flycheck-non-package-mode))))
(if (not +emacs-lisp-non-package-mode)
(when (symbol-value modesym)
(funcall modesym -1))
(when (derived-mode-p 'emacs-lisp-mode)
(add-hook 'after-save-hook #'+emacs-lisp-non-package-mode nil t))
(funcall modesym +1))))
;;

View file

@ -95,10 +95,11 @@ See `+emacs-lisp-non-package-mode' for details.")
;; Ensure straight sees modifications to installed packages
#'+emacs-lisp-init-straight-maybe-h)
;; UX: Both Flycheck's and Flymake's two
;; emacs-lisp checkers produce a *lot* of false positives in non-packages
;; (like Emacs configs or elisp scripts), so I disable `checkdoc' (`emacs-lisp-checkdoc', `elisp-flymake-checkdoc')
;; and set `byte-compile-warnings' to a subset that makes more sense (see `+emacs-lisp-linter-warnings')
;; UX: Both Flycheck's and Flymake's two emacs-lisp checkers produce a *lot*
;; of false positives in non-packages (like Emacs configs or elisp
;; scripts), so I disable `checkdoc' (`emacs-lisp-checkdoc',
;; `elisp-flymake-checkdoc') and set `byte-compile-warnings' to a subset
;; that makes more sense (see `+emacs-lisp-linter-warnings')
(add-hook! '(flycheck-mode-hook flymake-mode-hook) #'+emacs-lisp-non-package-mode)
(defadvice! +syntax--fix-elisp-flymake-load-path (orig-fn &rest args)

View file

@ -8,13 +8,13 @@
;; Tools
(package! macrostep :pin "0b04a89f698c335c9ea492553470a8d45c113edd")
(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789")
(package! elisp-def :pin "1d2e88a232ec16bce036b49577c4d4d96035f9f7")
(package! elisp-demos :pin "8d0cd806b109076e6c4383edf59dbab9435dc5dc")
(package! overseer :pin "7fdcf1a6fba6b1569a09c1666b4e51bcde266ed9")
(package! elisp-def :pin "1ad4baccbf3d0d13e7607d332ae6bc60a5dd7360")
(package! elisp-demos :pin "1a108d1c5011f9ced58be2ca98bea1fbd4130a2f")
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! flycheck-package :pin "3a6aaed29ff61418c48c0251e1432c30748ae739")
(package! flycheck-package :pin "75efa098cf17dc14c363e2ca9b68afdac7766b5b")
(package! flycheck-cask :pin "4b2ede6362ded4a45678dfbef1876faa42edbd58"))
;; Libraries
(package! buttercup :pin "30c703d215b075aaede936a2c424f65b5f7b6391")
(package! buttercup :pin "24d43b2ce262faf59e5ff9f72466efb293aa6154")