[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.


Index: lisp/replace.el
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.216
diff -r1.216 replace.el
< (defun occur-rename-buffer (&optional unique-p)
> (defun occur-rename-buffer (&optional unique-p interactive-p)
<   (interactive "P")
>   (interactive "P\np")
<                    unique-p)))
>                    (or unique-p (not interactive-p)))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]