aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorMattias EngdegÄrd2020-05-28 16:37:27 +0200
committerMattias EngdegÄrd2020-05-28 16:58:57 +0200
commit2bdb2cd10d08a1d9c9a187c7d967fdc64b8e6743 (patch)
tree4fc24048cdf3148f3b94fe51bb30531f9fd37896 /src/coding.c
parent4939beacb33ea91cd35e18fa7d43a4392d47f6f4 (diff)
downloademacs-2bdb2cd10d08a1d9c9a187c7d967fdc64b8e6743.tar.gz
emacs-2bdb2cd10d08a1d9c9a187c7d967fdc64b8e6743.zip
Document that {en,de}code-coding-string preserve match data
* lisp/international/mule.el (define-coding-system): Require :pre-write-conversion and :post-read-conversion functions to leave the match data untouched. * src/coding.c (Fdecode_coding_string, Fencode_coding_string): Document functions as match-data-preserving. Suggested by Stefan Monnier (see bug#41445).
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c
index 34f36d5a86a..071124b4ef1 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -10395,7 +10395,7 @@ representation of the decoded text.
10395 10395
10396This function sets `last-coding-system-used' to the precise coding system 10396This function sets `last-coding-system-used' to the precise coding system
10397used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 10397used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
10398not fully specified.) */) 10398not fully specified.) The function does not change the match data. */)
10399 (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer) 10399 (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer)
10400{ 10400{
10401 return code_convert_string (string, coding_system, buffer, 10401 return code_convert_string (string, coding_system, buffer,
@@ -10415,7 +10415,7 @@ case, the return value is the length of the encoded text.
10415 10415
10416This function sets `last-coding-system-used' to the precise coding system 10416This function sets `last-coding-system-used' to the precise coding system
10417used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 10417used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
10418not fully specified.) */) 10418not fully specified.) The function does not change the match data. */)
10419 (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer) 10419 (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer)
10420{ 10420{
10421 return code_convert_string (string, coding_system, buffer, 10421 return code_convert_string (string, coding_system, buffer,