aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/tutorial.el
diff options
context:
space:
mode:
authorXue Fuqiao2013-09-04 08:39:34 +0800
committerXue Fuqiao2013-09-04 08:39:34 +0800
commitadf2fc4a01efe77d73cd52bc9173914ed56ff531 (patch)
treea5a280a5554a7bffeaf94fccae29fa3ac1a5d066 /lisp/tutorial.el
parent63191d9f2043d2e67657e85a7b3842805dd1dad6 (diff)
parent38726039b77db432989fed106c88e9f1aa463281 (diff)
downloademacs-adf2fc4a01efe77d73cd52bc9173914ed56ff531.tar.gz
emacs-adf2fc4a01efe77d73cd52bc9173914ed56ff531.zip
Merge from mainline.
Diffstat (limited to 'lisp/tutorial.el')
-rw-r--r--lisp/tutorial.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 39eb9e8b9aa..d581cb13e28 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -156,7 +156,7 @@ options:
156 " RET instead.")) 156 " RET instead."))
157 (insert "\n\nWith your current key bindings" 157 (insert "\n\nWith your current key bindings"
158 " you can use " 158 " you can use "
159 (if (string-match "^the .*menus?$" where) 159 (if (string-match-p "^the .*menus?$" where)
160 "" 160 ""
161 "the key") 161 "the key")
162 where 162 where
@@ -346,10 +346,8 @@ from the Emacs default:\n\n" )
346 (def-fun-txt (nth 2 tk)) 346 (def-fun-txt (nth 2 tk))
347 (where (nth 3 tk)) 347 (where (nth 3 tk))
348 (remark (nth 4 tk)) 348 (remark (nth 4 tk))
349 (rem-fun (command-remapping def-fun))
350 (key-txt (key-description key)) 349 (key-txt (key-description key))
351 (key-fun (with-current-buffer tutorial-buffer (key-binding key))) 350 (key-fun (with-current-buffer tutorial-buffer (key-binding key))))
352 tot-len)
353 (unless (eq def-fun key-fun) 351 (unless (eq def-fun key-fun)
354 ;; Insert key binding description: 352 ;; Insert key binding description:
355 (when (string= key-txt explain-key-desc) 353 (when (string= key-txt explain-key-desc)
@@ -723,9 +721,7 @@ See `tutorial--save-tutorial' for more information."
723 saved-file 721 saved-file
724 (error-message-string err)))) 722 (error-message-string err))))
725 ;; An error is raised here?? Is this a bug? 723 ;; An error is raised here?? Is this a bug?
726 (condition-case nil 724 (ignore-errors (undo-only))
727 (undo-only)
728 (error nil))
729 ;; Restore point 725 ;; Restore point
730 (goto-char old-point) 726 (goto-char old-point)
731 (if save-err 727 (if save-err
@@ -881,7 +877,7 @@ Run the Viper tutorial? "))
881 ;; or just delete the <<...>> line if a [...] line follows. 877 ;; or just delete the <<...>> line if a [...] line follows.
882 (cond ((save-excursion 878 (cond ((save-excursion
883 (forward-line 1) 879 (forward-line 1)
884 (looking-at "\\[")) 880 (looking-at-p "\\["))
885 (delete-region (point) (progn (forward-line 1) (point)))) 881 (delete-region (point) (progn (forward-line 1) (point))))
886 ((looking-at "<<Blank lines inserted.*>>") 882 ((looking-at "<<Blank lines inserted.*>>")
887 (replace-match "[Middle of page left blank for didactic purposes. Text continues below]")) 883 (replace-match "[Middle of page left blank for didactic purposes. Text continues below]"))
@@ -896,7 +892,7 @@ Run the Viper tutorial? "))
896 ;; inserted at the start of the buffer, the "type C-v to 892 ;; inserted at the start of the buffer, the "type C-v to
897 ;; move to the next screen" might not be visible on the 893 ;; move to the next screen" might not be visible on the
898 ;; first screen (n < 0). How will the novice know what to do? 894 ;; first screen (n < 0). How will the novice know what to do?
899 (let ((n (- (window-height (selected-window)) 895 (let ((n (- (window-height)
900 (count-lines (point-min) (point)) 896 (count-lines (point-min) (point))
901 6))) 897 6)))
902 (if (< n 8) 898 (if (< n 8)