fixed ack problems

This commit is contained in:
2023-04-13 07:23:09 +02:00
parent 0fec88479f
commit ea50412bc5
2 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +0,0 @@
# c-y y doesnt work
unknown argument for?!?!
# ack 'q' still asks to kill process

View File

@@ -1,11 +1,20 @@
;; https://github.com/leoliu/ack-el ;; https://github.com/leoliu/ack-el
(defun tvd-kill-ack() (defun tvd-kill-ack()
(interactive)
(let ((kill-buffer-query-functions nil))
(delete-window)
(kill-buffer "*ack*")))
(defun tvd-hook-kill-ack()
;; FIXME: still asks! ;; FIXME: still asks!
(local-set-key (kbd "q") 'kill-buffer-and-window)) (local-set-key (kbd "q") 'tvd-kill-ack))
(use-package ack (use-package ack
:config :config
(setq ack-defaults-function 'ack-legacy-defaults)) (setq ack-defaults-function 'ack-legacy-defaults)
(advice-add 'ack-mode :after
'(lambda ()
(switch-to-buffer "*ack*"))))
(add-hook 'ack-mode-hook 'tvd-kill-ack) (add-hook 'ack-mode-hook 'tvd-hook-kill-ack)