]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #7346: document load-file-name.
authorEli Zaretskii <eliz@gnu.org>
Fri, 12 Nov 2010 16:35:35 +0000 (18:35 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 12 Nov 2010 16:35:35 +0000 (18:35 +0200)
 src/lread.c (Fload): Mention `load-in-progress' and `load-file-name'.
 doc/lispref/loading.texi (How Programs Do Loading): Document `load-file-name'.

doc/lispref/ChangeLog
doc/lispref/loading.texi
src/ChangeLog
src/lread.c

index 5f67371f3a658f1d1907d6e843646df87631c90c..e35cf2335edae977084ff1d6b85543524639039e 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * loading.texi (How Programs Do Loading): Document
+       load-file-name.  (Bug#7346)
+
 2010-11-10  Glenn Morris  <rgm@gnu.org>
 
        * text.texi (Kill Functions, Low-Level Kill Ring): Small fixes.
index bbdd67fc3a5a1ab9f98305c519cab784d4931171..bb8c34caddfb2d88a344ac3bad238b7c6339ee7f 100644 (file)
@@ -107,6 +107,10 @@ in @code{load-path}, where @code{nil} stands for the default directory.
 @code{load-path}, then all three suffixes in the second directory, and
 so on.  @xref{Library Search}.
 
+Whatever the name under which the file is eventually found, and the
+directory where Emacs found it, Emacs sets the value of the variable
+@code{load-file-name} to that file's name.
+
 If you get a warning that @file{foo.elc} is older than @file{foo.el}, it
 means you should consider recompiling @file{foo.el}.  @xref{Byte
 Compilation}.
@@ -157,6 +161,12 @@ This variable is non-@code{nil} if Emacs is in the process of loading a
 file, and it is @code{nil} otherwise.
 @end defvar
 
+@defvar load-file-name
+When Emacs is in the process of loading a file, this variable's value
+is the name of that file, as Emacs found it during the search
+described earlier in this section.
+@end defvar
+
 @defvar load-read-function
 @anchor{Definition of load-read-function}
 @c do not allow page break at anchor; work around Texinfo deficiency.
index 7b5959c8db25ffe3277c1277523cd328ff946cd7..814062497bd475621268fdce1ca0cea88365aa88 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * lread.c (Fload): Mention `load-in-progress' and
+       `load-file-name'.  (Bug#7346)
+
 2010-11-09  Eli Zaretskii  <eliz@gnu.org>
 
        * keyboard.c (kbd_buffer_nr_stored): Define only ifdef subprocesses.
index c96e391a2d3418eb13a0b48b855c3b9ed73874ca..acadcb2d99198a07f4a3aa9a0d9464f6a84ec8d4 100644 (file)
@@ -1007,6 +1007,10 @@ Loading a file records its definitions, and its `provide' and
 `require' calls, in an element of `load-history' whose
 car is the file name loaded.  See `load-history'.
 
+While the file is in the process of being loaded, the variable
+`load-in-progress' is non-nil and the variable `load-file-name'
+is bound to the file's name.
+
 Return t if the file exists and loads successfully.  */)
      (file, noerror, nomessage, nosuffix, must_suffix)
      Lisp_Object file, noerror, nomessage, nosuffix, must_suffix;