[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep 392e4bcb98 008/115: Don't inherit from compilati
From: |
ELPA Syncer |
Subject: |
[elpa] externals/urgrep 392e4bcb98 008/115: Don't inherit from compilation-minor-mode to avoid its menu |
Date: |
Wed, 10 May 2023 03:00:37 -0400 (EDT) |
branch: externals/urgrep
commit 392e4bcb98555f702c9d4992156ac97ea24d257e
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Don't inherit from compilation-minor-mode to avoid its menu
---
urgrep.el | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/urgrep.el b/urgrep.el
index 47a423391e..7ae7ba242f 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -23,8 +23,8 @@
;;; Commentary:
-;; A universal frontend to various grep-like tools. Currently, only ag and grep
-;; are supported.
+;; A universal frontend to various grep-like tools. Currently, ag, git-grep,
and
+;; grep are supported.
;;; Code:
@@ -128,16 +128,43 @@
(defvar urgrep-mode-map
(let ((map (make-sparse-keymap)))
- (set-keymap-parent map compilation-minor-mode-map)
+ ;; Don't inherit from `compilation-minor-mode-map',
+ ;; because that introduces a menu bar item we don't want.
+ (set-keymap-parent map special-mode-map)
+ (define-key map [mouse-2] 'compile-goto-error)
+ (define-key map [follow-link] 'mouse-face)
+ (define-key map "\C-c\C-c" 'compile-goto-error)
+ (define-key map "\C-m" 'compile-goto-error)
+ (define-key map "\C-o" 'compilation-display-error)
+ (define-key map "\C-c\C-k" 'kill-compilation)
+ (define-key map "\M-n" 'compilation-next-error)
+ (define-key map "\M-p" 'compilation-previous-error)
+ (define-key map "\M-{" 'compilation-previous-file)
+ (define-key map "\M-}" 'compilation-next-file)
(define-key map "n" 'next-error-no-select)
(define-key map "p" 'previous-error-no-select)
(define-key map "{" 'compilation-previous-file)
(define-key map "}" 'compilation-next-file)
(define-key map "\t" 'compilation-next-error)
(define-key map [backtab] 'compilation-previous-error)
+ (define-key map "g" 'recompile)
map)
- "Keymap for urgrep buffers.
-`compilation-minor-mode-map' is a parent of this.")
+ "Keymap for urgrep buffers.")
+
+(easy-menu-define urgrep-menu-map urgrep-mode-map
+ "Menu for urgrep buffers."
+ '("Urgrep"
+ ["Next Match" next-error
+ :help "Visit the next match and corresponding location"]
+ ["Previous Match" previous-error
+ :help "Visit the previous match and corresponding location"]
+ ["First Match" first-error
+ :help "Restart at the first match, visit corresponding location"]
+ "---"
+ ["Repeat Search" recompile
+ :help "Run search again"]
+ ["Stop search" kill-compilation
+ :help "Kill the currently running search process"]))
(defconst urgrep-mode-line-matches
`(" [" (:propertize (:eval (int-to-string urgrep-num-matches-found))
- [elpa] externals/urgrep 55b0030cf9 061/115: Improve regexes to match result/context lines, (continued)
- [elpa] externals/urgrep 55b0030cf9 061/115: Improve regexes to match result/context lines, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep f354b44121 059/115: Always filter filenames in 'urgrep-filter', ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 9e1f4da53b 070/115: Reorder keyword arguments to be more logical, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 0687d9e867 073/115: Update copyright, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep ce07e97d37 088/115: Allow ANSI escapes for matches to end just after a newline, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep dbb2c2caeb 095/115: Wrap some docstring lines with "\", ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 9949a5b296 094/115: Use connection-local variables for caching the tool to use for each host, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 569c52f504 083/115: Allow overriding EMACS during tests, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep d479dc5ad6 104/115: Remove unnecessary/wrong Git grep color settings, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep d0012b9fcb 112/115: Tweak tests so they only work around Emacs bug#58265 on older versions, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 392e4bcb98 008/115: Don't inherit from compilation-minor-mode to avoid its menu,
ELPA Syncer <=
- [elpa] externals/urgrep c7a3cc5b30 015/115: Be less aggressive with shell-quoting on MS Windows, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep bfab29d1d7 014/115: Add support for searches starting with "-", ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 814ad5c60d 038/115: Update tests to work on MS Windows, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 86c36492b9 064/115: Include a description of how to enable wgrep support in the README, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 7453367e6d 065/115: Avoid false-positives when looking for context lines in results, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 593d209a31 067/115: Search in untracked files with git grep, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 1c08b41324 078/115: s/TRAMP/Tramp/g, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 6df13a8dee 071/115: Add support for urgrep command in Eshell, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 11e1f7474e 079/115: Add CI configuration, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep a7d87da8b5 096/115: Slight improvements to docstrings for defcustoms, ELPA Syncer, 2023/05/10