Created
September 6, 2013 21:27
-
-
Save jorgenschaefer/6470232 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key (kbd "C-x 8 p") 'fc/unicode-info-at-point) | |
(defun fc/unicode-info-at-point (&optional do-kill) | |
"Display the unicode name of the character at point." | |
(interactive "P") | |
(let ((char-code (elt (thing-at-point 'char) 0)) | |
name) | |
(setq name (get-char-code-property char-code 'name)) | |
(when (or (not name) | |
(= ?< (elt name 0))) | |
(setq name (get-char-code-property char-code 'old-name))) | |
(when do-kill | |
(kill-new name)) | |
(message "%s" name))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment