mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Make enable-var and exc-var to customizations in doom-modeline-def-env.
This commit is contained in:
parent
bb3f24c375
commit
bdbf45e690
1 changed files with 8 additions and 4 deletions
|
@ -143,17 +143,21 @@ PARSER should be a function for parsing COMMAND's output line-by-line, to
|
||||||
(parser-var (intern (format "doom-modeline-env-%s-parser-fn" name)))
|
(parser-var (intern (format "doom-modeline-env-%s-parser-fn" name)))
|
||||||
(exe-var (intern (format "doom-modeline-env-%s-executable" name))))
|
(exe-var (intern (format "doom-modeline-env-%s-executable" name))))
|
||||||
(macroexp-progn
|
(macroexp-progn
|
||||||
`((defvar ,enable-var t
|
`((defcustom ,enable-var t
|
||||||
(format "Whether to display the version string for %s buffers." ',name))
|
(format "Whether to display the version string for %s buffers." ',name)
|
||||||
|
:type 'boolean
|
||||||
|
:group 'doom-modeline-env)
|
||||||
(defvar ,command-var ',action-fn
|
(defvar ,command-var ',action-fn
|
||||||
(concat "A function that returns the shell command and arguments (as a list) to\n"
|
(concat "A function that returns the shell command and arguments (as a list) to\n"
|
||||||
"produce a version string."))
|
"produce a version string."))
|
||||||
(defvar ,parser-var ',parse-fn
|
(defvar ,parser-var ',parse-fn
|
||||||
(format "The function for parsing each line of `%s's output." ',command-var))
|
(format "The function for parsing each line of `%s's output." ',command-var))
|
||||||
(defvar ,exe-var nil
|
(defcustom ,exe-var nil
|
||||||
(format (concat "What executable to use for the version indicator in %s buffers.\n\n"
|
(format (concat "What executable to use for the version indicator in %s buffers.\n\n"
|
||||||
"If nil, the default binary for this language is used.")
|
"If nil, the default binary for this language is used.")
|
||||||
',name))
|
',name)
|
||||||
|
:type 'string
|
||||||
|
:group 'doom-modeline-env)
|
||||||
(defalias ',parse-fn ,parser
|
(defalias ',parse-fn ,parser
|
||||||
(format "The line parser for %s buffers.\n\nUsed by `%s'."
|
(format "The line parser for %s buffers.\n\nUsed by `%s'."
|
||||||
',name ',update-fn))
|
',name ',update-fn))
|
||||||
|
|
Loading…
Reference in a new issue