X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c07a4c0b599e0debfb10acdf02ac6559b998a88a..fc0c5af8380cdbfa64fd082a65461e3cc20737b0:/lisp/tutorial.el diff --git a/lisp/tutorial.el b/lisp/tutorial.el index e0e2a82fab..39eb9e8b9a 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -1,6 +1,6 @@ ;;; tutorial.el --- tutorial for Emacs -;; Copyright (C) 2006-2012 Free Software Foundation, Inc. +;; Copyright (C) 2006-2013 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help, internal @@ -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)) @@ -829,10 +828,10 @@ Run the Viper tutorial? ")) (if old-tut-file (progn (insert-file-contents (tutorial--saved-file)) - (let ((enable-local-variables :safe)) + (let ((enable-local-variables :safe) + (enable-local-eval nil) + (enable-dir-local-variables nil)) ; bug#11127 (hack-local-variables)) - ;; FIXME? What we actually want is to ignore dir-locals (?). - (setq buffer-read-only nil) ; bug#11118 (goto-char (point-min)) (setq old-tut-point (string-to-number @@ -848,10 +847,10 @@ Run the Viper tutorial? ")) (goto-char tutorial--point-before-chkeys) (setq tutorial--point-before-chkeys (point-marker))) (insert-file-contents (expand-file-name filename tutorial-directory)) - (let ((enable-local-variables :safe)) + (let ((enable-local-variables :safe) + (enable-local-eval nil) + (enable-dir-local-variables nil)) ; bug#11127 (hack-local-variables)) - ;; FIXME? What we actually want is to ignore dir-locals (?). - (setq buffer-read-only nil) ; bug#11118 (forward-line) (setq tutorial--point-before-chkeys (point-marker)))