Stefan Monnier
9660f5fc84
* src/lread.c (init_obarray): Declare Qt and Qnil as special.
2012-05-15 16:20:18 -04:00
Glenn Morris
35dc09a19c
Merge from emacs-24, up to 2012-04-10T02:06:19Z!larsi@gnus.org
2012-04-13 18:46:06 -07:00
Atsuo Ohki
ad3a2b411d
* lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n".
...
Fixes: debbugs:11238
2012-04-13 14:08:18 -04:00
Chong Yidong
fb7ada5f94
Remove * characters from the front of variable docstrings.
2012-04-09 21:05:48 +08:00
Glenn Morris
48da739227
Doc fix for lexical-binding being in line one.
...
Ref http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00543.html
* doc/lispref/variables.texi (Using Lexical Binding):
Mention that lexical-binding should be set in the first line.
* src/lread.c (syms_of_lread): Doc fix.
* lisp/emacs-lisp/tabulated-list.el, lisp/progmodes/f90.el:
Move lexical-binding file-local to line one.
* etc/NEWS: lexical-binding should be ine the first line.
2012-01-25 22:30:49 -08:00
Glenn Morris
ce316182ba
init_lread fix for bug#10208.
...
* src/lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
from load-path also when installation-directory is nil.
2012-01-10 19:56:25 -05:00
Glenn Morris
9d8d07e527
Comments on init_lread.
2012-01-10 17:41:09 -05:00
Glenn Morris
acaf905b11
Add 2012 to FSF copyright years for Emacs files
2012-01-05 01:46:05 -08:00
Juanma Barranquero
b81d40f0fe
Fix typos.
2012-01-03 03:14:40 +01:00
Paul Eggert
333f9019e2
Spelling fixes.
2011-12-11 21:32:49 -08:00
Glenn Morris
7efa6272f0
Small init_lread fix for bug#10208
...
* src/lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
installation and source directories as well.
2011-12-06 21:16:53 -05:00
Paul Eggert
e47695319f
Spelling fixes.
2011-11-26 20:43:11 -08:00
Paul Eggert
5396468298
Spelling fixes.
2011-11-19 01:18:31 -08:00
Paul Eggert
0324f3af3d
* lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
...
Some packages use them to denote characters with modifiers.
2011-10-11 21:58:43 -07:00
Juanma Barranquero
a239d4e9c0
Fix typos.
2011-09-28 02:59:28 +02:00
Andreas Schwab
ed497dd4ec
* lread.c (readevalloop): Use correct code for NBSP.
...
(read1): Likewise. (Bug#9608)
2011-09-27 10:37:07 +02:00
Lars Magne Ingebrigtsen
a4824228fa
* lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is.
...
Fixes: debbugs:9493
2011-09-19 10:25:35 +02:00
Juanma Barranquero
5e617bc2b6
Whitespace changes.
2011-09-09 03:06:52 +02:00
Paul Eggert
0df02bf3e9
* lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
...
Use esprintf, not sprintf, in case result does not fit in int.
2011-08-29 11:55:58 -07:00
Paul Eggert
2fab839507
Merge from trunk.
2011-08-18 01:41:19 -07:00
Eli Zaretskii
35774242f9
Fix bug #9311 with loading on MS-Windows .elc files in root directories.
...
src/lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
has no `load' handler, try opening the file locally.
2011-08-17 11:50:08 +03:00
Paul Eggert
18ab493650
Merge from trunk.
2011-07-28 22:31:12 -07:00
Paul Eggert
37d0112bcf
* lread.c (read1, init_obarray): Don't update size until alloc done.
2011-07-28 17:59:16 -07:00
Andreas Schwab
9a79b20c28
Implement ## reader macro
...
* src/lread.c (read1): Read ## as empty symbol.
* src/print.c (print_object): Print empty symbol as ##.
2011-07-28 22:23:19 +02:00
Paul Eggert
0d8de0fd0a
Merge from trunk.
2011-07-19 13:33:28 -07:00
Lars Magne Ingebrigtsen
f41628b253
* lread.c (syms_of_lread): Clarify when `lexical-binding' is used
2011-07-19 17:16:58 +02:00
Andreas Schwab
46cfea45c4
Fix last change
2011-07-17 12:35:42 +02:00
Andreas Schwab
0a6a104b85
Make read-symbol-positions-list more accurate
...
* src/lread.c (read_integer): Unread even EOF character.
(read1): Likewise. Properly record start position of symbol.
2011-07-17 12:29:24 +02:00
Andreas Schwab
52968808d6
* src/lread.c (read1): Read `#:' as empty uninterned symbol if no
...
symbol character follows.
2011-07-17 10:00:53 +02:00
Paul Eggert
4f8a454745
Merge from trunk.
2011-07-16 17:37:57 -07:00
Lars Magne Ingebrigtsen
1d698799d3
`lexical-binding' doc clarification
...
* lread.c (syms_of_lread): Clarify that is isn't only
`eval-buffer' and `eval-defun' that's affected by
`lexical-binding'.
Fixes: debbugs:8460
2011-07-15 14:57:20 +02:00
Paul Eggert
da85a02af7
Merge from trunk.
2011-07-10 23:05:57 -07:00
Andreas Schwab
1dae0f0aad
Protoize
...
* src/buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
(mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Protoize.
* src/data.c (fmod): Likewise.
* src/dispnew.c (swap_glyphs_in_rows): Likewise.
* src/emacs.c (memory_warning_signal): Likewise.
* src/floatfns.c (float_error): Likewise.
* src/font.c (check_gstring, check_otf_features, otf_tag_symbol)
(otf_open, font_otf_capability, generate_otf_features)
(font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
Likewise.
* src/image.c (pbm_read_file): Likewise.
* src/indent.c (string_display_width): Likewise.
* src/intervals.c (check_for_interval, search_for_interval)
(inc_interval_count, count_intervals, root_interval)
(adjust_intervals_for_insertion, make_new_interval): Likewise.
* src/lread.c (defalias): Likewise.
* src/regex.c (set_image_of_range_1, set_image_of_range)
(regex_grow_registers): Likewise.
* src/sysdep.c (strerror): Likewise.
* src/termcap.c (valid_filename_p, tprint, main): Likewise.
* src/tparam.c (main): Likewise.
* src/unexhp9k800.c (run_time_remap, save_data_space)
(update_file_ptrs, read_header, write_header, calculate_checksum)
(copy_file, copy_rest, display_header): Likewise.
* src/widget.c (mark_shell_size_user_specified, create_frame_gcs):
Likewise.
* src/xdisp.c (check_it): Likewise.
* src/xfaces.c (register_color, unregister_color, unregister_colors):
Likewise.
* src/xfns.c (print_fontset_result): Likewise.
* src/xrdb.c (member, fatal, main): Likewise.
2011-07-10 10:20:10 +02:00
Paul Eggert
3cc5a5328c
Improve hashing quality when configured --with-wide-int.
...
* fns.c (hash_string): New function, taken from sxhash_string.
Do not discard information about ASCII character case; this
discarding is no longer needed.
(sxhash-string): Use it. Change sig to match it. Caller changed.
* lisp.h: Declare it.
* lread.c (hash_string): Remove, since we now use fns.c's version.
The fns.c version returns a wider integer if --with-wide-int is
specified, so this should help the quality of the hashing a bit.
2011-07-07 17:51:25 -07:00
Lars Magne Ingebrigtsen
69bb1ef7df
* lread.c (syms_of_lread): Mention single symbols defined by
...
`defvar' or `defconst' (bug#7154).
2011-07-02 18:18:24 +02:00
Juanma Barranquero
cd3520a41d
Move DEFSYM to lisp.h and use everywhere.
2011-06-24 23:25:22 +02:00
Paul Eggert
20270765be
* lread.c (read1): Check for size overflow.
2011-06-22 22:41:40 -07:00
Paul Eggert
82cb60d3ff
* lread.c (read_escape): Avoid int overflow.
...
(Fload, openp, read_buffer_size, read1)
(substitute_object_recurse, read_vector, read_list, map_obarray):
Use ptrdiff_t, not int, for sizes.
(read1): Use EMACS_INT, not int, for sizes.
2011-06-22 22:34:52 -07:00
Paul Eggert
8b9ac8b4a2
* lread.c: Integer overflow fixes.
...
(read_integer): Radix is now EMACS_INT, not int,
to improve quality of diagnostics for out-of-range radices.
Calculate buffer size correctly for out-of-range radices.
(read1): Check for integer overflow in radices, and in
read-circle numbers.
2011-06-22 17:55:55 -07:00
Paul Eggert
39019e5425
* lread.c (read_escape): Check for hex character overflow.
2011-06-22 15:39:06 -07:00
Paul Eggert
bfbbd7e752
* lread.c: Integer overflow issues.
...
(saved_doc_string_size, saved_doc_string_length)
(prev_saved_doc_string_size, prev_saved_doc_string_length):
Now ptrdiff_t, not int.
(read1): Don't assume doc string length fits in int. Check for
out-of-range doc string lengths.
(read_list): Don't assume file position fits in int.
2011-06-22 15:36:19 -07:00
Paul Eggert
6e5bb2dc82
* lread.c (intern, intern_c_string): Don't assume strlen fits in int.
2011-06-19 23:11:36 -07:00
Paul Eggert
f14ed477b8
* lread.c (string_to_number): Simplify the 2011-04-26 change by invoking xsignal1.
2011-06-18 18:35:03 -07:00
Paul Eggert
e4d29b3382
* lread.c (invalid_syntax): Omit length argument.
...
All uses changed. This doesn't fix a bug, but it simplifies the
code away from its former Hollerith-constant appearance, and it's
one less 'int' to worry about when looking at integer-overflow issues.
2011-06-18 18:31:41 -07:00
Paul Eggert
e5533da60e
* lread.c (Fload): Don't compare a possibly-garbage time_t value.
2011-06-12 22:18:27 -07:00
Paul Eggert
d37ca62316
Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
...
These casts should not be needed on 32-bit hosts, either.
* keyboard.c (read_char):
* lread.c (Fload): Remove casts to unsigned.
2011-06-12 16:28:37 -07:00
Eli Zaretskii
c51453d997
Fix the MS-Windows build broken by 2011-05-06T07:13:19Z!eggert@cs.ucla.edu.
...
src/lread.c: Include limits.h.
2011-05-06 14:26:45 +03:00
Paul Eggert
8ff0ac3c78
Merge from mainline.
2011-05-05 23:30:56 -07:00
Andreas Schwab
db7a0b4f1d
* src/lread.c (lisp_file_lexically_bound_p): Stop scanning at end
...
marker. (Bug#8610)
2011-05-05 18:56:39 +02:00
Paul Eggert
a108c10b7a
* lread.c (read_integer): Be more consistent with string-to-number.
...
Use string_to_number to do the actual conversion; this avoids
rounding errors and fixes some other screwups. Without this fix,
for example, #x1fffffffffffffff was misread as -2305843009213693952.
(digit_to_number): Move earlier, for benefit of read_integer.
Return -1 if the digit is out of range for the base, -2 if it is
not a digit in any supported base.
2011-05-01 19:58:08 -07:00