[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing a list to a function

From: lisa-asket
Subject: Passing a list to a function
Date: Mon, 12 Jul 2021 07:32:23 +0200 (CEST)

I have a function named `outline-headings` that uses a list called `hdlevels`

that is filled bp a defvar named `hstyle-hdl`.

How can I make `outline-headings` take the list as an argument? 

(defvar hstyle-hdl
   '( ("@c h1" . 1) ("@c h2" . 2) ("@c h3" . 3) ("@c h4" . 4)
      ("@c h5" . 5) ("@c h6" . 6) ("@c h7" . 7) ("@c h8" . 8) )
   "Define names and levels for texinfo outline headings." )

(defun outline-headings ()
  "Sets texinfo headings for use in outline mode."
  (let ( (hdlevels hstyle-hdl) )
    (setq outline-regexp
      (concat (regexp-opt (mapcar 'car hdlevels)) "\\>"))
    (setq outline-heading-alist hdlevels)) )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]