GNU bug report logs -
#74156
29.4; Incorrect face with outline-minor-mode-highlight in lisp-mode
Previous Next
Full log
View this message in rfc822 format
On Sat, Nov 2, 2024 at 6:16 PM Juri Linkov <juri <at> 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
This bug report was last modified 283 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.