[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/mheerdegen-preview a1b1039 21/32: WIP: More colorful matc
From: |
Michael Heerdegen |
Subject: |
[elpa] scratch/mheerdegen-preview a1b1039 21/32: WIP: More colorful match count |
Date: |
Sat, 20 Oct 2018 18:19:01 -0400 (EDT) |
branch: scratch/mheerdegen-preview
commit a1b10395af79ce3ea2590ba2a5d7f26dc852d85c
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>
WIP: More colorful match count
---
packages/el-search/el-search.el | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 0e19b84..3bea82f 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -2582,17 +2582,23 @@ created.")
buffer-or-file
matches-<=-here
total-matches
- (propertize
- (format (pcase (save-excursion
- (goto-char (car
defun-bounds))
- (el-search-read
(current-buffer)))
- (`(,a ,b . ,_) (format "(%s
%%d/%%d)"
-
(truncate-string-to-width
- (format
"%S %S" a b)
- 40 nil
nil 'ellipsis)))
- (_ "(%d/%d)"))
- matches-<=-here-in-defun
total-matches-in-defun)
- 'face 'shadow))))
+ (format
+ (pcase (save-excursion
+ (goto-char (car defun-bounds))
+ (and (el-search-looking-at '`(,_
,_ . ,_))
+ (let ((region (list
+ (progn
(down-list) (point))
+ (min
(line-end-position)
+
(scan-sexps (point) 2)))))
+ (apply
#'jit-lock-fontify-now region)
+ (apply #'buffer-substring
region))))
+ ((and (pred stringp) signature)
+ (format "(%s %%d/%%d)"
+ (truncate-string-to-width
+ signature
+ 40 nil nil 'ellipsis)))
+ (_ "(%d/%d)"))
+ matches-<=-here-in-defun
total-matches-in-defun))))
(list
(concat (if (not just-count) "[Not at a match]
" "")
(if (= matches-<=-here total-matches)
- [elpa] scratch/mheerdegen-preview 216fd06 07/32: WIP: New file el-search/el-search-pp.el, (continued)
- [elpa] scratch/mheerdegen-preview 216fd06 07/32: WIP: New file el-search/el-search-pp.el, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 4f3d9bf 11/32: WIP [el-search] Add quick help command, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 5b994a5 17/32: WIP [el-search] Fix C-j with numeric arg in error case, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 54e3b67 16/32: WIP: Optimize caching, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 3aa418f 20/32: WIP: Improvements for change and changed, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 8c8e364 30/32: WIP: Small fix in 'el-search--reset-wrap-flag', Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 009dc4d 32/32: WIP: [el-search] Enhance doc of el-search-occur-mode, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 4ce7e1d 06/32: WIP: Add el-search-hi-lock.el, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview e4bf180 25/32: WIP: [el-search] Some minor tweaks, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview df185f6 24/32: WIP: Test: Make mouse clicks not abort the search, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview a1b1039 21/32: WIP: More colorful match count,
Michael Heerdegen <=
- [elpa] scratch/mheerdegen-preview 654133c 26/32: WIP: Don't initially fold occur buffer, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 7de5824 23/32: WIP: Improvise eldoc support for search pattern prompt, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 0275476 09/32: WIP: qr: Make shown replacement editable and ediffable; r twice restores match; stop for problematic comments, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 62fc5c5 14/32: WIP [el-search] Minibuffer hints when entering pattern, Fix case when search pattern fails for some sexps, Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview a0b93f3 13/32: WIP [el-search] Discourage using symbols as LPATS in `append' and `l', Michael Heerdegen, 2018/10/20
- [elpa] scratch/mheerdegen-preview 2fd5340 28/32: WIP: Add alarm-clock.el, Michael Heerdegen, 2018/10/20