|
From: | Heime |
Subject: | Allowing spaces in the regexp for outlines |
Date: | Wed, 20 Mar 2024 19:24:17 +0000 |
Have made a regexp for outlines to use ';;;' followed by 'H' and a number. I would like to allow any number of spaces between the ';;;' and the letter 'H'. How can I change the regexp to allow such a capability ? (defvar el-hglevels '( (";;; H1" . 1) (";;; H2" . 2) (";;; H3" . 3) (";;; H4" . 4) ) "Outline levels for elisp major mode.") (defun outlhg-regexp () (cond ((memq major-mode '(emacs-lisp-mode lisp-interaction-mode)) (let ( (hglevels el-hglevels) ) (setq outline-regexp (concat (regexp-opt (mapcar 'car hglevels)) "\\>")) (setq outline-heading-alist hglevels) (setq-local outline-level 'outline-level))) ))
[Prev in Thread] | Current Thread | [Next in Thread] |