`doom/help-modules': C-u -> browse directory

If called with a C-u prefix, `doom/help-modules' now browses the module's
directory instead of opening its documentation. This exposes the VISIT-DIR
argument to `interactive' use.
This commit is contained in:
Nikita Bloshchanevich 2020-12-12 12:34:32 +01:00
parent 1fba2ea303
commit 0d330f7a7e

View file

@ -351,13 +351,15 @@ module derived from a `featurep!' or `require!' call, c) the module that the
current file is in, or d) the module associated with the current major mode (see current file is in, or d) the module associated with the current major mode (see
`doom--help-major-mode-module-alist')." `doom--help-major-mode-module-alist')."
(interactive (interactive
(nconc
(mapcar #'intern (mapcar #'intern
(split-string (split-string
(completing-read "Describe module: " (completing-read "Describe module: "
(doom--help-modules-list) (doom--help-modules-list)
nil t nil nil nil t nil nil
(doom--help-current-module-str)) (doom--help-current-module-str))
" " t))) " " t))
(list current-prefix-arg)))
(cl-check-type category symbol) (cl-check-type category symbol)
(cl-check-type module symbol) (cl-check-type module symbol)
(cl-destructuring-bind (module-string path) (cl-destructuring-bind (module-string path)