[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

diff -rN -c old-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))
                 (if default
--- 903,909 ----
        (nreverse result))))
  (defun occur-read-primary-args ()
!   (list (let* ((default (or (current-word t) (car regexp-history)))
                 (if default

reply via email to

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