diff options
| author | Juanma Barranquero | 2011-03-28 05:29:18 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2011-03-28 05:29:18 +0200 |
| commit | 1db5b1ad87a145871fc1120ec949fee9211de9cb (patch) | |
| tree | 99d3587a065bd15d736da1db76a3313adb5dbfc5 /src | |
| parent | 39f3187393af8fbf597591e284490db94a335f94 (diff) | |
| download | emacs-1db5b1ad87a145871fc1120ec949fee9211de9cb.tar.gz emacs-1db5b1ad87a145871fc1120ec949fee9211de9cb.zip | |
src/*.c: Remove unused parameters and other warnings.
* dispextern.h (string_buffer_position): Remove declaration.
* print.c (strout): Remove parameter `multibyte', unused since
1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
* search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
All callers changed.
* w32.c (_wsa_errlist): Use braces for struct initializers.
* xdisp.c (string_buffer_position_lim): Remove parameter `w',
never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
All callers changed.
(string_buffer_position): Likewise. Also, make static (it's never
used outside xdisp.c).
(cursor_row_p): Remove parameter `w', unused since
2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
(decode_mode_spec): Remove parameter `precision', introduced during
Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
All callers changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 24 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/print.c | 131 | ||||
| -rw-r--r-- | src/search.c | 28 | ||||
| -rw-r--r-- | src/w32.c | 130 | ||||
| -rw-r--r-- | src/xdisp.c | 72 |
6 files changed, 199 insertions, 188 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0ed011884ca..75b75ab522c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2011-03-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * dispextern.h (string_buffer_position): Remove declaration. | ||
| 4 | |||
| 5 | * print.c (strout): Remove parameter `multibyte', unused since | ||
| 6 | 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed. | ||
| 7 | |||
| 8 | * search.c (boyer_moore): Remove parameters `len', `pos' and `lim', | ||
| 9 | never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org. | ||
| 10 | All callers changed. | ||
| 11 | |||
| 12 | * w32.c (_wsa_errlist): Use braces for struct initializers. | ||
| 13 | |||
| 14 | * xdisp.c (string_buffer_position_lim): Remove parameter `w', | ||
| 15 | never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org. | ||
| 16 | All callers changed. | ||
| 17 | (string_buffer_position): Likewise. Also, make static (it's never | ||
| 18 | used outside xdisp.c). | ||
| 19 | (cursor_row_p): Remove parameter `w', unused since | ||
| 20 | 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed. | ||
| 21 | (decode_mode_spec): Remove parameter `precision', introduced during | ||
| 22 | Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used. | ||
| 23 | All callers changed. | ||
| 24 | |||
| 1 | 2011-03-27 Jan Djärv <jan.h.d@swipnet.se> | 25 | 2011-03-27 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 26 | ||
| 3 | * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. | 27 | * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. |
diff --git a/src/dispextern.h b/src/dispextern.h index d1e0475dd15..17a9bc39fb2 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2953,8 +2953,6 @@ extern int bidi_mirror_char (int); | |||
| 2953 | struct glyph_row *row_containing_pos (struct window *, EMACS_INT, | 2953 | struct glyph_row *row_containing_pos (struct window *, EMACS_INT, |
| 2954 | struct glyph_row *, | 2954 | struct glyph_row *, |
| 2955 | struct glyph_row *, int); | 2955 | struct glyph_row *, int); |
| 2956 | EMACS_INT string_buffer_position (struct window *, Lisp_Object, | ||
| 2957 | EMACS_INT); | ||
| 2958 | int line_bottom_y (struct it *); | 2956 | int line_bottom_y (struct it *); |
| 2959 | int display_prop_intangible_p (Lisp_Object); | 2957 | int display_prop_intangible_p (Lisp_Object); |
| 2960 | void resize_echo_area_exactly (void); | 2958 | void resize_echo_area_exactly (void); |
diff --git a/src/print.c b/src/print.c index 5b2778cf251..e44d4d14f36 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -273,7 +273,7 @@ printchar (unsigned int ch, Lisp_Object fun) | |||
| 273 | 273 | ||
| 274 | static void | 274 | static void |
| 275 | strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, | 275 | strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, |
| 276 | Lisp_Object printcharfun, int multibyte) | 276 | Lisp_Object printcharfun) |
| 277 | { | 277 | { |
| 278 | if (size < 0) | 278 | if (size < 0) |
| 279 | size_byte = size = strlen (ptr); | 279 | size_byte = size = strlen (ptr); |
| @@ -406,16 +406,13 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) | |||
| 406 | SAFE_ALLOCA (buffer, char *, nbytes); | 406 | SAFE_ALLOCA (buffer, char *, nbytes); |
| 407 | memcpy (buffer, SDATA (string), nbytes); | 407 | memcpy (buffer, SDATA (string), nbytes); |
| 408 | 408 | ||
| 409 | strout (buffer, chars, SBYTES (string), | 409 | strout (buffer, chars, SBYTES (string), printcharfun); |
| 410 | printcharfun, STRING_MULTIBYTE (string)); | ||
| 411 | 410 | ||
| 412 | SAFE_FREE (); | 411 | SAFE_FREE (); |
| 413 | } | 412 | } |
| 414 | else | 413 | else |
| 415 | /* No need to copy, since output to print_buffer can't GC. */ | 414 | /* No need to copy, since output to print_buffer can't GC. */ |
| 416 | strout (SSDATA (string), | 415 | strout (SSDATA (string), chars, SBYTES (string), printcharfun); |
| 417 | chars, SBYTES (string), | ||
| 418 | printcharfun, STRING_MULTIBYTE (string)); | ||
| 419 | } | 416 | } |
| 420 | else | 417 | else |
| 421 | { | 418 | { |
| @@ -472,7 +469,7 @@ write_string (const char *data, int size) | |||
| 472 | printcharfun = Vstandard_output; | 469 | printcharfun = Vstandard_output; |
| 473 | 470 | ||
| 474 | PRINTPREPARE; | 471 | PRINTPREPARE; |
| 475 | strout (data, size, size, printcharfun, 0); | 472 | strout (data, size, size, printcharfun); |
| 476 | PRINTFINISH; | 473 | PRINTFINISH; |
| 477 | } | 474 | } |
| 478 | 475 | ||
| @@ -486,7 +483,7 @@ write_string_1 (const char *data, int size, Lisp_Object printcharfun) | |||
| 486 | PRINTDECLARE; | 483 | PRINTDECLARE; |
| 487 | 484 | ||
| 488 | PRINTPREPARE; | 485 | PRINTPREPARE; |
| 489 | strout (data, size, size, printcharfun, 0); | 486 | strout (data, size, size, printcharfun); |
| 490 | PRINTFINISH; | 487 | PRINTFINISH; |
| 491 | } | 488 | } |
| 492 | 489 | ||
| @@ -1404,7 +1401,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1404 | if (EQ (obj, being_printed[i])) | 1401 | if (EQ (obj, being_printed[i])) |
| 1405 | { | 1402 | { |
| 1406 | sprintf (buf, "#%d", i); | 1403 | sprintf (buf, "#%d", i); |
| 1407 | strout (buf, -1, -1, printcharfun, 0); | 1404 | strout (buf, -1, -1, printcharfun); |
| 1408 | return; | 1405 | return; |
| 1409 | } | 1406 | } |
| 1410 | being_printed[print_depth] = obj; | 1407 | being_printed[print_depth] = obj; |
| @@ -1420,7 +1417,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1420 | { /* Add a prefix #n= if OBJ has not yet been printed; | 1417 | { /* Add a prefix #n= if OBJ has not yet been printed; |
| 1421 | that is, its status field is nil. */ | 1418 | that is, its status field is nil. */ |
| 1422 | sprintf (buf, "#%d=", -n); | 1419 | sprintf (buf, "#%d=", -n); |
| 1423 | strout (buf, -1, -1, printcharfun, 0); | 1420 | strout (buf, -1, -1, printcharfun); |
| 1424 | /* OBJ is going to be printed. Remember that fact. */ | 1421 | /* OBJ is going to be printed. Remember that fact. */ |
| 1425 | Fputhash (obj, make_number (- n), Vprint_number_table); | 1422 | Fputhash (obj, make_number (- n), Vprint_number_table); |
| 1426 | } | 1423 | } |
| @@ -1428,7 +1425,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1428 | { | 1425 | { |
| 1429 | /* Just print #n# if OBJ has already been printed. */ | 1426 | /* Just print #n# if OBJ has already been printed. */ |
| 1430 | sprintf (buf, "#%d#", n); | 1427 | sprintf (buf, "#%d#", n); |
| 1431 | strout (buf, -1, -1, printcharfun, 0); | 1428 | strout (buf, -1, -1, printcharfun); |
| 1432 | return; | 1429 | return; |
| 1433 | } | 1430 | } |
| 1434 | } | 1431 | } |
| @@ -1446,7 +1443,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1446 | sprintf (buf, "%ld", (long) XINT (obj)); | 1443 | sprintf (buf, "%ld", (long) XINT (obj)); |
| 1447 | else | 1444 | else |
| 1448 | abort (); | 1445 | abort (); |
| 1449 | strout (buf, -1, -1, printcharfun, 0); | 1446 | strout (buf, -1, -1, printcharfun); |
| 1450 | break; | 1447 | break; |
| 1451 | 1448 | ||
| 1452 | case Lisp_Float: | 1449 | case Lisp_Float: |
| @@ -1454,7 +1451,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1454 | char pigbuf[FLOAT_TO_STRING_BUFSIZE]; | 1451 | char pigbuf[FLOAT_TO_STRING_BUFSIZE]; |
| 1455 | 1452 | ||
| 1456 | float_to_string (pigbuf, XFLOAT_DATA (obj)); | 1453 | float_to_string (pigbuf, XFLOAT_DATA (obj)); |
| 1457 | strout (pigbuf, -1, -1, printcharfun, 0); | 1454 | strout (pigbuf, -1, -1, printcharfun); |
| 1458 | } | 1455 | } |
| 1459 | break; | 1456 | break; |
| 1460 | 1457 | ||
| @@ -1532,7 +1529,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1532 | sprintf (outbuf, "\\x%04x", c); | 1529 | sprintf (outbuf, "\\x%04x", c); |
| 1533 | need_nonhex = 1; | 1530 | need_nonhex = 1; |
| 1534 | } | 1531 | } |
| 1535 | strout (outbuf, -1, -1, printcharfun, 0); | 1532 | strout (outbuf, -1, -1, printcharfun); |
| 1536 | } | 1533 | } |
| 1537 | else if (! multibyte | 1534 | else if (! multibyte |
| 1538 | && SINGLE_BYTE_CHAR_P (c) && ! ASCII_BYTE_P (c) | 1535 | && SINGLE_BYTE_CHAR_P (c) && ! ASCII_BYTE_P (c) |
| @@ -1544,7 +1541,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1544 | using octal escapes. */ | 1541 | using octal escapes. */ |
| 1545 | char outbuf[5]; | 1542 | char outbuf[5]; |
| 1546 | sprintf (outbuf, "\\%03o", c); | 1543 | sprintf (outbuf, "\\%03o", c); |
| 1547 | strout (outbuf, -1, -1, printcharfun, 0); | 1544 | strout (outbuf, -1, -1, printcharfun); |
| 1548 | } | 1545 | } |
| 1549 | else | 1546 | else |
| 1550 | { | 1547 | { |
| @@ -1557,7 +1554,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1557 | if ((c >= 'a' && c <= 'f') | 1554 | if ((c >= 'a' && c <= 'f') |
| 1558 | || (c >= 'A' && c <= 'F') | 1555 | || (c >= 'A' && c <= 'F') |
| 1559 | || (c >= '0' && c <= '9')) | 1556 | || (c >= '0' && c <= '9')) |
| 1560 | strout ("\\ ", -1, -1, printcharfun, 0); | 1557 | strout ("\\ ", -1, -1, printcharfun); |
| 1561 | } | 1558 | } |
| 1562 | 1559 | ||
| 1563 | if (c == '\"' || c == '\\') | 1560 | if (c == '\"' || c == '\\') |
| @@ -1645,7 +1642,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1645 | /* If deeper than spec'd depth, print placeholder. */ | 1642 | /* If deeper than spec'd depth, print placeholder. */ |
| 1646 | if (INTEGERP (Vprint_level) | 1643 | if (INTEGERP (Vprint_level) |
| 1647 | && print_depth > XINT (Vprint_level)) | 1644 | && print_depth > XINT (Vprint_level)) |
| 1648 | strout ("...", -1, -1, printcharfun, 0); | 1645 | strout ("...", -1, -1, printcharfun); |
| 1649 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | 1646 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) |
| 1650 | && (EQ (XCAR (obj), Qquote))) | 1647 | && (EQ (XCAR (obj), Qquote))) |
| 1651 | { | 1648 | { |
| @@ -1705,7 +1702,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1705 | if (i != 0 && EQ (obj, halftail)) | 1702 | if (i != 0 && EQ (obj, halftail)) |
| 1706 | { | 1703 | { |
| 1707 | sprintf (buf, " . #%d", i / 2); | 1704 | sprintf (buf, " . #%d", i / 2); |
| 1708 | strout (buf, -1, -1, printcharfun, 0); | 1705 | strout (buf, -1, -1, printcharfun); |
| 1709 | goto end_of_list; | 1706 | goto end_of_list; |
| 1710 | } | 1707 | } |
| 1711 | } | 1708 | } |
| @@ -1717,7 +1714,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1717 | Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); | 1714 | Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); |
| 1718 | if (INTEGERP (num)) | 1715 | if (INTEGERP (num)) |
| 1719 | { | 1716 | { |
| 1720 | strout (" . ", 3, 3, printcharfun, 0); | 1717 | strout (" . ", 3, 3, printcharfun); |
| 1721 | print_object (obj, printcharfun, escapeflag); | 1718 | print_object (obj, printcharfun, escapeflag); |
| 1722 | goto end_of_list; | 1719 | goto end_of_list; |
| 1723 | } | 1720 | } |
| @@ -1729,7 +1726,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1729 | 1726 | ||
| 1730 | if (print_length && i > print_length) | 1727 | if (print_length && i > print_length) |
| 1731 | { | 1728 | { |
| 1732 | strout ("...", 3, 3, printcharfun, 0); | 1729 | strout ("...", 3, 3, printcharfun); |
| 1733 | goto end_of_list; | 1730 | goto end_of_list; |
| 1734 | } | 1731 | } |
| 1735 | 1732 | ||
| @@ -1744,7 +1741,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1744 | /* OBJ non-nil here means it's the end of a dotted list. */ | 1741 | /* OBJ non-nil here means it's the end of a dotted list. */ |
| 1745 | if (!NILP (obj)) | 1742 | if (!NILP (obj)) |
| 1746 | { | 1743 | { |
| 1747 | strout (" . ", 3, 3, printcharfun, 0); | 1744 | strout (" . ", 3, 3, printcharfun); |
| 1748 | print_object (obj, printcharfun, escapeflag); | 1745 | print_object (obj, printcharfun, escapeflag); |
| 1749 | } | 1746 | } |
| 1750 | 1747 | ||
| @@ -1758,7 +1755,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1758 | { | 1755 | { |
| 1759 | if (escapeflag) | 1756 | if (escapeflag) |
| 1760 | { | 1757 | { |
| 1761 | strout ("#<process ", -1, -1, printcharfun, 0); | 1758 | strout ("#<process ", -1, -1, printcharfun); |
| 1762 | print_string (XPROCESS (obj)->name, printcharfun); | 1759 | print_string (XPROCESS (obj)->name, printcharfun); |
| 1763 | PRINTCHAR ('>'); | 1760 | PRINTCHAR ('>'); |
| 1764 | } | 1761 | } |
| @@ -1779,7 +1776,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1779 | PRINTCHAR ('#'); | 1776 | PRINTCHAR ('#'); |
| 1780 | PRINTCHAR ('&'); | 1777 | PRINTCHAR ('&'); |
| 1781 | sprintf (buf, "%ld", (long) XBOOL_VECTOR (obj)->size); | 1778 | sprintf (buf, "%ld", (long) XBOOL_VECTOR (obj)->size); |
| 1782 | strout (buf, -1, -1, printcharfun, 0); | 1779 | strout (buf, -1, -1, printcharfun); |
| 1783 | PRINTCHAR ('\"'); | 1780 | PRINTCHAR ('\"'); |
| 1784 | 1781 | ||
| 1785 | /* Don't print more characters than the specified maximum. | 1782 | /* Don't print more characters than the specified maximum. |
| @@ -1824,18 +1821,18 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1824 | } | 1821 | } |
| 1825 | else if (SUBRP (obj)) | 1822 | else if (SUBRP (obj)) |
| 1826 | { | 1823 | { |
| 1827 | strout ("#<subr ", -1, -1, printcharfun, 0); | 1824 | strout ("#<subr ", -1, -1, printcharfun); |
| 1828 | strout (XSUBR (obj)->symbol_name, -1, -1, printcharfun, 0); | 1825 | strout (XSUBR (obj)->symbol_name, -1, -1, printcharfun); |
| 1829 | PRINTCHAR ('>'); | 1826 | PRINTCHAR ('>'); |
| 1830 | } | 1827 | } |
| 1831 | else if (WINDOWP (obj)) | 1828 | else if (WINDOWP (obj)) |
| 1832 | { | 1829 | { |
| 1833 | strout ("#<window ", -1, -1, printcharfun, 0); | 1830 | strout ("#<window ", -1, -1, printcharfun); |
| 1834 | sprintf (buf, "%ld", (long) XFASTINT (XWINDOW (obj)->sequence_number)); | 1831 | sprintf (buf, "%ld", (long) XFASTINT (XWINDOW (obj)->sequence_number)); |
| 1835 | strout (buf, -1, -1, printcharfun, 0); | 1832 | strout (buf, -1, -1, printcharfun); |
| 1836 | if (!NILP (XWINDOW (obj)->buffer)) | 1833 | if (!NILP (XWINDOW (obj)->buffer)) |
| 1837 | { | 1834 | { |
| 1838 | strout (" on ", -1, -1, printcharfun, 0); | 1835 | strout (" on ", -1, -1, printcharfun); |
| 1839 | print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); | 1836 | print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); |
| 1840 | } | 1837 | } |
| 1841 | PRINTCHAR ('>'); | 1838 | PRINTCHAR ('>'); |
| @@ -1843,13 +1840,13 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1843 | else if (TERMINALP (obj)) | 1840 | else if (TERMINALP (obj)) |
| 1844 | { | 1841 | { |
| 1845 | struct terminal *t = XTERMINAL (obj); | 1842 | struct terminal *t = XTERMINAL (obj); |
| 1846 | strout ("#<terminal ", -1, -1, printcharfun, 0); | 1843 | strout ("#<terminal ", -1, -1, printcharfun); |
| 1847 | sprintf (buf, "%d", t->id); | 1844 | sprintf (buf, "%d", t->id); |
| 1848 | strout (buf, -1, -1, printcharfun, 0); | 1845 | strout (buf, -1, -1, printcharfun); |
| 1849 | if (t->name) | 1846 | if (t->name) |
| 1850 | { | 1847 | { |
| 1851 | strout (" on ", -1, -1, printcharfun, 0); | 1848 | strout (" on ", -1, -1, printcharfun); |
| 1852 | strout (t->name, -1, -1, printcharfun, 0); | 1849 | strout (t->name, -1, -1, printcharfun); |
| 1853 | } | 1850 | } |
| 1854 | PRINTCHAR ('>'); | 1851 | PRINTCHAR ('>'); |
| 1855 | } | 1852 | } |
| @@ -1859,21 +1856,21 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1859 | int i; | 1856 | int i; |
| 1860 | EMACS_INT real_size, size; | 1857 | EMACS_INT real_size, size; |
| 1861 | #if 0 | 1858 | #if 0 |
| 1862 | strout ("#<hash-table", -1, -1, printcharfun, 0); | 1859 | strout ("#<hash-table", -1, -1, printcharfun); |
| 1863 | if (SYMBOLP (h->test)) | 1860 | if (SYMBOLP (h->test)) |
| 1864 | { | 1861 | { |
| 1865 | PRINTCHAR (' '); | 1862 | PRINTCHAR (' '); |
| 1866 | PRINTCHAR ('\''); | 1863 | PRINTCHAR ('\''); |
| 1867 | strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun, 0); | 1864 | strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun); |
| 1868 | PRINTCHAR (' '); | 1865 | PRINTCHAR (' '); |
| 1869 | strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0); | 1866 | strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun); |
| 1870 | PRINTCHAR (' '); | 1867 | PRINTCHAR (' '); |
| 1871 | sprintf (buf, "%ld/%ld", (long) h->count, | 1868 | sprintf (buf, "%ld/%ld", (long) h->count, |
| 1872 | (long) XVECTOR (h->next)->size); | 1869 | (long) XVECTOR (h->next)->size); |
| 1873 | strout (buf, -1, -1, printcharfun, 0); | 1870 | strout (buf, -1, -1, printcharfun); |
| 1874 | } | 1871 | } |
| 1875 | sprintf (buf, " 0x%lx", (unsigned long) h); | 1872 | sprintf (buf, " 0x%lx", (unsigned long) h); |
| 1876 | strout (buf, -1, -1, printcharfun, 0); | 1873 | strout (buf, -1, -1, printcharfun); |
| 1877 | PRINTCHAR ('>'); | 1874 | PRINTCHAR ('>'); |
| 1878 | #endif | 1875 | #endif |
| 1879 | /* Implement a readable output, e.g.: | 1876 | /* Implement a readable output, e.g.: |
| @@ -1881,33 +1878,33 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1881 | /* Always print the size. */ | 1878 | /* Always print the size. */ |
| 1882 | sprintf (buf, "#s(hash-table size %ld", | 1879 | sprintf (buf, "#s(hash-table size %ld", |
| 1883 | (long) XVECTOR (h->next)->size); | 1880 | (long) XVECTOR (h->next)->size); |
| 1884 | strout (buf, -1, -1, printcharfun, 0); | 1881 | strout (buf, -1, -1, printcharfun); |
| 1885 | 1882 | ||
| 1886 | if (!NILP (h->test)) | 1883 | if (!NILP (h->test)) |
| 1887 | { | 1884 | { |
| 1888 | strout (" test ", -1, -1, printcharfun, 0); | 1885 | strout (" test ", -1, -1, printcharfun); |
| 1889 | print_object (h->test, printcharfun, escapeflag); | 1886 | print_object (h->test, printcharfun, escapeflag); |
| 1890 | } | 1887 | } |
| 1891 | 1888 | ||
| 1892 | if (!NILP (h->weak)) | 1889 | if (!NILP (h->weak)) |
| 1893 | { | 1890 | { |
| 1894 | strout (" weakness ", -1, -1, printcharfun, 0); | 1891 | strout (" weakness ", -1, -1, printcharfun); |
| 1895 | print_object (h->weak, printcharfun, escapeflag); | 1892 | print_object (h->weak, printcharfun, escapeflag); |
| 1896 | } | 1893 | } |
| 1897 | 1894 | ||
| 1898 | if (!NILP (h->rehash_size)) | 1895 | if (!NILP (h->rehash_size)) |
| 1899 | { | 1896 | { |
| 1900 | strout (" rehash-size ", -1, -1, printcharfun, 0); | 1897 | strout (" rehash-size ", -1, -1, printcharfun); |
| 1901 | print_object (h->rehash_size, printcharfun, escapeflag); | 1898 | print_object (h->rehash_size, printcharfun, escapeflag); |
| 1902 | } | 1899 | } |
| 1903 | 1900 | ||
| 1904 | if (!NILP (h->rehash_threshold)) | 1901 | if (!NILP (h->rehash_threshold)) |
| 1905 | { | 1902 | { |
| 1906 | strout (" rehash-threshold ", -1, -1, printcharfun, 0); | 1903 | strout (" rehash-threshold ", -1, -1, printcharfun); |
| 1907 | print_object (h->rehash_threshold, printcharfun, escapeflag); | 1904 | print_object (h->rehash_threshold, printcharfun, escapeflag); |
| 1908 | } | 1905 | } |
| 1909 | 1906 | ||
| 1910 | strout (" data ", -1, -1, printcharfun, 0); | 1907 | strout (" data ", -1, -1, printcharfun); |
| 1911 | 1908 | ||
| 1912 | /* Print the data here as a plist. */ | 1909 | /* Print the data here as a plist. */ |
| 1913 | real_size = HASH_TABLE_SIZE (h); | 1910 | real_size = HASH_TABLE_SIZE (h); |
| @@ -1929,7 +1926,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1929 | } | 1926 | } |
| 1930 | 1927 | ||
| 1931 | if (size < real_size) | 1928 | if (size < real_size) |
| 1932 | strout (" ...", 4, 4, printcharfun, 0); | 1929 | strout (" ...", 4, 4, printcharfun); |
| 1933 | 1930 | ||
| 1934 | PRINTCHAR (')'); | 1931 | PRINTCHAR (')'); |
| 1935 | PRINTCHAR (')'); | 1932 | PRINTCHAR (')'); |
| @@ -1938,10 +1935,10 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1938 | else if (BUFFERP (obj)) | 1935 | else if (BUFFERP (obj)) |
| 1939 | { | 1936 | { |
| 1940 | if (NILP (BVAR (XBUFFER (obj), name))) | 1937 | if (NILP (BVAR (XBUFFER (obj), name))) |
| 1941 | strout ("#<killed buffer>", -1, -1, printcharfun, 0); | 1938 | strout ("#<killed buffer>", -1, -1, printcharfun); |
| 1942 | else if (escapeflag) | 1939 | else if (escapeflag) |
| 1943 | { | 1940 | { |
| 1944 | strout ("#<buffer ", -1, -1, printcharfun, 0); | 1941 | strout ("#<buffer ", -1, -1, printcharfun); |
| 1945 | print_string (BVAR (XBUFFER (obj), name), printcharfun); | 1942 | print_string (BVAR (XBUFFER (obj), name), printcharfun); |
| 1946 | PRINTCHAR ('>'); | 1943 | PRINTCHAR ('>'); |
| 1947 | } | 1944 | } |
| @@ -1950,16 +1947,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1950 | } | 1947 | } |
| 1951 | else if (WINDOW_CONFIGURATIONP (obj)) | 1948 | else if (WINDOW_CONFIGURATIONP (obj)) |
| 1952 | { | 1949 | { |
| 1953 | strout ("#<window-configuration>", -1, -1, printcharfun, 0); | 1950 | strout ("#<window-configuration>", -1, -1, printcharfun); |
| 1954 | } | 1951 | } |
| 1955 | else if (FRAMEP (obj)) | 1952 | else if (FRAMEP (obj)) |
| 1956 | { | 1953 | { |
| 1957 | strout ((FRAME_LIVE_P (XFRAME (obj)) | 1954 | strout ((FRAME_LIVE_P (XFRAME (obj)) |
| 1958 | ? "#<frame " : "#<dead frame "), | 1955 | ? "#<frame " : "#<dead frame "), |
| 1959 | -1, -1, printcharfun, 0); | 1956 | -1, -1, printcharfun); |
| 1960 | print_string (XFRAME (obj)->name, printcharfun); | 1957 | print_string (XFRAME (obj)->name, printcharfun); |
| 1961 | sprintf (buf, " 0x%lx", (unsigned long) (XFRAME (obj))); | 1958 | sprintf (buf, " 0x%lx", (unsigned long) (XFRAME (obj))); |
| 1962 | strout (buf, -1, -1, printcharfun, 0); | 1959 | strout (buf, -1, -1, printcharfun); |
| 1963 | PRINTCHAR ('>'); | 1960 | PRINTCHAR ('>'); |
| 1964 | } | 1961 | } |
| 1965 | else if (FONTP (obj)) | 1962 | else if (FONTP (obj)) |
| @@ -1969,9 +1966,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1969 | if (! FONT_OBJECT_P (obj)) | 1966 | if (! FONT_OBJECT_P (obj)) |
| 1970 | { | 1967 | { |
| 1971 | if (FONT_SPEC_P (obj)) | 1968 | if (FONT_SPEC_P (obj)) |
| 1972 | strout ("#<font-spec", -1, -1, printcharfun, 0); | 1969 | strout ("#<font-spec", -1, -1, printcharfun); |
| 1973 | else | 1970 | else |
| 1974 | strout ("#<font-entity", -1, -1, printcharfun, 0); | 1971 | strout ("#<font-entity", -1, -1, printcharfun); |
| 1975 | for (i = 0; i < FONT_SPEC_MAX; i++) | 1972 | for (i = 0; i < FONT_SPEC_MAX; i++) |
| 1976 | { | 1973 | { |
| 1977 | PRINTCHAR (' '); | 1974 | PRINTCHAR (' '); |
| @@ -1984,7 +1981,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1984 | } | 1981 | } |
| 1985 | else | 1982 | else |
| 1986 | { | 1983 | { |
| 1987 | strout ("#<font-object ", -1, -1, printcharfun, 0); | 1984 | strout ("#<font-object ", -1, -1, printcharfun); |
| 1988 | print_object (AREF (obj, FONT_NAME_INDEX), printcharfun, | 1985 | print_object (AREF (obj, FONT_NAME_INDEX), printcharfun, |
| 1989 | escapeflag); | 1986 | escapeflag); |
| 1990 | } | 1987 | } |
| @@ -2037,7 +2034,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2037 | print_object (tem, printcharfun, escapeflag); | 2034 | print_object (tem, printcharfun, escapeflag); |
| 2038 | } | 2035 | } |
| 2039 | if (size < real_size) | 2036 | if (size < real_size) |
| 2040 | strout (" ...", 4, 4, printcharfun, 0); | 2037 | strout (" ...", 4, 4, printcharfun); |
| 2041 | } | 2038 | } |
| 2042 | PRINTCHAR (']'); | 2039 | PRINTCHAR (']'); |
| 2043 | } | 2040 | } |
| @@ -2047,32 +2044,32 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2047 | switch (XMISCTYPE (obj)) | 2044 | switch (XMISCTYPE (obj)) |
| 2048 | { | 2045 | { |
| 2049 | case Lisp_Misc_Marker: | 2046 | case Lisp_Misc_Marker: |
| 2050 | strout ("#<marker ", -1, -1, printcharfun, 0); | 2047 | strout ("#<marker ", -1, -1, printcharfun); |
| 2051 | /* Do you think this is necessary? */ | 2048 | /* Do you think this is necessary? */ |
| 2052 | if (XMARKER (obj)->insertion_type != 0) | 2049 | if (XMARKER (obj)->insertion_type != 0) |
| 2053 | strout ("(moves after insertion) ", -1, -1, printcharfun, 0); | 2050 | strout ("(moves after insertion) ", -1, -1, printcharfun); |
| 2054 | if (! XMARKER (obj)->buffer) | 2051 | if (! XMARKER (obj)->buffer) |
| 2055 | strout ("in no buffer", -1, -1, printcharfun, 0); | 2052 | strout ("in no buffer", -1, -1, printcharfun); |
| 2056 | else | 2053 | else |
| 2057 | { | 2054 | { |
| 2058 | sprintf (buf, "at %ld", (long)marker_position (obj)); | 2055 | sprintf (buf, "at %ld", (long)marker_position (obj)); |
| 2059 | strout (buf, -1, -1, printcharfun, 0); | 2056 | strout (buf, -1, -1, printcharfun); |
| 2060 | strout (" in ", -1, -1, printcharfun, 0); | 2057 | strout (" in ", -1, -1, printcharfun); |
| 2061 | print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun); | 2058 | print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun); |
| 2062 | } | 2059 | } |
| 2063 | PRINTCHAR ('>'); | 2060 | PRINTCHAR ('>'); |
| 2064 | break; | 2061 | break; |
| 2065 | 2062 | ||
| 2066 | case Lisp_Misc_Overlay: | 2063 | case Lisp_Misc_Overlay: |
| 2067 | strout ("#<overlay ", -1, -1, printcharfun, 0); | 2064 | strout ("#<overlay ", -1, -1, printcharfun); |
| 2068 | if (! XMARKER (OVERLAY_START (obj))->buffer) | 2065 | if (! XMARKER (OVERLAY_START (obj))->buffer) |
| 2069 | strout ("in no buffer", -1, -1, printcharfun, 0); | 2066 | strout ("in no buffer", -1, -1, printcharfun); |
| 2070 | else | 2067 | else |
| 2071 | { | 2068 | { |
| 2072 | sprintf (buf, "from %ld to %ld in ", | 2069 | sprintf (buf, "from %ld to %ld in ", |
| 2073 | (long)marker_position (OVERLAY_START (obj)), | 2070 | (long)marker_position (OVERLAY_START (obj)), |
| 2074 | (long)marker_position (OVERLAY_END (obj))); | 2071 | (long)marker_position (OVERLAY_END (obj))); |
| 2075 | strout (buf, -1, -1, printcharfun, 0); | 2072 | strout (buf, -1, -1, printcharfun); |
| 2076 | print_string (BVAR (XMARKER (OVERLAY_START (obj))->buffer, name), | 2073 | print_string (BVAR (XMARKER (OVERLAY_START (obj))->buffer, name), |
| 2077 | printcharfun); | 2074 | printcharfun); |
| 2078 | } | 2075 | } |
| @@ -2082,15 +2079,15 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2082 | /* Remaining cases shouldn't happen in normal usage, but let's print | 2079 | /* Remaining cases shouldn't happen in normal usage, but let's print |
| 2083 | them anyway for the benefit of the debugger. */ | 2080 | them anyway for the benefit of the debugger. */ |
| 2084 | case Lisp_Misc_Free: | 2081 | case Lisp_Misc_Free: |
| 2085 | strout ("#<misc free cell>", -1, -1, printcharfun, 0); | 2082 | strout ("#<misc free cell>", -1, -1, printcharfun); |
| 2086 | break; | 2083 | break; |
| 2087 | 2084 | ||
| 2088 | case Lisp_Misc_Save_Value: | 2085 | case Lisp_Misc_Save_Value: |
| 2089 | strout ("#<save_value ", -1, -1, printcharfun, 0); | 2086 | strout ("#<save_value ", -1, -1, printcharfun); |
| 2090 | sprintf(buf, "ptr=0x%08lx int=%d", | 2087 | sprintf(buf, "ptr=0x%08lx int=%d", |
| 2091 | (unsigned long) XSAVE_VALUE (obj)->pointer, | 2088 | (unsigned long) XSAVE_VALUE (obj)->pointer, |
| 2092 | XSAVE_VALUE (obj)->integer); | 2089 | XSAVE_VALUE (obj)->integer); |
| 2093 | strout (buf, -1, -1, printcharfun, 0); | 2090 | strout (buf, -1, -1, printcharfun); |
| 2094 | PRINTCHAR ('>'); | 2091 | PRINTCHAR ('>'); |
| 2095 | break; | 2092 | break; |
| 2096 | 2093 | ||
| @@ -2104,16 +2101,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2104 | { | 2101 | { |
| 2105 | /* We're in trouble if this happens! | 2102 | /* We're in trouble if this happens! |
| 2106 | Probably should just abort () */ | 2103 | Probably should just abort () */ |
| 2107 | strout ("#<EMACS BUG: INVALID DATATYPE ", -1, -1, printcharfun, 0); | 2104 | strout ("#<EMACS BUG: INVALID DATATYPE ", -1, -1, printcharfun); |
| 2108 | if (MISCP (obj)) | 2105 | if (MISCP (obj)) |
| 2109 | sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj)); | 2106 | sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj)); |
| 2110 | else if (VECTORLIKEP (obj)) | 2107 | else if (VECTORLIKEP (obj)) |
| 2111 | sprintf (buf, "(PVEC 0x%08x)", (int) XVECTOR (obj)->size); | 2108 | sprintf (buf, "(PVEC 0x%08x)", (int) XVECTOR (obj)->size); |
| 2112 | else | 2109 | else |
| 2113 | sprintf (buf, "(0x%02x)", (int) XTYPE (obj)); | 2110 | sprintf (buf, "(0x%02x)", (int) XTYPE (obj)); |
| 2114 | strout (buf, -1, -1, printcharfun, 0); | 2111 | strout (buf, -1, -1, printcharfun); |
| 2115 | strout (" Save your buffers immediately and please report this bug>", | 2112 | strout (" Save your buffers immediately and please report this bug>", |
| 2116 | -1, -1, printcharfun, 0); | 2113 | -1, -1, printcharfun); |
| 2117 | } | 2114 | } |
| 2118 | } | 2115 | } |
| 2119 | 2116 | ||
diff --git a/src/search.c b/src/search.c index bf93a7fe442..59a530eff61 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -95,10 +95,9 @@ static void save_search_regs (void); | |||
| 95 | static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT, | 95 | static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT, |
| 96 | EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT, | 96 | EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT, |
| 97 | EMACS_INT, EMACS_INT); | 97 | EMACS_INT, EMACS_INT); |
| 98 | static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, EMACS_INT, | 98 | static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, |
| 99 | Lisp_Object, Lisp_Object, | 99 | Lisp_Object, Lisp_Object, EMACS_INT, |
| 100 | EMACS_INT, EMACS_INT, | 100 | EMACS_INT, int); |
| 101 | EMACS_INT, EMACS_INT, int); | ||
| 102 | static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, | 101 | static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, |
| 103 | EMACS_INT, EMACS_INT, EMACS_INT, int, | 102 | EMACS_INT, EMACS_INT, EMACS_INT, int, |
| 104 | Lisp_Object, Lisp_Object, int); | 103 | Lisp_Object, Lisp_Object, int); |
| @@ -1416,15 +1415,14 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, | |||
| 1416 | } | 1415 | } |
| 1417 | 1416 | ||
| 1418 | len_byte = pat - patbuf; | 1417 | len_byte = pat - patbuf; |
| 1419 | len = raw_pattern_size; | ||
| 1420 | pat = base_pat = patbuf; | 1418 | pat = base_pat = patbuf; |
| 1421 | 1419 | ||
| 1422 | if (boyer_moore_ok) | 1420 | if (boyer_moore_ok) |
| 1423 | return boyer_moore (n, pat, len, len_byte, trt, inverse_trt, | 1421 | return boyer_moore (n, pat, len_byte, trt, inverse_trt, |
| 1424 | pos, pos_byte, lim, lim_byte, | 1422 | pos_byte, lim_byte, |
| 1425 | char_base); | 1423 | char_base); |
| 1426 | else | 1424 | else |
| 1427 | return simple_search (n, pat, len, len_byte, trt, | 1425 | return simple_search (n, pat, raw_pattern_size, len_byte, trt, |
| 1428 | pos, pos_byte, lim, lim_byte); | 1426 | pos, pos_byte, lim, lim_byte); |
| 1429 | } | 1427 | } |
| 1430 | } | 1428 | } |
| @@ -1636,8 +1634,8 @@ simple_search (EMACS_INT n, unsigned char *pat, | |||
| 1636 | } | 1634 | } |
| 1637 | 1635 | ||
| 1638 | /* Do Boyer-Moore search N times for the string BASE_PAT, | 1636 | /* Do Boyer-Moore search N times for the string BASE_PAT, |
| 1639 | whose length is LEN/LEN_BYTE, | 1637 | whose length is LEN_BYTE, |
| 1640 | from buffer position POS/POS_BYTE until LIM/LIM_BYTE. | 1638 | from buffer position POS_BYTE until LIM_BYTE. |
| 1641 | DIRECTION says which direction we search in. | 1639 | DIRECTION says which direction we search in. |
| 1642 | TRT and INVERSE_TRT are translation tables. | 1640 | TRT and INVERSE_TRT are translation tables. |
| 1643 | Characters in PAT are already translated by TRT. | 1641 | Characters in PAT are already translated by TRT. |
| @@ -1652,10 +1650,10 @@ simple_search (EMACS_INT n, unsigned char *pat, | |||
| 1652 | 1650 | ||
| 1653 | static EMACS_INT | 1651 | static EMACS_INT |
| 1654 | boyer_moore (EMACS_INT n, unsigned char *base_pat, | 1652 | boyer_moore (EMACS_INT n, unsigned char *base_pat, |
| 1655 | EMACS_INT len, EMACS_INT len_byte, | 1653 | EMACS_INT len_byte, |
| 1656 | Lisp_Object trt, Lisp_Object inverse_trt, | 1654 | Lisp_Object trt, Lisp_Object inverse_trt, |
| 1657 | EMACS_INT pos, EMACS_INT pos_byte, | 1655 | EMACS_INT pos_byte, EMACS_INT lim_byte, |
| 1658 | EMACS_INT lim, EMACS_INT lim_byte, int char_base) | 1656 | int char_base) |
| 1659 | { | 1657 | { |
| 1660 | int direction = ((n > 0) ? 1 : -1); | 1658 | int direction = ((n > 0) ? 1 : -1); |
| 1661 | register EMACS_INT dirlen; | 1659 | register EMACS_INT dirlen; |
| @@ -1776,8 +1774,8 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, | |||
| 1776 | stride_for_teases = BM_tab[j]; | 1774 | stride_for_teases = BM_tab[j]; |
| 1777 | 1775 | ||
| 1778 | BM_tab[j] = dirlen - i; | 1776 | BM_tab[j] = dirlen - i; |
| 1779 | /* A translation table is accompanied by its inverse -- see */ | 1777 | /* A translation table is accompanied by its inverse -- see |
| 1780 | /* comment following downcase_table for details */ | 1778 | comment following downcase_table for details. */ |
| 1781 | if (ch >= 0) | 1779 | if (ch >= 0) |
| 1782 | { | 1780 | { |
| 1783 | int starting_ch = ch; | 1781 | int starting_ch = ch; |
| @@ -4517,75 +4517,75 @@ struct { | |||
| 4517 | int errnum; | 4517 | int errnum; |
| 4518 | char * msg; | 4518 | char * msg; |
| 4519 | } _wsa_errlist[] = { | 4519 | } _wsa_errlist[] = { |
| 4520 | WSAEINTR , "Interrupted function call", | 4520 | {WSAEINTR , "Interrupted function call"}, |
| 4521 | WSAEBADF , "Bad file descriptor", | 4521 | {WSAEBADF , "Bad file descriptor"}, |
| 4522 | WSAEACCES , "Permission denied", | 4522 | {WSAEACCES , "Permission denied"}, |
| 4523 | WSAEFAULT , "Bad address", | 4523 | {WSAEFAULT , "Bad address"}, |
| 4524 | WSAEINVAL , "Invalid argument", | 4524 | {WSAEINVAL , "Invalid argument"}, |
| 4525 | WSAEMFILE , "Too many open files", | 4525 | {WSAEMFILE , "Too many open files"}, |
| 4526 | 4526 | ||
| 4527 | WSAEWOULDBLOCK , "Resource temporarily unavailable", | 4527 | {WSAEWOULDBLOCK , "Resource temporarily unavailable"}, |
| 4528 | WSAEINPROGRESS , "Operation now in progress", | 4528 | {WSAEINPROGRESS , "Operation now in progress"}, |
| 4529 | WSAEALREADY , "Operation already in progress", | 4529 | {WSAEALREADY , "Operation already in progress"}, |
| 4530 | WSAENOTSOCK , "Socket operation on non-socket", | 4530 | {WSAENOTSOCK , "Socket operation on non-socket"}, |
| 4531 | WSAEDESTADDRREQ , "Destination address required", | 4531 | {WSAEDESTADDRREQ , "Destination address required"}, |
| 4532 | WSAEMSGSIZE , "Message too long", | 4532 | {WSAEMSGSIZE , "Message too long"}, |
| 4533 | WSAEPROTOTYPE , "Protocol wrong type for socket", | 4533 | {WSAEPROTOTYPE , "Protocol wrong type for socket"}, |
| 4534 | WSAENOPROTOOPT , "Bad protocol option", | 4534 | {WSAENOPROTOOPT , "Bad protocol option"}, |
| 4535 | WSAEPROTONOSUPPORT , "Protocol not supported", | 4535 | {WSAEPROTONOSUPPORT , "Protocol not supported"}, |
| 4536 | WSAESOCKTNOSUPPORT , "Socket type not supported", | 4536 | {WSAESOCKTNOSUPPORT , "Socket type not supported"}, |
| 4537 | WSAEOPNOTSUPP , "Operation not supported", | 4537 | {WSAEOPNOTSUPP , "Operation not supported"}, |
| 4538 | WSAEPFNOSUPPORT , "Protocol family not supported", | 4538 | {WSAEPFNOSUPPORT , "Protocol family not supported"}, |
| 4539 | WSAEAFNOSUPPORT , "Address family not supported by protocol family", | 4539 | {WSAEAFNOSUPPORT , "Address family not supported by protocol family"}, |
| 4540 | WSAEADDRINUSE , "Address already in use", | 4540 | {WSAEADDRINUSE , "Address already in use"}, |
| 4541 | WSAEADDRNOTAVAIL , "Cannot assign requested address", | 4541 | {WSAEADDRNOTAVAIL , "Cannot assign requested address"}, |
| 4542 | WSAENETDOWN , "Network is down", | 4542 | {WSAENETDOWN , "Network is down"}, |
| 4543 | WSAENETUNREACH , "Network is unreachable", | 4543 | {WSAENETUNREACH , "Network is unreachable"}, |
| 4544 | WSAENETRESET , "Network dropped connection on reset", | 4544 | {WSAENETRESET , "Network dropped connection on reset"}, |
| 4545 | WSAECONNABORTED , "Software caused connection abort", | 4545 | {WSAECONNABORTED , "Software caused connection abort"}, |
| 4546 | WSAECONNRESET , "Connection reset by peer", | 4546 | {WSAECONNRESET , "Connection reset by peer"}, |
| 4547 | WSAENOBUFS , "No buffer space available", | 4547 | {WSAENOBUFS , "No buffer space available"}, |
| 4548 | WSAEISCONN , "Socket is already connected", | 4548 | {WSAEISCONN , "Socket is already connected"}, |
| 4549 | WSAENOTCONN , "Socket is not connected", | 4549 | {WSAENOTCONN , "Socket is not connected"}, |
| 4550 | WSAESHUTDOWN , "Cannot send after socket shutdown", | 4550 | {WSAESHUTDOWN , "Cannot send after socket shutdown"}, |
| 4551 | WSAETOOMANYREFS , "Too many references", /* not sure */ | 4551 | {WSAETOOMANYREFS , "Too many references"}, /* not sure */ |
| 4552 | WSAETIMEDOUT , "Connection timed out", | 4552 | {WSAETIMEDOUT , "Connection timed out"}, |
| 4553 | WSAECONNREFUSED , "Connection refused", | 4553 | {WSAECONNREFUSED , "Connection refused"}, |
| 4554 | WSAELOOP , "Network loop", /* not sure */ | 4554 | {WSAELOOP , "Network loop"}, /* not sure */ |
| 4555 | WSAENAMETOOLONG , "Name is too long", | 4555 | {WSAENAMETOOLONG , "Name is too long"}, |
| 4556 | WSAEHOSTDOWN , "Host is down", | 4556 | {WSAEHOSTDOWN , "Host is down"}, |
| 4557 | WSAEHOSTUNREACH , "No route to host", | 4557 | {WSAEHOSTUNREACH , "No route to host"}, |
| 4558 | WSAENOTEMPTY , "Buffer not empty", /* not sure */ | 4558 | {WSAENOTEMPTY , "Buffer not empty"}, /* not sure */ |
| 4559 | WSAEPROCLIM , "Too many processes", | 4559 | {WSAEPROCLIM , "Too many processes"}, |
| 4560 | WSAEUSERS , "Too many users", /* not sure */ | 4560 | {WSAEUSERS , "Too many users"}, /* not sure */ |
| 4561 | WSAEDQUOT , "Double quote in host name", /* really not sure */ | 4561 | {WSAEDQUOT , "Double quote in host name"}, /* really not sure */ |
| 4562 | WSAESTALE , "Data is stale", /* not sure */ | 4562 | {WSAESTALE , "Data is stale"}, /* not sure */ |
| 4563 | WSAEREMOTE , "Remote error", /* not sure */ | 4563 | {WSAEREMOTE , "Remote error"}, /* not sure */ |
| 4564 | 4564 | ||
| 4565 | WSASYSNOTREADY , "Network subsystem is unavailable", | 4565 | {WSASYSNOTREADY , "Network subsystem is unavailable"}, |
| 4566 | WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range", | 4566 | {WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range"}, |
| 4567 | WSANOTINITIALISED , "Winsock not initialized successfully", | 4567 | {WSANOTINITIALISED , "Winsock not initialized successfully"}, |
| 4568 | WSAEDISCON , "Graceful shutdown in progress", | 4568 | {WSAEDISCON , "Graceful shutdown in progress"}, |
| 4569 | #ifdef WSAENOMORE | 4569 | #ifdef WSAENOMORE |
| 4570 | WSAENOMORE , "No more operations allowed", /* not sure */ | 4570 | {WSAENOMORE , "No more operations allowed"}, /* not sure */ |
| 4571 | WSAECANCELLED , "Operation cancelled", /* not sure */ | 4571 | {WSAECANCELLED , "Operation cancelled"}, /* not sure */ |
| 4572 | WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider", | 4572 | {WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider"}, |
| 4573 | WSAEINVALIDPROVIDER , "Invalid service provider version number", | 4573 | {WSAEINVALIDPROVIDER , "Invalid service provider version number"}, |
| 4574 | WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider", | 4574 | {WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider"}, |
| 4575 | WSASYSCALLFAILURE , "System call failure", | 4575 | {WSASYSCALLFAILURE , "System call failure"}, |
| 4576 | WSASERVICE_NOT_FOUND , "Service not found", /* not sure */ | 4576 | {WSASERVICE_NOT_FOUND , "Service not found"}, /* not sure */ |
| 4577 | WSATYPE_NOT_FOUND , "Class type not found", | 4577 | {WSATYPE_NOT_FOUND , "Class type not found"}, |
| 4578 | WSA_E_NO_MORE , "No more resources available", /* really not sure */ | 4578 | {WSA_E_NO_MORE , "No more resources available"}, /* really not sure */ |
| 4579 | WSA_E_CANCELLED , "Operation already cancelled", /* really not sure */ | 4579 | {WSA_E_CANCELLED , "Operation already cancelled"}, /* really not sure */ |
| 4580 | WSAEREFUSED , "Operation refused", /* not sure */ | 4580 | {WSAEREFUSED , "Operation refused"}, /* not sure */ |
| 4581 | #endif | 4581 | #endif |
| 4582 | 4582 | ||
| 4583 | WSAHOST_NOT_FOUND , "Host not found", | 4583 | {WSAHOST_NOT_FOUND , "Host not found"}, |
| 4584 | WSATRY_AGAIN , "Authoritative host not found during name lookup", | 4584 | {WSATRY_AGAIN , "Authoritative host not found during name lookup"}, |
| 4585 | WSANO_RECOVERY , "Non-recoverable error during name lookup", | 4585 | {WSANO_RECOVERY , "Non-recoverable error during name lookup"}, |
| 4586 | WSANO_DATA , "Valid name, no data record of requested type", | 4586 | {WSANO_DATA , "Valid name, no data record of requested type"}, |
| 4587 | 4587 | ||
| 4588 | -1, NULL | 4588 | {-1, NULL} |
| 4589 | }; | 4589 | }; |
| 4590 | 4590 | ||
| 4591 | char * | 4591 | char * |
diff --git a/src/xdisp.c b/src/xdisp.c index 6f9f56df979..148c7bc5ec6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -754,7 +754,7 @@ static void setup_for_ellipsis (struct it *, int); | |||
| 754 | static void mark_window_display_accurate_1 (struct window *, int); | 754 | static void mark_window_display_accurate_1 (struct window *, int); |
| 755 | static int single_display_spec_string_p (Lisp_Object, Lisp_Object); | 755 | static int single_display_spec_string_p (Lisp_Object, Lisp_Object); |
| 756 | static int display_prop_string_p (Lisp_Object, Lisp_Object); | 756 | static int display_prop_string_p (Lisp_Object, Lisp_Object); |
| 757 | static int cursor_row_p (struct window *, struct glyph_row *); | 757 | static int cursor_row_p (struct glyph_row *); |
| 758 | static int redisplay_mode_lines (Lisp_Object, int); | 758 | static int redisplay_mode_lines (Lisp_Object, int); |
| 759 | static char *decode_mode_spec_coding (Lisp_Object, char *, int); | 759 | static char *decode_mode_spec_coding (Lisp_Object, char *, int); |
| 760 | 760 | ||
| @@ -823,8 +823,7 @@ static int display_mode_lines (struct window *); | |||
| 823 | static int display_mode_line (struct window *, enum face_id, Lisp_Object); | 823 | static int display_mode_line (struct window *, enum face_id, Lisp_Object); |
| 824 | static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int); | 824 | static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int); |
| 825 | static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); | 825 | static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); |
| 826 | static const char *decode_mode_spec (struct window *, int, int, int, | 826 | static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *); |
| 827 | Lisp_Object *); | ||
| 828 | static void display_menu_bar (struct window *); | 827 | static void display_menu_bar (struct window *); |
| 829 | static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, | 828 | static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, |
| 830 | EMACS_INT *); | 829 | EMACS_INT *); |
| @@ -4420,20 +4419,18 @@ display_prop_string_p (Lisp_Object prop, Lisp_Object string) | |||
| 4420 | return 0; | 4419 | return 0; |
| 4421 | } | 4420 | } |
| 4422 | 4421 | ||
| 4423 | /* Look for STRING in overlays and text properties in W's buffer, | 4422 | /* Look for STRING in overlays and text properties in the current |
| 4424 | between character positions FROM and TO (excluding TO). | 4423 | buffer, between character positions FROM and TO (excluding TO). |
| 4425 | BACK_P non-zero means look back (in this case, TO is supposed to be | 4424 | BACK_P non-zero means look back (in this case, TO is supposed to be |
| 4426 | less than FROM). | 4425 | less than FROM). |
| 4427 | Value is the first character position where STRING was found, or | 4426 | Value is the first character position where STRING was found, or |
| 4428 | zero if it wasn't found before hitting TO. | 4427 | zero if it wasn't found before hitting TO. |
| 4429 | 4428 | ||
| 4430 | W's buffer must be current. | ||
| 4431 | |||
| 4432 | This function may only use code that doesn't eval because it is | 4429 | This function may only use code that doesn't eval because it is |
| 4433 | called asynchronously from note_mouse_highlight. */ | 4430 | called asynchronously from note_mouse_highlight. */ |
| 4434 | 4431 | ||
| 4435 | static EMACS_INT | 4432 | static EMACS_INT |
| 4436 | string_buffer_position_lim (struct window *w, Lisp_Object string, | 4433 | string_buffer_position_lim (Lisp_Object string, |
| 4437 | EMACS_INT from, EMACS_INT to, int back_p) | 4434 | EMACS_INT from, EMACS_INT to, int back_p) |
| 4438 | { | 4435 | { |
| 4439 | Lisp_Object limit, prop, pos; | 4436 | Lisp_Object limit, prop, pos; |
| @@ -4471,27 +4468,25 @@ string_buffer_position_lim (struct window *w, Lisp_Object string, | |||
| 4471 | return found ? XINT (pos) : 0; | 4468 | return found ? XINT (pos) : 0; |
| 4472 | } | 4469 | } |
| 4473 | 4470 | ||
| 4474 | /* Determine which buffer position in W's buffer STRING comes from. | 4471 | /* Determine which buffer position in current buffer STRING comes from. |
| 4475 | AROUND_CHARPOS is an approximate position where it could come from. | 4472 | AROUND_CHARPOS is an approximate position where it could come from. |
| 4476 | Value is the buffer position or 0 if it couldn't be determined. | 4473 | Value is the buffer position or 0 if it couldn't be determined. |
| 4477 | 4474 | ||
| 4478 | W's buffer must be current. | ||
| 4479 | |||
| 4480 | This function is necessary because we don't record buffer positions | 4475 | This function is necessary because we don't record buffer positions |
| 4481 | in glyphs generated from strings (to keep struct glyph small). | 4476 | in glyphs generated from strings (to keep struct glyph small). |
| 4482 | This function may only use code that doesn't eval because it is | 4477 | This function may only use code that doesn't eval because it is |
| 4483 | called asynchronously from note_mouse_highlight. */ | 4478 | called asynchronously from note_mouse_highlight. */ |
| 4484 | 4479 | ||
| 4485 | EMACS_INT | 4480 | static EMACS_INT |
| 4486 | string_buffer_position (struct window *w, Lisp_Object string, EMACS_INT around_charpos) | 4481 | string_buffer_position (Lisp_Object string, EMACS_INT around_charpos) |
| 4487 | { | 4482 | { |
| 4488 | const int MAX_DISTANCE = 1000; | 4483 | const int MAX_DISTANCE = 1000; |
| 4489 | EMACS_INT found = string_buffer_position_lim (w, string, around_charpos, | 4484 | EMACS_INT found = string_buffer_position_lim (string, around_charpos, |
| 4490 | around_charpos + MAX_DISTANCE, | 4485 | around_charpos + MAX_DISTANCE, |
| 4491 | 0); | 4486 | 0); |
| 4492 | 4487 | ||
| 4493 | if (!found) | 4488 | if (!found) |
| 4494 | found = string_buffer_position_lim (w, string, around_charpos, | 4489 | found = string_buffer_position_lim (string, around_charpos, |
| 4495 | around_charpos - MAX_DISTANCE, 1); | 4490 | around_charpos - MAX_DISTANCE, 1); |
| 4496 | return found; | 4491 | return found; |
| 4497 | } | 4492 | } |
| @@ -12731,7 +12726,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 12731 | EMACS_INT tem; | 12726 | EMACS_INT tem; |
| 12732 | 12727 | ||
| 12733 | str = glyph->object; | 12728 | str = glyph->object; |
| 12734 | tem = string_buffer_position_lim (w, str, pos, pos_after, 0); | 12729 | tem = string_buffer_position_lim (str, pos, pos_after, 0); |
| 12735 | if (tem == 0 /* from overlay */ | 12730 | if (tem == 0 /* from overlay */ |
| 12736 | || pos <= tem) | 12731 | || pos <= tem) |
| 12737 | { | 12732 | { |
| @@ -13457,7 +13452,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13457 | && row < w->current_matrix->rows | 13452 | && row < w->current_matrix->rows |
| 13458 | + w->current_matrix->nrows - 1 | 13453 | + w->current_matrix->nrows - 1 |
| 13459 | && MATRIX_ROW_START_CHARPOS (row+1) == PT | 13454 | && MATRIX_ROW_START_CHARPOS (row+1) == PT |
| 13460 | && !cursor_row_p (w, row)) | 13455 | && !cursor_row_p (row)) |
| 13461 | ++row; | 13456 | ++row; |
| 13462 | 13457 | ||
| 13463 | /* If within the scroll margin, scroll. Note that | 13458 | /* If within the scroll margin, scroll. Note that |
| @@ -13509,7 +13504,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13509 | skip forward over overlay strings. */ | 13504 | skip forward over overlay strings. */ |
| 13510 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y | 13505 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y |
| 13511 | && MATRIX_ROW_END_CHARPOS (row) == PT | 13506 | && MATRIX_ROW_END_CHARPOS (row) == PT |
| 13512 | && !cursor_row_p (w, row)) | 13507 | && !cursor_row_p (row)) |
| 13513 | ++row; | 13508 | ++row; |
| 13514 | 13509 | ||
| 13515 | /* If within the scroll margin, scroll. */ | 13510 | /* If within the scroll margin, scroll. */ |
| @@ -13605,7 +13600,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13605 | { | 13600 | { |
| 13606 | if (MATRIX_ROW_START_CHARPOS (row) <= PT | 13601 | if (MATRIX_ROW_START_CHARPOS (row) <= PT |
| 13607 | && PT <= MATRIX_ROW_END_CHARPOS (row) | 13602 | && PT <= MATRIX_ROW_END_CHARPOS (row) |
| 13608 | && cursor_row_p (w, row)) | 13603 | && cursor_row_p (row)) |
| 13609 | rv |= set_cursor_from_row (w, row, w->current_matrix, | 13604 | rv |= set_cursor_from_row (w, row, w->current_matrix, |
| 13610 | 0, 0, 0, 0); | 13605 | 0, 0, 0, 0); |
| 13611 | /* As soon as we've found the first suitable row | 13606 | /* As soon as we've found the first suitable row |
| @@ -13644,7 +13639,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13644 | } | 13639 | } |
| 13645 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y | 13640 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y |
| 13646 | && MATRIX_ROW_START_CHARPOS (row) == PT | 13641 | && MATRIX_ROW_START_CHARPOS (row) == PT |
| 13647 | && cursor_row_p (w, row)); | 13642 | && cursor_row_p (row)); |
| 13648 | } | 13643 | } |
| 13649 | } | 13644 | } |
| 13650 | } | 13645 | } |
| @@ -16971,11 +16966,11 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) | |||
| 16971 | } | 16966 | } |
| 16972 | 16967 | ||
| 16973 | 16968 | ||
| 16974 | /* Value is non-zero if glyph row ROW in window W should be | 16969 | /* Value is non-zero if glyph row ROW should be |
| 16975 | used to hold the cursor. */ | 16970 | used to hold the cursor. */ |
| 16976 | 16971 | ||
| 16977 | static int | 16972 | static int |
| 16978 | cursor_row_p (struct window *w, struct glyph_row *row) | 16973 | cursor_row_p (struct glyph_row *row) |
| 16979 | { | 16974 | { |
| 16980 | int result = 1; | 16975 | int result = 1; |
| 16981 | 16976 | ||
| @@ -17888,7 +17883,7 @@ display_line (struct it *it) | |||
| 17888 | && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p)) | 17883 | && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p)) |
| 17889 | && PT >= MATRIX_ROW_START_CHARPOS (row) | 17884 | && PT >= MATRIX_ROW_START_CHARPOS (row) |
| 17890 | && PT <= MATRIX_ROW_END_CHARPOS (row) | 17885 | && PT <= MATRIX_ROW_END_CHARPOS (row) |
| 17891 | && cursor_row_p (it->w, row)) | 17886 | && cursor_row_p (row)) |
| 17892 | set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); | 17887 | set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); |
| 17893 | 17888 | ||
| 17894 | /* Highlight trailing whitespace. */ | 17889 | /* Highlight trailing whitespace. */ |
| @@ -18540,7 +18535,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 18540 | charpos = (STRING_MULTIBYTE (elt) | 18535 | charpos = (STRING_MULTIBYTE (elt) |
| 18541 | ? string_byte_to_char (elt, bytepos) | 18536 | ? string_byte_to_char (elt, bytepos) |
| 18542 | : bytepos); | 18537 | : bytepos); |
| 18543 | spec = decode_mode_spec (it->w, c, field, prec, &string); | 18538 | spec = decode_mode_spec (it->w, c, field, &string); |
| 18544 | multibyte = STRINGP (string) && STRING_MULTIBYTE (string); | 18539 | multibyte = STRINGP (string) && STRING_MULTIBYTE (string); |
| 18545 | 18540 | ||
| 18546 | switch (mode_line_target) | 18541 | switch (mode_line_target) |
| @@ -19211,9 +19206,8 @@ decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_ | |||
| 19211 | } | 19206 | } |
| 19212 | 19207 | ||
| 19213 | /* Return a string for the output of a mode line %-spec for window W, | 19208 | /* Return a string for the output of a mode line %-spec for window W, |
| 19214 | generated by character C. PRECISION >= 0 means don't return a | 19209 | generated by character C. FIELD_WIDTH > 0 means pad the string |
| 19215 | string longer than that value. FIELD_WIDTH > 0 means pad the | 19210 | returned with spaces to that value. Return a Lisp string in |
| 19216 | string returned with spaces to that value. Return a Lisp string in | ||
| 19217 | *STRING if the resulting string is taken from that Lisp string. | 19211 | *STRING if the resulting string is taken from that Lisp string. |
| 19218 | 19212 | ||
| 19219 | Note we operate on the current buffer for most purposes, | 19213 | Note we operate on the current buffer for most purposes, |
| @@ -19223,7 +19217,7 @@ static char lots_of_dashes[] = "------------------------------------------------ | |||
| 19223 | 19217 | ||
| 19224 | static const char * | 19218 | static const char * |
| 19225 | decode_mode_spec (struct window *w, register int c, int field_width, | 19219 | decode_mode_spec (struct window *w, register int c, int field_width, |
| 19226 | int precision, Lisp_Object *string) | 19220 | Lisp_Object *string) |
| 19227 | { | 19221 | { |
| 19228 | Lisp_Object obj; | 19222 | Lisp_Object obj; |
| 19229 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 19223 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| @@ -24324,7 +24318,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24324 | END_CHARPOS, or if they come from an overlay. */ | 24318 | END_CHARPOS, or if they come from an overlay. */ |
| 24325 | if (EQ (glyph->object, before_string)) | 24319 | if (EQ (glyph->object, before_string)) |
| 24326 | { | 24320 | { |
| 24327 | pos = string_buffer_position (w, before_string, | 24321 | pos = string_buffer_position (before_string, |
| 24328 | start_charpos); | 24322 | start_charpos); |
| 24329 | /* If pos == 0, it means before_string came from an | 24323 | /* If pos == 0, it means before_string came from an |
| 24330 | overlay, not from a buffer position. */ | 24324 | overlay, not from a buffer position. */ |
| @@ -24333,7 +24327,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24333 | } | 24327 | } |
| 24334 | else if (EQ (glyph->object, after_string)) | 24328 | else if (EQ (glyph->object, after_string)) |
| 24335 | { | 24329 | { |
| 24336 | pos = string_buffer_position (w, after_string, end_charpos); | 24330 | pos = string_buffer_position (after_string, end_charpos); |
| 24337 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24331 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24338 | break; | 24332 | break; |
| 24339 | } | 24333 | } |
| @@ -24375,7 +24369,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24375 | END_CHARPOS, or if they come from an overlay. */ | 24369 | END_CHARPOS, or if they come from an overlay. */ |
| 24376 | if (EQ (glyph->object, before_string)) | 24370 | if (EQ (glyph->object, before_string)) |
| 24377 | { | 24371 | { |
| 24378 | pos = string_buffer_position (w, before_string, start_charpos); | 24372 | pos = string_buffer_position (before_string, start_charpos); |
| 24379 | /* If pos == 0, it means before_string came from an | 24373 | /* If pos == 0, it means before_string came from an |
| 24380 | overlay, not from a buffer position. */ | 24374 | overlay, not from a buffer position. */ |
| 24381 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24375 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| @@ -24383,7 +24377,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24383 | } | 24377 | } |
| 24384 | else if (EQ (glyph->object, after_string)) | 24378 | else if (EQ (glyph->object, after_string)) |
| 24385 | { | 24379 | { |
| 24386 | pos = string_buffer_position (w, after_string, end_charpos); | 24380 | pos = string_buffer_position (after_string, end_charpos); |
| 24387 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24381 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24388 | break; | 24382 | break; |
| 24389 | } | 24383 | } |
| @@ -24441,13 +24435,13 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24441 | END_CHARPOS, or if they come from an overlay. */ | 24435 | END_CHARPOS, or if they come from an overlay. */ |
| 24442 | if (EQ (end->object, before_string)) | 24436 | if (EQ (end->object, before_string)) |
| 24443 | { | 24437 | { |
| 24444 | pos = string_buffer_position (w, before_string, start_charpos); | 24438 | pos = string_buffer_position (before_string, start_charpos); |
| 24445 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24439 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24446 | break; | 24440 | break; |
| 24447 | } | 24441 | } |
| 24448 | else if (EQ (end->object, after_string)) | 24442 | else if (EQ (end->object, after_string)) |
| 24449 | { | 24443 | { |
| 24450 | pos = string_buffer_position (w, after_string, end_charpos); | 24444 | pos = string_buffer_position (after_string, end_charpos); |
| 24451 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24445 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24452 | break; | 24446 | break; |
| 24453 | } | 24447 | } |
| @@ -24491,13 +24485,13 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24491 | END_CHARPOS, or if they come from an overlay. */ | 24485 | END_CHARPOS, or if they come from an overlay. */ |
| 24492 | if (EQ (end->object, before_string)) | 24486 | if (EQ (end->object, before_string)) |
| 24493 | { | 24487 | { |
| 24494 | pos = string_buffer_position (w, before_string, start_charpos); | 24488 | pos = string_buffer_position (before_string, start_charpos); |
| 24495 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24489 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24496 | break; | 24490 | break; |
| 24497 | } | 24491 | } |
| 24498 | else if (EQ (end->object, after_string)) | 24492 | else if (EQ (end->object, after_string)) |
| 24499 | { | 24493 | { |
| 24500 | pos = string_buffer_position (w, after_string, end_charpos); | 24494 | pos = string_buffer_position (after_string, end_charpos); |
| 24501 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24495 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24502 | break; | 24496 | break; |
| 24503 | } | 24497 | } |
| @@ -25481,7 +25475,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25481 | check if the text under it has one. */ | 25475 | check if the text under it has one. */ |
| 25482 | struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); | 25476 | struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); |
| 25483 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25477 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25484 | pos = string_buffer_position (w, object, start); | 25478 | pos = string_buffer_position (object, start); |
| 25485 | if (pos > 0) | 25479 | if (pos > 0) |
| 25486 | { | 25480 | { |
| 25487 | mouse_face = get_char_property_and_overlay | 25481 | mouse_face = get_char_property_and_overlay |
| @@ -25591,7 +25585,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25591 | struct glyph_row *r | 25585 | struct glyph_row *r |
| 25592 | = MATRIX_ROW (w->current_matrix, vpos); | 25586 | = MATRIX_ROW (w->current_matrix, vpos); |
| 25593 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25587 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25594 | EMACS_INT p = string_buffer_position (w, obj, start); | 25588 | EMACS_INT p = string_buffer_position (obj, start); |
| 25595 | if (p > 0) | 25589 | if (p > 0) |
| 25596 | { | 25590 | { |
| 25597 | help = Fget_char_property (make_number (p), | 25591 | help = Fget_char_property (make_number (p), |
| @@ -25647,7 +25641,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25647 | struct glyph_row *r | 25641 | struct glyph_row *r |
| 25648 | = MATRIX_ROW (w->current_matrix, vpos); | 25642 | = MATRIX_ROW (w->current_matrix, vpos); |
| 25649 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25643 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25650 | EMACS_INT p = string_buffer_position (w, obj, start); | 25644 | EMACS_INT p = string_buffer_position (obj, start); |
| 25651 | if (p > 0) | 25645 | if (p > 0) |
| 25652 | pointer = Fget_char_property (make_number (p), | 25646 | pointer = Fget_char_property (make_number (p), |
| 25653 | Qpointer, w->buffer); | 25647 | Qpointer, w->buffer); |