# HG changeset patch # User Karl Heuer # Date 856417501 0 # Node ID 1fa50c7fdde3a5167d4f598edc4bccf64773b860 # Parent cd1d930a2c9860016dd09882430a722c9fff3e5a (help-with-tutorial): Prefix argument to specify a language interactively. diff -r cd1d930a2c98 -r 1fa50c7fdde3 lisp/help.el --- a/lisp/help.el Thu Feb 20 05:44:24 1997 +0000 +++ b/lisp/help.el Thu Feb 20 05:45:01 1997 +0000 @@ -129,10 +129,17 @@ (interactive) nil) -(defun help-with-tutorial () - "Select the Emacs learn-by-doing tutorial." - (interactive) - (let ((file (expand-file-name "~/TUTORIAL"))) +(defun help-with-tutorial (&optional arg) + "Select the Emacs learn-by-doing tutorial. +A tutorial written in the current primary language is selected. +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)))) (delete-other-windows) (if (get-file-buffer file) (switch-to-buffer (get-file-buffer file)) @@ -140,7 +147,7 @@ (setq buffer-file-name file) (setq default-directory (expand-file-name "~/")) (setq buffer-auto-save-file-name nil) - (insert-file-contents (expand-file-name "TUTORIAL" data-directory)) + (insert-file-contents (expand-file-name filename data-directory)) (goto-char (point-min)) (search-forward "\n<<") (beginning-of-line)