aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRené Kyllingstad2012-07-17 12:17:23 +0800
committerChong Yidong2012-07-17 12:17:23 +0800
commitddfc8813451b43f1cdb06fd07a47123b9f92bd70 (patch)
tree88fc0e2b4bfbf9cd675f569e07e6b5fd6f6552fa /src
parent7c26cf3ccd4ea49d42c2b3d21e59330143085f17 (diff)
downloademacs-ddfc8813451b43f1cdb06fd07a47123b9f92bd70.tar.gz
emacs-ddfc8813451b43f1cdb06fd07a47123b9f92bd70.zip
Make insert-char interactive, and ucs-insert an obsolete alias for it.
* lisp/international/mule-cmds.el (ucs-insert): Make it an obsolete alias for insert-char. * editfns.c (Finsert_char): Make it interactive, and make the second arg optional. Copy interactive spec and docstring from ucs-insert.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/editfns.c23
2 files changed, 27 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9949c65ba71..4a77507e557 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
2
3 * editfns.c (Finsert_char): Make it interactive, and make the
4 second arg optional. Copy interactive spec and docstring from
5 ucs-insert.
6
12012-07-17 Paul Eggert <eggert@cs.ucla.edu> 72012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913). 9 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
diff --git a/src/editfns.c b/src/editfns.c
index 32d11faa216..5dc561a400e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2368,11 +2368,28 @@ usage: (insert-before-markers-and-inherit &rest ARGS) */)
2368 return Qnil; 2368 return Qnil;
2369} 2369}
2370 2370
2371DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, 2371DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3,
2372 "(list (read-char-by-name \"Unicode (name or hex): \")\
2373 (prefix-numeric-value current-prefix-arg)\
2374 t))",
2372 doc: /* Insert COUNT copies of CHARACTER. 2375 doc: /* Insert COUNT copies of CHARACTER.
2376Interactively, prompts for a Unicode character name or a hex number
2377using `read-char-by-name'.
2378
2379You can type a few of the first letters of the Unicode name and
2380use completion. If you type a substring of the Unicode name
2381preceded by an asterisk `*' and use completion, it will show all
2382the characters whose names include that substring, not necessarily
2383at the beginning of the name.
2384
2385This function also accepts a hexadecimal number of Unicode code
2386point or a number in hash notation, e.g. #o21430 for octal,
2387#x2318 for hex, or #10r8984 for decimal.
2388
2373Point, and before-insertion markers, are relocated as in the function `insert'. 2389Point, and before-insertion markers, are relocated as in the function `insert'.
2374The optional third arg INHERIT, if non-nil, says to inherit text properties 2390The optional third arg INHERIT, if non-nil, says to inherit text properties
2375from adjoining text, if those properties are sticky. */) 2391from adjoining text, if those properties are sticky. If called
2392interactively, INHERIT is t. */)
2376 (Lisp_Object character, Lisp_Object count, Lisp_Object inherit) 2393 (Lisp_Object character, Lisp_Object count, Lisp_Object inherit)
2377{ 2394{
2378 int i, stringlen; 2395 int i, stringlen;
@@ -2382,6 +2399,8 @@ from adjoining text, if those properties are sticky. */)
2382 char string[4000]; 2399 char string[4000];
2383 2400
2384 CHECK_CHARACTER (character); 2401 CHECK_CHARACTER (character);
2402 if (NILP (count))
2403 XSETFASTINT (count, 1);
2385 CHECK_NUMBER (count); 2404 CHECK_NUMBER (count);
2386 c = XFASTINT (character); 2405 c = XFASTINT (character);
2387 2406