[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99775: * replace.el (occur-accumulat
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99775: * replace.el (occur-accumulate-lines): Fix a bug where the first |
Date: |
Tue, 30 Mar 2010 18:44:50 +0300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99775
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Tue 2010-03-30 18:44:50 +0300
message:
* replace.el (occur-accumulate-lines): Fix a bug where the first
context line at the beginning of the buffer was missing.
modified:
lisp/ChangeLog
lisp/replace.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-03-30 09:13:07 +0000
+++ b/lisp/ChangeLog 2010-03-30 15:44:50 +0000
@@ -1,3 +1,8 @@
+2010-03-30 Juri Linkov <address@hidden>
+
+ * replace.el (occur-accumulate-lines): Fix a bug where the first
+ context line at the beginning of the buffer was missing.
+
2010-03-30 Eli Zaretskii <address@hidden>
* files.el: Make bidi-display-reordering safe variable for boolean
=== modified file 'lisp/replace.el'
--- a/lisp/replace.el 2010-03-23 16:09:45 +0000
+++ b/lisp/replace.el 2010-03-30 15:44:50 +0000
@@ -1008,16 +1008,16 @@
(defun occur-accumulate-lines (count &optional keep-props)
(save-excursion
(let ((forwardp (> count 0))
- result beg end)
+ result beg end moved)
(while (not (or (zerop count)
(if forwardp
(eobp)
- (bobp))))
+ (and (bobp) (not moved)))))
(setq count (+ count (if forwardp -1 1)))
(setq beg (line-beginning-position)
end (line-end-position))
(push (occur-engine-line beg end keep-props) result)
- (forward-line (if forwardp 1 -1)))
+ (setq moved (= 0 (forward-line (if forwardp 1 -1)))))
(nreverse result))))
(defun occur-read-primary-args ()
@@ -1028,7 +1028,7 @@
(defun occur-rename-buffer (&optional unique-p interactive-p)
"Rename the current *Occur* buffer to *Occur: original-buffer-name*.
-Here `original-buffer-name' is the buffer name were Occur was originally run.
+Here `original-buffer-name' is the buffer name where Occur was originally run.
When given the prefix argument, or called non-interactively, the renaming
will not clobber the existing buffer(s) of that name, but use
`generate-new-buffer-name' instead. You can add this to `occur-hook'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99775: * replace.el (occur-accumulate-lines): Fix a bug where the first,
Juri Linkov <=