Function: tcl-guess-application
tcl-guess-application is a byte-compiled function defined in
tcl.el.gz.
Signature
(tcl-guess-application)
Documentation
Attempt to guess Tcl application by looking at first line.
The first line is assumed to look like "#!.../program ...".
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/tcl.el.gz
;; The following was inspired by the Tcl editing mode written by
;; Gregor Schmid <schmid@fb3-s7.math.TU-Berlin.DE>. His version also
;; attempts to snarf the command line options from the command line,
;; but I didn't think that would really be that helpful (doesn't seem
;; like it would be right enough. His version also looks for the
;; "#!/bin/csh ... exec" hack, but that seemed even less useful.
;; FIXME should make sure that the application mentioned actually
;; exists.
(defun tcl-guess-application ()
"Attempt to guess Tcl application by looking at first line.
The first line is assumed to look like \"#!.../program ...\"."
(save-excursion
(goto-char (point-min))
(if (looking-at "#![^ \t]*/\\([^ \t\n/]+\\)\\([ \t]\\|$\\)")
(setq-local tcl-application (match-string 1)))))