diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2011-01-19 19:06:01 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2011-01-19 19:06:01 +0000 |
commit | b75b6a895171a7746ae3ff8fe5023ea32f018f6d (patch) | |
tree | 497de26aa07d94553c3db38f123d1e97d87bcb22 /generic/proof-script.el | |
parent | fcc24ce2d22b223c9868890f9b4cd9a9472274e3 (diff) |
pg-show-all-portions: protect against empty hash tables
Diffstat (limited to 'generic/proof-script.el')
-rw-r--r-- | generic/proof-script.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el index 2db38563..5919f80c 100644 --- a/generic/proof-script.el +++ b/generic/proof-script.el @@ -610,7 +610,9 @@ IDIOMSYM is a symbol and ID is a strings." (list (intern (completing-read - (concat "Make " (if current-prefix-arg "in" "") "visible all regions of: ") + (concat "Make " + (if current-prefix-arg "in" "") + "visible all regions of: ") (apply 'vector pg-idioms) nil t)) current-prefix-arg)) (let ((elts (cdr-safe (assq idiom pg-script-portions))) @@ -619,8 +621,9 @@ IDIOMSYM is a symbol and ID is a strings." (pg-set-element-span-invisible span t)) (lambda (k span) (pg-set-element-span-invisible span nil))))) - (proof-with-script-buffer ; may be called from menu - (maphash alterfn elts)))) + (when elts + (proof-with-script-buffer ; may be called from menu + (maphash alterfn elts))))) ;; Next two could be in pg-user.el. No key-bindings for these. (defun pg-show-all-proofs () |