diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/eval.c | 11 | ||||
| -rw-r--r-- | src/xdisp.c | 21 |
3 files changed, 40 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3e6094bbca0..282d422beb1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * eval.c (Fdefvar, Fdefconst): Doc fixes. | ||
| 4 | |||
| 5 | 2004-07-27 Kim F. Storm <storm@cua.dk> | ||
| 6 | |||
| 7 | * xdisp.c (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after | ||
| 8 | we have ensured that the glyph fits on the current line (or returned | ||
| 9 | MOVE_LINE_CONTINUED otherwise). | ||
| 10 | |||
| 1 | 2004-07-26 Kim F. Storm <storm@cua.dk> | 11 | 2004-07-26 Kim F. Storm <storm@cua.dk> |
| 2 | 12 | ||
| 3 | * xdisp.c (move_it_in_display_line_to): If overflow-newline-into-fringe | 13 | * xdisp.c (move_it_in_display_line_to): If overflow-newline-into-fringe |
diff --git a/src/eval.c b/src/eval.c index f28105ac987..ee74215b2ee 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -742,6 +742,13 @@ If DOCSTRING starts with *, this variable is identified as a user option. | |||
| 742 | This means that M-x set-variable recognizes it. | 742 | This means that M-x set-variable recognizes it. |
| 743 | See also `user-variable-p'. | 743 | See also `user-variable-p'. |
| 744 | If INITVALUE is missing, SYMBOL's value is not set. | 744 | If INITVALUE is missing, SYMBOL's value is not set. |
| 745 | |||
| 746 | If SYMBOL has a local binding, then this form affects the local | ||
| 747 | binding. This is usually not what you want. Thus, if you need to | ||
| 748 | load a file defining variables, with this form or with `defconst' or | ||
| 749 | `defcustom', you should always load that file _outside_ any bindings | ||
| 750 | for these variables. \(`defconst' and `defcustom' behave similarly in | ||
| 751 | this respect.) | ||
| 745 | usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | 752 | usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) |
| 746 | (args) | 753 | (args) |
| 747 | Lisp_Object args; | 754 | Lisp_Object args; |
| @@ -784,6 +791,10 @@ Always sets the value of SYMBOL to the result of evalling INITVALUE. | |||
| 784 | If SYMBOL is buffer-local, its default value is what is set; | 791 | If SYMBOL is buffer-local, its default value is what is set; |
| 785 | buffer-local values are not affected. | 792 | buffer-local values are not affected. |
| 786 | DOCSTRING is optional. | 793 | DOCSTRING is optional. |
| 794 | |||
| 795 | If SYMBOL has a local binding, then this form sets the local binding's | ||
| 796 | value. However, you should normally not make local bindings for | ||
| 797 | variables defined with this form. | ||
| 787 | usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) | 798 | usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) |
| 788 | (args) | 799 | (args) |
| 789 | Lisp_Object args; | 800 | Lisp_Object args; |
diff --git a/src/xdisp.c b/src/xdisp.c index 818e2c1a48a..70854b7d269 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5645,9 +5645,13 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5645 | { | 5645 | { |
| 5646 | int x, i, ascent = 0, descent = 0; | 5646 | int x, i, ascent = 0, descent = 0; |
| 5647 | 5647 | ||
| 5648 | /* Stop when ZV or TO_CHARPOS reached. */ | 5648 | /* Stop when ZV reached. |
| 5649 | We used to stop here when TO_CHARPOS reached as well, but that is | ||
| 5650 | too soon if this glyph does not fit on this line. So we handle it | ||
| 5651 | explicitly below. */ | ||
| 5649 | if (!get_next_display_element (it) | 5652 | if (!get_next_display_element (it) |
| 5650 | || BUFFER_POS_REACHED_P ()) | 5653 | || (it->truncate_lines_p |
| 5654 | && BUFFER_POS_REACHED_P ())) | ||
| 5651 | { | 5655 | { |
| 5652 | result = MOVE_POS_MATCH_OR_ZV; | 5656 | result = MOVE_POS_MATCH_OR_ZV; |
| 5653 | break; | 5657 | break; |
| @@ -5707,6 +5711,8 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5707 | /* We want to leave anything reaching TO_X to the caller. */ | 5711 | /* We want to leave anything reaching TO_X to the caller. */ |
| 5708 | if ((op & MOVE_TO_X) && new_x > to_x) | 5712 | if ((op & MOVE_TO_X) && new_x > to_x) |
| 5709 | { | 5713 | { |
| 5714 | if (BUFFER_POS_REACHED_P ()) | ||
| 5715 | goto buffer_pos_reached; | ||
| 5710 | it->current_x = x; | 5716 | it->current_x = x; |
| 5711 | result = MOVE_X_REACHED; | 5717 | result = MOVE_X_REACHED; |
| 5712 | break; | 5718 | break; |
| @@ -5768,6 +5774,8 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5768 | result = MOVE_LINE_CONTINUED; | 5774 | result = MOVE_LINE_CONTINUED; |
| 5769 | break; | 5775 | break; |
| 5770 | } | 5776 | } |
| 5777 | else if (BUFFER_POS_REACHED_P ()) | ||
| 5778 | goto buffer_pos_reached; | ||
| 5771 | else if (new_x > it->first_visible_x) | 5779 | else if (new_x > it->first_visible_x) |
| 5772 | { | 5780 | { |
| 5773 | /* Glyph is visible. Increment number of glyphs that | 5781 | /* Glyph is visible. Increment number of glyphs that |
| @@ -5784,6 +5792,15 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5784 | if (result != MOVE_UNDEFINED) | 5792 | if (result != MOVE_UNDEFINED) |
| 5785 | break; | 5793 | break; |
| 5786 | } | 5794 | } |
| 5795 | else if (BUFFER_POS_REACHED_P ()) | ||
| 5796 | { | ||
| 5797 | buffer_pos_reached: | ||
| 5798 | it->current_x = x; | ||
| 5799 | it->max_ascent = ascent; | ||
| 5800 | it->max_descent = descent; | ||
| 5801 | result = MOVE_POS_MATCH_OR_ZV; | ||
| 5802 | break; | ||
| 5803 | } | ||
| 5787 | else if ((op & MOVE_TO_X) && it->current_x >= to_x) | 5804 | else if ((op & MOVE_TO_X) && it->current_x >= to_x) |
| 5788 | { | 5805 | { |
| 5789 | /* Stop when TO_X specified and reached. This check is | 5806 | /* Stop when TO_X specified and reached. This check is |