Applying changes to outline-minor-mode-highlight

53 Views Asked by At

I want to change the display of outline-minor-mode-highlight but the settings are not taking effect unless I disable outline-minor-mode and enable it again. How can I change this code so that the changes are applied automatically ?

(defvar hkfocus-setting 3)

(defun hkfocus ()
   "todo"
   (interactive)

   (pcase hkfocus-setting
     (1
        ;; No highlighting
        (setq outline-minor-mode-highlight nil)
        (setq hkfocus-setting 2))
     (2
        ;; Highlight separately from major mode
        ;; Works when headings do not conflict with major-mode
        (setq outline-minor-mode-highlight t)
        (setq hkfocus-setting 3))
     (3
        ;; Append heading typeface to major mode
        (setq outline-minor-mode-highlight 'append)
        (setq hkfocus-setting 4))
     (4
        ;; Overwrite major mode faces
        (setq outline-minor-mode-highlight 'override)
        (setq hkfocus-setting 1)) ))
0

There are 0 best solutions below