* international/mule-cmds.el (read-char-by-name): Use \` and \'.
(ucs-insert): Doc fix. Check for hex digits in the string. Don't display `nil' in the error message. Fixes: debbugs:10857
This commit is contained in:
parent
f41ce09dbd
commit
19e9789e19
2 changed files with 16 additions and 3 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2012-02-22 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* international/mule-cmds.el (read-char-by-name): Use \` and \'.
|
||||
(ucs-insert): Doc fix. Check for hex digits in the string.
|
||||
Don't display `nil' in the error message. (Bug#10857)
|
||||
|
||||
2012-02-22 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* progmodes/cc-modes: revert change #2012-02-06T22:08:41Z!larsi@gnus.org from 2012-02-06.
|
||||
|
|
|
|||
|
|
@ -2949,9 +2949,9 @@ point or a number in hash notation, e.g. #o21430 for octal,
|
|||
'(metadata (category . unicode-name))
|
||||
(complete-with-action action (ucs-names) string pred))))))
|
||||
(cond
|
||||
((string-match-p "^[0-9a-fA-F]+$" input)
|
||||
((string-match-p "\\`[0-9a-fA-F]+\\'" input)
|
||||
(string-to-number input 16))
|
||||
((string-match-p "^#" input)
|
||||
((string-match-p "\\`#" input)
|
||||
(read input))
|
||||
(t
|
||||
(cdr (assoc-string input (ucs-names) t))))))
|
||||
|
|
@ -2967,6 +2967,10 @@ preceded by an asterisk `*' and use completion, it will show all
|
|||
the characters whose names include that substring, not necessarily
|
||||
at the beginning of the name.
|
||||
|
||||
This function also accepts a hexadecimal number of Unicode code
|
||||
point or a number in hash notation, e.g. #o21430 for octal,
|
||||
#x2318 for hex, or #10r8984 for decimal.
|
||||
|
||||
The optional third arg INHERIT (non-nil when called interactively),
|
||||
says to inherit text properties from adjoining text, if those
|
||||
properties are sticky."
|
||||
|
|
@ -2975,9 +2979,12 @@ properties are sticky."
|
|||
(prefix-numeric-value current-prefix-arg)
|
||||
t))
|
||||
(unless count (setq count 1))
|
||||
(if (stringp character)
|
||||
(if (and (stringp character)
|
||||
(string-match-p "\\`[0-9a-fA-F]+\\'" character))
|
||||
(setq character (string-to-number character 16)))
|
||||
(cond
|
||||
((null character)
|
||||
(error "Not a Unicode character"))
|
||||
((not (integerp character))
|
||||
(error "Not a Unicode character code: %S" character))
|
||||
((or (< character 0) (> character #x10FFFF))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue