branch: externals/hyperbole commit 93ff5acf4be9cd2600dea3fb5794b7a47b4c7b3f Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
hyrolo.el - Add default hyrolo-entry-group-number for hyrolo-mode --- ChangeLog | 5 +++++ hyrolo.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7188324a47..e23d607716 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-02-19 Bob Weiner <r...@gnu.org> + +* hyrolo.el (hyrolo-mode): Set these two missing variables: + 'hyrolo-entry-group-number' and 'hyrolo-entry-trailing-space-group-number'. + 2024-02-18 Mats Lidell <ma...@gnu.org> * Fix flycheck/flymake warnings. diff --git a/hyrolo.el b/hyrolo.el index b6ee0f5117..3b550358e1 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 7-Jun-89 at 22:08:29 -;; Last-Mod: 18-Feb-24 at 17:35:53 by Bob Weiner +;; Last-Mod: 19-Feb-24 at 10:47:52 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -2172,6 +2172,10 @@ Calls the functions given by `hyrolo-mode-hook'. outline-heading-alist) (setq-local hyrolo-entry-regexp (concat "^" "\\([*\^L]+\\)\\([ \t\n\r]+\\)") hyrolo-hdr-and-entry-regexp (default-value 'hyrolo-hdr-and-entry-regexp) + hyrolo-entry-group-number 1 + ;; `hyrolo-add' handles removing * prefix from + ;; trailing-space grouping below + hyrolo-entry-trailing-space-group-number 2 ;; In `outline-regexp', prevent matching to *word* ;; at the beginning of lines and hanging hyrolo ;; search functions by adding a whitespace char at @@ -3176,7 +3180,7 @@ This function is used for every file-type major-mode supported by HyRolo." (cond ((derived-mode-p 'kotl-mode) (kcell-view:level)) ((looking-at hyrolo-hdr-and-entry-regexp) - (1- (- (match-end 0) (match-beginning 0)))) + (length (match-string hyrolo-entry-group-number))) (t 0)))) ;;; ************************************************************************