]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-with-tutorial-alist): This variable deleted.
authorKenichi Handa <handa@m17n.org>
Thu, 9 Apr 1998 05:39:11 +0000 (05:39 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 9 Apr 1998 05:39:11 +0000 (05:39 +0000)
(help-with-tutorial): Get a tutorial file name by
get-language-info instead of help-with-tutorial-alist.

lisp/help.el

index 2f28e53796ef7f79edf73ac1a18511a86c3c6f3d..56f62f7b1fcc49d8c34893d2277585d5a1904d03 100644 (file)
@@ -166,14 +166,6 @@ Commands:
   (interactive)
   nil)
 
-(defvar help-with-tutorial-alist
-  '(("German" . "TUTORIAL.de")
-    ("Korean" . "TUTORIAL.kr")
-    ("Japanese" . "TUTORIAL.jp")
-    ("Thai" . "TUTORIAL.th")
-    ("English" . "TUTORIAL"))
-  "Alist mapping language names to their translated Emacs tutorial files.")
-
 (defun help-with-tutorial (&optional arg)
   "Select the Emacs learn-by-doing tutorial.
 If there is a tutorial version written in the language
@@ -181,16 +173,12 @@ of the selected language environment, that version is used.
 If there's no tutorial in that language, `TUTORIAL' is selected.
 With arg, you are asked to choose which language."
   (interactive "P")
-  (let (lang filename file)
-    (if arg
-       (or (setq lang
-                 (let* ((completion-ignore-case t))
-                   (completing-read "Language: " help-with-tutorial-alist
-                                    nil t)))
-           (error "No tutorial file in language"))
-      (setq lang current-language-environment))
-    (setq filename (or (cdr (assoc lang help-with-tutorial-alist))
-                      "TUTORIAL"))
+  (let ((lang (if arg
+                 (read-language-name 'tutorial "Language: " "English")
+               (if (get-language-info current-language-environment 'tutorial)
+                   current-language-environment
+                 "English"))))
+    (setq filename (get-language-info lang 'tutorial))
     (setq file (expand-file-name (concat "~/" filename)))
     (delete-other-windows)
     (if (get-file-buffer file)