From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74156: 29.4; Incorrect face with outline-minor-mode-highlight in lisp-mode Date: Sat, 02 Nov 2024 19:14:02 +0200 Organization: LINKOV.NET Message-ID: <865xp5o8x1.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1361"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 74156@debbugs.gnu.org To: Andreas Matthias Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 02 18:18:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t7HlW-0000DI-3Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Nov 2024 18:18:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7HlH-0002TW-Ra; Sat, 02 Nov 2024 13:18:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7HlC-0002Sz-HS for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2024 13:18:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7HlC-0007vY-91 for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2024 13:18:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Z86yYdB5QTJQUIERj1XjzEQCvOywP4jfYh2pID+6nJs=; b=iJab46fnEPLk7SxmTme2wOJnJITHqsr11kRbjShm20Id4iyGqQFar7f6VynJe2uufPa7vaKSAWOO18TKc8wBx+ueyITFD7SyDhPNbSkCTnMTCU677VHsdOMj/p5ZSYqD763uEL1rIDlJs1nHLKHfYwmv7nn3Sexr/D+ofEnHKjU7mZhYrx9LctX5JizEDuQ/tAzHPHOpCygKNv3GJV1fSy0jOq1H6n2iOPQ/CarJl9p4LT6ffGabrXYR8kPZ/k64yADyEki0Gv8POMnbRBpArGme3ogaP1VZWqfCavPcTyaokjMRDr+fzc6vIfJUs1DwkyuYGSs5JVsmB8GarHIKsQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7HlC-0001oB-2C for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2024 13:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Nov 2024 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74156 X-GNU-PR-Package: emacs Original-Received: via spool by 74156-submit@debbugs.gnu.org id=B74156.17305678266927 (code B ref 74156); Sat, 02 Nov 2024 17:18:02 +0000 Original-Received: (at 74156) by debbugs.gnu.org; 2 Nov 2024 17:17:06 +0000 Original-Received: from localhost ([127.0.0.1]:54530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7HkH-0001nf-Kh for submit@debbugs.gnu.org; Sat, 02 Nov 2024 13:17:05 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7HkG-0001n0-Af for 74156@debbugs.gnu.org; Sat, 02 Nov 2024 13:17:04 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2DC0F60003; Sat, 2 Nov 2024 17:16:54 +0000 (UTC) In-Reply-To: (Andreas Matthias's message of "Fri, 1 Nov 2024 14:11:54 +0100") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294758 Archived-At: > 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