aboutsummaryrefslogtreecommitdiffhomepage
path: root/isa
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2000-07-03 11:28:28 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2000-07-03 11:28:28 +0000
commitfff9a45d7770058207e5b510284d0019efc56919 (patch)
tree4ad08e4871eb4384a8791d4a5aa985a570dc47e5 /isa
parent87e2337e6ed2beec88704f0f41d8133a4752ac5a (diff)
Patch to cope gracefully with empty list of Isabelle documents.
Diffstat (limited to 'isa')
-rw-r--r--isa/isabelle-system.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/isa/isabelle-system.el b/isa/isabelle-system.el
index 34335977..ac5f19d1 100644
--- a/isa/isabelle-system.el
+++ b/isa/isabelle-system.el
@@ -152,15 +152,17 @@ This function returns a list of lists of the form
of Isabelle document names and descriptions. When DOCNAME is
passed to isa-tool-doc-command, DOCNAME will be viewed."
(if (isa-set-isatool-command)
- (mapcar
- (function (lambda (docdes)
- (list
- (substring docdes (string-match "\\(\\S-+\\)[ \t]+" docdes)
- (match-end 1))
- (substring docdes (match-end 0)))))
- (split-string
- (isa-shell-command-to-string
- (concat isa-isatool-command " doc")) "\n"))))
+ (let ((docs (isa-shell-command-to-string
+ (concat isa-isatool-command " doc"))))
+ (unless (string-equal docs "")
+ (mapcar
+ (function (lambda (docdes)
+ (list
+ (substring docdes
+ (string-match "\\(\\S-+\\)[ \t]+" docdes)
+ (match-end 1))
+ (substring docdes (match-end 0)))))
+ (split-string docs "\n"))))))
(defun isa-tool-setup-font ()
"Setup special font for isabelle, using Isabelle tools."