[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41998: case nil in load-path not handled in function read-library-na
From: |
Tobias Zawada |
Subject: |
bug#41998: case nil in load-path not handled in function read-library-name |
Date: |
Mon, 22 Jun 2020 07:01:55 +0200 (CEST) |
Version: 28.0.50, commit 2c4509179110459f42119ce328d72fea65689288
Variable `load-path' admits nil as entry standing for `default-directory'.
This case is not handled in function `read-library-name' of library
`lisp/emacs-lisp/find-func.el'.
Diff that fixes this problem:
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index e35db56550..4498a50f90 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -292,12 +292,13 @@ read-library-name
(find-library-suffixes)
"\\|"))
(table (cl-loop for dir in (or find-function-source-path load-path)
- when (file-readable-p dir)
+ for dir-or-default = (or dir default-directory)
+ when (file-readable-p dir-or-default)
append (mapcar
(lambda (file)
(replace-regexp-in-string suffix-regexp
"" file))
- (directory-files dir nil
+ (directory-files dir-or-default nil
suffix-regexp))))
(def (if (eq (function-called-at-point) 'require)
;; `function-called-at-point' may return 'require
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#41998: case nil in load-path not handled in function read-library-name,
Tobias Zawada <=