]> git.eshelyaron.com Git - emacs.git/commitdiff
Convert more uses of `looking-at' to `following-char'
authorKarl Fogel <kfogel@red-bean.com>
Sun, 12 Feb 2017 23:21:06 +0000 (17:21 -0600)
committerKarl Fogel <kfogel@red-bean.com>
Sun, 12 Feb 2017 23:21:06 +0000 (17:21 -0600)
This follows up to Mark Oteiza's commit of 12 Feb 2017, 14:46:03 UTC
(commit 91478f46238a) 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.

lisp/bookmark.el

index ab4363b023e11fe12ed4d40a11129c53ce2c3606..5b8ded7b22aa168e5ea6370424c1104cf4f75e62 100644 (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))))))