[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make `occur' use word at point as default
From: |
Emilio Lopes |
Subject: |
make `occur' use word at point as default |
Date: |
Sun, 28 Aug 2005 14:37:25 +0200 |
User-agent: |
Emacs Gnus |
The command `occur' currently uses the last item in the regexp history
as the default value. I think it would be more useful to offer the
word at point (if any) as default, since the previous history item can
be easily fetched with "M-p".
2005-08-28 Emilio C. Lopes <address@hidden>
* replace.el (occur-read-primary-args): use word at point as
default.
diff -rN -c old-emacs-darcs.eclig/lisp/replace.el
new-emacs-darcs.eclig/lisp/replace.el
*** old-emacs-darcs.eclig/lisp/replace.el Sun Aug 28 14:30:13 2005
--- new-emacs-darcs.eclig/lisp/replace.el Sun Aug 28 13:37:51 2005
***************
*** 903,909 ****
(nreverse result))))
(defun occur-read-primary-args ()
! (list (let* ((default (car regexp-history))
(input
(read-from-minibuffer
(if default
--- 903,909 ----
(nreverse result))))
(defun occur-read-primary-args ()
! (list (let* ((default (or (current-word t) (car regexp-history)))
(input
(read-from-minibuffer
(if default
- make `occur' use word at point as default,
Emilio Lopes <=
- Re: make `occur' use word at point as default, Richard M. Stallman, 2005/08/29
- Re: make `occur' use word at point as default, Emilio Lopes, 2005/08/29
- Re: make `occur' use word at point as default, Mathias Dahl, 2005/08/30
- Re: make `occur' use word at point as default, Kai Großjohann, 2005/08/30
- Re: make `occur' use word at point as default, Richard M. Stallman, 2005/08/31
- RE: make `occur' use word at point as default, Drew Adams, 2005/08/31