From: Chong Yidong Date: Tue, 19 Aug 2008 01:49:04 +0000 (+0000) Subject: (custom-toggle-hide): Allow hiding only if widget is saved. X-Git-Tag: emacs-pretest-23.0.90~3425 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fdbdd068b181f9b0981eca9ea189e5b7629a6f00;p=emacs.git (custom-toggle-hide): Allow hiding only if widget is saved. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 918f43a9da0..29152e12ce8 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2244,8 +2244,8 @@ and `face'." "Toggle visibility of WIDGET." (custom-load-widget widget) (let ((state (widget-get widget :custom-state))) - (cond ((memq state '(invalid modified)) - (error "There are unset changes")) + (cond ((memq state '(invalid modified set)) + (error "There are unsaved changes")) ((eq state 'hidden) (widget-put widget :custom-state 'unknown)) (t