mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge from origin/emacs-29
305246d972Add emoji-zoom-reset470d269ec1Make emoji-zoom-{increase,decrease} set text properties c...63d4a86f8dFix transforming sliced images5e1953a8f8; * etc/NEWS: Minor copyedits of entry for 'keymap-*' fun...6b9f9df945; Improve documentation of 'declare-function'81d1f46d0f; Avoid compiler warning in eglot.el.38cdfcb212; Fix description of new 'keymap-*' functions257090b872Adapt EMBA scripts.90c07d3fddAnother terminology fix in ELisp reference manuala832bc7090Correct terminology in Elisp Reference Manualdb308233cbComment out GNUSTEP jobs on EMBA (again)8c1b102243; * lisp/image.el (put-image): Doc fix.eda88c63ad; * doc/emacs/trouble.texi (Checklist): Minor grammar fix.728bc09cf3Fix regexp string escaping mistake in vhdl-mode.el (bug#6...479626dbacUpdate to Org 9.6.3-2-gf2949d5a1c9aace7; Add a bit more docstring to tsx-ts-mode (bug#62429)86cf9fd932Eglot: don't watch directories that don't exist82d0b6c64e; * lisp/subr.el (use-dialog-box-p): Fix last change.3619663f98Preserve peer information for web page in eww-readablecb8d6ab648* lisp/subr.el (use-dialog-box-p): Fix conditions for GUI...fb2c440920; * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add some n... # Conflicts: # etc/NEWS
This commit is contained in:
commit
2d1a96e878
20 changed files with 172 additions and 112 deletions
|
|
@ -684,30 +684,41 @@ We prefer the earliest unique letter."
|
|||
|
||||
(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)
|
||||
"Increase the size of the character under point.
|
||||
FACTOR is the multiplication factor for the size."
|
||||
(interactive)
|
||||
(set-transient-map emoji-zoom-map t nil "Zoom with %k")
|
||||
(let* ((factor (or factor 1.1))
|
||||
(old (get-text-property (point) 'face))
|
||||
(height (or (and (consp old)
|
||||
(plist-get old :height))
|
||||
1.0))
|
||||
(inhibit-read-only t))
|
||||
(with-silent-modifications
|
||||
(if (consp old)
|
||||
(add-text-properties
|
||||
(point) (1+ (point))
|
||||
(list 'face (plist-put (copy-sequence old) :height (* height factor))
|
||||
'rear-nonsticky t))
|
||||
(add-face-text-property (point) (1+ (point))
|
||||
(list :height (* height factor)))
|
||||
(put-text-property (point) (1+ (point))
|
||||
'rear-nonsticky t)))))
|
||||
(set-transient-map emoji-zoom-map t #'redisplay "Zoom with %k")
|
||||
(unless (eobp)
|
||||
(let* ((factor (or factor 1.1))
|
||||
(old (get-text-property (point) 'face))
|
||||
;; The text property is either a named face, or a plist
|
||||
;; with :height, or a list starting with such a plist,
|
||||
;; followed by one or more faces.
|
||||
(newheight (* (or (and (consp old)
|
||||
(or (plist-get (car old) :height)
|
||||
(plist-get old :height)))
|
||||
1.0)
|
||||
factor))
|
||||
(inhibit-read-only t))
|
||||
(with-silent-modifications
|
||||
(if (consp old)
|
||||
(add-text-properties
|
||||
(point) (1+ (point))
|
||||
(list 'face
|
||||
(if (eq (car old) :height)
|
||||
(plist-put (copy-sequence old) :height newheight)
|
||||
(cons (plist-put (car old) :height newheight)
|
||||
(cdr old)))
|
||||
'rear-nonsticky t))
|
||||
(add-face-text-property (point) (1+ (point))
|
||||
(list :height newheight))
|
||||
(put-text-property (point) (1+ (point))
|
||||
'rear-nonsticky t))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun emoji-zoom-decrease ()
|
||||
|
|
@ -715,6 +726,19 @@ FACTOR is the multiplication factor for the size."
|
|||
(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
|
||||
|
|
|
|||
|
|
@ -3269,7 +3269,8 @@ single characters to be treated as standing for themselves."
|
|||
"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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue