Mercurial > emacs
comparison src/fns.c @ 2546:c8cd694d70eb
(provide, require): Put appropriately-marked
conses in the current-globals list.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 17 Apr 1993 01:27:53 +0000 |
parents | 6cf2344e6e7e |
children | ba685dcc3750 |
comparison
equal
deleted
inserted
replaced
2545:d666732c5f41 | 2546:c8cd694d70eb |
---|---|
29 #include "commands.h" | 29 #include "commands.h" |
30 | 30 |
31 #include "buffer.h" | 31 #include "buffer.h" |
32 #include "keyboard.h" | 32 #include "keyboard.h" |
33 | 33 |
34 Lisp_Object Qstring_lessp; | 34 Lisp_Object Qstring_lessp, Qprovide, Qrequire; |
35 | 35 |
36 static Lisp_Object internal_equal (); | 36 static Lisp_Object internal_equal (); |
37 | 37 |
38 DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, | 38 DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, |
39 "Return the argument unchanged.") | 39 "Return the argument unchanged.") |
1271 if (!NILP (Vautoload_queue)) | 1271 if (!NILP (Vautoload_queue)) |
1272 Vautoload_queue = Fcons (Fcons (Vfeatures, Qnil), Vautoload_queue); | 1272 Vautoload_queue = Fcons (Fcons (Vfeatures, Qnil), Vautoload_queue); |
1273 tem = Fmemq (feature, Vfeatures); | 1273 tem = Fmemq (feature, Vfeatures); |
1274 if (NILP (tem)) | 1274 if (NILP (tem)) |
1275 Vfeatures = Fcons (feature, Vfeatures); | 1275 Vfeatures = Fcons (feature, Vfeatures); |
1276 LOADHIST_ATTACH (Fcons (Qprovide, feature)); | |
1276 return feature; | 1277 return feature; |
1277 } | 1278 } |
1278 | 1279 |
1279 DEFUN ("require", Frequire, Srequire, 1, 2, 0, | 1280 DEFUN ("require", Frequire, Srequire, 1, 2, 0, |
1280 "If feature FEATURE is not loaded, load it from FILENAME.\n\ | 1281 "If feature FEATURE is not loaded, load it from FILENAME.\n\ |
1285 Lisp_Object feature, file_name; | 1286 Lisp_Object feature, file_name; |
1286 { | 1287 { |
1287 register Lisp_Object tem; | 1288 register Lisp_Object tem; |
1288 CHECK_SYMBOL (feature, 0); | 1289 CHECK_SYMBOL (feature, 0); |
1289 tem = Fmemq (feature, Vfeatures); | 1290 tem = Fmemq (feature, Vfeatures); |
1291 LOADHIST_ATTACH (Fcons (Qrequire, feature)); | |
1290 if (NILP (tem)) | 1292 if (NILP (tem)) |
1291 { | 1293 { |
1292 int count = specpdl_ptr - specpdl; | 1294 int count = specpdl_ptr - specpdl; |
1293 | 1295 |
1294 /* Value saved here is to be restored into Vautoload_queue */ | 1296 /* Value saved here is to be restored into Vautoload_queue */ |
1312 | 1314 |
1313 syms_of_fns () | 1315 syms_of_fns () |
1314 { | 1316 { |
1315 Qstring_lessp = intern ("string-lessp"); | 1317 Qstring_lessp = intern ("string-lessp"); |
1316 staticpro (&Qstring_lessp); | 1318 staticpro (&Qstring_lessp); |
1319 Qprovide = intern ("provide"); | |
1320 staticpro (&Qprovide); | |
1321 Qrequire = intern ("require"); | |
1322 staticpro (&Qrequire); | |
1317 | 1323 |
1318 DEFVAR_LISP ("features", &Vfeatures, | 1324 DEFVAR_LISP ("features", &Vfeatures, |
1319 "A list of symbols which are the features of the executing emacs.\n\ | 1325 "A list of symbols which are the features of the executing emacs.\n\ |
1320 Used by `featurep' and `require', and altered by `provide'."); | 1326 Used by `featurep' and `require', and altered by `provide'."); |
1321 Vfeatures = Qnil; | 1327 Vfeatures = Qnil; |