unofficial mirror of
 help / color / mirror / Atom feed
* Ways to change the outline search patterns
@ 2024-03-25 12:23 Heime
  0 siblings, 0 replies; only message in thread
From: Heime @ 2024-03-25 12:23 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Calling "re-search-forward", I am able to identify lines starting  with ;;; followed by
an number of spaces.

(re-search-forward ";;; *H1"))

My task is to use this for outline headings at level 1.

But the following has not worked for me

(defvar el-hglevels '( (";;; H1" . 1) (";;; H2" . 2)))
;;; H2 (defun tematika-outlhg-regexp ()

(defun outlhg-regexp ()
    ((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))) ))

What might I be doing wrong ?  Is there an alternative way to change the
outline search patterns ?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-25 12:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 12:23 Ways to change the outline search patterns Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).