emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34596: closed (Typo in regex-opt doc string)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34596: closed (Typo in regex-opt doc string)
Date: Fri, 22 Feb 2019 08:14:01 +0000

Your message dated Fri, 22 Feb 2019 10:12:59 +0200
with message-id <address@hidden>
and subject line Re: bug#34596: Typo in regex-opt doc string
has caused the debbugs.gnu.org bug report #34596,
regarding Typo in regex-opt doc string
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34596: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34596
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- 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.




--- End Message ---
--- Begin Message --- Subject: Re: bug#34596: Typo in regex-opt doc string Date: Fri, 22 Feb 2019 10:12:59 +0200
> From: Mattias EngdegÄrd <address@hidden>
> 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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]