;;; 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
(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)
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
(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))
(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))
(goto-char (point-min))
(setq old-tut-point
(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))
(forward-line)
(setq tutorial--point-before-chkeys (point-marker)))