From: Dave Love Date: Fri, 1 Oct 1999 22:04:30 +0000 (+0000) Subject: (custom-comment-create): Fill :from and :to slots X-Git-Tag: emacs-pretest-21.0.90~6595 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6171a9453950a147396eef409d30d98054ae2d74;p=emacs.git (custom-comment-create): Fill :from and :to slots --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index ef9abde7892..5f876b66dce 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -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))