* bug#34596: Typo in regex-opt doc string
@ 2019-02-20 22:10 Mattias Engdegård
2019-02-22 8:12 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Mattias Engdegård @ 2019-02-20 22:10 UTC (permalink / raw)
To: 34596
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#34596: Typo in regex-opt doc string
2019-02-20 22:10 bug#34596: Typo in regex-opt doc string Mattias Engdegård
@ 2019-02-22 8:12 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2019-02-22 8:12 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: 34596-done
> From: Mattias Engdegård <mattiase@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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-22 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 22:10 bug#34596: Typo in regex-opt doc string Mattias Engdegård
2019-02-22 8:12 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.