From: michael-franzese@gmx.com
To: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Passing values through a variable
Date: Sun, 14 Feb 2021 02:46:23 +0100 [thread overview]
Message-ID: <trinity-75543abe-aea9-4332-8be6-4c8a43e320e9-1613267183195@3c-app-mailcom-bs12> (raw)
I want to change the expression (1 'texcmd-colour) so that
the value 1 can be set through a variable (e.g. stdhl).
Can I just do
(defvar-local stdhl 1
"Uses standard highlighting for keywords when set to 1.
When stdhl is 0, the leading backslash is also highlighted.")
(defconst tex-keywords
`(
;; Greek. Use (0 'texcmd-colour) to highlight the leading "\".
(,(rx "\\" word-start (group (or "alpha" "beta" "chi" "delta"
"Delta" "epsilon" "varepsilon" "eta" "gamma" "Gamma" "iota"
"kappa" "lambda" "Lambda" "mu" "nu" "omega" "Omega" "phi"
"varphi" "Phi" "pi" "varpi" "Pi" "psi" "Psi" "rho" "varrho"
"sigma" "varsigma" "Sigma" "tau" "theta" "vartheta" "Theta"
"upsilon" "Upsilon" "xi" "Xi" "zeta")) word-end)
(stdhl 'texcmd-colour))
(font-lock-add-keywords nil comseq-crucible t)
Below is the original code
(defconst tex-keywords
`(
;; Greek. Use (0 'colour-tex-cruc) to highlight the leading "\".
(,(rx "\\" word-start (group (or "alpha" "beta" "chi" "delta"
"Delta" "epsilon" "varepsilon" "eta" "gamma" "Gamma" "iota"
"kappa" "lambda" "Lambda" "mu" "nu" "omega" "Omega" "phi"
"varphi" "Phi" "pi" "varpi" "Pi" "psi" "Psi" "rho" "varrho"
"sigma" "varsigma" "Sigma" "tau" "theta" "vartheta" "Theta"
"upsilon" "Upsilon" "xi" "Xi" "zeta")) word-end)
(1 'texcmd-colour))
(font-lock-add-keywords nil tex-keywords t)
next reply other threads:[~2021-02-14 1:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 1:46 michael-franzese [this message]
2021-02-14 3:39 ` Passing values through a variable michael-franzese
2021-02-14 3:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-14 4:14 ` michael-franzese
2021-02-14 4:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-14 17:18 ` michael-franzese
2021-02-14 17:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-14 18:08 ` michael-franzese
2021-02-14 17:40 ` michael-franzese
2021-02-14 17:52 ` michael-franzese
2021-02-14 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-75543abe-aea9-4332-8be6-4c8a43e320e9-1613267183195@3c-app-mailcom-bs12 \
--to=michael-franzese@gmx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).