emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a84da83: Convert more uses of `looking-at' to `foll


From: Karl Fogel
Subject: [Emacs-diffs] master a84da83: Convert more uses of `looking-at' to `following-char'
Date: Sun, 12 Feb 2017 18:21:11 -0500 (EST)

branch: master
commit a84da83c1abceb0750e78c48452903729105df09
Author: Karl Fogel <address@hidden>
Commit: Karl Fogel <address@hidden>

    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 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index ab4363b..5b8ded7 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -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))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]