mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
(custom-comment-create): Fill :from and :to slots
This commit is contained in:
parent
4a8adb0bc7
commit
6171a94539
1 changed files with 7 additions and 3 deletions
|
|
@ -1955,9 +1955,13 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
|
|||
|
||||
(defun custom-comment-create (widget)
|
||||
(let* ((null-comment (equal "" (widget-value widget))))
|
||||
(when (or (widget-get (widget-get widget :parent) :comment-shown)
|
||||
(not null-comment))
|
||||
(widget-default-create widget))))
|
||||
(if (or (widget-get (widget-get widget :parent) :comment-shown)
|
||||
(not null-comment))
|
||||
(widget-default-create widget)
|
||||
;; `widget-default-delete' expects markers in these slots --
|
||||
;; maybe it shouldn't.
|
||||
(widget-put widget :from (point-marker))
|
||||
(widget-put widget :to (point-marker)))))
|
||||
|
||||
(defun custom-comment-hide (widget)
|
||||
(widget-put (widget-get widget :parent) :comment-shown nil))
|
||||
|
|
|
|||
Loading…
Reference in a new issue