Skip to content

Commit

Permalink
tweak(core): better hook documentation in +make-first-file-hook!
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 20, 2024
1 parent 06f7123 commit a32eb79
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/me-lib.el
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,12 @@ EXT-REGEXP. When it runs, this function provides a feature named
(fn-name (intern (format "+first-%s-file:after-a" (if filetype (format "-%s" filetype) ""))))
(hook-name (intern (format "minemacs-first%s-file-hook" (if filetype (format "-%s" filetype) ""))))
(feature-name (intern (format "minemacs-first%s-file" (if filetype (format "-%s" filetype) ""))))
(hook-docs (format "This hook will be run after opening the first %s file (files that matches \"%s\").
(hook-docs (format "This hook will be run before opening the first %s file.
Applies to files that matches %S.
Executed before `find-file-noselect', it runs all hooks in `%s' and provide the `%s' feature."
filetype ext-regexp hook-name feature-name)))
(or filetype "") (eval ext-regexp) hook-name feature-name)))
`(progn
(+log! "Setting up hook `%s' -- function `%s' -- feature `%s'." ',hook-name ',fn-name ',feature-name)
(defcustom ,hook-name nil ,hook-docs :group 'minemacs-core :type 'hook)
Expand Down

0 comments on commit a32eb79

Please sign in to comment.