diff options
| author | Kenichi Handa | 2010-05-25 09:35:50 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-05-25 09:35:50 +0900 |
| commit | 8a2b8c4f7c2a18254fc0b34f236d7487fc7917d4 (patch) | |
| tree | 48e379874bd0bf796a12a5f43b369e0d6691a125 /src | |
| parent | 10f72a3793087770f131a0dc729f29ff50f08ad9 (diff) | |
| parent | 7eca871a82d582b986c638343f74d16b819a0f14 (diff) | |
| download | emacs-8a2b8c4f7c2a18254fc0b34f236d7487fc7917d4.tar.gz emacs-8a2b8c4f7c2a18254fc0b34f236d7487fc7917d4.zip | |
merge trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 7 | ||||
| -rw-r--r-- | src/ChangeLog | 135 | ||||
| -rw-r--r-- | src/Makefile.in | 409 | ||||
| -rw-r--r-- | src/autodeps.mk | 6 | ||||
| -rw-r--r-- | src/bidi.c | 11 | ||||
| -rw-r--r-- | src/config.in | 6 | ||||
| -rw-r--r-- | src/deps.mk | 279 | ||||
| -rw-r--r-- | src/dispextern.h | 40 | ||||
| -rw-r--r-- | src/dispnew.c | 16 | ||||
| -rw-r--r-- | src/fileio.c | 5 | ||||
| -rw-r--r-- | src/image.c | 82 | ||||
| -rw-r--r-- | src/keyboard.c | 12 | ||||
| -rw-r--r-- | src/m/ibms390x.h | 2 | ||||
| -rw-r--r-- | src/m/macppc.h | 6 | ||||
| -rw-r--r-- | src/ns.mk | 39 | ||||
| -rw-r--r-- | src/process.c | 27 | ||||
| -rw-r--r-- | src/s/aix4-2.h | 8 | ||||
| -rw-r--r-- | src/s/cygwin.h | 5 | ||||
| -rw-r--r-- | src/s/darwin.h | 3 | ||||
| -rw-r--r-- | src/s/gnu.h | 3 | ||||
| -rw-r--r-- | src/s/msdos.h | 2 | ||||
| -rw-r--r-- | src/s/netbsd.h | 6 | ||||
| -rw-r--r-- | src/s/usg5-4.h | 2 | ||||
| -rw-r--r-- | src/w32.c | 29 | ||||
| -rw-r--r-- | src/xdisp.c | 336 |
25 files changed, 854 insertions, 622 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 5ecdaa4a572..1fd7e288736 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -616,7 +616,7 @@ Pretty print all glyphs in it->glyph_row. | |||
| 616 | end | 616 | end |
| 617 | 617 | ||
| 618 | define prowlims | 618 | define prowlims |
| 619 | printf "start=%d,end=%d,reversed=%d,cont=%d,at_zv=%d\n", $arg0->start.pos.charpos, $arg0->end.pos.charpos, $arg0->reversed_p, $arg0->continued_p, $arg0->ends_at_zv_p | 619 | printf "edges=(%d,%d),r2l=%d,cont=%d,trunc=(%d,%d),at_zv=%d\n", $arg0->minpos.charpos, $arg0->maxpos.charpos, $arg0->reversed_p, $arg0->continued_p, $arg0->truncated_on_left_p, $arg0->truncated_on_right_p, $arg0->ends_at_zv_p |
| 620 | end | 620 | end |
| 621 | document prowlims | 621 | document prowlims |
| 622 | Print important attributes of a glyph_row structure. | 622 | Print important attributes of a glyph_row structure. |
| @@ -626,10 +626,13 @@ end | |||
| 626 | define pmtxrows | 626 | define pmtxrows |
| 627 | set $mtx = $arg0 | 627 | set $mtx = $arg0 |
| 628 | set $gl = $mtx->rows | 628 | set $gl = $mtx->rows |
| 629 | set $glend = $mtx->rows + $mtx->nrows | 629 | set $glend = $mtx->rows + $mtx->nrows - 1 |
| 630 | set $i = 0 | ||
| 630 | while ($gl < $glend) | 631 | while ($gl < $glend) |
| 632 | printf "%d: ", $i | ||
| 631 | prowlims $gl | 633 | prowlims $gl |
| 632 | set $gl = $gl + 1 | 634 | set $gl = $gl + 1 |
| 635 | set $i = $i + 1 | ||
| 633 | end | 636 | end |
| 634 | end | 637 | end |
| 635 | document pmtxrows | 638 | document pmtxrows |
diff --git a/src/ChangeLog b/src/ChangeLog index 347ee7b1f20..67911d5def3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -21,6 +21,139 @@ | |||
| 21 | is at the last character of the current grapheme cluster when | 21 | is at the last character of the current grapheme cluster when |
| 22 | CMP_IT->reversed_p is nonzero. | 22 | CMP_IT->reversed_p is nonzero. |
| 23 | 23 | ||
| 24 | 2010-05-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 25 | |||
| 26 | * process.c (Fmake_network_process): Set :host to nil if it's not used. | ||
| 27 | Suggested by Masatake YAMATO <yamato@redhat.com>. | ||
| 28 | |||
| 29 | 2010-05-23 Eli Zaretskii <eliz@gnu.org> | ||
| 30 | |||
| 31 | * dispextern.h (init_iterator): Sync prototype with changed | ||
| 32 | definition. | ||
| 33 | |||
| 34 | 2010-05-19 Eli Zaretskii <eliz@gnu.org> | ||
| 35 | |||
| 36 | Redesign and reimplement bidi-aware edge positions of glyph rows. | ||
| 37 | |||
| 38 | * dispextern.h (struct glyph_row): New members minpos and maxpos. | ||
| 39 | (MATRIX_ROW_START_CHARPOS, MATRIX_ROW_START_BYTEPOS) | ||
| 40 | (MATRIX_ROW_END_CHARPOS, MATRIX_ROW_END_BYTEPOS): Reference minpos | ||
| 41 | and maxpos members instead of start.pos and end.pos, respectively. | ||
| 42 | |||
| 43 | * xdisp.c (display_line): Compare IT_CHARPOS with the position in | ||
| 44 | row->start.pos, rather than with MATRIX_ROW_START_CHARPOS. | ||
| 45 | (cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS. | ||
| 46 | (try_window_reusing_current_matrix, try_window_id): | ||
| 47 | Use ROW->minpos rather than ROW->start.pos. | ||
| 48 | (init_from_display_pos, init_iterator): Use EMACS_INT for | ||
| 49 | character and byte positions. | ||
| 50 | (find_row_edges): Rename from find_row_end. Accept additional | ||
| 51 | arguments for minimum and maximum buffer positions seen by | ||
| 52 | display_line for this row. Don't use iterator to find the | ||
| 53 | position following the maximum one; instead, increment the | ||
| 54 | position found by display_line directly. Fix logic; eol_pos | ||
| 55 | should be tested before the rest. Handle the case of characters | ||
| 56 | delivered from display vector (bug#6036). Fix tests related to | ||
| 57 | it->method. Handle the truncated_on_right_p rows. | ||
| 58 | (RECORD_MAX_MIN_POS): New macro. | ||
| 59 | (display_line): Use it to record the minimum and maximum buffer | ||
| 60 | positions for glyphs in the row being assembled. Record the | ||
| 61 | position of the newline that terminates the line. If word wrap is | ||
| 62 | in effect, restore minimum and maximum positions seen up to the | ||
| 63 | wrap point, when iterator returns to it. | ||
| 64 | (try_window_reusing_current_matrix): Give up if in bidi-reordered | ||
| 65 | row and cursor not already at point. Restore original pre-bidi | ||
| 66 | code for unidirectional buffers. | ||
| 67 | |||
| 68 | * dispnew.c (increment_row_positions, check_matrix_invariants): | ||
| 69 | Increment and check row->start.pos and row->end.pos, in addition | ||
| 70 | to MATRIX_ROW_START_CHARPOS and MATRIX_ROW_END_CHARPOS. | ||
| 71 | |||
| 72 | * .gdbinit (prowlims): Display row->minpos and row->maxpos. | ||
| 73 | Display truncated_on_left_p and truncated_on_right_p flags. | ||
| 74 | Formatting fixes. | ||
| 75 | (pmtxrows): Display the ordinal number of each row. Don't display | ||
| 76 | rows beyond the last one. | ||
| 77 | |||
| 78 | * bidi.c (bidi_cache_iterator_state): Don't zero out new_paragraph: | ||
| 79 | it is not copied by bidi_copy_it. | ||
| 80 | |||
| 81 | 2010-05-22 Eli Zaretskii <eliz@gnu.org> | ||
| 82 | |||
| 83 | * w32.c (sys_write): Break writes into chunks smaller than 32MB. | ||
| 84 | (Bug#6237) | ||
| 85 | |||
| 86 | 2010-05-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 87 | |||
| 88 | * image.c (Fimage_flush): Rename from image-refresh. | ||
| 89 | |||
| 90 | 2010-05-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 91 | |||
| 92 | * xdisp.c (redisplay_internal): Clear caches even if redisplaying | ||
| 93 | just one window. | ||
| 94 | |||
| 95 | * image.c (Vimage_cache_eviction_delay): Decrease to 300. | ||
| 96 | (clear_image_cache): If the number of cached images is unusually | ||
| 97 | large, decrease the cache eviction delay (Bug#6230). | ||
| 98 | |||
| 99 | 2010-05-21 Glenn Morris <rgm@gnu.org> | ||
| 100 | |||
| 101 | * Makefile.in (${ns_appdir}, ${ns_appbindir}Emacs, ns-app): | ||
| 102 | Move these rules to ns.mk. | ||
| 103 | * ns.mk: New file. | ||
| 104 | |||
| 105 | * Makefile.in (../src/$(OLDXMENU), $(OLDXMENU)): Always define rules. | ||
| 106 | |||
| 107 | * Makefile.in (CANNOT_DUMP): New, set by configure. | ||
| 108 | (emacs${EXEEXT}, bootstrap-emacs${EXEEXT}): Use $CANNOT_DUMP. | ||
| 109 | |||
| 110 | 2010-05-20 Juri Linkov <juri@jurta.org> | ||
| 111 | |||
| 112 | * fileio.c (Fdelete_file): Change interative spec to use | ||
| 113 | `read-file-name' like in `find-file-read-args' where the default | ||
| 114 | value is `default-directory' instead of `buffer-file-name'. | ||
| 115 | http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00533.html | ||
| 116 | |||
| 117 | 2010-05-20 Kevin Ryde <user42@zip.com.au> | ||
| 118 | |||
| 119 | * keyboard.c (Vlast_command, Vkeyboard_translate_table) | ||
| 120 | (Voverriding_terminal_local_map, Vsystem_key_alist) | ||
| 121 | (Vlocal_function_key_map): Fix manual link in docstring (Bug#6224). | ||
| 122 | |||
| 123 | 2010-05-20 Glenn Morris <rgm@gnu.org> | ||
| 124 | |||
| 125 | * Makefile.in (DEPDIR): New constant. | ||
| 126 | (DEPFLAGS): Set with configure, not cpp. | ||
| 127 | (MKDEPDIR): New, set by configure. | ||
| 128 | (.c.o, .m.o, ecrt0.o): Use $MKDEPDIR. | ||
| 129 | (clean): Use $DEPDIR. | ||
| 130 | (deps_frag): Include from configure. | ||
| 131 | Move static/dynamic dependency stuff to deps.mk/autodeps.mk. | ||
| 132 | * deps.mk, autodeps.mk: New files, extracted from Makefile.in. | ||
| 133 | |||
| 134 | * bidi.c (bidi_cache_shrink, bidi_cache_iterator_state): Fix | ||
| 135 | reallocation of the cache. (Bug#6210) | ||
| 136 | |||
| 137 | 2010-05-19 Glenn Morris <rgm@gnu.org> | ||
| 138 | |||
| 139 | * s/msdos.h (ORDINARY_LINK): Move to sed2v2.inp. | ||
| 140 | |||
| 141 | * Makefile.in (LD, YMF_PASS_LDFLAGS): Set with configure, not cpp. | ||
| 142 | (GNULIB_VAR): Remove. | ||
| 143 | (LIBES): Use LIB_GCC instead of GNULIB_VAR. | ||
| 144 | |||
| 145 | * m/ibms390x.h (LINKER): | ||
| 146 | * m/macppc.h (LINKER) [GNU_LINUX]: | ||
| 147 | * s/aix4-2.h (ORDINARY_LINK): | ||
| 148 | * s/cygwin.h (LINKER): | ||
| 149 | * s/darwin.h (ORDINARY_LINK): | ||
| 150 | * s/gnu.h (ORDINARY_LINK): | ||
| 151 | * s/netbsd.h (LINKER): | ||
| 152 | * s/usg5-4.h (ORDINARY_LINK): | ||
| 153 | Move to configure. | ||
| 154 | |||
| 155 | * s/aix4-2.h (LINKER): Remove; this file sets ORDINARY_LINK. | ||
| 156 | |||
| 24 | 2010-05-18 Chong Yidong <cyd@stupidchicken.com> | 157 | 2010-05-18 Chong Yidong <cyd@stupidchicken.com> |
| 25 | 158 | ||
| 26 | * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to | 159 | * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to |
| @@ -120,6 +253,8 @@ | |||
| 120 | * xdisp.c (Fcurrent_bidi_paragraph_direction): New function. | 253 | * xdisp.c (Fcurrent_bidi_paragraph_direction): New function. |
| 121 | (syms_of_xdisp): Defsubr it. | 254 | (syms_of_xdisp): Defsubr it. |
| 122 | 255 | ||
| 256 | * cmds.c (Fforward_char, Fbackward_char): Doc fix. | ||
| 257 | |||
| 123 | * Makefile.in: Fix MSDOS-related comments. | 258 | * Makefile.in: Fix MSDOS-related comments. |
| 124 | 259 | ||
| 125 | 2010-05-15 Glenn Morris <rgm@gnu.org> | 260 | 2010-05-15 Glenn Morris <rgm@gnu.org> |
diff --git a/src/Makefile.in b/src/Makefile.in index 676d2a0834e..554caa44a97 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -124,6 +124,8 @@ LIBS_SYSTEM=@LIBS_SYSTEM@ | |||
| 124 | ## Where to find libgcc.a, if using gcc and necessary. | 124 | ## Where to find libgcc.a, if using gcc and necessary. |
| 125 | LIB_GCC=@LIB_GCC@ | 125 | LIB_GCC=@LIB_GCC@ |
| 126 | 126 | ||
| 127 | LD=@LINKER@ | ||
| 128 | |||
| 127 | ## May use $CRT_DIR. | 129 | ## May use $CRT_DIR. |
| 128 | LIB_STANDARD=@LIB_STANDARD@ | 130 | LIB_STANDARD=@LIB_STANDARD@ |
| 129 | 131 | ||
| @@ -171,13 +173,20 @@ LIBXTR6=@LIBXTR6@ | |||
| 171 | ## Only used if HAVE_X_WINDOWS. | 173 | ## Only used if HAVE_X_WINDOWS. |
| 172 | LIBXT_OTHER=@LIBXT_OTHER@ | 174 | LIBXT_OTHER=@LIBXT_OTHER@ |
| 173 | 175 | ||
| 174 | ## Only used if HAVE_X11 && !USE_GTK. | 176 | ## If !HAVE_X11 || USE_GTK, empty. |
| 175 | ## really-lwlib if USE_X_TOOLKIT, else really-oldxmenu. | 177 | ## Else if USE_X_TOOLKIT really-lwlib, else really-oldxmenu. |
| 176 | OLDXMENU_TARGET=@OLDXMENU_TARGET@ | 178 | OLDXMENU_TARGET=@OLDXMENU_TARGET@ |
| 177 | 179 | ||
| 178 | ## If !HAVE_X11 || USE_GTK, empty. | 180 | ## If !HAVE_X11 || USE_GTK, empty. |
| 179 | ## Else if USE_X_TOOLKIT, ${lwlibdir}liblw.a. | 181 | ## Else if USE_X_TOOLKIT, ${lwlibdir}liblw.a. |
| 180 | ## Else ${oldXMenudir}libXMenu11.a. | 182 | ## Else ${oldXMenudir}libXMenu11.a. |
| 183 | ## (Actually, rather than being empty, it is set to "nothing". | ||
| 184 | ## It is never actually used for anything in this case. | ||
| 185 | ## This is done because there is a rule with target $(OLDXMENU) below, | ||
| 186 | ## and I think it might be a syntax error with some makes to have | ||
| 187 | ## an empty target, even if the associated rule is never run. | ||
| 188 | ## http://lists.gnu.org/archive/html/help-make/2010-05/msg00058.html | ||
| 189 | ## The alternative would be to put that rule in a makefile fragment.) | ||
| 181 | OLDXMENU=@OLDXMENU@ | 190 | OLDXMENU=@OLDXMENU@ |
| 182 | 191 | ||
| 183 | ## If HAVE_X11 && !USE_GTK, ${OLDXMENU} ../src/${OLDXMENU}; else empty. | 192 | ## If HAVE_X11 && !USE_GTK, ${OLDXMENU} ../src/${OLDXMENU}; else empty. |
| @@ -282,16 +291,20 @@ START_FILES = @START_FILES@ | |||
| 282 | 291 | ||
| 283 | UNEXEC_OBJ = @unexec@ | 292 | UNEXEC_OBJ = @unexec@ |
| 284 | 293 | ||
| 294 | CANNOT_DUMP=@cannot_dump@ | ||
| 295 | |||
| 296 | DEPDIR=deps | ||
| 297 | ## -MMD -MF ${DEPDIR}/$*.d if AUTO_DEPEND; else empty. | ||
| 298 | DEPFLAGS=@DEPFLAGS@ | ||
| 299 | ## test -d ${DEPDIR} || mkdir ${DEPDIR} (if AUTO_DEPEND); else ':'. | ||
| 300 | MKDEPDIR=@MKDEPDIR@ | ||
| 301 | |||
| 285 | # ========================== start of cpp stuff ======================= | 302 | # ========================== start of cpp stuff ======================= |
| 286 | /* From here on, comments must be done in C syntax. */ | 303 | /* From here on, comments must be done in C syntax. */ |
| 287 | 304 | ||
| 288 | #define NOT_C_CODE | 305 | #define NOT_C_CODE |
| 289 | #include "config.h" | 306 | #include "config.h" |
| 290 | 307 | ||
| 291 | #ifdef AUTO_DEPEND | ||
| 292 | DEPFLAGS = -MMD -MF deps/$*.d | ||
| 293 | #endif | ||
| 294 | |||
| 295 | /* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ | 308 | /* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ |
| 296 | @NS_IMPL_GNUSTEP_INC@ | 309 | @NS_IMPL_GNUSTEP_INC@ |
| 297 | 310 | ||
| @@ -318,63 +331,13 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) | |||
| 318 | 331 | ||
| 319 | .SUFFIXES: .m | 332 | .SUFFIXES: .m |
| 320 | .c.o: | 333 | .c.o: |
| 321 | #ifdef AUTO_DEPEND | 334 | @$(MKDEPDIR) |
| 322 | @-test -d deps || mkdir deps | ||
| 323 | #endif | ||
| 324 | $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< | 335 | $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< |
| 325 | .m.o: | 336 | .m.o: |
| 326 | #ifdef AUTO_DEPEND | 337 | @$(MKDEPDIR) |
| 327 | @-test -d deps || mkdir deps | ||
| 328 | #endif | ||
| 329 | $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< | 338 | $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< |
| 330 | 339 | ||
| 331 | 340 | ||
| 332 | /* A macro which other sections of Makefile can redefine to munge the | ||
| 333 | flags before they are passed to LD. This is helpful if you have | ||
| 334 | redefined LD to something odd, like "gcc". | ||
| 335 | (The YMF prefix is a holdover from the old name "ymakefile".) */ | ||
| 336 | #define YMF_PASS_LDFLAGS(flags) flags | ||
| 337 | |||
| 338 | |||
| 339 | #ifdef ORDINARY_LINK | ||
| 340 | LD = $(CC) | ||
| 341 | |||
| 342 | #else /* not ORDINARY_LINK */ | ||
| 343 | GNULIB_VAR = $(LIB_GCC) | ||
| 344 | |||
| 345 | /* Fix linking if compiled with GCC. */ | ||
| 346 | #if defined (__GNUC__) && ! defined (LINKER) | ||
| 347 | /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | ||
| 348 | places that are difficult to figure out at make time. Fortunately, | ||
| 349 | these same versions allow you to pass arbitrary flags on to the | ||
| 350 | linker, so there is no reason not to use it as a linker. | ||
| 351 | |||
| 352 | Well, it is not quite perfect. The "-nostdlib" keeps GCC from | ||
| 353 | searching for libraries in its internal directories, so we have to | ||
| 354 | ask GCC explicitly where to find libgcc.a. */ | ||
| 355 | #define LINKER $(CC) -nostdlib | ||
| 356 | /* GCC passes any argument prefixed with -Xlinker directly to the linker. | ||
| 357 | See prefix-args.c for an explanation of why we do not do this with the | ||
| 358 | shell''s ``for'' construct. Note that sane people do not have '.' in | ||
| 359 | their paths, so we must use ./prefix-args. */ | ||
| 360 | #undef YMF_PASS_LDFLAGS | ||
| 361 | #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` | ||
| 362 | #endif /* defined (__GNUC__) && ! defined (LINKER) */ | ||
| 363 | |||
| 364 | #ifdef LINKER | ||
| 365 | LD=LINKER | ||
| 366 | #else /* not LINKER */ | ||
| 367 | LD=ld | ||
| 368 | #endif /* not LINKER */ | ||
| 369 | |||
| 370 | #endif /* not ORDINARY_LINK */ | ||
| 371 | |||
| 372 | |||
| 373 | #ifdef NS_IMPL_GNUSTEP | ||
| 374 | LD=$(CC) -rdynamic | ||
| 375 | #endif | ||
| 376 | |||
| 377 | |||
| 378 | /* lastfile must follow all files whose initialized data areas should | 341 | /* lastfile must follow all files whose initialized data areas should |
| 379 | be dumped as pure by dump-emacs. */ | 342 | be dumped as pure by dump-emacs. */ |
| 380 | obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ | 343 | obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ |
| @@ -634,29 +597,29 @@ SOME_MACHINE_LISP = ../lisp/mouse.elc \ | |||
| 634 | /* Construct full set of libraries to be linked. | 597 | /* Construct full set of libraries to be linked. |
| 635 | Note that SunOS needs -lm to come before -lc; otherwise, you get | 598 | Note that SunOS needs -lm to come before -lc; otherwise, you get |
| 636 | duplicated symbols. If the standard libraries were compiled | 599 | duplicated symbols. If the standard libraries were compiled |
| 637 | with GCC, we might need gnulib again after them. */ | 600 | with GCC, we might need LIB_GCC again after them. */ |
| 638 | 601 | ||
| 639 | LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ | 602 | LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ |
| 640 | $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ | 603 | $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ |
| 641 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ | 604 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ |
| 642 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ | 605 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ |
| 643 | $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR) | 606 | $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC) |
| 644 | 607 | ||
| 645 | all: emacs${EXEEXT} $(OTHER_FILES) | 608 | all: emacs${EXEEXT} $(OTHER_FILES) |
| 646 | 609 | ||
| 647 | /* Does anyone ever pay attention to the load-path-shadows output here? */ | 610 | /* Does anyone ever pay attention to the load-path-shadows output here? */ |
| 611 | /* The dumped Emacs is as functional and more efficient than | ||
| 612 | bootstrap-emacs, so we replace the latter with the former. */ | ||
| 648 | emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} | 613 | emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} |
| 649 | #ifdef CANNOT_DUMP | 614 | if test "${CANNOT_DUMP}" = "yes"; then \ |
| 650 | rm -f emacs${EXEEXT} | 615 | ln -f temacs${EXEEXT} emacs${EXEEXT}; \ |
| 651 | ln temacs${EXEEXT} emacs${EXEEXT} | 616 | EMACSLOADPATH=${lispsource} ./emacs -q -batch \ |
| 652 | -EMACSLOADPATH=${lispsource} ./emacs -q -batch -f list-load-path-shadows | 617 | -f list-load-path-shadows || true; \ |
| 653 | #else | 618 | else \ |
| 654 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump | 619 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \ |
| 655 | @: This new Emacs is as functional and more efficient then | 620 | ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}; \ |
| 656 | @: bootstrap-emacs, so let us replace it. | 621 | ./emacs -q -batch -f list-load-path-shadows || true; \ |
| 657 | -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} | 622 | fi |
| 658 | -./emacs -q -batch -f list-load-path-shadows | ||
| 659 | #endif /* ! defined (CANNOT_DUMP) */ | ||
| 660 | 623 | ||
| 661 | /* We run make-docfile twice because the command line may get too long | 624 | /* We run make-docfile twice because the command line may get too long |
| 662 | on some systems. */ | 625 | on some systems. */ |
| @@ -682,6 +645,8 @@ ${libsrc}make-docfile${EXEEXT}: | |||
| 682 | buildobj.h: Makefile | 645 | buildobj.h: Makefile |
| 683 | echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h | 646 | echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h |
| 684 | 647 | ||
| 648 | #define YMF_PASS_LDFLAGS(flags) @YMF_PASS_LDFLAGS@ | ||
| 649 | |||
| 685 | temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} | 650 | temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} |
| 686 | $(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ | 651 | $(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ |
| 687 | ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \ | 652 | ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \ |
| @@ -692,8 +657,9 @@ prefix-args${EXEEXT}: prefix-args.o $(config_h) | |||
| 692 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args | 657 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args |
| 693 | 658 | ||
| 694 | 659 | ||
| 695 | /* Only (possibly) used if HAVE_X11 && !USE_GTK, but no harm in always | 660 | /* The following oldxmenu-related rules are only (possibly) used if |
| 696 | defining. */ | 661 | HAVE_X11 && !USE_GTK, but there is no harm in always defining them |
| 662 | (provided we take a little care that OLDXMENU is never empty). */ | ||
| 697 | really-lwlib: | 663 | really-lwlib: |
| 698 | cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ | 664 | cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ |
| 699 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' | 665 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' |
| @@ -711,13 +677,10 @@ really-oldXMenu: | |||
| 711 | stamp-oldxmenu: ${OLDXMENU_DEPS} | 677 | stamp-oldxmenu: ${OLDXMENU_DEPS} |
| 712 | touch stamp-oldxmenu | 678 | touch stamp-oldxmenu |
| 713 | 679 | ||
| 714 | /* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */ | ||
| 715 | #if defined (HAVE_X11) && ! defined (USE_GTK) | ||
| 716 | /* Supply an ordering for parallel make. */ | 680 | /* Supply an ordering for parallel make. */ |
| 717 | ../src/$(OLDXMENU): ${OLDXMENU} | 681 | ../src/$(OLDXMENU): ${OLDXMENU} |
| 718 | 682 | ||
| 719 | $(OLDXMENU): $(OLDXMENU_TARGET) | 683 | $(OLDXMENU): $(OLDXMENU_TARGET) |
| 720 | #endif /* HAVE_X11 && !USE_GTK */ | ||
| 721 | 684 | ||
| 722 | ../config.status:: epaths.in | 685 | ../config.status:: epaths.in |
| 723 | @echo "The file epaths.h needs to be set up from epaths.in." | 686 | @echo "The file epaths.h needs to be set up from epaths.in." |
| @@ -730,278 +693,14 @@ $(OLDXMENU): $(OLDXMENU_TARGET) | |||
| 730 | exit 1 | 693 | exit 1 |
| 731 | 694 | ||
| 732 | ecrt0.o: ecrt0.c $(config_h) | 695 | ecrt0.o: ecrt0.c $(config_h) |
| 733 | #ifdef AUTO_DEPEND | 696 | @$(MKDEPDIR) |
| 734 | @-test -d deps || mkdir deps | ||
| 735 | #endif | ||
| 736 | $(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c | 697 | $(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c |
| 737 | doc.o: buildobj.h | 698 | doc.o: buildobj.h |
| 738 | 699 | ||
| 739 | #ifndef AUTO_DEPEND | 700 | |
| 740 | 701 | /* If HAVE_NS, some ns-specific rules (for OTHER_FILES) are inserted here. */ | |
| 741 | /* FIXME some of these dependencies are platform-specific. | 702 | @ns_frag@ |
| 742 | Eg callproc.c only depends on w32.h for WINDOWSNT builds. | 703 | |
| 743 | One way to fix this would be to replace w32.h (etc) by $(W32_H), | ||
| 744 | a variable set by configure. Does not seem worth the trouble. | ||
| 745 | Since the w32 build does not even use this file, you might ask | ||
| 746 | why these dependencies are here at all... | ||
| 747 | |||
| 748 | nsgui.h: In fact, every .o file depends directly or indirectly on | ||
| 749 | dispextern.h and hence nsgui.h under NS. But the ones that actually | ||
| 750 | use stuff there are more limited. */ | ||
| 751 | atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \ | ||
| 752 | $(config_h) | ||
| 753 | bidi.o: bidi.c buffer.h character.h dispextern.h lisp.h $(config_h) | ||
| 754 | buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \ | ||
| 755 | $(INTERVALS_H) blockinput.h atimer.h systime.h character.h \ | ||
| 756 | indent.h keyboard.h coding.h keymap.h frame.h lisp.h $(config_h) | ||
| 757 | callint.o: callint.c window.h commands.h buffer.h keymap.h \ | ||
| 758 | keyboard.h dispextern.h systime.h coding.h composite.h lisp.h $(config_h) | ||
| 759 | callproc.o: callproc.c epaths.h buffer.h commands.h lisp.h $(config_h) \ | ||
| 760 | process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \ | ||
| 761 | composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h \ | ||
| 762 | buffer.h | ||
| 763 | casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \ | ||
| 764 | composite.h keymap.h lisp.h $(config_h) | ||
| 765 | casetab.o: casetab.c buffer.h character.h lisp.h $(config_h) | ||
| 766 | category.o: category.c category.h buffer.h charset.h keymap.h \ | ||
| 767 | character.h lisp.h $(config_h) | ||
| 768 | ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h $(config_h) | ||
| 769 | character.o: character.c character.h buffer.h charset.h composite.h disptab.h \ | ||
| 770 | lisp.h $(config_h) | ||
| 771 | charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \ | ||
| 772 | disptab.h lisp.h $(config_h) | ||
| 773 | chartab.o: charset.h character.h ccl.h lisp.h $(config_h) | ||
| 774 | coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \ | ||
| 775 | window.h dispextern.h frame.h termhooks.h lisp.h $(config_h) | ||
| 776 | cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h lisp.h $(config_h) | ||
| 777 | cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h $(config_h) \ | ||
| 778 | msdos.h dispextern.h keyboard.h keymap.h systime.h coding.h frame.h \ | ||
| 779 | composite.h | ||
| 780 | pre-crt0.o: pre-crt0.c | ||
| 781 | dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h) | ||
| 782 | dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \ | ||
| 783 | coding.h regex.h systime.h blockinput.h atimer.h composite.h | ||
| 784 | dispnew.o: dispnew.c systime.h commands.h process.h frame.h coding.h \ | ||
| 785 | window.h buffer.h termchar.h termopts.h termhooks.h cm.h \ | ||
| 786 | disptab.h indent.h $(INTERVALS_H) nsgui.h \ | ||
| 787 | xterm.h blockinput.h atimer.h character.h msdos.h keyboard.h \ | ||
| 788 | syssignal.h lisp.h $(config_h) | ||
| 789 | doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h \ | ||
| 790 | character.h systime.h coding.h composite.h | ||
| 791 | doprnt.o: doprnt.c character.h lisp.h $(config_h) | ||
| 792 | dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ | ||
| 793 | msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ | ||
| 794 | lisp.h $(config_h) | ||
| 795 | editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ | ||
| 796 | coding.h frame.h blockinput.h atimer.h lisp.h $(config_h) | ||
| 797 | emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ | ||
| 798 | termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ | ||
| 799 | window.h dispextern.h keyboard.h keymap.h frame.h coding.h | ||
| 800 | fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ | ||
| 801 | coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h commands.h | ||
| 802 | filelock.o: filelock.c buffer.h character.h coding.h systime.h composite.h \ | ||
| 803 | lisp.h $(config_h) | ||
| 804 | filemode.o: filemode.c $(config_h) | ||
| 805 | frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ | ||
| 806 | blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \ | ||
| 807 | msdos.h dosfns.h dispextern.h w32term.h nsgui.h termchar.h coding.h \ | ||
| 808 | composite.h lisp.h $(config_h) termhooks.h ccl.h | ||
| 809 | fringe.o: fringe.c dispextern.h nsgui.h frame.h window.h buffer.h termhooks.h \ | ||
| 810 | blockinput.h atimer.h systime.h lisp.h $(config_h) | ||
| 811 | font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \ | ||
| 812 | font.h lisp.h $(config_h) buffer.h composite.h fontset.h xterm.h nsgui.h | ||
| 813 | ftfont.o: dispextern.h frame.h character.h charset.h composite.h font.h \ | ||
| 814 | lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h fontset.h \ | ||
| 815 | ccl.h ftfont.h | ||
| 816 | fontset.o: fontset.c fontset.h ccl.h buffer.h character.h \ | ||
| 817 | charset.h frame.h keyboard.h termhooks.h font.h lisp.h $(config_h) \ | ||
| 818 | blockinput.h atimer.h systime.h coding.h $(INTERVALS_H) nsgui.h \ | ||
| 819 | window.h xterm.h | ||
| 820 | getloadavg.o: getloadavg.c $(config_h) | ||
| 821 | gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h lisp.h $(config_h) \ | ||
| 822 | blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \ | ||
| 823 | charset.h coding.h syssignal.h dispextern.h composite.h | ||
| 824 | image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \ | ||
| 825 | systime.h xterm.h w32term.h w32gui.h font.h epaths.h character.h coding.h \ | ||
| 826 | nsterm.h nsgui.h lisp.h $(config_h) composite.h termhooks.h ccl.h | ||
| 827 | indent.o: indent.c frame.h window.h indent.h buffer.h lisp.h $(config_h) termchar.h \ | ||
| 828 | termopts.h disptab.h region-cache.h character.h category.h \ | ||
| 829 | keyboard.h systime.h coding.h $(INTERVALS_H) | ||
| 830 | insdel.o: insdel.c window.h buffer.h $(INTERVALS_H) blockinput.h character.h \ | ||
| 831 | dispextern.h atimer.h systime.h region-cache.h lisp.h $(config_h) | ||
| 832 | keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \ | ||
| 833 | commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \ | ||
| 834 | systime.h syntax.h $(INTERVALS_H) blockinput.h atimer.h composite.h \ | ||
| 835 | xterm.h puresize.h msdos.h keymap.h w32term.h nsterm.h nsgui.h coding.h \ | ||
| 836 | lisp.h $(config_h) | ||
| 837 | keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ | ||
| 838 | atimer.h systime.h puresize.h character.h charset.h $(INTERVALS_H) keymap.h window.h \ | ||
| 839 | coding.h frame.h lisp.h $(config_h) | ||
| 840 | lastfile.o: lastfile.c $(config_h) | ||
| 841 | macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \ | ||
| 842 | dispextern.h lisp.h $(config_h) systime.h coding.h composite.h | ||
| 843 | gmalloc.o: gmalloc.c $(config_h) | ||
| 844 | ralloc.o: ralloc.c lisp.h $(config_h) | ||
| 845 | vm-limit.o: vm-limit.c mem-limits.h lisp.h $(config_h) | ||
| 846 | marker.o: marker.c buffer.h character.h lisp.h $(config_h) | ||
| 847 | md5.o: md5.c md5.h $(config_h) | ||
| 848 | minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ | ||
| 849 | buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \ | ||
| 850 | termhooks.h lisp.h $(config_h) coding.h | ||
| 851 | mktime.o: mktime.c $(config_h) | ||
| 852 | msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ | ||
| 853 | termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ | ||
| 854 | keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h lisp.h $(config_h) | ||
| 855 | nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \ | ||
| 856 | dispextern.h fontset.h $(INTERVALS_H) keyboard.h blockinput.h \ | ||
| 857 | atimer.h systime.h epaths.h termhooks.h coding.h systime.h lisp.h $(config_h) | ||
| 858 | nsfont.o: nsterm.h dispextern.h frame.h lisp.h lisp.h $(config_h) | ||
| 859 | nsimage.o: nsimage.m nsterm.h lisp.h $(config_h) | ||
| 860 | nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \ | ||
| 861 | nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \ | ||
| 862 | nsterm.h lisp.h $(config_h) | ||
| 863 | nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \ | ||
| 864 | nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \ | ||
| 865 | termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \ | ||
| 866 | $(INTERVALS_H) process.h coding.h lisp.h $(config_h) | ||
| 867 | nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h lisp.h $(config_h) | ||
| 868 | process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \ | ||
| 869 | commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \ | ||
| 870 | blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \ | ||
| 871 | keyboard.h lisp.h $(config_h) character.h xgselect.h sysselect.h | ||
| 872 | regex.o: regex.c syntax.h buffer.h lisp.h $(config_h) regex.h category.h character.h | ||
| 873 | region-cache.o: region-cache.c buffer.h region-cache.h lisp.h $(config_h) | ||
| 874 | scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \ | ||
| 875 | termhooks.h lisp.h $(config_h) systime.h coding.h composite.h window.h | ||
| 876 | search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \ | ||
| 877 | blockinput.h atimer.h systime.h category.h character.h charset.h \ | ||
| 878 | $(INTERVALS_H) \ | ||
| 879 | lisp.h $(config_h) | ||
| 880 | sound.o: sound.c dispextern.h syssignal.h lisp.h $(config_h) atimer.h systime.h | ||
| 881 | strftime.o: strftime.c $(config_h) | ||
| 882 | syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \ | ||
| 883 | keymap.h regex.h $(INTERVALS_H) lisp.h $(config_h) | ||
| 884 | sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \ | ||
| 885 | process.h dispextern.h termhooks.h termchar.h termopts.h coding.h \ | ||
| 886 | frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h lisp.h $(config_h) \ | ||
| 887 | composite.h | ||
| 888 | term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) cm.h frame.h \ | ||
| 889 | disptab.h keyboard.h character.h charset.h coding.h ccl.h xterm.h \ | ||
| 890 | msdos.h window.h keymap.h blockinput.h atimer.h systime.h systty.h \ | ||
| 891 | syssignal.h $(INTERVALS_H) buffer.h | ||
| 892 | termcap.o: termcap.c lisp.h $(config_h) | ||
| 893 | terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ | ||
| 894 | keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h | ||
| 895 | terminfo.o: terminfo.c lisp.h $(config_h) | ||
| 896 | tparam.o: tparam.c lisp.h $(config_h) | ||
| 897 | undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h) | ||
| 898 | unexaix.o: unexaix.c lisp.h $(config_h) | ||
| 899 | unexalpha.o: unexalpha.c $(config_h) | ||
| 900 | unexcw.o: unexcw.c lisp.h $(config_h) | ||
| 901 | unexec.o: unexec.c lisp.h $(config_h) | ||
| 902 | unexelf.o: unexelf.c $(config_h) | ||
| 903 | unexhp9k800.o: unexhp9k800.c $(config_h) | ||
| 904 | unexmacosx.o: unexmacosx.c $(config_h) | ||
| 905 | unexsol.o: unexsol.c lisp.h $(config_h) | ||
| 906 | unexw32.o: unexw32.c $(config_h) | ||
| 907 | w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \ | ||
| 908 | msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h) | ||
| 909 | widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \ | ||
| 910 | $(srcdir)/../lwlib/lwlib.h lisp.h $(config_h) | ||
| 911 | window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ | ||
| 912 | disptab.h keyboard.h msdos.h coding.h termhooks.h \ | ||
| 913 | keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \ | ||
| 914 | xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h) | ||
| 915 | xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ | ||
| 916 | coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ | ||
| 917 | charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \ | ||
| 918 | xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \ | ||
| 919 | blockinput.h atimer.h systime.h keymap.h font.h | ||
| 920 | xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \ | ||
| 921 | window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \ | ||
| 922 | systime.h keyboard.h fontset.h w32term.h nsterm.h coding.h ccl.h \ | ||
| 923 | $(INTERVALS_H) nsgui.h termchar.h termhooks.h font.h lisp.h $(config_h) | ||
| 924 | xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \ | ||
| 925 | $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \ | ||
| 926 | character.h charset.h coding.h gtkutil.h lisp.h $(config_h) termhooks.h \ | ||
| 927 | fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h | ||
| 928 | xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ | ||
| 929 | font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h | ||
| 930 | xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ | ||
| 931 | font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h ftfont.h | ||
| 932 | ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ | ||
| 933 | font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h | ||
| 934 | menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \ | ||
| 935 | dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \ | ||
| 936 | lisp.h $(config_h) systime.h coding.h composite.h window.h atimer.h nsgui.h | ||
| 937 | xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \ | ||
| 938 | charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \ | ||
| 939 | systime.h gtkutil.h msdos.h coding.h menu.h lisp.h $(config_h) composite.h \ | ||
| 940 | keymap.h sysselect.h | ||
| 941 | xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \ | ||
| 942 | dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \ | ||
| 943 | keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \ | ||
| 944 | coding.h process.h gtkutil.h font.h fontset.h lisp.h $(config_h) \ | ||
| 945 | xsettings.h intervals.h keymap.h xgselect.h sysselect.h | ||
| 946 | xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \ | ||
| 947 | buffer.h atimer.h systime.h termhooks.h lisp.h $(config_h) keyboard.h \ | ||
| 948 | coding.h composite.h | ||
| 949 | xgselect.o: xgselect.h systime.h sysselect.h lisp.h $(config_h) | ||
| 950 | xrdb.o: xrdb.c lisp.h $(config_h) epaths.h | ||
| 951 | xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h xterm.h \ | ||
| 952 | lisp.h termopts.h frame.h dispextern.h | ||
| 953 | xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \ | ||
| 954 | dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h atimer.h \ | ||
| 955 | termopts.h | ||
| 956 | |||
| 957 | /* The files of Lisp proper. */ | ||
| 958 | alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \ | ||
| 959 | keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \ | ||
| 960 | $(INTERVALS_H) termhooks.h | ||
| 961 | bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \ | ||
| 962 | frame.h xterm.h lisp.h $(config_h) | ||
| 963 | data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \ | ||
| 964 | termhooks.h systime.h coding.h composite.h dispextern.h font.h ccl.h \ | ||
| 965 | lisp.h $(config_h) | ||
| 966 | eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \ | ||
| 967 | dispextern.h lisp.h $(config_h) coding.h composite.h xterm.h | ||
| 968 | floatfns.o: floatfns.c syssignal.h lisp.h $(config_h) | ||
| 969 | fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h keyboard.h \ | ||
| 970 | keymap.h window.h dispextern.h $(INTERVALS_H) coding.h md5.h \ | ||
| 971 | blockinput.h atimer.h systime.h xterm.h | ||
| 972 | print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ | ||
| 973 | lisp.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \ | ||
| 974 | blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h | ||
| 975 | lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ | ||
| 976 | charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \ | ||
| 977 | systime.h frame.h blockinput.h atimer.h | ||
| 978 | |||
| 979 | /* Text properties support. */ | ||
| 980 | composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \ | ||
| 981 | frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h) | ||
| 982 | intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \ | ||
| 983 | keymap.h lisp.h $(config_h) systime.h coding.h | ||
| 984 | textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \ | ||
| 985 | lisp.h $(config_h) | ||
| 986 | |||
| 987 | #endif /* ! AUTO_DEPEND */ | ||
| 988 | |||
| 989 | /* System-specific programs to be made. | ||
| 990 | OTHER_FILES select which of these should be compiled. */ | ||
| 991 | |||
| 992 | #ifdef HAVE_NS | ||
| 993 | ${ns_appdir}: ${ns_appsrc} | ||
| 994 | rm -fr ${ns_appdir} | ||
| 995 | mkdir -p ${ns_appdir} | ||
| 996 | ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - ) | ||
| 997 | #endif /* HAVE_NS */ | ||
| 998 | |||
| 999 | /* These are only used if HAVE_NS, but no harm in always defining them. */ | ||
| 1000 | ${ns_appbindir}Emacs: emacs${EXEEXT} | ||
| 1001 | mkdir -p ${ns_appbindir} | ||
| 1002 | cp -f emacs${EXEEXT} ${ns_appbindir}Emacs | ||
| 1003 | |||
| 1004 | ns-app: ${ns_appdir} ${ns_appbindir}Emacs | ||
| 1005 | 704 | ||
| 1006 | mostlyclean: | 705 | mostlyclean: |
| 1007 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 706 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| @@ -1010,7 +709,7 @@ mostlyclean: | |||
| 1010 | rm -f buildobj.h | 709 | rm -f buildobj.h |
| 1011 | clean: mostlyclean | 710 | clean: mostlyclean |
| 1012 | rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} | 711 | rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} |
| 1013 | -rm -rf deps | 712 | -rm -rf ${DEPDIR} |
| 1014 | test "X${ns_appdir}" = "X" || rm -rf ${ns_appdir} | 713 | test "X${ns_appdir}" = "X" || rm -rf ${ns_appdir} |
| 1015 | 714 | ||
| 1016 | /* bootstrap-clean is used to clean up just before a bootstrap. | 715 | /* bootstrap-clean is used to clean up just before a bootstrap. |
| @@ -1102,16 +801,14 @@ ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) | |||
| 1102 | 801 | ||
| 1103 | bootstrap-emacs${EXEEXT}: temacs${EXEEXT} | 802 | bootstrap-emacs${EXEEXT}: temacs${EXEEXT} |
| 1104 | cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs | 803 | cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs |
| 1105 | #ifdef CANNOT_DUMP | 804 | if test "${CANNOT_DUMP}" = "yes"; then \ |
| 1106 | ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT} | 805 | ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT}; \ |
| 1107 | #else | 806 | else \ |
| 1108 | $(RUN_TEMACS) --batch --load loadup bootstrap | 807 | $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \ |
| 1109 | mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} | 808 | mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}; \ |
| 1110 | #endif /* ! defined (CANNOT_DUMP) */ | 809 | fi |
| 1111 | @: Compile some files earlier to speed up further compilation. | 810 | @: Compile some files earlier to speed up further compilation. |
| 1112 | cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe} | 811 | cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe} |
| 1113 | 812 | ||
| 1114 | #ifdef AUTO_DEPEND | 813 | /* Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. */ |
| 1115 | ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o | 814 | @deps_frag@ |
| 1116 | -include $(ALLOBJS:%.o=deps/%.d) | ||
| 1117 | #endif | ||
diff --git a/src/autodeps.mk b/src/autodeps.mk new file mode 100644 index 00000000000..a5d2a04dcf4 --- /dev/null +++ b/src/autodeps.mk | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | /* autodeps.mk --- src/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | This is inserted in src/Makefile if AUTO_DEPEND=yes. */ | ||
| 4 | |||
| 5 | ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o | ||
| 6 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) | ||
diff --git a/src/bidi.c b/src/bidi.c index dbc95608fea..bdeccfee97c 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -543,6 +543,7 @@ bidi_copy_it (struct bidi_it *to, struct bidi_it *from) | |||
| 543 | #define BIDI_CACHE_CHUNK 200 | 543 | #define BIDI_CACHE_CHUNK 200 |
| 544 | static struct bidi_it *bidi_cache; | 544 | static struct bidi_it *bidi_cache; |
| 545 | static size_t bidi_cache_size = 0; | 545 | static size_t bidi_cache_size = 0; |
| 546 | static size_t elsz = sizeof (struct bidi_it); | ||
| 546 | static int bidi_cache_idx; /* next unused cache slot */ | 547 | static int bidi_cache_idx; /* next unused cache slot */ |
| 547 | static int bidi_cache_last_idx; /* slot of last cache hit */ | 548 | static int bidi_cache_last_idx; /* slot of last cache hit */ |
| 548 | 549 | ||
| @@ -558,8 +559,9 @@ bidi_cache_shrink (void) | |||
| 558 | { | 559 | { |
| 559 | if (bidi_cache_size > BIDI_CACHE_CHUNK) | 560 | if (bidi_cache_size > BIDI_CACHE_CHUNK) |
| 560 | { | 561 | { |
| 561 | bidi_cache_size = BIDI_CACHE_CHUNK * sizeof (struct bidi_it); | 562 | bidi_cache_size = BIDI_CACHE_CHUNK; |
| 562 | bidi_cache = (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); | 563 | bidi_cache = |
| 564 | (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size * elsz); | ||
| 563 | } | 565 | } |
| 564 | bidi_cache_reset (); | 566 | bidi_cache_reset (); |
| 565 | } | 567 | } |
| @@ -688,9 +690,9 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved) | |||
| 688 | /* Enlarge the cache as needed. */ | 690 | /* Enlarge the cache as needed. */ |
| 689 | if (idx >= bidi_cache_size) | 691 | if (idx >= bidi_cache_size) |
| 690 | { | 692 | { |
| 691 | bidi_cache_size += BIDI_CACHE_CHUNK * sizeof (struct bidi_it); | 693 | bidi_cache_size += BIDI_CACHE_CHUNK; |
| 692 | bidi_cache = | 694 | bidi_cache = |
| 693 | (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); | 695 | (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size * elsz); |
| 694 | } | 696 | } |
| 695 | /* Character positions should correspond to cache positions 1:1. | 697 | /* Character positions should correspond to cache positions 1:1. |
| 696 | If we are outside the range of cached positions, the cache is | 698 | If we are outside the range of cached positions, the cache is |
| @@ -705,7 +707,6 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved) | |||
| 705 | bidi_copy_it (&bidi_cache[idx], bidi_it); | 707 | bidi_copy_it (&bidi_cache[idx], bidi_it); |
| 706 | if (!resolved) | 708 | if (!resolved) |
| 707 | bidi_cache[idx].resolved_level = -1; | 709 | bidi_cache[idx].resolved_level = -1; |
| 708 | bidi_cache[idx].new_paragraph = 0; | ||
| 709 | } | 710 | } |
| 710 | else | 711 | else |
| 711 | { | 712 | { |
diff --git a/src/config.in b/src/config.in index 99a95d7f15d..e7122bf665b 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -27,9 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #define EMACS_CONFIG_H | 27 | #define EMACS_CONFIG_H |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | /* Generate dependencies with gcc. */ | ||
| 31 | #undef AUTO_DEPEND | ||
| 32 | |||
| 33 | /* Define to 1 if the mktime function is broken. */ | 30 | /* Define to 1 if the mktime function is broken. */ |
| 34 | #undef BROKEN_MKTIME | 31 | #undef BROKEN_MKTIME |
| 35 | 32 | ||
| @@ -841,6 +838,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 841 | /* Define to 1 if you are using NS windowing under GNUstep. */ | 838 | /* Define to 1 if you are using NS windowing under GNUstep. */ |
| 842 | #undef NS_IMPL_GNUSTEP | 839 | #undef NS_IMPL_GNUSTEP |
| 843 | 840 | ||
| 841 | /* Define if the C compiler is the linker. */ | ||
| 842 | #undef ORDINARY_LINK | ||
| 843 | |||
| 844 | /* Define to the address where bug reports for this package should be sent. */ | 844 | /* Define to the address where bug reports for this package should be sent. */ |
| 845 | #undef PACKAGE_BUGREPORT | 845 | #undef PACKAGE_BUGREPORT |
| 846 | 846 | ||
diff --git a/src/deps.mk b/src/deps.mk new file mode 100644 index 00000000000..08a435da6a9 --- /dev/null +++ b/src/deps.mk | |||
| @@ -0,0 +1,279 @@ | |||
| 1 | /* deps.mk --- src/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002, | ||
| 4 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | ||
| 5 | Free Software Foundation, Inc. | ||
| 6 | |||
| 7 | This file is part of GNU Emacs. | ||
| 8 | |||
| 9 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 10 | it under the terms of the GNU General Public License as published by | ||
| 11 | the Free Software Foundation, either version 3 of the License, or | ||
| 12 | (at your option) any later version. | ||
| 13 | |||
| 14 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | GNU General Public License for more details. | ||
| 18 | |||
| 19 | You should have received a copy of the GNU General Public License | ||
| 20 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 21 | |||
| 22 | Commentary: | ||
| 23 | |||
| 24 | This file is inserted in src/Makefile if AUTO_DEPEND=no. | ||
| 25 | It defines static dependencies between the various source files. | ||
| 26 | |||
| 27 | FIXME some of these dependencies are platform-specific. | ||
| 28 | Eg callproc.c only depends on w32.h for WINDOWSNT builds. | ||
| 29 | One way to fix this would be to replace w32.h (etc) by $(W32_H), | ||
| 30 | a variable set by configure. Does not seem worth the trouble. | ||
| 31 | Since the w32 build does not even use this file, you might ask | ||
| 32 | why these dependencies are here at all... | ||
| 33 | |||
| 34 | nsgui.h: In fact, every .o file depends directly or indirectly on | ||
| 35 | dispextern.h and hence nsgui.h under NS. But the ones that actually | ||
| 36 | use stuff there are more limited. | ||
| 37 | |||
| 38 | Code: */ | ||
| 39 | |||
| 40 | atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \ | ||
| 41 | $(config_h) | ||
| 42 | bidi.o: bidi.c buffer.h character.h dispextern.h lisp.h $(config_h) | ||
| 43 | buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \ | ||
| 44 | $(INTERVALS_H) blockinput.h atimer.h systime.h character.h \ | ||
| 45 | indent.h keyboard.h coding.h keymap.h frame.h lisp.h $(config_h) | ||
| 46 | callint.o: callint.c window.h commands.h buffer.h keymap.h \ | ||
| 47 | keyboard.h dispextern.h systime.h coding.h composite.h lisp.h $(config_h) | ||
| 48 | callproc.o: callproc.c epaths.h buffer.h commands.h lisp.h $(config_h) \ | ||
| 49 | process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \ | ||
| 50 | composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h \ | ||
| 51 | buffer.h | ||
| 52 | casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \ | ||
| 53 | composite.h keymap.h lisp.h $(config_h) | ||
| 54 | casetab.o: casetab.c buffer.h character.h lisp.h $(config_h) | ||
| 55 | category.o: category.c category.h buffer.h charset.h keymap.h \ | ||
| 56 | character.h lisp.h $(config_h) | ||
| 57 | ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h $(config_h) | ||
| 58 | character.o: character.c character.h buffer.h charset.h composite.h disptab.h \ | ||
| 59 | lisp.h $(config_h) | ||
| 60 | charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \ | ||
| 61 | disptab.h lisp.h $(config_h) | ||
| 62 | chartab.o: charset.h character.h ccl.h lisp.h $(config_h) | ||
| 63 | coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \ | ||
| 64 | window.h dispextern.h frame.h termhooks.h lisp.h $(config_h) | ||
| 65 | cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h lisp.h $(config_h) | ||
| 66 | cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h \ | ||
| 67 | $(config_h) msdos.h dispextern.h keyboard.h keymap.h systime.h \ | ||
| 68 | coding.h frame.h composite.h | ||
| 69 | pre-crt0.o: pre-crt0.c | ||
| 70 | dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h) | ||
| 71 | dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \ | ||
| 72 | coding.h regex.h systime.h blockinput.h atimer.h composite.h | ||
| 73 | dispnew.o: dispnew.c systime.h commands.h process.h frame.h coding.h \ | ||
| 74 | window.h buffer.h termchar.h termopts.h termhooks.h cm.h \ | ||
| 75 | disptab.h indent.h $(INTERVALS_H) nsgui.h \ | ||
| 76 | xterm.h blockinput.h atimer.h character.h msdos.h keyboard.h \ | ||
| 77 | syssignal.h lisp.h $(config_h) | ||
| 78 | doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h \ | ||
| 79 | character.h systime.h coding.h composite.h | ||
| 80 | doprnt.o: doprnt.c character.h lisp.h $(config_h) | ||
| 81 | dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ | ||
| 82 | msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ | ||
| 83 | lisp.h $(config_h) | ||
| 84 | editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ | ||
| 85 | coding.h frame.h blockinput.h atimer.h lisp.h $(config_h) | ||
| 86 | emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ | ||
| 87 | termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ | ||
| 88 | window.h dispextern.h keyboard.h keymap.h frame.h coding.h | ||
| 89 | fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ | ||
| 90 | coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h commands.h | ||
| 91 | filelock.o: filelock.c buffer.h character.h coding.h systime.h composite.h \ | ||
| 92 | lisp.h $(config_h) | ||
| 93 | filemode.o: filemode.c $(config_h) | ||
| 94 | frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ | ||
| 95 | blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \ | ||
| 96 | msdos.h dosfns.h dispextern.h w32term.h nsgui.h termchar.h coding.h \ | ||
| 97 | composite.h lisp.h $(config_h) termhooks.h ccl.h | ||
| 98 | fringe.o: fringe.c dispextern.h nsgui.h frame.h window.h buffer.h termhooks.h \ | ||
| 99 | blockinput.h atimer.h systime.h lisp.h $(config_h) | ||
| 100 | font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \ | ||
| 101 | font.h lisp.h $(config_h) buffer.h composite.h fontset.h xterm.h nsgui.h | ||
| 102 | ftfont.o: dispextern.h frame.h character.h charset.h composite.h font.h \ | ||
| 103 | lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h fontset.h \ | ||
| 104 | ccl.h ftfont.h | ||
| 105 | fontset.o: fontset.c fontset.h ccl.h buffer.h character.h \ | ||
| 106 | charset.h frame.h keyboard.h termhooks.h font.h lisp.h $(config_h) \ | ||
| 107 | blockinput.h atimer.h systime.h coding.h $(INTERVALS_H) nsgui.h \ | ||
| 108 | window.h xterm.h | ||
| 109 | getloadavg.o: getloadavg.c $(config_h) | ||
| 110 | gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h lisp.h $(config_h) \ | ||
| 111 | blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \ | ||
| 112 | charset.h coding.h syssignal.h dispextern.h composite.h | ||
| 113 | image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \ | ||
| 114 | systime.h xterm.h w32term.h w32gui.h font.h epaths.h character.h coding.h \ | ||
| 115 | nsterm.h nsgui.h lisp.h $(config_h) composite.h termhooks.h ccl.h | ||
| 116 | indent.o: indent.c frame.h window.h indent.h buffer.h lisp.h $(config_h) \ | ||
| 117 | termchar.h termopts.h disptab.h region-cache.h character.h category.h \ | ||
| 118 | keyboard.h systime.h coding.h $(INTERVALS_H) | ||
| 119 | insdel.o: insdel.c window.h buffer.h $(INTERVALS_H) blockinput.h character.h \ | ||
| 120 | dispextern.h atimer.h systime.h region-cache.h lisp.h $(config_h) | ||
| 121 | keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \ | ||
| 122 | commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \ | ||
| 123 | systime.h syntax.h $(INTERVALS_H) blockinput.h atimer.h composite.h \ | ||
| 124 | xterm.h puresize.h msdos.h keymap.h w32term.h nsterm.h nsgui.h coding.h \ | ||
| 125 | lisp.h $(config_h) | ||
| 126 | keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ | ||
| 127 | atimer.h systime.h puresize.h character.h charset.h $(INTERVALS_H) \ | ||
| 128 | keymap.h window.h coding.h frame.h lisp.h $(config_h) | ||
| 129 | lastfile.o: lastfile.c $(config_h) | ||
| 130 | macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \ | ||
| 131 | dispextern.h lisp.h $(config_h) systime.h coding.h composite.h | ||
| 132 | gmalloc.o: gmalloc.c $(config_h) | ||
| 133 | ralloc.o: ralloc.c lisp.h $(config_h) | ||
| 134 | vm-limit.o: vm-limit.c mem-limits.h lisp.h $(config_h) | ||
| 135 | marker.o: marker.c buffer.h character.h lisp.h $(config_h) | ||
| 136 | md5.o: md5.c md5.h $(config_h) | ||
| 137 | minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ | ||
| 138 | buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \ | ||
| 139 | termhooks.h lisp.h $(config_h) coding.h | ||
| 140 | mktime.o: mktime.c $(config_h) | ||
| 141 | msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ | ||
| 142 | termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ | ||
| 143 | keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h \ | ||
| 144 | lisp.h $(config_h) | ||
| 145 | nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \ | ||
| 146 | dispextern.h fontset.h $(INTERVALS_H) keyboard.h blockinput.h \ | ||
| 147 | atimer.h systime.h epaths.h termhooks.h coding.h systime.h lisp.h $(config_h) | ||
| 148 | nsfont.o: nsterm.h dispextern.h frame.h lisp.h lisp.h $(config_h) | ||
| 149 | nsimage.o: nsimage.m nsterm.h lisp.h $(config_h) | ||
| 150 | nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \ | ||
| 151 | nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \ | ||
| 152 | nsterm.h lisp.h $(config_h) | ||
| 153 | nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \ | ||
| 154 | nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \ | ||
| 155 | termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \ | ||
| 156 | $(INTERVALS_H) process.h coding.h lisp.h $(config_h) | ||
| 157 | nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h lisp.h $(config_h) | ||
| 158 | process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \ | ||
| 159 | commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \ | ||
| 160 | blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \ | ||
| 161 | keyboard.h lisp.h $(config_h) character.h xgselect.h sysselect.h | ||
| 162 | regex.o: regex.c syntax.h buffer.h lisp.h $(config_h) regex.h \ | ||
| 163 | category.h character.h | ||
| 164 | region-cache.o: region-cache.c buffer.h region-cache.h lisp.h $(config_h) | ||
| 165 | scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \ | ||
| 166 | termhooks.h lisp.h $(config_h) systime.h coding.h composite.h window.h | ||
| 167 | search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \ | ||
| 168 | blockinput.h atimer.h systime.h category.h character.h charset.h \ | ||
| 169 | $(INTERVALS_H) \ | ||
| 170 | lisp.h $(config_h) | ||
| 171 | sound.o: sound.c dispextern.h syssignal.h lisp.h $(config_h) atimer.h systime.h | ||
| 172 | strftime.o: strftime.c $(config_h) | ||
| 173 | syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \ | ||
| 174 | keymap.h regex.h $(INTERVALS_H) lisp.h $(config_h) | ||
| 175 | sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \ | ||
| 176 | process.h dispextern.h termhooks.h termchar.h termopts.h coding.h \ | ||
| 177 | frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h lisp.h \ | ||
| 178 | $(config_h) composite.h | ||
| 179 | term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) \ | ||
| 180 | cm.h frame.h disptab.h keyboard.h character.h charset.h coding.h ccl.h \ | ||
| 181 | xterm.h msdos.h window.h keymap.h blockinput.h atimer.h systime.h \ | ||
| 182 | systty.h syssignal.h $(INTERVALS_H) buffer.h | ||
| 183 | termcap.o: termcap.c lisp.h $(config_h) | ||
| 184 | terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ | ||
| 185 | keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h | ||
| 186 | terminfo.o: terminfo.c lisp.h $(config_h) | ||
| 187 | tparam.o: tparam.c lisp.h $(config_h) | ||
| 188 | undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h) | ||
| 189 | unexaix.o: unexaix.c lisp.h $(config_h) | ||
| 190 | unexalpha.o: unexalpha.c $(config_h) | ||
| 191 | unexcw.o: unexcw.c lisp.h $(config_h) | ||
| 192 | unexec.o: unexec.c lisp.h $(config_h) | ||
| 193 | unexelf.o: unexelf.c $(config_h) | ||
| 194 | unexhp9k800.o: unexhp9k800.c $(config_h) | ||
| 195 | unexmacosx.o: unexmacosx.c $(config_h) | ||
| 196 | unexsol.o: unexsol.c lisp.h $(config_h) | ||
| 197 | unexw32.o: unexw32.c $(config_h) | ||
| 198 | w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \ | ||
| 199 | msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h) | ||
| 200 | widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \ | ||
| 201 | $(srcdir)/../lwlib/lwlib.h lisp.h $(config_h) | ||
| 202 | window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ | ||
| 203 | disptab.h keyboard.h msdos.h coding.h termhooks.h \ | ||
| 204 | keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \ | ||
| 205 | xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h) | ||
| 206 | xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ | ||
| 207 | coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ | ||
| 208 | charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \ | ||
| 209 | xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \ | ||
| 210 | blockinput.h atimer.h systime.h keymap.h font.h | ||
| 211 | xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \ | ||
| 212 | window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \ | ||
| 213 | systime.h keyboard.h fontset.h w32term.h nsterm.h coding.h ccl.h \ | ||
| 214 | $(INTERVALS_H) nsgui.h termchar.h termhooks.h font.h lisp.h $(config_h) | ||
| 215 | xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \ | ||
| 216 | $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \ | ||
| 217 | character.h charset.h coding.h gtkutil.h lisp.h $(config_h) termhooks.h \ | ||
| 218 | fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h | ||
| 219 | xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ | ||
| 220 | font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h | ||
| 221 | xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ | ||
| 222 | font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h ftfont.h | ||
| 223 | ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ | ||
| 224 | font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h | ||
| 225 | menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \ | ||
| 226 | dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \ | ||
| 227 | lisp.h $(config_h) systime.h coding.h composite.h window.h atimer.h nsgui.h | ||
| 228 | xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \ | ||
| 229 | charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \ | ||
| 230 | systime.h gtkutil.h msdos.h coding.h menu.h lisp.h $(config_h) composite.h \ | ||
| 231 | keymap.h sysselect.h | ||
| 232 | xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \ | ||
| 233 | dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \ | ||
| 234 | keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \ | ||
| 235 | coding.h process.h gtkutil.h font.h fontset.h lisp.h $(config_h) \ | ||
| 236 | xsettings.h intervals.h keymap.h xgselect.h sysselect.h | ||
| 237 | xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \ | ||
| 238 | buffer.h atimer.h systime.h termhooks.h lisp.h $(config_h) keyboard.h \ | ||
| 239 | coding.h composite.h | ||
| 240 | xgselect.o: xgselect.h systime.h sysselect.h lisp.h $(config_h) | ||
| 241 | xrdb.o: xrdb.c lisp.h $(config_h) epaths.h | ||
| 242 | xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h \ | ||
| 243 | xterm.h lisp.h termopts.h frame.h dispextern.h | ||
| 244 | xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \ | ||
| 245 | dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h \ | ||
| 246 | atimer.h termopts.h | ||
| 247 | |||
| 248 | /* The files of Lisp proper. */ | ||
| 249 | alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \ | ||
| 250 | keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \ | ||
| 251 | $(INTERVALS_H) termhooks.h | ||
| 252 | bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \ | ||
| 253 | frame.h xterm.h lisp.h $(config_h) | ||
| 254 | data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \ | ||
| 255 | termhooks.h systime.h coding.h composite.h dispextern.h font.h ccl.h \ | ||
| 256 | lisp.h $(config_h) | ||
| 257 | eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \ | ||
| 258 | dispextern.h lisp.h $(config_h) coding.h composite.h xterm.h | ||
| 259 | floatfns.o: floatfns.c syssignal.h lisp.h $(config_h) | ||
| 260 | fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h \ | ||
| 261 | keyboard.h keymap.h window.h dispextern.h $(INTERVALS_H) coding.h md5.h \ | ||
| 262 | blockinput.h atimer.h systime.h xterm.h | ||
| 263 | print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ | ||
| 264 | lisp.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \ | ||
| 265 | blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h | ||
| 266 | lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ | ||
| 267 | charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \ | ||
| 268 | systime.h frame.h blockinput.h atimer.h | ||
| 269 | |||
| 270 | /* Text properties support. */ | ||
| 271 | composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \ | ||
| 272 | frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h) | ||
| 273 | intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \ | ||
| 274 | keymap.h lisp.h $(config_h) systime.h coding.h | ||
| 275 | textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \ | ||
| 276 | lisp.h $(config_h) | ||
| 277 | |||
| 278 | |||
| 279 | /* deps.mk ends here */ | ||
diff --git a/src/dispextern.h b/src/dispextern.h index a68bc3e9899..f0d14c0e487 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -748,21 +748,29 @@ struct glyph_row | |||
| 748 | 748 | ||
| 749 | /* First position in this row. This is the text position, including | 749 | /* First position in this row. This is the text position, including |
| 750 | overlay position information etc, where the display of this row | 750 | overlay position information etc, where the display of this row |
| 751 | started, and can thus be less the position of the first glyph | 751 | started, and can thus be less than the position of the first |
| 752 | (e.g. due to invisible text or horizontal scrolling). BIDI Note: | 752 | glyph (e.g. due to invisible text or horizontal scrolling). |
| 753 | This is the smallest character position in the row, but not | 753 | BIDI Note: In R2L rows, that have its reversed_p flag set, this |
| 754 | necessarily the character that is the leftmost on the display. */ | 754 | position is at or beyond the right edge of the row. */ |
| 755 | struct display_pos start; | 755 | struct display_pos start; |
| 756 | 756 | ||
| 757 | /* Text position at the end of this row. This is the position after | 757 | /* Text position at the end of this row. This is the position after |
| 758 | the last glyph on this row. It can be greater than the last | 758 | the last glyph on this row. It can be greater than the last |
| 759 | glyph position + 1, due to truncation, invisible text etc. In an | 759 | glyph position + 1, due to a newline that ends the line, |
| 760 | up-to-date display, this should always be equal to the start | 760 | truncation, invisible text etc. In an up-to-date display, this |
| 761 | position of the next row. BIDI Note: this is the character whose | 761 | should always be equal to the start position of the next row. |
| 762 | buffer position is the largest, but not necessarily the rightmost | 762 | BIDI Note: In R2L rows, this position is at or beyond the left |
| 763 | one on the display. */ | 763 | edge of the row. */ |
| 764 | struct display_pos end; | 764 | struct display_pos end; |
| 765 | 765 | ||
| 766 | /* The smallest and the largest buffer positions that contributed to | ||
| 767 | glyphs in this row. Note that due to bidi reordering, these are | ||
| 768 | in general different from the text positions stored in `start' | ||
| 769 | and `end' members above, and also different from the buffer | ||
| 770 | positions recorded in the glyphs displayed the leftmost and | ||
| 771 | rightmost on the screen. */ | ||
| 772 | struct text_pos minpos, maxpos; | ||
| 773 | |||
| 766 | /* Non-zero means the overlay arrow bitmap is on this line. | 774 | /* Non-zero means the overlay arrow bitmap is on this line. |
| 767 | -1 means use default overlay arrow bitmap, else | 775 | -1 means use default overlay arrow bitmap, else |
| 768 | it specifies actual fringe bitmap number. */ | 776 | it specifies actual fringe bitmap number. */ |
| @@ -947,16 +955,16 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int)); | |||
| 947 | displayed by ROW, which is not necessarily the smallest horizontal | 955 | displayed by ROW, which is not necessarily the smallest horizontal |
| 948 | position. */ | 956 | position. */ |
| 949 | 957 | ||
| 950 | #define MATRIX_ROW_START_CHARPOS(ROW) ((ROW)->start.pos.charpos) | 958 | #define MATRIX_ROW_START_CHARPOS(ROW) ((ROW)->minpos.charpos) |
| 951 | #define MATRIX_ROW_START_BYTEPOS(ROW) ((ROW)->start.pos.bytepos) | 959 | #define MATRIX_ROW_START_BYTEPOS(ROW) ((ROW)->minpos.bytepos) |
| 952 | 960 | ||
| 953 | /* Return the character/ byte position at which ROW ends. BIDI Note: | 961 | /* Return the character/ byte position at which ROW ends. BIDI Note: |
| 954 | this is the largest character/byte position among characters in | 962 | this is the largest character/byte position among characters in |
| 955 | ROW, i.e. the last logical-order character displayed by ROW, which | 963 | ROW, i.e. the last logical-order character displayed by ROW, which |
| 956 | is not necessarily the largest horizontal position. */ | 964 | is not necessarily the largest horizontal position. */ |
| 957 | 965 | ||
| 958 | #define MATRIX_ROW_END_CHARPOS(ROW) ((ROW)->end.pos.charpos) | 966 | #define MATRIX_ROW_END_CHARPOS(ROW) ((ROW)->maxpos.charpos) |
| 959 | #define MATRIX_ROW_END_BYTEPOS(ROW) ((ROW)->end.pos.bytepos) | 967 | #define MATRIX_ROW_END_BYTEPOS(ROW) ((ROW)->maxpos.bytepos) |
| 960 | 968 | ||
| 961 | /* Return the vertical position of ROW in MATRIX. */ | 969 | /* Return the vertical position of ROW in MATRIX. */ |
| 962 | 970 | ||
| @@ -1789,7 +1797,7 @@ struct bidi_it { | |||
| 1789 | EMACS_INT next_en_pos; /* position of next EN char for ET */ | 1797 | EMACS_INT next_en_pos; /* position of next EN char for ET */ |
| 1790 | EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ | 1798 | EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ |
| 1791 | bidi_dir_t sor; /* direction of start-of-run in effect */ | 1799 | bidi_dir_t sor; /* direction of start-of-run in effect */ |
| 1792 | int scan_dir; /* direction of text scan */ | 1800 | int scan_dir; /* direction of text scan, 1: forw, -1: back */ |
| 1793 | int stack_idx; /* index of current data on the stack */ | 1801 | int stack_idx; /* index of current data on the stack */ |
| 1794 | /* Note: Everything from here on is not copied/saved when the bidi | 1802 | /* Note: Everything from here on is not copied/saved when the bidi |
| 1795 | iterator state is saved, pushed, or popped. So only put here | 1803 | iterator state is saved, pushed, or popped. So only put here |
| @@ -2913,8 +2921,8 @@ void mark_window_display_accurate P_ ((Lisp_Object, int)); | |||
| 2913 | void redisplay_preserve_echo_area P_ ((int)); | 2921 | void redisplay_preserve_echo_area P_ ((int)); |
| 2914 | int set_cursor_from_row P_ ((struct window *, struct glyph_row *, | 2922 | int set_cursor_from_row P_ ((struct window *, struct glyph_row *, |
| 2915 | struct glyph_matrix *, int, int, int, int)); | 2923 | struct glyph_matrix *, int, int, int, int)); |
| 2916 | void init_iterator P_ ((struct it *, struct window *, int, | 2924 | void init_iterator P_ ((struct it *, struct window *, EMACS_INT, |
| 2917 | int, struct glyph_row *, enum face_id)); | 2925 | EMACS_INT, struct glyph_row *, enum face_id)); |
| 2918 | void init_iterator_to_row_start P_ ((struct it *, struct window *, | 2926 | void init_iterator_to_row_start P_ ((struct it *, struct window *, |
| 2919 | struct glyph_row *)); | 2927 | struct glyph_row *)); |
| 2920 | int get_next_display_element P_ ((struct it *)); | 2928 | int get_next_display_element P_ ((struct it *)); |
diff --git a/src/dispnew.c b/src/dispnew.c index 7ab2bf35811..476b58ae7e3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1188,6 +1188,10 @@ increment_row_positions (row, delta, delta_bytes) | |||
| 1188 | MATRIX_ROW_START_BYTEPOS (row) += delta_bytes; | 1188 | MATRIX_ROW_START_BYTEPOS (row) += delta_bytes; |
| 1189 | MATRIX_ROW_END_CHARPOS (row) += delta; | 1189 | MATRIX_ROW_END_CHARPOS (row) += delta; |
| 1190 | MATRIX_ROW_END_BYTEPOS (row) += delta_bytes; | 1190 | MATRIX_ROW_END_BYTEPOS (row) += delta_bytes; |
| 1191 | CHARPOS (row->start.pos) += delta; | ||
| 1192 | BYTEPOS (row->start.pos) += delta_bytes; | ||
| 1193 | CHARPOS (row->end.pos) += delta; | ||
| 1194 | BYTEPOS (row->end.pos) += delta_bytes; | ||
| 1191 | 1195 | ||
| 1192 | if (!row->enabled_p) | 1196 | if (!row->enabled_p) |
| 1193 | return; | 1197 | return; |
| @@ -1748,13 +1752,19 @@ check_matrix_invariants (w) | |||
| 1748 | /* Check that character and byte positions are in sync. */ | 1752 | /* Check that character and byte positions are in sync. */ |
| 1749 | xassert (MATRIX_ROW_START_BYTEPOS (row) | 1753 | xassert (MATRIX_ROW_START_BYTEPOS (row) |
| 1750 | == CHAR_TO_BYTE (MATRIX_ROW_START_CHARPOS (row))); | 1754 | == CHAR_TO_BYTE (MATRIX_ROW_START_CHARPOS (row))); |
| 1755 | xassert (BYTEPOS (row->start.pos) | ||
| 1756 | == CHAR_TO_BYTE (CHARPOS (row->start.pos))); | ||
| 1751 | 1757 | ||
| 1752 | /* CHAR_TO_BYTE aborts when invoked for a position > Z. We can | 1758 | /* CHAR_TO_BYTE aborts when invoked for a position > Z. We can |
| 1753 | have such a position temporarily in case of a minibuffer | 1759 | have such a position temporarily in case of a minibuffer |
| 1754 | displaying something like `[Sole completion]' at its end. */ | 1760 | displaying something like `[Sole completion]' at its end. */ |
| 1755 | if (MATRIX_ROW_END_CHARPOS (row) < BUF_ZV (current_buffer)) | 1761 | if (MATRIX_ROW_END_CHARPOS (row) < BUF_ZV (current_buffer)) |
| 1756 | xassert (MATRIX_ROW_END_BYTEPOS (row) | 1762 | { |
| 1757 | == CHAR_TO_BYTE (MATRIX_ROW_END_CHARPOS (row))); | 1763 | xassert (MATRIX_ROW_END_BYTEPOS (row) |
| 1764 | == CHAR_TO_BYTE (MATRIX_ROW_END_CHARPOS (row))); | ||
| 1765 | xassert (BYTEPOS (row->end.pos) | ||
| 1766 | == CHAR_TO_BYTE (CHARPOS (row->end.pos))); | ||
| 1767 | } | ||
| 1758 | 1768 | ||
| 1759 | /* Check that end position of `row' is equal to start position | 1769 | /* Check that end position of `row' is equal to start position |
| 1760 | of next row. */ | 1770 | of next row. */ |
| @@ -1764,6 +1774,8 @@ check_matrix_invariants (w) | |||
| 1764 | == MATRIX_ROW_START_CHARPOS (next)); | 1774 | == MATRIX_ROW_START_CHARPOS (next)); |
| 1765 | xassert (MATRIX_ROW_END_BYTEPOS (row) | 1775 | xassert (MATRIX_ROW_END_BYTEPOS (row) |
| 1766 | == MATRIX_ROW_START_BYTEPOS (next)); | 1776 | == MATRIX_ROW_START_BYTEPOS (next)); |
| 1777 | xassert (CHARPOS (row->end.pos) == CHARPOS (next->start.pos)); | ||
| 1778 | xassert (BYTEPOS (row->end.pos) == BYTEPOS (next->start.pos)); | ||
| 1767 | } | 1779 | } |
| 1768 | row = next; | 1780 | row = next; |
| 1769 | } | 1781 | } |
diff --git a/src/fileio.c b/src/fileio.c index 85685ebc9c4..de32bfecd34 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2194,7 +2194,10 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal, | |||
| 2194 | return Qnil; | 2194 | return Qnil; |
| 2195 | } | 2195 | } |
| 2196 | 2196 | ||
| 2197 | DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2, "fDelete file: \nP", | 2197 | DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2, |
| 2198 | "(list (read-file-name \"Delete file: \" nil default-directory \ | ||
| 2199 | (confirm-nonexistent-file-or-buffer)) \ | ||
| 2200 | current-prefix-arg)", | ||
| 2198 | doc: /* Delete file named FILENAME. If it is a symlink, remove the symlink. | 2201 | doc: /* Delete file named FILENAME. If it is a symlink, remove the symlink. |
| 2199 | If file has multiple names, it continues to exist with the other names. | 2202 | If file has multiple names, it continues to exist with the other names. |
| 2200 | 2203 | ||
diff --git a/src/image.c b/src/image.c index 030e06ad77a..b9620e10948 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1582,29 +1582,56 @@ clear_image_cache (struct frame *f, Lisp_Object filter) | |||
| 1582 | { | 1582 | { |
| 1583 | struct image_cache *c = FRAME_IMAGE_CACHE (f); | 1583 | struct image_cache *c = FRAME_IMAGE_CACHE (f); |
| 1584 | 1584 | ||
| 1585 | if (c && (!NILP (filter) || INTEGERP (Vimage_cache_eviction_delay))) | 1585 | if (c) |
| 1586 | { | 1586 | { |
| 1587 | EMACS_TIME t; | 1587 | int i, nfreed = 0; |
| 1588 | unsigned long old; | ||
| 1589 | int i, nfreed; | ||
| 1590 | |||
| 1591 | EMACS_GET_TIME (t); | ||
| 1592 | old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); | ||
| 1593 | 1588 | ||
| 1594 | /* Block input so that we won't be interrupted by a SIGIO | 1589 | /* Block input so that we won't be interrupted by a SIGIO |
| 1595 | while being in an inconsistent state. */ | 1590 | while being in an inconsistent state. */ |
| 1596 | BLOCK_INPUT; | 1591 | BLOCK_INPUT; |
| 1597 | 1592 | ||
| 1598 | for (i = nfreed = 0; i < c->used; ++i) | 1593 | if (!NILP (filter)) |
| 1599 | { | 1594 | { |
| 1600 | struct image *img = c->images[i]; | 1595 | /* Filter image cache. */ |
| 1601 | if (img != NULL | 1596 | for (i = 0; i < c->used; ++i) |
| 1602 | && (NILP (filter) ? img->timestamp < old | ||
| 1603 | : (EQ (Qt, filter) | ||
| 1604 | || !NILP (Fmember (filter, img->dependencies))))) | ||
| 1605 | { | 1597 | { |
| 1606 | free_image (f, img); | 1598 | struct image *img = c->images[i]; |
| 1607 | ++nfreed; | 1599 | if (img && (EQ (Qt, filter) |
| 1600 | || !NILP (Fmember (filter, img->dependencies)))) | ||
| 1601 | { | ||
| 1602 | free_image (f, img); | ||
| 1603 | ++nfreed; | ||
| 1604 | } | ||
| 1605 | } | ||
| 1606 | } | ||
| 1607 | else if (INTEGERP (Vimage_cache_eviction_delay)) | ||
| 1608 | { | ||
| 1609 | /* Free cache based on timestamp. */ | ||
| 1610 | EMACS_TIME t; | ||
| 1611 | unsigned long old; | ||
| 1612 | int delay, nimages = 0; | ||
| 1613 | |||
| 1614 | for (i = 0; i < c->used; ++i) | ||
| 1615 | if (c->images[i]) | ||
| 1616 | nimages++; | ||
| 1617 | |||
| 1618 | /* If the number of cached images has grown unusually large, | ||
| 1619 | decrease the cache eviction delay (Bug#6230). */ | ||
| 1620 | delay = XFASTINT (Vimage_cache_eviction_delay); | ||
| 1621 | if (nimages > 40) | ||
| 1622 | delay = max (1, 1600 * delay / (nimages*nimages)); | ||
| 1623 | |||
| 1624 | EMACS_GET_TIME (t); | ||
| 1625 | old = EMACS_SECS (t) - delay; | ||
| 1626 | |||
| 1627 | for (i = 0; i < c->used; ++i) | ||
| 1628 | { | ||
| 1629 | struct image *img = c->images[i]; | ||
| 1630 | if (img && img->timestamp < old) | ||
| 1631 | { | ||
| 1632 | free_image (f, img); | ||
| 1633 | ++nfreed; | ||
| 1634 | } | ||
| 1608 | } | 1635 | } |
| 1609 | } | 1636 | } |
| 1610 | 1637 | ||
| @@ -1662,11 +1689,13 @@ which is then usually a filename. */) | |||
| 1662 | } | 1689 | } |
| 1663 | 1690 | ||
| 1664 | 1691 | ||
| 1665 | DEFUN ("image-refresh", Fimage_refresh, Simage_refresh, | 1692 | DEFUN ("image-flush", Fimage_flush, Simage_flush, |
| 1666 | 1, 2, 0, | 1693 | 1, 2, 0, |
| 1667 | doc: /* Refresh the image with specification SPEC on frame FRAME. | 1694 | doc: /* Fush the image with specification SPEC on frame FRAME. |
| 1668 | If SPEC specifies an image file, the displayed image is updated with | 1695 | This removes the image from the Emacs image cache. If SPEC specifies |
| 1669 | the current contents of that file. | 1696 | an image file, the next redisplay of this image will read from the |
| 1697 | current contents of that file. | ||
| 1698 | |||
| 1670 | FRAME nil or omitted means use the selected frame. | 1699 | FRAME nil or omitted means use the selected frame. |
| 1671 | FRAME t means refresh the image on all frames. */) | 1700 | FRAME t means refresh the image on all frames. */) |
| 1672 | (spec, frame) | 1701 | (spec, frame) |
| @@ -8499,7 +8528,7 @@ non-numeric, there is no explicit limit on the size of images. */); | |||
| 8499 | 8528 | ||
| 8500 | defsubr (&Sinit_image_library); | 8529 | defsubr (&Sinit_image_library); |
| 8501 | defsubr (&Sclear_image_cache); | 8530 | defsubr (&Sclear_image_cache); |
| 8502 | defsubr (&Simage_refresh); | 8531 | defsubr (&Simage_flush); |
| 8503 | defsubr (&Simage_size); | 8532 | defsubr (&Simage_size); |
| 8504 | defsubr (&Simage_mask_p); | 8533 | defsubr (&Simage_mask_p); |
| 8505 | defsubr (&Simage_metadata); | 8534 | defsubr (&Simage_metadata); |
| @@ -8520,11 +8549,14 @@ A cross is always drawn on black & white displays. */); | |||
| 8520 | Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); | 8549 | Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); |
| 8521 | 8550 | ||
| 8522 | DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, | 8551 | DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, |
| 8523 | doc: /* Time after which cached images are removed from the cache. | 8552 | doc: /* Maximum time after which images are removed from the cache. |
| 8524 | When an image has not been displayed this many seconds, remove it | 8553 | When an image has not been displayed this many seconds, Emacs |
| 8525 | from the image cache. Value must be an integer or nil with nil | 8554 | automatically removes it from the image cache. If the cache contains |
| 8526 | meaning don't clear the cache. */); | 8555 | a large number of images, the actual eviction time may be shorter. |
| 8527 | Vimage_cache_eviction_delay = make_number (30 * 60); | 8556 | The value can also be nil, meaning the cache is never cleared. |
| 8557 | |||
| 8558 | The function `clear-image-cache' disregards this variable. */); | ||
| 8559 | Vimage_cache_eviction_delay = make_number (300); | ||
| 8528 | } | 8560 | } |
| 8529 | 8561 | ||
| 8530 | void | 8562 | void |
diff --git a/src/keyboard.c b/src/keyboard.c index 74efb856852..63372d600e3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11985,7 +11985,7 @@ The value `kill-region' is special; it means that the previous command | |||
| 11985 | was a kill command. | 11985 | was a kill command. |
| 11986 | 11986 | ||
| 11987 | `last-command' has a separate binding for each terminal device. | 11987 | `last-command' has a separate binding for each terminal device. |
| 11988 | See Info node `(elisp)Multiple displays'. */); | 11988 | See Info node `(elisp)Multiple Terminals'. */); |
| 11989 | 11989 | ||
| 11990 | DEFVAR_KBOARD ("real-last-command", Vreal_last_command, | 11990 | DEFVAR_KBOARD ("real-last-command", Vreal_last_command, |
| 11991 | doc: /* Same as `last-command', but never altered by Lisp code. */); | 11991 | doc: /* Same as `last-command', but never altered by Lisp code. */); |
| @@ -12123,8 +12123,8 @@ untranslated. In a vector, an element which is nil means "no translation". | |||
| 12123 | This is applied to the characters supplied to input methods, not their | 12123 | This is applied to the characters supplied to input methods, not their |
| 12124 | output. See also `translation-table-for-input'. | 12124 | output. See also `translation-table-for-input'. |
| 12125 | 12125 | ||
| 12126 | This variable has a separate binding for each terminal. See Info node | 12126 | This variable has a separate binding for each terminal. |
| 12127 | `(elisp)Multiple displays'. */); | 12127 | See Info node `(elisp)Multiple Terminals'. */); |
| 12128 | 12128 | ||
| 12129 | DEFVAR_BOOL ("cannot-suspend", &cannot_suspend, | 12129 | DEFVAR_BOOL ("cannot-suspend", &cannot_suspend, |
| 12130 | doc: /* Non-nil means to always spawn a subshell instead of suspending. | 12130 | doc: /* Non-nil means to always spawn a subshell instead of suspending. |
| @@ -12215,7 +12215,7 @@ set up a different keymap for reading the next command. | |||
| 12215 | 12215 | ||
| 12216 | `overriding-terminal-local-map' has a separate binding for each | 12216 | `overriding-terminal-local-map' has a separate binding for each |
| 12217 | terminal device. | 12217 | terminal device. |
| 12218 | See Info node `(elisp)Multiple displays'. */); | 12218 | See Info node `(elisp)Multiple Terminals'. */); |
| 12219 | 12219 | ||
| 12220 | DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map, | 12220 | DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map, |
| 12221 | doc: /* Keymap that overrides all other local keymaps. | 12221 | doc: /* Keymap that overrides all other local keymaps. |
| @@ -12243,7 +12243,7 @@ numeric keysym code (sans the \"system-specific\" bit 1<<28) | |||
| 12243 | and SYMBOL is its name. | 12243 | and SYMBOL is its name. |
| 12244 | 12244 | ||
| 12245 | `system-key-alist' has a separate binding for each terminal device. | 12245 | `system-key-alist' has a separate binding for each terminal device. |
| 12246 | See Info node `(elisp)Multiple displays'. */); | 12246 | See Info node `(elisp)Multiple Terminals'. */); |
| 12247 | 12247 | ||
| 12248 | DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map, | 12248 | DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map, |
| 12249 | doc: /* Keymap that translates key sequences to key sequences during input. | 12249 | doc: /* Keymap that translates key sequences to key sequences during input. |
| @@ -12269,7 +12269,7 @@ Typing `ESC O P' to `read-key-sequence' would return [f1]. Typing | |||
| 12269 | typing `ESC O P x' would return [f1 x]. | 12269 | typing `ESC O P x' would return [f1 x]. |
| 12270 | 12270 | ||
| 12271 | `local-function-key-map' has a separate binding for each terminal | 12271 | `local-function-key-map' has a separate binding for each terminal |
| 12272 | device. See Info node `(elisp)Multiple displays'. If you need to | 12272 | device. See Info node `(elisp)Multiple Terminals'. If you need to |
| 12273 | define a binding on all terminals, change `function-key-map' | 12273 | define a binding on all terminals, change `function-key-map' |
| 12274 | instead. Initially, `local-function-key-map' is an empty keymap that | 12274 | instead. Initially, `local-function-key-map' is an empty keymap that |
| 12275 | has `function-key-map' as its parent on all terminal devices. */); | 12275 | has `function-key-map' as its parent on all terminal devices. */); |
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index fda3007cb74..d6aa0c713c6 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h | |||
| @@ -62,8 +62,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 62 | /* On the 64 bit architecture, we can use 60 bits for addresses */ | 62 | /* On the 64 bit architecture, we can use 60 bits for addresses */ |
| 63 | #define VALBITS 60 | 63 | #define VALBITS 60 |
| 64 | 64 | ||
| 65 | #define LINKER $(CC) -nostdlib | ||
| 66 | |||
| 67 | /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ | 65 | /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ |
| 68 | #define XPNTR(a) XUINT (a) | 66 | #define XPNTR(a) XUINT (a) |
| 69 | 67 | ||
diff --git a/src/m/macppc.h b/src/m/macppc.h index b9dcf3bdc92..f348286030c 100644 --- a/src/m/macppc.h +++ b/src/m/macppc.h | |||
| @@ -32,12 +32,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | #define HAVE_TEXT_START | 32 | #define HAVE_TEXT_START |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | /* NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says this is needed | ||
| 36 | For MkLinux/LinuxPPC. */ | ||
| 37 | #ifdef GNU_LINUX | ||
| 38 | #define LINKER $(CC) -nostdlib | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifdef _ARCH_PPC64 | 35 | #ifdef _ARCH_PPC64 |
| 42 | #ifndef _LP64 | 36 | #ifndef _LP64 |
| 43 | #define _LP64 | 37 | #define _LP64 |
diff --git a/src/ns.mk b/src/ns.mk new file mode 100644 index 00000000000..255ffa7046b --- /dev/null +++ b/src/ns.mk | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* autodeps.mk --- src/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | Commentary: | ||
| 21 | |||
| 22 | This is inserted in src/Makefile if HAVE_NS. | ||
| 23 | |||
| 24 | The only reason this is in a separate file is because $ns_appdir, | ||
| 25 | which appears as a target, is empty on non-NS builds. Some makes | ||
| 26 | do not like empty targets, even if they are never used. */ | ||
| 27 | |||
| 28 | ${ns_appdir}: ${ns_appsrc} | ||
| 29 | rm -fr ${ns_appdir} | ||
| 30 | mkdir -p ${ns_appdir} | ||
| 31 | ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - ) | ||
| 32 | |||
| 33 | ${ns_appbindir}Emacs: emacs${EXEEXT} | ||
| 34 | mkdir -p ${ns_appbindir} | ||
| 35 | cp -f emacs${EXEEXT} ${ns_appbindir}Emacs | ||
| 36 | |||
| 37 | ns-app: ${ns_appdir} ${ns_appbindir}Emacs | ||
| 38 | |||
| 39 | /* ns.mk ends here */ | ||
diff --git a/src/process.c b/src/process.c index a09ac297a2d..acc13ea199b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3347,11 +3347,25 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3347 | /* :service SERVICE -- string, integer (port number), or t (random port). */ | 3347 | /* :service SERVICE -- string, integer (port number), or t (random port). */ |
| 3348 | service = Fplist_get (contact, QCservice); | 3348 | service = Fplist_get (contact, QCservice); |
| 3349 | 3349 | ||
| 3350 | /* :host HOST -- hostname, ip address, or 'local for localhost. */ | ||
| 3351 | host = Fplist_get (contact, QChost); | ||
| 3352 | if (!NILP (host)) | ||
| 3353 | { | ||
| 3354 | if (EQ (host, Qlocal)) | ||
| 3355 | host = build_string ("localhost"); | ||
| 3356 | CHECK_STRING (host); | ||
| 3357 | } | ||
| 3358 | |||
| 3350 | #ifdef HAVE_LOCAL_SOCKETS | 3359 | #ifdef HAVE_LOCAL_SOCKETS |
| 3351 | if (family == AF_LOCAL) | 3360 | if (family == AF_LOCAL) |
| 3352 | { | 3361 | { |
| 3353 | /* Host is not used. */ | 3362 | if (!NILP (host)) |
| 3354 | host = Qnil; | 3363 | { |
| 3364 | message (":family local ignores the :host \"%s\" property", | ||
| 3365 | SDATA (host)); | ||
| 3366 | contact = Fplist_put (contact, QChost, Qnil); | ||
| 3367 | host = Qnil; | ||
| 3368 | } | ||
| 3355 | CHECK_STRING (service); | 3369 | CHECK_STRING (service); |
| 3356 | bzero (&address_un, sizeof address_un); | 3370 | bzero (&address_un, sizeof address_un); |
| 3357 | address_un.sun_family = AF_LOCAL; | 3371 | address_un.sun_family = AF_LOCAL; |
| @@ -3362,15 +3376,6 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3362 | } | 3376 | } |
| 3363 | #endif | 3377 | #endif |
| 3364 | 3378 | ||
| 3365 | /* :host HOST -- hostname, ip address, or 'local for localhost. */ | ||
| 3366 | host = Fplist_get (contact, QChost); | ||
| 3367 | if (!NILP (host)) | ||
| 3368 | { | ||
| 3369 | if (EQ (host, Qlocal)) | ||
| 3370 | host = build_string ("localhost"); | ||
| 3371 | CHECK_STRING (host); | ||
| 3372 | } | ||
| 3373 | |||
| 3374 | /* Slow down polling to every ten seconds. | 3379 | /* Slow down polling to every ten seconds. |
| 3375 | Some kernels have a bug which causes retrying connect to fail | 3380 | Some kernels have a bug which causes retrying connect to fail |
| 3376 | after a connect. Polling can interfere with gethostbyname too. */ | 3381 | after a connect. Polling can interfere with gethostbyname too. */ |
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index cdb97b7f9fa..5212c432843 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h | |||
| @@ -61,11 +61,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 61 | /* The kernel symbol where the load average is found is named avenrun. */ | 61 | /* The kernel symbol where the load average is found is named avenrun. */ |
| 62 | #define LDAV_SYMBOL "avenrun" | 62 | #define LDAV_SYMBOL "avenrun" |
| 63 | 63 | ||
| 64 | /* Special itemss needed to make Emacs run on this system. */ | 64 | /* Special items needed to make Emacs run on this system. */ |
| 65 | |||
| 66 | #ifndef __GNUC__ | ||
| 67 | #define LINKER cc | ||
| 68 | #endif | ||
| 69 | 65 | ||
| 70 | /* The following definition seems to be needed in AIX version 3.1.6.8. | 66 | /* The following definition seems to be needed in AIX version 3.1.6.8. |
| 71 | It may not have been needed in certain earlier versions. */ | 67 | It may not have been needed in certain earlier versions. */ |
| @@ -110,7 +106,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 110 | 106 | ||
| 111 | #define UNEXEC unexaix.o | 107 | #define UNEXEC unexaix.o |
| 112 | 108 | ||
| 113 | #define ORDINARY_LINK | ||
| 114 | |||
| 115 | /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562 | 109 | /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562 |
| 116 | (do not change this comment) */ | 110 | (do not change this comment) */ |
diff --git a/src/s/cygwin.h b/src/s/cygwin.h index e2afb7ddc44..b6d0c7c88ff 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* System description header file for Cygwin. | 1 | /* System description header file for Cygwin. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 2005, 2006, | 3 | Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 2005, 2006, |
| 4 | 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 | 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License | |||
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | /* SYSTEM_TYPE should indicate the kind of system you are using. | 21 | /* SYSTEM_TYPE should indicate the kind of system you are using. |
| 22 | It sets the Lisp variable system-type. */ | 22 | It sets the Lisp variable system-type. */ |
| 23 | #define SYSTEM_TYPE "cygwin" | 23 | #define SYSTEM_TYPE "cygwin" |
| 24 | 24 | ||
| 25 | /* Emacs can read input using SIGIO and buffering characters itself, | 25 | /* Emacs can read input using SIGIO and buffering characters itself, |
| @@ -94,7 +94,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 94 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | 94 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) |
| 95 | #define SYSV_SYSTEM_DIR 1 | 95 | #define SYSV_SYSTEM_DIR 1 |
| 96 | #define UNEXEC unexcw.o | 96 | #define UNEXEC unexcw.o |
| 97 | #define LINKER $(CC) | ||
| 98 | 97 | ||
| 99 | #define HAVE_SOCKETS | 98 | #define HAVE_SOCKETS |
| 100 | 99 | ||
diff --git a/src/s/darwin.h b/src/s/darwin.h index 76c0054cd3f..a30360576a8 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h | |||
| @@ -147,9 +147,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 147 | #undef HAVE_POSIX_MEMALIGN | 147 | #undef HAVE_POSIX_MEMALIGN |
| 148 | #endif | 148 | #endif |
| 149 | 149 | ||
| 150 | /* Link this program just by running cc. */ | ||
| 151 | #define ORDINARY_LINK | ||
| 152 | |||
| 153 | /* Define the following so emacs symbols will not conflict with those | 150 | /* Define the following so emacs symbols will not conflict with those |
| 154 | in the System framework. Otherwise -prebind will not work. */ | 151 | in the System framework. Otherwise -prebind will not work. */ |
| 155 | 152 | ||
diff --git a/src/s/gnu.h b/src/s/gnu.h index cb4c4a9d807..4567f4e9f4f 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h | |||
| @@ -29,8 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | 29 | ||
| 30 | #define SIGNALS_VIA_CHARACTERS | 30 | #define SIGNALS_VIA_CHARACTERS |
| 31 | 31 | ||
| 32 | /* GNU needs its own crt0, and libc defines data_start. */ | 32 | /* libc defines data_start. */ |
| 33 | #define ORDINARY_LINK | ||
| 34 | #define DATA_START ({ extern int data_start; (char *) &data_start; }) | 33 | #define DATA_START ({ extern int data_start; (char *) &data_start; }) |
| 35 | 34 | ||
| 36 | /* Some losing code fails to include this and then assumes | 35 | /* Some losing code fails to include this and then assumes |
diff --git a/src/s/msdos.h b/src/s/msdos.h index 90f630c8627..c78096c6b90 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h | |||
| @@ -82,8 +82,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 82 | 82 | ||
| 83 | #define _NAIVE_DOS_REGS | 83 | #define _NAIVE_DOS_REGS |
| 84 | 84 | ||
| 85 | #define ORDINARY_LINK | ||
| 86 | |||
| 87 | /* command.com does not understand `...` so we define this. */ | 85 | /* command.com does not understand `...` so we define this. */ |
| 88 | #define SEPCHAR ';' | 86 | #define SEPCHAR ';' |
| 89 | 87 | ||
diff --git a/src/s/netbsd.h b/src/s/netbsd.h index 4874ec9af56..af8fd00a6bd 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h | |||
| @@ -26,12 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | 26 | ||
| 27 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | 27 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) |
| 28 | 28 | ||
| 29 | /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears | ||
| 30 | the library search parth, i.e. it won't search /usr/lib | ||
| 31 | for libc and friends. Using -nostartfiles instead avoids | ||
| 32 | this problem, and will also work on earlier NetBSD releases. */ | ||
| 33 | #define LINKER $(CC) -nostartfiles | ||
| 34 | |||
| 35 | #define DEFAULT_SOUND_DEVICE "/dev/audio" | 29 | #define DEFAULT_SOUND_DEVICE "/dev/audio" |
| 36 | 30 | ||
| 37 | /* Greg A. Woods <woods@weird.com> says we must include signal.h | 31 | /* Greg A. Woods <woods@weird.com> says we must include signal.h |
diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h index f870086368c..85499fb1124 100644 --- a/src/s/usg5-4.h +++ b/src/s/usg5-4.h | |||
| @@ -69,8 +69,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 69 | /* On USG systems signal handlers return void. */ | 69 | /* On USG systems signal handlers return void. */ |
| 70 | #define SIGTYPE void | 70 | #define SIGTYPE void |
| 71 | 71 | ||
| 72 | #define ORDINARY_LINK | ||
| 73 | |||
| 74 | /* Undump with ELF. */ | 72 | /* Undump with ELF. */ |
| 75 | #undef COFF | 73 | #undef COFF |
| 76 | 74 | ||
| @@ -5700,7 +5700,34 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 5700 | } | 5700 | } |
| 5701 | else | 5701 | else |
| 5702 | #endif | 5702 | #endif |
| 5703 | nchars = _write (fd, buffer, count); | 5703 | { |
| 5704 | /* Some networked filesystems don't like too large writes, so | ||
| 5705 | break them into smaller chunks. See the Comments section of | ||
| 5706 | the MSDN documentation of WriteFile for details behind the | ||
| 5707 | choice of the value of CHUNK below. See also the thread | ||
| 5708 | http://thread.gmane.org/gmane.comp.version-control.git/145294 | ||
| 5709 | in the git mailing list. */ | ||
| 5710 | const unsigned char *p = buffer; | ||
| 5711 | const unsigned chunk = 30 * 1024 * 1024; | ||
| 5712 | |||
| 5713 | nchars = 0; | ||
| 5714 | while (count > 0) | ||
| 5715 | { | ||
| 5716 | unsigned this_chunk = count < chunk ? count : chunk; | ||
| 5717 | int n = _write (fd, p, this_chunk); | ||
| 5718 | |||
| 5719 | nchars += n; | ||
| 5720 | if (n < 0) | ||
| 5721 | { | ||
| 5722 | nchars = n; | ||
| 5723 | break; | ||
| 5724 | } | ||
| 5725 | else if (n < this_chunk) | ||
| 5726 | break; | ||
| 5727 | count -= n; | ||
| 5728 | p += n; | ||
| 5729 | } | ||
| 5730 | } | ||
| 5704 | 5731 | ||
| 5705 | return nchars; | 5732 | return nchars; |
| 5706 | } | 5733 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 177a0a7e018..699f375e2f4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2598,7 +2598,7 @@ void | |||
| 2598 | init_iterator (it, w, charpos, bytepos, row, base_face_id) | 2598 | init_iterator (it, w, charpos, bytepos, row, base_face_id) |
| 2599 | struct it *it; | 2599 | struct it *it; |
| 2600 | struct window *w; | 2600 | struct window *w; |
| 2601 | int charpos, bytepos; | 2601 | EMACS_INT charpos, bytepos; |
| 2602 | struct glyph_row *row; | 2602 | struct glyph_row *row; |
| 2603 | enum face_id base_face_id; | 2603 | enum face_id base_face_id; |
| 2604 | { | 2604 | { |
| @@ -3012,7 +3012,7 @@ init_from_display_pos (it, w, pos) | |||
| 3012 | struct window *w; | 3012 | struct window *w; |
| 3013 | struct display_pos *pos; | 3013 | struct display_pos *pos; |
| 3014 | { | 3014 | { |
| 3015 | int charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos); | 3015 | EMACS_INT charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos); |
| 3016 | int i, overlay_strings_with_newlines = 0; | 3016 | int i, overlay_strings_with_newlines = 0; |
| 3017 | 3017 | ||
| 3018 | /* If POS specifies a position in a display vector, this might | 3018 | /* If POS specifies a position in a display vector, this might |
| @@ -12486,22 +12486,25 @@ redisplay_internal (preserve_echo_area) | |||
| 12486 | if (windows_or_buffers_changed && !pause) | 12486 | if (windows_or_buffers_changed && !pause) |
| 12487 | goto retry; | 12487 | goto retry; |
| 12488 | 12488 | ||
| 12489 | /* Clear the face cache eventually. */ | 12489 | /* Clear the face and image caches. |
| 12490 | if (consider_all_windows_p) | 12490 | |
| 12491 | We used to do this only if consider_all_windows_p. But the cache | ||
| 12492 | needs to be cleared if a timer creates images in the current | ||
| 12493 | buffer (e.g. the test case in Bug#6230). */ | ||
| 12494 | |||
| 12495 | if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT) | ||
| 12491 | { | 12496 | { |
| 12492 | if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT) | 12497 | clear_face_cache (0); |
| 12493 | { | 12498 | clear_face_cache_count = 0; |
| 12494 | clear_face_cache (0); | 12499 | } |
| 12495 | clear_face_cache_count = 0; | 12500 | |
| 12496 | } | ||
| 12497 | #ifdef HAVE_WINDOW_SYSTEM | 12501 | #ifdef HAVE_WINDOW_SYSTEM |
| 12498 | if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT) | 12502 | if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT) |
| 12499 | { | 12503 | { |
| 12500 | clear_image_caches (Qnil); | 12504 | clear_image_caches (Qnil); |
| 12501 | clear_image_cache_count = 0; | 12505 | clear_image_cache_count = 0; |
| 12502 | } | ||
| 12503 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 12504 | } | 12506 | } |
| 12507 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 12505 | 12508 | ||
| 12506 | end_of_redisplay: | 12509 | end_of_redisplay: |
| 12507 | unbind_to (count, Qnil); | 12510 | unbind_to (count, Qnil); |
| @@ -14959,7 +14962,7 @@ try_window_reusing_current_matrix (w) | |||
| 14959 | /* The variable new_start now holds the new window start. The old | 14962 | /* The variable new_start now holds the new window start. The old |
| 14960 | start `start' can be determined from the current matrix. */ | 14963 | start `start' can be determined from the current matrix. */ |
| 14961 | SET_TEXT_POS_FROM_MARKER (new_start, w->start); | 14964 | SET_TEXT_POS_FROM_MARKER (new_start, w->start); |
| 14962 | start = start_row->start.pos; | 14965 | start = start_row->minpos; |
| 14963 | start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); | 14966 | start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); |
| 14964 | 14967 | ||
| 14965 | /* Clear the desired matrix for the display below. */ | 14968 | /* Clear the desired matrix for the display below. */ |
| @@ -14998,7 +15001,7 @@ try_window_reusing_current_matrix (w) | |||
| 14998 | { | 15001 | { |
| 14999 | /* Advance to the next row as the "start". */ | 15002 | /* Advance to the next row as the "start". */ |
| 15000 | start_row++; | 15003 | start_row++; |
| 15001 | start = start_row->start.pos; | 15004 | start = start_row->minpos; |
| 15002 | /* If there are no more rows to try, or just one, give up. */ | 15005 | /* If there are no more rows to try, or just one, give up. */ |
| 15003 | if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 | 15006 | if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 |
| 15004 | || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row) | 15007 | || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row) |
| @@ -15280,39 +15283,26 @@ try_window_reusing_current_matrix (w) | |||
| 15280 | { | 15283 | { |
| 15281 | struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; | 15284 | struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; |
| 15282 | struct glyph *end = glyph + row->used[TEXT_AREA]; | 15285 | struct glyph *end = glyph + row->used[TEXT_AREA]; |
| 15283 | struct glyph *orig_glyph = glyph; | ||
| 15284 | struct cursor_pos orig_cursor = w->cursor; | ||
| 15285 | 15286 | ||
| 15286 | for (; glyph < end | 15287 | /* Can't use this optimization with bidi-reordered glyph |
| 15287 | && (!BUFFERP (glyph->object) | 15288 | rows, unless cursor is already at point. */ |
| 15288 | || glyph->charpos != PT); | 15289 | if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering)) |
| 15289 | glyph++) | ||
| 15290 | { | ||
| 15291 | w->cursor.hpos++; | ||
| 15292 | w->cursor.x += glyph->pixel_width; | ||
| 15293 | } | ||
| 15294 | /* With bidi reordering, charpos changes non-linearly | ||
| 15295 | with hpos, so the right glyph could be to the | ||
| 15296 | left. */ | ||
| 15297 | if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering) | ||
| 15298 | && (!BUFFERP (glyph->object) || glyph->charpos != PT)) | ||
| 15299 | { | 15290 | { |
| 15300 | struct glyph *start_glyph = row->glyphs[TEXT_AREA]; | 15291 | if (!(w->cursor.hpos >= 0 |
| 15301 | 15292 | && w->cursor.hpos < row->used[TEXT_AREA] | |
| 15302 | glyph = orig_glyph - 1; | 15293 | && BUFFERP (glyph->object) |
| 15303 | orig_cursor.hpos--; | 15294 | && glyph->charpos == PT)) |
| 15304 | orig_cursor.x -= glyph->pixel_width; | 15295 | return 0; |
| 15305 | for (; glyph >= start_glyph | ||
| 15306 | && (!BUFFERP (glyph->object) | ||
| 15307 | || glyph->charpos != PT); | ||
| 15308 | glyph--) | ||
| 15309 | { | ||
| 15310 | w->cursor.hpos--; | ||
| 15311 | w->cursor.x -= glyph->pixel_width; | ||
| 15312 | } | ||
| 15313 | if (BUFFERP (glyph->object) && glyph->charpos == PT) | ||
| 15314 | w->cursor = orig_cursor; | ||
| 15315 | } | 15296 | } |
| 15297 | else | ||
| 15298 | for (; glyph < end | ||
| 15299 | && (!BUFFERP (glyph->object) | ||
| 15300 | || glyph->charpos < PT); | ||
| 15301 | glyph++) | ||
| 15302 | { | ||
| 15303 | w->cursor.hpos++; | ||
| 15304 | w->cursor.x += glyph->pixel_width; | ||
| 15305 | } | ||
| 15316 | } | 15306 | } |
| 15317 | } | 15307 | } |
| 15318 | 15308 | ||
| @@ -15892,13 +15882,13 @@ try_window_id (w) | |||
| 15892 | as is, without changing glyph positions since no text has | 15882 | as is, without changing glyph positions since no text has |
| 15893 | been added/removed in front of the window end. */ | 15883 | been added/removed in front of the window end. */ |
| 15894 | r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); | 15884 | r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); |
| 15895 | if (TEXT_POS_EQUAL_P (start, r0->start.pos) | 15885 | if (TEXT_POS_EQUAL_P (start, r0->minpos) |
| 15896 | /* PT must not be in a partially visible line. */ | 15886 | /* PT must not be in a partially visible line. */ |
| 15897 | && !(PT >= MATRIX_ROW_START_CHARPOS (row) | 15887 | && !(PT >= MATRIX_ROW_START_CHARPOS (row) |
| 15898 | && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) | 15888 | && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) |
| 15899 | { | 15889 | { |
| 15900 | /* We have to compute the window end anew since text | 15890 | /* We have to compute the window end anew since text |
| 15901 | can have been added/removed after it. */ | 15891 | could have been added/removed after it. */ |
| 15902 | w->window_end_pos | 15892 | w->window_end_pos |
| 15903 | = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); | 15893 | = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); |
| 15904 | w->window_end_bytepos | 15894 | w->window_end_bytepos |
| @@ -15930,7 +15920,7 @@ try_window_id (w) | |||
| 15930 | start is not in changed text, otherwise positions would not be | 15920 | start is not in changed text, otherwise positions would not be |
| 15931 | comparable. */ | 15921 | comparable. */ |
| 15932 | row = MATRIX_FIRST_TEXT_ROW (current_matrix); | 15922 | row = MATRIX_FIRST_TEXT_ROW (current_matrix); |
| 15933 | if (!TEXT_POS_EQUAL_P (start, row->start.pos)) | 15923 | if (!TEXT_POS_EQUAL_P (start, row->minpos)) |
| 15934 | GIVE_UP (16); | 15924 | GIVE_UP (16); |
| 15935 | 15925 | ||
| 15936 | /* Give up if the window ends in strings. Overlay strings | 15926 | /* Give up if the window ends in strings. Overlay strings |
| @@ -17322,7 +17312,7 @@ cursor_row_p (w, row) | |||
| 17322 | { | 17312 | { |
| 17323 | int cursor_row_p = 1; | 17313 | int cursor_row_p = 1; |
| 17324 | 17314 | ||
| 17325 | if (PT == MATRIX_ROW_END_CHARPOS (row)) | 17315 | if (PT == CHARPOS (row->end.pos)) |
| 17326 | { | 17316 | { |
| 17327 | /* Suppose the row ends on a string. | 17317 | /* Suppose the row ends on a string. |
| 17328 | Unless the row is continued, that means it ends on a newline | 17318 | Unless the row is continued, that means it ends on a newline |
| @@ -17359,14 +17349,15 @@ cursor_row_p (w, row) | |||
| 17359 | { | 17349 | { |
| 17360 | /* If the row ends in middle of a real character, | 17350 | /* If the row ends in middle of a real character, |
| 17361 | and the line is continued, we want the cursor here. | 17351 | and the line is continued, we want the cursor here. |
| 17362 | That's because MATRIX_ROW_END_CHARPOS would equal | 17352 | That's because CHARPOS (ROW->end.pos) would equal |
| 17363 | PT if PT is before the character. */ | 17353 | PT if PT is before the character. */ |
| 17364 | if (!row->ends_in_ellipsis_p) | 17354 | if (!row->ends_in_ellipsis_p) |
| 17365 | cursor_row_p = row->continued_p; | 17355 | cursor_row_p = row->continued_p; |
| 17366 | else | 17356 | else |
| 17367 | /* If the row ends in an ellipsis, then | 17357 | /* If the row ends in an ellipsis, then |
| 17368 | MATRIX_ROW_END_CHARPOS will equal point after the invisible text. | 17358 | CHARPOS (ROW->end.pos) will equal point after the |
| 17369 | We want that position to be displayed after the ellipsis. */ | 17359 | invisible text. We want that position to be displayed |
| 17360 | after the ellipsis. */ | ||
| 17370 | cursor_row_p = 0; | 17361 | cursor_row_p = 0; |
| 17371 | } | 17362 | } |
| 17372 | /* If the row ends at ZV, display the cursor at the end of that | 17363 | /* If the row ends at ZV, display the cursor at the end of that |
| @@ -17502,122 +17493,87 @@ unproduce_glyphs (it, n) | |||
| 17502 | glyph[-n] = *glyph; | 17493 | glyph[-n] = *glyph; |
| 17503 | } | 17494 | } |
| 17504 | 17495 | ||
| 17505 | /* Find the positions in a bidi-reordered ROW to serve as ROW->start | 17496 | /* Find the positions in a bidi-reordered ROW to serve as ROW->minpos |
| 17506 | and ROW->end. */ | 17497 | and ROW->maxpos. */ |
| 17507 | static struct display_pos | 17498 | static void |
| 17508 | find_row_end (it, row) | 17499 | find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos) |
| 17509 | struct it *it; | 17500 | struct it *it; |
| 17510 | struct glyph_row *row; | 17501 | struct glyph_row *row; |
| 17502 | EMACS_INT min_pos, min_bpos, max_pos, max_bpos; | ||
| 17511 | { | 17503 | { |
| 17512 | /* FIXME: Revisit this when glyph ``spilling'' in continuation | 17504 | /* FIXME: Revisit this when glyph ``spilling'' in continuation |
| 17513 | lines' rows is implemented for bidi-reordered rows. */ | 17505 | lines' rows is implemented for bidi-reordered rows. */ |
| 17514 | EMACS_INT min_pos = ZV + 1, max_pos = 0; | ||
| 17515 | struct glyph *g; | ||
| 17516 | struct it save_it; | ||
| 17517 | struct text_pos tpos; | ||
| 17518 | struct display_pos row_end = it->current; | ||
| 17519 | |||
| 17520 | for (g = row->glyphs[TEXT_AREA]; | ||
| 17521 | g < row->glyphs[TEXT_AREA] + row->used[TEXT_AREA]; | ||
| 17522 | g++) | ||
| 17523 | { | ||
| 17524 | if (BUFFERP (g->object)) | ||
| 17525 | { | ||
| 17526 | if (g->charpos > 0 && g->charpos < min_pos) | ||
| 17527 | min_pos = g->charpos; | ||
| 17528 | if (g->charpos > max_pos) | ||
| 17529 | max_pos = g->charpos; | ||
| 17530 | } | ||
| 17531 | } | ||
| 17532 | /* Empty lines have a valid buffer position at their first | ||
| 17533 | glyph, but that glyph's OBJECT is zero, as if it didn't come | ||
| 17534 | from a buffer. If we didn't find any valid buffer positions | ||
| 17535 | in this row, maybe we have such an empty line. */ | ||
| 17536 | if (max_pos == 0 && row->used[TEXT_AREA]) | ||
| 17537 | { | ||
| 17538 | for (g = row->glyphs[TEXT_AREA]; | ||
| 17539 | g < row->glyphs[TEXT_AREA] + row->used[TEXT_AREA]; | ||
| 17540 | g++) | ||
| 17541 | { | ||
| 17542 | if (INTEGERP (g->object)) | ||
| 17543 | { | ||
| 17544 | if (g->charpos > 0 && g->charpos < min_pos) | ||
| 17545 | min_pos = g->charpos; | ||
| 17546 | if (g->charpos > max_pos) | ||
| 17547 | max_pos = g->charpos; | ||
| 17548 | } | ||
| 17549 | } | ||
| 17550 | } | ||
| 17551 | 17506 | ||
| 17552 | /* ROW->start is the value of min_pos, the minimal buffer position | 17507 | /* ROW->minpos is the value of min_pos, the minimal buffer position |
| 17553 | we have in ROW. */ | 17508 | we have in ROW. */ |
| 17554 | if (min_pos <= ZV) | 17509 | if (min_pos <= ZV) |
| 17510 | SET_TEXT_POS (row->minpos, min_pos, min_bpos); | ||
| 17511 | else | ||
| 17555 | { | 17512 | { |
| 17556 | /* Avoid calling the costly CHAR_TO_BYTE if possible. */ | 17513 | /* We didn't find _any_ valid buffer positions in any of the |
| 17557 | if (min_pos != row->start.pos.charpos) | 17514 | glyphs, so we must trust the iterator's computed |
| 17558 | SET_TEXT_POS (row->start.pos, min_pos, CHAR_TO_BYTE (min_pos)); | 17515 | positions. */ |
| 17559 | if (max_pos == 0) | 17516 | row->minpos = row->start.pos; |
| 17560 | max_pos = min_pos; | 17517 | max_pos = CHARPOS (it->current.pos); |
| 17518 | max_bpos = BYTEPOS (it->current.pos); | ||
| 17561 | } | 17519 | } |
| 17562 | 17520 | ||
| 17563 | /* For ROW->end, we need the position that is _after_ max_pos, in | 17521 | if (!max_pos) |
| 17564 | the logical order, unless we are at ZV. */ | 17522 | abort (); |
| 17565 | if (row->ends_at_zv_p) | ||
| 17566 | { | ||
| 17567 | if (!row->used[TEXT_AREA]) | ||
| 17568 | row->start.pos = row_end.pos; | ||
| 17569 | } | ||
| 17570 | else if (row->used[TEXT_AREA] && max_pos) | ||
| 17571 | { | ||
| 17572 | int at_eol_p; | ||
| 17573 | 17523 | ||
| 17574 | SET_TEXT_POS (tpos, max_pos, CHAR_TO_BYTE (max_pos)); | 17524 | /* Here are the various use-cases for ending the row, and the |
| 17575 | save_it = *it; | 17525 | corresponding values for ROW->maxpos: |
| 17576 | it->bidi_p = 0; | 17526 | |
| 17577 | reseat (it, tpos, 0); | 17527 | Line ends in a newline from buffer eol_pos + 1 |
| 17578 | if (!get_next_display_element (it)) | 17528 | Line is continued from buffer max_pos + 1 |
| 17579 | abort (); /* this row cannot be at ZV, see above */ | 17529 | Line is truncated on right it->current.pos |
| 17580 | at_eol_p = ITERATOR_AT_END_OF_LINE_P (it); | 17530 | Line ends in a newline from string max_pos |
| 17581 | set_iterator_to_next (it, 1); | 17531 | Line is continued from string max_pos |
| 17582 | row_end = it->current; | 17532 | Line is continued from display vector max_pos |
| 17583 | /* If the character at max_pos is not a newline and the | 17533 | Line is entirely from a string min_pos == max_pos |
| 17584 | characters at max_pos+1 is a newline, skip that newline as | 17534 | Line is entirely from a display vector min_pos == max_pos |
| 17585 | well. Note that this may skip some invisible text. */ | 17535 | Line that ends at ZV ZV |
| 17586 | if (!at_eol_p | 17536 | |
| 17587 | && get_next_display_element (it) | 17537 | If you discover other use-cases, please add them here as |
| 17588 | && ITERATOR_AT_END_OF_LINE_P (it)) | 17538 | appropriate. */ |
| 17589 | { | 17539 | if (row->ends_at_zv_p) |
| 17590 | set_iterator_to_next (it, 1); | 17540 | row->maxpos = it->current.pos; |
| 17591 | /* Record the position after the newline of a continued row. | 17541 | else if (row->used[TEXT_AREA]) |
| 17592 | We will need that to set ROW->end of the last row | 17542 | { |
| 17593 | produced for a continued line. */ | 17543 | if (row->ends_in_newline_from_string_p) |
| 17594 | if (row->continued_p) | 17544 | SET_TEXT_POS (row->maxpos, max_pos, max_bpos); |
| 17595 | save_it.eol_pos = it->current.pos; | 17545 | else if (CHARPOS (it->eol_pos) > 0) |
| 17546 | SET_TEXT_POS (row->maxpos, | ||
| 17547 | CHARPOS (it->eol_pos) + 1, BYTEPOS (it->eol_pos) + 1); | ||
| 17548 | else if (row->continued_p) | ||
| 17549 | { | ||
| 17550 | /* If max_pos is different from IT's current position, it | ||
| 17551 | means IT->method does not belong to the display element | ||
| 17552 | at max_pos. However, it also means that the display | ||
| 17553 | element at max_pos was displayed in its entirety on this | ||
| 17554 | line, which is equivalent to saying that the next line | ||
| 17555 | starts at the next buffer position. */ | ||
| 17556 | if (IT_CHARPOS (*it) == max_pos && it->method != GET_FROM_BUFFER) | ||
| 17557 | SET_TEXT_POS (row->maxpos, max_pos, max_bpos); | ||
| 17596 | else | 17558 | else |
| 17597 | { | 17559 | { |
| 17598 | row_end = it->current; | 17560 | INC_BOTH (max_pos, max_bpos); |
| 17599 | save_it.eol_pos.charpos = save_it.eol_pos.bytepos = 0; | 17561 | SET_TEXT_POS (row->maxpos, max_pos, max_bpos); |
| 17600 | } | 17562 | } |
| 17601 | } | 17563 | } |
| 17602 | else if (!row->continued_p | 17564 | else if (row->truncated_on_right_p) |
| 17603 | && MATRIX_ROW_CONTINUATION_LINE_P (row) | 17565 | /* display_line already called reseat_at_next_visible_line_start, |
| 17604 | && it->eol_pos.charpos > 0) | 17566 | which puts the iterator at the beginning of the next line, in |
| 17605 | { | 17567 | the logical order. */ |
| 17606 | /* Last row of a continued line. Use the position recorded | 17568 | row->maxpos = it->current.pos; |
| 17607 | in IT->eol_pos, to the effect that the newline belongs to | 17569 | else if (max_pos == min_pos && it->method != GET_FROM_BUFFER) |
| 17608 | this row, not to the row which displays the character | 17570 | /* A line that is entirely from a string/image/stretch... */ |
| 17609 | with the largest buffer position before the newline. */ | 17571 | row->maxpos = row->minpos; |
| 17610 | row_end.pos = it->eol_pos; | 17572 | else |
| 17611 | it->eol_pos.charpos = it->eol_pos.bytepos = 0; | 17573 | abort (); |
| 17612 | } | ||
| 17613 | *it = save_it; | ||
| 17614 | /* The members of ROW->end that are not taken from buffer | ||
| 17615 | positions are copied from IT->current. */ | ||
| 17616 | row_end.string_pos = it->current.string_pos; | ||
| 17617 | row_end.overlay_string_index = it->current.overlay_string_index; | ||
| 17618 | row_end.dpvec_index = it->current.dpvec_index; | ||
| 17619 | } | 17574 | } |
| 17620 | return row_end; | 17575 | else |
| 17576 | row->maxpos = it->current.pos; | ||
| 17621 | } | 17577 | } |
| 17622 | 17578 | ||
| 17623 | /* Construct the glyph row IT->glyph_row in the desired matrix of | 17579 | /* Construct the glyph row IT->glyph_row in the desired matrix of |
| @@ -17637,7 +17593,10 @@ display_line (it) | |||
| 17637 | int wrap_row_used = -1, wrap_row_ascent, wrap_row_height; | 17593 | int wrap_row_used = -1, wrap_row_ascent, wrap_row_height; |
| 17638 | int wrap_row_phys_ascent, wrap_row_phys_height; | 17594 | int wrap_row_phys_ascent, wrap_row_phys_height; |
| 17639 | int wrap_row_extra_line_spacing; | 17595 | int wrap_row_extra_line_spacing; |
| 17596 | EMACS_INT wrap_row_min_pos, wrap_row_min_bpos; | ||
| 17597 | EMACS_INT wrap_row_max_pos, wrap_row_max_bpos; | ||
| 17640 | int cvpos; | 17598 | int cvpos; |
| 17599 | EMACS_INT min_pos = ZV + 1, min_bpos, max_pos = 0, max_bpos; | ||
| 17641 | 17600 | ||
| 17642 | /* We always start displaying at hpos zero even if hscrolled. */ | 17601 | /* We always start displaying at hpos zero even if hscrolled. */ |
| 17643 | xassert (it->hpos == 0 && it->current_x == 0); | 17602 | xassert (it->hpos == 0 && it->current_x == 0); |
| @@ -17694,6 +17653,23 @@ display_line (it) | |||
| 17694 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; | 17653 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; |
| 17695 | row->extra_line_spacing = it->max_extra_line_spacing; | 17654 | row->extra_line_spacing = it->max_extra_line_spacing; |
| 17696 | 17655 | ||
| 17656 | /* Utility macro to record max and min buffer positions seen until now. */ | ||
| 17657 | #define RECORD_MAX_MIN_POS(IT) \ | ||
| 17658 | do \ | ||
| 17659 | { \ | ||
| 17660 | if (IT_CHARPOS (*(IT)) < min_pos) \ | ||
| 17661 | { \ | ||
| 17662 | min_pos = IT_CHARPOS (*(IT)); \ | ||
| 17663 | min_bpos = IT_BYTEPOS (*(IT)); \ | ||
| 17664 | } \ | ||
| 17665 | if (IT_CHARPOS (*(IT)) > max_pos) \ | ||
| 17666 | { \ | ||
| 17667 | max_pos = IT_CHARPOS (*(IT)); \ | ||
| 17668 | max_bpos = IT_BYTEPOS (*(IT)); \ | ||
| 17669 | } \ | ||
| 17670 | } \ | ||
| 17671 | while (0) | ||
| 17672 | |||
| 17697 | /* Loop generating characters. The loop is left with IT on the next | 17673 | /* Loop generating characters. The loop is left with IT on the next |
| 17698 | character to display. */ | 17674 | character to display. */ |
| 17699 | while (1) | 17675 | while (1) |
| @@ -17728,7 +17704,8 @@ display_line (it) | |||
| 17728 | row->ends_at_zv_p = 1; | 17704 | row->ends_at_zv_p = 1; |
| 17729 | /* A row that displays right-to-left text must always have | 17705 | /* A row that displays right-to-left text must always have |
| 17730 | its last face extended all the way to the end of line, | 17706 | its last face extended all the way to the end of line, |
| 17731 | even if this row ends in ZV. */ | 17707 | even if this row ends in ZV, because we still write to th |
| 17708 | screen left to right. */ | ||
| 17732 | if (row->reversed_p) | 17709 | if (row->reversed_p) |
| 17733 | extend_face_to_end_of_line (it); | 17710 | extend_face_to_end_of_line (it); |
| 17734 | break; | 17711 | break; |
| @@ -17762,6 +17739,10 @@ display_line (it) | |||
| 17762 | wrap_row_phys_ascent = row->phys_ascent; | 17739 | wrap_row_phys_ascent = row->phys_ascent; |
| 17763 | wrap_row_phys_height = row->phys_height; | 17740 | wrap_row_phys_height = row->phys_height; |
| 17764 | wrap_row_extra_line_spacing = row->extra_line_spacing; | 17741 | wrap_row_extra_line_spacing = row->extra_line_spacing; |
| 17742 | wrap_row_min_pos = min_pos; | ||
| 17743 | wrap_row_min_bpos = min_bpos; | ||
| 17744 | wrap_row_max_pos = max_pos; | ||
| 17745 | wrap_row_max_bpos = max_bpos; | ||
| 17765 | may_wrap = 0; | 17746 | may_wrap = 0; |
| 17766 | } | 17747 | } |
| 17767 | } | 17748 | } |
| @@ -17812,6 +17793,10 @@ display_line (it) | |||
| 17812 | it->max_extra_line_spacing); | 17793 | it->max_extra_line_spacing); |
| 17813 | if (it->current_x - it->pixel_width < it->first_visible_x) | 17794 | if (it->current_x - it->pixel_width < it->first_visible_x) |
| 17814 | row->x = x - it->first_visible_x; | 17795 | row->x = x - it->first_visible_x; |
| 17796 | /* Record the maximum and minimum buffer positions seen so | ||
| 17797 | far in glyphs that will be displayed by this row. */ | ||
| 17798 | if (it->bidi_p) | ||
| 17799 | RECORD_MAX_MIN_POS (it); | ||
| 17815 | } | 17800 | } |
| 17816 | else | 17801 | else |
| 17817 | { | 17802 | { |
| @@ -17845,6 +17830,11 @@ display_line (it) | |||
| 17845 | it->current_x = new_x; | 17830 | it->current_x = new_x; |
| 17846 | it->continuation_lines_width += new_x; | 17831 | it->continuation_lines_width += new_x; |
| 17847 | ++it->hpos; | 17832 | ++it->hpos; |
| 17833 | /* Record the maximum and minimum buffer | ||
| 17834 | positions seen so far in glyphs that will be | ||
| 17835 | displayed by this row. */ | ||
| 17836 | if (it->bidi_p) | ||
| 17837 | RECORD_MAX_MIN_POS (it); | ||
| 17848 | if (i == nglyphs - 1) | 17838 | if (i == nglyphs - 1) |
| 17849 | { | 17839 | { |
| 17850 | /* If line-wrap is on, check if a previous | 17840 | /* If line-wrap is on, check if a previous |
| @@ -17919,6 +17909,10 @@ display_line (it) | |||
| 17919 | row->phys_ascent = wrap_row_phys_ascent; | 17909 | row->phys_ascent = wrap_row_phys_ascent; |
| 17920 | row->phys_height = wrap_row_phys_height; | 17910 | row->phys_height = wrap_row_phys_height; |
| 17921 | row->extra_line_spacing = wrap_row_extra_line_spacing; | 17911 | row->extra_line_spacing = wrap_row_extra_line_spacing; |
| 17912 | min_pos = wrap_row_min_pos; | ||
| 17913 | min_bpos = wrap_row_min_bpos; | ||
| 17914 | max_pos = wrap_row_max_pos; | ||
| 17915 | max_bpos = wrap_row_max_bpos; | ||
| 17922 | row->continued_p = 1; | 17916 | row->continued_p = 1; |
| 17923 | row->ends_at_zv_p = 0; | 17917 | row->ends_at_zv_p = 0; |
| 17924 | row->exact_window_width_line_p = 0; | 17918 | row->exact_window_width_line_p = 0; |
| @@ -17981,6 +17975,12 @@ display_line (it) | |||
| 17981 | /* Increment number of glyphs actually displayed. */ | 17975 | /* Increment number of glyphs actually displayed. */ |
| 17982 | ++it->hpos; | 17976 | ++it->hpos; |
| 17983 | 17977 | ||
| 17978 | /* Record the maximum and minimum buffer positions | ||
| 17979 | seen so far in glyphs that will be displayed by | ||
| 17980 | this row. */ | ||
| 17981 | if (it->bidi_p) | ||
| 17982 | RECORD_MAX_MIN_POS (it); | ||
| 17983 | |||
| 17984 | if (x < it->first_visible_x) | 17984 | if (x < it->first_visible_x) |
| 17985 | /* Glyph is partially visible, i.e. row starts at | 17985 | /* Glyph is partially visible, i.e. row starts at |
| 17986 | negative X position. */ | 17986 | negative X position. */ |
| @@ -18032,6 +18032,10 @@ display_line (it) | |||
| 18032 | if (used_before == 0) | 18032 | if (used_before == 0) |
| 18033 | row->glyphs[TEXT_AREA]->charpos = CHARPOS (it->position); | 18033 | row->glyphs[TEXT_AREA]->charpos = CHARPOS (it->position); |
| 18034 | 18034 | ||
| 18035 | /* Record the position of the newline, for use in | ||
| 18036 | find_row_edges. */ | ||
| 18037 | it->eol_pos = it->current.pos; | ||
| 18038 | |||
| 18035 | /* Consume the line end. This skips over invisible lines. */ | 18039 | /* Consume the line end. This skips over invisible lines. */ |
| 18036 | set_iterator_to_next (it, 1); | 18040 | set_iterator_to_next (it, 1); |
| 18037 | it->continuation_lines_width = 0; | 18041 | it->continuation_lines_width = 0; |
| @@ -18111,7 +18115,7 @@ display_line (it) | |||
| 18111 | /* If line is not empty and hscrolled, maybe insert truncation glyphs | 18115 | /* If line is not empty and hscrolled, maybe insert truncation glyphs |
| 18112 | at the left window margin. */ | 18116 | at the left window margin. */ |
| 18113 | if (it->first_visible_x | 18117 | if (it->first_visible_x |
| 18114 | && IT_CHARPOS (*it) != MATRIX_ROW_START_CHARPOS (row)) | 18118 | && IT_CHARPOS (*it) != CHARPOS (row->start.pos)) |
| 18115 | { | 18119 | { |
| 18116 | if (!FRAME_WINDOW_P (it->f)) | 18120 | if (!FRAME_WINDOW_P (it->f)) |
| 18117 | insert_left_trunc_glyphs (it); | 18121 | insert_left_trunc_glyphs (it); |
| @@ -18165,12 +18169,19 @@ display_line (it) | |||
| 18165 | 18169 | ||
| 18166 | /* Remember the position at which this line ends. */ | 18170 | /* Remember the position at which this line ends. */ |
| 18167 | row->end = it->current; | 18171 | row->end = it->current; |
| 18168 | /* ROW->start and ROW->end must be the smallest and the largest | 18172 | if (!it->bidi_p) |
| 18169 | buffer positions in ROW. But if ROW was bidi-reordered, these | 18173 | { |
| 18170 | two positions can be anywhere in the row, so we must rescan all | 18174 | row->minpos = row->start.pos; |
| 18171 | of the ROW's glyphs to find them. */ | 18175 | row->maxpos = row->end.pos; |
| 18172 | if (it->bidi_p) | 18176 | } |
| 18173 | row->end = find_row_end (it, row); | 18177 | else |
| 18178 | { | ||
| 18179 | /* ROW->minpos and ROW->maxpos must be the smallest and | ||
| 18180 | `1 + the largest' buffer positions in ROW. But if ROW was | ||
| 18181 | bidi-reordered, these two positions can be anywhere in the | ||
| 18182 | row, so we must determine them now. */ | ||
| 18183 | find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos); | ||
| 18184 | } | ||
| 18174 | 18185 | ||
| 18175 | /* Record whether this row ends inside an ellipsis. */ | 18186 | /* Record whether this row ends inside an ellipsis. */ |
| 18176 | row->ends_in_ellipsis_p | 18187 | row->ends_in_ellipsis_p |
| @@ -18216,6 +18227,7 @@ display_line (it) | |||
| 18216 | row to be used. */ | 18227 | row to be used. */ |
| 18217 | it->current_x = it->hpos = 0; | 18228 | it->current_x = it->hpos = 0; |
| 18218 | it->current_y += row->height; | 18229 | it->current_y += row->height; |
| 18230 | SET_TEXT_POS (it->eol_pos, 0, 0); | ||
| 18219 | ++it->vpos; | 18231 | ++it->vpos; |
| 18220 | ++it->glyph_row; | 18232 | ++it->glyph_row; |
| 18221 | /* The next row should by default use the same value of the | 18233 | /* The next row should by default use the same value of the |
| @@ -18226,6 +18238,8 @@ display_line (it) | |||
| 18226 | it->glyph_row->reversed_p = row->reversed_p; | 18238 | it->glyph_row->reversed_p = row->reversed_p; |
| 18227 | it->start = row->end; | 18239 | it->start = row->end; |
| 18228 | return row->displays_text_p; | 18240 | return row->displays_text_p; |
| 18241 | |||
| 18242 | #undef RECORD_MAX_MIN_POS | ||
| 18229 | } | 18243 | } |
| 18230 | 18244 | ||
| 18231 | DEFUN ("current-bidi-paragraph-direction", Fcurrent_bidi_paragraph_direction, | 18245 | DEFUN ("current-bidi-paragraph-direction", Fcurrent_bidi_paragraph_direction, |