From 2bdb2cd10d08a1d9c9a187c7d967fdc64b8e6743 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd <mattiase@acm.org> Date: Thu, 28 May 2020 16:37:27 +0200 Subject: 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). --- src/coding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/coding.c') 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. This function sets `last-coding-system-used' to the precise coding system used (which may be different from CODING-SYSTEM if CODING-SYSTEM is -not fully specified.) */) +not fully specified.) The function does not change the match data. */) (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer) { return code_convert_string (string, coding_system, buffer, @@ -10415,7 +10415,7 @@ case, the return value is the length of the encoded text. This function sets `last-coding-system-used' to the precise coding system used (which may be different from CODING-SYSTEM if CODING-SYSTEM is -not fully specified.) */) +not fully specified.) The function does not change the match data. */) (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer) { return code_convert_string (string, coding_system, buffer, -- cgit v1.2.3