aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2018-10-31 07:50:57 -0700
committerGlenn Morris2018-10-31 07:50:57 -0700
commit3a739236d061cf44dcba77f163e6087be4fd09fa (patch)
tree37ba2826d46d4157de3b6b7cd2c03264e3467641 /lisp
parent5fec8294a7eb50a4ada26519cd578006b8d16b35 (diff)
parenteb903d8f20ab0c31daa27a08b0acfd30115c7b5e (diff)
downloademacs-3a739236d061cf44dcba77f163e6087be4fd09fa.tar.gz
emacs-3a739236d061cf44dcba77f163e6087be4fd09fa.zip
Merge from origin/emacs-26
eb903d8 * lisp/emacs-lisp/pcase.el: Improve docstrings. 86abbb3 * lisp/emacs-lisp/rx.el (rx): Fix typo in doc string. (Bug#3... ced58d3 Improve doc string of 'call-process' 38f88a7 Document that generic functions cannot be commands 5aeddfa * lisp/mail/rmailsum.el (rmail-summary-output): Add lost word... 10e0fd8 Add index entries for more isearch commands/bindings (Bug#32990) de28184 * lisp/simple.el (filter-buffer-substring): Clarify doc (Bug#... d192c16 Fix recent change in lispref/processes.texi.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/pcase.el18
-rw-r--r--lisp/emacs-lisp/rx.el2
-rw-r--r--lisp/mail/rmailsum.el2
-rw-r--r--lisp/simple.el2
4 files changed, 15 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 57c2d6c3cb5..2746738d41a 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -266,7 +266,8 @@ variable name being but a special case of it)."
266(defmacro pcase-let* (bindings &rest body) 266(defmacro pcase-let* (bindings &rest body)
267 "Like `let*' but where you can use `pcase' patterns for bindings. 267 "Like `let*' but where you can use `pcase' patterns for bindings.
268BODY should be an expression, and BINDINGS should be a list of bindings 268BODY should be an expression, and BINDINGS should be a list of bindings
269of the form (PAT EXP)." 269of the form (PATTERN EXP).
270See `pcase-let' for discussion of how PATTERN is matched."
270 (declare (indent 1) 271 (declare (indent 1)
271 (debug ((&rest (pcase-PAT &optional form)) body))) 272 (debug ((&rest (pcase-PAT &optional form)) body)))
272 (let ((cached (gethash bindings pcase--memoize))) 273 (let ((cached (gethash bindings pcase--memoize)))
@@ -281,10 +282,11 @@ of the form (PAT EXP)."
281(defmacro pcase-let (bindings &rest body) 282(defmacro pcase-let (bindings &rest body)
282 "Like `let' but where you can use `pcase' patterns for bindings. 283 "Like `let' but where you can use `pcase' patterns for bindings.
283BODY should be a list of expressions, and BINDINGS should be a list of bindings 284BODY should be a list of expressions, and BINDINGS should be a list of bindings
284of the form (PAT EXP). 285of the form (PATTERN EXP).
285The macro is expanded and optimized under the assumption that those 286The PATTERNs are only used to extract data, so the code does not test
286patterns *will* match, so a mismatch may go undetected or may cause 287whether the data does match the corresponding patterns: a mismatch
287any kind of error." 288may signal an error or may go undetected, binding variables to arbitrary
289values, such as nil."
288 (declare (indent 1) (debug pcase-let*)) 290 (declare (indent 1) (debug pcase-let*))
289 (if (null (cdr bindings)) 291 (if (null (cdr bindings))
290 `(pcase-let* ,bindings ,@body) 292 `(pcase-let* ,bindings ,@body)
@@ -302,7 +304,11 @@ any kind of error."
302 304
303;;;###autoload 305;;;###autoload
304(defmacro pcase-dolist (spec &rest body) 306(defmacro pcase-dolist (spec &rest body)
305 "Like `dolist' but where the binding can be a `pcase' pattern. 307 "Superset of `dolist' where the VAR binding can be a `pcase' PATTERN.
308More specifically, this is just a shorthand for the following combination
309of `dolist' and `pcase-let':
310
311 (dolist (x LIST) (pcase-let ((PATTERN x)) BODY...))
306\n(fn (PATTERN LIST) BODY...)" 312\n(fn (PATTERN LIST) BODY...)"
307 (declare (indent 1) (debug ((pcase-PAT form) body))) 313 (declare (indent 1) (debug ((pcase-PAT form) body)))
308 (if (pcase--trivial-upat-p (car spec)) 314 (if (pcase--trivial-upat-p (car spec))
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index bb759011513..1230df4f15d 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -1060,7 +1060,7 @@ CHAR
1060 `chinese-two-byte' (\\cC) 1060 `chinese-two-byte' (\\cC)
1061 `greek-two-byte' (\\cG) 1061 `greek-two-byte' (\\cG)
1062 `japanese-hiragana-two-byte' (\\cH) 1062 `japanese-hiragana-two-byte' (\\cH)
1063 `indian-tow-byte' (\\cI) 1063 `indian-two-byte' (\\cI)
1064 `japanese-katakana-two-byte' (\\cK) 1064 `japanese-katakana-two-byte' (\\cK)
1065 `korean-hangul-two-byte' (\\cN) 1065 `korean-hangul-two-byte' (\\cN)
1066 `cyrillic-two-byte' (\\cY) 1066 `cyrillic-two-byte' (\\cY)
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 10345b63ae2..f8adf774002 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1694,7 +1694,7 @@ Deleted messages are skipped and don't count.
1694When called from Lisp code, N may be omitted and defaults to 1. 1694When called from Lisp code, N may be omitted and defaults to 1.
1695 1695
1696This command always outputs the complete message header, 1696This command always outputs the complete message header,
1697even the header display is currently pruned." 1697even if the header display is currently pruned."
1698 (interactive 1698 (interactive
1699 (progn (require 'rmailout) 1699 (progn (require 'rmailout)
1700 (list (rmail-output-read-file-name) 1700 (list (rmail-output-read-file-name)
diff --git a/lisp/simple.el b/lisp/simple.el
index 6a7d210e483..245675504a3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4266,7 +4266,7 @@ unless a hook has been set.
4266Use `filter-buffer-substring' instead of `buffer-substring', 4266Use `filter-buffer-substring' instead of `buffer-substring',
4267`buffer-substring-no-properties', or `delete-and-extract-region' when 4267`buffer-substring-no-properties', or `delete-and-extract-region' when
4268you want to allow filtering to take place. For example, major or minor 4268you want to allow filtering to take place. For example, major or minor
4269modes can use `filter-buffer-substring-function' to extract characters 4269modes can use `filter-buffer-substring-function' to exclude text properties
4270that are special to a buffer, and should not be copied into other buffers." 4270that are special to a buffer, and should not be copied into other buffers."
4271 (funcall filter-buffer-substring-function beg end delete)) 4271 (funcall filter-buffer-substring-function beg end delete))
4272 4272