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

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

bug#34596: Typo in regex-opt doc string


From: Mattias Engdegård
Subject: bug#34596: 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 via email to

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