Commit e0d42597 authored by Tino Calancha's avatar Tino Calancha
Browse files

Remove hook when disabling ibuffer-auto-mode

* lisp/ibuf-ext.el (ibuffer-auto-mode):
Remove 'ibuffer-auto-update-changed' from 'post-command-hook'.
parent 40476552
......@@ -250,8 +250,11 @@ the mode if ARG is omitted or nil."
nil nil nil
(unless (derived-mode-p 'ibuffer-mode)
(error "This buffer is not in Ibuffer mode"))
(cond (ibuffer-auto-mode
(frame-or-buffer-changed-p 'ibuffer-auto-buffers-changed) ; Initialize state vector
(add-hook 'post-command-hook 'ibuffer-auto-update-changed))
(remove-hook 'post-command-hook 'ibuffer-auto-update-changed))))
(defun ibuffer-auto-update-changed ()
(when (frame-or-buffer-changed-p 'ibuffer-auto-buffers-changed)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment