[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/el-search 68fcfcd 286/332: [el-search] Include precedin
From: |
Stefan Monnier |
Subject: |
[elpa] externals/el-search 68fcfcd 286/332: [el-search] Include preceding comments in occur defun context |
Date: |
Tue, 1 Dec 2020 15:49:05 -0500 (EST) |
branch: externals/el-search
commit 68fcfcdbdf31d1ba0ef09577d7fe7b558a0476c2
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>
[el-search] Include preceding comments in occur defun context
* packages/el-search/el-search.el (el-search-occur-get-defun-context):
Include preceding comments.
---
el-search.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/el-search.el b/el-search.el
index 97b9552..27eceb0 100644
--- a/el-search.el
+++ b/el-search.el
@@ -3364,7 +3364,16 @@ Prompt for a new pattern and revert."
(el-search--end-of-sexp match-beg)))))
(defun el-search-occur-get-defun-context (match-beg)
- (el-search--bounds-of-defun match-beg))
+ (let ((bounds (el-search--bounds-of-defun match-beg)))
+ (save-excursion
+ (goto-char (car bounds))
+ (let ((done nil))
+ (while (not (or done (bobp)))
+ (forward-line -1)
+ (if (looking-at-p "[[:space:]]*;")
+ (setf (car bounds) (point))
+ (setq done t)))))
+ bounds))
(defun el-search-occur-get-null-context (match-beg)
(cons match-beg (el-search--end-of-sexp match-beg)))
- [elpa] externals/el-search cf68daf 249/332: [el-search] Avoid most calls to 'scan-sexps', (continued)
- [elpa] externals/el-search cf68daf 249/332: [el-search] Avoid most calls to 'scan-sexps', Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 894f8b1 254/332: [el-search] More minor tweaks, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 6c5a6b4 265/332: [el-search] Fix an infloop in el-search--search-pattern-1, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search b830be5 263/332: [el-search] Some scrolling tweaks, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search e60f228 267/332: [el-search] Don't try to kill modified buffers, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 34f734e 258/332: [el-search] Add special scroll commands, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search d4ad652 278/332: [el-search] Implement an explicit quit command, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search fbe70bf 284/332: [el-search] Add C-h help, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search fac5586 285/332: [el-search] Improve my last commit "Add C-h help", Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 23911d1 288/332: [el-search] Add menus, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 68fcfcd 286/332: [el-search] Include preceding comments in occur defun context,
Stefan Monnier <=
- [elpa] externals/el-search 90062c5 290/332: Update copyrights of some packages, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 120c662 296/332: [el-search] Minibuffer pattern prompt hints part 2, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 668d049 302/332: [el-search] Add el-search-list-defined-patterns, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search bb978b2 306/332: [el-search] Fix behavior after completed single-buffer search, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 985ca3c 312/332: [el-search] Add "List patterns" menu item, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search f5e8235 321/332: [el-search] C-c C-c in edit-replacement means replace, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 9d8798f 140/332: Work around more manifestations of Emacs bug #24542, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 7d621de 216/332: * el-search/el-search.el: Some minor tweaks, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 29eeda2 228/332: Show progress of automatic el-search-query-replace, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 4b934f1 238/332: * el-search/el-search.el: Skip over #N read syntaxes, Stefan Monnier, 2020/12/01