[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/syntax.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/syntax.c |
Date: |
Sat, 17 May 2003 08:50:24 -0400 |
Index: emacs/src/syntax.c
diff -c emacs/src/syntax.c:1.165 emacs/src/syntax.c:1.166
*** emacs/src/syntax.c:1.165 Thu Apr 24 19:24:51 2003
--- emacs/src/syntax.c Sat May 17 08:50:24 2003
***************
*** 337,343 ****
It should be the last one before POS, or nearly the last.
When open_paren_in_column_0_is_defun_start is nonzero,
! the beginning of every line is treated as a defun-start.
We record the information about where the scan started
and what its result was, so that another call in the same area
--- 337,343 ----
It should be the last one before POS, or nearly the last.
When open_paren_in_column_0_is_defun_start is nonzero,
! only the beginning of the buffer is treated as a defun-start.
We record the information about where the scan started
and what its result was, so that another call in the same area
***************
*** 353,358 ****
--- 353,364 ----
{
int opoint = PT, opoint_byte = PT_BYTE;
+ if (!open_paren_in_column_0_is_defun_start)
+ {
+ find_start_value_byte = BEGV_BYTE;
+ return BEGV;
+ }
+
/* Use previous finding, if it's valid and applies to this inquiry. */
if (current_buffer == find_start_buffer
/* Reuse the defun-start even if POS is a little farther on.
***************
*** 372,395 ****
syntax-tables. */
gl_state.current_syntax_table = current_buffer->syntax_table;
gl_state.use_global = 0;
! if (open_paren_in_column_0_is_defun_start)
{
! while (PT > BEGV)
{
! /* Open-paren at start of line means we may have found our
! defun-start. */
if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)
! {
! SETUP_SYNTAX_TABLE (PT + 1, -1); /* Try again... */
! if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)
! break;
! /* Now fallback to the default value. */
! gl_state.current_syntax_table = current_buffer->syntax_table;
! gl_state.use_global = 0;
! }
! /* Move to beg of previous line. */
! scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -2, 1);
}
}
/* Record what we found, for the next try. */
--- 378,398 ----
syntax-tables. */
gl_state.current_syntax_table = current_buffer->syntax_table;
gl_state.use_global = 0;
! while (PT > BEGV)
{
! /* Open-paren at start of line means we may have found our
! defun-start. */
! if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)
{
! SETUP_SYNTAX_TABLE (PT + 1, -1); /* Try again... */
if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)
! break;
! /* Now fallback to the default value. */
! gl_state.current_syntax_table = current_buffer->syntax_table;
! gl_state.use_global = 0;
}
+ /* Move to beg of previous line. */
+ scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -2, 1);
}
/* Record what we found, for the next try. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/syntax.c,
Richard M. Stallman <=