forked from Github/emacs
(custom-toggle-hide): Allow hiding only if widget is saved.
This commit is contained in:
parent
ca40134198
commit
fdbdd068b1
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue