;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/char.el (defun what-char (&optional pos) (interactive) (or pos (setq pos (point))) (let ((char (char-after pos))) (unless (characterp char) (error "No char") ) (let*((new (get-char-code-property char 'name)) (old (get-char-code-property char 'old-name)) (msg (downcase (if (and new old) (format "%s (old name: %s)" new old) (or new old) )))) (kill-new msg) (message msg) ))) (defalias 'char #'what-char) ;; (what-char) ; space ;; (what-char)} ; right curly bracket (old name closing curly bracket) ;; M-x what-char RET ; line feed (lf) (provide 'char)