]> code.delx.au - gnu-emacs/blobdiff - lisp/cus-edit.el
(inferior-octave-complete): Use comint-line-beginning-position.
[gnu-emacs] / lisp / cus-edit.el
index c05c0d05666d30ee6f50fe682f434068a1ca88e3..ae4277ea098d1170b2300d60bcd2009331f7236a 100644 (file)
@@ -1295,7 +1295,16 @@ Un-customize all values in this buffer.  They get their standard settings."
   (widget-insert "   ")
   (widget-create 'push-button
                 :tag "Finish"
-                :help-echo "Bury or kill the buffer."
+                :help-echo
+                (lambda (&rest ignore)
+                  (concat (cond
+                           ((eq custom-buffer-done-function
+                                'custom-bury-buffer)
+                            "Bury")
+                           ((eq custom-buffer-done-function 'kill-buffer)
+                            "Kill")
+                           (t "Finish with"))              
+                          " the buffer."))
                 :action #'Custom-buffer-done)
   (widget-insert "\n\n")
   (message "Creating customization items...")
@@ -2414,7 +2423,6 @@ Optional EVENT is the location for the menu."
   "Restore the saved value for the variable being edited by WIDGET."
   (let* ((symbol (widget-value widget))
         (set (or (get symbol 'custom-set) 'set-default))
-        (comment-widget (widget-get widget :comment-widget))
         (value (get symbol 'saved-value))
         (comment (get symbol 'saved-variable-comment)))
     (cond ((or value comment)
@@ -2435,8 +2443,7 @@ Optional EVENT is the location for the menu."
 This operation eliminates any saved setting for the variable,
 restoring it to the state of a variable that has never been customized."
   (let* ((symbol (widget-value widget))
-        (set (or (get symbol 'custom-set) 'set-default))
-        (comment-widget (widget-get widget :comment-widget)))
+        (set (or (get symbol 'custom-set) 'set-default)))
     (if (get symbol 'standard-value)
        (funcall set symbol (eval (car (get symbol 'standard-value))))
       (error "No standard setting known for %S" symbol))