[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/anzu df60e608f1 233/288: Update document about update func
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/anzu df60e608f1 233/288: Update document about update function |
Date: |
Thu, 6 Jan 2022 03:58:56 -0500 (EST) |
branch: elpa/anzu
commit df60e608f1d2a51e3bdfb44af028c6dbd5d3e2e7
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Update document about update function
---
README.md | 11 ++++++-----
anzu.el | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 8f6be8f448..d35b23f095 100644
--- a/README.md
+++ b/README.md
@@ -98,10 +98,9 @@ Face of to-string of replacement
#### `anzu-mode-line-update-function`
-Function which constructs mode-line string. If you color mode-line string,
-you propertize string by yourself. The function takes 2 integer arguments,
current position,
-and total matched. This function is called at searching, inputting replaced
word,
-replacing. Global variable `anzu--state` indicates those states(`'search`,
`'replace-query`, `replace`).
+Function which constructs mode-line string. anzu.el puts its output to
mode-line. It is called at searching, inputting replaced word, replacing. This
must be non-nil.
+
+The function takes 2 integer arguments, current position and total match
number. You can get current-state from `anzu--state`(`'search`,
`'replace-query`, `replace`).
```lisp
(defun my/anzu-update-func (here total)
@@ -111,7 +110,9 @@ replacing. Global variable `anzu--state` indicates those
states(`'search`, `'rep
(replace-query (format "(%d Replaces)" total))
(replace (format "<%d/%d>" here total)))))
(propertize status 'face 'anzu-mode-line))))
-(setq anzu-mode-line-update-function #'my/anzu-update-func)
+
+(custom-set-variables
+ '(anzu-mode-line-update-function #'my/anzu-update-func))
```
#### `anzu-cons-mode-line-p`(Default is `t`)
diff --git a/anzu.el b/anzu.el
index 444734b709..72124e207a 100644
--- a/anzu.el
+++ b/anzu.el
@@ -72,7 +72,7 @@
:type 'boolean)
(defcustom anzu-mode-line-update-function #'anzu--update-mode-line-default
- "Function which return mode-line string"
+ "Function which return mode-line string. This must be non-nil."
:type 'function)
(defcustom anzu-regexp-search-commands '(isearch-forward-regexp
- [nongnu] elpa/anzu 8e92765ab7 113/288: Specify Emacs version, (continued)
- [nongnu] elpa/anzu 8e92765ab7 113/288: Specify Emacs version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 8fe3d080ff 114/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 11dcdf722f 128/288: Use package-file instead of package, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 718d5845d1 126/288: Merge pull request #25 from syohex/add-lines-region, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 485f463a40 127/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu ffcffffc1a 130/288: Merge pull request #26 from cedricporter/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 1ae7297bc7 132/288: Merge pull request #27 from syohex/fix-for-toggle-search, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu c0d58a61c2 136/288: A couple of grammar and typo fixes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 41f19cd2c2 214/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4426cff3bf 205/288: Correct removed hook function name, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu df60e608f1 233/288: Update document about update function,
ELPA Syncer <=
- [nongnu] elpa/anzu e46563628d 234/288: Use "#'" instead of "'" for detecting typo, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 11544ea75c 242/288: Consider user's case-fold-search, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 42996934e2 239/288: Change syntax for bindings, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu dad14fa96c 244/288: Use h5 header for interfaces, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 324c3e2db4 245/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 3328619fec 251/288: Update Changes and bump up version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 5cf1c7c16e 238/288: Merge pull request #72 from syohex/isearch-query-replace-api, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu a1860f4c53 267/288: update url, copyright, and maintainer name, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 896b2be2eb 281/288: Wordsmith the documentation re *-thing functions (#111), ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 33e4f13429 287/288: migrate tests from circleci to github actions, ELPA Syncer, 2022/01/06