Regexp for detecting headings with title text

21 Views Asked by At

The following recognises outline headings but the regexp does not allow users to specify title text. How can I modify outline-regexp for this

;;; H1 Title for heading at level 1
;;; H2 Title for heading at level 2

Here is the current implementation

(defvar elisp-hglevels
  '( (";;; H1" . 1) (";;; H2" . 2) (";;; H3" . 3) (";;; H4" . 4)
     (";;; H5" . 5) (";;; H6" . 6) (";;; H7" . 7) (";;; H8" . 8) )
  "Set outline levels for for command shell outline headings.")

(defun elisp-outl ()
  "Set bash headings for outline mode."
  (interactive)
  (setq outline-regexp
         (concat (regexp-opt (mapcar 'car elisp-hrklevels)) "\\>"))
  (setq outline-heading-alist elisp-hrklevels) )
0

There are 0 best solutions below