diff options
| -rw-r--r-- | doc/emacs/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/emacs/basic.texi | 21 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 16 | ||||
| -rw-r--r-- | etc/NEWS | 1 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/editfns.c | 37 |
8 files changed, 61 insertions, 33 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 72244c6dfa9..6783e843110 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-07-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * basic.texi (Inserting Text): Replace ucs-insert with | ||
| 4 | insert-char. Provide more details of input. | ||
| 5 | |||
| 6 | * mule.texi (International Chars, Input Methods): Likewise. | ||
| 7 | |||
| 1 | 2012-07-13 Chong Yidong <cyd@gnu.org> | 8 | 2012-07-13 Chong Yidong <cyd@gnu.org> |
| 2 | 9 | ||
| 3 | * custom.texi (Examining): Update C-h v message. | 10 | * custom.texi (Examining): Update C-h v message. |
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 9c4b303d282..16ccdba0866 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -97,28 +97,29 @@ To use decimal or hexadecimal instead of octal, set the variable | |||
| 97 | the letters @kbd{a} to @kbd{f} serve as part of a character code, | 97 | the letters @kbd{a} to @kbd{f} serve as part of a character code, |
| 98 | just like digits. Case is ignored. | 98 | just like digits. Case is ignored. |
| 99 | 99 | ||
| 100 | @findex ucs-insert | 100 | @findex insert-char |
| 101 | @kindex C-x 8 RET | 101 | @kindex C-x 8 RET |
| 102 | @cindex Unicode characters, inserting | 102 | @cindex Unicode characters, inserting |
| 103 | @cindex insert Unicode character | 103 | @cindex insert Unicode character |
| 104 | @cindex characters, inserting by name or code-point | 104 | @cindex characters, inserting by name or code-point |
| 105 | Instead of @kbd{C-q}, you can use the command @kbd{C-x 8 @key{RET}} | 105 | Alternatively, you can use the command @kbd{C-x 8 @key{RET}} |
| 106 | (@code{ucs-insert}). This prompts for the Unicode name or code-point | 106 | (@code{insert-char}). This prompts for the Unicode name or code-point |
| 107 | of a character, using the minibuffer. If you enter a name, the | 107 | of a character, using the minibuffer. If you enter a name, the |
| 108 | command provides completion (@pxref{Completion}). If you enter a | 108 | command provides completion (@pxref{Completion}). If you enter a |
| 109 | code-point, it should be a hexadecimal number (which is the convention | 109 | code-point, it should be as a hexadecimal number (the convention for |
| 110 | for Unicode). The command then inserts the corresponding character | 110 | Unicode), or a number with a specified radix, e.g.@: @code{#o23072} |
| 111 | into the buffer. For example, both of the following insert the | 111 | (octal); @xref{Integer Basics,,, elisp, The Emacs Lisp Reference |
| 112 | infinity sign (Unicode code-point @code{U+221E}): | 112 | Manual}. The command then inserts the corresponding character into |
| 113 | the buffer. For example, both of the following insert the infinity | ||
| 114 | sign (Unicode code-point @code{U+221E}): | ||
| 113 | 115 | ||
| 114 | @example | 116 | @example |
| 115 | @kbd{C-x 8 @key{RET} infinity @key{RET}} | 117 | @kbd{C-x 8 @key{RET} infinity @key{RET}} |
| 116 | @kbd{C-x 8 @key{RET} 221e @key{RET}} | 118 | @kbd{C-x 8 @key{RET} 221e @key{RET}} |
| 117 | @end example | 119 | @end example |
| 118 | 120 | ||
| 119 | A numeric argument to either @kbd{C-q} or @kbd{C-x 8 @key{RET}} | 121 | A numeric argument to @kbd{C-q} or @kbd{C-x 8 @key{RET}} specifies |
| 120 | specifies how many copies of the character to insert | 122 | how many copies of the character to insert (@pxref{Arguments}). |
| 121 | (@pxref{Arguments}). | ||
| 122 | 123 | ||
| 123 | @node Moving Point | 124 | @node Moving Point |
| 124 | @section Changing the Location of Point | 125 | @section Changing the Location of Point |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 59e945eee96..1dfae79c788 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -146,7 +146,7 @@ displayed on your terminal, they appear as @samp{?} or as hollow boxes | |||
| 146 | used, generally don't have keys for all the characters in them. You | 146 | used, generally don't have keys for all the characters in them. You |
| 147 | can insert characters that your keyboard does not support, using | 147 | can insert characters that your keyboard does not support, using |
| 148 | @kbd{C-q} (@code{quoted-insert}) or @kbd{C-x 8 @key{RET}} | 148 | @kbd{C-q} (@code{quoted-insert}) or @kbd{C-x 8 @key{RET}} |
| 149 | (@code{ucs-insert}). @xref{Inserting Text}. Emacs also supports | 149 | (@code{insert-char}). @xref{Inserting Text}. Emacs also supports |
| 150 | various @dfn{input methods}, typically one for each script or | 150 | various @dfn{input methods}, typically one for each script or |
| 151 | language, which make it easier to type characters in the script. | 151 | language, which make it easier to type characters in the script. |
| 152 | @xref{Input Methods}. | 152 | @xref{Input Methods}. |
| @@ -548,7 +548,7 @@ possible characters to type next is displayed in the echo area (but | |||
| 548 | not when you are in the minibuffer). | 548 | not when you are in the minibuffer). |
| 549 | 549 | ||
| 550 | Another facility for typing characters not on your keyboard is by | 550 | Another facility for typing characters not on your keyboard is by |
| 551 | using @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single | 551 | using @kbd{C-x 8 @key{RET}} (@code{insert-char}) to insert a single |
| 552 | character based on its Unicode name or code-point; see @ref{Inserting | 552 | character based on its Unicode name or code-point; see @ref{Inserting |
| 553 | Text}. | 553 | Text}. |
| 554 | 554 | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5378cc16cdb..bc01d64c509 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-07-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * text.texi (Insertion): Document insert-char changes. | ||
| 4 | |||
| 1 | 2012-07-15 Leo Liu <sdl.web@gmail.com> | 5 | 2012-07-15 Leo Liu <sdl.web@gmail.com> |
| 2 | 6 | ||
| 3 | * display.texi (Fringe Bitmaps): Add exclamation-mark. | 7 | * display.texi (Fringe Bitmaps): Add exclamation-mark. |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index c1e12ccf3a3..d115322f84f 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -401,19 +401,23 @@ ends at the insertion point, the inserted text falls inside that | |||
| 401 | overlay. | 401 | overlay. |
| 402 | @end defun | 402 | @end defun |
| 403 | 403 | ||
| 404 | @defun insert-char character count &optional inherit | 404 | @deffn Command insert-char character &optional count inherit |
| 405 | This function inserts @var{count} instances of @var{character} into the | 405 | This command inserts @var{count} instances of @var{character} into the |
| 406 | current buffer before point. The argument @var{count} should be an | 406 | current buffer before point. The argument @var{count} must be an |
| 407 | integer, and @var{character} must be a character. The value is @code{nil}. | 407 | integer, and @var{character} must be a character. |
| 408 | |||
| 409 | If called interactively, this command prompts for @var{character} | ||
| 410 | using its Unicode name or its code point. @xref{Inserting Text,,, | ||
| 411 | emacs, The GNU Emacs Manual}. | ||
| 408 | 412 | ||
| 409 | This function does not convert unibyte character codes 128 through 255 | 413 | This function does not convert unibyte character codes 128 through 255 |
| 410 | to multibyte characters, not even if the current buffer is a multibyte | 414 | to multibyte characters, not even if the current buffer is a multibyte |
| 411 | buffer. @xref{Converting Representations}. | 415 | buffer. @xref{Converting Representations}. |
| 412 | 416 | ||
| 413 | If @var{inherit} is non-@code{nil}, then the inserted characters inherit | 417 | If @var{inherit} is non-@code{nil}, the inserted characters inherit |
| 414 | sticky text properties from the two characters before and after the | 418 | sticky text properties from the two characters before and after the |
| 415 | insertion point. @xref{Sticky Properties}. | 419 | insertion point. @xref{Sticky Properties}. |
| 416 | @end defun | 420 | @end deffn |
| 417 | 421 | ||
| 418 | @defun insert-buffer-substring from-buffer-or-name &optional start end | 422 | @defun insert-buffer-substring from-buffer-or-name &optional start end |
| 419 | This function inserts a portion of buffer @var{from-buffer-or-name} | 423 | This function inserts a portion of buffer @var{from-buffer-or-name} |
| @@ -140,6 +140,7 @@ invokes `set-buffer-file-coding-system'. | |||
| 140 | ** Setting `enable-remote-dir-locals' to non-nil allows directory | 140 | ** Setting `enable-remote-dir-locals' to non-nil allows directory |
| 141 | local variables on remote hosts. | 141 | local variables on remote hosts. |
| 142 | 142 | ||
| 143 | +++ | ||
| 143 | ** `insert-char' is now a command, and `ucs-insert' an obsolete alias | 144 | ** `insert-char' is now a command, and `ucs-insert' an obsolete alias |
| 144 | for it. | 145 | for it. |
| 145 | 146 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 8c8ba4dd143..82bedfdf2c4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-07-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * editfns.c (Finsert_char): Doc fix. | ||
| 4 | |||
| 1 | 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru> | 5 | 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 6 | ||
| 3 | Fix previous change to make Fmemory_free always accurate. | 7 | Fix previous change to make Fmemory_free always accurate. |
diff --git a/src/editfns.c b/src/editfns.c index 5dc561a400e..9cfd0449daa 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -2369,27 +2369,34 @@ usage: (insert-before-markers-and-inherit &rest ARGS) */) | |||
| 2369 | } | 2369 | } |
| 2370 | 2370 | ||
| 2371 | DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3, | 2371 | DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3, |
| 2372 | "(list (read-char-by-name \"Unicode (name or hex): \")\ | 2372 | "(list (read-char-by-name \"Insert character (Unicode name or hex): \")\ |
| 2373 | (prefix-numeric-value current-prefix-arg)\ | 2373 | (prefix-numeric-value current-prefix-arg)\ |
| 2374 | t))", | 2374 | t))", |
| 2375 | doc: /* Insert COUNT copies of CHARACTER. | 2375 | doc: /* Insert COUNT copies of CHARACTER. |
| 2376 | Interactively, prompts for a Unicode character name or a hex number | 2376 | Interactively, prompt for CHARACTER. You can specify CHARACTER in one |
| 2377 | using `read-char-by-name'. | 2377 | of these ways: |
| 2378 | 2378 | ||
| 2379 | You can type a few of the first letters of the Unicode name and | 2379 | - As its Unicode character name, e.g. \"LATIN SMALL LETTER A\". |
| 2380 | use completion. If you type a substring of the Unicode name | 2380 | Completion is available; if you type a substring of the name |
| 2381 | preceded by an asterisk `*' and use completion, it will show all | 2381 | preceded by an asterisk `*', Emacs shows all names which include |
| 2382 | the characters whose names include that substring, not necessarily | 2382 | that substring, not necessarily at the beginning of the name. |
| 2383 | at the beginning of the name. | ||
| 2384 | 2383 | ||
| 2385 | This function also accepts a hexadecimal number of Unicode code | 2384 | - As a hexadecimal code point, e.g. 263A. Note that code points in |
| 2386 | point or a number in hash notation, e.g. #o21430 for octal, | 2385 | Emacs are equivalent to Unicode up to 10FFFF (which is the limit of |
| 2387 | #x2318 for hex, or #10r8984 for decimal. | 2386 | the Unicode code space). |
| 2388 | 2387 | ||
| 2389 | Point, and before-insertion markers, are relocated as in the function `insert'. | 2388 | - As a code point with a radix specified with #, e.g. #o21430 |
| 2390 | The optional third arg INHERIT, if non-nil, says to inherit text properties | 2389 | (octal), #x2318 (hex), or #10r8984 (decimal). |
| 2391 | from adjoining text, if those properties are sticky. If called | 2390 | |
| 2392 | interactively, INHERIT is t. */) | 2391 | If called interactively, COUNT is given by the prefix argument. If |
| 2392 | omitted or nil, it defaults to 1. | ||
| 2393 | |||
| 2394 | Inserting the character(s) relocates point and before-insertion | ||
| 2395 | markers in the same ways as the function `insert'. | ||
| 2396 | |||
| 2397 | The optional third argument INHERIT, if non-nil, says to inherit text | ||
| 2398 | properties from adjoining text, if those properties are sticky. If | ||
| 2399 | called interactively, INHERIT is t. */) | ||
| 2393 | (Lisp_Object character, Lisp_Object count, Lisp_Object inherit) | 2400 | (Lisp_Object character, Lisp_Object count, Lisp_Object inherit) |
| 2394 | { | 2401 | { |
| 2395 | int i, stringlen; | 2402 | int i, stringlen; |