1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 15:21:51 -08:00
Commit graph

140 commits

Author SHA1 Message Date
Stefan Monnier
42ebfa3190 (scan_lists): Check that the right quote char has the
right Sstring syntax when jumping over strings.
(init_syntax_once): Use Smax rather than 13.
2000-12-09 20:17:59 +00:00
Kenichi Handa
7ae339a717 *** empty log message *** 2000-10-24 00:09:09 +00:00
Stefan Monnier
d671382e93 (describe_syntax): Add code for comment and string fences. 2000-10-15 22:12:01 +00:00
Stefan Monnier
c65adb44b0 (Fstring_to_syntax): New function extracted from Fmodify_syntax_entry.
(Fmodify_syntax_entry): Use it and document the ! and | fences.
(skip_chars, Fforward_comment): Remove unused variables.
(syms_of_syntax): Add defsubr for string-to-syntax.
2000-10-15 21:42:41 +00:00
Eli Zaretskii
ef6d59c99e Fix wording in a comment. 2000-10-15 05:55:40 +00:00
Kenichi Handa
465cf84ccd (skip_chars): Change the way of handling a range from unibyte char to
multibyte char.
2000-10-12 02:54:26 +00:00
Stefan Monnier
3f679f55a2 (prev_char_comstart_first): Remove.
(back_comment): Check two-char comment markers more carefully
to better handle overlapping cases like *//* or /* */* */ ...
Match nestedness of ender/starter.
2000-10-02 22:15:27 +00:00
Stefan Monnier
abf8a9ffcc (forw_comment): Match nestedness of ender/starter.
(Fforward_comment): Treat an unmatched \n comment-ender as whitespace.
2000-10-02 21:59:00 +00:00
Kenichi Handa
9690d0263a (skip_chars): Handle negation correctly. 2000-09-28 01:42:31 +00:00
Stefan Monnier
f7c436c1c8 (back_comment): Detect cases where a comment-starter is
actually inside another comment as in:   /* a // b */ c // d \n.
Make it clear that `comstart_pos' is unused for nested comments.
2000-08-27 17:44:59 +00:00
Kenichi Handa
e39091b6dd * syntax.c (skip_chars): Fix previous change. Make the handling of
unibyte string consistent with that of regex search.
2000-08-07 05:57:08 +00:00
Kenichi Handa
82d497fc5c (skip_chars): Fix handling of multibyte<->unibyte conversion. 2000-08-05 01:45:10 +00:00
Gerd Moellmann
688351f25d (skip_chars): Fix typo in error message. 2000-08-04 15:07:44 +00:00
Gerd Moellmann
070fe99cf7 (Fforward_word): Add last arg nil in call of
Fconstrain_to_field.
2000-07-25 09:20:27 +00:00
Dave Love
89a1d3feb1 (back_comment): Add null default in switch for pcc. 2000-07-14 17:49:13 +00:00
Stefan Monnier
02010917df (back_comment): Use one switch rather than a few `if's.
Obey open_paren_in_column_0_is_defun_start.
When reverting to the `slow' method, try to nicely handle the case
of nested comments by checking that the comment-starter we found
does indeed match the comment-ender.
(scan_sexps_forward, scan_sexps_forward):
Ignore excessive opening parenthesis rather than throwing an error.
2000-07-12 01:08:46 +00:00
Stefan Monnier
3ee5041cf5 (back_comment): Simplify string-parity counting (with
the added benefit of handling multiple string-styles as long as
they are not nested).
Jump to the slow code as soon as a comment starter is found in
a "string_lossage" position.  Fixes the case:  " /* " /* " */.
2000-06-21 14:57:11 +00:00
Stefan Monnier
d355bd8ae6 (scan_sexps_forward):
Check the comstyle of single-char comment-starters.
Clarify control-flow around the Scomment case.
2000-06-20 22:49:34 +00:00
Stefan Monnier
e6365855eb (describe_syntax): Recognize the `n'estable bit.
(Fforward_comment, scan_lists):
Check the comstyle of single-char comment-starters.
(scan_sexps_forward): Don't try to recognize `half comment-enders' if
we're just at the beginning of the comment (f.ex with (*) ... (*)).
2000-06-20 22:34:00 +00:00
Dave Love
943e731c81 (Fparse_partial_sexp): Doc fix. 2000-06-19 22:22:47 +00:00
Gerd Moellmann
4467eb94e5 (find_defun_start): Move test for
open_paren_in_column_0_is_defun_start outside of the loop.
2000-05-29 16:16:45 +00:00
Kenichi Handa
d1e4948d22 (skip_chars): Use FETCH_STRING_CHAR_ADVANCE unconditionally. 2000-05-23 02:25:45 +00:00
Gerd Moellmann
f6cd05276d Use new macro names
for handling per-buffer variables.
2000-03-27 12:50:13 +00:00
Gerd Moellmann
4e4dfa7817 (Fset_syntax_table): Use new macros for per-buffer
variables.
2000-03-26 14:06:41 +00:00
Gerd Moellmann
f4ed767fb5 (open_paren_in_column_0_is_defun_start): New variable.
(find_defun_start): Consider an open parenthesis in column 0
a defun start only if open_paren_in_column_0_is_defun_start is set.
(syms_of_syntax): New variable open-paren-in-column-0-is-defun-start.
2000-03-24 20:49:56 +00:00
Ken Raeburn
439d5cb4f7 Changes towards better type safety regarding intervals, primarily
regarding the "parent" handle.  These just separate out the different
usages based on the type of parent (interval vs lisp object); later
changes will do type checking and enforcement.

	* intervals.h (NULL_INTERVAL): Cast to INTERVAL type.
	(INT_LISPLIKE): New macro.
	(NULL_INTERVAL_P): Use it.
	(INTERVAL_HAS_PARENT, INTERVAL_HAS_OBJECT, SET_INTERVAL_PARENT,
	SET_INTERVAL_OBJECT, INTERVAL_PARENT, COPY_INTERVAL_PARENT,
	GET_INTERVAL_OBJECT, INTERVAL_PARENT_OR_NULL): New macros.

	* alloc.c (make_interval, gc_sweep): Use new macros; eliminate all
	explicit references to "parent" field of struct interval and
	associated unclean type conversions.
	* intervals.c (create_root_interval, root_interval, rotate_right,
	rotate_left, balance_possible_root_interval, split_interval_right,
	split_interval_left, interval_start_pos, find_interval,
	next_interval, previous_interval, update_interval,
	adjust_intervals_for_insertion, delete_node, delete_interval,
	adjust_intervals_for_deletion, merge_interval_right,
	merge_interval_left, reproduce_tree, graft_intervals_into_buffer,
	copy_intervals_to_string): Likewise.
	* intervals.h (AM_LEFT_CHILD, AM_RIGHT_CHILD, RESET_INTERVAL):
	Likewise.
	* syntax.c (update_syntax_table): Likewise.

	* intervals.c (reproduce_tree_obj): New function, like
	reproduce_tree but takes a Lisp_Object for the parent.  Declare
	with prototype.
	(graft_intervals_into_buffer): Use it when appropriate.
	(reproduce_tree): Declare with prototype.
	(balance_possible_root_interval): Check that the parent is a lisp
	object before trying to examine its type.
2000-03-22 21:44:05 +00:00
Kenichi Handa
bd25db0802 (multibyte_syntax_as_symbol): New variable.
(syms_of_syntax): Declare it as a Lisp variable.
(SYNTAX_WITH_MULTIBYTE_CHECK): New macro.
(scan_lists): If both sexpflag and multibyte_syntax_as_symbol are
nonzero, treat all multibyte characters as symbol.
(init_syntax_once): Give syntax `word' to all mutlbiyte
characters.
2000-02-23 00:10:34 +00:00
Stefan Monnier
2b927d02c8 (Fforward_comment): Undo the previous change, since cc-mode
depends on the previous behavior.
2000-02-17 05:57:38 +00:00
Stefan Monnier
1aa963c813 (back_comment): Make sure we only consider comment-starters
of the relevant style and return -1 in case of a failure to find the
beginning of the comment.
(Fforward_comment): If back_comment fails, go back to the position just
after the comment-end.
(scan_lists): Add comment describing a very minor bug.
2000-02-15 06:21:26 +00:00
Gerd Moellmann
64aa4eb1f3 (Fforward_word): Undo previous change. 2000-01-01 17:23:34 +00:00
Gerd Moellmann
e6d8341fe6 (Fforward_word): Notice field boundaries only if
inhibit-field-text-motion is nil.
2000-01-01 17:06:50 +00:00
Paul Eggert
ca9c056758 * callproc.c (strerror): Remove decl.
* fileio.c (strerror): Likewise.
* process.c (strerror): Likewise.
* emacs.c (strerror): Likewise.
(Vsystem_messages_locale): Renamed from Vmessages_locale.
All uses changed.
(Vprevious_system_messages_locale): Likewise, from
Vprevious_messages_locale.
(Vsystem_time_locale): Likewise, from Vtime_locale.
(Vprevious_system_time_locale): Likewise, from Vprevious_time_locale.
(ABORT_RETURN_TYPE): New macro.
(abort): Return type is now ABORT_RETURN_TYPE.
(main): Always invoke init_signals, even if POSIX_SIGNALS is not
defined.
(syms_of_emacs): messages-locale -> system-messages-locale,
previous-messages-locale -> previous-system-messages-locale,
time-locale -> system-time-locale,
previous-time-locale -> previous-system-time-locale.

* gmalloc.c (PP, __ptr_t): Assume ANSI C if STDC_HEADERS is defined.
(const): Do not define; that's config.h's job.
(<limits.h>): Include if HAVE_LIMITS_H is defined.
(CHAR_BIT): Move test for definedness outside of limits.h condition.
(<stddef.h>): Include if STDC_HEADERS is defined.
(FREE_RETURN_TYPE): New macro.
(free): Return type is now FREE_RETURN_TYPE.

* lisp.h (synchronize_system_time_locale): Renamed from
synchronize_time_locale.  All uses changed.
(synchronize_system_messages_locale): Likewise, from
synchronize_messages_locale.

* process.c (sys_siglist): Remove.

* syntax.c (scan_sexps_forward): Use abort, not assert.

* sysdep.c (my_sys_siglist): New var.
(sys_siglist): New macro.  Remove old initialized vars of same name.
(init_signals): Initialize sys_siglist.

* xfns.c (abort): Remove decl; stdlib.h now does this.
1999-11-22 08:19:51 +00:00
Richard M. Stallman
2c6ea900ee (Fforward_word): Handle fields even if would have hit
an edge of the buffer.  Return nil if affected by fields.
1999-11-09 19:00:59 +00:00
Gerd Moellmann
e76f1c446d Remove whitespace after open or in front of closing parentheses. 1999-11-01 13:56:47 +00:00
Gerd Moellmann
b8855607a0 (Fforward_word): Supply new ESCAPE_FROM_EDGE parameter
to Fconstrain_to_field.
(Fforward_word): Likewise.
Constrain to any field.
1999-10-17 12:56:25 +00:00
Gerd Moellmann
4ffe723bfe (update_syntax_table, find_defun_start, back_comment,
describe_syntax, skip_chars): Remove unused variables.
(back_comment, forw_comment): Add braces to if-statement with
if-else as dependent statement.
1999-09-20 00:34:44 +00:00
Ken Raeburn
c1d497be70 Use XCAR and XCDR instead of explicit member access. 1999-09-13 03:35:33 +00:00
Gerd Moellmann
abf4a9f7e0 (Fforward_word): Use prompt_end_charpos instead
of minibuffer_prompt_length.
1999-09-12 20:21:56 +00:00
Gerd Moellmann
ce1dc5105e (Fforward_word): Stop at a mini-buffer prompt end
in both directions.  Extend documentation.
1999-09-02 20:35:55 +00:00
Richard M. Stallman
95ff8dfc3c (lisp_parse_state, back_comment, Fmodify_syntax_entry)
(Fforward_comment, scan_lists, scan_sexps_forward)
(Fparse_partial_sexp): Add support for nested comments.
(forw_comment): New subroutine used in them.
1999-08-29 21:32:52 +00:00
Gerd Moellmann
5878ee6fc4 (Fforward_word): If in a mini-buffer and moving
backwards, stop in front of the prompt to prevent accidentially
moving into the read-only prompt.
1999-08-25 21:12:36 +00:00
Karl Heuer
da71ab916b (Fforward_comment): Set comstyle for Scomment_fence. 1999-08-16 20:34:56 +00:00
Dave Love
0beaf54f1d (Fparse_partial_sexp): Correct test for element 8 to be
non-nil.
1999-05-14 09:51:02 +00:00
Karl Heuer
ccf89641df (scan_sexps_forward): Delete duplicate code
to set prev_from_syntax, above start of main loop.
At startinstring, check syntax when checking for a match.
1999-01-22 21:57:43 +00:00
Richard M. Stallman
f3be100fc2 (syms_of_syntax): Fix the setup of Qscan_error. 1998-10-20 20:56:18 +00:00
Richard M. Stallman
c3907a7e36 (scan_lists): Bring FROM back into range BEGV...ZV. 1998-10-08 10:47:51 +00:00
Richard M. Stallman
326b283b18 (scan_sexps_forward): Set up the syntax table scanning
stuff before jumping into the loop.
1998-08-10 21:19:03 +00:00
Kenichi Handa
7c19e8e146 (Fmodify_syntax_entry): Use macro STRING_BYTES to get
byte size of a string.
1998-06-23 00:29:51 +00:00
Richard M. Stallman
1674d9a28b (skip_chars): Don't examine STRING before verifying that it is a string.
(scan_lists): Use prev_char_comend_first, not ...comstart...
1998-06-14 19:04:01 +00:00
Richard M. Stallman
89c6809aa9 (Fforward_comment): Properly compute BYTEPOS arg to char_quoted. 1998-06-11 02:33:06 +00:00