diff options
| author | Gerd Moellmann | 2000-04-26 17:34:37 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-04-26 17:34:37 +0000 |
| commit | 138e541fe66054e57dbe9332cf6be36c72904bc2 (patch) | |
| tree | f4885dd0dbcdb547503fd32126620b65a23f4464 | |
| parent | 349c034d9e90a341e81a7c01df5e3af1495db093 (diff) | |
| download | emacs-138e541fe66054e57dbe9332cf6be36c72904bc2.tar.gz emacs-138e541fe66054e57dbe9332cf6be36c72904bc2.zip | |
(normal-top-level-add-to-load-path): Handle
case that the default directory is not in load-path.
| -rw-r--r-- | lisp/startup.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 230988f2104..e2b227c7bfe 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -382,11 +382,15 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 382 | (let ((tail load-path) | 382 | (let ((tail load-path) |
| 383 | (thisdir (directory-file-name default-directory))) | 383 | (thisdir (directory-file-name default-directory))) |
| 384 | (while (and tail | 384 | (while (and tail |
| 385 | ;;Don't go all the way to the nil terminator. | ||
| 386 | (cdr tail) | ||
| 385 | (not (equal thisdir (car tail))) | 387 | (not (equal thisdir (car tail))) |
| 386 | (not (and (memq system-type '(ms-dos windows-nt)) | 388 | (not (and (memq system-type '(ms-dos windows-nt)) |
| 387 | (equal (downcase thisdir) (downcase (car tail)))))) | 389 | (equal (downcase thisdir) (downcase (car tail)))))) |
| 388 | (setq tail (cdr tail))) | 390 | (setq tail (cdr tail))) |
| 389 | (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail))))) | 391 | ;;Splice the new section in. |
| 392 | (when tail | ||
| 393 | (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail)))))) | ||
| 390 | 394 | ||
| 391 | (defun normal-top-level () | 395 | (defun normal-top-level () |
| 392 | (if command-line-processed | 396 | (if command-line-processed |