summaryrefslogtreecommitdiff
path: root/lisp/tex-start.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/tex-start.el')
-rw-r--r--lisp/tex-start.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/tex-start.el b/lisp/tex-start.el
new file mode 100644
index 00000000000..0184114faf0
--- /dev/null
+++ b/lisp/tex-start.el
@@ -0,0 +1,11 @@
+; This file is for use by TeX82 (see man page) to allow switching to
+; Emacs at a line number given on the command line
+; It assumes that it has been called by:
+; emacs -l tex-start -e startline <linenumber> <file>
+
+(defun startline ()
+ ;(setq command-line-args (cdr command-line-args))
+ (find-file (car (cdr command-line-args-left)))
+ (goto-char (point-min))
+ (forward-line (1- (string-to-int (car command-line-args-left))))
+ (setq command-line-args-left ()))