diff options
author | Glenn Morris <rgm@gnu.org> | 2020-07-22 07:50:47 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2020-07-22 07:50:47 -0700 |
commit | 496ee0911a427a43ee544d324caeadbf45e5c564 (patch) | |
tree | de1ee56f7dc44b8740935f9ebf80dceeee484f80 | |
parent | 0a71a7380fc5f364ccad64a89a2d4f962012dfd9 (diff) | |
parent | 4db3235fd8a99f20de414372524948982b23d1fc (diff) | |
download | emacs-496ee0911a427a43ee544d324caeadbf45e5c564.tar.gz |
Merge from origin/emacs-27
4db3235fd8 Run custom-magic-reset in the customize buffer
3c9c3f04de ; spelling fix
-rw-r--r-- | CONTRIBUTE | 2 | ||||
-rw-r--r-- | lisp/cus-edit.el | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index 26efbd7e5aa..4e42c7aafcc 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -63,7 +63,7 @@ also possible to use a command like However, we prefer the 'git format-patch' method with attachment, as doing so delivers patches in the correct and easily-recognizable format more reliably, and makes the job of applying the patches easier and less -error-prone. It also allows to send patches whose author is someone +error-prone. It also allows sending patches whose author is someone other than the email sender. Once the cumulative amount of your submissions exceeds about 15 lines diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 1ec27085506..1942f25e891 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2102,11 +2102,12 @@ and `face'." (insert " ")) (widget-put widget :children children)))) -(defun custom-magic-reset (widget) +(defun custom-magic-reset (widget &optional buffer) "Redraw the :custom-magic property of WIDGET." (let ((magic (widget-get widget :custom-magic))) (when magic - (widget-value-set magic (widget-value magic))))) + (with-current-buffer (or buffer (current-buffer)) + (widget-value-set magic (widget-value magic)))))) ;;; The `custom' Widget. @@ -2217,7 +2218,7 @@ and `face'." ;; commands like `M-u' (that work on a region in the buffer) ;; will upcase the wrong part of the buffer, since more text has ;; been inserted before point. - (run-with-idle-timer 0.0 nil #'custom-magic-reset widget) + (run-with-idle-timer 0.0 nil #'custom-magic-reset widget (current-buffer)) (apply 'widget-default-notify widget args)))) (defun custom-redraw (widget) |