Synch with Gnus.
[elisp/gnus.git-] / lisp / dgnuspath.el.in
1 ;; -*- Emacs-Lisp -*-
2 (let ((addpath
3        "@ADDITIONAL_LOAD_PATH@"
4        )
5       path paths)
6   (while (string-match "[^\0-\37:]+" addpath)
7     (setq path (file-name-as-directory
8                 (expand-file-name (match-string 0 addpath)))
9           addpath (substring addpath (match-end 0)))
10     (if (string-match "apel/$" path)
11         (progn
12           (if (file-directory-p path)
13               (setq paths (nconc paths (list path))))
14           (setq path (substring path 0 (match-beginning 0)))))
15     (if (file-directory-p path)
16         (setq paths (nconc paths (list path)))))
17   (or (null paths)
18       (setq load-path (nconc paths load-path))))