* Applying changes to outline-minor-mode-highlight
@ 2023-06-14 14:24 Heime
2023-06-14 15:40 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2023-06-14 14:24 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
To change the highlighting of headings one changes the value 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 (setq outline-minor-mode-highlight nil)
(setq hkfocus-setting 2))
(2 (setq outline-minor-mode-highlight t))
(3 (setq outline-minor-mode-highlight 'append))
(4 (setq outline-minor-mode-highlight 'override)) ))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Applying changes to outline-minor-mode-highlight
2023-06-14 14:24 Applying changes to outline-minor-mode-highlight Heime
@ 2023-06-14 15:40 ` Eli Zaretskii
2023-06-14 16:04 ` Heime
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-06-14 15:40 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Wed, 14 Jun 2023 14:24:05 +0000
> From: Heime <heimeborgia@protonmail.com>
>
> To change the highlighting of headings one changes the value 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 (setq outline-minor-mode-highlight nil)
> (setq hkfocus-setting 2))
> (2 (setq outline-minor-mode-highlight t))
> (3 (setq outline-minor-mode-highlight 'append))
> (4 (setq outline-minor-mode-highlight 'override)) ))
Try calling font-lock-flush.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Applying changes to outline-minor-mode-highlight
2023-06-14 15:40 ` Eli Zaretskii
@ 2023-06-14 16:04 ` Heime
2023-06-14 16:10 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2023-06-14 16:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
------- Original Message -------
On Thursday, June 15th, 2023 at 3:40 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Wed, 14 Jun 2023 14:24:05 +0000
> > From: Heime heimeborgia@protonmail.com
> >
> > To change the highlighting of headings one changes the value 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 (setq outline-minor-mode-highlight nil)
> > (setq hkfocus-setting 2))
> > (2 (setq outline-minor-mode-highlight t))
> > (3 (setq outline-minor-mode-highlight 'append))
> > (4 (setq outline-minor-mode-highlight 'override)) ))
>
>
> Try calling font-lock-flush.
Would I just call (font-lock-flush) after the pcase ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Applying changes to outline-minor-mode-highlight
2023-06-14 16:04 ` Heime
@ 2023-06-14 16:10 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-06-14 16:10 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Wed, 14 Jun 2023 16:04:29 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
>
> On Thursday, June 15th, 2023 at 3:40 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>
> > > Date: Wed, 14 Jun 2023 14:24:05 +0000
> > > From: Heime heimeborgia@protonmail.com
> > >
> > > To change the highlighting of headings one changes the value 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 (setq outline-minor-mode-highlight nil)
> > > (setq hkfocus-setting 2))
> > > (2 (setq outline-minor-mode-highlight t))
> > > (3 (setq outline-minor-mode-highlight 'append))
> > > (4 (setq outline-minor-mode-highlight 'override)) ))
> >
> >
> > Try calling font-lock-flush.
>
> Would I just call (font-lock-flush) after the pcase ?
Yes, that's what I meant.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-14 16:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 14:24 Applying changes to outline-minor-mode-highlight Heime
2023-06-14 15:40 ` Eli Zaretskii
2023-06-14 16:04 ` Heime
2023-06-14 16:10 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.