diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-09-29 23:21:50 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-09-29 23:21:50 -0400 |
commit | 38a30d64628c84690467008888984d14683f9c9d (patch) | |
tree | 7dd9124d6f6a5a809c8c3ad71e6ee4da3453e3c6 /lisp/tutorial.el | |
parent | 4ffb41a99e7bbbc83715cab8d7710afcaa571eec (diff) | |
download | emacs-38a30d64628c84690467008888984d14683f9c9d.tar.gz |
* lisp/tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook.
Diffstat (limited to 'lisp/tutorial.el')
-rw-r--r-- | lisp/tutorial.el | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 64879e5cfd5..6f76068ea9d 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -765,14 +765,13 @@ Run the Viper tutorial? ")) (funcall 'viper-tutorial 0)) (message "Tutorial aborted by user")) (message prompt1))) - (let* ((lang (if arg - (let ((minibuffer-setup-hook minibuffer-setup-hook)) - (add-hook 'minibuffer-setup-hook - 'minibuffer-completion-help) - (read-language-name 'tutorial "Language: " "English")) - (if (get-language-info current-language-environment 'tutorial) - current-language-environment - "English"))) + (let* ((lang (cond + (arg + (minibuffer-with-setup-hook #'minibuffer-completion-help + (read-language-name 'tutorial "Language: " "English"))) + ((get-language-info current-language-environment 'tutorial) + current-language-environment) + (t "English"))) (filename (get-language-info lang 'tutorial)) (tut-buf-name filename) (old-tut-buf (get-buffer tut-buf-name)) |