Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created September 6, 2013 21:27
Show Gist options
  • Save jorgenschaefer/6470232 to your computer and use it in GitHub Desktop.
Save jorgenschaefer/6470232 to your computer and use it in GitHub Desktop.
(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