Kaynağa Gözat

Add projectile support

master
10sr 8 yıl önce
ebeveyn
işleme
b467018844
İmzalayan: 10sr GPG Anahtar Kimliği: 7BEC428194130EB2
1 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  1. +9
    -3
      emacs.el

+ 9
- 3
emacs.el Dosyayı Görüntüle

@@ -1458,7 +1458,8 @@ Commands are searched from ALIST."


(defun my-rgrep (command-args) (defun my-rgrep (command-args)
"My recursive grep. Run COMMAND-ARGS. "My recursive grep. Run COMMAND-ARGS.
If prefix argument is given use current symbol as default search target."
If prefix argument is given, use current symbol as default search target
and search from projectile root (if projectile is available)."
(interactive (let ((cmd (my-rgrep-grep-command my-rgrep-default (interactive (let ((cmd (my-rgrep-grep-command my-rgrep-default
nil))) nil)))
(if cmd (if cmd
@@ -1470,8 +1471,13 @@ If prefix argument is given use current symbol as default search target."
'grep-find-history)) 'grep-find-history))
(error "My-Rgrep: Command for rgrep not found") (error "My-Rgrep: Command for rgrep not found")
))) )))
(compilation-start command-args
'grep-mode))
(if (and current-prefix-arg
(safe-require-or-eval 'projectile))
(projectile-with-default-dir (projectile-project-root)
(compilation-start command-args
'grep-mode))
(compilation-start command-args
'grep-mode)))


(defmacro define-my-rgrep (name) (defmacro define-my-rgrep (name)
"Define rgrep for NAME." "Define rgrep for NAME."


Yükleniyor…
İptal
Kaydet