diff options
| author | Kenichi Handa | 1998-04-09 05:39:11 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-04-09 05:39:11 +0000 |
| commit | 3060bf835dc8fe52ba6a9a5d663efe020183c383 (patch) | |
| tree | 439b32b56a1847de8059ea974623c959d54ae36e | |
| parent | 8d4d1e65d5200f7d24685d7c4ed3d30ebc92b953 (diff) | |
| download | emacs-3060bf835dc8fe52ba6a9a5d663efe020183c383.tar.gz emacs-3060bf835dc8fe52ba6a9a5d663efe020183c383.zip | |
(help-with-tutorial-alist): This variable deleted.
(help-with-tutorial): Get a tutorial file name by
get-language-info instead of help-with-tutorial-alist.
| -rw-r--r-- | lisp/help.el | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/lisp/help.el b/lisp/help.el index 2f28e53796e..56f62f7b1fc 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -166,14 +166,6 @@ Commands: | |||
| 166 | (interactive) | 166 | (interactive) |
| 167 | nil) | 167 | nil) |
| 168 | 168 | ||
| 169 | (defvar help-with-tutorial-alist | ||
| 170 | '(("German" . "TUTORIAL.de") | ||
| 171 | ("Korean" . "TUTORIAL.kr") | ||
| 172 | ("Japanese" . "TUTORIAL.jp") | ||
| 173 | ("Thai" . "TUTORIAL.th") | ||
| 174 | ("English" . "TUTORIAL")) | ||
| 175 | "Alist mapping language names to their translated Emacs tutorial files.") | ||
| 176 | |||
| 177 | (defun help-with-tutorial (&optional arg) | 169 | (defun help-with-tutorial (&optional arg) |
| 178 | "Select the Emacs learn-by-doing tutorial. | 170 | "Select the Emacs learn-by-doing tutorial. |
| 179 | If there is a tutorial version written in the language | 171 | If there is a tutorial version written in the language |
| @@ -181,16 +173,12 @@ of the selected language environment, that version is used. | |||
| 181 | If there's no tutorial in that language, `TUTORIAL' is selected. | 173 | If there's no tutorial in that language, `TUTORIAL' is selected. |
| 182 | With arg, you are asked to choose which language." | 174 | With arg, you are asked to choose which language." |
| 183 | (interactive "P") | 175 | (interactive "P") |
| 184 | (let (lang filename file) | 176 | (let ((lang (if arg |
| 185 | (if arg | 177 | (read-language-name 'tutorial "Language: " "English") |
| 186 | (or (setq lang | 178 | (if (get-language-info current-language-environment 'tutorial) |
| 187 | (let* ((completion-ignore-case t)) | 179 | current-language-environment |
| 188 | (completing-read "Language: " help-with-tutorial-alist | 180 | "English")))) |
| 189 | nil t))) | 181 | (setq filename (get-language-info lang 'tutorial)) |
| 190 | (error "No tutorial file in language")) | ||
| 191 | (setq lang current-language-environment)) | ||
| 192 | (setq filename (or (cdr (assoc lang help-with-tutorial-alist)) | ||
| 193 | "TUTORIAL")) | ||
| 194 | (setq file (expand-file-name (concat "~/" filename))) | 182 | (setq file (expand-file-name (concat "~/" filename))) |
| 195 | (delete-other-windows) | 183 | (delete-other-windows) |
| 196 | (if (get-file-buffer file) | 184 | (if (get-file-buffer file) |