diff options
| author | Miles Bader | 2006-09-05 02:54:22 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-09-05 02:54:22 +0000 |
| commit | af6ea8ad8d62810d901561ae4a56d89f22ebacf0 (patch) | |
| tree | 02ee24f2f69b71a0690c99a5b007becf76077f74 /src | |
| parent | 76e590a3f4d983dbbbf9e1a1bbd7753e251c64a6 (diff) | |
| parent | 750a6cf4b21da81c1b451b8f4dc898127954c133 (diff) | |
| download | emacs-af6ea8ad8d62810d901561ae4a56d89f22ebacf0.tar.gz emacs-af6ea8ad8d62810d901561ae4a56d89f22ebacf0.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 414-422)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 128-130)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-108
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 100 | ||||
| -rw-r--r-- | src/Makefile.in | 46 | ||||
| -rw-r--r-- | src/buffer.c | 27 | ||||
| -rw-r--r-- | src/buffer.h | 10 | ||||
| -rw-r--r-- | src/casefiddle.c | 2 | ||||
| -rw-r--r-- | src/coding.c | 6 | ||||
| -rw-r--r-- | src/editfns.c | 22 | ||||
| -rw-r--r-- | src/eval.c | 8 | ||||
| -rw-r--r-- | src/fns.c | 7 | ||||
| -rw-r--r-- | src/gtkutil.c | 29 | ||||
| -rw-r--r-- | src/indent.c | 13 | ||||
| -rw-r--r-- | src/insdel.c | 19 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/macterm.c | 15 | ||||
| -rw-r--r-- | src/marker.c | 3 | ||||
| -rw-r--r-- | src/minibuf.c | 23 | ||||
| -rw-r--r-- | src/textprop.c | 12 | ||||
| -rw-r--r-- | src/w32.c | 24 | ||||
| -rw-r--r-- | src/window.c | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
20 files changed, 312 insertions, 66 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index be774a8b75c..64b3b884bfa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,99 @@ | |||
| 1 | 2006-09-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macterm.c (install_window_handler, mac_handle_window_event) | ||
| 4 | [USE_CARBON_EVENTS]: Handle kEventWindowClose. | ||
| 5 | [USE_MAC_TSM] (mac_handle_text_input_event): Set modifiers for | ||
| 6 | ASCII keystroke event. | ||
| 7 | |||
| 8 | 2006-09-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 9 | |||
| 10 | * gtkutil.c (xg_get_file_with_chooser): Don't mention specific keys in | ||
| 11 | the file chooser message. Only call gtk_file_chooser_set_current_name | ||
| 12 | when action is SAVE. | ||
| 13 | |||
| 14 | 2006-09-04 Andreas Schwab <schwab@suse.de> | ||
| 15 | |||
| 16 | * Makefile.in: Double all single and back quotes in C-style | ||
| 17 | comments to help fontifier. | ||
| 18 | |||
| 19 | 2006-09-03 Jason Rumney <jasonr@gnu.org> | ||
| 20 | |||
| 21 | * w32.c (shutdown_handler): New function to exit cleanly on shutdown. | ||
| 22 | (globals_of_w32): Register it as a signal handler. | ||
| 23 | |||
| 24 | 2006-09-02 Juri Linkov <juri@jurta.org> | ||
| 25 | |||
| 26 | * marker.c (Fmarker_position): Doc fix. | ||
| 27 | |||
| 28 | 2006-09-03 Eli Zaretskii <eliz@gnu.org> | ||
| 29 | |||
| 30 | * window.c (syms_of_window) <split-height-threshold>: | ||
| 31 | <window-min-height, window-min-width>: Doc fix. | ||
| 32 | |||
| 33 | 2006-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 34 | |||
| 35 | * gtkutil.c (xg_get_file_with_chooser): Change file chooser message | ||
| 36 | for writing files. Call gtk_file_chooser_set_current_name to keep | ||
| 37 | default filename. | ||
| 38 | |||
| 39 | * minibuf.c (Finternal_complete_buffer): Move after DEFUN:s it calls | ||
| 40 | |||
| 41 | 2006-09-02 Jindrich Makovicka <makovick@gmail.com> (tiny change) | ||
| 42 | |||
| 43 | * fns.c (concat) [__GNUC__]: Declare with | ||
| 44 | `__attribute__((noinline))'. | ||
| 45 | |||
| 46 | * eval.c (apply1, call2) [__GNUC__]: Declare with | ||
| 47 | `__attribute__((noinline))'. | ||
| 48 | |||
| 49 | 2006-09-02 Stuart D. Herring <herring@lanl.gov> | ||
| 50 | |||
| 51 | * minibuf.c (Finternal_complete_buffer): New function. | ||
| 52 | (syms_of_minibuf): Defsubr it. | ||
| 53 | (Fread_buffer): Use it, instead of Vbuffer_alist. | ||
| 54 | |||
| 55 | 2006-09-01 Martin Rudalics <rudalics@gmx.at> | ||
| 56 | |||
| 57 | * buffer.h (struct buffer_text): New field chars_modiff. | ||
| 58 | (CHARS_MODIFF, BUF_CHARS_MODIFF): New macros. | ||
| 59 | * buffer.c (Fbuffer_chars_modified_tick): New function returning | ||
| 60 | value of BUF_CHARS_MODIFF. | ||
| 61 | (syms_of_buffer): Defsubr it. | ||
| 62 | (Fget_buffer_create): Initialize BUF_CHARS_MODIFF. | ||
| 63 | * insdel.c (modify_region): New argument preserve_chars_modiff. | ||
| 64 | Set CHARS_MODIFF to MODIFF provided preserve_chars_modiff is zero. | ||
| 65 | (insert_1_both, insert_from_string_1, insert_from_buffer_1) | ||
| 66 | (adjust_after_replace, adjust_after_replace_noundo) | ||
| 67 | (replace_range, replace_range_2, del_range_2): Reset CHARS_MODIFF. | ||
| 68 | * lisp.h (modify_region): Add fourth argument in extern. | ||
| 69 | * casefiddle.c (casify_region): Call modify_region with fourth | ||
| 70 | argument zero to assert that CHARS_MODIFF is updated. | ||
| 71 | * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal) | ||
| 72 | (Ftranspose_regions): Likewise. | ||
| 73 | * textprop.c (Fadd_text_properties, Fset_text_properties) | ||
| 74 | (Fremove_text_properties, Fremove_list_of_text_properties): | ||
| 75 | Call modify_region with fourth argument 1 to avoid that | ||
| 76 | CHARS_MODIFF is updated. | ||
| 77 | |||
| 78 | 2006-08-31 Richard Stallman <rms@gnu.org> | ||
| 79 | |||
| 80 | * editfns.c (Fformat): Don't sign-extend for %o or %x. | ||
| 81 | |||
| 82 | 2006-08-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 83 | |||
| 84 | * indent.c (Fvertical_motion): Don't move back if we were | ||
| 85 | displaying a Lisp string, either. | ||
| 86 | |||
| 87 | 2006-08-28 Kim F. Storm <storm@cua.dk> | ||
| 88 | |||
| 89 | * xdisp.c (get_window_cursor_type) [!HAVE_WINDOW_SYSTEM]: | ||
| 90 | Don't attempt to replace cursor on image glyphs. | ||
| 91 | |||
| 92 | 2006-08-28 Kenichi Handa <handa@m17n.org> | ||
| 93 | |||
| 94 | * coding.c (Fdetect_coding_region, Fdetect_coding_string): Fix | ||
| 95 | docstring about ISO-2022 control characters. | ||
| 96 | |||
| 1 | 2006-08-28 Kim F. Storm <storm@cua.dk> | 97 | 2006-08-28 Kim F. Storm <storm@cua.dk> |
| 2 | 98 | ||
| 3 | * xdisp.c (get_window_cursor_type): Replace BOX cursor on images | 99 | * xdisp.c (get_window_cursor_type): Replace BOX cursor on images |
| @@ -68,6 +164,10 @@ | |||
| 68 | (Frename_file, Fadd_name_to_file, Fmake_symbolic_link): | 164 | (Frename_file, Fadd_name_to_file, Fmake_symbolic_link): |
| 69 | Simplify; remove NO_ARG_ARRAY stuff, use list2. | 165 | Simplify; remove NO_ARG_ARRAY stuff, use list2. |
| 70 | 166 | ||
| 167 | 2006-08-25 Richard Stallman <rms@gnu.org> | ||
| 168 | |||
| 169 | * buffer.c (Fswitch_to_buffer): Fix previous change. | ||
| 170 | |||
| 71 | 2006-08-25 Kim F. Storm <storm@cua.dk> | 171 | 2006-08-25 Kim F. Storm <storm@cua.dk> |
| 72 | 172 | ||
| 73 | * keyboard.c (Fcurrent_idle_time): Simplify. | 173 | * keyboard.c (Fcurrent_idle_time): Simplify. |
diff --git a/src/Makefile.in b/src/Makefile.in index b0843ad4063..88879645ceb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -75,13 +75,13 @@ SHELL=/bin/sh | |||
| 75 | #define NOT_C_CODE | 75 | #define NOT_C_CODE |
| 76 | #include "config.h" | 76 | #include "config.h" |
| 77 | 77 | ||
| 78 | /* We won't really call alloca; | 78 | /* We won''t really call alloca; |
| 79 | don't let the file name alloca.c get messed up. */ | 79 | don''t let the file name alloca.c get messed up. */ |
| 80 | #ifdef alloca | 80 | #ifdef alloca |
| 81 | #undef alloca | 81 | #undef alloca |
| 82 | #endif | 82 | #endif |
| 83 | 83 | ||
| 84 | /* Don't let the file name mktime.c get messed up. */ | 84 | /* Don''t let the file name mktime.c get messed up. */ |
| 85 | #ifdef mktime | 85 | #ifdef mktime |
| 86 | #undef mktime | 86 | #undef mktime |
| 87 | #endif | 87 | #endif |
| @@ -96,7 +96,7 @@ SHELL=/bin/sh | |||
| 96 | #endif | 96 | #endif |
| 97 | 97 | ||
| 98 | /* On some machines #define register is done in config; | 98 | /* On some machines #define register is done in config; |
| 99 | don't let it interfere with this file. */ | 99 | don''t let it interfere with this file. */ |
| 100 | #undef register | 100 | #undef register |
| 101 | 101 | ||
| 102 | /* On some systems we may not be able to use the system make command. */ | 102 | /* On some systems we may not be able to use the system make command. */ |
| @@ -116,7 +116,7 @@ CC = C_COMPILER | |||
| 116 | #endif | 116 | #endif |
| 117 | #endif | 117 | #endif |
| 118 | 118 | ||
| 119 | /* Some machines don't find the standard C libraries in the usual place. */ | 119 | /* Some machines don''t find the standard C libraries in the usual place. */ |
| 120 | #ifndef ORDINARY_LINK | 120 | #ifndef ORDINARY_LINK |
| 121 | #ifndef LIB_STANDARD | 121 | #ifndef LIB_STANDARD |
| 122 | #define LIB_STANDARD -lc | 122 | #define LIB_STANDARD -lc |
| @@ -248,7 +248,7 @@ STARTFILES = START_FILES | |||
| 248 | #endif /* not ORDINARY_LINK */ | 248 | #endif /* not ORDINARY_LINK */ |
| 249 | 249 | ||
| 250 | 250 | ||
| 251 | /* cc switches needed to make `asm' keyword work. | 251 | /* cc switches needed to make ``asm'' keyword work. |
| 252 | Nothing special needed on most machines. */ | 252 | Nothing special needed on most machines. */ |
| 253 | #ifndef C_SWITCH_ASM | 253 | #ifndef C_SWITCH_ASM |
| 254 | #define C_SWITCH_ASM | 254 | #define C_SWITCH_ASM |
| @@ -277,7 +277,7 @@ TOOLKIT_DEFINES = | |||
| 277 | for use in Emacs. | 277 | for use in Emacs. |
| 278 | 278 | ||
| 279 | -DHAVE_CONFIG_H is needed for some other files to take advantage of | 279 | -DHAVE_CONFIG_H is needed for some other files to take advantage of |
| 280 | the information in `config.h'. */ | 280 | the information in ``config.h''. */ |
| 281 | 281 | ||
| 282 | /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM | 282 | /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM |
| 283 | since it may have -I options that should override those two. */ | 283 | since it may have -I options that should override those two. */ |
| @@ -337,7 +337,7 @@ LIBXMENU= -lXMenu | |||
| 337 | 337 | ||
| 338 | #else /* not HAVE_MENUS */ | 338 | #else /* not HAVE_MENUS */ |
| 339 | 339 | ||
| 340 | /* Otherwise, don't worry about the menu library at all. */ | 340 | /* Otherwise, don''t worry about the menu library at all. */ |
| 341 | LIBXMENU= | 341 | LIBXMENU= |
| 342 | #endif /* not HAVE_MENUS */ | 342 | #endif /* not HAVE_MENUS */ |
| 343 | 343 | ||
| @@ -381,7 +381,7 @@ LIBXTR6 = -lSM -lICE | |||
| 381 | #ifdef LIBXT_STATIC | 381 | #ifdef LIBXT_STATIC |
| 382 | /* We assume the config files have defined STATIC_OPTION | 382 | /* We assume the config files have defined STATIC_OPTION |
| 383 | since that might depend on the operating system. | 383 | since that might depend on the operating system. |
| 384 | (Don't forget you need different definitions with and without __GNUC__.) */ | 384 | (Don''t forget you need different definitions with and without __GNUC__.) */ |
| 385 | LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION | 385 | LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION |
| 386 | #else /* not LIBXT_STATIC */ | 386 | #else /* not LIBXT_STATIC */ |
| 387 | LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext | 387 | LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext |
| @@ -474,9 +474,9 @@ CFLAGS_SOUND= @CFLAGS_SOUND@ | |||
| 474 | /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | 474 | /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure |
| 475 | places that are difficult to figure out at make time. Fortunately, | 475 | places that are difficult to figure out at make time. Fortunately, |
| 476 | these same versions allow you to pass arbitrary flags on to the | 476 | these same versions allow you to pass arbitrary flags on to the |
| 477 | linker, so there's no reason not to use it as a linker. | 477 | linker, so there''s no reason not to use it as a linker. |
| 478 | 478 | ||
| 479 | Well, it's not quite perfect. The `-nostdlib' keeps GCC from | 479 | Well, it''s not quite perfect. The ``-nostdlib'' keeps GCC from |
| 480 | searching for libraries in its internal directories, so we have to | 480 | searching for libraries in its internal directories, so we have to |
| 481 | ask GCC explicitly where to find libgcc.a. */ | 481 | ask GCC explicitly where to find libgcc.a. */ |
| 482 | 482 | ||
| @@ -493,9 +493,9 @@ GNULIB_VAR = LIB_GCC | |||
| 493 | 493 | ||
| 494 | #ifndef LINKER_WAS_SPECIFIED | 494 | #ifndef LINKER_WAS_SPECIFIED |
| 495 | /* GCC passes any argument prefixed with -Xlinker directly to the | 495 | /* GCC passes any argument prefixed with -Xlinker directly to the |
| 496 | linker. See prefix-args.c for an explanation of why we don't do | 496 | linker. See prefix-args.c for an explanation of why we don''t do |
| 497 | this with the shell's `for' construct. | 497 | this with the shell''s ``for'' construct. |
| 498 | Note that some people don't have '.' in their paths, so we must | 498 | Note that some people don''t have '.' in their paths, so we must |
| 499 | use ./prefix-args. */ | 499 | use ./prefix-args. */ |
| 500 | #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` | 500 | #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` |
| 501 | #else | 501 | #else |
| @@ -536,12 +536,12 @@ LD=ld | |||
| 536 | #endif /* not ORDINARY_LINK */ | 536 | #endif /* not ORDINARY_LINK */ |
| 537 | 537 | ||
| 538 | /* Flags to pass to LD only for temacs. */ | 538 | /* Flags to pass to LD only for temacs. */ |
| 539 | /* Don't split this line with a backslash. That can cause trouble with | 539 | /* Don''t split this line with a backslash. That can cause trouble with |
| 540 | some cpps. */ | 540 | some cpps. */ |
| 541 | TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE | 541 | TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE |
| 542 | 542 | ||
| 543 | /* A macro which other sections of Makefile can redefine to munge the | 543 | /* A macro which other sections of Makefile can redefine to munge the |
| 544 | flags before they're passed to LD. This is helpful if you have | 544 | flags before they''re passed to LD. This is helpful if you have |
| 545 | redefined LD to something odd, like "gcc". | 545 | redefined LD to something odd, like "gcc". |
| 546 | (The YMF prefix is a holdover from the old name "ymakefile".) | 546 | (The YMF prefix is a holdover from the old name "ymakefile".) |
| 547 | */ | 547 | */ |
| @@ -728,8 +728,8 @@ otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) $(LIBO | |||
| 728 | #define TOOLTIP_SUPPORT | 728 | #define TOOLTIP_SUPPORT |
| 729 | #endif | 729 | #endif |
| 730 | 730 | ||
| 731 | /* List of Lisp files loaded into the dumped Emacs. It's arranged | 731 | /* List of Lisp files loaded into the dumped Emacs. It''s arranged |
| 732 | like this because it's easier to generate it semi-mechanically from | 732 | like this because it''s easier to generate it semi-mechanically from |
| 733 | loadup.el this way. | 733 | loadup.el this way. |
| 734 | 734 | ||
| 735 | Note that this list should not include lisp files which might not | 735 | Note that this list should not include lisp files which might not |
| @@ -915,7 +915,7 @@ shortlisp= \ | |||
| 915 | We must unconditionally put them in the DOC file. | 915 | We must unconditionally put them in the DOC file. |
| 916 | We use ../lisp/ to start the file names | 916 | We use ../lisp/ to start the file names |
| 917 | to reduce the size of the argument list for make-docfile | 917 | to reduce the size of the argument list for make-docfile |
| 918 | for the sake of systems which can\'t handle large ones. */ | 918 | for the sake of systems which can''t handle large ones. */ |
| 919 | SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \ | 919 | SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \ |
| 920 | ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \ | 920 | ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \ |
| 921 | ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \ | 921 | ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \ |
| @@ -1003,13 +1003,13 @@ temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} $ | |||
| 1003 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ | 1003 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ |
| 1004 | OBJECTS_MACHINE ${LIBES} | 1004 | OBJECTS_MACHINE ${LIBES} |
| 1005 | 1005 | ||
| 1006 | /* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE | 1006 | /* We don''t use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE |
| 1007 | often contain options that have to do with using Emacs's crt0, | 1007 | often contain options that have to do with using Emacs''s crt0, |
| 1008 | which are only good with temacs. */ | 1008 | which are only good with temacs. */ |
| 1009 | prefix-args${EXEEXT}: prefix-args.c $(config_h) | 1009 | prefix-args${EXEEXT}: prefix-args.c $(config_h) |
| 1010 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args | 1010 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args |
| 1011 | 1011 | ||
| 1012 | /* Don't lose if this was not defined. */ | 1012 | /* Don''t lose if this was not defined. */ |
| 1013 | #ifndef OLDXMENU_OPTIONS | 1013 | #ifndef OLDXMENU_OPTIONS |
| 1014 | #define OLDXMENU_OPTIONS | 1014 | #define OLDXMENU_OPTIONS |
| 1015 | #endif | 1015 | #endif |
| @@ -1072,7 +1072,7 @@ really-oldXMenu: | |||
| 1072 | #endif /* not USE_X_TOOLKIT */ | 1072 | #endif /* not USE_X_TOOLKIT */ |
| 1073 | #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ | 1073 | #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ |
| 1074 | 1074 | ||
| 1075 | /* We don\'t really need this, but satisfy the dependency. */ | 1075 | /* We don''t really need this, but satisfy the dependency. */ |
| 1076 | stamp-oldxmenu: | 1076 | stamp-oldxmenu: |
| 1077 | touch stamp-oldxmenu | 1077 | touch stamp-oldxmenu |
| 1078 | #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ | 1078 | #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ |
diff --git a/src/buffer.c b/src/buffer.c index 48c3a2aeb5b..5369fe0fac1 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -375,6 +375,7 @@ The value is never nil. */) | |||
| 375 | BUF_ZV_BYTE (b) = BEG_BYTE; | 375 | BUF_ZV_BYTE (b) = BEG_BYTE; |
| 376 | BUF_Z_BYTE (b) = BEG_BYTE; | 376 | BUF_Z_BYTE (b) = BEG_BYTE; |
| 377 | BUF_MODIFF (b) = 1; | 377 | BUF_MODIFF (b) = 1; |
| 378 | BUF_CHARS_MODIFF (b) = 1; | ||
| 378 | BUF_OVERLAY_MODIFF (b) = 1; | 379 | BUF_OVERLAY_MODIFF (b) = 1; |
| 379 | BUF_SAVE_MODIFF (b) = 1; | 380 | BUF_SAVE_MODIFF (b) = 1; |
| 380 | BUF_INTERVALS (b) = 0; | 381 | BUF_INTERVALS (b) = 0; |
| @@ -1149,6 +1150,31 @@ No argument or nil as argument means use current buffer as BUFFER. */) | |||
| 1149 | 1150 | ||
| 1150 | return make_number (BUF_MODIFF (buf)); | 1151 | return make_number (BUF_MODIFF (buf)); |
| 1151 | } | 1152 | } |
| 1153 | |||
| 1154 | DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick, | ||
| 1155 | Sbuffer_chars_modified_tick, 0, 1, 0, | ||
| 1156 | doc: /* Return BUFFER's character-change tick counter. | ||
| 1157 | Each buffer has a character-change tick counter, which is set to the | ||
| 1158 | value of the buffer's tick counter \(see `buffer-modified-tick'), each | ||
| 1159 | time text in that buffer is inserted or deleted. By comparing the | ||
| 1160 | values returned by two individual calls of `buffer-chars-modified-tick', | ||
| 1161 | you can tell whether a character change occurred in that buffer in | ||
| 1162 | between these calls. No argument or nil as argument means use current | ||
| 1163 | buffer as BUFFER. */) | ||
| 1164 | (buffer) | ||
| 1165 | register Lisp_Object buffer; | ||
| 1166 | { | ||
| 1167 | register struct buffer *buf; | ||
| 1168 | if (NILP (buffer)) | ||
| 1169 | buf = current_buffer; | ||
| 1170 | else | ||
| 1171 | { | ||
| 1172 | CHECK_BUFFER (buffer); | ||
| 1173 | buf = XBUFFER (buffer); | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | return make_number (BUF_CHARS_MODIFF (buf)); | ||
| 1177 | } | ||
| 1152 | 1178 | ||
| 1153 | DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, | 1179 | DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, |
| 1154 | "sRename buffer (to new name): \nP", | 1180 | "sRename buffer (to new name): \nP", |
| @@ -6060,6 +6086,7 @@ The function `kill-all-local-variables' runs this before doing anything else. * | |||
| 6060 | defsubr (&Sbuffer_modified_p); | 6086 | defsubr (&Sbuffer_modified_p); |
| 6061 | defsubr (&Sset_buffer_modified_p); | 6087 | defsubr (&Sset_buffer_modified_p); |
| 6062 | defsubr (&Sbuffer_modified_tick); | 6088 | defsubr (&Sbuffer_modified_tick); |
| 6089 | defsubr (&Sbuffer_chars_modified_tick); | ||
| 6063 | defsubr (&Srename_buffer); | 6090 | defsubr (&Srename_buffer); |
| 6064 | defsubr (&Sother_buffer); | 6091 | defsubr (&Sother_buffer); |
| 6065 | defsubr (&Sbuffer_enable_undo); | 6092 | defsubr (&Sbuffer_enable_undo); |
diff --git a/src/buffer.h b/src/buffer.h index 9d3ca6ea463..96db95a57e4 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -82,6 +82,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 82 | /* Modification count. */ | 82 | /* Modification count. */ |
| 83 | #define MODIFF (current_buffer->text->modiff) | 83 | #define MODIFF (current_buffer->text->modiff) |
| 84 | 84 | ||
| 85 | /* Character modification count. */ | ||
| 86 | #define CHARS_MODIFF (current_buffer->text->chars_modiff) | ||
| 87 | |||
| 85 | /* Overlay modification count. */ | 88 | /* Overlay modification count. */ |
| 86 | #define OVERLAY_MODIFF (current_buffer->text->overlay_modiff) | 89 | #define OVERLAY_MODIFF (current_buffer->text->overlay_modiff) |
| 87 | 90 | ||
| @@ -147,6 +150,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 147 | /* Modification count. */ | 150 | /* Modification count. */ |
| 148 | #define BUF_MODIFF(buf) ((buf)->text->modiff) | 151 | #define BUF_MODIFF(buf) ((buf)->text->modiff) |
| 149 | 152 | ||
| 153 | /* Character modification count. */ | ||
| 154 | #define BUF_CHARS_MODIFF(buf) ((buf)->text->chars_modiff) | ||
| 155 | |||
| 150 | /* Modification count as of last visit or save. */ | 156 | /* Modification count as of last visit or save. */ |
| 151 | #define BUF_SAVE_MODIFF(buf) ((buf)->text->save_modiff) | 157 | #define BUF_SAVE_MODIFF(buf) ((buf)->text->save_modiff) |
| 152 | 158 | ||
| @@ -410,6 +416,10 @@ struct buffer_text | |||
| 410 | for this buffer. It is incremented for | 416 | for this buffer. It is incremented for |
| 411 | each such event, and never otherwise | 417 | each such event, and never otherwise |
| 412 | changed. */ | 418 | changed. */ |
| 419 | int chars_modiff; /* This is modified with character change | ||
| 420 | events for this buffer. It is set to | ||
| 421 | modiff for each such event, and never | ||
| 422 | otherwise changed. */ | ||
| 413 | int save_modiff; /* Previous value of modiff, as of last | 423 | int save_modiff; /* Previous value of modiff, as of last |
| 414 | time buffer visited or saved a file. */ | 424 | time buffer visited or saved a file. */ |
| 415 | 425 | ||
diff --git a/src/casefiddle.c b/src/casefiddle.c index 8eb3cc69fca..104f7f97a41 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -196,7 +196,7 @@ casify_region (flag, b, e) | |||
| 196 | validate_region (&b, &e); | 196 | validate_region (&b, &e); |
| 197 | start = XFASTINT (b); | 197 | start = XFASTINT (b); |
| 198 | end = XFASTINT (e); | 198 | end = XFASTINT (e); |
| 199 | modify_region (current_buffer, start, end); | 199 | modify_region (current_buffer, start, end, 0); |
| 200 | record_change (start, end - start); | 200 | record_change (start, end - start); |
| 201 | start_byte = CHAR_TO_BYTE (start); | 201 | start_byte = CHAR_TO_BYTE (start); |
| 202 | end_byte = CHAR_TO_BYTE (end); | 202 | end_byte = CHAR_TO_BYTE (end); |
diff --git a/src/coding.c b/src/coding.c index d8977227ec9..3efce130b85 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7461,7 +7461,8 @@ DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region, | |||
| 7461 | doc: /* Detect coding system of the text in the region between START and END. | 7461 | doc: /* Detect coding system of the text in the region between START and END. |
| 7462 | Return a list of possible coding systems ordered by priority. | 7462 | Return a list of possible coding systems ordered by priority. |
| 7463 | 7463 | ||
| 7464 | If only ASCII characters are found, it returns a list of single element | 7464 | If only ASCII characters are found (except for such ISO-2022 control |
| 7465 | characters ISO-2022 as ESC), it returns a list of single element | ||
| 7465 | `undecided' or its subsidiary coding system according to a detected | 7466 | `undecided' or its subsidiary coding system according to a detected |
| 7466 | end-of-line format. | 7467 | end-of-line format. |
| 7467 | 7468 | ||
| @@ -7497,7 +7498,8 @@ DEFUN ("detect-coding-string", Fdetect_coding_string, Sdetect_coding_string, | |||
| 7497 | doc: /* Detect coding system of the text in STRING. | 7498 | doc: /* Detect coding system of the text in STRING. |
| 7498 | Return a list of possible coding systems ordered by priority. | 7499 | Return a list of possible coding systems ordered by priority. |
| 7499 | 7500 | ||
| 7500 | If only ASCII characters are found, it returns a list of single element | 7501 | If only ASCII characters are found (except for such ISO-2022 control |
| 7502 | characters ISO-2022 as ESC), it returns a list of single element | ||
| 7501 | `undecided' or its subsidiary coding system according to a detected | 7503 | `undecided' or its subsidiary coding system according to a detected |
| 7502 | end-of-line format. | 7504 | end-of-line format. |
| 7503 | 7505 | ||
diff --git a/src/editfns.c b/src/editfns.c index 362d8fe1dae..2fcacc16901 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -2802,7 +2802,7 @@ Both characters must have the same length of multi-byte form. */) | |||
| 2802 | else if (!changed) | 2802 | else if (!changed) |
| 2803 | { | 2803 | { |
| 2804 | changed = -1; | 2804 | changed = -1; |
| 2805 | modify_region (current_buffer, pos, XINT (end)); | 2805 | modify_region (current_buffer, pos, XINT (end), 0); |
| 2806 | 2806 | ||
| 2807 | if (! NILP (noundo)) | 2807 | if (! NILP (noundo)) |
| 2808 | { | 2808 | { |
| @@ -2982,7 +2982,7 @@ It returns the number of characters changed. */) | |||
| 2982 | pos = XINT (start); | 2982 | pos = XINT (start); |
| 2983 | pos_byte = CHAR_TO_BYTE (pos); | 2983 | pos_byte = CHAR_TO_BYTE (pos); |
| 2984 | end_pos = XINT (end); | 2984 | end_pos = XINT (end); |
| 2985 | modify_region (current_buffer, pos, end_pos); | 2985 | modify_region (current_buffer, pos, end_pos, 0); |
| 2986 | 2986 | ||
| 2987 | cnt = 0; | 2987 | cnt = 0; |
| 2988 | for (; pos < end_pos; ) | 2988 | for (; pos < end_pos; ) |
| @@ -3890,7 +3890,13 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3890 | this_format[format - this_format_start] = 0; | 3890 | this_format[format - this_format_start] = 0; |
| 3891 | 3891 | ||
| 3892 | if (INTEGERP (args[n])) | 3892 | if (INTEGERP (args[n])) |
| 3893 | sprintf (p, this_format, XINT (args[n])); | 3893 | { |
| 3894 | if (format[-1] == 'd') | ||
| 3895 | sprintf (p, this_format, XINT (args[n])); | ||
| 3896 | /* Don't sign-extend for octal or hex printing. */ | ||
| 3897 | else | ||
| 3898 | sprintf (p, this_format, XUINT (args[n])); | ||
| 3899 | } | ||
| 3894 | else | 3900 | else |
| 3895 | sprintf (p, this_format, XFLOAT_DATA (args[n])); | 3901 | sprintf (p, this_format, XFLOAT_DATA (args[n])); |
| 3896 | 3902 | ||
| @@ -4306,7 +4312,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4306 | 4312 | ||
| 4307 | if (end1 == start2) /* adjacent regions */ | 4313 | if (end1 == start2) /* adjacent regions */ |
| 4308 | { | 4314 | { |
| 4309 | modify_region (current_buffer, start1, end2); | 4315 | modify_region (current_buffer, start1, end2, 0); |
| 4310 | record_change (start1, len1 + len2); | 4316 | record_change (start1, len1 + len2); |
| 4311 | 4317 | ||
| 4312 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4318 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| @@ -4362,8 +4368,8 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4362 | { | 4368 | { |
| 4363 | USE_SAFE_ALLOCA; | 4369 | USE_SAFE_ALLOCA; |
| 4364 | 4370 | ||
| 4365 | modify_region (current_buffer, start1, end1); | 4371 | modify_region (current_buffer, start1, end1, 0); |
| 4366 | modify_region (current_buffer, start2, end2); | 4372 | modify_region (current_buffer, start2, end2, 0); |
| 4367 | record_change (start1, len1); | 4373 | record_change (start1, len1); |
| 4368 | record_change (start2, len2); | 4374 | record_change (start2, len2); |
| 4369 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4375 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| @@ -4392,7 +4398,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4392 | { | 4398 | { |
| 4393 | USE_SAFE_ALLOCA; | 4399 | USE_SAFE_ALLOCA; |
| 4394 | 4400 | ||
| 4395 | modify_region (current_buffer, start1, end2); | 4401 | modify_region (current_buffer, start1, end2, 0); |
| 4396 | record_change (start1, (end2 - start1)); | 4402 | record_change (start1, (end2 - start1)); |
| 4397 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4403 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| 4398 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); | 4404 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); |
| @@ -4423,7 +4429,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4423 | USE_SAFE_ALLOCA; | 4429 | USE_SAFE_ALLOCA; |
| 4424 | 4430 | ||
| 4425 | record_change (start1, (end2 - start1)); | 4431 | record_change (start1, (end2 - start1)); |
| 4426 | modify_region (current_buffer, start1, end2); | 4432 | modify_region (current_buffer, start1, end2, 0); |
| 4427 | 4433 | ||
| 4428 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4434 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| 4429 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); | 4435 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); |
diff --git a/src/eval.c b/src/eval.c index 0d7a6a31038..5f3bd46c4dc 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -199,6 +199,14 @@ extern Lisp_Object Qrisky_local_variable; | |||
| 199 | 199 | ||
| 200 | static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); | 200 | static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); |
| 201 | static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; | 201 | static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; |
| 202 | |||
| 203 | #if __GNUC__ | ||
| 204 | /* "gcc -O3" enables automatic function inlining, which optimizes out | ||
| 205 | the arguments for the invocations of these functions, whereas they | ||
| 206 | expect these values on the stack. */ | ||
| 207 | Lisp_Object apply1 () __attribute__((noinline)); | ||
| 208 | Lisp_Object call2 () __attribute__((noinline)); | ||
| 209 | #endif | ||
| 202 | 210 | ||
| 203 | void | 211 | void |
| 204 | init_eval_once () | 212 | init_eval_once () |
| @@ -385,7 +385,12 @@ Symbols are also allowed; their print names are used instead. */) | |||
| 385 | return i1 < SCHARS (s2) ? Qt : Qnil; | 385 | return i1 < SCHARS (s2) ? Qt : Qnil; |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | static Lisp_Object concat (); | 388 | #if __GNUC__ |
| 389 | /* "gcc -O3" enables automatic function inlining, which optimizes out | ||
| 390 | the arguments for the invocations of this function, whereas it | ||
| 391 | expects these values on the stack. */ | ||
| 392 | static Lisp_Object concat () __attribute__((noinline)); | ||
| 393 | #endif | ||
| 389 | 394 | ||
| 390 | /* ARGSUSED */ | 395 | /* ARGSUSED */ |
| 391 | Lisp_Object | 396 | Lisp_Object |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 2a6ed9d1524..89b0f8b11c6 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1326,9 +1326,10 @@ xg_get_file_with_chooser (f, prompt, default_filename, | |||
| 1326 | message[0] = '\0'; | 1326 | message[0] = '\0'; |
| 1327 | if (action != GTK_FILE_CHOOSER_ACTION_SAVE) | 1327 | if (action != GTK_FILE_CHOOSER_ACTION_SAVE) |
| 1328 | strcat (message, "\nType C-l to display a file name text entry box.\n"); | 1328 | strcat (message, "\nType C-l to display a file name text entry box.\n"); |
| 1329 | strcat (message, "\nIf you don't like this file selector, customize " | 1329 | strcat (message, "\nIf you don't like this file selector, use the " |
| 1330 | "use-file-dialog\nto turn it off, or type C-x C-f to visit files."); | 1330 | "corresponding\nkey binding or customize " |
| 1331 | 1331 | "use-file-dialog to turn it off."); | |
| 1332 | |||
| 1332 | wmessage = gtk_label_new (message); | 1333 | wmessage = gtk_label_new (message); |
| 1333 | gtk_widget_show (wmessage); | 1334 | gtk_widget_show (wmessage); |
| 1334 | gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0); | 1335 | gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0); |
| @@ -1340,6 +1341,7 @@ xg_get_file_with_chooser (f, prompt, default_filename, | |||
| 1340 | Lisp_Object file; | 1341 | Lisp_Object file; |
| 1341 | struct gcpro gcpro1; | 1342 | struct gcpro gcpro1; |
| 1342 | GCPRO1 (file); | 1343 | GCPRO1 (file); |
| 1344 | char *utf8_filename; | ||
| 1343 | 1345 | ||
| 1344 | file = build_string (default_filename); | 1346 | file = build_string (default_filename); |
| 1345 | 1347 | ||
| @@ -1347,14 +1349,23 @@ xg_get_file_with_chooser (f, prompt, default_filename, | |||
| 1347 | an absolute name starting with /. */ | 1349 | an absolute name starting with /. */ |
| 1348 | if (default_filename[0] != '/') | 1350 | if (default_filename[0] != '/') |
| 1349 | file = Fexpand_file_name (file, Qnil); | 1351 | file = Fexpand_file_name (file, Qnil); |
| 1350 | 1352 | ||
| 1351 | default_filename = SSDATA (file); | 1353 | utf8_filename = SSDATA (ENCODE_UTF_8 (file)); |
| 1352 | if (Ffile_directory_p (file)) | 1354 | if (! NILP (Ffile_directory_p (file))) |
| 1353 | gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin), | 1355 | gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin), |
| 1354 | default_filename); | 1356 | utf8_filename); |
| 1355 | else | 1357 | else |
| 1356 | gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin), | 1358 | { |
| 1357 | default_filename); | 1359 | gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin), |
| 1360 | utf8_filename); | ||
| 1361 | if (action == GTK_FILE_CHOOSER_ACTION_SAVE) | ||
| 1362 | { | ||
| 1363 | char *cp = strrchr (utf8_filename, '/'); | ||
| 1364 | if (cp) ++cp; | ||
| 1365 | else cp = utf8_filename; | ||
| 1366 | gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filewin), cp); | ||
| 1367 | } | ||
| 1368 | } | ||
| 1358 | 1369 | ||
| 1359 | UNGCPRO; | 1370 | UNGCPRO; |
| 1360 | } | 1371 | } |
diff --git a/src/indent.c b/src/indent.c index ae28fa3791d..2461c156e3c 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2074,7 +2074,7 @@ whether or not it is currently displayed in some window. */) | |||
| 2074 | { | 2074 | { |
| 2075 | int it_start; | 2075 | int it_start; |
| 2076 | int oselective; | 2076 | int oselective; |
| 2077 | int start_on_image_or_stretch_p; | 2077 | int start_on_image_or_stretch_or_string_p; |
| 2078 | 2078 | ||
| 2079 | SET_TEXT_POS (pt, PT, PT_BYTE); | 2079 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| 2080 | start_display (&it, w, pt); | 2080 | start_display (&it, w, pt); |
| @@ -2086,8 +2086,9 @@ whether or not it is currently displayed in some window. */) | |||
| 2086 | while the end position is really at some X > 0, the same X that | 2086 | while the end position is really at some X > 0, the same X that |
| 2087 | PT had. */ | 2087 | PT had. */ |
| 2088 | it_start = IT_CHARPOS (it); | 2088 | it_start = IT_CHARPOS (it); |
| 2089 | start_on_image_or_stretch_p = (it.method == GET_FROM_IMAGE | 2089 | start_on_image_or_stretch_or_string_p = (it.method == GET_FROM_IMAGE |
| 2090 | || it.method == GET_FROM_STRETCH); | 2090 | || it.method == GET_FROM_STRETCH |
| 2091 | || it.method == GET_FROM_STRING); | ||
| 2091 | reseat_at_previous_visible_line_start (&it); | 2092 | reseat_at_previous_visible_line_start (&it); |
| 2092 | it.current_x = it.hpos = 0; | 2093 | it.current_x = it.hpos = 0; |
| 2093 | /* Temporarily disable selective display so we don't move too far */ | 2094 | /* Temporarily disable selective display so we don't move too far */ |
| @@ -2098,10 +2099,10 @@ whether or not it is currently displayed in some window. */) | |||
| 2098 | 2099 | ||
| 2099 | /* Move back if we got too far. This may happen if | 2100 | /* Move back if we got too far. This may happen if |
| 2100 | truncate-lines is on and PT is beyond right margin. | 2101 | truncate-lines is on and PT is beyond right margin. |
| 2101 | It may also happen if it_start is on an image or a stretch | 2102 | It may also happen if it_start is on an image, stretch |
| 2102 | glyph -- in that case, don't go back. */ | 2103 | glyph, or string -- in that case, don't go back. */ |
| 2103 | if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 | 2104 | if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 |
| 2104 | && !start_on_image_or_stretch_p) | 2105 | && !start_on_image_or_stretch_or_string_p) |
| 2105 | move_it_by_lines (&it, -1, 0); | 2106 | move_it_by_lines (&it, -1, 0); |
| 2106 | 2107 | ||
| 2107 | it.vpos = 0; | 2108 | it.vpos = 0; |
diff --git a/src/insdel.c b/src/insdel.c index df0831c9652..5e0eec936d4 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -996,6 +996,7 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers) | |||
| 996 | will add up to the right stuff in the undo list. */ | 996 | will add up to the right stuff in the undo list. */ |
| 997 | record_insert (PT, nchars); | 997 | record_insert (PT, nchars); |
| 998 | MODIFF++; | 998 | MODIFF++; |
| 999 | CHARS_MODIFF = MODIFF; | ||
| 999 | 1000 | ||
| 1000 | bcopy (string, GPT_ADDR, nbytes); | 1001 | bcopy (string, GPT_ADDR, nbytes); |
| 1001 | 1002 | ||
| @@ -1133,6 +1134,7 @@ insert_from_string_1 (string, pos, pos_byte, nchars, nbytes, | |||
| 1133 | 1134 | ||
| 1134 | record_insert (PT, nchars); | 1135 | record_insert (PT, nchars); |
| 1135 | MODIFF++; | 1136 | MODIFF++; |
| 1137 | CHARS_MODIFF = MODIFF; | ||
| 1136 | 1138 | ||
| 1137 | GAP_SIZE -= outgoing_nbytes; | 1139 | GAP_SIZE -= outgoing_nbytes; |
| 1138 | GPT += nchars; | 1140 | GPT += nchars; |
| @@ -1328,6 +1330,7 @@ insert_from_buffer_1 (buf, from, nchars, inherit) | |||
| 1328 | 1330 | ||
| 1329 | record_insert (PT, nchars); | 1331 | record_insert (PT, nchars); |
| 1330 | MODIFF++; | 1332 | MODIFF++; |
| 1333 | CHARS_MODIFF = MODIFF; | ||
| 1331 | 1334 | ||
| 1332 | GAP_SIZE -= outgoing_nbytes; | 1335 | GAP_SIZE -= outgoing_nbytes; |
| 1333 | GPT += nchars; | 1336 | GPT += nchars; |
| @@ -1436,6 +1439,7 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte) | |||
| 1436 | if (len == 0) | 1439 | if (len == 0) |
| 1437 | evaporate_overlays (from); | 1440 | evaporate_overlays (from); |
| 1438 | MODIFF++; | 1441 | MODIFF++; |
| 1442 | CHARS_MODIFF = MODIFF; | ||
| 1439 | } | 1443 | } |
| 1440 | 1444 | ||
| 1441 | /* Like adjust_after_replace, but doesn't require PREV_TEXT. | 1445 | /* Like adjust_after_replace, but doesn't require PREV_TEXT. |
| @@ -1486,6 +1490,7 @@ adjust_after_replace_noundo (from, from_byte, nchars_del, nbytes_del, len, len_b | |||
| 1486 | if (len == 0) | 1490 | if (len == 0) |
| 1487 | evaporate_overlays (from); | 1491 | evaporate_overlays (from); |
| 1488 | MODIFF++; | 1492 | MODIFF++; |
| 1493 | CHARS_MODIFF = MODIFF; | ||
| 1489 | } | 1494 | } |
| 1490 | 1495 | ||
| 1491 | /* Record undo information, adjust markers and position keepers for an | 1496 | /* Record undo information, adjust markers and position keepers for an |
| @@ -1678,6 +1683,7 @@ replace_range (from, to, new, prepare, inherit, markers) | |||
| 1678 | CHECK_MARKERS (); | 1683 | CHECK_MARKERS (); |
| 1679 | 1684 | ||
| 1680 | MODIFF++; | 1685 | MODIFF++; |
| 1686 | CHARS_MODIFF = MODIFF; | ||
| 1681 | UNGCPRO; | 1687 | UNGCPRO; |
| 1682 | 1688 | ||
| 1683 | signal_after_change (from, nchars_del, GPT - from); | 1689 | signal_after_change (from, nchars_del, GPT - from); |
| @@ -1802,6 +1808,7 @@ replace_range_2 (from, from_byte, to, to_byte, ins, inschars, insbytes, markers) | |||
| 1802 | CHECK_MARKERS (); | 1808 | CHECK_MARKERS (); |
| 1803 | 1809 | ||
| 1804 | MODIFF++; | 1810 | MODIFF++; |
| 1811 | CHARS_MODIFF = MODIFF; | ||
| 1805 | } | 1812 | } |
| 1806 | 1813 | ||
| 1807 | /* Delete characters in current buffer | 1814 | /* Delete characters in current buffer |
| @@ -1983,6 +1990,7 @@ del_range_2 (from, from_byte, to, to_byte, ret_string) | |||
| 1983 | if (! EQ (current_buffer->undo_list, Qt)) | 1990 | if (! EQ (current_buffer->undo_list, Qt)) |
| 1984 | record_delete (from, deletion); | 1991 | record_delete (from, deletion); |
| 1985 | MODIFF++; | 1992 | MODIFF++; |
| 1993 | CHARS_MODIFF = MODIFF; | ||
| 1986 | 1994 | ||
| 1987 | /* Relocate point as if it were a marker. */ | 1995 | /* Relocate point as if it were a marker. */ |
| 1988 | if (from < PT) | 1996 | if (from < PT) |
| @@ -2023,12 +2031,15 @@ del_range_2 (from, from_byte, to, to_byte, ret_string) | |||
| 2023 | character positions START to END. This checks the read-only | 2031 | character positions START to END. This checks the read-only |
| 2024 | properties of the region, calls the necessary modification hooks, | 2032 | properties of the region, calls the necessary modification hooks, |
| 2025 | and warns the next redisplay that it should pay attention to that | 2033 | and warns the next redisplay that it should pay attention to that |
| 2026 | area. */ | 2034 | area. |
| 2035 | |||
| 2036 | If PRESERVE_CHARS_MODIFF is non-zero, do not update CHARS_MODIFF. | ||
| 2037 | Otherwise set CHARS_MODIFF to the new value of MODIFF. */ | ||
| 2027 | 2038 | ||
| 2028 | void | 2039 | void |
| 2029 | modify_region (buffer, start, end) | 2040 | modify_region (buffer, start, end, preserve_chars_modiff) |
| 2030 | struct buffer *buffer; | 2041 | struct buffer *buffer; |
| 2031 | int start, end; | 2042 | int start, end, preserve_chars_modiff; |
| 2032 | { | 2043 | { |
| 2033 | struct buffer *old_buffer = current_buffer; | 2044 | struct buffer *old_buffer = current_buffer; |
| 2034 | 2045 | ||
| @@ -2042,6 +2053,8 @@ modify_region (buffer, start, end) | |||
| 2042 | if (MODIFF <= SAVE_MODIFF) | 2053 | if (MODIFF <= SAVE_MODIFF) |
| 2043 | record_first_change (); | 2054 | record_first_change (); |
| 2044 | MODIFF++; | 2055 | MODIFF++; |
| 2056 | if (! preserve_chars_modiff) | ||
| 2057 | CHARS_MODIFF = MODIFF; | ||
| 2045 | 2058 | ||
| 2046 | buffer->point_before_scroll = Qnil; | 2059 | buffer->point_before_scroll = Qnil; |
| 2047 | 2060 | ||
diff --git a/src/lisp.h b/src/lisp.h index 171f8340885..7c6826d7bda 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2484,7 +2484,7 @@ extern Lisp_Object del_range_1 P_ ((int, int, int, int)); | |||
| 2484 | extern void del_range_byte P_ ((int, int, int)); | 2484 | extern void del_range_byte P_ ((int, int, int)); |
| 2485 | extern void del_range_both P_ ((int, int, int, int, int)); | 2485 | extern void del_range_both P_ ((int, int, int, int, int)); |
| 2486 | extern Lisp_Object del_range_2 P_ ((int, int, int, int, int)); | 2486 | extern Lisp_Object del_range_2 P_ ((int, int, int, int, int)); |
| 2487 | extern void modify_region P_ ((struct buffer *, int, int)); | 2487 | extern void modify_region P_ ((struct buffer *, int, int, int)); |
| 2488 | extern void prepare_to_modify_buffer P_ ((int, int, int *)); | 2488 | extern void prepare_to_modify_buffer P_ ((int, int, int *)); |
| 2489 | extern void signal_before_change P_ ((int, int, int *)); | 2489 | extern void signal_before_change P_ ((int, int, int *)); |
| 2490 | extern void signal_after_change P_ ((int, int, int)); | 2490 | extern void signal_after_change P_ ((int, int, int)); |
diff --git a/src/macterm.c b/src/macterm.c index f46679eaa58..4156000478e 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -9507,6 +9507,18 @@ mac_handle_window_event (next_handler, event, data) | |||
| 9507 | 9507 | ||
| 9508 | break; | 9508 | break; |
| 9509 | 9509 | ||
| 9510 | case kEventWindowClose: | ||
| 9511 | { | ||
| 9512 | struct input_event buf; | ||
| 9513 | |||
| 9514 | EVENT_INIT (buf); | ||
| 9515 | buf.kind = DELETE_WINDOW_EVENT; | ||
| 9516 | XSETFRAME (buf.frame_or_window, mac_window_to_frame (wp)); | ||
| 9517 | buf.arg = Qnil; | ||
| 9518 | kbd_buffer_store_event (&buf); | ||
| 9519 | } | ||
| 9520 | return noErr; | ||
| 9521 | |||
| 9510 | #ifdef MAC_OSX | 9522 | #ifdef MAC_OSX |
| 9511 | case kEventWindowToolbarSwitchMode: | 9523 | case kEventWindowToolbarSwitchMode: |
| 9512 | result = CallNextEventHandler (next_handler, event); | 9524 | result = CallNextEventHandler (next_handler, event); |
| @@ -9796,6 +9808,8 @@ mac_handle_text_input_event (next_handler, event, data) | |||
| 9796 | read_socket_inev->kind = ASCII_KEYSTROKE_EVENT; | 9808 | read_socket_inev->kind = ASCII_KEYSTROKE_EVENT; |
| 9797 | read_socket_inev->code = code; | 9809 | read_socket_inev->code = code; |
| 9798 | read_socket_inev->modifiers = | 9810 | read_socket_inev->modifiers = |
| 9811 | mac_to_emacs_modifiers (modifiers); | ||
| 9812 | read_socket_inev->modifiers |= | ||
| 9799 | (extra_keyboard_modifiers | 9813 | (extra_keyboard_modifiers |
| 9800 | & (meta_modifier | alt_modifier | 9814 | & (meta_modifier | alt_modifier |
| 9801 | | hyper_modifier | super_modifier)); | 9815 | | hyper_modifier | super_modifier)); |
| @@ -9920,6 +9934,7 @@ install_window_handler (window) | |||
| 9920 | {kEventClassWindow, kEventWindowHidden}, | 9934 | {kEventClassWindow, kEventWindowHidden}, |
| 9921 | {kEventClassWindow, kEventWindowExpanded}, | 9935 | {kEventClassWindow, kEventWindowExpanded}, |
| 9922 | {kEventClassWindow, kEventWindowCollapsed}, | 9936 | {kEventClassWindow, kEventWindowCollapsed}, |
| 9937 | {kEventClassWindow, kEventWindowClose}, | ||
| 9923 | #ifdef MAC_OSX | 9938 | #ifdef MAC_OSX |
| 9924 | {kEventClassWindow, kEventWindowToolbarSwitchMode}, | 9939 | {kEventClassWindow, kEventWindowToolbarSwitchMode}, |
| 9925 | #endif | 9940 | #endif |
diff --git a/src/marker.c b/src/marker.c index 82e62e0aa99..9f2aa4826b4 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -460,7 +460,8 @@ Returns nil if MARKER points into a dead buffer. */) | |||
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, | 462 | DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, |
| 463 | doc: /* Return the position MARKER points at, as a character number. */) | 463 | doc: /* Return the position MARKER points at, as a character number. |
| 464 | Returns nil if MARKER points nowhere. */) | ||
| 464 | (marker) | 465 | (marker) |
| 465 | Lisp_Object marker; | 466 | Lisp_Object marker; |
| 466 | { | 467 | { |
diff --git a/src/minibuf.c b/src/minibuf.c index 848dbd0fed0..63eee29c494 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1195,8 +1195,8 @@ The argument PROMPT should be a string ending with a colon and a space. */) | |||
| 1195 | prompt = Fformat (3, args); | 1195 | prompt = Fformat (3, args); |
| 1196 | } | 1196 | } |
| 1197 | 1197 | ||
| 1198 | return Fcompleting_read (prompt, Vbuffer_alist, Qnil, | 1198 | return Fcompleting_read (prompt, intern ("internal-complete-buffer"), |
| 1199 | require_match, Qnil, Qbuffer_name_history, | 1199 | Qnil, require_match, Qnil, Qbuffer_name_history, |
| 1200 | def, Qnil); | 1200 | def, Qnil); |
| 1201 | } | 1201 | } |
| 1202 | else | 1202 | else |
| @@ -1905,6 +1905,24 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1905 | return Qt; | 1905 | return Qt; |
| 1906 | } | 1906 | } |
| 1907 | 1907 | ||
| 1908 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, | ||
| 1909 | doc: /* Perform completion on buffer names. | ||
| 1910 | If the argument FLAG is nil, invoke `try-completion', if it's t, invoke | ||
| 1911 | `all-completions', otherwise invoke `test-completion'. | ||
| 1912 | |||
| 1913 | The arguments STRING and PREDICATE are as in `try-completion', | ||
| 1914 | `all-completions', and `test-completion'. */) | ||
| 1915 | (string, predicate, flag) | ||
| 1916 | Lisp_Object string, predicate, flag; | ||
| 1917 | { | ||
| 1918 | if (NILP (flag)) | ||
| 1919 | return Ftry_completion (string, Vbuffer_alist, predicate); | ||
| 1920 | else if (EQ (flag, Qt)) | ||
| 1921 | return Fall_completions (string, Vbuffer_alist, predicate, Qt); | ||
| 1922 | else /* assume `lambda' */ | ||
| 1923 | return Ftest_completion (string, Vbuffer_alist, predicate); | ||
| 1924 | } | ||
| 1925 | |||
| 1908 | /* returns: | 1926 | /* returns: |
| 1909 | * 0 no possible completion | 1927 | * 0 no possible completion |
| 1910 | * 1 was already an exact and unique completion | 1928 | * 1 was already an exact and unique completion |
| @@ -2906,6 +2924,7 @@ properties. */); | |||
| 2906 | defsubr (&Sread_string); | 2924 | defsubr (&Sread_string); |
| 2907 | defsubr (&Sread_command); | 2925 | defsubr (&Sread_command); |
| 2908 | defsubr (&Sread_variable); | 2926 | defsubr (&Sread_variable); |
| 2927 | defsubr (&Sinternal_complete_buffer); | ||
| 2909 | defsubr (&Sread_buffer); | 2928 | defsubr (&Sread_buffer); |
| 2910 | defsubr (&Sread_no_blanks_input); | 2929 | defsubr (&Sread_no_blanks_input); |
| 2911 | defsubr (&Sminibuffer_depth); | 2930 | defsubr (&Sminibuffer_depth); |
diff --git a/src/textprop.c b/src/textprop.c index fd70f039d22..785ed19b566 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1253,7 +1253,7 @@ Return t if any property value actually changed, nil otherwise. */) | |||
| 1253 | } | 1253 | } |
| 1254 | 1254 | ||
| 1255 | if (BUFFERP (object)) | 1255 | if (BUFFERP (object)) |
| 1256 | modify_region (XBUFFER (object), XINT (start), XINT (end)); | 1256 | modify_region (XBUFFER (object), XINT (start), XINT (end), 1); |
| 1257 | 1257 | ||
| 1258 | /* We are at the beginning of interval I, with LEN chars to scan. */ | 1258 | /* We are at the beginning of interval I, with LEN chars to scan. */ |
| 1259 | for (;;) | 1259 | for (;;) |
| @@ -1393,7 +1393,7 @@ set_text_properties (start, end, properties, object, signal_after_change_p) | |||
| 1393 | } | 1393 | } |
| 1394 | 1394 | ||
| 1395 | if (BUFFERP (object)) | 1395 | if (BUFFERP (object)) |
| 1396 | modify_region (XBUFFER (object), XINT (start), XINT (end)); | 1396 | modify_region (XBUFFER (object), XINT (start), XINT (end), 1); |
| 1397 | 1397 | ||
| 1398 | set_text_properties_1 (start, end, properties, object, i); | 1398 | set_text_properties_1 (start, end, properties, object, i); |
| 1399 | 1399 | ||
| @@ -1541,7 +1541,7 @@ Use set-text-properties if you want to remove all text properties. */) | |||
| 1541 | } | 1541 | } |
| 1542 | 1542 | ||
| 1543 | if (BUFFERP (object)) | 1543 | if (BUFFERP (object)) |
| 1544 | modify_region (XBUFFER (object), XINT (start), XINT (end)); | 1544 | modify_region (XBUFFER (object), XINT (start), XINT (end), 1); |
| 1545 | 1545 | ||
| 1546 | /* We are at the beginning of an interval, with len to scan */ | 1546 | /* We are at the beginning of an interval, with len to scan */ |
| 1547 | for (;;) | 1547 | for (;;) |
| @@ -1655,7 +1655,7 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1655 | if (LENGTH (i) == len) | 1655 | if (LENGTH (i) == len) |
| 1656 | { | 1656 | { |
| 1657 | if (!modified && BUFFERP (object)) | 1657 | if (!modified && BUFFERP (object)) |
| 1658 | modify_region (XBUFFER (object), XINT (start), XINT (end)); | 1658 | modify_region (XBUFFER (object), XINT (start), XINT (end), 1); |
| 1659 | remove_properties (Qnil, properties, i, object); | 1659 | remove_properties (Qnil, properties, i, object); |
| 1660 | if (BUFFERP (object)) | 1660 | if (BUFFERP (object)) |
| 1661 | signal_after_change (XINT (start), XINT (end) - XINT (start), | 1661 | signal_after_change (XINT (start), XINT (end) - XINT (start), |
| @@ -1668,7 +1668,7 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1668 | i = split_interval_left (i, len); | 1668 | i = split_interval_left (i, len); |
| 1669 | copy_properties (unchanged, i); | 1669 | copy_properties (unchanged, i); |
| 1670 | if (!modified && BUFFERP (object)) | 1670 | if (!modified && BUFFERP (object)) |
| 1671 | modify_region (XBUFFER (object), XINT (start), XINT (end)); | 1671 | modify_region (XBUFFER (object), XINT (start), XINT (end), 1); |
| 1672 | remove_properties (Qnil, properties, i, object); | 1672 | remove_properties (Qnil, properties, i, object); |
| 1673 | if (BUFFERP (object)) | 1673 | if (BUFFERP (object)) |
| 1674 | signal_after_change (XINT (start), XINT (end) - XINT (start), | 1674 | signal_after_change (XINT (start), XINT (end) - XINT (start), |
| @@ -1679,7 +1679,7 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1679 | if (interval_has_some_properties_list (properties, i)) | 1679 | if (interval_has_some_properties_list (properties, i)) |
| 1680 | { | 1680 | { |
| 1681 | if (!modified && BUFFERP (object)) | 1681 | if (!modified && BUFFERP (object)) |
| 1682 | modify_region (XBUFFER (object), XINT (start), XINT (end)); | 1682 | modify_region (XBUFFER (object), XINT (start), XINT (end), 1); |
| 1683 | remove_properties (Qnil, properties, i, object); | 1683 | remove_properties (Qnil, properties, i, object); |
| 1684 | modified = 1; | 1684 | modified = 1; |
| 1685 | } | 1685 | } |
| @@ -4113,6 +4113,25 @@ init_ntproc () | |||
| 4113 | } | 4113 | } |
| 4114 | 4114 | ||
| 4115 | /* | 4115 | /* |
| 4116 | shutdown_handler ensures that buffers' autosave files are | ||
| 4117 | up to date when the user logs off, or the system shuts down. | ||
| 4118 | */ | ||
| 4119 | BOOL WINAPI shutdown_handler(DWORD type) | ||
| 4120 | { | ||
| 4121 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ | ||
| 4122 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ | ||
| 4123 | || type == CTRL_LOGOFF_EVENT /* User logs off. */ | ||
| 4124 | || type == CTRL_SHUTDOWN_EVENT) /* User shutsdown. */ | ||
| 4125 | { | ||
| 4126 | /* Shut down cleanly, making sure autosave files are up to date. */ | ||
| 4127 | shut_down_emacs (0, 0, Qnil); | ||
| 4128 | } | ||
| 4129 | |||
| 4130 | /* Allow other handlers to handle this signal. */ | ||
| 4131 | return FALSE; | ||
| 4132 | } | ||
| 4133 | |||
| 4134 | /* | ||
| 4116 | globals_of_w32 is used to initialize those global variables that | 4135 | globals_of_w32 is used to initialize those global variables that |
| 4117 | must always be initialized on startup even when the global variable | 4136 | must always be initialized on startup even when the global variable |
| 4118 | initialized is non zero (see the function main in emacs.c). | 4137 | initialized is non zero (see the function main in emacs.c). |
| @@ -4124,6 +4143,11 @@ void globals_of_w32 () | |||
| 4124 | g_b_init_get_token_information = 0; | 4143 | g_b_init_get_token_information = 0; |
| 4125 | g_b_init_lookup_account_sid = 0; | 4144 | g_b_init_lookup_account_sid = 0; |
| 4126 | g_b_init_get_sid_identifier_authority = 0; | 4145 | g_b_init_get_sid_identifier_authority = 0; |
| 4146 | /* The following sets a handler for shutdown notifications for | ||
| 4147 | console apps. This actually applies to Emacs in both console and | ||
| 4148 | GUI modes, since we had to fool windows into thinking emacs is a | ||
| 4149 | console application to get console mode to work. */ | ||
| 4150 | SetConsoleCtrlHandler(shutdown_handler, TRUE); | ||
| 4127 | } | 4151 | } |
| 4128 | 4152 | ||
| 4129 | /* end of nt.c */ | 4153 | /* end of nt.c */ |
diff --git a/src/window.c b/src/window.c index f6253ec634f..7f3e71ec145 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -7290,16 +7290,18 @@ See also `same-window-buffer-names'. */); | |||
| 7290 | next_screen_context_lines = 2; | 7290 | next_screen_context_lines = 2; |
| 7291 | 7291 | ||
| 7292 | DEFVAR_INT ("split-height-threshold", &split_height_threshold, | 7292 | DEFVAR_INT ("split-height-threshold", &split_height_threshold, |
| 7293 | doc: /* *A window must be at least this tall to be eligible for splitting by `display-buffer'. | 7293 | doc: /* *A window must be at least this tall to be eligible for splitting |
| 7294 | by `display-buffer'. The value is in line units. | ||
| 7294 | If there is only one window, it is split regardless of this value. */); | 7295 | If there is only one window, it is split regardless of this value. */); |
| 7295 | split_height_threshold = 500; | 7296 | split_height_threshold = 500; |
| 7296 | 7297 | ||
| 7297 | DEFVAR_INT ("window-min-height", &window_min_height, | 7298 | DEFVAR_INT ("window-min-height", &window_min_height, |
| 7298 | doc: /* *Delete any window less than this tall (including its mode line). */); | 7299 | doc: /* *Delete any window less than this tall (including its mode line). |
| 7300 | The value is in line units. */); | ||
| 7299 | window_min_height = 4; | 7301 | window_min_height = 4; |
| 7300 | 7302 | ||
| 7301 | DEFVAR_INT ("window-min-width", &window_min_width, | 7303 | DEFVAR_INT ("window-min-width", &window_min_width, |
| 7302 | doc: /* *Delete any window less than this wide. */); | 7304 | doc: /* *Delete any window less than this wide (measured in characters). */); |
| 7303 | window_min_width = 10; | 7305 | window_min_width = 10; |
| 7304 | 7306 | ||
| 7305 | DEFVAR_LISP ("scroll-preserve-screen-position", | 7307 | DEFVAR_LISP ("scroll-preserve-screen-position", |
diff --git a/src/xdisp.c b/src/xdisp.c index 4d41bb229d7..0e60020f110 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21547,6 +21547,7 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 21547 | /* Use normal cursor if not blinked off. */ | 21547 | /* Use normal cursor if not blinked off. */ |
| 21548 | if (!w->cursor_off_p) | 21548 | if (!w->cursor_off_p) |
| 21549 | { | 21549 | { |
| 21550 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 21550 | if (glyph != NULL && glyph->type == IMAGE_GLYPH) | 21551 | if (glyph != NULL && glyph->type == IMAGE_GLYPH) |
| 21551 | { | 21552 | { |
| 21552 | if (cursor_type == FILLED_BOX_CURSOR) | 21553 | if (cursor_type == FILLED_BOX_CURSOR) |
| @@ -21572,6 +21573,7 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 21572 | cursor_type = HOLLOW_BOX_CURSOR; | 21573 | cursor_type = HOLLOW_BOX_CURSOR; |
| 21573 | } | 21574 | } |
| 21574 | } | 21575 | } |
| 21576 | #endif | ||
| 21575 | return cursor_type; | 21577 | return cursor_type; |
| 21576 | } | 21578 | } |
| 21577 | 21579 | ||