From: Andreas Matthias <andreas.matthias@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 74156@debbugs.gnu.org
Subject: bug#74156: 29.4; Incorrect face with outline-minor-mode-highlight in lisp-mode
Date: Sun, 3 Nov 2024 00:40:46 +0100 [thread overview]
Message-ID: <CAHp59H3fwRN6N+btUwKQug3aQnGTskDAZXs87=ZFfTO9gE+D0Q@mail.gmail.com> (raw)
In-Reply-To: <865xp5o8x1.fsf@mail.linkov.net>
On Sat, Nov 2, 2024 at 6:16 PM Juri Linkov <juri@linkov.net> wrote:
>
> > I guess this is due to the definition of outline-regexp in lisp-mode.el:
> >
> > ";;;;* [^ \t\n]\\|(\\|\\(^;;;###\\(\\([-[:alnum:]]+?\\)-\\)?\\
> > (autoload\\)\\)"
[...]
> Isn't the face 'outline-8' because 'lisp-outline-level' returns
> the level 1000 for the opening parenthesis in 'lisp-outline-level':
>
> (defun lisp-outline-level ()
> (let ((len (- (match-end 0) (match-beginning 0))))
> (cond ((or (looking-at-p "(")
> (looking-at-p lisp-mode-autoload-regexp))
> 1000)
AFAIU font-lock is using `outline-regexp` which triggers
`outline-font-lock-face()`
and eventually `lisp-outline-level()`.
My naive approach was to modify `outline-regexp`, i.e. remove the
opening parenthesis
in the regexp. Then `outline-font-lock-face()` cannot be triggered by
this regexp any more
and thus won't override the faces of normal lisp code.
The issue with this approach is: All commands that show, hide, or move to
outline headings use `outline-regexp` as well. Thus these commands won't
find headings starting with an opening parenthesis.
I don't know how important this opening-parenthesis-rule is. Actually I don't
need it. But I guess there were reasons to add it to the regexp.
Andreas
next prev parent reply other threads:[~2024-11-02 23:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 13:11 bug#74156: 29.4; Incorrect face with outline-minor-mode-highlight in lisp-mode Andreas Matthias
2024-11-02 17:14 ` Juri Linkov
2024-11-02 23:40 ` Andreas Matthias [this message]
2024-11-03 17:54 ` Juri Linkov
2024-11-03 18:25 ` Andreas Matthias
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHp59H3fwRN6N+btUwKQug3aQnGTskDAZXs87=ZFfTO9gE+D0Q@mail.gmail.com' \
--to=andreas.matthias@gmail.com \
--cc=74156@debbugs.gnu.org \
--cc=juri@linkov.net \
/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.
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.