changeset 17756:0000a992fd24

(help-with-tutorial): Fix a bug of handling non-English tutorial file.
author Kenichi Handa <handa@m17n.org>
date Mon, 12 May 1997 06:56:21 +0000
parents 4c82e87c7d7c
children f008897b73f0
files lisp/help.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Mon May 12 06:56:20 1997 +0000
+++ b/lisp/help.el	Mon May 12 06:56:21 1997 +0000
@@ -135,11 +135,14 @@
 If there's no tutorial in the language, \"TUTORIAL\" is selected.
 With arg, users are asked to select language."
   (interactive "P")
-  (let* ((filename
-	  (let ((lang (if arg (read-language-name 'tutorial "Language: ")
-			primary-language)))
-	    (get-language-info lang 'tutorial)))
-	 (file (expand-file-name (concat "~/" filename))))
+  (let (lang filename file)
+    (if arg
+	(or (setq lang (read-language-name 'tutorial "Language: "))
+	    (error "No tutorial file of the specified language"))
+      (setq lang primary-language))
+    (setq filename (or (get-language-info lang 'tutorial)
+		       "TUTORIAL"))
+    (setq file (expand-file-name (concat "~/" filename)))
     (delete-other-windows)
     (if (get-file-buffer file)
 	(switch-to-buffer (get-file-buffer file))