Fix: Warning: `goto-line' is for interactive use only; use `forward-line' instead.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 01 Mar 2015 13:38:37 +0200
changeset 1248 19234649ba68
parent 1247 6de0de0a4033
child 1249 edb7f9210892
Fix: Warning: `goto-line' is for interactive use only; use `forward-line' instead.
my-log-mode.el
--- a/my-log-mode.el	Sun Mar 01 13:32:03 2015 +0200
+++ b/my-log-mode.el	Sun Mar 01 13:38:37 2015 +0200
@@ -34,14 +34,12 @@
     (cond
      ( (and fname (file-exists-p fname))
        (find-file-other-window fname)
-       (goto-line fline)
-      )
+       (goto-char (point-min))
+       (forward-line (1- fline)) )
      ( t
        (if fname
            (message "File '%s' is not found (default directory is '%s')." fname default-directory)
-         (message "No file under current line.")
-         )
-       )
+         (message "No file under current line.") ) )
      )
     ))