From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Making outline-minor-mode's outline-regexp more flexible Date: Tue, 08 Jan 2019 22:10:33 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1547003361 11798 195.159.176.226 (9 Jan 2019 03:09:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Jan 2019 03:09:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 09 04:09:17 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gh4Ey-0002sq-KQ for ged-emacs-devel@m.gmane.org; Wed, 09 Jan 2019 04:09:12 +0100 Original-Received: from localhost ([127.0.0.1]:60337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh4H5-0002FR-6V for ged-emacs-devel@m.gmane.org; Tue, 08 Jan 2019 22:11:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh4GS-0002FG-KQ for emacs-devel@gnu.org; Tue, 08 Jan 2019 22:10:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gh4GR-0006iU-2J for emacs-devel@gnu.org; Tue, 08 Jan 2019 22:10:43 -0500 Original-Received: from [195.159.176.226] (port=42208 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gh4GQ-0006hw-Rw for emacs-devel@gnu.org; Tue, 08 Jan 2019 22:10:43 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gh4EH-00028E-Op for emacs-devel@gnu.org; Wed, 09 Jan 2019 04:08:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:UFogJvLjXu7H3JyMjCcFcVNmB7k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232265 Archived-At: >> I don't see why outline-level would need to do any matching. > How would you compute the outline level of 2 for " // ***", and level > 3 for both " // ****" and ” // ****”? Based on the match-data: when outline-level is called, outline-rege3xp has just been matched, as described in C-h v outline-level: Function of no args to compute a header’s nesting level in an outline. It can assume point is at the beginning of a header line and that the match data reflects the ‘outline-regexp’. -- Stefan