Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number

From: Howard Melman <[email-masked]>
Date: Tue, 2 Mar 2021 12:48:37 -0500

On Mar 2, 2021, at 12:05 PM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Howard Melman <[email-masked]>
>> Date: Tue, 2 Mar 2021 11:35:01 -0500
>> 
>> lisp-outline-level returns a functional but incorrect level
>> number.  Comments beginning with ";;; " should be at level 1
>> but it returns 5 because they match ";;; [^ \t\n]" and the
>> current code just returns that length.
> 
> I believe these problems are fixed on the master branch (or at least
> the behavior is very different), please try that.

I don't build my own emacs and can't easily test on master.  

I had previously confirmed that lisp-outline-level in 27.1 
is the same as in master as shown here:
http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/lisp-mode.el

You can quickly test the behavior by putting point at the beginning
of a "heading" line in an emacs-lisp-mode file and running:
(progn (looking-at outline-regexp) (funcall outline-level))

Howard