all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49420@debbugs.gnu.org
Subject: bug#49420: 28.0.50; Add elisp manual entry for subst-char-in-string
Date: Wed, 07 Jul 2021 21:59:31 +0300	[thread overview]
Message-ID: <m2o8bevtkc.fsf@fastmail.fm> (raw)
In-Reply-To: <835yxohdxr.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Jul 2021 20:24:00 +0300")

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

tags 49420 + patch
quit

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

>> From: Filipp Gunbin <fgunbin@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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1162 bytes --]

From 290b521f7429bed6656a967da204205bbd94c0a3 Mon Sep 17 00:00:00 2001
From: Filipp Gunbin <fgunbin@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


  reply	other threads:[~2021-07-07 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 17:13 bug#49420: 28.0.50; Add elisp manual entry for subst-char-in-string Filipp Gunbin
2021-07-05 17:24 ` Eli Zaretskii
2021-07-07 18:59   ` Filipp Gunbin [this message]
2021-07-10 17:00     ` Lars Ingebrigtsen
2021-07-10 17:16       ` Eli Zaretskii
2021-07-11  8:18         ` Basil L. Contovounesios
2021-07-11 10:16           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2o8bevtkc.fsf@fastmail.fm \
    --to=fgunbin@fastmail.fm \
    --cc=49420@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.