diff options
| author | Eli Zaretskii | 2013-03-30 09:34:05 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-30 09:34:05 +0300 |
| commit | 627d532608d03416763595cb5077dacb1238f948 (patch) | |
| tree | 9bbae3791997f19b1a93645131deb1027d77dd64 /src | |
| parent | a433a2a74329d1125b5976bb5c4f1ea2d3ab7a84 (diff) | |
| parent | 668284362c4189f6de2c617902f73725a59adfaf (diff) | |
| download | emacs-627d532608d03416763595cb5077dacb1238f948.tar.gz emacs-627d532608d03416763595cb5077dacb1238f948.zip | |
Merge from trunk.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/indent.c | 11 | ||||
| -rw-r--r-- | src/keyboard.c | 11 | ||||
| -rw-r--r-- | src/lisp.h | 113 | ||||
| -rw-r--r-- | src/makefile.w32-in | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 4 |
6 files changed, 80 insertions, 84 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 77338e6c46f..14e21e402d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * indent.c (current_column_bol_cache): Remove leftover which is not | ||
| 4 | used in Fmove_to_column any more. | ||
| 5 | (current_column, scan_for_column): Adjust users. | ||
| 6 | * keyboard.c (last_point_position_buffer, last_point_position_window): | ||
| 7 | Remove leftovers which are not used for recording undo any more. | ||
| 8 | (command_loop_1, syms_of_keyboard): Adjust users. | ||
| 9 | * xdisp.c (last_max_ascent): Remove leftover which is not used in | ||
| 10 | redisplay_window any more. | ||
| 11 | (move_it_to): Adjust user. | ||
| 12 | |||
| 13 | 2013-03-29 Juanma Barranquero <lekktu@gmail.com> | ||
| 14 | |||
| 15 | * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)): | ||
| 16 | Update dependencies. | ||
| 17 | |||
| 18 | 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 19 | |||
| 20 | * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER) | ||
| 21 | (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid | ||
| 22 | forward references. | ||
| 23 | |||
| 1 | 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru> | 24 | 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 25 | ||
| 3 | * window.h (struct window): Replace hchild, vchild and buffer slots | 26 | * window.h (struct window): Replace hchild, vchild and buffer slots |
diff --git a/src/indent.c b/src/indent.c index 1493e1d5ee5..345dfaa9ce3 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -56,11 +56,6 @@ static EMACS_INT last_known_column_modified; | |||
| 56 | static ptrdiff_t current_column_1 (void); | 56 | static ptrdiff_t current_column_1 (void); |
| 57 | static ptrdiff_t position_indentation (ptrdiff_t); | 57 | static ptrdiff_t position_indentation (ptrdiff_t); |
| 58 | 58 | ||
| 59 | /* Cache of beginning of line found by the last call of | ||
| 60 | current_column. */ | ||
| 61 | |||
| 62 | static ptrdiff_t current_column_bol_cache; | ||
| 63 | |||
| 64 | /* Get the display table to use for the current buffer. */ | 59 | /* Get the display table to use for the current buffer. */ |
| 65 | 60 | ||
| 66 | struct Lisp_Char_Table * | 61 | struct Lisp_Char_Table * |
| @@ -439,11 +434,6 @@ current_column (void) | |||
| 439 | col += post_tab; | 434 | col += post_tab; |
| 440 | } | 435 | } |
| 441 | 436 | ||
| 442 | if (ptr == BEGV_ADDR) | ||
| 443 | current_column_bol_cache = BEGV; | ||
| 444 | else | ||
| 445 | current_column_bol_cache = BYTE_TO_CHAR (PTR_BYTE_POS (ptr)); | ||
| 446 | |||
| 447 | last_known_column = col; | 437 | last_known_column = col; |
| 448 | last_known_column_point = PT; | 438 | last_known_column_point = PT; |
| 449 | last_known_column_modified = MODIFF; | 439 | last_known_column_modified = MODIFF; |
| @@ -525,7 +515,6 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol) | |||
| 525 | { | 515 | { |
| 526 | ptrdiff_t opoint = PT, opoint_byte = PT_BYTE; | 516 | ptrdiff_t opoint = PT, opoint_byte = PT_BYTE; |
| 527 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); | 517 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); |
| 528 | current_column_bol_cache = PT; | ||
| 529 | scan = PT, scan_byte = PT_BYTE; | 518 | scan = PT, scan_byte = PT_BYTE; |
| 530 | SET_PT_BOTH (opoint, opoint_byte); | 519 | SET_PT_BOTH (opoint, opoint_byte); |
| 531 | next_boundary = scan; | 520 | next_boundary = scan; |
diff --git a/src/keyboard.c b/src/keyboard.c index 5b2eb8c7cd2..beba3025887 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -210,12 +210,6 @@ static EMACS_INT last_auto_save; | |||
| 210 | /* The value of point when the last command was started. */ | 210 | /* The value of point when the last command was started. */ |
| 211 | static ptrdiff_t last_point_position; | 211 | static ptrdiff_t last_point_position; |
| 212 | 212 | ||
| 213 | /* The buffer that was current when the last command was started. */ | ||
| 214 | static Lisp_Object last_point_position_buffer; | ||
| 215 | |||
| 216 | /* The window that was selected when the last command was started. */ | ||
| 217 | static Lisp_Object last_point_position_window; | ||
| 218 | |||
| 219 | /* The frame in which the last input event occurred, or Qmacro if the | 213 | /* The frame in which the last input event occurred, or Qmacro if the |
| 220 | last event came from a macro. We use this to determine when to | 214 | last event came from a macro. We use this to determine when to |
| 221 | generate switch-frame events. This may be cleared by functions | 215 | generate switch-frame events. This may be cleared by functions |
| @@ -1512,8 +1506,6 @@ command_loop_1 (void) | |||
| 1512 | prev_buffer = current_buffer; | 1506 | prev_buffer = current_buffer; |
| 1513 | prev_modiff = MODIFF; | 1507 | prev_modiff = MODIFF; |
| 1514 | last_point_position = PT; | 1508 | last_point_position = PT; |
| 1515 | last_point_position_window = selected_window; | ||
| 1516 | XSETBUFFER (last_point_position_buffer, prev_buffer); | ||
| 1517 | 1509 | ||
| 1518 | /* By default, we adjust point to a boundary of a region that | 1510 | /* By default, we adjust point to a boundary of a region that |
| 1519 | has such a property that should be treated intangible | 1511 | has such a property that should be treated intangible |
| @@ -11047,9 +11039,6 @@ syms_of_keyboard (void) | |||
| 11047 | Fset (Qinput_method_exit_on_first_char, Qnil); | 11039 | Fset (Qinput_method_exit_on_first_char, Qnil); |
| 11048 | Fset (Qinput_method_use_echo_area, Qnil); | 11040 | Fset (Qinput_method_use_echo_area, Qnil); |
| 11049 | 11041 | ||
| 11050 | last_point_position_buffer = Qnil; | ||
| 11051 | last_point_position_window = Qnil; | ||
| 11052 | |||
| 11053 | { | 11042 | { |
| 11054 | int i; | 11043 | int i; |
| 11055 | int len = sizeof (head_table) / sizeof (head_table[0]); | 11044 | int len = sizeof (head_table) / sizeof (head_table[0]); |
diff --git a/src/lisp.h b/src/lisp.h index 897addc90c1..4481a2e3373 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -552,11 +552,6 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) | |||
| 552 | } | 552 | } |
| 553 | 553 | ||
| 554 | 554 | ||
| 555 | /* Forward declarations. */ | ||
| 556 | |||
| 557 | LISP_INLINE bool SAVE_VALUEP (Lisp_Object); | ||
| 558 | LISP_INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); | ||
| 559 | |||
| 560 | /* Extract a value or address from a Lisp_Object. */ | 555 | /* Extract a value or address from a Lisp_Object. */ |
| 561 | 556 | ||
| 562 | #define XCONS(a) (eassert (CONSP (a)), \ | 557 | #define XCONS(a) (eassert (CONSP (a)), \ |
| @@ -1487,53 +1482,6 @@ struct Lisp_Save_Value | |||
| 1487 | } data[SAVE_VALUE_SLOTS]; | 1482 | } data[SAVE_VALUE_SLOTS]; |
| 1488 | }; | 1483 | }; |
| 1489 | 1484 | ||
| 1490 | /* Return the type of V's Nth saved value. */ | ||
| 1491 | LISP_INLINE int | ||
| 1492 | save_type (struct Lisp_Save_Value *v, int n) | ||
| 1493 | { | ||
| 1494 | eassert (0 <= n && n < SAVE_VALUE_SLOTS); | ||
| 1495 | return (v->save_type >> (SAVE_SLOT_BITS * n) & ((1 << SAVE_SLOT_BITS) - 1)); | ||
| 1496 | } | ||
| 1497 | |||
| 1498 | /* Get and set the Nth saved pointer. */ | ||
| 1499 | |||
| 1500 | LISP_INLINE void * | ||
| 1501 | XSAVE_POINTER (Lisp_Object obj, int n) | ||
| 1502 | { | ||
| 1503 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER); | ||
| 1504 | return XSAVE_VALUE (obj)->data[n].pointer;; | ||
| 1505 | } | ||
| 1506 | LISP_INLINE void | ||
| 1507 | set_save_pointer (Lisp_Object obj, int n, void *val) | ||
| 1508 | { | ||
| 1509 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER); | ||
| 1510 | XSAVE_VALUE (obj)->data[n].pointer = val; | ||
| 1511 | } | ||
| 1512 | |||
| 1513 | /* Likewise for the saved integer. */ | ||
| 1514 | |||
| 1515 | LISP_INLINE ptrdiff_t | ||
| 1516 | XSAVE_INTEGER (Lisp_Object obj, int n) | ||
| 1517 | { | ||
| 1518 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER); | ||
| 1519 | return XSAVE_VALUE (obj)->data[n].integer; | ||
| 1520 | } | ||
| 1521 | LISP_INLINE void | ||
| 1522 | set_save_integer (Lisp_Object obj, int n, ptrdiff_t val) | ||
| 1523 | { | ||
| 1524 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER); | ||
| 1525 | XSAVE_VALUE (obj)->data[n].integer = val; | ||
| 1526 | } | ||
| 1527 | |||
| 1528 | /* Extract Nth saved object. */ | ||
| 1529 | |||
| 1530 | LISP_INLINE Lisp_Object | ||
| 1531 | XSAVE_OBJECT (Lisp_Object obj, int n) | ||
| 1532 | { | ||
| 1533 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_OBJECT); | ||
| 1534 | return XSAVE_VALUE (obj)->data[n].object; | ||
| 1535 | } | ||
| 1536 | |||
| 1537 | /* A miscellaneous object, when it's on the free list. */ | 1485 | /* A miscellaneous object, when it's on the free list. */ |
| 1538 | struct Lisp_Free | 1486 | struct Lisp_Free |
| 1539 | { | 1487 | { |
| @@ -1555,13 +1503,6 @@ union Lisp_Misc | |||
| 1555 | struct Lisp_Save_Value u_save_value; | 1503 | struct Lisp_Save_Value u_save_value; |
| 1556 | }; | 1504 | }; |
| 1557 | 1505 | ||
| 1558 | LISP_INLINE struct Lisp_Save_Value * | ||
| 1559 | XSAVE_VALUE (Lisp_Object a) | ||
| 1560 | { | ||
| 1561 | eassert (SAVE_VALUEP (a)); | ||
| 1562 | return & XMISC (a)->u_save_value; | ||
| 1563 | } | ||
| 1564 | |||
| 1565 | /* Forwarding pointer to an int variable. | 1506 | /* Forwarding pointer to an int variable. |
| 1566 | This is allowed only in the value cell of a symbol, | 1507 | This is allowed only in the value cell of a symbol, |
| 1567 | and it means that the symbol's value really lives in the | 1508 | and it means that the symbol's value really lives in the |
| @@ -1854,6 +1795,60 @@ SAVE_VALUEP (Lisp_Object x) | |||
| 1854 | return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value; | 1795 | return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value; |
| 1855 | } | 1796 | } |
| 1856 | 1797 | ||
| 1798 | LISP_INLINE struct Lisp_Save_Value * | ||
| 1799 | XSAVE_VALUE (Lisp_Object a) | ||
| 1800 | { | ||
| 1801 | eassert (SAVE_VALUEP (a)); | ||
| 1802 | return & XMISC (a)->u_save_value; | ||
| 1803 | } | ||
| 1804 | |||
| 1805 | /* Return the type of V's Nth saved value. */ | ||
| 1806 | LISP_INLINE int | ||
| 1807 | save_type (struct Lisp_Save_Value *v, int n) | ||
| 1808 | { | ||
| 1809 | eassert (0 <= n && n < SAVE_VALUE_SLOTS); | ||
| 1810 | return (v->save_type >> (SAVE_SLOT_BITS * n) & ((1 << SAVE_SLOT_BITS) - 1)); | ||
| 1811 | } | ||
| 1812 | |||
| 1813 | /* Get and set the Nth saved pointer. */ | ||
| 1814 | |||
| 1815 | LISP_INLINE void * | ||
| 1816 | XSAVE_POINTER (Lisp_Object obj, int n) | ||
| 1817 | { | ||
| 1818 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER); | ||
| 1819 | return XSAVE_VALUE (obj)->data[n].pointer;; | ||
| 1820 | } | ||
| 1821 | LISP_INLINE void | ||
| 1822 | set_save_pointer (Lisp_Object obj, int n, void *val) | ||
| 1823 | { | ||
| 1824 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER); | ||
| 1825 | XSAVE_VALUE (obj)->data[n].pointer = val; | ||
| 1826 | } | ||
| 1827 | |||
| 1828 | /* Likewise for the saved integer. */ | ||
| 1829 | |||
| 1830 | LISP_INLINE ptrdiff_t | ||
| 1831 | XSAVE_INTEGER (Lisp_Object obj, int n) | ||
| 1832 | { | ||
| 1833 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER); | ||
| 1834 | return XSAVE_VALUE (obj)->data[n].integer; | ||
| 1835 | } | ||
| 1836 | LISP_INLINE void | ||
| 1837 | set_save_integer (Lisp_Object obj, int n, ptrdiff_t val) | ||
| 1838 | { | ||
| 1839 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER); | ||
| 1840 | XSAVE_VALUE (obj)->data[n].integer = val; | ||
| 1841 | } | ||
| 1842 | |||
| 1843 | /* Extract Nth saved object. */ | ||
| 1844 | |||
| 1845 | LISP_INLINE Lisp_Object | ||
| 1846 | XSAVE_OBJECT (Lisp_Object obj, int n) | ||
| 1847 | { | ||
| 1848 | eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_OBJECT); | ||
| 1849 | return XSAVE_VALUE (obj)->data[n].object; | ||
| 1850 | } | ||
| 1851 | |||
| 1857 | #define AUTOLOADP(x) (CONSP (x) && EQ (Qautoload, XCAR (x))) | 1852 | #define AUTOLOADP(x) (CONSP (x) && EQ (Qautoload, XCAR (x))) |
| 1858 | 1853 | ||
| 1859 | #define INTFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Int) | 1854 | #define INTFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Int) |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 93f12900dde..aacc258cd11 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -873,6 +873,7 @@ $(BLD)/filelock.$(O) : \ | |||
| 873 | $(CHARACTER_H) \ | 873 | $(CHARACTER_H) \ |
| 874 | $(CODING_H) \ | 874 | $(CODING_H) \ |
| 875 | $(CONFIG_H) \ | 875 | $(CONFIG_H) \ |
| 876 | $(C_CTYPE_H) \ | ||
| 876 | $(LISP_H) \ | 877 | $(LISP_H) \ |
| 877 | $(SYSTIME_H) | 878 | $(SYSTIME_H) |
| 878 | 879 | ||
| @@ -1398,6 +1399,7 @@ $(BLD)/sysdep.$(O) : \ | |||
| 1398 | $(NT_INC)/netdb.h \ | 1399 | $(NT_INC)/netdb.h \ |
| 1399 | $(NT_INC)/pwd.h \ | 1400 | $(NT_INC)/pwd.h \ |
| 1400 | $(NT_INC)/sys/file.h \ | 1401 | $(NT_INC)/sys/file.h \ |
| 1402 | $(NT_INC)/sys/param.h \ | ||
| 1401 | $(NT_INC)/sys/stat.h \ | 1403 | $(NT_INC)/sys/stat.h \ |
| 1402 | $(NT_INC)/unistd.h \ | 1404 | $(NT_INC)/unistd.h \ |
| 1403 | $(GNU_LIB)/execinfo.h \ | 1405 | $(GNU_LIB)/execinfo.h \ |
diff --git a/src/xdisp.c b/src/xdisp.c index 27987c69b19..32c8224cf04 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -580,7 +580,7 @@ static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS]; | |||
| 580 | 580 | ||
| 581 | /* Ascent and height of the last line processed by move_it_to. */ | 581 | /* Ascent and height of the last line processed by move_it_to. */ |
| 582 | 582 | ||
| 583 | static int last_max_ascent, last_height; | 583 | static int last_height; |
| 584 | 584 | ||
| 585 | /* Non-zero if there's a help-echo in the echo area. */ | 585 | /* Non-zero if there's a help-echo in the echo area. */ |
| 586 | 586 | ||
| @@ -8925,7 +8925,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos | |||
| 8925 | it->current_y += it->max_ascent + it->max_descent; | 8925 | it->current_y += it->max_ascent + it->max_descent; |
| 8926 | ++it->vpos; | 8926 | ++it->vpos; |
| 8927 | last_height = it->max_ascent + it->max_descent; | 8927 | last_height = it->max_ascent + it->max_descent; |
| 8928 | last_max_ascent = it->max_ascent; | ||
| 8929 | it->max_ascent = it->max_descent = 0; | 8928 | it->max_ascent = it->max_descent = 0; |
| 8930 | } | 8929 | } |
| 8931 | 8930 | ||
| @@ -8952,7 +8951,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos | |||
| 8952 | it->current_y += it->max_ascent + it->max_descent; | 8951 | it->current_y += it->max_ascent + it->max_descent; |
| 8953 | ++it->vpos; | 8952 | ++it->vpos; |
| 8954 | last_height = it->max_ascent + it->max_descent; | 8953 | last_height = it->max_ascent + it->max_descent; |
| 8955 | last_max_ascent = it->max_ascent; | ||
| 8956 | } | 8954 | } |
| 8957 | 8955 | ||
| 8958 | if (backup_data) | 8956 | if (backup_data) |