https://github.com/rocktakey/flymake-elisp-config
Setup load-path for flymake on Emacs Lisp mode
https://github.com/rocktakey/flymake-elisp-config
Last synced: 2 months ago
JSON representation
Setup load-path for flymake on Emacs Lisp mode
- Host: GitHub
- URL: https://github.com/rocktakey/flymake-elisp-config
- Owner: ROCKTAKEY
- License: gpl-3.0
- Created: 2022-10-28T15:41:48.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T18:33:33.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T12:29:58.163Z (4 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 71.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
[[https://github.com/ROCKTAKEY/flymake-elisp-config][https://img.shields.io/github/tag/ROCKTAKEY/flymake-elisp-config.svg?style=flat-square]]
[[file:LICENSE][https://img.shields.io/github/license/ROCKTAKEY/flymake-elisp-config.svg?style=flat-square]]
[[https://codecov.io/gh/ROCKTAKEY/flymake-elisp-config?branch=master][https://img.shields.io/codecov/c/github/ROCKTAKEY/flymake-elisp-config.svg?style=flat-square]]
[[https://github.com/ROCKTAKEY/flymake-elisp-config/actions][https://img.shields.io/github/workflow/status/ROCKTAKEY/flymake-elisp-config/test/master.svg?style=flat-square]]
* flymake-elisp-config: Setup =load-path= for flymake on Emacs Lisp mode
Default =load-path= for flymake on Emacs Lisp mode can be set through =elisp-flymake-byte-compile-load-path=,
but it is just a global variable. When you are editing init.el, flymake should use all the =load-path=.
When you update some packages, =load-path= also should be updated.
When you are editing your package, flymake should use paths provided by cask or keg.This package provides three features:
- Customizable variable =flymake-elisp-config-load-path-getter=, which is a =FUNCTION= returning =load-path= for flymake.
- Automatic setting of =load-path= for flymake by =flymake-elisp-config-auto-mode=.
- Manual setting of it by configurers named =flymake-elisp-config-as-*=.* How to Use?
Just write in init.el:
#+begin_src emacs-lisp :tangle yes
;; Make `load-path' for flymake customizable through `flymake-elisp-config-load-path-getter'.
(flymake-elisp-config-global-mode)
;; Automatically set `load-path' for flymake.
(flymake-elisp-config-auto-mode)
#+end_srcIf automatical setting is wrong, you can use =flymake-elisp-config-as-*= commands to change =load-path= for flymake manually.
- =flymake-elisp-config-as-config= :: Emacs configuration file such as init.el
- =flymake-elisp-config-as-keg= :: Emacs Lisp project managed by =keg=.
- =flymake-elisp-config-as-cask= :: Emacs Lisp project managed by =cask=.
- =flymake-elisp-config-as-default= :: Default Emacs Lisp file. It uses same =load-path= as default flymake.* Add configurer
When you want to use another =load-path= getter, you can define =configurer=.
It can be achived by three steps:
1. Define predicate
2. Define configurer
3. Register to =flymake-elisp-config-auto-configurer-alist=** Define predicate
Define predicate function, which takes =BUFFER= as an argument,
and which return =non-nil= only when =flymake= should use your new configurer.** Define configurer
Define configurer function, which takes =BUFFER= as an argument,
and which sets =flymake-elisp-config-load-path-getter= in =BUFFER=.The value of =flymake-elisp-config-load-path-getter= should be a function
which takes =BUFFER= as an argument, and returns list of path, like =load-path=,
which is used by =flymake= on =BUFFER=.* License
This package is licensed by GPLv3. See [[file:LICENSE][LICENSE]].