]> code.delx.au - gnu-emacs/blobdiff - lisp/cus-edit.el
* faces.el (secondary-selection): Change background to yellow.
[gnu-emacs] / lisp / cus-edit.el
index 38bc3eee2aa112c2e5b8e5965be87a68b62eba1a..5f876b66dce16fe0488684bff953a25e4efa58b9 100644 (file)
@@ -1153,10 +1153,13 @@ links: groups have links to subgroups."
                (const links))
   :group 'custom-buffer)
 
+(defun custom-bury-buffer (buffer)
+  (bury-buffer))
+
 (defcustom custom-buffer-done-function 'bury-buffer
   "*Function called to remove a Custom buffer when the user is done with it.
 Called with one argument, the buffer to remove."
-  :type '(choice (function-item bury-buffer)
+  :type '(choice (function-item custom-bury-buffer)
                 (function-item kill-buffer)
                 (function :tag "Other"))
   :version "21.1"
@@ -1952,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))