[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using show-paren-style function in elisp code
From: |
carlmarcos |
Subject: |
Using show-paren-style function in elisp code |
Date: |
Mon, 20 Jun 2022 10:00:33 +0200 (CEST) |
Have written the following function to set `show-paren-style`. Would it be
possible to modify
the code in a way that also allows a user to use the style as an argument so
that the function
can be used in elisp code.
Is there a standard way for a function to be used in elisp code, or is my plan
viable in the way
described?
(defun view-parens ()
"Visualise parentheses and expressions."
(interactive)
(let* ( (cseq '("bracemk" "expression" "mixed"))
(csel (completing-read "Visualise: " cseq nil t "mixed")) )
(pcase csel
("bracemk"
(setq 'show-paren-style 'parenthesis))
("expression"
(setq 'show-paren-style 'expression))
("mixed"
(setq 'show-paren-style 'mixed)) )))
- Using show-paren-style function in elisp code,
carlmarcos <=