X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/2311d8e5a62b8b6dd7dde45b4b8059d443e2abac..6b8504bae0773ffedb64ed2a48cad6f4d84e754d:/lisp/tutorial.el diff --git a/lisp/tutorial.el b/lisp/tutorial.el index b512700f5b..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 @@ -585,7 +585,6 @@ with some explanatory links." (not (get-text-property (match-beginning 1) 'tutorial-remark)) (let* ((desc (car changed-key)) (ck (cdr changed-key)) - (key (nth 0 ck)) (def-fun (nth 1 ck)) (where (nth 3 ck)) s1 s2 help-string) @@ -724,7 +723,7 @@ See `tutorial--save-tutorial' for more information." saved-file (error-message-string err)))) ;; An error is raised here?? Is this a bug? - (condition-case err + (condition-case nil (undo-only) (error nil)) ;; Restore point @@ -766,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)) @@ -830,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 @@ -849,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)))