From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Including tex commands in a list Date: Thu, 28 Jan 2021 23:35:47 +0100 Message-ID: References: <87k0ryf0ho.fsf@web.de> <87lfcdnnr3.fsf@web.de> <87k0rwvjwl.fsf@web.de> 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="7993"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , help-gnu-emacs@gnu.org To: steve-humphreys@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 28 23:36:33 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 1l5Ftx-0001xM-Fw for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 23:36:33 +0100 Original-Received: from localhost ([::1]:42092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Ftv-0004Nf-TE for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 17:36:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5FtJ-0004NV-HV for help-gnu-emacs@gnu.org; Thu, 28 Jan 2021 17:35:53 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:40371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5FtG-00066B-0D for help-gnu-emacs@gnu.org; Thu, 28 Jan 2021 17:35:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1611873347; bh=8AHq8oCxdkGcKRKMuV54cwGLudGb0OZC9IwaJUO59iY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=QSYTYvDIW7TjU17Uj+PhDI0VzVzRS4WOQZ6bGKvtAo5bxyRIK1K7sRkX9nVF4ZjMQ +RqsbQAQSL26cxtTk9lFbpK8Qv1MgKgBDCXdsTs30l5qn9PND2NENI/JtjsLh70daU z8yVqGnmfKlDj671ssA7w3R2Gm/MLM9+s8/S3f4M= 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-bs02.server.lan [172.19.170.129]) (via HTTP); Thu, 28 Jan 2021 23:35:47 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:4mABH3oZrUJrsaisK7Odns8iOfEGm8HewWP6B2v6/Wb7btcISR81RM1HJvk+bXe7nnf4e 2/gsijaSwd3BlkJzRvZdiM6c2464z+8MXAs4AexKKvYJJohan07RnapGuuvkBOIpVORr1gub/Cr7 9NFeDhj74MKaS5GUETFmrGs78+hFuHcOsicPKlud7/CC+hZoMQVPhVBfdgm9DCHBgPn2WCfNb/Xo b27IBh48otowMJcSoC2JvwKajCMz9bcQKrwGz4bsxsDyCZLlWgwxZ3r5beWsoIeZKZVEv5fM8Yua oE= X-UI-Out-Filterresults: notjunk:1;V03:K0:QwHjiGzTtf8=:2Ja6AlQbzcvyIolvQOx6QD aPvh/liKxX5ThinDH5ToiaJmi2qngkQuGZZJyxsaOz9DTdHhYWercuJ06fQIQPQbgNd8ceuzj 0JqEQmdMUy1o3Eok4jd/4qRaICi1Zk1dsBAvacb5otDuC5qhW08sbNxeiSMsUo4pqXCT6TuBL 2TFrMqNZEw1YvjC3hJw4hhD5qLI8gyt/evIsRvGrktUzW5HiTPftd5jrliecDX7oryY9z1ECm bybPY4Lfil1V6GmVLNjo4kVX8w1JNTgiSzgwEQBJD+MCpoD2B6vReuAISG4DmOz9XeFMdrpKH FuFQ97a+kzlu02LZex+YHVUSSqAKBMCLmwfGRpGwwmqTGEM/9IcG97kyD+/IqAWpzCKrZHCLJ ZDgKKRNuA79eh9YOxzSFvRuexDeBZwp0FRV9iSTu0djvyI5VojdfUWu7wwU+3/8dJ36tOT2Ws 4g4gJM+CAKLZWuOGnnf8ff5mgAuItI2asUfmWzA+W9e0ZoNMAtaqFmTkbva9uPfZtVp3j+TnP 79ki3FW3gWGbZZ7pxaGl5l8M+Bk0Zrh1TnUK+iQTxHhyWN1QohrsFmLGMCLR8UVBrVOx4cnra dQWgqiYnhkSUM= Received-SPF: pass client-ip=212.227.17.21; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:127414 Archived-At: Have also tried to do the following, but it still has remained a problem. (defconst crucible-mtksy-keywords `(;; Greek (,(concat "\\\\\\<" (rx "\\" "alpha" (or "beta" "chi") "delta") "\\>") (0 'crucible-mtksy-tfc)) ; NOTE: Use 0 instead of 1 to also highlight= the \ (,(concat "\\\\\\<\\(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\\)\\>") (0 'crucible-mtksy-tfc)) > Sent: Friday, January 29, 2021 at 10:26 AM > From: steve-humphreys@gmx.com > To: "Christopher Dimech" > Cc: "Michael Heerdegen" , help-gnu-emacs@gnu.o= rg > Subject: Re: Including tex commands in a list > > As you pointed out, I misunderstood how to use rx. > > However when I applied the change, the keywords are not being > highlighted at all. > > `(;; Greek > (, (rx "\\" "alpha" (or "beta" "chi") "delta") > (1 'crucible-mtksy-tfc)) > (,(concat "\\\\\\<\\(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\\)\\>") > (0 'crucible-mtksy-tfc)) > > > > Sent: Friday, January 29, 2021 at 10:17 AM > > From: "Christopher Dimech" > > To: steve-humphreys@gmx.com > > Cc: "Michael Heerdegen" , help-gnu-emacs@gnu= .org > > Subject: Re: Including tex commands in a list > > > > You can try to use > > > > (require 'rx) > > (rx "\\" "alpha" (or "beta" "gamma") "theta") > > > > > > > > > > > Sent: Friday, January 29, 2021 at 10:12 AM > > > From: steve-humphreys@gmx.com > > > To: "Michael Heerdegen" > > > Cc: help-gnu-emacs@gnu.org > > > Subject: Re: Including tex commands in a list > > > > > > I know that the command > > > > > > (rx (or "alpha" "beta")) > > > > > > produces the generated pattern > > > > > > "\\(?:alpha\\|beta\\)" > > > > > > > > > > > > > > > > > > > Sent: Friday, January 29, 2021 at 9:19 AM > > > > From: "Michael Heerdegen" > > > > To: help-gnu-emacs@gnu.org > > > > Subject: Re: Including tex commands in a list > > > > > > > > steve-humphreys@gmx.com writes: > > > > > > > > > I am using font lock to highlight keywords in a minor mode. > > > > > Have changed from using "concat" to using "rx" as you suggested. > > > > > However it does not seem equivalent. > > > > > > > > > > (defconst crucible-mtksy-keywords > > > > > `(;; Greek > > > > > (,(concat "\\\\\\<\\(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\\)\\>") > > > > > (0 'crucible-mtksy-tfc))) > > > > > "Fontification for letters and symbols.") > > > > > > > > How does your rx version look like? > > > > > > > > Michael. > > > > > > > > > > > > > > > > > > > > > > > >