Browse files

Replaced goto-line with code to eliminate compiler warning.

  • Loading branch information...
1 parent 035b75a commit 12dca662228cdfd20dd54d7c6efacee902106e2c @nschum committed Jun 4, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 full-ack.el
View
8 full-ack.el
@@ -620,9 +620,15 @@ DIRECTORY is the root directory. If called interactively, it is determined by
(when buffer
(with-current-buffer buffer
(save-excursion
- (goto-line (string-to-number line))
+ (ack--move-to-line (string-to-number line))
(copy-marker (+ (point) offset -1)))))))
+(defsubst ack--move-to-line (line)
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (forward-line (1- line))))
+
(defun ack-find-match (pos)
"Jump to the match at POS."
(interactive (list (let ((posn (event-start last-input-event)))

0 comments on commit 12dca66

Please sign in to comment.