]> code.delx.au - gnu-emacs/commitdiff
Have the doc strings of `load-path' and `require' mention each other
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Apr 2016 14:44:06 +0000 (16:44 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 1 May 2016 17:27:12 +0000 (19:27 +0200)
* src/fns.c (Frequire): Mention `load-path' and fill the doc
string (bug#18829).

* src/lread.c (syms_of_lread): Mention that `require' uses
`load-path'.

(cherry picked from commit 3eca9a03816f95da0030665223c0b5262f223ba7)

src/fns.c
src/lread.c

index 9bbbb6d7b7177575c58f6a493e6771ae74322121..ef6055c17d1ee45bf6b21aa18288d138000c3b69 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -2762,17 +2762,24 @@ require_unwind (Lisp_Object old_value)
 
 DEFUN ("require", Frequire, Srequire, 1, 3, 0,
        doc: /* If feature FEATURE is not loaded, load it from FILENAME.
-If FEATURE is not a member of the list `features', then the feature
-is not loaded; so load the file FILENAME.
-If FILENAME is omitted, the printname of FEATURE is used as the file name,
-and `load' will try to load this name appended with the suffix `.elc',
-`.el', or the system-dependent suffix for dynamic module files, in that
-order.  The name without appended suffix will not be used.
-See `get-load-suffixes' for the complete list of suffixes.
-If the optional third argument NOERROR is non-nil,
-then return nil if the file is not found instead of signaling an error.
-Normally the return value is FEATURE.
-The normal messages at start and end of loading FILENAME are suppressed.  */)
+If FEATURE is not a member of the list `features', then the feature is
+not loaded; so load the file FILENAME.
+
+If FILENAME is omitted, the printname of FEATURE is used as the file
+name, and `load' will try to load this name appended with the suffix
+`.elc', `.el', or the system-dependent suffix for dynamic module
+files, in that order.  The name without appended suffix will not be
+used.  See `get-load-suffixes' for the complete list of suffixes.
+
+The directories in `load-path' are searched when trying to find the
+file name.
+
+If the optional third argument NOERROR is non-nil, then return nil if
+the file is not found instead of signaling an error.  Normally the
+return value is FEATURE.
+
+The normal messages at start and end of loading FILENAME are
+suppressed.  */)
   (Lisp_Object feature, Lisp_Object filename, Lisp_Object noerror)
 {
   Lisp_Object tem;
index d374406e7b9473381f38c4660b641d0b543b1421..ef58b20070d85f7837256a1022b6b1f6ad4b5c67 100644 (file)
@@ -4508,6 +4508,7 @@ were read in.  */);
               doc: /* List of directories to search for files to load.
 Each element is a string (directory file name) or nil (meaning
 `default-directory').
+This list is consulted by the `require' function.
 Initialized during startup as described in Info node `(elisp)Library Search'.
 Use `directory-file-name' when adding items to this path.  However, Lisp
 programs that process this list should tolerate directories both with