aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-30 19:44:31 +0000
committerRichard M. Stallman1997-07-30 19:44:31 +0000
commit916848d8bde480a741d745003e8ea4ad55026538 (patch)
treeb6bd9266af9b8445a7826a52539f68511682b1eb /src
parent4f5074c108b0c4d14a68fe0760492a73b67b4891 (diff)
downloademacs-916848d8bde480a741d745003e8ea4ad55026538.tar.gz
emacs-916848d8bde480a741d745003e8ea4ad55026538.zip
(redisplay_window): Fix previous change.
(decode_mode_spec_coding): If multibyte chars disabled. display only the eol flag.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index d0fa8a16e39..c0b94ccaf8b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1838,21 +1838,23 @@ redisplay_window (window, just_this_one, preserve_echo_area)
1838 && !EQ (window, minibuf_window)) 1838 && !EQ (window, minibuf_window))
1839 { 1839 {
1840 int this_scroll_margin = scroll_margin; 1840 int this_scroll_margin = scroll_margin;
1841 int last_point_y = w->last_point_y - XINT (w->top);
1842 int last_point_x = (w->last_point_x
1843 + (hscroll ? 1 - hscroll : 0)
1844 - WINDOW_LEFT_MARGIN (w));
1841 1845
1842 /* Find where PT is located now on the frame. */ 1846 /* Find where PT is located now on the frame. */
1843 if (PT == w->last_point) 1847 /* Check just_this_one as a way of verifying that the
1848 window edges have not changed. */
1849 if (PT == w->last_point && just_this_one)
1844 { 1850 {
1845 pos.hpos = (w->last_point_x 1851 pos.hpos = last_point_x;
1846 + (hscroll ? 1 - hscroll : 0) 1852 pos.vpos = last_point_y;
1847 - WINDOW_LEFT_MARGIN (w));
1848 pos.vpos = w->last_point_y;
1849 pos.bufpos = PT; 1853 pos.bufpos = PT;
1850 } 1854 }
1851 else if (PT > w->last_point) 1855 else if (PT > w->last_point && w->last_point > startp && just_this_one)
1852 { 1856 {
1853 pos = *compute_motion (w->last_point, w->last_point_y, 1857 pos = *compute_motion (w->last_point, last_point_y, last_point_x, 0,
1854 w->last_point_x + (hscroll ? 1 - hscroll : 0),
1855 0,
1856 PT, height, 1858 PT, height,
1857 /* BUG FIX: See the comment of 1859 /* BUG FIX: See the comment of
1858 Fpos_visible_in_window_p (window.c). */ 1860 Fpos_visible_in_window_p (window.c). */
@@ -4105,12 +4107,14 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4105 int eol_flag; 4107 int eol_flag;
4106{ 4108{
4107 Lisp_Object val; 4109 Lisp_Object val;
4110 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
4108 4111
4109 val = coding_system; 4112 val = coding_system;
4110 4113
4111 if (NILP (val)) /* Not yet decided. */ 4114 if (NILP (val)) /* Not yet decided. */
4112 { 4115 {
4113 *buf++ = '-'; 4116 if (multibyte)
4117 *buf++ = '-';
4114 if (eol_flag) 4118 if (eol_flag)
4115 *buf++ = eol_mnemonic_undecided; 4119 *buf++ = eol_mnemonic_undecided;
4116 /* Don't mention EOL conversion if it isn't decided. */ 4120 /* Don't mention EOL conversion if it isn't decided. */
@@ -4128,7 +4132,9 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4128 eolvalue = Fget (val, Qeol_type); 4132 eolvalue = Fget (val, Qeol_type);
4129 } 4133 }
4130 4134
4131 *buf++ = XFASTINT (XVECTOR (val)->contents[1]); 4135 if (multibyte)
4136 *buf++ = XFASTINT (XVECTOR (val)->contents[1]);
4137
4132 if (eol_flag) 4138 if (eol_flag)
4133 { 4139 {
4134 /* The EOL conversion we are using. */ 4140 /* The EOL conversion we are using. */