-
-
Notifications
You must be signed in to change notification settings - Fork 18
Home
I have written a few mode-line packages:
-
moody
Tabs and ribbons for the mode line -
minions
A minor-mode menu for the mode line -
mode-line-debug
Show debug variables in the mode line -
keycast
Show current command and its key in the mode line
While I'll try to keep this list up-to-date, I might forget to do so, in which case you might find this query useful.
minion
's wiki has some information about compatibility with other
mode-line related packages, which also applies to moody
and the other packages
in the above list. Please read that now.
If the problem indeed is that the mode-line-format
element, that Moody wants
to replaced with its own element, is missing, then you have to write your own
function that replaces the element that is actually there instead.
Here is how Moody replaces the element (vc-mode vc-mode)
:
(defvar-local moody-vc-mode
'(:eval (moody-ribbon (substring vc-mode 1) nil 'up)))
(put 'moody-vc-mode 'risky-local-variable t)
;;;###autoload
(defun moody-replace-vc-mode (&optional restore)
"Use moody's variant of `vc-mode' mode-line element.
If optional RESTORE is true, then go back to the default.
If called interactively, then toggle between the variants."
(interactive (list (moody-format-find 'moody-vc-mode)))
(moody-replace-element '(vc-mode vc-mode)
'(vc-mode moody-vc-mode)
restore))
Copy and rename that and adjust it to look for the appropriate element. Some
mode-line packages replace most of the elements of mode-line-format
with only
two or three elements, which in turn are variables whose values have the same
form as mode-line-format
. In that case you have to pass the name of that
variable (a symbol) as the forth argument of moody-replace-element
and
the value of that variable as the second argument of moody-format-find
.