From: Lars Ingebrigtsen Date: Fri, 1 Jul 2022 09:11:47 +0000 (+0200) Subject: Make the emoji-zoom commands use a transient map for repetition X-Git-Tag: emacs-29.0.90~1447^2~1305 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0e15c3814665b57c005b4e05000e712841463f1;p=emacs.git Make the emoji-zoom commands use a transient map for repetition * lisp/international/emoji.el (emoji-zoom-increase) (emoji-zoom-decrease): Use a transient map for convenience. --- diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el index 6a65bc43dc7..b108788571c 100644 --- a/lisp/international/emoji.el +++ b/lisp/international/emoji.el @@ -707,10 +707,12 @@ We prefer the earliest unique letter." ;;;###autoload (defun emoji-zoom-increase (&optional factor) "Increase the size of the character under point. -FACTOR is the multiplication factor for the size. - -This command will be repeatable if `repeat-mode' is switched on." +FACTOR is the multiplication factor for the size." (interactive) + (message + (substitute-command-keys + "Zoom with with \\\\[emoji-zoom-increase] and \\[emoji-zoom-decrease]")) + (set-transient-map emoji-zoom-map t) (let* ((factor (or factor 1.1)) (old (get-text-property (point) 'face)) (height (or (and (consp old) @@ -728,18 +730,12 @@ This command will be repeatable if `repeat-mode' is switched on." (put-text-property (point) (1+ (point)) 'rear-nonsticky t))))) -(put 'emoji-zoom-increase 'repeat-map 'emoji-zoom-map) - ;;;###autoload (defun emoji-zoom-decrease () - "Decrease the size of the character under point. - -This command will be repeatable if `repeat-mode' is switched on." + "Decrease the size of the character under point." (interactive) (emoji-zoom-increase 0.9)) -(put 'emoji-zoom-decrease 'repeat-map 'emoji-zoom-map) - (provide 'emoji) ;;; emoji.el ends here