aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2011-09-11 22:18:23 -0400
committerStefan Monnier2011-09-11 22:18:23 -0400
commit393a301e80860e90ba0ba718d29a2d72bc00eff7 (patch)
tree68032e6a16caeab5985d76f899433b3293548fa8
parentaa357b80f9c4582375f3cf0ed96490713b164f64 (diff)
downloademacs-393a301e80860e90ba0ba718d29a2d72bc00eff7.tar.gz
emacs-393a301e80860e90ba0ba718d29a2d72bc00eff7.zip
* lisp/international/mule-cmds.el (ucs-completions): Remove.
(read-char-by-name): Use complete-with-action instead; add metadata.
-rw-r--r--lisp/ChangeLog27
-rw-r--r--lisp/international/mule-cmds.el11
2 files changed, 22 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a8d55c4cc14..139863e4a58 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * international/mule-cmds.el (ucs-completions): Remove.
4 (read-char-by-name): Use complete-with-action instead; add metadata.
5
12011-09-11 Chong Yidong <cyd@stupidchicken.com> 62011-09-11 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * window.el (display-buffer--action-function-custom-type) 8 * window.el (display-buffer--action-function-custom-type)
@@ -19,8 +24,8 @@
19 Use switch-to-buffer. 24 Use switch-to-buffer.
20 25
21 * cus-edit.el (customize-group, custom-buffer-create) 26 * cus-edit.el (customize-group, custom-buffer-create)
22 (customize-browse, custom-buffer-create-other-window): Use 27 (customize-browse, custom-buffer-create-other-window):
23 switch-to-buffer or switch-to-buffer-other-window. 28 Use switch-to-buffer or switch-to-buffer-other-window.
24 29
25 * info.el (info, Info-find-node, Info-revert-find-node, Info-next) 30 * info.el (info, Info-find-node, Info-revert-find-node, Info-next)
26 (Info-prev, Info-up, Info-speedbar-goto-node) 31 (Info-prev, Info-up, Info-speedbar-goto-node)
@@ -86,8 +91,8 @@
86 (mail-other-window): Use switch-to-buffer-other-window. 91 (mail-other-window): Use switch-to-buffer-other-window.
87 (mail-other-frame): USe switch-to-buffer-other-frame. 92 (mail-other-frame): USe switch-to-buffer-other-frame.
88 93
89 * progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use 94 * progmodes/gdb-mi.el (gdb-frame-gdb-buffer):
90 display-buffer-other-frame. 95 Use display-buffer-other-frame.
91 (gdb-display-gdb-buffer): Use pop-to-buffer. 96 (gdb-display-gdb-buffer): Use pop-to-buffer.
92 97
93 * progmodes/gud.el (gud-goto-info): Use info-other-window. 98 * progmodes/gud.el (gud-goto-info): Use info-other-window.
@@ -119,7 +124,7 @@
119 (display-buffer-use-some-window): Don't perform any special 124 (display-buffer-use-some-window): Don't perform any special
120 pop-up-frames handling. 125 pop-up-frames handling.
121 (pop-to-buffer): Use window-normalize-buffer-to-switch-to. 126 (pop-to-buffer): Use window-normalize-buffer-to-switch-to.
122 (display-buffer--maybe-same-window): Renamed from 127 (display-buffer--maybe-same-window): Rename from
123 display-buffer-maybe-same-window. 128 display-buffer-maybe-same-window.
124 129
125 * info.el: Don't set same-window-regexps. 130 * info.el: Don't set same-window-regexps.
@@ -317,7 +322,7 @@
317 322
3182011-09-03 Chong Yidong <cyd@stupidchicken.com> 3232011-09-03 Chong Yidong <cyd@stupidchicken.com>
319 324
320 * mail/sendmail.el (sendmail-query-once-function): Deleted. 325 * mail/sendmail.el (sendmail-query-once-function): Delete.
321 (sendmail-query-once): Save directly to send-mail-function. 326 (sendmail-query-once): Save directly to send-mail-function.
322 Update message-send-mail-function too. 327 Update message-send-mail-function too.
323 328
@@ -329,7 +334,7 @@
329 start python interpreter from menu-bar (as reported by Geert 334 start python interpreter from menu-bar (as reported by Geert
330 Kloosterman). 335 Kloosterman).
331 (inferior-python-mode-map): Fix typo. 336 (inferior-python-mode-map): Fix typo.
332 (python-shell-map): Removed. 337 (python-shell-map): Remove.
333 338
3342011-09-03 Deniz Dogan <deniz@dogan.se> 3392011-09-03 Deniz Dogan <deniz@dogan.se>
335 340
@@ -346,8 +351,8 @@
346 * window.el (window-deletable-p): Don't return a non-nil value 351 * window.el (window-deletable-p): Don't return a non-nil value
347 when there's a buffer that was shown in the window before. 352 when there's a buffer that was shown in the window before.
348 (Bug#9419) 353 (Bug#9419)
349 (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set 354 (display-buffer-pop-up-frame, display-buffer-pop-up-window):
350 window's previous buffers to nil. 355 Set window's previous buffers to nil.
351 356
3522011-09-03 Eli Zaretskii <eliz@gnu.org> 3572011-09-03 Eli Zaretskii <eliz@gnu.org>
353 358
@@ -361,7 +366,7 @@
361 366
3622011-09-02 Chong Yidong <cyd@stupidchicken.com> 3672011-09-02 Chong Yidong <cyd@stupidchicken.com>
363 368
364 * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Deleted. 369 * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Delete.
365 (pop-to-buffer): Change interactive spec. Pass second argument 370 (pop-to-buffer): Change interactive spec. Pass second argument
366 directly to display-buffer. 371 directly to display-buffer.
367 (display-buffer): Fix interactive spec. Use functionp to 372 (display-buffer): Fix interactive spec. Use functionp to
@@ -388,7 +393,7 @@
388 (display-buffer-reuse-or-pop-window) 393 (display-buffer-reuse-or-pop-window)
389 (display-buffer-use-some-window): New functions. 394 (display-buffer-use-some-window): New functions.
390 (display-buffer-default-action): Use them. 395 (display-buffer-default-action): Use them.
391 (display-buffer-default): Deleted. 396 (display-buffer-default): Delete.
392 (pop-to-buffer-1): Fix choice of actions. 397 (pop-to-buffer-1): Fix choice of actions.
393 398
3942011-09-02 Stefan Monnier <monnier@iro.umontreal.ca> 3992011-09-02 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 128fb86b7b4..3276447e72f 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2914,10 +2914,6 @@ on encoding."
2914 (setq c (1+ c)))) 2914 (setq c (1+ c))))
2915 (setq ucs-names names)))) 2915 (setq ucs-names names))))
2916 2916
2917(defvar ucs-completions (lazy-completion-table ucs-completions ucs-names)
2918 "Lazy completion table for completing on Unicode character names.")
2919(put 'ucs-completions 'risky-local-variable t)
2920
2921(defun read-char-by-name (prompt) 2917(defun read-char-by-name (prompt)
2922 "Read a character by its Unicode name or hex number string. 2918 "Read a character by its Unicode name or hex number string.
2923Display PROMPT and read a string that represents a character by its 2919Display PROMPT and read a string that represents a character by its
@@ -2935,7 +2931,12 @@ This function also accepts a hexadecimal number of Unicode code
2935point or a number in hash notation, e.g. #o21430 for octal, 2931point or a number in hash notation, e.g. #o21430 for octal,
2936#x2318 for hex, or #10r8984 for decimal." 2932#x2318 for hex, or #10r8984 for decimal."
2937 (let* ((completion-ignore-case t) 2933 (let* ((completion-ignore-case t)
2938 (input (completing-read prompt ucs-completions))) 2934 (input (completing-read
2935 prompt
2936 (lambda (string pred action)
2937 (if (eq action 'metadata)
2938 '(metadata (category . unicode-name))
2939 (complete-with-action action (ucs-names) string pred))))))
2939 (cond 2940 (cond
2940 ((string-match-p "^[0-9a-fA-F]+$" input) 2941 ((string-match-p "^[0-9a-fA-F]+$" input)
2941 (string-to-number input 16)) 2942 (string-to-number input 16))