changeset 25847:f54121af02c8

(custom-comment-create): Fill :from and :to slots
author Dave Love <fx@gnu.org>
date Fri, 01 Oct 1999 22:04:30 +0000
parents 3c430bda7857
children 7094579127c8
files lisp/cus-edit.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Fri Oct 01 17:16:48 1999 +0000
+++ b/lisp/cus-edit.el	Fri Oct 01 22:04:30 1999 +0000
@@ -1955,9 +1955,13 @@
 
 (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))