I modified my mode-line, but now which-function-mode
stopped working: nothing is displayed. Code:
(setq mode-line-position
(list '(:eval (propertize "L%l " 'face nil 'help-echo "Line number"))
'(:eval (propertize "C%C " 'face nil 'help-echo "Column number"))
(list -3 (propertize "%P" 'face nil 'help-echo "Position in buffer"))
'(:eval (when (buffer-file-name)
(propertize " %I" 'face 'font-lock-variable-name-face
'help-echo "Buffer size")))))
(setq mode-line-modified
(list '(:eval (propertize "%*" 'face nil 'help-echo
"Buffer read-only and modification indicator"))
'(:eval (propertize "%+" 'face nil 'help-echo
"Buffer read-only and modification indicator"))))
(setq mode-line-buffer-identification
(list '(:eval (propertize "%12b" 'face 'mode-line-buffer-id
'help-echo default-directory))))
(setq-default mode-line-format
(list "%e"
mode-line-position " "
mode-line-modified " "
mode-line-buffer-identification " "
mode-line-modes " "
mode-line-misc-info
))
(which-function-mode)
which-function-mode
uses mode-line-misc-info
, which I did not modify.
Its value is
((which-function-mode
(which-func-mode
(#1="" which-func-format " ")))
(global-mode-string
(#1# global-mode-string " ")))
Why isn't it showing anything then? (Nothing is displayed if Emacs is started with this code as ~/.emacs
.)