GNU bug report logs - #49420
28.0.50; Add elisp manual entry for subst-char-in-string

Previous Next

Package: emacs;

Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>

Date: Mon, 5 Jul 2021 17:14:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at control <at> debbugs.gnu.org (full text, mbox):

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49420 <at> debbugs.gnu.org
Subject: Re: bug#49420: 28.0.50; Add elisp manual entry for
 subst-char-in-string
Date: Wed, 07 Jul 2021 21:59:31 +0300
[Message part 1 (text/plain, inline)]
tags 49420 + patch
quit

On 05/07/2021 20:24 +0300, Eli Zaretskii wrote:

>> From: Filipp Gunbin <fgunbin <at> fastmail.fm>
>> Date: Mon, 05 Jul 2021 20:13:08 +0300
>> 
>> 
>> subst-char-in-region has its entry, but subst-char-in-string doesn't
>> have.  It's not clear to me what is the best node to add to: is it
>> "(elisp) Search and Replace"?
>
> I think right next to subst-char-in-region.

Something like this?

[0002-doc-lispref-text.texi-Substitution-Add-subst-char-in.patch (text/x-diff, inline)]
From 290b521f7429bed6656a967da204205bbd94c0a3 Mon Sep 17 00:00:00 2001
From: Filipp Gunbin <fgunbin <at> fastmail.fm>
Date: Wed, 7 Jul 2021 21:51:57 +0300
Subject: [PATCH 2/2] ; * doc/lispref/text.texi (Substitution): Add
 subst-char-in-string (Bug#49420)

---
 doc/lispref/text.texi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 0c87a19fa1..f6484c4d37 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4428,6 +4428,16 @@ Substitution
 @end example
 @end defun
 
+
+@defun subst-char-in-string fromchar tochar string &optional inplace
+@cindex replace characters in string
+This function replaces all occurences of the character @var{fromchar}
+with @var{tochar} in @var{string}.  Unless @var{inplace} is non-nil,
+substitution occurs in a copy of @var{string}.  In any case, the
+function returns the resulting string.  Both characters must have the
+same length of multi-byte form.
+@end defun
+
 @deffn Command translate-region start end table
 This function applies a translation table to the characters in the
 buffer between positions @var{start} and @var{end}.
-- 
2.32.0


This bug report was last modified 4 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.