[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult fddb78ae8e 3/3: Use looking-at-p
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult fddb78ae8e 3/3: Use looking-at-p |
Date: |
Thu, 26 Jan 2023 11:57:25 -0500 (EST) |
branch: externals/consult
commit fddb78ae8ea35a960604a0772938671e9e8386f1
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use looking-at-p
---
consult-info.el | 9 ++++-----
consult.el | 4 ++--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/consult-info.el b/consult-info.el
index f89e524057..80f942133c 100644
--- a/consult-info.el
+++ b/consult-info.el
@@ -46,13 +46,12 @@
(eol (pos-eol)))
(goto-char bol)
(when (and
- (not (looking-at "^\\s-*$"))
;; Information separator character
(>= (- (point) 2) (point-min))
(not (eq (char-after (- (point) 2)) ?\^_))
- ;; Only printable characters on the line, [:cntrl:] does
- ;; not work?!
- (not (re-search-forward "[^[:print:]]" eol t))
+ ;; Non-blank line, only printable characters on the line.
+ (not (looking-at-p "^\\s-*$"))
+ (looking-at-p "^[[:print:]]*$")
;; Matches all regexps
(seq-every-p (lambda (r)
(goto-char bol)
@@ -62,7 +61,7 @@
(goto-char bol)
(if (search-backward "\n\^_" nil 'move)
(forward-line 2)
- (when (looking-at "\^_")
+ (when (looking-at-p "\^_")
(forward-line 1)))
;; Node name
(re-search-forward "Node:[ \t]*" nil t))
diff --git a/consult.el b/consult.el
index 83afd2928c..b2ee59df00 100644
--- a/consult.el
+++ b/consult.el
@@ -3045,7 +3045,7 @@ CURR-LINE is the current line number."
(line (line-number-at-pos (point-min) consult-line-numbers-widen))
default-cand candidates)
(consult--each-line beg end
- (unless (looking-at "^\\s-*$")
+ (unless (looking-at-p "^\\s-*$")
(push (consult--location-candidate
(consult--buffer-substring beg end)
(cons buffer beg) line beg)
@@ -3168,7 +3168,7 @@ BUFFERS is the list of buffers."
(let ((bol (pos-bol))
(eol (pos-eol)))
(goto-char bol)
- (when (and (not (looking-at "^\\s-*$"))
+ (when (and (not (looking-at-p "^\\s-*$"))
(seq-every-p (lambda (r)
(goto-char bol)
(re-search-forward r eol t))