These are bound to 'C-x 8 e +' and 'C-x 8 e -', respectively. They
can be used on any character, but are mainly useful for Emoji.
+---
+*** New command 'emoji-zoom-reset'.
+This is bound to 'C-x 8 e 0', and undoes any size changes performed by
+'emoji-zoom-increase' and 'emoji-zoom-decrease'.
+
---
*** New input method 'emoji'.
This allows you to enter Emoji using short strings, eg ':face_palm:'
(defvar-keymap emoji-zoom-map
"+" #'emoji-zoom-increase
- "-" #'emoji-zoom-decrease)
+ "-" #'emoji-zoom-decrease
+ "0" #'emoji-zoom-reset)
;;;###autoload
(defun emoji-zoom-increase (&optional factor)
(interactive)
(emoji-zoom-increase 0.9))
+;;;###autoload
+(defun emoji-zoom-reset ()
+ "Reset the size of the character under point."
+ (interactive)
+ (with-silent-modifications
+ (let ((old (get-text-property (point) 'face)))
+ (when (and (consp old)
+ (remove-text-properties (point) (1+ (point)) '(rear-nonsticky nil)))
+ (if (eq (car old) :height)
+ (remove-text-properties (point) (1+ (point)) '(face nil))
+ (add-text-properties (point) (1+ (point)) (list 'face
+ (cdr old))))))))
+
(provide 'emoji)
;;; emoji.el ends here
"r" #'emoji-recent
"l" #'emoji-list
"+" #'emoji-zoom-increase
- "-" #'emoji-zoom-decrease))
+ "-" #'emoji-zoom-decrease
+ "0" #'emoji-zoom-reset))
(defface confusingly-reordered
'((((supports :underline (:style wave)))