diff options
author | Taylor R Campbell <campbell@mumble.net> | 2010-12-06 01:16:08 +0000 |
---|---|---|
committer | Taylor R Campbell <campbell@mumble.net> | 2010-12-06 01:16:08 +0000 |
commit | 89aa6fb7d22f0003317f894cedd088f94ff545a0 (patch) | |
tree | 9026f4c0edd3ca008593be426c2477e06175d80f /paredit.el | |
parent | 25e444c7cd225f7629d57267d16fc620737a5a21 (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.el | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 () |