emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105741: * lisp/international/mule-cm


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105741: * lisp/international/mule-cmds.el (ucs-completions): Remove.
Date: Sun, 11 Sep 2011 22:18:23 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105741
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2011-09-11 22:18:23 -0400
message:
  * lisp/international/mule-cmds.el (ucs-completions): Remove.
  (read-char-by-name): Use complete-with-action instead; add metadata.
modified:
  lisp/ChangeLog
  lisp/international/mule-cmds.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-11 21:47:39 +0000
+++ b/lisp/ChangeLog    2011-09-12 02:18:23 +0000
@@ -1,3 +1,8 @@
+2011-09-12  Stefan Monnier  <address@hidden>
+
+       * international/mule-cmds.el (ucs-completions): Remove.
+       (read-char-by-name): Use complete-with-action instead; add metadata.
+
 2011-09-11  Chong Yidong  <address@hidden>
 
        * 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  <address@hidden>
 
-       * 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  <address@hidden>
 
@@ -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  <address@hidden>
 
@@ -361,7 +366,7 @@
 
 2011-09-02  Chong Yidong  <address@hidden>
 
-       * 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  <address@hidden>

=== modified file 'lisp/international/mule-cmds.el'
--- a/lisp/international/mule-cmds.el   2011-07-15 14:24:09 +0000
+++ b/lisp/international/mule-cmds.el   2011-09-12 02:18:23 +0000
@@ -2914,10 +2914,6 @@
            (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 @@
 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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]