diff options
| author | Karoly Lorentey | 2005-02-20 18:47:54 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-02-20 18:47:54 +0000 |
| commit | b5d78df397f8cdcd20f3bcfbed2eb71d522abddd (patch) | |
| tree | cedfc1db69595526c12da068ea7ff5bdf3b806f2 /src | |
| parent | 60c73d2ed638e5d51643c65a0fc6dea618fc72c8 (diff) | |
| parent | eedeacb3074baad8ce752a506f9f435c98e42ff4 (diff) | |
| download | emacs-b5d78df397f8cdcd20f3bcfbed2eb71d522abddd.tar.gz emacs-b5d78df397f8cdcd20f3bcfbed2eb71d522abddd.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 17-26, 107-116)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-107
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-108
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-109
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-110
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-112
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-113
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-114
<no summary provided>
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-115
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-116
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-17
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-18
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-19
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-20
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-21
More work on moving images to etc/images
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-22
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-23
Fix errors with image-file installation
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-24
etc/Makefile.in (install): Put gnus-tut.txt in the right place.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-25
etc/Makefile.in (install, uninstall): Fix installed image dirs.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-26
etc/Makefile.in (install): Create $(etcdir)/images/gnus dir.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-296
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 187 | ||||
| -rw-r--r-- | src/ChangeLog | 37 | ||||
| -rw-r--r-- | src/ChangeLog.5 | 10 | ||||
| -rw-r--r-- | src/alloc.c | 11 | ||||
| -rw-r--r-- | src/xdisp.c | 103 | ||||
| -rw-r--r-- | src/xfaces.c | 2 |
6 files changed, 295 insertions, 55 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 358774f5bec..09c70c9ead8 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -101,6 +101,193 @@ document ppt | |||
| 101 | Print point, beg, end, narrow, and gap for current buffer. | 101 | Print point, beg, end, narrow, and gap for current buffer. |
| 102 | end | 102 | end |
| 103 | 103 | ||
| 104 | # Print out iterator given as first arg | ||
| 105 | define pitx | ||
| 106 | set $it = $arg0 | ||
| 107 | printf "cur=%d", $it->current.pos.charpos | ||
| 108 | if ($it->current.pos.charpos != $it->current.pos.bytepos) | ||
| 109 | printf "[%d]", $it->current.pos.bytepos | ||
| 110 | end | ||
| 111 | printf " start=%d", $it->start.pos.charpos | ||
| 112 | if ($it->start.pos.charpos != $it->start.pos.bytepos) | ||
| 113 | printf "[%d]", $it->start.pos.bytepos | ||
| 114 | end | ||
| 115 | printf " stop=%d ", $it->stop_charpos | ||
| 116 | output $it->what | ||
| 117 | if ($it->what == IT_CHARACTER) | ||
| 118 | if ($it->len == 1 && $it->c >= ' ' && it->c < 255) | ||
| 119 | printf "['%c']", $it->c | ||
| 120 | else | ||
| 121 | printf "[%d,%d]", $it->c, $it->len | ||
| 122 | end | ||
| 123 | end | ||
| 124 | printf " next=" | ||
| 125 | output $it->method | ||
| 126 | printf "\n" | ||
| 127 | printf "vpos=%d hpos=%d", $it->vpos, $it->hpos, | ||
| 128 | printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y | ||
| 129 | printf " x=%d lvx=%d", $it->current_x, $it->last_visible_x | ||
| 130 | printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent | ||
| 131 | printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent | ||
| 132 | printf "\n" | ||
| 133 | end | ||
| 134 | document pitx | ||
| 135 | Pretty print a display iterator. | ||
| 136 | Take one arg, an iterator object or pointer. | ||
| 137 | end | ||
| 138 | |||
| 139 | define pit | ||
| 140 | pitx it | ||
| 141 | end | ||
| 142 | document pit | ||
| 143 | Pretty print the display iterator it. | ||
| 144 | end | ||
| 145 | |||
| 146 | define prowx | ||
| 147 | set $row = $arg0 | ||
| 148 | printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width | ||
| 149 | printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height | ||
| 150 | printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height | ||
| 151 | printf " vis=%d", $row->visible_height | ||
| 152 | printf " L=%d T=%d R=%d", $row->used[0], $row->used[1], $row->used[2] | ||
| 153 | printf "\n" | ||
| 154 | printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos | ||
| 155 | if ($row->enabled_p) | ||
| 156 | printf " ENA" | ||
| 157 | end | ||
| 158 | if ($row->displays_text_p) | ||
| 159 | printf " DISP" | ||
| 160 | end | ||
| 161 | if ($row->mode_line_p) | ||
| 162 | printf " MODEL" | ||
| 163 | end | ||
| 164 | if ($row->continued_p) | ||
| 165 | printf " CONT" | ||
| 166 | end | ||
| 167 | if ($row-> truncated_on_left_p) | ||
| 168 | printf " TRUNC:L" | ||
| 169 | end | ||
| 170 | if ($row-> truncated_on_right_p) | ||
| 171 | printf " TRUNC:R" | ||
| 172 | end | ||
| 173 | if ($row->starts_in_middle_of_char_p) | ||
| 174 | printf " STARTMID" | ||
| 175 | end | ||
| 176 | if ($row->ends_in_middle_of_char_p) | ||
| 177 | printf " ENDMID" | ||
| 178 | end | ||
| 179 | if ($row->ends_in_newline_from_string_p) | ||
| 180 | printf " ENDNLFS" | ||
| 181 | end | ||
| 182 | if ($row->ends_at_zv_p) | ||
| 183 | printf " ENDZV" | ||
| 184 | end | ||
| 185 | if ($row->overlapped_p) | ||
| 186 | printf " OLAPD" | ||
| 187 | end | ||
| 188 | if ($row->overlapping_p) | ||
| 189 | printf " OLAPNG" | ||
| 190 | end | ||
| 191 | printf "\n" | ||
| 192 | end | ||
| 193 | document prowx | ||
| 194 | Pretty print information about glyph_row. | ||
| 195 | Takes one argument, a row object or pointer. | ||
| 196 | end | ||
| 197 | |||
| 198 | define prow | ||
| 199 | prowx row | ||
| 200 | end | ||
| 201 | document prow | ||
| 202 | Pretty print information about glyph_row in row. | ||
| 203 | end | ||
| 204 | |||
| 205 | |||
| 206 | define pcursorx | ||
| 207 | set $cp = $arg0 | ||
| 208 | printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos | ||
| 209 | end | ||
| 210 | document pcursorx | ||
| 211 | Pretty print a window cursor | ||
| 212 | end | ||
| 213 | |||
| 214 | define pcursor | ||
| 215 | printf "output: " | ||
| 216 | pcursorx output_cursor | ||
| 217 | printf "\n" | ||
| 218 | end | ||
| 219 | document pcursor | ||
| 220 | Pretty print the output_cursor | ||
| 221 | end | ||
| 222 | |||
| 223 | define pwinx | ||
| 224 | set $w = $arg0 | ||
| 225 | xgetint $w->sequence_number | ||
| 226 | if ($w->mini_p != Qnil) | ||
| 227 | printf "Mini " | ||
| 228 | end | ||
| 229 | printf "Window %d ", $int | ||
| 230 | xgetptr $w->buffer | ||
| 231 | set $tem = (struct buffer *) $ptr | ||
| 232 | xgetptr $tem->name | ||
| 233 | printf "%s", ((struct Lisp_String *) $ptr)->data | ||
| 234 | printf "\n" | ||
| 235 | xgetptr $w->start | ||
| 236 | set $tem = (struct Lisp_Marker *) $ptr | ||
| 237 | printf "start=%d end:", $tem->charpos | ||
| 238 | if ($w->window_end_valid != Qnil) | ||
| 239 | xgetint $w->window_end_pos | ||
| 240 | printf "pos=%d", $int | ||
| 241 | xgetint $w->window_end_vpos | ||
| 242 | printf " vpos=%d", $int | ||
| 243 | else | ||
| 244 | printf "invalid" | ||
| 245 | end | ||
| 246 | printf " vscroll=%d", $w->vscroll | ||
| 247 | if ($w->force_start != Qnil) | ||
| 248 | printf " FORCE_START" | ||
| 249 | end | ||
| 250 | if ($w->must_be_updated_p) | ||
| 251 | printf " MUST_UPD" | ||
| 252 | end | ||
| 253 | printf "\n" | ||
| 254 | printf "cursor: " | ||
| 255 | pcursorx $w->cursor | ||
| 256 | printf " phys: " | ||
| 257 | pcursorx $w->phys_cursor | ||
| 258 | if ($w->phys_cursor_on_p) | ||
| 259 | printf " ON" | ||
| 260 | else | ||
| 261 | printf " OFF" | ||
| 262 | end | ||
| 263 | printf " blk=" | ||
| 264 | if ($w->last_cursor_off_p != $w->cursor_off_p) | ||
| 265 | if ($w->last_cursor_off_p) | ||
| 266 | printf "ON->" | ||
| 267 | else | ||
| 268 | printf "OFF->" | ||
| 269 | end | ||
| 270 | end | ||
| 271 | if ($w->cursor_off_p) | ||
| 272 | printf "ON" | ||
| 273 | else | ||
| 274 | printf "OFF" | ||
| 275 | end | ||
| 276 | printf "\n" | ||
| 277 | end | ||
| 278 | document pwinx | ||
| 279 | Pretty print a window structure. | ||
| 280 | Takes one argument, a pointer to a window structure | ||
| 281 | end | ||
| 282 | |||
| 283 | define pwin | ||
| 284 | pwinx w | ||
| 285 | end | ||
| 286 | document pwin | ||
| 287 | Pretty print window structure w. | ||
| 288 | end | ||
| 289 | |||
| 290 | |||
| 104 | define xtype | 291 | define xtype |
| 105 | xgettype $ | 292 | xgettype $ |
| 106 | output $type | 293 | output $type |
diff --git a/src/ChangeLog b/src/ChangeLog index 400946fb4d0..7c926e9b919 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,40 @@ | |||
| 1 | 2005-02-20 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xdisp.c (pos_visible_p): Be sure to move to the specified | ||
| 4 | position. Always get the full ascent / descent of the | ||
| 5 | corresponding row, to return reliable rtop and rbot values. | ||
| 6 | (back_to_previous_visible_line_start): Fix 2005-01-18 change. | ||
| 7 | Must look one character back, as back_to_previous_line_start | ||
| 8 | returns position after the newline. | ||
| 9 | (move_it_vertically_backward): Fix heuristic for when to move further | ||
| 10 | back in case line_height * 2/3 is larger than window height. | ||
| 11 | (cursor_row_fully_visible_p): Rename make_cursor_line_fully_visible_p | ||
| 12 | as it does not do anything anymore. Add arg current_matrix_p to | ||
| 13 | use current matrix rather than desired matrix when set. | ||
| 14 | (try_cursor_movement): Don't scroll to make cursor row fully | ||
| 15 | visible if cursor didn't move. This avoids unexpected recentering | ||
| 16 | in case of blinking cursor or accepting process output. | ||
| 17 | Use current matrix to check cursor row visibility. | ||
| 18 | (redisplay_window): Fix whether to recenter or move to top in case | ||
| 19 | cursor line is taller than window height. | ||
| 20 | (find_first_unchanged_at_end_row): Stop search if we reach a row | ||
| 21 | which not enabled (instead of abort). | ||
| 22 | |||
| 23 | 2005-02-18 Kim F. Storm <storm@cua.dk> | ||
| 24 | |||
| 25 | * xfaces.c (Finternal_set_lisp_face_attribute): Allow :color property | ||
| 26 | to be nil in a :box attribute value list; customize prints that | ||
| 27 | as lisp value when no box color is specified. | ||
| 28 | |||
| 29 | * .gdbinit (pitx, pit): Pretty print display iterator. | ||
| 30 | (prowx, prow): Pretty print glyph row. | ||
| 31 | (pcursorx, pcursor): Pretty print a window cursor. | ||
| 32 | (pwinx, pwin): Pretty print struct window. | ||
| 33 | |||
| 34 | 2005-02-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 35 | |||
| 36 | * alloc.c (BLOCK_BYTES): Harmless typo. | ||
| 37 | |||
| 1 | 2005-02-17 Andreas Schwab <schwab@suse.de> | 38 | 2005-02-17 Andreas Schwab <schwab@suse.de> |
| 2 | 39 | ||
| 3 | * xfns.c (hack_wm_protocols): Use correct type for last parameter | 40 | * xfns.c (hack_wm_protocols): Use correct type for last parameter |
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5 index 20fc4887084..5e50066bc78 100644 --- a/src/ChangeLog.5 +++ b/src/ChangeLog.5 | |||
| @@ -3405,7 +3405,7 @@ | |||
| 3405 | (UNISTD_H_INCLUDED): Don't define or test this. | 3405 | (UNISTD_H_INCLUDED): Don't define or test this. |
| 3406 | * m/ibm370aix.h (NEED_UNISTD_H): Defined. | 3406 | * m/ibm370aix.h (NEED_UNISTD_H): Defined. |
| 3407 | * s/aix3-1.h (NEED_UNISTD_H): Defined. | 3407 | * s/aix3-1.h (NEED_UNISTD_H): Defined. |
| 3408 | * s/irix4-0.h (NEED_UNISTD_H): Defined. | 3408 | * s/irix4-0.h (NEED_UNISTD_H): Define. |
| 3409 | 3409 | ||
| 3410 | * fileio.c (internal_delete_file, internal_delete_file_1): | 3410 | * fileio.c (internal_delete_file, internal_delete_file_1): |
| 3411 | New functions. | 3411 | New functions. |
| @@ -3419,7 +3419,7 @@ | |||
| 3419 | 1994-11-24 Francesco Potorti` <pot@cnuce.cnr.it> | 3419 | 1994-11-24 Francesco Potorti` <pot@cnuce.cnr.it> |
| 3420 | 3420 | ||
| 3421 | * m/delta.h (C_SWITCH_MACHINE): -inline-functions removed, | 3421 | * m/delta.h (C_SWITCH_MACHINE): -inline-functions removed, |
| 3422 | because the compiler shipped with R3V7 is not stable. | 3422 | because the compiler shipped with R3V7 is not stable. |
| 3423 | 3423 | ||
| 3424 | 1994-11-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> | 3424 | 1994-11-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> |
| 3425 | 3425 | ||
| @@ -3443,7 +3443,7 @@ | |||
| 3443 | (complete_and_exit_1, complete_and_exit_2): New subroutines. | 3443 | (complete_and_exit_1, complete_and_exit_2): New subroutines. |
| 3444 | 3444 | ||
| 3445 | * s/aix4.h: New file. | 3445 | * s/aix4.h: New file. |
| 3446 | * s/aix3-1.h (AIXHFT): Defined. | 3446 | * s/aix3-1.h (AIXHFT): Define. |
| 3447 | * m/ibmrs6000.h (OBJECTS_MACHINE): Define only if AIXHFT. | 3447 | * m/ibmrs6000.h (OBJECTS_MACHINE): Define only if AIXHFT. |
| 3448 | 3448 | ||
| 3449 | * sysdep.c (init_sys_modes): Tes AIXHFT, not AIX. | 3449 | * sysdep.c (init_sys_modes): Tes AIXHFT, not AIX. |
| @@ -6451,7 +6451,7 @@ | |||
| 6451 | Add an unwind protect to restore original buffer and kill the temp. | 6451 | Add an unwind protect to restore original buffer and kill the temp. |
| 6452 | 6452 | ||
| 6453 | * sysdep.c (init_system_name): Retry gethostbyname after TRY_AGAIN | 6453 | * sysdep.c (init_system_name): Retry gethostbyname after TRY_AGAIN |
| 6454 | failure. | 6454 | failure. |
| 6455 | 6455 | ||
| 6456 | * process.c (Fopen_network_stream): | 6456 | * process.c (Fopen_network_stream): |
| 6457 | Retry gethostbyname after TRY_AGAIN failure. | 6457 | Retry gethostbyname after TRY_AGAIN failure. |
| @@ -6477,7 +6477,7 @@ | |||
| 6477 | 6477 | ||
| 6478 | * s/linux.h [emacs]: Include stdio.h. | 6478 | * s/linux.h [emacs]: Include stdio.h. |
| 6479 | 6479 | ||
| 6480 | * commands.h (unread_command_char): Declared. | 6480 | * commands.h (unread_command_char): Declare. |
| 6481 | * dispnew.c (sit_for): Return immediately if unread events exist. | 6481 | * dispnew.c (sit_for): Return immediately if unread events exist. |
| 6482 | 6482 | ||
| 6483 | 1994-07-17 Richard Stallman (rms@mole.gnu.ai.mit.edu) | 6483 | 1994-07-17 Richard Stallman (rms@mole.gnu.ai.mit.edu) |
diff --git a/src/alloc.c b/src/alloc.c index 49fc69e7058..093919fee3d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -891,12 +891,13 @@ lisp_free (block) | |||
| 891 | On glibc-2.3.2, malloc never tries to align, so a padding of 0 is best. | 891 | On glibc-2.3.2, malloc never tries to align, so a padding of 0 is best. |
| 892 | posix_memalign on the other hand would ideally prefer a value of 4 | 892 | posix_memalign on the other hand would ideally prefer a value of 4 |
| 893 | because otherwise, there's 1020 bytes wasted between each ablocks. | 893 | because otherwise, there's 1020 bytes wasted between each ablocks. |
| 894 | But testing shows that those 1020 will most of the time be efficiently | 894 | In Emacs, testing shows that those 1020 can most of the time be |
| 895 | used by malloc to place other objects, so a value of 0 is still preferable | 895 | efficiently used by malloc to place other objects, so a value of 0 can |
| 896 | unless you have a lot of cons&floats and virtually nothing else. */ | 896 | still preferable unless you have a lot of aligned blocks and virtually |
| 897 | nothing else. */ | ||
| 897 | #define BLOCK_PADDING 0 | 898 | #define BLOCK_PADDING 0 |
| 898 | #define BLOCK_BYTES \ | 899 | #define BLOCK_BYTES \ |
| 899 | (BLOCK_ALIGN - sizeof (struct aligned_block *) - BLOCK_PADDING) | 900 | (BLOCK_ALIGN - sizeof (struct ablock *) - BLOCK_PADDING) |
| 900 | 901 | ||
| 901 | /* Internal data structures and constants. */ | 902 | /* Internal data structures and constants. */ |
| 902 | 903 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 142b1fb1398..f8f97b44b3b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -859,7 +859,7 @@ static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *, | |||
| 859 | Lisp_Object)); | 859 | Lisp_Object)); |
| 860 | static void extend_face_to_end_of_line P_ ((struct it *)); | 860 | static void extend_face_to_end_of_line P_ ((struct it *)); |
| 861 | static int append_space_for_newline P_ ((struct it *, int)); | 861 | static int append_space_for_newline P_ ((struct it *, int)); |
| 862 | static int make_cursor_line_fully_visible P_ ((struct window *, int)); | 862 | static int cursor_row_fully_visible_p P_ ((struct window *, int, int)); |
| 863 | static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int)); | 863 | static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int)); |
| 864 | static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *)); | 864 | static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *)); |
| 865 | static int trailing_whitespace_p P_ ((int)); | 865 | static int trailing_whitespace_p P_ ((int)); |
| @@ -1281,8 +1281,8 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1281 | } | 1281 | } |
| 1282 | 1282 | ||
| 1283 | start_display (&it, w, top); | 1283 | start_display (&it, w, top); |
| 1284 | move_it_to (&it, charpos, 0, it.last_visible_y, -1, | 1284 | move_it_to (&it, charpos, -1, it.last_visible_y, -1, |
| 1285 | MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); | 1285 | MOVE_TO_POS | MOVE_TO_Y); |
| 1286 | 1286 | ||
| 1287 | /* Note that we may overshoot because of invisible text. */ | 1287 | /* Note that we may overshoot because of invisible text. */ |
| 1288 | if (IT_CHARPOS (it) >= charpos) | 1288 | if (IT_CHARPOS (it) >= charpos) |
| @@ -1306,12 +1306,13 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1306 | } | 1306 | } |
| 1307 | } | 1307 | } |
| 1308 | } | 1308 | } |
| 1309 | else if (it.current_y + it.max_ascent + it.max_descent > it.last_visible_y) | 1309 | else |
| 1310 | { | 1310 | { |
| 1311 | struct it it2; | 1311 | struct it it2; |
| 1312 | 1312 | ||
| 1313 | it2 = it; | 1313 | it2 = it; |
| 1314 | move_it_by_lines (&it, 1, 0); | 1314 | if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n') |
| 1315 | move_it_by_lines (&it, 1, 0); | ||
| 1315 | if (charpos < IT_CHARPOS (it)) | 1316 | if (charpos < IT_CHARPOS (it)) |
| 1316 | { | 1317 | { |
| 1317 | visible_p = 1; | 1318 | visible_p = 1; |
| @@ -1322,8 +1323,9 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1322 | *y = it2.current_y + it2.max_ascent - it2.ascent; | 1323 | *y = it2.current_y + it2.max_ascent - it2.ascent; |
| 1323 | if (rtop) | 1324 | if (rtop) |
| 1324 | { | 1325 | { |
| 1325 | *rtop = 0; | 1326 | *rtop = max (0, -it2.current_y); |
| 1326 | *rbot = max (0, (it2.current_y + it2.max_ascent + it2.max_descent) - it.last_visible_y); | 1327 | *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent) |
| 1328 | - it.last_visible_y)); | ||
| 1327 | } | 1329 | } |
| 1328 | } | 1330 | } |
| 1329 | } | 1331 | } |
| @@ -4693,27 +4695,31 @@ back_to_previous_visible_line_start (it) | |||
| 4693 | /* If newline has a display property that replaces the newline with something | 4695 | /* If newline has a display property that replaces the newline with something |
| 4694 | else (image or text), find start of overlay or interval and continue search | 4696 | else (image or text), find start of overlay or interval and continue search |
| 4695 | from that point. */ | 4697 | from that point. */ |
| 4696 | { | 4698 | if (IT_CHARPOS (*it) > BEGV) |
| 4697 | struct it it2 = *it; | 4699 | { |
| 4698 | int pos = IT_CHARPOS (*it); | 4700 | struct it it2 = *it; |
| 4699 | int beg, end; | 4701 | int pos; |
| 4700 | Lisp_Object val, overlay; | 4702 | int beg, end; |
| 4701 | 4703 | Lisp_Object val, overlay; | |
| 4702 | it2.sp = 0; | 4704 | |
| 4703 | if (handle_display_prop (&it2) == HANDLED_RETURN | 4705 | pos = --IT_CHARPOS (it2); |
| 4704 | && !NILP (val = get_char_property_and_overlay | 4706 | --IT_BYTEPOS (it2); |
| 4705 | (make_number (pos), Qdisplay, Qnil, &overlay)) | 4707 | it2.sp = 0; |
| 4706 | && (OVERLAYP (overlay) | 4708 | if (handle_display_prop (&it2) == HANDLED_RETURN |
| 4707 | ? (beg = OVERLAY_POSITION (OVERLAY_START (overlay))) | 4709 | && !NILP (val = get_char_property_and_overlay |
| 4708 | : get_property_and_range (pos, Qdisplay, &val, &beg, &end, Qnil))) | 4710 | (make_number (pos), Qdisplay, Qnil, &overlay)) |
| 4709 | { | 4711 | && (OVERLAYP (overlay) |
| 4710 | if (beg < BEGV) | 4712 | ? (beg = OVERLAY_POSITION (OVERLAY_START (overlay))) |
| 4711 | beg = BEGV; | 4713 | : get_property_and_range (pos, Qdisplay, &val, &beg, &end, Qnil))) |
| 4712 | IT_CHARPOS (*it) = beg; | 4714 | { |
| 4713 | IT_BYTEPOS (*it) = buf_charpos_to_bytepos (current_buffer, beg); | 4715 | if (beg < BEGV) |
| 4714 | continue; | 4716 | beg = BEGV; |
| 4715 | } | 4717 | IT_CHARPOS (*it) = beg; |
| 4716 | } | 4718 | IT_BYTEPOS (*it) = buf_charpos_to_bytepos (current_buffer, beg); |
| 4719 | continue; | ||
| 4720 | } | ||
| 4721 | } | ||
| 4722 | |||
| 4717 | break; | 4723 | break; |
| 4718 | } | 4724 | } |
| 4719 | 4725 | ||
| @@ -6326,7 +6332,8 @@ move_it_vertically_backward (it, dy) | |||
| 6326 | a line height of 13 pixels each, recentering with point | 6332 | a line height of 13 pixels each, recentering with point |
| 6327 | on the bottom line will try to move -39/2 = 19 pixels | 6333 | on the bottom line will try to move -39/2 = 19 pixels |
| 6328 | backward. Try to avoid moving into the first line. */ | 6334 | backward. Try to avoid moving into the first line. */ |
| 6329 | && it->current_y - target_y > line_height * 2 / 3 | 6335 | && (it->current_y - target_y |
| 6336 | > min (window_box_height (it->w), line_height * 2 / 3)) | ||
| 6330 | && IT_CHARPOS (*it) > BEGV) | 6337 | && IT_CHARPOS (*it) > BEGV) |
| 6331 | { | 6338 | { |
| 6332 | TRACE_MOVE ((stderr, " not far enough -> move_vert %d\n", | 6339 | TRACE_MOVE ((stderr, " not far enough -> move_vert %d\n", |
| @@ -11084,7 +11091,7 @@ run_window_scroll_functions (window, startp) | |||
| 11084 | as if point had gone off the screen. */ | 11091 | as if point had gone off the screen. */ |
| 11085 | 11092 | ||
| 11086 | static int | 11093 | static int |
| 11087 | make_cursor_line_fully_visible (w, force_p) | 11094 | cursor_row_fully_visible_p (w, force_p, current_matrix_p) |
| 11088 | struct window *w; | 11095 | struct window *w; |
| 11089 | int force_p; | 11096 | int force_p; |
| 11090 | { | 11097 | { |
| @@ -11100,7 +11107,7 @@ make_cursor_line_fully_visible (w, force_p) | |||
| 11100 | if (w->cursor.vpos < 0) | 11107 | if (w->cursor.vpos < 0) |
| 11101 | return 1; | 11108 | return 1; |
| 11102 | 11109 | ||
| 11103 | matrix = w->desired_matrix; | 11110 | matrix = current_matrix_p ? w->current_matrix : w->desired_matrix; |
| 11104 | row = MATRIX_ROW (matrix, w->cursor.vpos); | 11111 | row = MATRIX_ROW (matrix, w->cursor.vpos); |
| 11105 | 11112 | ||
| 11106 | /* If the cursor row is not partially visible, there's nothing to do. */ | 11113 | /* If the cursor row is not partially visible, there's nothing to do. */ |
| @@ -11405,7 +11412,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 11405 | 11412 | ||
| 11406 | /* If cursor ends up on a partially visible line, | 11413 | /* If cursor ends up on a partially visible line, |
| 11407 | treat that as being off the bottom of the screen. */ | 11414 | treat that as being off the bottom of the screen. */ |
| 11408 | if (! make_cursor_line_fully_visible (w, extra_scroll_margin_lines <= 1)) | 11415 | if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)) |
| 11409 | { | 11416 | { |
| 11410 | clear_glyph_matrix (w->desired_matrix); | 11417 | clear_glyph_matrix (w->desired_matrix); |
| 11411 | ++extra_scroll_margin_lines; | 11418 | ++extra_scroll_margin_lines; |
| @@ -11675,6 +11682,12 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11675 | && CHARPOS (startp) != BEGV) | 11682 | && CHARPOS (startp) != BEGV) |
| 11676 | scroll_p = 1; | 11683 | scroll_p = 1; |
| 11677 | } | 11684 | } |
| 11685 | else | ||
| 11686 | { | ||
| 11687 | /* Cursor did not move. So don't scroll even if cursor line | ||
| 11688 | is partially visible, as it was so before. */ | ||
| 11689 | rc = CURSOR_MOVEMENT_SUCCESS; | ||
| 11690 | } | ||
| 11678 | 11691 | ||
| 11679 | if (PT < MATRIX_ROW_START_CHARPOS (row) | 11692 | if (PT < MATRIX_ROW_START_CHARPOS (row) |
| 11680 | || PT > MATRIX_ROW_END_CHARPOS (row)) | 11693 | || PT > MATRIX_ROW_END_CHARPOS (row)) |
| @@ -11682,7 +11695,8 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11682 | /* if PT is not in the glyph row, give up. */ | 11695 | /* if PT is not in the glyph row, give up. */ |
| 11683 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 11696 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 11684 | } | 11697 | } |
| 11685 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) | 11698 | else if (rc != CURSOR_MOVEMENT_SUCCESS |
| 11699 | && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) | ||
| 11686 | && make_cursor_line_fully_visible_p) | 11700 | && make_cursor_line_fully_visible_p) |
| 11687 | { | 11701 | { |
| 11688 | if (PT == MATRIX_ROW_END_CHARPOS (row) | 11702 | if (PT == MATRIX_ROW_END_CHARPOS (row) |
| @@ -11701,7 +11715,7 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11701 | else | 11715 | else |
| 11702 | { | 11716 | { |
| 11703 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 11717 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 11704 | if (!make_cursor_line_fully_visible (w, 0)) | 11718 | if (!cursor_row_fully_visible_p (w, 0, 1)) |
| 11705 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 11719 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 11706 | else | 11720 | else |
| 11707 | rc = CURSOR_MOVEMENT_SUCCESS; | 11721 | rc = CURSOR_MOVEMENT_SUCCESS; |
| @@ -11788,7 +11802,7 @@ redisplay_window (window, just_this_one_p) | |||
| 11788 | int temp_scroll_step = 0; | 11802 | int temp_scroll_step = 0; |
| 11789 | int count = SPECPDL_INDEX (); | 11803 | int count = SPECPDL_INDEX (); |
| 11790 | int rc; | 11804 | int rc; |
| 11791 | int centering_position; | 11805 | int centering_position = -1; |
| 11792 | int last_line_misfit = 0; | 11806 | int last_line_misfit = 0; |
| 11793 | 11807 | ||
| 11794 | SET_TEXT_POS (lpoint, PT, PT_BYTE); | 11808 | SET_TEXT_POS (lpoint, PT, PT_BYTE); |
| @@ -12034,7 +12048,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12034 | new_vpos = window_box_height (w) / 2; | 12048 | new_vpos = window_box_height (w) / 2; |
| 12035 | } | 12049 | } |
| 12036 | 12050 | ||
| 12037 | if (!make_cursor_line_fully_visible (w, 0)) | 12051 | if (!cursor_row_fully_visible_p (w, 0, 0)) |
| 12038 | { | 12052 | { |
| 12039 | /* Point does appear, but on a line partly visible at end of window. | 12053 | /* Point does appear, but on a line partly visible at end of window. |
| 12040 | Move it back to a fully-visible line. */ | 12054 | Move it back to a fully-visible line. */ |
| @@ -12171,7 +12185,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12171 | /* Forget any recorded base line for line number display. */ | 12185 | /* Forget any recorded base line for line number display. */ |
| 12172 | w->base_line_number = Qnil; | 12186 | w->base_line_number = Qnil; |
| 12173 | 12187 | ||
| 12174 | if (!make_cursor_line_fully_visible (w, 1)) | 12188 | if (!cursor_row_fully_visible_p (w, 1, 0)) |
| 12175 | { | 12189 | { |
| 12176 | clear_glyph_matrix (w->desired_matrix); | 12190 | clear_glyph_matrix (w->desired_matrix); |
| 12177 | last_line_misfit = 1; | 12191 | last_line_misfit = 1; |
| @@ -12231,10 +12245,8 @@ redisplay_window (window, just_this_one_p) | |||
| 12231 | /* Finally, just choose place to start which centers point */ | 12245 | /* Finally, just choose place to start which centers point */ |
| 12232 | 12246 | ||
| 12233 | recenter: | 12247 | recenter: |
| 12234 | centering_position = window_box_height (w) / 2; | 12248 | if (centering_position < 0) |
| 12235 | 12249 | centering_position = window_box_height (w) / 2; | |
| 12236 | point_at_top: | ||
| 12237 | /* Jump here with centering_position already set to 0. */ | ||
| 12238 | 12250 | ||
| 12239 | #if GLYPH_DEBUG | 12251 | #if GLYPH_DEBUG |
| 12240 | debug_method_add (w, "recenter"); | 12252 | debug_method_add (w, "recenter"); |
| @@ -12331,7 +12343,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12331 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 12343 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 12332 | } | 12344 | } |
| 12333 | 12345 | ||
| 12334 | if (!make_cursor_line_fully_visible (w, centering_position > 0)) | 12346 | if (!cursor_row_fully_visible_p (w, 0, 0)) |
| 12335 | { | 12347 | { |
| 12336 | /* If vscroll is enabled, disable it and try again. */ | 12348 | /* If vscroll is enabled, disable it and try again. */ |
| 12337 | if (w->vscroll) | 12349 | if (w->vscroll) |
| @@ -12346,9 +12358,10 @@ redisplay_window (window, just_this_one_p) | |||
| 12346 | visible, if it can be done. */ | 12358 | visible, if it can be done. */ |
| 12347 | if (centering_position == 0) | 12359 | if (centering_position == 0) |
| 12348 | goto done; | 12360 | goto done; |
| 12361 | |||
| 12349 | clear_glyph_matrix (w->desired_matrix); | 12362 | clear_glyph_matrix (w->desired_matrix); |
| 12350 | centering_position = 0; | 12363 | centering_position = 0; |
| 12351 | goto point_at_top; | 12364 | goto recenter; |
| 12352 | } | 12365 | } |
| 12353 | 12366 | ||
| 12354 | done: | 12367 | done: |
| @@ -13136,8 +13149,10 @@ find_first_unchanged_at_end_row (w, delta, delta_bytes) | |||
| 13136 | starts at a minimum position >= last_unchanged_pos_old. */ | 13149 | starts at a minimum position >= last_unchanged_pos_old. */ |
| 13137 | for (; row > first_text_row; --row) | 13150 | for (; row > first_text_row; --row) |
| 13138 | { | 13151 | { |
| 13152 | /* This used to abort, but it can happen. | ||
| 13153 | It is ok to just stop the search instead here. KFS. */ | ||
| 13139 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) | 13154 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 13140 | abort (); | 13155 | break; |
| 13141 | 13156 | ||
| 13142 | if (MATRIX_ROW_START_CHARPOS (row) >= last_unchanged_pos_old) | 13157 | if (MATRIX_ROW_START_CHARPOS (row) >= last_unchanged_pos_old) |
| 13143 | row_found = row; | 13158 | row_found = row; |
diff --git a/src/xfaces.c b/src/xfaces.c index 9b2d5731508..025139377aa 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -4151,7 +4151,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4151 | } | 4151 | } |
| 4152 | else if (EQ (k, QCcolor)) | 4152 | else if (EQ (k, QCcolor)) |
| 4153 | { | 4153 | { |
| 4154 | if (!STRINGP (v) || SCHARS (v) == 0) | 4154 | if (!NILP (v) && (!STRINGP (v) || SCHARS (v) == 0)) |
| 4155 | break; | 4155 | break; |
| 4156 | } | 4156 | } |
| 4157 | else if (EQ (k, QCstyle)) | 4157 | else if (EQ (k, QCstyle)) |