summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-07-06 23:53:19 -0400
committerMark Oteiza <mvoteiza@udel.edu>2017-07-06 23:59:58 -0400
commit51275358e91d654e0cb49b749bf83d2fa19476c7 (patch)
tree970d07fdd0c9c7c2818781695237ef986c630c1d /lisp/help-fns.el
parent1eefada3f277e533cf74bc77ecd36f42c07a96cb (diff)
downloademacs-51275358e91d654e0cb49b749bf83d2fa19476c7.tar.gz
Convert more uses of looking-at to following-char
More followup to Karl Fogel's commit a84da83c1. * lisp/dired-aux.el (dired-add-entry, dired-subdir-hidden-p): * lisp/dired-x.el (dired-mark-unmarked-files, dired-mark-sexp): * lisp/help-fns.el (doc-file-to-man, doc-file-to-info): * lisp/proced.el (proced-toggle-marks): * lisp/progmodes/f90.el (f90-indent-line): * lisp/ses.el (ses-load): * lisp/tar-mode.el (tar-expunge): Replace instances of looking-at with char comparisons using following-char.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 32324ae3bcb..f5d94d8419f 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1271,14 +1271,14 @@ BUFFER should be a buffer or a buffer name."
(insert-file-contents file)
(let (notfirst)
(while (search-forward "" nil 'move)
- (if (looking-at "S")
+ (if (= (following-char) ?S)
(delete-region (1- (point)) (line-end-position))
(delete-char -1)
(if notfirst
(insert "\n.DE\n")
(setq notfirst t))
(insert "\n.SH ")
- (insert (if (looking-at "F") "Function " "Variable "))
+ (insert (if (= (following-char) ?F) "Function " "Variable "))
(delete-char 1)
(forward-line 1)
(insert ".DS L\n"))))
@@ -1304,7 +1304,7 @@ BUFFER should be a buffer or a buffer name."
(forward-char 1))
(goto-char (point-min))
(while (search-forward "" nil t)
- (unless (looking-at "S")
+ (when (/= (following-char) ?S)
(setq type (char-after)
name (buffer-substring (1+ (point)) (line-end-position))
doc (buffer-substring (line-beginning-position 2)