Convert more uses of looking-at' to following-char'

This follows up to Mark Oteiza's commit of 12 Feb 2017, 14:46:03 UTC
(commit 91478f4623) with more of the same.

* lisp/bookmark.el (bookmark-send-edited-annotation):
  (bookmark-bmenu-execute-deletions): Replace instances of looking-at
  with char comparisons using following-char.
This commit is contained in:
Karl Fogel 2017-02-12 17:21:06 -06:00
parent d4429dfd49
commit a84da83c1a

View file

@ -957,7 +957,7 @@ Lines beginning with `#' are ignored."
(error "Not in bookmark-edit-annotation-mode"))
(goto-char (point-min))
(while (< (point) (point-max))
(if (looking-at "^#")
(if (= (following-char) ?#)
(bookmark-kill-line t)
(forward-line 1)))
;; Take no chances with text properties.
@ -2064,7 +2064,7 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
(let ((o-point (point))
(o-str (save-excursion
(beginning-of-line)
(unless (looking-at "^D")
(unless (= (following-char) ?D)
(buffer-substring
(point)
(progn (end-of-line) (point))))))