[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing occur-hook to occur-functions
From: |
Juanma Barranquero |
Subject: |
Re: Changing occur-hook to occur-functions |
Date: |
Sat, 2 Jul 2005 21:01:13 +0200 |
While still on Occur, another little issue: the documentation of
`occur-rename-buffer' talks about adding it to `occur-mode-hook' (it
used to say to add it to `occur-hook', but that was a mistake I did
when originally adding `occur-hook' and it's now fixed).
So, I've been thinking of adding an INTERACTIVE-P argument to
`occur-rename-buffer' so it could be used in `occur-mode-hook' as is,
instead of
(add-hook 'occur-mode-hook #'(lambda () (occur-rename-buffer t)))
The main reason is that then `occur-rename-buffer' can be added to
`occur-mode-hook' via Customize, which is not an unreasonable thing to
expect from any user who reads the `occur-rename-buffer' docstring.
--
/L/e/k/t/u
Index: lisp/replace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.216
diff -r1.216 replace.el
924c924
< (defun occur-rename-buffer (&optional unique-p)
---
> (defun occur-rename-buffer (&optional unique-p interactive-p)
931c931
< (interactive "P")
---
> (interactive "P\np")
938c938
< unique-p)))
---
> (or unique-p (not interactive-p)))))