unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mandar Mitra <mandar.mitra@gmail.com>
To: 36241@debbugs.gnu.org
Subject: bug#36241: 26.2; documentation error in elisp/Regexp-Functions node
Date: Sun, 16 Jun 2019 14:21:46 +0530	[thread overview]
Message-ID: <20190616085146.pnilljojd2mkut3d@gmail.com> (raw)

The documentation under "Function: regexp-opt" says:


The resulting regexp of regexp-opt is equivalent to but usually more efficient than that of a simplified version: 

 (defun simplified-regexp-opt (strings &optional paren)
           (let ((parens
                  (cond
                   ((stringp paren)       (cons paren "\\)"))
                   ((eq paren 'words)    '("\\<\\(" . "\\)\\>"))
                   ((eq paren 'symbols) '("\\_<\\(" . "\\)\\_>"))
                   ((null paren)          '("\\(?:" . "\\)"))
                   (t                       '("\\(" . "\\)")))))
             (concat (car paren) ;; BUG: should be parens, not paren?
                     (mapconcat 'regexp-quote strings "\\|")
                     (cdr paren)))) ;; BUG: should be parens, not paren?

---------------------------------------------------------------------------

The expressions on the third last line and the last line should be (car parens) and (cdr parens), no?

---------------------------------------------------------------------------

In GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-04-13 built on lgw01-amd64-060
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Linux Mint 19 Tara

Recent messages:
Describe-Bindings...
Type M-x delete-other-windows to delete the help window, C-M-v to scroll help.
Quit [2 times]
Describe-Function...
No library info.el in search path
Type M-x delete-other-windows to delete the help window.
Fill column set to 75 (was 70)
Invalid face reference: info-menu-5 [3 times]
Mark set
Invalid face reference: info-menu-5 [14 times]

Configured using:
 'configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --program-suffix=26 --with-modules --with-file-notification=inotify --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets --with-lcms2 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs26-CYbeHB/emacs26-26.2~1.gitfd1b34b=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie''





             reply	other threads:[~2019-06-16  8:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16  8:51 Mandar Mitra [this message]
2019-06-16  9:30 ` bug#36241: 26.2; documentation error in elisp/Regexp-Functions node Juanma Barranquero
2019-06-16  9:35   ` Juanma Barranquero
2019-06-16  9:54     ` Juanma Barranquero

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=20190616085146.pnilljojd2mkut3d@gmail.com \
    --to=mandar.mitra@gmail.com \
    --cc=36241@debbugs.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).