From 9a4ebc748797acc8af74f561367aa1b34ca02d2e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 11 Aug 2013 02:07:48 +0200 Subject: 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. --- lisp/tutorial.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lisp/tutorial.el') 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: " RET instead.")) (insert "\n\nWith your current key bindings" " you can use " - (if (string-match "^the .*menus?$" where) + (if (string-match-p "^the .*menus?$" where) "" "the key") where @@ -346,10 +346,8 @@ from the Emacs default:\n\n" ) (def-fun-txt (nth 2 tk)) (where (nth 3 tk)) (remark (nth 4 tk)) - (rem-fun (command-remapping def-fun)) (key-txt (key-description key)) - (key-fun (with-current-buffer tutorial-buffer (key-binding key))) - tot-len) + (key-fun (with-current-buffer tutorial-buffer (key-binding key)))) (unless (eq def-fun key-fun) ;; Insert key binding description: (when (string= key-txt explain-key-desc) @@ -723,9 +721,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 nil - (undo-only) - (error nil)) + (ignore-errors (undo-only)) ;; Restore point (goto-char old-point) (if save-err @@ -881,7 +877,7 @@ Run the Viper tutorial? ")) ;; or just delete the <<...>> line if a [...] line follows. (cond ((save-excursion (forward-line 1) - (looking-at "\\[")) + (looking-at-p "\\[")) (delete-region (point) (progn (forward-line 1) (point)))) ((looking-at "<>") (replace-match "[Middle of page left blank for didactic purposes. Text continues below]")) -- cgit v1.2.3