Function: normal-top-level-add-to-load-path

normal-top-level-add-to-load-path is a byte-compiled function defined in startup.el.gz.

Signature

(normal-top-level-add-to-load-path DIRS)

Documentation

This function is called from a subdirs.el file.

It assumes that default-directory is the directory in which the subdirs.el file exists, and it adds to load-path the subdirs of that directory as specified in DIRS. Normally the elements of DIRS are relative.

Source Code

;; Defined in /usr/src/emacs/lisp/startup.el.gz
(defun normal-top-level-add-to-load-path (dirs)
  "This function is called from a subdirs.el file.
It assumes that `default-directory' is the directory in which the
subdirs.el file exists, and it adds to `load-path' the subdirs of
that directory as specified in DIRS.  Normally the elements of
DIRS are relative."
  (let ((tail load-path)
	(thisdir (directory-file-name default-directory)))
    (while (and tail
		;;Don't go all the way to the nil terminator.
		(cdr tail)
		(not (equal thisdir (car tail)))
		(not (and (memq system-type '(ms-dos windows-nt))
			  (equal (downcase thisdir) (downcase (car tail))))))
      (setq tail (cdr tail)))
    ;;Splice the new section in.
    (when tail
      (setcdr tail (append (mapcar #'expand-file-name dirs) (cdr tail))))))