Function: tcl-current-word

tcl-current-word is a byte-compiled function defined in tcl.el.gz.

Signature

(tcl-current-word FLAG)

Documentation

Return current command word, or nil.

If FLAG is nil, just uses current-word. Otherwise scans backward for most likely Tcl command word.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/tcl.el.gz
(defun tcl-current-word (flag)
  "Return current command word, or nil.
If FLAG is nil, just uses `current-word'.
Otherwise scans backward for most likely Tcl command word."
  (if (and flag
	   (derived-mode-p '(tcl-mode inferior-tcl-mode)))
      (condition-case nil
	  (save-excursion
	    ;; Look backward for first word actually in alist.
	    (if (bobp)
		()
	      (while (and (not (bobp))
			  (not (tcl-real-command-p)))
		(backward-sexp)))
	    (if (assoc (tcl-word-no-props) tcl-help-alist)
		(tcl-word-no-props)))
	(error nil))
    (tcl-word-no-props)))