The intention of the following code is to toggle the display of the mode-line when called repeatedly. Although the mode-line is removed when first called, the mode-line does not show up again. I want the function to toggle the mode-line properly.
(defvar-local ramona-mode-line-rflog nil "Toggle switch for mode-line display.") (defun ramona-mode-line () "TODO." (interactive) (setq-local mode-line-format (if ramona-mode-line-rflog (progn (setq mode-line-format ramona-mode-line-rflog) (setq ramona-mode-line-rflog nil)) (setq ramona-mode-line-rflog mode-line-format) (setq mode-line-format nil))) (force-mode-line-update t))
mode-line-formatinside theifand then you are setting it again to the result of theif. Lose the outersetq-local: just keep theif.