]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve documentation of <Delete> in user manual
authorEli Zaretskii <eliz@gnu.org>
Mon, 25 Mar 2024 19:49:55 +0000 (21:49 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 30 Mar 2024 19:35:03 +0000 (20:35 +0100)
* doc/emacs/basic.texi (Erasing): Document that <Delete> deletes
entire grapheme clusters.

(cherry picked from commit 38faacf353fb4c8efb027019a4619a386edfe62c)

doc/emacs/basic.texi

index b1b1573729a90f583638ae7fd17028a645361416..a2a934ff24329e4e461ca9918b97ab41b2fc52ec 100644 (file)
@@ -406,8 +406,8 @@ Delete the character before point, or the region if it is active
 (@code{delete-backward-char}).
 
 @item @key{Delete}
-Delete the character after point, or the region if it is active
-(@code{delete-forward-char}).
+Delete the character or grapheme cluster after point, or the region if
+it is active (@code{delete-forward-char}).
 
 @item C-d
 Delete the character after point (@code{delete-char}).
@@ -438,11 +438,18 @@ with the @key{Delete} key; we will discuss @key{Delete} momentarily.)
 On some text terminals, Emacs may not recognize the @key{DEL} key
 properly.  @xref{DEL Does Not Delete}, if you encounter this problem.
 
+@cindex grapheme cluster, deletion
+@cindex delete entire grapheme cluster
   The @key{Delete} (@code{delete-forward-char}) command deletes in the
 opposite direction: it deletes the character after point, i.e., the
 character under the cursor.  If point was at the end of a line, this
 joins the following line onto this one.  Like @kbd{@key{DEL}}, it
 deletes the text in the region if the region is active (@pxref{Mark}).
+If the character after point is composed with following characters and
+displayed as a single display unit, a so-called @dfn{grapheme cluster}
+representing the entire sequence, @key{Delete} deletes the entire
+sequence in one go.  This is in contrast to @key{DEL} which always
+deletes a single character, even if the character is composed.
 
   @kbd{C-d} (@code{delete-char}) deletes the character after point,
 similar to @key{Delete}, but regardless of whether the region is