diff options
| author | David Aspinall | 2000-07-03 11:28:28 +0000 |
|---|---|---|
| committer | David Aspinall | 2000-07-03 11:28:28 +0000 |
| commit | fff9a45d7770058207e5b510284d0019efc56919 (patch) | |
| tree | 4ad08e4871eb4384a8791d4a5aa985a570dc47e5 | |
| parent | 87e2337e6ed2beec88704f0f41d8133a4752ac5a (diff) | |
Patch to cope gracefully with empty list of Isabelle documents.
| -rw-r--r-- | isa/isabelle-system.el | 20 |
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." |
