Function: elint-add-required-env

elint-add-required-env is a byte-compiled function defined in elint.el.gz.

Signature

(elint-add-required-env ENV NAME FILE)

Documentation

Augment ENV with the variables defined by feature NAME in FILE.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/elint.el.gz
(defun elint-add-required-env (env name file)
  "Augment ENV with the variables defined by feature NAME in FILE."
  (condition-case err
      (let* ((libname (if (stringp file)
			  file
			(symbol-name name)))

	     ;; First try to find .el files, then the raw name
	     (lib1 (locate-library (concat libname ".el") t))
	     (lib (or lib1 (locate-library libname t))))
	;; Clear the messages :-/
	;; (Messes up the "Initializing elint..." message.)
;;;	(message nil)
	(if lib
	    (with-current-buffer (find-file-noselect lib)
	      ;; FIXME this doesn't use a temp buffer, because it
	      ;; stores the result in buffer-local variables so that
	      ;; it can be reused.
	      (elint-update-env)
	      (setq env (elint-env-add-env env elint-buffer-env)))
	      ;;; (with-temp-buffer
	      ;;;       (insert-file-contents lib)
	      ;;;       (with-syntax-table emacs-lisp-mode-syntax-table
	      ;;;         (elint-update-env))
	      ;;;       (setq env (elint-env-add-env env elint-buffer-env))))
	      ;;(message "%s" (format "Elint processed (require '%s)" name))
	  (error "%s.el not found in load-path" libname)))
    (error
     (message "Can't get variables from require'd library %s: %s"
              name (error-message-string err))))
  env)