unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: uzibalqa <uzibalqa@proton.me>
To: Heime <heimeborgia@protonmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
Subject: Re: Changing highlight colours of headings when using outline-minor-mode
Date: Fri, 16 Jun 2023 16:09:38 +0000	[thread overview]
Message-ID: <sUS-n_A6TbscIfNo5ODuMULJu2mcPuYaS70e3HPzXS6g-eBxh2FD3Q8BThViKYY5CpM2iRpP6fFipzjd4yFgtnPNmNwHLiGXPQE4I_NH79k=@proton.me> (raw)
In-Reply-To: <r6hc25iXXdmfeODYRqcgg5P9YcufgpRzOsK2h8l1YxZ3F2biA5zL23Kcg4uvSE7VHRipF2SCpt838r-xLDYTxrwZzJLO12WU0Cc42zxQghA=@protonmail.com>


> > ------- Original Message -------
> > On Thursday, June 15th, 2023 at 5:06 AM, Eli Zaretskii eliz@gnu.org wrote:
> > 
> > > > Date: Wed, 14 Jun 2023 16:13:26 +0000
> > > > From: Heime heimeborgia@protonmail.com
> > > > 
> > > > I want to change highlight foreground colours of headings to be more vibrant when using outline-minor-mode
> > > > How can the colour levels be changed ?
> > > 
> > > By customizing the relevant faces.
> > 
> > Right, but I am looking to customise them via the construction of an elisp function.
> > But I do not know how the specific function would like.
 
I have added BEG and END to outline-map-region and finished with (font-lock-flush)
but the changes are not taking effect.
 

(defun tematika-heading-tyface ()
  "Set annunciator lights for headings in `outline-minor-mode'."
  (interactive)

  (let ( (beg (point-min))
         (end (point-max)) )

    (outline-map-region

     (lambda ()
       (let* ( ($hglevl (funcall outline-level))
               ($tyface (cond
                         ((= $hglevl 1) '(:foreground "red"))
                         ((= $hglevl 2) '(:foreground "blue"))
                         ((= $hglevl 3) '(:foreground "green"))
                         (t '(:foreground "white")))) )
         ;;--------------------------
         (when (looking-at outline-regexp)
           (put-text-property (point-at-bol) (point-at-eol)
                              '$tyface $tyface))))

     beg end)

    (font-lock-flush)))





  reply	other threads:[~2023-06-16 16:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 16:13 Changing highlight colours of headings when using outline-minor-mode Heime
2023-06-14 17:06 ` Eli Zaretskii
2023-06-14 23:20   ` Heime
2023-06-14 23:38     ` Heime
2023-06-16 16:09       ` uzibalqa [this message]
2023-06-16 17:03   ` uzibalqa
2023-06-16 18:01     ` Eli Zaretskii
2023-06-16 18:37       ` uzibalqa
2023-06-16 19:12         ` Bruno Barbier
2023-06-16 19:34           ` uzibalqa
2023-06-16 19:55             ` Bruno Barbier
2023-06-16 20:05               ` uzibalqa
2023-06-16 20:15               ` uzibalqa
2023-06-16 21:57                 ` [External] : " Drew Adams
2023-06-16 22:18                   ` uzibalqa
2023-06-16 22:39                     ` uzibalqa
2023-06-17  5:41         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='sUS-n_A6TbscIfNo5ODuMULJu2mcPuYaS70e3HPzXS6g-eBxh2FD3Q8BThViKYY5CpM2iRpP6fFipzjd4yFgtnPNmNwHLiGXPQE4I_NH79k=@proton.me' \
    --to=uzibalqa@proton.me \
    --cc=eliz@gnu.org \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).