aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2012-02-23 01:35:07 +0200
committerJuri Linkov2012-02-23 01:35:07 +0200
commit19e9789e196ba5eea44ecac3ccf25658a6ffc04b (patch)
treedd77633a730892d9bc497101e26ec4f84b509cb1
parentf41ce09dbd1e923997c93d97725b4de52d856284 (diff)
downloademacs-19e9789e196ba5eea44ecac3ccf25658a6ffc04b.tar.gz
emacs-19e9789e196ba5eea44ecac3ccf25658a6ffc04b.zip
* 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
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/international/mule-cmds.el13
2 files changed, 16 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab39eb4d03c..eaf04e72ecd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-02-22 Juri Linkov <juri@jurta.org>
2
3 * international/mule-cmds.el (read-char-by-name): Use \` and \'.
4 (ucs-insert): Doc fix. Check for hex digits in the string.
5 Don't display `nil' in the error message. (Bug#10857)
6
12012-02-22 Alan Mackenzie <acm@muc.de> 72012-02-22 Alan Mackenzie <acm@muc.de>
2 8
3 * progmodes/cc-modes: revert change #2012-02-06T22:08:41Z!larsi@gnus.org from 2012-02-06. 9 * progmodes/cc-modes: revert change #2012-02-06T22:08:41Z!larsi@gnus.org from 2012-02-06.
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index a7fac427e41..debc328c551 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2949,9 +2949,9 @@ point or a number in hash notation, e.g. #o21430 for octal,
2949 '(metadata (category . unicode-name)) 2949 '(metadata (category . unicode-name))
2950 (complete-with-action action (ucs-names) string pred)))))) 2950 (complete-with-action action (ucs-names) string pred))))))
2951 (cond 2951 (cond
2952 ((string-match-p "^[0-9a-fA-F]+$" input) 2952 ((string-match-p "\\`[0-9a-fA-F]+\\'" input)
2953 (string-to-number input 16)) 2953 (string-to-number input 16))
2954 ((string-match-p "^#" input) 2954 ((string-match-p "\\`#" input)
2955 (read input)) 2955 (read input))
2956 (t 2956 (t
2957 (cdr (assoc-string input (ucs-names) t)))))) 2957 (cdr (assoc-string input (ucs-names) t))))))
@@ -2967,6 +2967,10 @@ preceded by an asterisk `*' and use completion, it will show all
2967the characters whose names include that substring, not necessarily 2967the characters whose names include that substring, not necessarily
2968at the beginning of the name. 2968at the beginning of the name.
2969 2969
2970This function also accepts a hexadecimal number of Unicode code
2971point or a number in hash notation, e.g. #o21430 for octal,
2972#x2318 for hex, or #10r8984 for decimal.
2973
2970The optional third arg INHERIT (non-nil when called interactively), 2974The optional third arg INHERIT (non-nil when called interactively),
2971says to inherit text properties from adjoining text, if those 2975says to inherit text properties from adjoining text, if those
2972properties are sticky." 2976properties are sticky."
@@ -2975,9 +2979,12 @@ properties are sticky."
2975 (prefix-numeric-value current-prefix-arg) 2979 (prefix-numeric-value current-prefix-arg)
2976 t)) 2980 t))
2977 (unless count (setq count 1)) 2981 (unless count (setq count 1))
2978 (if (stringp character) 2982 (if (and (stringp character)
2983 (string-match-p "\\`[0-9a-fA-F]+\\'" character))
2979 (setq character (string-to-number character 16))) 2984 (setq character (string-to-number character 16)))
2980 (cond 2985 (cond
2986 ((null character)
2987 (error "Not a Unicode character"))
2981 ((not (integerp character)) 2988 ((not (integerp character))
2982 (error "Not a Unicode character code: %S" character)) 2989 (error "Not a Unicode character code: %S" character))
2983 ((or (< character 0) (> character #x10FFFF)) 2990 ((or (< character 0) (> character #x10FFFF))