summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-09-24 23:25:06 +0000
committerRichard M. Stallman <rms@gnu.org>1995-09-24 23:25:06 +0000
commita61394d139511cacde0c284ac646eb142268c66b (patch)
tree487186ec3fbc62c363d62adb69c16737c293e6b9 /lisp
parent51285c757facb573a4dc4d091caf759ab87f5114 (diff)
downloademacs-a61394d139511cacde0c284ac646eb142268c66b.tar.gz
(occur): Indent better for matches that contain newlines.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/replace.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 9638fab2df7..219fab01162 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -400,6 +400,8 @@ It serves as a menu to find any of the occurrences in this buffer.
(insert "--------\n"))
(setq first nil)
(insert-buffer-substring buffer start end)
+ (set-marker final-context-start
+ (- (point) (- end (match-end 0))))
(backward-char (- end start))
(setq tem nlines)
(while (> tem 0)
@@ -407,8 +409,6 @@ It serves as a menu to find any of the occurrences in this buffer.
(forward-line 1)
(setq tem (1- tem)))
(let ((this-linenum linenum))
- (set-marker final-context-start
- (+ (point) (- (match-end 0) (match-beginning 0))))
(while (< (point) final-context-start)
(if (null tag)
(setq tag (format "%5d" this-linenum)))
@@ -420,13 +420,18 @@ It serves as a menu to find any of the occurrences in this buffer.
(end-of-line)
(point))
'mouse-face 'highlight)
+ (forward-line 1)
(setq tag nil)
+ (setq this-linenum (1+ this-linenum)))
+ (while (<= (point) final-context-start)
+ (insert empty ?:)
(forward-line 1)
(setq this-linenum (1+ this-linenum))))
(while (< tem nlines)
(insert empty ?:)
(forward-line 1)
- (setq tem (1+ tem))))
+ (setq tem (1+ tem)))
+ (goto-char (point-max)))
(forward-line 1)))
(set-buffer standard-output)
;; Put positions in increasing order to go with buffer.