From unknown Sat Aug 16 18:42:51 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Reply-To: Devon Sean McCullough , 4392@debbugs.gnu.org Resent-From: Devon Sean McCullough Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Sep 2009 22:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4392 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12526195816595 (code B ref -1); Thu, 10 Sep 2009 22:00:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 21:53:01 +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=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8ALqxpH006592 for ; Thu, 10 Sep 2009 14:53:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlrZb-0002Zm-Lw for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlrZX-0002Xk-6A for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:59 -0400 Received: from [199.232.76.173] (port=54891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlrZX-0002Xb-2A for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:55 -0400 Received: from jovi.net ([66.161.136.54]:4206) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MlrZW-0005hm-E1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:54 -0400 Received: from jovi.net (localhost [127.0.0.1]) by jovi.net (8.14.1/8.14.1) with ESMTP id n8ALmPfZ058847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Sep 2009 17:48:25 -0400 (EDT) (envelope-from Devon@Jovi.Net) Received: (from devon@localhost) by jovi.net (8.14.1/8.14.1/Submit) id n8ALm8wq058841; Thu, 10 Sep 2009 14:48:08 -0700 (PDT) (envelope-from Devon@Jovi.Net) Date: Thu, 10 Sep 2009 14:48:08 -0700 (PDT) Message-Id: <200909102148.n8ALm8wq058841@jovi.net> X-Authentication-Warning: jovi.net: devon set sender to Devon@Jovi.Net using -f From: Devon Sean McCullough To: bug-gnu-emacs@gnu.org Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; envelope-from= Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; helo= X-DCC-Misty-Metrics: grant.org 1170; Body=2 Fuz1=2 Fuz2=2 X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 Please patch REGEXP-OPT to take a PAREN 'symbols argument. Index: emacs/doc/lispref/searching.texi =================================================================== RCS file: /sources/emacs/emacs/doc/lispref/searching.texi,v retrieving revision 1.18 diff -u -r1.18 searching.texi --- emacs/doc/lispref/searching.texi 27 Aug 2009 04:24:02 -0000 1.18 +++ emacs/doc/lispref/searching.texi 10 Sep 2009 20:20:36 -0000 @@ -921,6 +921,7 @@ returned regular expression is always enclosed by at least one parentheses-grouping construct. If @var{paren} is @code{words}, then that construct is additionally surrounded by @samp{\<} and @samp{\>}. +Likewise if @var{paren} is @code{symbols}, by @samp{\_<} and @samp{\_>}. This simplified definition of @code{regexp-opt} produces a regular expression which is equivalent to the actual value Index: emacs/lisp/emacs-lisp/regexp-opt.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/regexp-opt.el,v retrieving revision 1.42 diff -u -r1.42 regexp-opt.el --- emacs/lisp/emacs-lisp/regexp-opt.el 5 Jan 2009 03:21:08 -0000 1.42 +++ emacs/lisp/emacs-lisp/regexp-opt.el 10 Sep 2009 20:20:36 -0000 @@ -96,7 +96,7 @@ (concat open (mapconcat 'regexp-quote STRINGS \"\\\\|\") close)) If PAREN is `words', then the resulting regexp is additionally surrounded -by \\=\\< and \\>." +by \\=\\< and \\>. Likewise if PAREN is `symbols', by \\_< and \\_>." (save-match-data ;; Recurse on the sorted list. (let* ((max-lisp-eval-depth 10000) @@ -104,11 +104,14 @@ (completion-ignore-case nil) (completion-regexp-list nil) (words (eq paren 'words)) + (symbols (eq paren 'symbols)) (open (cond ((stringp paren) paren) (paren "\\("))) (sorted-strings (delete-dups (sort (copy-sequence strings) 'string-lessp))) (re (regexp-opt-group sorted-strings (or open t) (not open)))) - (if words (concat "\\<" re "\\>") re)))) + (cond (words (concat "\\<" re "\\>")) + (symbols (concat "\\_<" re "\\_>")) + (t re))))) ;;;###autoload (defun regexp-opt-depth (regexp) Peace --Devon /~\ \ / Health Care X not warfare / \ 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 unknown Sat Aug 16 18:42:51 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Reply-To: Stefan Monnier , 4392@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Sep 2009 19:25:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4392 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4392-submit@emacsbugs.donarmstrong.com id=B4392.12526966509704 (code B ref 4392); Fri, 11 Sep 2009 19:25:05 +0000 Received: (at 4392) 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.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,VALID_BTS_CONTROL autolearn=ham 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 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 Sat Aug 16 18:42:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Devon Sean McCullough Subject: bug#4392: closed (Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'.) Message-ID: References: <200909102148.n8ALm8wq058841@jovi.net> X-Gnu-PR-Message: they-closed 4392 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: wontfix Reply-To: 4392@debbugs.gnu.org Date: Sat, 09 Jul 2011 18:50:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1310237403-3698-1" This is a multi-part message in MIME format... ------------=_1310237403-3698-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbo= ls'. which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 4392@debbugs.gnu.org. --=20 4392: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4392 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1310237403-3698-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4392-done) by debbugs.gnu.org; 9 Jul 2011 18:49:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfcag-0000wh-RH for submit@debbugs.gnu.org; Sat, 09 Jul 2011 14:49:23 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfcag-0000wW-7Y for 4392-done@debbugs.gnu.org; Sat, 09 Jul 2011 14:49:22 -0400 Received: from localhost ([127.0.0.1]:36674) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qfcaa-0006a7-JI; Sat, 09 Jul 2011 14:49:16 -0400 From: Glenn Morris To: 4392-done@debbugs.gnu.org Subject: Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. References: <200909102148.n8ALm8wq058841@jovi.net> X-Spook: Aladdin Ortega Capricorn broadside anarchy Zachawi War on X-Ran: D0A8?U'P(YTe(:o(}3}4Sm[/t6)u-M$#d$^X%%dC{ X-Hue: cyan X-Attribution: GM Date: Sat, 09 Jul 2011 14:49:16 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 11 Sep 2009 15:17:27 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 4392-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.1 There seems no point keeping this report open. A SYMBOLS option was added 2010-10-07, despire the following: Stefan Monnier wrote: > 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 "\\(?:"). ------------=_1310237403-3698-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 21:53:01 +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=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8ALqxpH006592 for ; Thu, 10 Sep 2009 14:53:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlrZb-0002Zm-Lw for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlrZX-0002Xk-6A for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:59 -0400 Received: from [199.232.76.173] (port=54891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlrZX-0002Xb-2A for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:55 -0400 Received: from jovi.net ([66.161.136.54]:4206) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MlrZW-0005hm-E1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:54 -0400 Received: from jovi.net (localhost [127.0.0.1]) by jovi.net (8.14.1/8.14.1) with ESMTP id n8ALmPfZ058847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Sep 2009 17:48:25 -0400 (EDT) (envelope-from Devon@Jovi.Net) Received: (from devon@localhost) by jovi.net (8.14.1/8.14.1/Submit) id n8ALm8wq058841; Thu, 10 Sep 2009 14:48:08 -0700 (PDT) (envelope-from Devon@Jovi.Net) Date: Thu, 10 Sep 2009 14:48:08 -0700 (PDT) Message-Id: <200909102148.n8ALm8wq058841@jovi.net> X-Authentication-Warning: jovi.net: devon set sender to Devon@Jovi.Net using -f From: Devon Sean McCullough To: bug-gnu-emacs@gnu.org Subject: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; envelope-from= Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; helo= X-DCC-Misty-Metrics: grant.org 1170; Body=2 Fuz1=2 Fuz2=2 X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 Please patch REGEXP-OPT to take a PAREN 'symbols argument. Index: emacs/doc/lispref/searching.texi =================================================================== RCS file: /sources/emacs/emacs/doc/lispref/searching.texi,v retrieving revision 1.18 diff -u -r1.18 searching.texi --- emacs/doc/lispref/searching.texi 27 Aug 2009 04:24:02 -0000 1.18 +++ emacs/doc/lispref/searching.texi 10 Sep 2009 20:20:36 -0000 @@ -921,6 +921,7 @@ returned regular expression is always enclosed by at least one parentheses-grouping construct. If @var{paren} is @code{words}, then that construct is additionally surrounded by @samp{\<} and @samp{\>}. +Likewise if @var{paren} is @code{symbols}, by @samp{\_<} and @samp{\_>}. This simplified definition of @code{regexp-opt} produces a regular expression which is equivalent to the actual value Index: emacs/lisp/emacs-lisp/regexp-opt.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/regexp-opt.el,v retrieving revision 1.42 diff -u -r1.42 regexp-opt.el --- emacs/lisp/emacs-lisp/regexp-opt.el 5 Jan 2009 03:21:08 -0000 1.42 +++ emacs/lisp/emacs-lisp/regexp-opt.el 10 Sep 2009 20:20:36 -0000 @@ -96,7 +96,7 @@ (concat open (mapconcat 'regexp-quote STRINGS \"\\\\|\") close)) If PAREN is `words', then the resulting regexp is additionally surrounded -by \\=\\< and \\>." +by \\=\\< and \\>. Likewise if PAREN is `symbols', by \\_< and \\_>." (save-match-data ;; Recurse on the sorted list. (let* ((max-lisp-eval-depth 10000) @@ -104,11 +104,14 @@ (completion-ignore-case nil) (completion-regexp-list nil) (words (eq paren 'words)) + (symbols (eq paren 'symbols)) (open (cond ((stringp paren) paren) (paren "\\("))) (sorted-strings (delete-dups (sort (copy-sequence strings) 'string-lessp))) (re (regexp-opt-group sorted-strings (or open t) (not open)))) - (if words (concat "\\<" re "\\>") re)))) + (cond (words (concat "\\<" re "\\>")) + (symbols (concat "\\_<" re "\\_>")) + (t re))))) ;;;###autoload (defun regexp-opt-depth (regexp) Peace --Devon /~\ \ / Health Care X not warfare / \ ------------=_1310237403-3698-1-- From unknown Sat Aug 16 18:42:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: xah lee Subject: bug#1402: closed (Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'.) Message-ID: References: <9A6C05EA-F30E-4432-BCE3-4CA01A14567D@xahlee.org> X-Gnu-PR-Message: they-closed 1402 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: wontfix Reply-To: 1402@debbugs.gnu.org Date: Sat, 09 Jul 2011 18:50:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1310237403-3698-3" This is a multi-part message in MIME format... ------------=_1310237403-3698-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #4392: suggestion: add 'symbol to regexp-opt's second parameter which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 1402@debbugs.gnu.org. --=20 4392: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4392 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1310237403-3698-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4392-done) by debbugs.gnu.org; 9 Jul 2011 18:49:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfcag-0000wh-RH for submit@debbugs.gnu.org; Sat, 09 Jul 2011 14:49:23 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfcag-0000wW-7Y for 4392-done@debbugs.gnu.org; Sat, 09 Jul 2011 14:49:22 -0400 Received: from localhost ([127.0.0.1]:36674) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qfcaa-0006a7-JI; Sat, 09 Jul 2011 14:49:16 -0400 From: Glenn Morris To: 4392-done@debbugs.gnu.org Subject: Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. References: <200909102148.n8ALm8wq058841@jovi.net> X-Spook: Aladdin Ortega Capricorn broadside anarchy Zachawi War on X-Ran: D0A8?U'P(YTe(:o(}3}4Sm[/t6)u-M$#d$^X%%dC{ X-Hue: cyan X-Attribution: GM Date: Sat, 09 Jul 2011 14:49:16 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 11 Sep 2009 15:17:27 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 4392-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.1 There seems no point keeping this report open. A SYMBOLS option was added 2010-10-07, despire the following: Stefan Monnier wrote: > 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 "\\(?:"). ------------=_1310237403-3698-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >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= ------------=_1310237403-3698-3--