From: Stefan Monnier Date: Mon, 12 Sep 2011 02:18:23 +0000 (-0400) Subject: * lisp/international/mule-cmds.el (ucs-completions): Remove. X-Git-Tag: emacs-pretest-24.0.90~104^2~77 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=393a301e80860e90ba0ba718d29a2d72bc00eff7;p=emacs.git * lisp/international/mule-cmds.el (ucs-completions): Remove. (read-char-by-name): Use complete-with-action instead; add metadata. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8d55c4cc14..139863e4a58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-12 Stefan Monnier + + * international/mule-cmds.el (ucs-completions): Remove. + (read-char-by-name): Use complete-with-action instead; add metadata. + 2011-09-11 Chong Yidong * window.el (display-buffer--action-function-custom-type) @@ -19,8 +24,8 @@ Use switch-to-buffer. * cus-edit.el (customize-group, custom-buffer-create) - (customize-browse, custom-buffer-create-other-window): Use - switch-to-buffer or switch-to-buffer-other-window. + (customize-browse, custom-buffer-create-other-window): + Use switch-to-buffer or switch-to-buffer-other-window. * info.el (info, Info-find-node, Info-revert-find-node, Info-next) (Info-prev, Info-up, Info-speedbar-goto-node) @@ -86,8 +91,8 @@ (mail-other-window): Use switch-to-buffer-other-window. (mail-other-frame): USe switch-to-buffer-other-frame. - * progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use - display-buffer-other-frame. + * progmodes/gdb-mi.el (gdb-frame-gdb-buffer): + Use display-buffer-other-frame. (gdb-display-gdb-buffer): Use pop-to-buffer. * progmodes/gud.el (gud-goto-info): Use info-other-window. @@ -119,7 +124,7 @@ (display-buffer-use-some-window): Don't perform any special pop-up-frames handling. (pop-to-buffer): Use window-normalize-buffer-to-switch-to. - (display-buffer--maybe-same-window): Renamed from + (display-buffer--maybe-same-window): Rename from display-buffer-maybe-same-window. * info.el: Don't set same-window-regexps. @@ -317,7 +322,7 @@ 2011-09-03 Chong Yidong - * mail/sendmail.el (sendmail-query-once-function): Deleted. + * mail/sendmail.el (sendmail-query-once-function): Delete. (sendmail-query-once): Save directly to send-mail-function. Update message-send-mail-function too. @@ -329,7 +334,7 @@ start python interpreter from menu-bar (as reported by Geert Kloosterman). (inferior-python-mode-map): Fix typo. - (python-shell-map): Removed. + (python-shell-map): Remove. 2011-09-03 Deniz Dogan @@ -346,8 +351,8 @@ * window.el (window-deletable-p): Don't return a non-nil value when there's a buffer that was shown in the window before. (Bug#9419) - (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set - window's previous buffers to nil. + (display-buffer-pop-up-frame, display-buffer-pop-up-window): + Set window's previous buffers to nil. 2011-09-03 Eli Zaretskii @@ -361,7 +366,7 @@ 2011-09-02 Chong Yidong - * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Deleted. + * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Delete. (pop-to-buffer): Change interactive spec. Pass second argument directly to display-buffer. (display-buffer): Fix interactive spec. Use functionp to @@ -388,7 +393,7 @@ (display-buffer-reuse-or-pop-window) (display-buffer-use-some-window): New functions. (display-buffer-default-action): Use them. - (display-buffer-default): Deleted. + (display-buffer-default): Delete. (pop-to-buffer-1): Fix choice of actions. 2011-09-02 Stefan Monnier 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." (setq c (1+ c)))) (setq ucs-names names)))) -(defvar ucs-completions (lazy-completion-table ucs-completions ucs-names) - "Lazy completion table for completing on Unicode character names.") -(put 'ucs-completions 'risky-local-variable t) - (defun read-char-by-name (prompt) "Read a character by its Unicode name or hex number string. Display 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 point or a number in hash notation, e.g. #o21430 for octal, #x2318 for hex, or #10r8984 for decimal." (let* ((completion-ignore-case t) - (input (completing-read prompt ucs-completions))) + (input (completing-read + prompt + (lambda (string pred action) + (if (eq action 'metadata) + '(metadata (category . unicode-name)) + (complete-with-action action (ucs-names) string pred)))))) (cond ((string-match-p "^[0-9a-fA-F]+$" input) (string-to-number input 16))