Permalink
Browse files

Replaced `goto-line' with `goto-char'/`forward-line'.

`goto-line' should not be called from a Lisp program.

See docstring for `goto-line'

> This function is usually the wrong thing to use in a Lisp program.
> What you probably want instead is something like:
>  (goto-char (point-min))
>  (forward-line (1- N))
> If at all possible, an even better solution is to use char counts
> rather than line counts.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
  • Loading branch information...
1 parent 683be31 commit bd45fcbd5b15342bb1eea6afe8f34ca0b1171134 @ruediger ruediger committed Dec 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 haskell-interactive-mode.el
@@ -212,7 +212,8 @@ Key bindings:
(other-window 1)
(find-file file)
(haskell-interactive-bring)
- (goto-line (string-to-number line))
+ (goto-char (point-min))
+ (forward-line (1- (string-to-number line)))
(goto-char (+ (point) (string-to-number col)))
(haskell-mode-message-line orig-line)
t)))))))

0 comments on commit bd45fcb

Please sign in to comment.