summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2019-10-22 15:35:40 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2019-10-22 15:37:51 +0200
commit0e9d92146e3d4e5da597c3d1400cb31f58e19374 (patch)
tree7ec8bfa683071701184f56abf8f7cb6df3b28131 /lisp/emacs-lisp
parent7f5d92e64326173b9d2d14567739390320403ec8 (diff)
downloademacs-0e9d92146e3d4e5da597c3d1400cb31f58e19374.tar.gz
emacs-0e9d92146e3d4e5da597c3d1400cb31f58e19374.tar.bz2
emacs-0e9d92146e3d4e5da597c3d1400cb31f58e19374.zip
rx doc string tweaks
* lisp/emacs-lisp/rx.el (rx--translate-seq, rx--translate-or, rx): Say "zero or more" instead of "one or more" where applicable.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/rx.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 006a393921a..2370948e81b 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -210,7 +210,8 @@ each on the form (REGEXP . PRECEDENCE), returning (REGEXP . PRECEDENCE)."
'seq))))))) ; seq ++ seq
(defun rx--translate-seq (body)
- "Translate a sequence of one or more rx items. Return (REGEXP . PRECEDENCE)."
+ "Translate a sequence of zero or more rx items.
+Return (REGEXP . PRECEDENCE)."
(if body
(let* ((items (mapcar #'rx--translate body))
(result (car items)))
@@ -231,7 +232,7 @@ each on the form (REGEXP . PRECEDENCE), returning (REGEXP . PRECEDENCE)."
(null list))
(defun rx--translate-or (body)
- "Translate an or-pattern of one of more rx items.
+ "Translate an or-pattern of zero or more rx items.
Return (REGEXP . PRECEDENCE)."
;; FIXME: Possible improvements:
;;
@@ -982,7 +983,7 @@ For extending the `rx' notation in FORM, use `rx-define' or `rx-let-eval'."
(defmacro rx (&rest regexps)
"Translate regular expressions REGEXPS in sexp form to a regexp string.
Each argument is one of the forms below; RX is a subform, and RX... stands
-for one or more RXs. For details, see Info node `(elisp) Rx Notation'.
+for zero or more RXs. For details, see Info node `(elisp) Rx Notation'.
See `rx-to-string' for the corresponding function.
STRING Match a literal string.