Function: sh-shell-initialize-variables

sh-shell-initialize-variables is a byte-compiled function defined in sh-script.el.gz.

Signature

(sh-shell-initialize-variables)

Documentation

Scan the buffer for variable assignments.

Add these variables to sh-shell-variables.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defun sh-shell-initialize-variables ()
  "Scan the buffer for variable assignments.
Add these variables to `sh-shell-variables'."
  (message "Scanning buffer `%s' for variable assignments..." (buffer-name))
  (save-excursion
    (goto-char (point-min))
    (setq sh-shell-variables-initialized t)
    (while (search-forward "=" nil t)
      (sh--assignment-collect)))
  (add-hook 'post-self-insert-hook #'sh--assignment-collect nil t)
  (message "Scanning buffer `%s' for variable assignments...done"
	   (buffer-name)))