org-git-link.el: Silence byte-compiler

* contrib/lisp/org-git-link.el (org-git-open): Replace obsolete
string-to-int with string-to-number.  Don't use goto-line
non-interactively.
This commit is contained in:
Kyle Meyer 2017-05-20 19:00:25 -04:00
parent b9c5720618
commit ddf0063ce7
1 changed files with 5 additions and 1 deletions

View File

@ -103,7 +103,11 @@
(gitdir (nth 0 dirlist))
(relpath (nth 1 dirlist)))
(org-git-open-file-internal gitdir (concat commit ":" relpath))
(when line (goto-line (string-to-int line)))))
(when line
(save-restriction
(widen)
(goto-char (point-min))
(forward-line (1- (string-to-number line)))))))
;; Utility functions (file names etc)