unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* next-matching-history-element default [patch]
@ 2004-12-25 21:08 Kevin Ryde
  2004-12-27  4:09 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2004-12-25 21:08 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

In next-matching-history-element, pressing Ret to use the default
before any regexp has ever been given produces an unhelpful error
message.  Eg. with -q -no-site-file,

	C-x C-f M-s Ret
	=> Wrong type argument: consp, nil

I see previous-matching-history-element recently got that tweaked
(1995-05-26).  Perhaps next should be the same.


2004-12-26  Kevin Ryde  <user42@zip.com.au>

        * simple.el (next-matching-history-element): Same `interactive' form
        as previous-matching-history-element, for better error if history is
        empty, and to make default available with M-n.


[-- Attachment #2: simple.el.next-regexp.diff --]
[-- Type: text/plain, Size: 1090 bytes --]

*** simple.el.~1.673.~	Thu Dec 23 08:11:51 2004
--- simple.el	Fri Dec 24 18:00:25 2004
***************
*** 1113,1123 ****
  					nil
  					minibuffer-local-map
  					nil
! 					'minibuffer-history-search-history)))
       ;; Use the last regexp specified, by default, if input is empty.
       (list (if (string= regexp "")
! 	       (setcar minibuffer-history-search-history
! 		       (nth 1 minibuffer-history-search-history))
  	     regexp)
  	   (prefix-numeric-value current-prefix-arg))))
    (previous-matching-history-element regexp (- n)))
--- 1113,1125 ----
  					nil
  					minibuffer-local-map
  					nil
! 					'minibuffer-history-search-history
!  					(car minibuffer-history-search-history))))
       ;; Use the last regexp specified, by default, if input is empty.
       (list (if (string= regexp "")
! 	       (if minibuffer-history-search-history
! 		   (car minibuffer-history-search-history)
! 		 (error "No previous history search regexp"))
  	     regexp)
  	   (prefix-numeric-value current-prefix-arg))))
    (previous-matching-history-element regexp (- n)))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2004-12-28  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-25 21:08 next-matching-history-element default [patch] Kevin Ryde
2004-12-27  4:09 ` Richard Stallman
2004-12-28  1:28   ` 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).