From xah@xahlee.org Fri Nov 21 12:11:44 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,IMPRONONCABLE_2, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Nov 2008 20:11:44 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mALKBeBT025464 for ; Fri, 21 Nov 2008 12:11:42 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3cLs-00047s-FU for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 15:11:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3cLr-000466-9a for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 15:11:40 -0500 Received: from [199.232.76.173] (port=54383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3cLr-00045o-3g for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 15:11:39 -0500 Received: from mout.perfora.net ([74.208.4.196]:49285) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3cLq-0006vK-Qp for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 15:11:39 -0500 Received: from [192.168.1.5] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1L3cLd0xz0-000195; Fri, 21 Nov 2008 15:11:29 -0500 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: quoted-printable Message-Id: <9A6C05EA-F30E-4432-BCE3-4CA01A14567D@xahlee.org> Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: xah lee Subject: suggestion: add 'symbol to regexp-opt's second parameter Date: Fri, 21 Nov 2008 12:11:36 -0800 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX1/rjVDnWQPoASSzP3NmxAOfEHFuaDgTuka63tp uWyteOXQGFz+tEmWxxcArAjcZKCxdLFc6vsJcPlIKoskuV3HRo klFEKwRllBD/dQqOVJ/QA== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. this is a suggestion. the function regexp-opt takes a second argument =E2=80=9C'words=E2=80=9D = to make =20 the regex match word boundary. Perhaps it'd be useful to have =20 =E2=80=9C'symbol=E2=80=9D as the second argument as well. as far as i know, when people do like this when they need symbol: (concat "\\_<" (regexp-opt myLang-functions) ">_\\") having (regexp-opt myLang-functions 'symbol) would be convenient and seems to me consistent. For example, i currently have: (defvar xlsl-keywords-regexp (regexp-opt xlsl-keywords 'words)) (defvar xlsl-type-regexp (regexp-opt xlsl-types 'words)) (defvar xlsl-constant-regexp (regexp-opt xlsl-constants 'words)) (defvar xlsl-event-regexp (regexp-opt xlsl-events 'words)) (defvar xlsl-functions-regexp (regexp-opt xlsl-functions 'words)) but i'd prefer that each is 'symbol. Using concat makes the code much =20= longer and less readable. Also, i think matching on symbol boundary is probably more commonly =20 needed than words, for language major modes. PS before i send this, i posted to gnu.emacs.help to see if this is =20 sensible question. It seems that either this is already supported in =20 the dev version of emacs, or that this can still use some =20 improvement. I'm logging this suggestion here to be sure. Here's the =20 thread: http://groups.google.com/group/gnu.emacs.help/browse_frm/thread/=20 289e42f24f21f65c subject: =E2=80=9Cregex-opt does not accept 'symbol as second arg?=E2=80=9D= date: 2008-10-11 Xah =E2=88=91 http://xahlee.org/ =E2=98=84= From cyd@stupidchicken.com Sat Nov 22 13:45:05 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,BAYES_00, VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 22 Nov 2008 21:45:05 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAMLj2f2008581 for ; Sat, 22 Nov 2008 13:45:03 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id E609D57E195; Sat, 22 Nov 2008 16:45:20 -0500 (EST) From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 1402 wishlist Date: Sat, 22 Nov 2008 16:45:20 -0500 Message-ID: <87bpw7cu4v.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii severity 1402 wishlist thanks From rgm@gnu.org Thu Sep 10 17:05:41 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Sep 2009 00:05:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.6 required=4.0 tests=AWL,ONEWORD,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8B05eJ5031402 for ; Thu, 10 Sep 2009 17:05:41 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mltdz-0000i3-Fb; Thu, 10 Sep 2009 20:05:39 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19113.37971.425129.749132@fencepost.gnu.org> Date: Thu, 10 Sep 2009 20:05:39 -0400 From: Glenn Morris To: control Subject: control X-Debbugs-No-Ack: yes forcemerge 1402 4392 From monnier@iro.umontreal.ca Fri Sep 11 12:17:29 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Sep 2009 19:17:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.1 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,VALID_BTS_CONTROL autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from tomts5-srv.bellnexxia.net (tomts5-srv.bellnexxia.net [209.226.175.25]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BJHSOv009701; Fri, 11 Sep 2009 12:17:29 -0700 Received: from toip6.srvr.bell.ca ([209.226.175.125]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20090911191727.PFZS7787.tomts5-srv.bellnexxia.net@toip6.srvr.bell.ca>; Fri, 11 Sep 2009 15:17:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwFAEo/qkpGN458/2dsb2JhbACBU9wchBgF Received: from bas1-montreal42-1178046076.dsl.bell.ca (HELO ceviche.home) ([70.55.142.124]) by toip6.srvr.bell.ca with ESMTP; 11 Sep 2009 15:09:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8A3DEB40D4; Fri, 11 Sep 2009 15:17:27 -0400 (EDT) From: Stefan Monnier To: Devon Sean McCullough Cc: 4392@debbugs.gnu.org Subject: Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Message-ID: References: <200909102148.n8ALm8wq058841@jovi.net> Date: Fri, 11 Sep 2009 15:17:27 -0400 In-Reply-To: <200909102148.n8ALm8wq058841@jovi.net> (Devon Sean McCullough's message of "Thu, 10 Sep 2009 14:48:08 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tag 4392 +wontfix thanks > Please patch REGEXP-OPT to take a PAREN 'symbols argument. As the person responsible for adding the `words' value to PAREN, I'm going to reject this request. I think the `words' value was itself a mistake. It's just as easy to add (concat "\\<" ... "\\>") around the call to regexp-opt. Actually, the whole `paren' argument should disappear (i.e. be hardcoded to "\\(?:"). Stefan From unknown Fri Aug 15 04:05:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 07 Aug 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator