Commit graph

200 commits

Author SHA1 Message Date
Kenichi Handa
164d590d5c (read_escape): For Control modifier, pay attention to
multibyte character.
(read1): Likewise.  Singal error or a multibyte character which
has a modifer bit.  Check validity of Shift modifer.
1999-08-13 12:54:36 +00:00
Richard M. Stallman
1076254d83 (Feval_buffer): New arg DO_ALLOW_PRINT. 1999-08-07 16:16:32 +00:00
Richard M. Stallman
9e062b6cc0 (read1): Added circular reading code to #N=.
(SUBSTITUTE): New macro.
(seen_list): New variable.
(substitute_object_in_subtree): New function.
(substitute_object_recurse): New function.
(substitute_in_interval): New function.
1999-08-03 17:27:46 +00:00
Karl Heuer
4116ab9feb (Vuser_init_file): New variable.
(syms_of_lread): Set up Lisp variable.
(Fload): Store the file name there, if var was t before.
1999-06-05 01:15:26 +00:00
Richard M. Stallman
57bda87a94 Use epaths.h istead of paths.h. 1999-02-26 11:41:17 +00:00
Kenichi Handa
fc351d2f65 (Fread_char): Change the meaning of the second argument.
(Fread_event): Likewise.
(Fread_char_exclusive): Likewise.
1998-12-22 06:06:48 +00:00
Karl Heuer
cac84ff0a2 (build_load_history): Do add to Vload_history
even when dumping Emacs.
1998-09-21 16:31:46 +00:00
Karl Heuer
5e24a1f76c (Fload): Handle case where openp finds a magic file
but it has no `load' handler or that handler calls `load'.
If FOUND != FILE, find FOUND's handler even if inhibited for FILE.
1998-09-06 13:57:32 +00:00
Paul Eggert
a897205290 (read1): Don't assume that atof ("-0.0") yields -0.0.
Handle leading '-' uniformly for zeros, infinities, and NaNs.
1998-08-31 21:18:28 +00:00
Richard M. Stallman
bb49a19224 (read_filtered_event): New arg INPUT_METHOD. Calls changed.
(Fread_event): New args PROMPT and SUPPRESS-INPUT-METHOD.
(Fread_char, Fread_char_exclusive): Likewise.
1998-08-18 09:00:14 +00:00
Richard M. Stallman
8db9dc66b1 (read1): In reading a string, treat Qlambda like Qget_file_char. 1998-08-02 02:43:47 +00:00
Richard M. Stallman
ad0153e46f (read_list): Pass new arg to get_doc_string. 1998-07-05 20:31:37 +00:00
Richard M. Stallman
6fe9cce5cf (read_list): Pass new arg to get_doc_string. 1998-06-24 18:26:36 +00:00
Richard M. Stallman
976350af4c (readevalloop): New arg READFUN. Callers changed.
(Feval_region): New arg READ_FUNCTION.
1998-06-10 04:13:57 +00:00
Richard M. Stallman
c15cfd1faa Remember the last TWO strings skipped with #@.
(prev_saved_doc_string*): New variables.
(Fload): Initalize prev_saved_doc_string.
(read1): Copy saved_doc_string to prev_saved_doc_string
before storing a new string in saved_doc_string.
(read_list): Look in prev_saved_doc_string as well as
in saved_doc_string.

(read1): Swap saved_doc_string_length and
prev_saved_doc_string_length.
(read_list): Negate docstring position if negative before checking
against saved_doc_string_length et al.

(read_vector): Add bytecodeflag parameter, which is
nonzero when reading a bytecode object.  If
`load-force-doc-strings' is t when reading a lazily-loaded
bytecode vector, the loaded docstring must be treated as unibyte
and passed to Fread to obtain the actual bytecode string and
constants vector.
(read1): Add extra parameter to read_vector calls.

(read1): Enable saving of doc strings on WINDOWSNT.
(read_list): Call get_doc_string instead of read_doc_string, when
forced to load doc strings.
1998-06-01 21:03:23 +00:00
Richard M. Stallman
00a9a93524 (readchar): Use readchar_backlog again
to read a character byte by byte, if its byte sequence
does not really match the character code.
(unreadchar): Handle readchar_backlog.
(readevalloop, Fread): Initialize readchar_backlog to -1.
1998-05-16 18:30:00 +00:00
Richard M. Stallman
a458d45d9e (Fintern): Properly compare lisp objects. 1998-05-07 20:48:17 +00:00
Eli Zaretskii
229ba775d4 (Fload): Rename dosmode to fmode and use it on all
platforms.  Avoid calling fdopen only for WINDOWSNT, use fdopen
for the the MSDOS version.
(read1): Avoid recording doc strings positions only for WINDOWSNT,
not for MSDOS.
1998-05-04 15:32:44 +00:00
Eli Zaretskii
67d3b149e2 (read1): Clear out extraneous bits at end of bool-vector. 1998-05-04 15:29:47 +00:00
Richard M. Stallman
d8578e586c (isfloat_string): Don't look at bytes before the string. 1998-05-03 00:50:06 +00:00
Andreas Schwab
c1a2f60a9c Fix -Wimplicit warnings. 1998-04-28 09:35:07 +00:00
Andreas Schwab
6c478f93f6 (readevalloop): Fix type of UNIBYTE parameter. 1998-04-28 09:23:01 +00:00
Richard M. Stallman
bdd47b1c07 (Fintern): Initialize keywords only in initial obarray. 1998-04-26 19:16:46 +00:00
Richard M. Stallman
8028e0edda (Fread_from_string): Initialize startval and endval. 1998-04-25 22:00:26 +00:00
Richard M. Stallman
6f46329ac1 (read1): Allow multibyte and unibyte together in one string. 1998-04-24 21:25:31 +00:00
Geoff Voelker
9b69357efc (dir_warning): Don't log a warning if Emacs hasn't
finished initializing.
1998-04-23 23:40:46 +00:00
Richard M. Stallman
bed23cb24b (read_from_string_index_byte): New variable.
(read_from_string_index): Now counts characters.
(readchar, unreadchar, Fread_from_string): Changed accordingly.

(readchar): Read a multibyte char all at once
from a buffer, marker or string.
(unreadchar): Unread a multibyte char all at once.
(read1): Properly handle non-escaped multibyte chars.
They force a string to be multibyte.
When reading direct from a file, any multibyte sequence means
a multibyte string.
Insist on MAX_LENGTH_OF_MULTI_BYTE_FORM bytes when checking
for read_buffer full; this way need not check specially for multibyte.
1998-04-23 21:22:51 +00:00
Richard M. Stallman
94e554db23 (readevalloop): New arg UNIBYTE. Callers changed.
Use it to bind load_convert_to_unibyte.
(Feval_buffer): New arg UNIBYTE.  Pass it to readevalloop.
(readevalloop_1): New unwind-protect subroutine.
(load_convert_to_unibyte): New variable.
(syms_of_lread): Set up Lisp var.
(read1): If load_convert_to_unibyte, convert strings to unibyte.
1998-04-20 07:09:58 +00:00
Richard M. Stallman
3c32996351 (read1): Compute NaN and infinities using 0.0 in a
variable, to cope with compilers that think they are smarter than us.
1998-04-17 23:36:34 +00:00
Richard M. Stallman
5ae0761326 (readchar): Find the previous byte's address properly
for the buffer case, as for the marker case.
1998-04-17 23:35:14 +00:00
Richard M. Stallman
8f6b041144 (init_lread): Init Vstandard_input. 1998-03-26 04:22:13 +00:00
Richard M. Stallman
491f16a288 (read1): Pass new arg to make_pure_string.
(make_symbol): Likewise.
(init_obarray): Likewise.
(read1): Use make_specified_string.
1998-03-21 17:52:08 +00:00
Richard M. Stallman
fc932ac6c7 Use STRING_BYTES and SET_STRING_BYTES. 1998-03-21 07:06:14 +00:00
Kenichi Handa
1d10ac5b4b (read1): Call multibyte_chars_in_text
instead of chars_in_text because we must ignore
enable-multibyte-characters here.
1998-03-19 07:34:29 +00:00
Richard M. Stallman
93d75e4c43 (read0): Swap args to Fmake_string. 1998-03-18 06:11:03 +00:00
Richard M. Stallman
eb659c4114 (read1): Handle infinities, NaN and -0.0 specially.
(isfloat_string): Accept e+INF and e+NAN as exponents.
1998-02-02 01:08:52 +00:00
Richard M. Stallman
ca69c42f3e (Funintern): Clear the symbol's obarray field. 1998-01-26 03:11:22 +00:00
Richard M. Stallman
31c8f88101 Update copyright year. 1998-01-21 22:22:17 +00:00
Richard M. Stallman
d7760ca97f (unreadchar): For unreading an ASCII char
thru a buffer or marker, really decrement point or the marker position.
1998-01-21 00:37:15 +00:00
Karl Heuer
e7fc914b02 (read1): Escape codes can force multibyte or single-byte.
Otherwise buffer_defaults->enable_multibyte_characters decides.
Only set force_singlebyte when a \-sequence is in the relevant
range.
(read_escape): New arg STRINGP.  `\ ' is ignored only when STRINGP
(normally, when reading a string).  Calls changed.
1998-01-18 04:49:11 +00:00
Richard M. Stallman
e28552a46a (read_escape): `\ ' stands for nothing at all.
(oblookup): Take args SIZE and SIZE_BYTE.  Callers changed.
(init_obarray, read1, make_symbol):
Pass new arg to make_pure_string.
(Fintern, oblookup, Fintern_soft, intern): Handle size_byte.
(dir_warning): Pass new arg to message_dolog.
(read1): PCH is now int *.
Declare ch as int.
(read0): Declare c as int.
(read_list): Declare ch as int.
(read0): Use Fmake_string not make_string.
(read1): When reading a string, maybe use make_unibyte_string.
(Fread_from_string): Convert string indices to/from bytes.
1998-01-09 22:52:08 +00:00
Richard M. Stallman
a3123c1330 (readchar): Use marker's bytepos instead of bufpos. 1998-01-02 21:27:40 +00:00
Richard M. Stallman
6f7f43d59d (readchar_backlog): New variable.
(readchar): When fetching from buffer or marker,
use readchar_backlog to fetch bytes from a character.
(unreadchar): Increment readchar_backlog.
(readevalloop, Fread): Init readchar_backlog.
1998-01-01 06:38:45 +00:00
Karl Heuer
83f0c0c72d (Feval_region): Doc correction (point does not move). 1997-12-04 04:49:06 +00:00
Andreas Schwab
d5b28a9d9b (read1): Declare `workbuf' as unsigned char.
(dir_warning): Define as returning nothing.
(init_lread): Likewise.
(mapatoms_1): Likewise.
(map_obarray): Fix type of parameter FN.
1997-11-21 12:54:36 +00:00
Simon Marshall
db5cae4b2d Indicate in messages if source code is being loaded. 1997-10-23 14:58:25 +00:00
Karl Heuer
d49f0c1af8 (read_list): Don't recognize Vload_file_name
specially if it is nil.
1997-10-15 22:45:35 +00:00
Karl Heuer
c23edb78db Make sure that make-docfile does not see the doc string
of the disabled function eval-current-buffer.
1997-10-02 03:10:35 +00:00
Richard M. Stallman
13febd855d (Feval_buffer): New arg FILENAME. 1997-09-07 18:32:49 +00:00
Richard M. Stallman
7b88a4cfec (Fload): Fix doc syntax. 1997-08-30 16:20:02 +00:00