diff -up /tmp/lsc.el.\~1\~ /tmp/lsc.el --- /tmp/lsc.el.~1~ 2011-02-21 17:22:14.214098588 +0900 +++ /tmp/lsc.el 2011-02-21 17:22:23.365735810 +0900 @@ -1,19 +1,19 @@ (defvar list-script-chars-handler-alist nil) (define-button-type 'active-char - 'face '(:background "gray") + 'face '(:background "grey10") 'action #'(lambda (button) - (copy-region-as-kill (button-start button) (button-end button)))) + (copy-region-as-kill (button-start button) (button-end button))) + 'help-echo #'(lambda (button) + (let* ((char (char-after (button-start button))) + (name (get-char-code-property char 'name))) + (format "U+%04X: %s" char name))) + 'mouse-face (list :background "yellow")) (defun make-character-button (char) (let ((name (get-char-code-property char 'name))) (when name - (insert-text-button - (string char) - :type 'active-char - 'help-echo (format "U+%04X: %s" char name) - ;; We must make this list each time to highlight only one character. - 'mouse-face (list :background "yellow"))))) + (insert-text-button (string char) :type 'active-char)))) ;; List characters in RANGE in the current buffer assuming that the ;; window width is 80, and tab-width is set to 4.