[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/anzu 906287cb5e 104/288: Switch cl-lib.el from cl.el
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/anzu 906287cb5e 104/288: Switch cl-lib.el from cl.el |
Date: |
Thu, 6 Jan 2022 03:58:44 -0500 (EST) |
branch: elpa/anzu
commit 906287cb5e7b05d47c3e7bde0b29bd2d5d16ae1f
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Switch cl-lib.el from cl.el
---
README.md | 1 +
anzu.el | 31 ++++++++++++++++---------------
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 15239bbb57..cc98e8be4c 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ information in the mode-line in various search mode.
## Requirements
* Emacs 24 or higher
+* cl-lib 0.3 or higher
## Installation
diff --git a/anzu.el b/anzu.el
index 3db5c7e7c0..16c4946572 100644
--- a/anzu.el
+++ b/anzu.el
@@ -5,6 +5,7 @@
;; Author: Syohei YOSHIDA <syohex@gmail.com>
;; URL: https://github.com/syohex/emacs-anzu
;; Version: 0.28
+;; Package-Requires: ((cl-lib "0.3"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -36,9 +37,9 @@
;;; Code:
(eval-when-compile
- (require 'cl)
(defvar migemo-isearch-enable-p))
+(require 'cl-lib)
(require 'thingatpt)
(defgroup anzu nil
@@ -164,7 +165,7 @@
(case-fold-search (anzu--case-fold-search str)))
(while (and (not finish) (funcall search-func str nil t))
(push (cons (match-beginning 0) (match-end 0)) positions)
- (incf count)
+ (cl-incf count)
(when (= (match-beginning 0) (match-end 0)) ;; Case of anchor such
as "^"
(if (eobp)
(setq finish t)
@@ -176,11 +177,11 @@
result)))))
(defun anzu--where-is-here (positions here)
- (loop for (start . end) in positions
- for i = 1 then (1+ i)
- when (and (>= here start) (<= here end))
- return i
- finally return 0))
+ (cl-loop for (start . end) in positions
+ for i = 1 then (1+ i)
+ when (and (>= here start) (<= here end))
+ return i
+ finally return 0))
(defun anzu--update ()
(when (>= (length isearch-string) anzu-minimum-input-length)
@@ -226,7 +227,7 @@
here))
(defun anzu--update-mode-line-default (here total)
- (case anzu--state
+ (cl-case anzu--state
(search (propertize (format "(%s/%d%s)"
(anzu--format-here-position here total)
total (if anzu--overflow-p "+" ""))
@@ -300,7 +301,7 @@
(finish nil)
(case-fold-search (anzu--case-fold-search str)))
(while (and (not finish) (re-search-forward str replace-end t))
- (incf count)
+ (cl-incf count)
(let ((beg (match-beginning 0))
(end (match-end 0)))
(when (= beg end)
@@ -394,10 +395,10 @@
(< (overlay-start a) (overlay-start b)))
(defsubst anzu--overlays-in-range (beg end)
- (loop for ov in (overlays-in beg end)
- when (overlay-get ov 'anzu-replace)
- collect ov into anzu-overlays
- finally return (sort anzu-overlays 'anzu--overlay-sort)))
+ (cl-loop for ov in (overlays-in beg end)
+ when (overlay-get ov 'anzu-replace)
+ collect ov into anzu-overlays
+ finally return (sort anzu-overlays 'anzu--overlay-sort)))
(defsubst anzu--propertize-to-string (str)
(let ((separator (or anzu-replace-to-string-separator "")))
@@ -413,7 +414,7 @@
(let ((replace-evaled (and use-regexp (anzu--evaluate-occurrence
ov content replace-count))))
(if replace-evaled
- (incf replace-count)
+ (cl-incf replace-count)
(setq replace-evaled content))
(overlay-put ov 'after-string (anzu--propertize-to-string
replace-evaled))))))))
@@ -511,7 +512,7 @@
(list from to delimited beg end backward)
(list from to delimited beg end)))
-(defun* anzu--query-replace-common (use-regexp &key at-cursor thing prefix-arg
(query t))
+(cl-defun anzu--query-replace-common (use-regexp &key at-cursor thing
prefix-arg (query t))
(anzu--cons-mode-line 'replace)
(let* ((use-region (use-region-p))
(backward (anzu--replace-backward-p prefix-arg))
- [nongnu] elpa/anzu 5ac649fc77 264/288: Fix wrong count issue with case-sensitive search, (continued)
- [nongnu] elpa/anzu 5ac649fc77 264/288: Fix wrong count issue with case-sensitive search, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 3805a01572 272/288: "new maintainer" note in README.md, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 3345640004 269/288: update badges on README.md, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu e6c56ca8b2 261/288: Update face document, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu acaef89dca 027/288: Fix byte-compilation warning, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 169442a831 055/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu cd6d3441d9 062/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 31f1f8b817 089/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 138ebcb0e0 098/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu f73bab2744 100/288: Merge pull request #16 from syohex/fix-case-sensitive, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 906287cb5e 104/288: Switch cl-lib.el from cl.el,
ELPA Syncer <=
- [nongnu] elpa/anzu a0a16ab869 108/288: Merge pull request #19 from syohex/improve-prompt, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu c26de0ecef 112/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4b9c6479d8 117/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 24a2589f10 119/288: Merge pull request #23 from syohex/fix-replacement-issue, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 6cad7a027f 123/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu fb003540df 129/288: fix typo, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 9fc916b6de 131/288: Fix for symbol search and toggle in isearch-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 0bdbfcb209 138/288: Improve case when input does not match anything in visiable range(#30), ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu af40f91a98 140/288: Merge pull request #31 from syohex/no-match-case, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 04ac39641e 143/288: Merge pull request #32 from syohex/fix-at-cursor-beginning-point, ELPA Syncer, 2022/01/06