aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-08-29 10:15:55 +0200
committerAndrea Corallo2020-08-29 13:33:32 +0200
commit38b0ead7c1a8475bef7f811b07beed2c23cbc593 (patch)
treeccc3adec69bd3bfdee2fca10d705371e49c50ae0 /src
parent696ab2eb17cf8850a65814f428287848b7d23d64 (diff)
downloademacs-38b0ead7c1a8475bef7f811b07beed2c23cbc593.tar.gz
emacs-38b0ead7c1a8475bef7f811b07beed2c23cbc593.zip
* Back using `load-file-name' when reading '#$' (bug#42961)
* src/lread.c (read1, read_list): Use again load-file-name when reading '#$'. (syms_of_lread): Update `load-file-name' doc.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lread.c b/src/lread.c
index 5b77868a63b..326af307f9c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3261,7 +3261,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3261 goto retry; 3261 goto retry;
3262 } 3262 }
3263 if (c == '$') 3263 if (c == '$')
3264 return Vload_true_file_name; 3264 return Vload_file_name;
3265 if (c == '\'') 3265 if (c == '\'')
3266 return list2 (Qfunction, read0 (readcharfun)); 3266 return list2 (Qfunction, read0 (readcharfun));
3267 /* #:foo is the uninterned symbol named foo. */ 3267 /* #:foo is the uninterned symbol named foo. */
@@ -4062,7 +4062,7 @@ read_list (bool flag, Lisp_Object readcharfun)
4062 first_in_list = 0; 4062 first_in_list = 0;
4063 4063
4064 /* While building, if the list starts with #$, treat it specially. */ 4064 /* While building, if the list starts with #$, treat it specially. */
4065 if (EQ (elt, Vload_true_file_name) 4065 if (EQ (elt, Vload_file_name)
4066 && ! NILP (elt) 4066 && ! NILP (elt)
4067 && !NILP (Vpurify_flag)) 4067 && !NILP (Vpurify_flag))
4068 { 4068 {
@@ -4083,7 +4083,7 @@ read_list (bool flag, Lisp_Object readcharfun)
4083 elt = concat2 (dot_dot_lisp, Ffile_name_nondirectory (elt)); 4083 elt = concat2 (dot_dot_lisp, Ffile_name_nondirectory (elt));
4084 } 4084 }
4085 } 4085 }
4086 else if (EQ (elt, Vload_true_file_name) 4086 else if (EQ (elt, Vload_file_name)
4087 && ! NILP (elt) 4087 && ! NILP (elt)
4088 && load_force_doc_strings) 4088 && load_force_doc_strings)
4089 doc_reference = 2; 4089 doc_reference = 2;
@@ -5039,8 +5039,10 @@ directory. These file names are converted to absolute at startup. */);
5039 5039
5040 DEFVAR_LISP ("load-file-name", Vload_file_name, 5040 DEFVAR_LISP ("load-file-name", Vload_file_name,
5041 doc: /* Full name of file being loaded by `load'. 5041 doc: /* Full name of file being loaded by `load'.
5042In case a .eln file is being loaded this is unreliable and `load-true-file-name' 5042
5043should be used instead. */); 5043In case of native code being loaded this is indicating the
5044corresponding bytecode filename. Use `load-true-file-name' to obtain
5045the .eln filename. */);
5044 Vload_file_name = Qnil; 5046 Vload_file_name = Qnil;
5045 5047
5046 DEFVAR_LISP ("load-true-file-name", Vload_true_file_name, 5048 DEFVAR_LISP ("load-true-file-name", Vload_true_file_name,