mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Don't unconditionally append the :ascent property in wid-edit
* lisp/wid-edit.el (widget-toggle-value-create): Don't duplicate the :ascent property if already set. (Bug#81167)
This commit is contained in:
parent
d852d36c77
commit
e6e79b1e09
1 changed files with 7 additions and 3 deletions
|
|
@ -2546,9 +2546,13 @@ when he invoked the menu."
|
|||
(widget-get widget (if val :on :off))))
|
||||
(img (widget-image-find
|
||||
(widget-get widget (if val :on-glyph :off-glyph)))))
|
||||
(widget-image-insert widget (or text "")
|
||||
(if img
|
||||
(append img '(:ascent center))))))
|
||||
(and img (null (image-property img :ascent))
|
||||
;; Unlike (setf (image-property img :ascent) 'center), a simple
|
||||
;; `append' will not modify img as a side effect, and is safe
|
||||
;; to use here because the :ascent property is guaranteed to be
|
||||
;; absent.
|
||||
(setq img (append img '(:ascent center))))
|
||||
(widget-image-insert widget (or text "") img)))
|
||||
|
||||
(defun widget-toggle-action (widget &optional event)
|
||||
;; Toggle value.
|
||||
|
|
|
|||
Loading…
Reference in a new issue