summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-04-16 02:39:42 +0000
committerKarl Heuer <kwzh@gnu.org>1994-04-16 02:39:42 +0000
commitd8320c52497fbd4ed75ad876f530ecbf64ae53b8 (patch)
treeca8ffaeb4ac81690b1fc6d14550d3b34e9da884d
parent9d221882fe5f91ae7b716aa101cb2d8df315ce22 (diff)
downloademacs-d8320c52497fbd4ed75ad876f530ecbf64ae53b8.tar.gz
(emerge-goto-line): Fix return value.
(emerge-convert-diffs-to-markers): Fix line number calculations.
-rw-r--r--lisp/emerge.el24
1 files changed, 7 insertions, 17 deletions
diff --git a/lisp/emerge.el b/lisp/emerge.el
index 692c16e050a..250df827d13 100644
--- a/lisp/emerge.el
+++ b/lisp/emerge.el
@@ -1436,7 +1436,7 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'."
;; Return DESIRED-LINE.
(defun emerge-goto-line (desired-line current-line)
(forward-line (- desired-line current-line))
- current-line)
+ desired-line)
(defun emerge-convert-diffs-to-markers (A-buffer
B-buffer
@@ -1445,21 +1445,11 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'."
(let* (marker-list
(A-point-min (emerge-eval-in-buffer A-buffer (point-min)))
(offset (1- A-point-min))
- (A-hidden-lines (emerge-eval-in-buffer
- A-buffer
- (save-restriction
- (widen)
- (count-lines 1 A-point-min))))
(B-point-min (emerge-eval-in-buffer B-buffer (point-min)))
- (B-hidden-lines (emerge-eval-in-buffer
- B-buffer
- (save-restriction
- (widen)
- (count-lines 1 B-point-min))))
;; Record current line number in each buffer
;; so we don't have to count from the beginning.
- (a-line A-hidden-lines)
- (b-line B-hidden-lines))
+ (a-line 1)
+ (b-line 1))
(emerge-eval-in-buffer A-buffer (goto-char (point-min)))
(emerge-eval-in-buffer B-buffer (goto-char (point-min)))
(while lineno-list
@@ -1478,15 +1468,15 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'."
;; place markers at the appropriate places in the buffers
(emerge-eval-in-buffer
A-buffer
- (setq a-line (emerge-goto-line (+ a-begin A-hidden-lines) a-line))
+ (setq a-line (emerge-goto-line a-begin a-line))
(setq a-begin-marker (point-marker))
- (setq a-line (emerge-goto-line (+ a-end A-hidden-lines) a-line))
+ (setq a-line (emerge-goto-line a-end a-line))
(setq a-end-marker (point-marker)))
(emerge-eval-in-buffer
B-buffer
- (setq b-line (emerge-goto-line (+ b-begin B-hidden-lines) b-line))
+ (setq b-line (emerge-goto-line b-begin b-line))
(setq b-begin-marker (point-marker))
- (setq b-line (emerge-goto-line (+ b-end B-hidden-lines) b-line))
+ (setq b-line (emerge-goto-line b-end b-line))
(setq b-end-marker (point-marker)))
(setq merge-begin-marker (set-marker
(make-marker)