summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2010-12-06 01:16:08 +0000
committerTaylor R Campbell <campbell@mumble.net>2010-12-06 01:16:08 +0000
commit89aa6fb7d22f0003317f894cedd088f94ff545a0 (patch)
tree9026f4c0edd3ca008593be426c2477e06175d80f /paredit.el
parent25e444c7cd225f7629d57267d16fc620737a5a21 (diff)
Eliminate non-interactive use of `goto-line'.
Ignore-this: 562a203b85842ebc368ea80f2aa65612 Using `forward-line' in `paredit-recentre-on-sexp' is simpler anyway. darcs-hash:20101206011608-00fcc-1775f5b8c7a4eb4ab2792e5746aca95a2759dc60
Diffstat (limited to 'paredit.el')
-rw-r--r--paredit.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/paredit.el b/paredit.el
index 9c2ed24..252fa21 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1736,10 +1736,8 @@ With a prefix argument N, encompass all N S-expressions forward."
(forward-sexp n)
(let ((end-point (point)))
(backward-sexp n)
- (let* ((start-point (point))
- (start-line (count-lines (point-min) (point)))
- (lines-on-sexps (count-lines start-point end-point)))
- (goto-line (+ start-line (/ lines-on-sexps 2)))
+ (let ((start-point (point)))
+ (forward-line (/ (count-lines start-point end-point) 2))
(recenter)))))
(defun paredit-focus-on-defun ()