GNU bug report logs -
#74156
29.4; Incorrect face with outline-minor-mode-highlight in lisp-mode
Previous Next
Full log
Message #8 received at 74156 <at> debbugs.gnu.org (full text, mbox):
> Take this example Elisp file:
>
> ;;; xxx -- OK: face is outline-1
> ;;;; xxx -- OK: face is outline-2
> (defun test ()) ; WRONG: face is outline-8
>
> ;; Local Variables:
> ;; outline-minor-mode-highlight: override
> ;; eval: (outline-minor-mode 1)
> ;; End:
>
> After loading this file into Emacs you will see that the function
> definition
> is displayed incorrectly in face outline-8.
>
> I guess this is due to the definition of outline-regexp in lisp-mode.el:
>
> ";;;;* [^ \t\n]\\|(\\|\\(^;;;###\\(\\([-[:alnum:]]+?\\)-\\)?\\
> (autoload\\)\\)"
>
> Notice the opening parenthesis in the regular expression that causes
> the function definition to be recognized as an outline heading.
>
> I removed the opening parenthesis and now the face of the function
> definition
> is correct. This is fine for me. But note that you loose the ability to
> move
> to top-level expressions, like this function definition, with
> (outline-next-visible-heading) and (outline-previous-visible-heading).
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)
The level 1000 corresponds to outline-8:
Level 1 - outline-1
Level 2 - outline-2
Level 3 - outline-3
Level 4 - outline-4
Level 5 - outline-5
Level 6 - outline-6
Level 7 - outline-7
Level 8 - outline-8
Level 9 - outline-1
Level 10 - outline-2
Level 11 - outline-3
...
Level 998 - outline-6
Level 999 - outline-7
Level 1000 - outline-8
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.