unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* make `occur' use word at point as default
@ 2005-08-28 12:37 Emilio Lopes
  2005-08-29  8:39 ` Richard M. Stallman
  0 siblings, 1 reply; 27+ messages in thread
From: Emilio Lopes @ 2005-08-28 12:37 UTC (permalink / raw)


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  <eclig@gmx.net>

	* 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

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2005-09-08  2:41 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-28 12:37 make `occur' use word at point as default Emilio Lopes
2005-08-29  8:39 ` Richard M. Stallman
2005-08-29 17:39   ` Emilio Lopes
2005-08-29 19:33     ` Drew Adams
2005-08-29 20:07       ` David Kastrup
2005-08-30  7:57     ` Mathias Dahl
2005-08-30 13:43     ` Kai Großjohann
2005-08-31 14:35       ` Richard M. Stallman
2005-08-31 16:03         ` Drew Adams
2005-09-01 15:52           ` Richard M. Stallman
2005-09-01 17:09             ` Drew Adams
2005-09-01 19:29               ` Juri Linkov
2005-09-01 23:59                 ` Drew Adams
2005-09-03  1:41               ` Richard M. Stallman
2005-09-03  2:01                 ` Drew Adams
2005-09-03  2:04                   ` Drew Adams
2005-09-03 13:33                     ` Benjamin Riefenstahl
2005-09-04  0:58                   ` Richard M. Stallman
2005-09-06 15:19                     ` Drew Adams
2005-09-07  5:05                       ` Richard M. Stallman
2005-09-07  5:25                         ` Drew Adams
2005-09-07  5:46                         ` Juri Linkov
2005-09-08  2:41                           ` Richard M. Stallman
2005-09-07  5:27                       ` Juri Linkov
2005-09-01  5:47         ` Juri Linkov
2005-09-01 13:08           ` Stefan Monnier
2005-09-01 19:29             ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).