aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/tutorial.el
diff options
context:
space:
mode:
authorJuanma Barranquero2013-08-11 02:07:48 +0200
committerJuanma Barranquero2013-08-11 02:07:48 +0200
commit9a4ebc748797acc8af74f561367aa1b34ca02d2e (patch)
tree47ff4c1682c4faeb34c44b7a881ddfa0e0a8926f /lisp/tutorial.el
parentb41bfdd0566140601f0adb65b0052246c1294bb6 (diff)
downloademacs-9a4ebc748797acc8af74f561367aa1b34ca02d2e.tar.gz
emacs-9a4ebc748797acc8af74f561367aa1b34ca02d2e.zip
lisp/*.el: More lexical-binding warnings' cleanups.
* tutorial.el (tutorial--describe-nonstandard-key): Use string-match-p. (tutorial--detailed-help): Remove unused local variables. (tutorial--save-tutorial-to): Use ignore-errors. (help-with-tutorial): Use looking-at-p. * view.el (view-buffer-other-window, view-buffer-other-frame): Mark unused arguments. * woman.el (woman-parse-colon-path, woman-parse-colon-path) (woman-select-symbol-fonts, woman, woman-find-file) (woman-insert-file-contents, woman-non-underline-faces): Use string-match-p. (woman1-unquote): Move declaration. * xml.el (xml-parse-tag-1, xml-parse-string): Use looking-at-p. (xml-parse-dtd): Use looking-at-p, string-match-p. Mark unused argument. Remove unused local variable. (xml-parse-elem-type): Use string-match-p. (xml-substitute-numeric-entities): Use ignore-errors.
Diffstat (limited to 'lisp/tutorial.el')
-rw-r--r--lisp/tutorial.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 6fb8d05f438..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]"))