From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: michael-franzese@gmx.com Newsgroups: gmane.emacs.help Subject: Passing values through a variable Date: Sun, 14 Feb 2021 02:46:23 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8250"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 14 02:47:07 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lB6V9-00023P-6N for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Feb 2021 02:47:07 +0100 Original-Received: from localhost ([::1]:37854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lB6V8-00069Q-7b for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 20:47:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lB6UX-00069G-2n for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 20:46:29 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:58235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lB6UU-0007Ax-LZ for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 20:46:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613267183; bh=U/XchBkG5EZ+Vc7M7Wg+o7Jnl7H504k2UdGiR4yZq3E=; h=X-UI-Sender-Class:From:To:Subject:Date; b=egPx1j9QwXgoa1xkzFhHJ5pJ8uY+1FEkK2PoZyD222cyvEbQgLOCJyL5tT3lJ0cUv bvSja9v8vIlXQC358mvcxUN0sJe59US+bDwupkngKX6hZRoyavhhYUFuSWSCqwsi5U uLLlT6Qvm0wo7O+3C4qS8DKuWuCUnDoCOh3kmsdo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs12.server.lan [172.19.170.180]) (via HTTP); Sun, 14 Feb 2021 02:46:23 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:YfeTfNaVO6AqnD12vBVOSM8NxiC3OSxS8WehR8qu//M+KxKVyRXtBT58hvbSu198IXqoF zgv4zDln5RareXQwsk6gix7lZLedrfdZZdOg3DSiO8yWI32v2mjPVS3UDjE2zUAfSwOqdaRrQKKF XMhgoPyXu1MQb/Xy28gx356fAjN2FIzP2lJeH14APkjTNe3RRJupO8mtuxm3Q2ccHshc2tcQ55mC FSjPdfDzFCSDRyf7Zf1q+9SYcmzXzlpD4jv0qGIvO+RCgTMoh39fZcsqtOJ/RebQ+AkACfI1JxQV vA= X-UI-Out-Filterresults: notjunk:1;V03:K0:NH6OG7HaSaU=:DhpDDjjnkYCTqqj5EH1z6V uQ1cPJu+jQ1QJevgbPx9wydXdWw0GvrQSHRmFQGRpim4c2dFHxBryeUJHO457cntRXvwHksIg WSVXauRlFNC5maGxJg8GJYeyh4vVhEwTT8jKdOQVgjUbNcT2GgrITc3bp0yhPWbrnPgolYDgV mbXwl/YLYd7P8/F52PRdZFmGP2WrKPaw+7sDkYQE2eqqauULFNKCYhPIkLmLUaNK1oEpGmp2o TcKeujgGjYHtvPjz9HszU+sZJZ5ISLt/6eyE7ewlHBDrsp5pg7ZZYFPd7cECtVlXZY/AHdr5S yQln7VO1Hqa21fS3kr9rrGFdGE9qw+hNQXGzk6V3/DwzH5Dv8je+bNyipWjuqPUfNrOshHA+I rr3uSc5BYxvUm1956nRvENp20ngYvoLz7pE9Qh2QFj6Y0BCohD+wPa4R/8VquNDZtp5xOfwq5 +jxBDl3SHLqV9gXtxUDAfTlLo1CaESFMavrt9pRGIeItXQPxAvZmbcjgTMsszwbSMfK96ihyD t8mkeeaJNf9HO7v969p46d4mhF+BnB/Gregg66Gfd0EzUzM1XF7tz3/2poVar/nddKodo+Wzf 3kah+1frTaOaduNnAhf4Kg5hF2dLSHNE1+ Received-SPF: pass client-ip=212.227.15.15; envelope-from=michael-franzese@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127990 Archived-At: 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)