[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] /srv/bzr/emacs/elpa r302: * ack.el (ack-buffer-name-functio
From: |
Leo Liu |
Subject: |
[ELPA-diffs] /srv/bzr/emacs/elpa r302: * ack.el (ack-buffer-name-function): New user variable |
Date: |
Mon, 19 Nov 2012 00:05:46 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 302
committer: Leo Liu <address@hidden>
branch nick: elpa
timestamp: Mon 2012-11-19 00:05:46 +0800
message:
* ack.el (ack-buffer-name-function): New user variable
Thanks to address@hidden for request and testing.
modified:
packages/ack/ack.el
=== modified file 'packages/ack/ack.el'
--- a/packages/ack/ack.el 2012-10-21 05:26:02 +0000
+++ b/packages/ack/ack.el 2012-11-18 16:05:46 +0000
@@ -57,6 +57,12 @@
:type 'string
:group 'ack)
+(defcustom ack-buffer-name-function nil
+ "If non-nil, a function to compute the name of an ack buffer.
+See `compilation-buffer-name-function' for details."
+ :type '(choice function (const nil))
+ :group 'ack)
+
(defcustom ack-vc-grep-commands
'((".git" . "git --no-pager grep --color -n -i")
(".hg" . "hg grep -n -i")
@@ -364,7 +370,11 @@
project-root)))
(let ((default-directory (expand-file-name
(or directory default-directory))))
- (compilation-start command-args 'ack-mode)))
+ ;; Change to the compilation buffer so that `ack-buffer-name-function' can
+ ;; 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"))))))
(provide 'ack)
;;; ack.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ELPA-diffs] /srv/bzr/emacs/elpa r302: * ack.el (ack-buffer-name-function): New user variable,
Leo Liu <=