GNU bug report logs - #34596
Typo in regex-opt doc string

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Wed, 20 Feb 2019 22:12:01 UTC

Severity: minor

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34596 in the body.
You can then email your comments to 34596 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34596; Package emacs. (Wed, 20 Feb 2019 22:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mattias Engdegård <mattiase <at> acm.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 Feb 2019 22:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Typo in regex-opt doc string
Date: Wed, 20 Feb 2019 23:10:52 +0100
The example code in the regexp-opt doc string doesn't actually work because of a typo:

 (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)
             (mapconcat 'regexp-quote strings "\\|")
             (cdr paren))))

`paren' should be `parens'  in the last three lines.





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 22 Feb 2019 08:14:01 GMT) Full text and rfc822 format available.

Notification sent to Mattias Engdegård <mattiase <at> acm.org>:
bug acknowledged by developer. (Fri, 22 Feb 2019 08:14:02 GMT) Full text and rfc822 format available.

Message #10 received at 34596-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 34596-done <at> debbugs.gnu.org
Subject: Re: bug#34596: Typo in regex-opt doc string
Date: Fri, 22 Feb 2019 10:12:59 +0200
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Wed, 20 Feb 2019 23:10:52 +0100
> 
>  (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)
>              (mapconcat 'regexp-quote strings "\\|")
>              (cdr paren))))
> 
> `paren' should be `parens'  in the last three lines.

Thanks, fixed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Mar 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.