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.
;; else try to find correct place to insert
(if (dired-goto-subdir directory)
(progn ;; unhide if necessary
- (if (looking-at-p "\r")
+ (if (= (following-char) ?\r)
;; Point is at end of subdir line.
(dired-unhide-subdir))
;; found - skip subdir and `total' line
(and selective-display
(save-excursion
(dired-goto-subdir dir)
- (looking-at-p "\r"))))
+ (= (following-char) ?\r))))
;;;###autoload
(defun dired-hide-subdir (arg)
(dired-mark-if
(and
;; not already marked
- (looking-at-p " ")
+ (= (following-char) ?\s)
;; uninteresting
(let ((fn (dired-get-filename localp t))
;; Match patterns case-insensitively on case-insensitive
(setq mode (buffer-substring (point) (+ mode-len (point))))
(forward-char mode-len)
;; Skip any extended attributes marker ("." or "+").
- (or (looking-at " ")
+ (or (= (following-char) ?\s)
(forward-char 1))
(setq nlink (read (current-buffer)))
;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
(insert-file-contents file)
(let (notfirst)
(while (search-forward "\1f" 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"))))
(forward-char 1))
(goto-char (point-min))
(while (search-forward "\1f" 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)
(while (not (eobp))
(cond ((looking-at mark-re)
(proced-insert-mark nil))
- ((looking-at " ")
+ ((= (following-char) ?\s)
(proced-insert-mark t))
(t
(forward-line 1)))))))
;; FIXME This means f90-calculate-indent gives different answers
;; for comments and preprocessor lines to this function.
;; Better to make f90-calculate-indent return the correct answer?
- (cond ((looking-at "!") (setq indent (f90-comment-indent)))
- ((looking-at "#") (setq indent 0))
+ (cond ((= (following-char) ?!) (setq indent (f90-comment-indent)))
+ ((= (following-char) ?#) (setq indent 0))
(t
(and f90-smart-end (looking-at "end")
(f90-match-end))
(setq ses--numlocprn 0)
(dotimes (_ numlocprn)
(let ((x (read (current-buffer))))
- (or (and (looking-at-p "\n")
+ (or (and (= (following-char) ?\n)
(eq (car-safe x) 'ses-local-printer)
(apply #'ses--local-printer (cdr x)))
(error "local printer-def error"))
(dotimes (col ses--numcols)
(let* ((x (read (current-buffer)))
(sym (car-safe (cdr-safe x))))
- (or (and (looking-at-p "\n")
+ (or (and (= (following-char) ?\n)
(eq (car-safe x) 'ses-cell)
(ses-create-cell-variable sym row col))
(error "Cell-def error"))
(save-excursion
(goto-char (point-min))
(while (not (eobp))
- (if (looking-at "D")
+ (if (= (following-char) ?D)
(progn (tar-expunge-internal)
(setq n (1+ n)))
(forward-line 1)))