]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve doc string of 'insert-char'
authorEli Zaretskii <eliz@gnu.org>
Fri, 18 Apr 2025 11:10:19 +0000 (14:10 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 21 Apr 2025 20:33:48 +0000 (22:33 +0200)
* src/editfns.c (Finsert_char): Doc fix.  Suggested by Lactose ‎
<lactose@allthingslinux.org> (bug#77889).

(cherry picked from commit 01d4eb3dd427feb3439378eab573d685daf47bb7)

src/editfns.c

index a938d09453489163aab6519a0d82f012f4d3349a..c4f23ccbe5b67495868ed33d6053a793abbbe2eb 100644 (file)
@@ -1440,8 +1440,9 @@ DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3,
               (prefix-numeric-value current-prefix-arg)\
               t))",
        doc: /* Insert COUNT copies of CHARACTER.
+
 Interactively, prompt for CHARACTER using `read-char-by-name'.
-You can specify CHARACTER in one of these ways:
+You can specify CHARACTER at the prompt in one of these ways:
 
  - As its Unicode character name, e.g. \"LATIN SMALL LETTER A\".
    Completion is available; if you type a substring of the name
@@ -1455,14 +1456,18 @@ You can specify CHARACTER in one of these ways:
  - As a code point with a radix specified with #, e.g. #o21430
    (octal), #x2318 (hex), or #10r8984 (decimal).
 
-If called interactively, COUNT is given by the prefix argument.  If
-omitted or nil, it defaults to 1.
+When called from Lisp, CHARACTER should be an integer whose value
+is valid for a character; see `characterp'.  To specify a character by
+its Unicode name in calls from Lisp, use `char-from-name'.
+
+When called interactively, COUNT is the prefix argument.  If omitted or
+nil, it defaults to 1.
 
 Inserting the character(s) relocates point and before-insertion
 markers in the same ways as the function `insert'.
 
 The optional third argument INHERIT, if non-nil, says to inherit text
-properties from adjoining text, if those properties are sticky.  If
+properties from adjoining text, if those properties are sticky.  When
 called interactively, INHERIT is t.  */)
   (Lisp_Object character, Lisp_Object count, Lisp_Object inherit)
 {