mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-06 04:09:37 +00:00
Add emoji-zoom-reset
* lisp/international/emoji.el (emoji-zoom-map): Add emoji-zoom-reset. (emoji-zoom-reset): New function, it resets the zoom level. * lisp/international/mule-cmds.el (ctl-x-map): Add emoji-zoom-reset. * etc/NEWS: Announce new command.
This commit is contained in:
parent
470d269ec1
commit
305246d972
3 changed files with 22 additions and 2 deletions
5
etc/NEWS
5
etc/NEWS
|
@ -1021,6 +1021,11 @@ works for non-Emoji characters.)
|
||||||
These are bound to 'C-x 8 e +' and 'C-x 8 e -', respectively. They
|
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.
|
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'.
|
*** New input method 'emoji'.
|
||||||
This allows you to enter Emoji using short strings, eg ':face_palm:'
|
This allows you to enter Emoji using short strings, eg ':face_palm:'
|
||||||
|
|
|
@ -700,7 +700,8 @@ We prefer the earliest unique letter."
|
||||||
|
|
||||||
(defvar-keymap emoji-zoom-map
|
(defvar-keymap emoji-zoom-map
|
||||||
"+" #'emoji-zoom-increase
|
"+" #'emoji-zoom-increase
|
||||||
"-" #'emoji-zoom-decrease)
|
"-" #'emoji-zoom-decrease
|
||||||
|
"0" #'emoji-zoom-reset)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun emoji-zoom-increase (&optional factor)
|
(defun emoji-zoom-increase (&optional factor)
|
||||||
|
@ -741,6 +742,19 @@ FACTOR is the multiplication factor for the size."
|
||||||
(interactive)
|
(interactive)
|
||||||
(emoji-zoom-increase 0.9))
|
(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)
|
(provide 'emoji)
|
||||||
|
|
||||||
;;; emoji.el ends here
|
;;; emoji.el ends here
|
||||||
|
|
|
@ -3269,7 +3269,8 @@ single characters to be treated as standing for themselves."
|
||||||
"r" #'emoji-recent
|
"r" #'emoji-recent
|
||||||
"l" #'emoji-list
|
"l" #'emoji-list
|
||||||
"+" #'emoji-zoom-increase
|
"+" #'emoji-zoom-increase
|
||||||
"-" #'emoji-zoom-decrease))
|
"-" #'emoji-zoom-decrease
|
||||||
|
"0" #'emoji-zoom-reset))
|
||||||
|
|
||||||
(defface confusingly-reordered
|
(defface confusingly-reordered
|
||||||
'((((supports :underline (:style wave)))
|
'((((supports :underline (:style wave)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue