summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2013-08-11 02:07:48 +0200
committerJuanma Barranquero <lekktu@gmail.com>2013-08-11 02:07:48 +0200
commit9a4ebc748797acc8af74f561367aa1b34ca02d2e (patch)
tree47ff4c1682c4faeb34c44b7a881ddfa0e0a8926f /lisp/woman.el
parentb41bfdd0566140601f0adb65b0052246c1294bb6 (diff)
downloademacs-9a4ebc748797acc8af74f561367aa1b34ca02d2e.tar.gz
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/woman.el')
-rw-r--r--lisp/woman.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index 1cead32ab2f..b1be2d67b62 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -438,7 +438,7 @@ As a special case, if PATHS is nil then replace it by calling
(if (memq system-type '(windows-nt ms-dos))
(cond ((null paths)
(mapcar 'woman-Cyg-to-Win (woman-parse-man.conf)))
- ((string-match ";" paths)
+ ((string-match-p ";" paths)
;; Assume DOS-style path-list...
(woman-mapcan ; splice list into list
(lambda (x)
@@ -446,7 +446,7 @@ As a special case, if PATHS is nil then replace it by calling
(list x)
(mapcar 'woman-Cyg-to-Win (woman-parse-man.conf))))
(parse-colon-path paths)))
- ((string-match "\\`[a-zA-Z]:" paths)
+ ((string-match-p "\\`[a-zA-Z]:" paths)
;; Assume single DOS-style path...
(list paths))
(t
@@ -974,7 +974,7 @@ This is usually either black or white."
;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does
;; not seem to work and fonts may be repeated, so ...
(dolist (font fonts)
- (and (string-match "-Symbol-" font)
+ (and (string-match-p "-Symbol-" font)
(not (member font symbol-fonts))
(setq symbol-fonts (cons font symbol-fonts))))
symbol-fonts))
@@ -1173,7 +1173,7 @@ Used non-interactively, arguments are optional: if given then TOPIC
should be a topic string and non-nil RE-CACHE forces re-caching."
(interactive (list nil current-prefix-arg))
;; The following test is for non-interactive calls via gnudoit etc.
- (if (or (not (stringp topic)) (string-match "\\S " topic))
+ (if (or (not (stringp topic)) (string-match-p "\\S " topic))
(let ((file-name (woman-file-name topic re-cache)))
(if file-name
(woman-find-file file-name)
@@ -1614,7 +1614,7 @@ decompress the file if appropriate. See the documentation for the
(let* ((bufname (file-name-nondirectory file-name))
(case-fold-search t)
(compressed
- (not (not (string-match woman-file-compression-regexp bufname)))))
+ (and (string-match-p woman-file-compression-regexp bufname) t)))
(if compressed
(setq bufname (file-name-sans-extension bufname)))
(setq bufname (if exists
@@ -1756,7 +1756,7 @@ Leave point at end of new text. Return length of inserted text."
;; Co-operate with auto-compression mode:
(if (and compressed
(or (eq compressed t)
- (string-match woman-file-compression-regexp filename))
+ (string-match-p woman-file-compression-regexp filename))
;; (not auto-compression-mode)
(not (rassq 'jka-compr-handler file-name-handler-alist)) )
;; (error "Compressed file requires Auto File Decompression turned on")
@@ -2192,7 +2192,7 @@ To be called on original buffer and any .so insertions."
(let ((face-list (face-list)))
(dolist (face face-list)
(let ((face-name (symbol-name face)))
- (if (and (string-match "\\`woman-" face-name)
+ (if (and (string-match-p "\\`woman-" face-name)
(face-underline-p face))
(let ((face-no-ul (intern (concat face-name "-no-ul"))))
(copy-face face face-no-ul)
@@ -3029,6 +3029,8 @@ Leave point at TO (which should be a marker)."
"Delete any double-quote characters up to the end of the line."
(woman-unquote (save-excursion (end-of-line) (point-marker))))
+(defvar woman1-unquote) ; bound locally by woman1-roff-buffer
+
(defun woman1-roff-buffer ()
"Process non-breaking requests."
(let ((case-fold-search t)
@@ -3069,8 +3071,6 @@ Leave point at TO (which should be a marker)."
".I -- Set words of current line in italic font."
(woman1-B-or-I ".ft I\n"))
-(defvar woman1-unquote) ; bound locally by woman1-roff-buffer
-
(defun woman1-B-or-I (B-or-I)
".B/I -- Set words of current line in bold/italic font.
B-OR-I is the appropriate complete control line."