diff options
| author | Pavel Janík | 2001-11-07 06:24:06 +0000 |
|---|---|---|
| committer | Pavel Janík | 2001-11-07 06:24:06 +0000 |
| commit | 5de38842f49f65257ded446c64c0c259658b0db5 (patch) | |
| tree | 5c285d6cde58f5216ec4c9d2f4c4b8263fe11367 | |
| parent | 05e122fe1f0786dd8dd7532c7dba0fa016092100 (diff) | |
| download | emacs-5de38842f49f65257ded446c64c0c259658b0db5.tar.gz emacs-5de38842f49f65257ded446c64c0c259658b0db5.zip | |
(Feval_region): Remove obsolete #ifdef'd-out code (eval-current-buffer).
Change doc-string comments to `new style' [w/`doc:' keyword].
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/lread.c | 386 |
2 files changed, 185 insertions, 207 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ddf6680a01d..60c21694650 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2001-11-07 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | ||
| 2 | |||
| 3 | * lread.c (Feval_region): Remove obsolete #ifdef'd-out | ||
| 4 | code (eval-current-buffer). | ||
| 5 | Change doc-string comments to `new style' [w/`doc:' keyword]. | ||
| 6 | |||
| 1 | 2001-11-06 Stefan Monnier <monnier@cs.yale.edu> | 7 | 2001-11-06 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 8 | ||
| 3 | * keyboard.c (make_lispy_event): Check integerness and fix | 9 | * keyboard.c (make_lispy_event): Check integerness and fix |
diff --git a/src/lread.c b/src/lread.c index 95914a413a4..a72832201da 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -497,20 +497,20 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii, | |||
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | DEFUN ("read-char", Fread_char, Sread_char, 0, 2, 0, | 499 | DEFUN ("read-char", Fread_char, Sread_char, 0, 2, 0, |
| 500 | "Read a character from the command input (keyboard or macro).\n\ | 500 | doc: /* Read a character from the command input (keyboard or macro). |
| 501 | It is returned as a number.\n\ | 501 | It is returned as a number. |
| 502 | If the user generates an event which is not a character (i.e. a mouse\n\ | 502 | If the user generates an event which is not a character (i.e. a mouse |
| 503 | click or function key event), `read-char' signals an error. As an\n\ | 503 | click or function key event), `read-char' signals an error. As an |
| 504 | exception, switch-frame events are put off until non-ASCII events can\n\ | 504 | exception, switch-frame events are put off until non-ASCII events can |
| 505 | be read.\n\ | 505 | be read. |
| 506 | If you want to read non-character events, or ignore them, call\n\ | 506 | If you want to read non-character events, or ignore them, call |
| 507 | `read-event' or `read-char-exclusive' instead.\n\ | 507 | `read-event' or `read-char-exclusive' instead. |
| 508 | \n\ | 508 | |
| 509 | If the optional argument PROMPT is non-nil, display that as a prompt.\n\ | 509 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 510 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some\n\ | 510 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
| 511 | input method is turned on in the current buffer, that input method\n\ | 511 | input method is turned on in the current buffer, that input method |
| 512 | is used for reading a character.") | 512 | is used for reading a character. */) |
| 513 | (prompt, inherit_input_method) | 513 | (prompt, inherit_input_method) |
| 514 | Lisp_Object prompt, inherit_input_method; | 514 | Lisp_Object prompt, inherit_input_method; |
| 515 | { | 515 | { |
| 516 | if (! NILP (prompt)) | 516 | if (! NILP (prompt)) |
| @@ -519,12 +519,12 @@ is used for reading a character.") | |||
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | DEFUN ("read-event", Fread_event, Sread_event, 0, 2, 0, | 521 | DEFUN ("read-event", Fread_event, Sread_event, 0, 2, 0, |
| 522 | "Read an event object from the input stream.\n\ | 522 | doc: /* Read an event object from the input stream. |
| 523 | If the optional argument PROMPT is non-nil, display that as a prompt.\n\ | 523 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 524 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some\n\ | 524 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
| 525 | input method is turned on in the current buffer, that input method\n\ | 525 | input method is turned on in the current buffer, that input method |
| 526 | is used for reading a character.") | 526 | is used for reading a character. */) |
| 527 | (prompt, inherit_input_method) | 527 | (prompt, inherit_input_method) |
| 528 | Lisp_Object prompt, inherit_input_method; | 528 | Lisp_Object prompt, inherit_input_method; |
| 529 | { | 529 | { |
| 530 | if (! NILP (prompt)) | 530 | if (! NILP (prompt)) |
| @@ -533,14 +533,14 @@ is used for reading a character.") | |||
| 533 | } | 533 | } |
| 534 | 534 | ||
| 535 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 2, 0, | 535 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 2, 0, |
| 536 | "Read a character from the command input (keyboard or macro).\n\ | 536 | doc: /* Read a character from the command input (keyboard or macro). |
| 537 | It is returned as a number. Non-character events are ignored.\n\ | 537 | It is returned as a number. Non-character events are ignored. |
| 538 | \n\ | 538 | |
| 539 | If the optional argument PROMPT is non-nil, display that as a prompt.\n\ | 539 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 540 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some\n\ | 540 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
| 541 | input method is turned on in the current buffer, that input method\n\ | 541 | input method is turned on in the current buffer, that input method |
| 542 | is used for reading a character.") | 542 | is used for reading a character. */) |
| 543 | (prompt, inherit_input_method) | 543 | (prompt, inherit_input_method) |
| 544 | Lisp_Object prompt, inherit_input_method; | 544 | Lisp_Object prompt, inherit_input_method; |
| 545 | { | 545 | { |
| 546 | if (! NILP (prompt)) | 546 | if (! NILP (prompt)) |
| @@ -549,8 +549,8 @@ is used for reading a character.") | |||
| 549 | } | 549 | } |
| 550 | 550 | ||
| 551 | DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | 551 | DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, |
| 552 | "Don't use this yourself.") | 552 | doc: /* Don't use this yourself. */) |
| 553 | () | 553 | () |
| 554 | { | 554 | { |
| 555 | register Lisp_Object val; | 555 | register Lisp_Object val; |
| 556 | XSETINT (val, getc (instream)); | 556 | XSETINT (val, getc (instream)); |
| @@ -608,22 +608,22 @@ record_load_unwind (old) | |||
| 608 | 608 | ||
| 609 | 609 | ||
| 610 | DEFUN ("load", Fload, Sload, 1, 5, 0, | 610 | DEFUN ("load", Fload, Sload, 1, 5, 0, |
| 611 | "Execute a file of Lisp code named FILE.\n\ | 611 | doc: /* Execute a file of Lisp code named FILE. |
| 612 | First try FILE with `.elc' appended, then try with `.el',\n\ | 612 | First try FILE with `.elc' appended, then try with `.el', |
| 613 | then try FILE unmodified. Environment variable references in FILE\n\ | 613 | then try FILE unmodified. Environment variable references in FILE |
| 614 | are replaced with their values by calling `substitute-in-file-name'.\n\ | 614 | are replaced with their values by calling `substitute-in-file-name'. |
| 615 | This function searches the directories in `load-path'.\n\ | 615 | This function searches the directories in `load-path'. |
| 616 | If optional second arg NOERROR is non-nil,\n\ | 616 | If optional second arg NOERROR is non-nil, |
| 617 | report no error if FILE doesn't exist.\n\ | 617 | report no error if FILE doesn't exist. |
| 618 | Print messages at start and end of loading unless\n\ | 618 | Print messages at start and end of loading unless |
| 619 | optional third arg NOMESSAGE is non-nil.\n\ | 619 | optional third arg NOMESSAGE is non-nil. |
| 620 | If optional fourth arg NOSUFFIX is non-nil, don't try adding\n\ | 620 | If optional fourth arg NOSUFFIX is non-nil, don't try adding |
| 621 | suffixes `.elc' or `.el' to the specified name FILE.\n\ | 621 | suffixes `.elc' or `.el' to the specified name FILE. |
| 622 | If optional fifth arg MUST-SUFFIX is non-nil, insist on\n\ | 622 | If optional fifth arg MUST-SUFFIX is non-nil, insist on |
| 623 | the suffix `.elc' or `.el'; don't accept just FILE unless\n\ | 623 | the suffix `.elc' or `.el'; don't accept just FILE unless |
| 624 | it ends in one of those suffixes or includes a directory name.\n\ | 624 | it ends in one of those suffixes or includes a directory name. |
| 625 | Return t if file exists.") | 625 | Return t if file exists. */) |
| 626 | (file, noerror, nomessage, nosuffix, must_suffix) | 626 | (file, noerror, nomessage, nosuffix, must_suffix) |
| 627 | Lisp_Object file, noerror, nomessage, nosuffix, must_suffix; | 627 | Lisp_Object file, noerror, nomessage, nosuffix, must_suffix; |
| 628 | { | 628 | { |
| 629 | register FILE *stream; | 629 | register FILE *stream; |
| @@ -1291,22 +1291,22 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, read | |||
| 1291 | } | 1291 | } |
| 1292 | 1292 | ||
| 1293 | DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "", | 1293 | DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "", |
| 1294 | "Execute the current buffer as Lisp code.\n\ | 1294 | doc: /* Execute the current buffer as Lisp code. |
| 1295 | Programs can pass two arguments, BUFFER and PRINTFLAG.\n\ | 1295 | Programs can pass two arguments, BUFFER and PRINTFLAG. |
| 1296 | BUFFER is the buffer to evaluate (nil means use current buffer).\n\ | 1296 | BUFFER is the buffer to evaluate (nil means use current buffer). |
| 1297 | PRINTFLAG controls printing of output:\n\ | 1297 | PRINTFLAG controls printing of output: |
| 1298 | nil means discard it; anything else is stream for print.\n\ | 1298 | nil means discard it; anything else is stream for print. |
| 1299 | \n\ | 1299 | |
| 1300 | If the optional third argument FILENAME is non-nil,\n\ | 1300 | If the optional third argument FILENAME is non-nil, |
| 1301 | it specifies the file name to use for `load-history'.\n\ | 1301 | it specifies the file name to use for `load-history'. |
| 1302 | The optional fourth argument UNIBYTE specifies `load-convert-to-unibyte'\n\ | 1302 | The optional fourth argument UNIBYTE specifies `load-convert-to-unibyte' |
| 1303 | for this invocation.\n\ | 1303 | for this invocation. |
| 1304 | \n\ | 1304 | |
| 1305 | The optional fifth argument DO-ALLOW-PRINT, if not-nil, specifies that\n\ | 1305 | The optional fifth argument DO-ALLOW-PRINT, if not-nil, specifies that |
| 1306 | `print' and related functions should work normally even if PRINTFLAG is nil.\n\ | 1306 | `print' and related functions should work normally even if PRINTFLAG is nil. |
| 1307 | \n\ | 1307 | |
| 1308 | This function preserves the position of point.") | 1308 | This function preserves the position of point. */) |
| 1309 | (buffer, printflag, filename, unibyte, do_allow_print) | 1309 | (buffer, printflag, filename, unibyte, do_allow_print) |
| 1310 | Lisp_Object buffer, printflag, filename, unibyte, do_allow_print; | 1310 | Lisp_Object buffer, printflag, filename, unibyte, do_allow_print; |
| 1311 | { | 1311 | { |
| 1312 | int count = specpdl_ptr - specpdl; | 1312 | int count = specpdl_ptr - specpdl; |
| @@ -1336,48 +1336,19 @@ This function preserves the position of point.") | |||
| 1336 | return Qnil; | 1336 | return Qnil; |
| 1337 | } | 1337 | } |
| 1338 | 1338 | ||
| 1339 | #if 0 | ||
| 1340 | XDEFUN ("eval-current-buffer", Feval_current_buffer, Seval_current_buffer, 0, 1, "", | ||
| 1341 | "Execute the current buffer as Lisp code.\n\ | ||
| 1342 | Programs can pass argument PRINTFLAG which controls printing of output:\n\ | ||
| 1343 | nil means discard it; anything else is stream for print.\n\ | ||
| 1344 | \n\ | ||
| 1345 | If there is no error, point does not move. If there is an error,\n\ | ||
| 1346 | point remains at the end of the last character read from the buffer.") | ||
| 1347 | (printflag) | ||
| 1348 | Lisp_Object printflag; | ||
| 1349 | { | ||
| 1350 | int count = specpdl_ptr - specpdl; | ||
| 1351 | Lisp_Object tem, cbuf; | ||
| 1352 | |||
| 1353 | cbuf = Fcurrent_buffer () | ||
| 1354 | |||
| 1355 | if (NILP (printflag)) | ||
| 1356 | tem = Qsymbolp; | ||
| 1357 | else | ||
| 1358 | tem = printflag; | ||
| 1359 | specbind (Qstandard_output, tem); | ||
| 1360 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | ||
| 1361 | SET_PT (BEGV); | ||
| 1362 | readevalloop (cbuf, 0, XBUFFER (cbuf)->filename, Feval, | ||
| 1363 | !NILP (printflag), Qnil, Qnil); | ||
| 1364 | return unbind_to (count, Qnil); | ||
| 1365 | } | ||
| 1366 | #endif | ||
| 1367 | |||
| 1368 | DEFUN ("eval-region", Feval_region, Seval_region, 2, 4, "r", | 1339 | DEFUN ("eval-region", Feval_region, Seval_region, 2, 4, "r", |
| 1369 | "Execute the region as Lisp code.\n\ | 1340 | doc: /* Execute the region as Lisp code. |
| 1370 | When called from programs, expects two arguments,\n\ | 1341 | When called from programs, expects two arguments, |
| 1371 | giving starting and ending indices in the current buffer\n\ | 1342 | giving starting and ending indices in the current buffer |
| 1372 | of the text to be executed.\n\ | 1343 | of the text to be executed. |
| 1373 | Programs can pass third argument PRINTFLAG which controls output:\n\ | 1344 | Programs can pass third argument PRINTFLAG which controls output: |
| 1374 | nil means discard it; anything else is stream for printing it.\n\ | 1345 | nil means discard it; anything else is stream for printing it. |
| 1375 | Also the fourth argument READ-FUNCTION, if non-nil, is used\n\ | 1346 | Also the fourth argument READ-FUNCTION, if non-nil, is used |
| 1376 | instead of `read' to read each expression. It gets one argument\n\ | 1347 | instead of `read' to read each expression. It gets one argument |
| 1377 | which is the input stream for reading characters.\n\ | 1348 | which is the input stream for reading characters. |
| 1378 | \n\ | 1349 | |
| 1379 | This function does not move point.") | 1350 | This function does not move point. */) |
| 1380 | (start, end, printflag, read_function) | 1351 | (start, end, printflag, read_function) |
| 1381 | Lisp_Object start, end, printflag, read_function; | 1352 | Lisp_Object start, end, printflag, read_function; |
| 1382 | { | 1353 | { |
| 1383 | int count = specpdl_ptr - specpdl; | 1354 | int count = specpdl_ptr - specpdl; |
| @@ -1406,17 +1377,17 @@ This function does not move point.") | |||
| 1406 | 1377 | ||
| 1407 | 1378 | ||
| 1408 | DEFUN ("read", Fread, Sread, 0, 1, 0, | 1379 | DEFUN ("read", Fread, Sread, 0, 1, 0, |
| 1409 | "Read one Lisp expression as text from STREAM, return as Lisp object.\n\ | 1380 | doc: /* Read one Lisp expression as text from STREAM, return as Lisp object. |
| 1410 | If STREAM is nil, use the value of `standard-input' (which see).\n\ | 1381 | If STREAM is nil, use the value of `standard-input' (which see). |
| 1411 | STREAM or the value of `standard-input' may be:\n\ | 1382 | STREAM or the value of `standard-input' may be: |
| 1412 | a buffer (read from point and advance it)\n\ | 1383 | a buffer (read from point and advance it) |
| 1413 | a marker (read from where it points and advance it)\n\ | 1384 | a marker (read from where it points and advance it) |
| 1414 | a function (call it with no arguments for each character,\n\ | 1385 | a function (call it with no arguments for each character, |
| 1415 | call it with a char as argument to push a char back)\n\ | 1386 | call it with a char as argument to push a char back) |
| 1416 | a string (takes text from string, starting at the beginning)\n\ | 1387 | a string (takes text from string, starting at the beginning) |
| 1417 | t (read text line using minibuffer and use it, or read from\n\ | 1388 | t (read text line using minibuffer and use it, or read from |
| 1418 | standard input in batch mode).") | 1389 | standard input in batch mode). */) |
| 1419 | (stream) | 1390 | (stream) |
| 1420 | Lisp_Object stream; | 1391 | Lisp_Object stream; |
| 1421 | { | 1392 | { |
| 1422 | extern Lisp_Object Fread_minibuffer (); | 1393 | extern Lisp_Object Fread_minibuffer (); |
| @@ -1440,11 +1411,11 @@ STREAM or the value of `standard-input' may be:\n\ | |||
| 1440 | } | 1411 | } |
| 1441 | 1412 | ||
| 1442 | DEFUN ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0, | 1413 | DEFUN ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0, |
| 1443 | "Read one Lisp expression which is represented as text by STRING.\n\ | 1414 | doc: /* Read one Lisp expression which is represented as text by STRING. |
| 1444 | Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX).\n\ | 1415 | Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). |
| 1445 | START and END optionally delimit a substring of STRING from which to read;\n\ | 1416 | START and END optionally delimit a substring of STRING from which to read; |
| 1446 | they default to 0 and (length STRING) respectively.") | 1417 | they default to 0 and (length STRING) respectively. */) |
| 1447 | (string, start, end) | 1418 | (string, start, end) |
| 1448 | Lisp_Object string, start, end; | 1419 | Lisp_Object string, start, end; |
| 1449 | { | 1420 | { |
| 1450 | int startval, endval; | 1421 | int startval, endval; |
| @@ -2926,11 +2897,11 @@ make_symbol (str) | |||
| 2926 | } | 2897 | } |
| 2927 | 2898 | ||
| 2928 | DEFUN ("intern", Fintern, Sintern, 1, 2, 0, | 2899 | DEFUN ("intern", Fintern, Sintern, 1, 2, 0, |
| 2929 | "Return the canonical symbol whose name is STRING.\n\ | 2900 | doc: /* Return the canonical symbol whose name is STRING. |
| 2930 | If there is none, one is created by this function and returned.\n\ | 2901 | If there is none, one is created by this function and returned. |
| 2931 | A second optional argument specifies the obarray to use;\n\ | 2902 | A second optional argument specifies the obarray to use; |
| 2932 | it defaults to the value of `obarray'.") | 2903 | it defaults to the value of `obarray'. */) |
| 2933 | (string, obarray) | 2904 | (string, obarray) |
| 2934 | Lisp_Object string, obarray; | 2905 | Lisp_Object string, obarray; |
| 2935 | { | 2906 | { |
| 2936 | register Lisp_Object tem, sym, *ptr; | 2907 | register Lisp_Object tem, sym, *ptr; |
| @@ -2972,12 +2943,12 @@ it defaults to the value of `obarray'.") | |||
| 2972 | } | 2943 | } |
| 2973 | 2944 | ||
| 2974 | DEFUN ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0, | 2945 | DEFUN ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0, |
| 2975 | "Return the canonical symbol named NAME, or nil if none exists.\n\ | 2946 | doc: /* Return the canonical symbol named NAME, or nil if none exists. |
| 2976 | NAME may be a string or a symbol. If it is a symbol, that exact\n\ | 2947 | NAME may be a string or a symbol. If it is a symbol, that exact |
| 2977 | symbol is searched for.\n\ | 2948 | symbol is searched for. |
| 2978 | A second optional argument specifies the obarray to use;\n\ | 2949 | A second optional argument specifies the obarray to use; |
| 2979 | it defaults to the value of `obarray'.") | 2950 | it defaults to the value of `obarray'. */) |
| 2980 | (name, obarray) | 2951 | (name, obarray) |
| 2981 | Lisp_Object name, obarray; | 2952 | Lisp_Object name, obarray; |
| 2982 | { | 2953 | { |
| 2983 | register Lisp_Object tem; | 2954 | register Lisp_Object tem; |
| @@ -3002,12 +2973,12 @@ it defaults to the value of `obarray'.") | |||
| 3002 | } | 2973 | } |
| 3003 | 2974 | ||
| 3004 | DEFUN ("unintern", Funintern, Sunintern, 1, 2, 0, | 2975 | DEFUN ("unintern", Funintern, Sunintern, 1, 2, 0, |
| 3005 | "Delete the symbol named NAME, if any, from OBARRAY.\n\ | 2976 | doc: /* Delete the symbol named NAME, if any, from OBARRAY. |
| 3006 | The value is t if a symbol was found and deleted, nil otherwise.\n\ | 2977 | The value is t if a symbol was found and deleted, nil otherwise. |
| 3007 | NAME may be a string or a symbol. If it is a symbol, that symbol\n\ | 2978 | NAME may be a string or a symbol. If it is a symbol, that symbol |
| 3008 | is deleted, if it belongs to OBARRAY--no other symbol is deleted.\n\ | 2979 | is deleted, if it belongs to OBARRAY--no other symbol is deleted. |
| 3009 | OBARRAY defaults to the value of the variable `obarray'.") | 2980 | OBARRAY defaults to the value of the variable `obarray'. */) |
| 3010 | (name, obarray) | 2981 | (name, obarray) |
| 3011 | Lisp_Object name, obarray; | 2982 | Lisp_Object name, obarray; |
| 3012 | { | 2983 | { |
| 3013 | register Lisp_Object string, tem; | 2984 | register Lisp_Object string, tem; |
| @@ -3164,9 +3135,9 @@ mapatoms_1 (sym, function) | |||
| 3164 | } | 3135 | } |
| 3165 | 3136 | ||
| 3166 | DEFUN ("mapatoms", Fmapatoms, Smapatoms, 1, 2, 0, | 3137 | DEFUN ("mapatoms", Fmapatoms, Smapatoms, 1, 2, 0, |
| 3167 | "Call FUNCTION on every symbol in OBARRAY.\n\ | 3138 | doc: /* Call FUNCTION on every symbol in OBARRAY. |
| 3168 | OBARRAY defaults to the value of `obarray'.") | 3139 | OBARRAY defaults to the value of `obarray'. */) |
| 3169 | (function, obarray) | 3140 | (function, obarray) |
| 3170 | Lisp_Object function, obarray; | 3141 | Lisp_Object function, obarray; |
| 3171 | { | 3142 | { |
| 3172 | if (NILP (obarray)) obarray = Vobarray; | 3143 | if (NILP (obarray)) obarray = Vobarray; |
| @@ -3246,7 +3217,7 @@ defalias (sname, string) | |||
| 3246 | 3217 | ||
| 3247 | /* Define an "integer variable"; a symbol whose value is forwarded | 3218 | /* Define an "integer variable"; a symbol whose value is forwarded |
| 3248 | to a C variable of type int. Sample call: */ | 3219 | to a C variable of type int. Sample call: */ |
| 3249 | /* DEFVAR_INT ("indent-tabs-mode", &indent_tabs_mode, "Documentation"); */ | 3220 | /* DEFVAR_INT ("indent-tabs-mode", &indent_tabs_mode, "Documentation"); */ |
| 3250 | void | 3221 | void |
| 3251 | defvar_int (namestring, address) | 3222 | defvar_int (namestring, address) |
| 3252 | char *namestring; | 3223 | char *namestring; |
| @@ -3560,29 +3531,29 @@ syms_of_lread () | |||
| 3560 | defsubr (&Smapatoms); | 3531 | defsubr (&Smapatoms); |
| 3561 | 3532 | ||
| 3562 | DEFVAR_LISP ("obarray", &Vobarray, | 3533 | DEFVAR_LISP ("obarray", &Vobarray, |
| 3563 | "Symbol table for use by `intern' and `read'.\n\ | 3534 | doc: /* Symbol table for use by `intern' and `read'. |
| 3564 | It is a vector whose length ought to be prime for best results.\n\ | 3535 | It is a vector whose length ought to be prime for best results. |
| 3565 | The vector's contents don't make sense if examined from Lisp programs;\n\ | 3536 | The vector's contents don't make sense if examined from Lisp programs; |
| 3566 | to find all the symbols in an obarray, use `mapatoms'."); | 3537 | to find all the symbols in an obarray, use `mapatoms'. */); |
| 3567 | 3538 | ||
| 3568 | DEFVAR_LISP ("values", &Vvalues, | 3539 | DEFVAR_LISP ("values", &Vvalues, |
| 3569 | "List of values of all expressions which were read, evaluated and printed.\n\ | 3540 | doc: /* List of values of all expressions which were read, evaluated and printed. |
| 3570 | Order is reverse chronological."); | 3541 | Order is reverse chronological. */); |
| 3571 | 3542 | ||
| 3572 | DEFVAR_LISP ("standard-input", &Vstandard_input, | 3543 | DEFVAR_LISP ("standard-input", &Vstandard_input, |
| 3573 | "Stream for read to get input from.\n\ | 3544 | doc: /* Stream for read to get input from. |
| 3574 | See documentation of `read' for possible values."); | 3545 | See documentation of `read' for possible values. */); |
| 3575 | Vstandard_input = Qt; | 3546 | Vstandard_input = Qt; |
| 3576 | 3547 | ||
| 3577 | DEFVAR_LISP ("load-path", &Vload_path, | 3548 | DEFVAR_LISP ("load-path", &Vload_path, |
| 3578 | "*List of directories to search for files to load.\n\ | 3549 | doc: /* *List of directories to search for files to load. |
| 3579 | Each element is a string (directory name) or nil (try default directory).\n\ | 3550 | Each element is a string (directory name) or nil (try default directory). |
| 3580 | Initialized based on EMACSLOADPATH environment variable, if any,\n\ | 3551 | Initialized based on EMACSLOADPATH environment variable, if any, |
| 3581 | otherwise to default specified by file `epaths.h' when Emacs was built."); | 3552 | otherwise to default specified by file `epaths.h' when Emacs was built. */); |
| 3582 | 3553 | ||
| 3583 | DEFVAR_LISP ("load-suffixes", &Vload_suffixes, | 3554 | DEFVAR_LISP ("load-suffixes", &Vload_suffixes, |
| 3584 | "*List of suffixes to try for files to load.\n\ | 3555 | doc: /* *List of suffixes to try for files to load. |
| 3585 | This list should not include the empty string."); | 3556 | This list should not include the empty string. */); |
| 3586 | Vload_suffixes = Fcons (build_string (".elc"), | 3557 | Vload_suffixes = Fcons (build_string (".elc"), |
| 3587 | Fcons (build_string (".el"), Qnil)); | 3558 | Fcons (build_string (".el"), Qnil)); |
| 3588 | /* We don't use empty_string because it's not initialized yet. */ | 3559 | /* We don't use empty_string because it's not initialized yet. */ |
| @@ -3590,106 +3561,107 @@ This list should not include the empty string."); | |||
| 3590 | staticpro (&default_suffixes); | 3561 | staticpro (&default_suffixes); |
| 3591 | 3562 | ||
| 3592 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, | 3563 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, |
| 3593 | "Non-nil iff inside of `load'."); | 3564 | doc: /* Non-nil iff inside of `load'. */); |
| 3594 | 3565 | ||
| 3595 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, | 3566 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, |
| 3596 | "An alist of expressions to be evalled when particular files are loaded.\n\ | 3567 | doc: /* An alist of expressions to be evalled when particular files are loaded. |
| 3597 | Each element looks like (FILENAME FORMS...).\n\ | 3568 | Each element looks like (FILENAME FORMS...). |
| 3598 | When `load' is run and the file-name argument is FILENAME,\n\ | 3569 | When `load' is run and the file-name argument is FILENAME, |
| 3599 | the FORMS in the corresponding element are executed at the end of loading.\n\n\ | 3570 | the FORMS in the corresponding element are executed at the end of loading. |
| 3600 | FILENAME must match exactly! Normally FILENAME is the name of a library,\n\ | 3571 | |
| 3601 | with no directory specified, since that is how `load' is normally called.\n\ | 3572 | FILENAME must match exactly! Normally FILENAME is the name of a library, |
| 3602 | An error in FORMS does not undo the load,\n\ | 3573 | with no directory specified, since that is how `load' is normally called. |
| 3603 | but does prevent execution of the rest of the FORMS.\n\ | 3574 | An error in FORMS does not undo the load, |
| 3604 | FILENAME can also be a symbol (a feature) and FORMS are then executed\n\ | 3575 | but does prevent execution of the rest of the FORMS. |
| 3605 | when the corresponding call to `provide' is made."); | 3576 | FILENAME can also be a symbol (a feature) and FORMS are then executed |
| 3577 | when the corresponding call to `provide' is made. */); | ||
| 3606 | Vafter_load_alist = Qnil; | 3578 | Vafter_load_alist = Qnil; |
| 3607 | 3579 | ||
| 3608 | DEFVAR_LISP ("load-history", &Vload_history, | 3580 | DEFVAR_LISP ("load-history", &Vload_history, |
| 3609 | "Alist mapping source file names to symbols and features.\n\ | 3581 | doc: /* Alist mapping source file names to symbols and features. |
| 3610 | Each alist element is a list that starts with a file name,\n\ | 3582 | Each alist element is a list that starts with a file name, |
| 3611 | except for one element (optional) that starts with nil and describes\n\ | 3583 | except for one element (optional) that starts with nil and describes |
| 3612 | definitions evaluated from buffers not visiting files.\n\ | 3584 | definitions evaluated from buffers not visiting files. |
| 3613 | The remaining elements of each list are symbols defined as functions\n\ | 3585 | The remaining elements of each list are symbols defined as functions |
| 3614 | or variables, and cons cells `(provide . FEATURE)', `(require . FEATURE)',\n\ | 3586 | or variables, and cons cells `(provide . FEATURE)', `(require . FEATURE)', |
| 3615 | and `(autoload . SYMBOL)'."); | 3587 | and `(autoload . SYMBOL)'. */); |
| 3616 | Vload_history = Qnil; | 3588 | Vload_history = Qnil; |
| 3617 | 3589 | ||
| 3618 | DEFVAR_LISP ("load-file-name", &Vload_file_name, | 3590 | DEFVAR_LISP ("load-file-name", &Vload_file_name, |
| 3619 | "Full name of file being loaded by `load'."); | 3591 | doc: /* Full name of file being loaded by `load'. */); |
| 3620 | Vload_file_name = Qnil; | 3592 | Vload_file_name = Qnil; |
| 3621 | 3593 | ||
| 3622 | DEFVAR_LISP ("user-init-file", &Vuser_init_file, | 3594 | DEFVAR_LISP ("user-init-file", &Vuser_init_file, |
| 3623 | "File name, including directory, of user's initialization file.\n\ | 3595 | doc: /* File name, including directory, of user's initialization file. |
| 3624 | If the file loaded had extension `.elc' and there was a corresponding `.el'\n\ | 3596 | If the file loaded had extension `.elc' and there was a corresponding `.el' |
| 3625 | file, this variable contains the name of the .el file, suitable for use\n\ | 3597 | file, this variable contains the name of the .el file, suitable for use |
| 3626 | by functions like `custom-save-all' which edit the init file."); | 3598 | by functions like `custom-save-all' which edit the init file. */); |
| 3627 | Vuser_init_file = Qnil; | 3599 | Vuser_init_file = Qnil; |
| 3628 | 3600 | ||
| 3629 | DEFVAR_LISP ("current-load-list", &Vcurrent_load_list, | 3601 | DEFVAR_LISP ("current-load-list", &Vcurrent_load_list, |
| 3630 | "Used for internal purposes by `load'."); | 3602 | doc: /* Used for internal purposes by `load'. */); |
| 3631 | Vcurrent_load_list = Qnil; | 3603 | Vcurrent_load_list = Qnil; |
| 3632 | 3604 | ||
| 3633 | DEFVAR_LISP ("load-read-function", &Vload_read_function, | 3605 | DEFVAR_LISP ("load-read-function", &Vload_read_function, |
| 3634 | "Function used by `load' and `eval-region' for reading expressions.\n\ | 3606 | doc: /* Function used by `load' and `eval-region' for reading expressions. |
| 3635 | The default is nil, which means use the function `read'."); | 3607 | The default is nil, which means use the function `read'. */); |
| 3636 | Vload_read_function = Qnil; | 3608 | Vload_read_function = Qnil; |
| 3637 | 3609 | ||
| 3638 | DEFVAR_LISP ("load-source-file-function", &Vload_source_file_function, | 3610 | DEFVAR_LISP ("load-source-file-function", &Vload_source_file_function, |
| 3639 | "Function called in `load' for loading an Emacs lisp source file.\n\ | 3611 | doc: /* Function called in `load' for loading an Emacs lisp source file. |
| 3640 | This function is for doing code conversion before reading the source file.\n\ | 3612 | This function is for doing code conversion before reading the source file. |
| 3641 | If nil, loading is done without any code conversion.\n\ | 3613 | If nil, loading is done without any code conversion. |
| 3642 | Arguments are FULLNAME, FILE, NOERROR, NOMESSAGE, where\n\ | 3614 | Arguments are FULLNAME, FILE, NOERROR, NOMESSAGE, where |
| 3643 | FULLNAME is the full name of FILE.\n\ | 3615 | FULLNAME is the full name of FILE. |
| 3644 | See `load' for the meaning of the remaining arguments."); | 3616 | See `load' for the meaning of the remaining arguments. */); |
| 3645 | Vload_source_file_function = Qnil; | 3617 | Vload_source_file_function = Qnil; |
| 3646 | 3618 | ||
| 3647 | DEFVAR_BOOL ("load-force-doc-strings", &load_force_doc_strings, | 3619 | DEFVAR_BOOL ("load-force-doc-strings", &load_force_doc_strings, |
| 3648 | "Non-nil means `load' should force-load all dynamic doc strings.\n\ | 3620 | doc: /* Non-nil means `load' should force-load all dynamic doc strings. |
| 3649 | This is useful when the file being loaded is a temporary copy."); | 3621 | This is useful when the file being loaded is a temporary copy. */); |
| 3650 | load_force_doc_strings = 0; | 3622 | load_force_doc_strings = 0; |
| 3651 | 3623 | ||
| 3652 | DEFVAR_BOOL ("load-convert-to-unibyte", &load_convert_to_unibyte, | 3624 | DEFVAR_BOOL ("load-convert-to-unibyte", &load_convert_to_unibyte, |
| 3653 | "Non-nil means `read' converts strings to unibyte whenever possible.\n\ | 3625 | doc: /* Non-nil means `read' converts strings to unibyte whenever possible. |
| 3654 | This is normally bound by `load' and `eval-buffer' to control `read',\n\ | 3626 | This is normally bound by `load' and `eval-buffer' to control `read', |
| 3655 | and is not meant for users to change."); | 3627 | and is not meant for users to change. */); |
| 3656 | load_convert_to_unibyte = 0; | 3628 | load_convert_to_unibyte = 0; |
| 3657 | 3629 | ||
| 3658 | DEFVAR_LISP ("source-directory", &Vsource_directory, | 3630 | DEFVAR_LISP ("source-directory", &Vsource_directory, |
| 3659 | "Directory in which Emacs sources were found when Emacs was built.\n\ | 3631 | doc: /* Directory in which Emacs sources were found when Emacs was built. |
| 3660 | You cannot count on them to still be there!"); | 3632 | You cannot count on them to still be there! */); |
| 3661 | Vsource_directory | 3633 | Vsource_directory |
| 3662 | = Fexpand_file_name (build_string ("../"), | 3634 | = Fexpand_file_name (build_string ("../"), |
| 3663 | Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH))); | 3635 | Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH))); |
| 3664 | 3636 | ||
| 3665 | DEFVAR_LISP ("preloaded-file-list", &Vpreloaded_file_list, | 3637 | DEFVAR_LISP ("preloaded-file-list", &Vpreloaded_file_list, |
| 3666 | "List of files that were preloaded (when dumping Emacs)."); | 3638 | doc: /* List of files that were preloaded (when dumping Emacs). */); |
| 3667 | Vpreloaded_file_list = Qnil; | 3639 | Vpreloaded_file_list = Qnil; |
| 3668 | 3640 | ||
| 3669 | DEFVAR_LISP ("byte-boolean-vars", &Vbyte_boolean_vars, | 3641 | DEFVAR_LISP ("byte-boolean-vars", &Vbyte_boolean_vars, |
| 3670 | "List of all DEFVAR_BOOL variables, used by the byte code optimizer."); | 3642 | doc: /* List of all DEFVAR_BOOL variables, used by the byte code optimizer. */); |
| 3671 | Vbyte_boolean_vars = Qnil; | 3643 | Vbyte_boolean_vars = Qnil; |
| 3672 | 3644 | ||
| 3673 | DEFVAR_BOOL ("load-dangerous-libraries", &load_dangerous_libraries, | 3645 | DEFVAR_BOOL ("load-dangerous-libraries", &load_dangerous_libraries, |
| 3674 | "Non-nil means load dangerous compiled Lisp files.\n\ | 3646 | doc: /* Non-nil means load dangerous compiled Lisp files. |
| 3675 | Some versions of XEmacs use different byte codes than Emacs. These\n\ | 3647 | Some versions of XEmacs use different byte codes than Emacs. These |
| 3676 | incompatible byte codes can make Emacs crash when it tries to execute\n\ | 3648 | incompatible byte codes can make Emacs crash when it tries to execute |
| 3677 | them."); | 3649 | them. */); |
| 3678 | load_dangerous_libraries = 0; | 3650 | load_dangerous_libraries = 0; |
| 3679 | 3651 | ||
| 3680 | DEFVAR_LISP ("bytecomp-version-regexp", &Vbytecomp_version_regexp, | 3652 | DEFVAR_LISP ("bytecomp-version-regexp", &Vbytecomp_version_regexp, |
| 3681 | "Regular expression matching safe to load compiled Lisp files.\n\ | 3653 | doc: /* Regular expression matching safe to load compiled Lisp files. |
| 3682 | When Emacs loads a compiled Lisp file, it reads the first 512 bytes\n\ | 3654 | When Emacs loads a compiled Lisp file, it reads the first 512 bytes |
| 3683 | from the file, and matches them against this regular expression.\n\ | 3655 | from the file, and matches them against this regular expression. |
| 3684 | When the regular expression matches, the file is considered to be safe\n\ | 3656 | When the regular expression matches, the file is considered to be safe |
| 3685 | to load. See also `load-dangerous-libraries'."); | 3657 | to load. See also `load-dangerous-libraries'. */); |
| 3686 | Vbytecomp_version_regexp | 3658 | Vbytecomp_version_regexp |
| 3687 | = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); | 3659 | = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); |
| 3688 | 3660 | ||
| 3689 | DEFVAR_LISP ("recursive-load-depth-limit", &Vrecursive_load_depth_limit, | 3661 | DEFVAR_LISP ("recursive-load-depth-limit", &Vrecursive_load_depth_limit, |
| 3690 | "Limit for depth of recursive loads.\n\ | 3662 | doc: /* Limit for depth of recursive loads. |
| 3691 | Value should be either an integer > 0 specifying the limit, or nil for\n\ | 3663 | Value should be either an integer > 0 specifying the limit, or nil for |
| 3692 | no limit."); | 3664 | no limit. */); |
| 3693 | Vrecursive_load_depth_limit = make_number (50); | 3665 | Vrecursive_load_depth_limit = make_number (50); |
| 3694 | 3666 | ||
| 3695 | /* Vsource_directory was initialized in init_lread. */ | 3667 | /* Vsource_directory was initialized in init_lread. */ |