From fdbdd068b181f9b0981eca9ea189e5b7629a6f00 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 19 Aug 2008 01:49:04 +0000 Subject: [PATCH] (custom-toggle-hide): Allow hiding only if widget is saved. --- lisp/cus-edit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2