]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/ack/ack.el
Merge ack master from github.com:leoliu/ack-el
[gnu-emacs-elpa] / packages / ack / ack.el
index c1f5328d799f0c94511a010ae887e51d3cec8c38..11c1f9367cca216a5e9d48eb362b4e19bdd1bd92 100644 (file)
@@ -1,9 +1,9 @@
-;;; ack.el --- Interface to ack-like source code search tools   -*- lexical-binding: t; -*-
+;;; ack.el --- interface to ack-like tools           -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <sdl.web@gmail.com>
-;; Version: 1.3
+;; Version: 1.5
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
 ;;    the minibuffer
 ;; +  `TAB' completes ack options
 
+;;; Supported tools:
+
+;; + ack
+;; + grep
+;; + the_silver_search
+;; + git/hg/bzr grep
+
 ;;; Bugs: https://github.com/leoliu/ack-el/issues
 
 ;;; Code:
@@ -140,6 +147,9 @@ Used by `ack-guess-project-root'."
 (defvar ack-error "ack match"
   "Stem of message to print when no matches are found.")
 
+(defvar ack-finish-functions nil
+  "Value to use for `compilation-finish-functions' in ack buffers.")
+
 (defun ack-filter ()
   "Handle match highlighting escape sequences inserted by the ack process.
 This function is called from `compilation-filter-hook'."
@@ -378,7 +388,8 @@ minibuffer:
     ;; make use of `compilation-arguments'.
     (with-current-buffer (compilation-start command-args 'ack-mode)
       (when ack-buffer-name-function
-        (rename-buffer (funcall ack-buffer-name-function "ack"))))))
+        (rename-buffer (funcall ack-buffer-name-function "ack")))
+      (current-buffer))))
 
 (provide 'ack)
 ;;; ack.el ends here