[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/replace.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/replace.el |
Date: |
Wed, 16 Oct 2002 02:27:56 -0400 |
Index: emacs/lisp/replace.el
diff -c emacs/lisp/replace.el:1.159 emacs/lisp/replace.el:1.160
*** emacs/lisp/replace.el:1.159 Wed Sep 18 12:03:58 2002
--- emacs/lisp/replace.el Tue Sep 24 04:35:27 2002
***************
*** 544,579 ****
(select-window window)
(goto-char pos))))
! (defun occur-next (&optional n)
! "Move to the Nth (default 1) next match in an Occur mode buffer."
! (interactive "p")
(if (not n) (setq n 1))
(let ((r))
(while (> n 0)
! (if (get-text-property (point) 'occur-point)
! (forward-char 1))
! (setq r (next-single-property-change (point) 'occur-point))
(if r
! (goto-char r)
! (error "No more matches"))
(setq n (1- n)))))
(defun occur-prev (&optional n)
"Move to the Nth (default 1) previous match in an Occur mode buffer."
(interactive "p")
! (if (not n) (setq n 1))
! (let ((r))
! (while (> n 0)
!
! (setq r (get-text-property (point) 'occur-point))
! (if r (forward-char -1))
!
! (setq r (previous-single-property-change (point) 'occur-point))
! (if r
! (goto-char (- r 1))
! (error "No earlier matches"))
!
! (setq n (1- n)))))
(defcustom list-matching-lines-default-context-lines 0
"*Default number of context lines included around `list-matching-lines'
matches.
--- 544,571 ----
(select-window window)
(goto-char pos))))
! (defun occur-find-match (n search message)
(if (not n) (setq n 1))
(let ((r))
(while (> n 0)
! (setq r (funcall search (point) 'occur-match))
! (and r
! (get-text-property r 'occur-match)
! (setq r (funcall search r 'occur-match)))
(if r
! (goto-char r)
! (error message))
(setq n (1- n)))))
+ (defun occur-next (&optional n)
+ "Move to the Nth (default 1) next match in an Occur mode buffer."
+ (interactive "p")
+ (occur-find-match n #'next-single-property-change "No more matches"))
+
(defun occur-prev (&optional n)
"Move to the Nth (default 1) previous match in an Occur mode buffer."
(interactive "p")
! (occur-find-match n #'previous-single-property-change "No earlier matches"))
(defcustom list-matching-lines-default-context-lines 0
"*Default number of context lines included around `list-matching-lines'
matches.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/replace.el,
Juanma Barranquero <=