diff options
| author | Kenichi Handa | 2013-03-16 01:04:47 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2013-03-16 01:04:47 +0900 |
| commit | 646859d33a8ede0cbb3e1685a313420b6510c9c1 (patch) | |
| tree | c8077a7e046ac64dd9bd680b5349bfc34cd6deac /src | |
| parent | 8a44e6d176989d8eef140314098c76a70248ba61 (diff) | |
| parent | d7251c31ab74219747e3755f78ee07b37a16697d (diff) | |
| download | emacs-646859d33a8ede0cbb3e1685a313420b6510c9c1.tar.gz emacs-646859d33a8ede0cbb3e1685a313420b6510c9c1.zip | |
merge trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 76 | ||||
| -rw-r--r-- | src/Makefile.in | 3 | ||||
| -rw-r--r-- | src/alloc.c | 4 | ||||
| -rw-r--r-- | src/bytecode.c | 2 | ||||
| -rw-r--r-- | src/conf_post.h | 13 | ||||
| -rw-r--r-- | src/dispnew.c | 5 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/eval.c | 1 | ||||
| -rw-r--r-- | src/fileio.c | 21 | ||||
| -rw-r--r-- | src/filelock.c | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 5 | ||||
| -rw-r--r-- | src/keymap.c | 4 | ||||
| -rw-r--r-- | src/region-cache.c | 58 | ||||
| -rw-r--r-- | src/sysdep.c | 12 | ||||
| -rw-r--r-- | src/term.c | 4 | ||||
| -rw-r--r-- | src/w32term.c | 31 | ||||
| -rw-r--r-- | src/window.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 10 | ||||
| -rw-r--r-- | src/xfns.c | 2 | ||||
| -rw-r--r-- | src/xsmfns.c | 2 |
20 files changed, 153 insertions, 114 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 44e2ff1a1f1..606a6bcb7f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -26,6 +26,82 @@ | |||
| 26 | * lisp.h (adjust_after_replace): Cancel externing it. | 26 | * lisp.h (adjust_after_replace): Cancel externing it. |
| 27 | (insert_from_gap): Adjust prototype. | 27 | (insert_from_gap): Adjust prototype. |
| 28 | 28 | ||
| 29 | 2013-03-15 Eli Zaretskii <eliz@gnu.org> | ||
| 30 | |||
| 31 | * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and | ||
| 32 | FULLSCREEN_MAXIMIZED. (Bug#13935) | ||
| 33 | |||
| 34 | 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 35 | |||
| 36 | * region-cache.c (find_cache_boundary, move_cache_gap) | ||
| 37 | (insert_cache_boundary, delete_cache_boundaries, set_cache_region): | ||
| 38 | Simplify debugging check and convert to eassert. Adjust comment. | ||
| 39 | (pp_cache): Put under ENABLE_CHECKING. | ||
| 40 | |||
| 41 | 2013-03-14 Eli Zaretskii <eliz@gnu.org> | ||
| 42 | |||
| 43 | * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old | ||
| 44 | and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE | ||
| 45 | and WM_ACTIVATEAPP. | ||
| 46 | (w32fullscreen_hook): If the frame is visible, reset | ||
| 47 | f->want_fullscreen flag after changing the frame size. If the | ||
| 48 | frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT. | ||
| 49 | (Bug#13953) | ||
| 50 | |||
| 51 | 2013-03-13 Daniel Colascione <dancol@dancol.org> | ||
| 52 | |||
| 53 | * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds | ||
| 54 | too so that these builds can use Cygwin's file conversion | ||
| 55 | functions. (We've been building and linking cygw32.o all along | ||
| 56 | and just not using it.) | ||
| 57 | |||
| 58 | 2013-03-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 59 | |||
| 60 | File synchronization fixes (Bug#13944). | ||
| 61 | * Makefile.in (LIB_FDATASYNC): New macro. | ||
| 62 | (LIBES): Use it. | ||
| 63 | * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed. | ||
| 64 | * fileio.c (Fwrite_region, write_region_inhibit_fsync): | ||
| 65 | Don't worry about HAVE_FSYNC, since a substitute fsync is | ||
| 66 | available if the system lacks one. | ||
| 67 | (Fwrite_regin): Retry fsync if interrupted. | ||
| 68 | |||
| 69 | 2013-03-13 Eli Zaretskii <eliz@gnu.org> | ||
| 70 | |||
| 71 | * w32term.c (w32_read_socket): If the Emacs frame is being | ||
| 72 | activated, call w32fullscreen_hook, to make sure the new frame | ||
| 73 | dimensions are in effect. (Bug#13937) | ||
| 74 | |||
| 75 | 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 76 | |||
| 77 | * xdisp.c (init_iterator): Simplify because both character and byte | ||
| 78 | positions are either specified or -1. Add eassert. Adjust comment. | ||
| 79 | * window.c (Fscroll_other_window): Use SET_PT_BOTH because both | ||
| 80 | character and byte positions can be obtained from marker. | ||
| 81 | |||
| 82 | 2013-03-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 83 | |||
| 84 | Static checking by Sun C 5.12. | ||
| 85 | * alloc.c (buffer_memory_full) [REL_ALLOC]: | ||
| 86 | * bytecode.c (exec_byte_code): | ||
| 87 | * dispnew.c (init_display): | ||
| 88 | * eval.c (error): | ||
| 89 | * fileio.c (Fsubstitute_in_file_name): | ||
| 90 | * keyboard.c (Fevent_convert_list): | ||
| 91 | * keymap.c (Fsingle_key_description): | ||
| 92 | * term.c (maybe_fatal, fatal): | ||
| 93 | * xfns.c (Fx_display_backing_store, Fx_display_visual_class): | ||
| 94 | * xsmfns.c (Fhandle_save_session): | ||
| 95 | Omit unreachable code. | ||
| 96 | * keymap.c (map_keymap_char_table_item): Cast void * to | ||
| 97 | a function pointer type; the C Standard requires this. | ||
| 98 | |||
| 99 | * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out. | ||
| 100 | Include <sys/param.h> unconditionally, as that works elsewhere and | ||
| 101 | is simpler here. Include <sys/sysctl.h> if DARWIN_OS || | ||
| 102 | __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin | ||
| 103 | and FreeBSD now. | ||
| 104 | |||
| 29 | 2013-03-11 Paul Eggert <eggert@cs.ucla.edu> | 105 | 2013-03-11 Paul Eggert <eggert@cs.ucla.edu> |
| 30 | 106 | ||
| 31 | * insdel.c (adjust_after_replace): Use bool for boolean. | 107 | * insdel.c (adjust_after_replace): Use bool for boolean. |
diff --git a/src/Makefile.in b/src/Makefile.in index b2034a3379d..31de9714c65 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -139,6 +139,7 @@ M17N_FLT_LIBS = @M17N_FLT_LIBS@ | |||
| 139 | 139 | ||
| 140 | LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ | 140 | LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ |
| 141 | LIB_EACCESS=@LIB_EACCESS@ | 141 | LIB_EACCESS=@LIB_EACCESS@ |
| 142 | LIB_FDATASYNC=@LIB_FDATASYNC@ | ||
| 142 | LIB_TIMER_TIME=@LIB_TIMER_TIME@ | 143 | LIB_TIMER_TIME=@LIB_TIMER_TIME@ |
| 143 | 144 | ||
| 144 | DBUS_CFLAGS = @DBUS_CFLAGS@ | 145 | DBUS_CFLAGS = @DBUS_CFLAGS@ |
| @@ -391,7 +392,7 @@ ALLOBJS = $(VMLIMIT_OBJ) $(obj) $(otherobj) | |||
| 391 | LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ | 392 | LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ |
| 392 | $(LIBX_OTHER) $(LIBSOUND) \ | 393 | $(LIBX_OTHER) $(LIBSOUND) \ |
| 393 | $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \ | 394 | $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \ |
| 394 | $(LIB_EACCESS) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ | 395 | $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ |
| 395 | $(LIB_EXECINFO) \ | 396 | $(LIB_EXECINFO) \ |
| 396 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ | 397 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ |
| 397 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ | 398 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ |
diff --git a/src/alloc.c b/src/alloc.c index 80086433e65..b2703c5f961 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -422,11 +422,11 @@ buffer_memory_full (ptrdiff_t nbytes) | |||
| 422 | 422 | ||
| 423 | #ifndef REL_ALLOC | 423 | #ifndef REL_ALLOC |
| 424 | memory_full (nbytes); | 424 | memory_full (nbytes); |
| 425 | #endif | 425 | #else |
| 426 | |||
| 427 | /* This used to call error, but if we've run out of memory, we could | 426 | /* This used to call error, but if we've run out of memory, we could |
| 428 | get infinite recursion trying to build the string. */ | 427 | get infinite recursion trying to build the string. */ |
| 429 | xsignal (Qnil, Vmemory_signal_data); | 428 | xsignal (Qnil, Vmemory_signal_data); |
| 429 | #endif | ||
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | /* A common multiple of the positive integers A and B. Ideally this | 432 | /* A common multiple of the positive integers A and B. Ideally this |
diff --git a/src/bytecode.c b/src/bytecode.c index 628c4d90cf3..acb96c1e61b 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -755,7 +755,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 755 | { | 755 | { |
| 756 | BEFORE_POTENTIAL_GC (); | 756 | BEFORE_POTENTIAL_GC (); |
| 757 | wrong_type_argument (Qlistp, v1); | 757 | wrong_type_argument (Qlistp, v1); |
| 758 | AFTER_POTENTIAL_GC (); | ||
| 759 | } | 758 | } |
| 760 | NEXT; | 759 | NEXT; |
| 761 | } | 760 | } |
| @@ -790,7 +789,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 790 | { | 789 | { |
| 791 | BEFORE_POTENTIAL_GC (); | 790 | BEFORE_POTENTIAL_GC (); |
| 792 | wrong_type_argument (Qlistp, v1); | 791 | wrong_type_argument (Qlistp, v1); |
| 793 | AFTER_POTENTIAL_GC (); | ||
| 794 | } | 792 | } |
| 795 | NEXT; | 793 | NEXT; |
| 796 | } | 794 | } |
diff --git a/src/conf_post.h b/src/conf_post.h index 6c9747a436c..5cb385d9029 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -44,19 +44,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 44 | # define __has_attribute(a) 0 /* non-clang */ | 44 | # define __has_attribute(a) 0 /* non-clang */ |
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | /* This silences a few compilation warnings on FreeBSD. */ | ||
| 48 | #ifdef BSD_SYSTEM_AHB | ||
| 49 | #undef BSD_SYSTEM_AHB | ||
| 50 | #undef BSD_SYSTEM | ||
| 51 | #if __FreeBSD__ == 1 | ||
| 52 | #define BSD_SYSTEM 199103 | ||
| 53 | #elif __FreeBSD__ == 2 | ||
| 54 | #define BSD_SYSTEM 199306 | ||
| 55 | #elif __FreeBSD__ >= 3 | ||
| 56 | #define BSD_SYSTEM 199506 | ||
| 57 | #endif | ||
| 58 | #endif | ||
| 59 | |||
| 60 | #ifdef DARWIN_OS | 47 | #ifdef DARWIN_OS |
| 61 | #ifdef emacs | 48 | #ifdef emacs |
| 62 | #define malloc unexec_malloc | 49 | #define malloc unexec_malloc |
diff --git a/src/dispnew.c b/src/dispnew.c index 9335365bc71..47adab6b8f7 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6100,10 +6100,7 @@ init_display (void) | |||
| 6100 | 6100 | ||
| 6101 | /* If no window system has been specified, try to use the terminal. */ | 6101 | /* If no window system has been specified, try to use the terminal. */ |
| 6102 | if (! isatty (0)) | 6102 | if (! isatty (0)) |
| 6103 | { | 6103 | fatal ("standard input is not a tty"); |
| 6104 | fatal ("standard input is not a tty"); | ||
| 6105 | exit (1); | ||
| 6106 | } | ||
| 6107 | 6104 | ||
| 6108 | #ifdef WINDOWSNT | 6105 | #ifdef WINDOWSNT |
| 6109 | terminal_type = "w32console"; | 6106 | terminal_type = "w32console"; |
diff --git a/src/emacs.c b/src/emacs.c index b96076b1340..bd33583af0c 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -44,7 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 44 | #include "w32common.h" | 44 | #include "w32common.h" |
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | #if defined HAVE_NTGUI && defined CYGWIN | 47 | #if defined CYGWIN |
| 48 | #include "cygw32.h" | 48 | #include "cygw32.h" |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| @@ -1348,7 +1348,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1348 | #ifdef WINDOWSNT | 1348 | #ifdef WINDOWSNT |
| 1349 | syms_of_ntproc (); | 1349 | syms_of_ntproc (); |
| 1350 | #endif /* WINDOWSNT */ | 1350 | #endif /* WINDOWSNT */ |
| 1351 | #if defined CYGWIN && defined HAVE_NTGUI | 1351 | #if defined CYGWIN |
| 1352 | syms_of_cygw32 (); | 1352 | syms_of_cygw32 (); |
| 1353 | #endif | 1353 | #endif |
| 1354 | syms_of_window (); | 1354 | syms_of_window (); |
diff --git a/src/eval.c b/src/eval.c index 5db6f9d0bf3..69483a9b205 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1690,7 +1690,6 @@ error (const char *m, ...) | |||
| 1690 | va_list ap; | 1690 | va_list ap; |
| 1691 | va_start (ap, m); | 1691 | va_start (ap, m); |
| 1692 | verror (m, ap); | 1692 | verror (m, ap); |
| 1693 | va_end (ap); | ||
| 1694 | } | 1693 | } |
| 1695 | 1694 | ||
| 1696 | DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0, | 1695 | DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0, |
diff --git a/src/fileio.c b/src/fileio.c index d7363077b35..724250c8aaa 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1850,9 +1850,6 @@ those `/' is discarded. */) | |||
| 1850 | error ("Missing \"}\" in environment-variable substitution"); | 1850 | error ("Missing \"}\" in environment-variable substitution"); |
| 1851 | badvar: | 1851 | badvar: |
| 1852 | error ("Substituting nonexistent environment variable \"%s\"", target); | 1852 | error ("Substituting nonexistent environment variable \"%s\"", target); |
| 1853 | |||
| 1854 | /* NOTREACHED */ | ||
| 1855 | return Qnil; | ||
| 1856 | } | 1853 | } |
| 1857 | 1854 | ||
| 1858 | /* A slightly faster and more convenient way to get | 1855 | /* A slightly faster and more convenient way to get |
| @@ -3305,7 +3302,6 @@ Use the current time if TIMESTAMP is nil. TIMESTAMP is in the format of | |||
| 3305 | return Qnil; | 3302 | return Qnil; |
| 3306 | #endif | 3303 | #endif |
| 3307 | report_file_error ("Setting file times", Fcons (absname, Qnil)); | 3304 | report_file_error ("Setting file times", Fcons (absname, Qnil)); |
| 3308 | return Qnil; | ||
| 3309 | } | 3305 | } |
| 3310 | } | 3306 | } |
| 3311 | 3307 | ||
| @@ -4963,20 +4959,23 @@ This calls `write-region-annotate-functions' at the start, and | |||
| 4963 | 4959 | ||
| 4964 | immediate_quit = 0; | 4960 | immediate_quit = 0; |
| 4965 | 4961 | ||
| 4966 | #ifdef HAVE_FSYNC | ||
| 4967 | /* fsync appears to change the modtime on BSD4.2. | 4962 | /* fsync appears to change the modtime on BSD4.2. |
| 4968 | Disk full in NFS may be reported here. */ | 4963 | Disk full in NFS may be reported here. */ |
| 4969 | /* mib says that closing the file will try to write as fast as NFS can do | 4964 | /* mib says that closing the file will try to write as fast as NFS can do |
| 4970 | it, and that means the fsync here is not crucial for autosave files. */ | 4965 | it, and that means the fsync here is not crucial for autosave files. */ |
| 4971 | if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0) | 4966 | if (!auto_saving && !write_region_inhibit_fsync) |
| 4972 | { | 4967 | { |
| 4973 | /* If fsync fails with EINTR, don't treat that as serious. Also | 4968 | /* Transfer data and metadata to disk, retrying if interrupted. Also, |
| 4974 | ignore EINVAL which happens when fsync is not supported on this | 4969 | ignore EINVAL which happens when fsync is not supported on this |
| 4975 | file. */ | 4970 | file. */ |
| 4976 | if (errno != EINTR && errno != EINVAL) | 4971 | while (fsync (desc) != 0) |
| 4977 | ok = 0, save_errno = errno; | 4972 | if (errno != EINTR) |
| 4973 | { | ||
| 4974 | if (errno != EINVAL) | ||
| 4975 | ok = 0, save_errno = errno; | ||
| 4976 | break; | ||
| 4977 | } | ||
| 4978 | } | 4978 | } |
| 4979 | #endif | ||
| 4980 | 4979 | ||
| 4981 | modtime = invalid_emacs_time (); | 4980 | modtime = invalid_emacs_time (); |
| 4982 | if (visiting) | 4981 | if (visiting) |
| @@ -6050,13 +6049,11 @@ in the buffer; this is the default behavior, because the auto-save | |||
| 6050 | file is usually more useful if it contains the deleted text. */); | 6049 | file is usually more useful if it contains the deleted text. */); |
| 6051 | Vauto_save_include_big_deletions = Qnil; | 6050 | Vauto_save_include_big_deletions = Qnil; |
| 6052 | 6051 | ||
| 6053 | #ifdef HAVE_FSYNC | ||
| 6054 | DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync, | 6052 | DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync, |
| 6055 | doc: /* Non-nil means don't call fsync in `write-region'. | 6053 | doc: /* Non-nil means don't call fsync in `write-region'. |
| 6056 | This variable affects calls to `write-region' as well as save commands. | 6054 | This variable affects calls to `write-region' as well as save commands. |
| 6057 | A non-nil value may result in data loss! */); | 6055 | A non-nil value may result in data loss! */); |
| 6058 | write_region_inhibit_fsync = 0; | 6056 | write_region_inhibit_fsync = 0; |
| 6059 | #endif | ||
| 6060 | 6057 | ||
| 6061 | DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash, | 6058 | DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash, |
| 6062 | doc: /* Specifies whether to use the system's trash can. | 6059 | doc: /* Specifies whether to use the system's trash can. |
diff --git a/src/filelock.c b/src/filelock.c index 32992896c2b..f17d3182eab 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -437,6 +437,14 @@ create_lock_file (char *lfname, char *lock_info_str, bool force) | |||
| 437 | if (emacs_write (fd, lock_info_str, lock_info_len) != lock_info_len | 437 | if (emacs_write (fd, lock_info_str, lock_info_len) != lock_info_len |
| 438 | || (need_fchmod && fchmod (fd, world_readable) != 0)) | 438 | || (need_fchmod && fchmod (fd, world_readable) != 0)) |
| 439 | err = errno; | 439 | err = errno; |
| 440 | else | ||
| 441 | while (fsync (fd) != 0) | ||
| 442 | if (errno != EINTR) | ||
| 443 | { | ||
| 444 | if (errno != EINVAL) | ||
| 445 | err = errno; | ||
| 446 | break; | ||
| 447 | } | ||
| 440 | if (emacs_close (fd) != 0) | 448 | if (emacs_close (fd) != 0) |
| 441 | err = errno; | 449 | err = errno; |
| 442 | if (!err && rename_lock_file (nonce, lfname, force) != 0) | 450 | if (!err && rename_lock_file (nonce, lfname, force) != 0) |
diff --git a/src/keyboard.c b/src/keyboard.c index fe8b45a0130..e43b7a73172 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6552,10 +6552,7 @@ has the same base event type and all the specified modifiers. */) | |||
| 6552 | else if (SYMBOLP (base)) | 6552 | else if (SYMBOLP (base)) |
| 6553 | return apply_modifiers (modifiers, base); | 6553 | return apply_modifiers (modifiers, base); |
| 6554 | else | 6554 | else |
| 6555 | { | 6555 | error ("Invalid base event"); |
| 6556 | error ("Invalid base event"); | ||
| 6557 | return Qnil; | ||
| 6558 | } | ||
| 6559 | } | 6556 | } |
| 6560 | 6557 | ||
| 6561 | /* Try to recognize SYMBOL as a modifier name. | 6558 | /* Try to recognize SYMBOL as a modifier name. |
diff --git a/src/keymap.c b/src/keymap.c index 922c1703edf..00eefb375ef 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -565,7 +565,8 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val) | |||
| 565 | { | 565 | { |
| 566 | if (!NILP (val)) | 566 | if (!NILP (val)) |
| 567 | { | 567 | { |
| 568 | map_keymap_function_t fun = XSAVE_POINTER (args, 0); | 568 | map_keymap_function_t fun |
| 569 | = (map_keymap_function_t) XSAVE_POINTER (args, 0); | ||
| 569 | /* If the key is a range, make a copy since map_char_table modifies | 570 | /* If the key is a range, make a copy since map_char_table modifies |
| 570 | it in place. */ | 571 | it in place. */ |
| 571 | if (CONSP (key)) | 572 | if (CONSP (key)) |
| @@ -2310,7 +2311,6 @@ around function keys and event symbols. */) | |||
| 2310 | return Fcopy_sequence (key); | 2311 | return Fcopy_sequence (key); |
| 2311 | else | 2312 | else |
| 2312 | error ("KEY must be an integer, cons, symbol, or string"); | 2313 | error ("KEY must be an integer, cons, symbol, or string"); |
| 2313 | return Qnil; | ||
| 2314 | } | 2314 | } |
| 2315 | 2315 | ||
| 2316 | static char * | 2316 | static char * |
diff --git a/src/region-cache.c b/src/region-cache.c index 452a5b3a065..be7d50a50e4 100644 --- a/src/region-cache.c +++ b/src/region-cache.c | |||
| @@ -190,10 +190,9 @@ find_cache_boundary (struct region_cache *c, ptrdiff_t pos) | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | /* Some testing. */ | 192 | /* Some testing. */ |
| 193 | if (BOUNDARY_POS (c, low) > pos | 193 | eassert (!(BOUNDARY_POS (c, low) > pos |
| 194 | || (low + 1 < c->cache_len | 194 | || (low + 1 < c->cache_len |
| 195 | && BOUNDARY_POS (c, low + 1) <= pos)) | 195 | && BOUNDARY_POS (c, low + 1) <= pos))); |
| 196 | emacs_abort (); | ||
| 197 | 196 | ||
| 198 | return low; | 197 | return low; |
| 199 | } | 198 | } |
| @@ -214,14 +213,9 @@ move_cache_gap (struct region_cache *c, ptrdiff_t pos, ptrdiff_t min_size) | |||
| 214 | ptrdiff_t buffer_beg = c->buffer_beg; | 213 | ptrdiff_t buffer_beg = c->buffer_beg; |
| 215 | ptrdiff_t buffer_end = c->buffer_end; | 214 | ptrdiff_t buffer_end = c->buffer_end; |
| 216 | 215 | ||
| 217 | if (pos < 0 | ||
| 218 | || pos > c->cache_len) | ||
| 219 | emacs_abort (); | ||
| 220 | |||
| 221 | /* We mustn't ever try to put the gap before the dummy start | 216 | /* We mustn't ever try to put the gap before the dummy start |
| 222 | boundary. That must always be start-relative. */ | 217 | boundary. That must always be start-relative. */ |
| 223 | if (pos == 0) | 218 | eassert (0 < pos && pos <= c->cache_len); |
| 224 | emacs_abort (); | ||
| 225 | 219 | ||
| 226 | /* Need we move the gap right? */ | 220 | /* Need we move the gap right? */ |
| 227 | while (gap_start < pos) | 221 | while (gap_start < pos) |
| @@ -288,26 +282,19 @@ static void | |||
| 288 | insert_cache_boundary (struct region_cache *c, ptrdiff_t i, ptrdiff_t pos, | 282 | insert_cache_boundary (struct region_cache *c, ptrdiff_t i, ptrdiff_t pos, |
| 289 | int value) | 283 | int value) |
| 290 | { | 284 | { |
| 291 | /* i must be a valid cache index. */ | 285 | /* I must be a valid cache index, and we must never want |
| 292 | if (i < 0 || i > c->cache_len) | 286 | to insert something before the dummy first boundary. */ |
| 293 | emacs_abort (); | 287 | eassert (0 < i && i <= c->cache_len); |
| 294 | |||
| 295 | /* We must never want to insert something before the dummy first | ||
| 296 | boundary. */ | ||
| 297 | if (i == 0) | ||
| 298 | emacs_abort (); | ||
| 299 | 288 | ||
| 300 | /* We must only be inserting things in order. */ | 289 | /* We must only be inserting things in order. */ |
| 301 | if (! (BOUNDARY_POS (c, i - 1) < pos | 290 | eassert ((BOUNDARY_POS (c, i - 1) < pos |
| 302 | && (i == c->cache_len | 291 | && (i == c->cache_len |
| 303 | || pos < BOUNDARY_POS (c, i)))) | 292 | || pos < BOUNDARY_POS (c, i)))); |
| 304 | emacs_abort (); | ||
| 305 | 293 | ||
| 306 | /* The value must be different from the ones around it. However, we | 294 | /* The value must be different from the ones around it. However, we |
| 307 | temporarily create boundaries that establish the same value as | 295 | temporarily create boundaries that establish the same value as |
| 308 | the subsequent boundary, so we're not going to flag that case. */ | 296 | the subsequent boundary, so we're not going to flag that case. */ |
| 309 | if (BOUNDARY_VALUE (c, i - 1) == value) | 297 | eassert (BOUNDARY_VALUE (c, i - 1) != value); |
| 310 | emacs_abort (); | ||
| 311 | 298 | ||
| 312 | move_cache_gap (c, i, 1); | 299 | move_cache_gap (c, i, 1); |
| 313 | 300 | ||
| @@ -328,18 +315,13 @@ delete_cache_boundaries (struct region_cache *c, | |||
| 328 | ptrdiff_t len = end - start; | 315 | ptrdiff_t len = end - start; |
| 329 | 316 | ||
| 330 | /* Gotta be in range. */ | 317 | /* Gotta be in range. */ |
| 331 | if (start < 0 | 318 | eassert (0 <= start && end <= c->cache_len); |
| 332 | || end > c->cache_len) | ||
| 333 | emacs_abort (); | ||
| 334 | 319 | ||
| 335 | /* Gotta be in order. */ | 320 | /* Gotta be in order. */ |
| 336 | if (start > end) | 321 | eassert (start <= end); |
| 337 | emacs_abort (); | ||
| 338 | 322 | ||
| 339 | /* Can't delete the dummy entry. */ | 323 | /* Can't delete the dummy entry. */ |
| 340 | if (start == 0 | 324 | eassert (!(start == 0 && end >= 1)); |
| 341 | && end >= 1) | ||
| 342 | emacs_abort (); | ||
| 343 | 325 | ||
| 344 | /* Minimize gap motion. If we're deleting nothing, do nothing. */ | 326 | /* Minimize gap motion. If we're deleting nothing, do nothing. */ |
| 345 | if (len == 0) | 327 | if (len == 0) |
| @@ -378,11 +360,8 @@ static void | |||
| 378 | set_cache_region (struct region_cache *c, | 360 | set_cache_region (struct region_cache *c, |
| 379 | ptrdiff_t start, ptrdiff_t end, int value) | 361 | ptrdiff_t start, ptrdiff_t end, int value) |
| 380 | { | 362 | { |
| 381 | if (start > end) | 363 | eassert (start <= end); |
| 382 | emacs_abort (); | 364 | eassert (c->buffer_beg <= start && end <= c->buffer_end); |
| 383 | if (start < c->buffer_beg | ||
| 384 | || end > c->buffer_end) | ||
| 385 | emacs_abort (); | ||
| 386 | 365 | ||
| 387 | /* Eliminate this case; then we can assume that start and end-1 are | 366 | /* Eliminate this case; then we can assume that start and end-1 are |
| 388 | both the locations of real characters in the buffer. */ | 367 | both the locations of real characters in the buffer. */ |
| @@ -772,7 +751,8 @@ int region_cache_backward (struct buffer *buf, struct region_cache *c, | |||
| 772 | } | 751 | } |
| 773 | } | 752 | } |
| 774 | 753 | ||
| 775 | 754 | #ifdef ENABLE_CHECKING | |
| 755 | |||
| 776 | /* Debugging: pretty-print a cache to the standard error output. */ | 756 | /* Debugging: pretty-print a cache to the standard error output. */ |
| 777 | 757 | ||
| 778 | void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE; | 758 | void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE; |
| @@ -803,3 +783,5 @@ pp_cache (struct region_cache *c) | |||
| 803 | fprintf (stderr, "%"pD"d : %d\n", pos, BOUNDARY_VALUE (c, i)); | 783 | fprintf (stderr, "%"pD"d : %d\n", pos, BOUNDARY_VALUE (c, i)); |
| 804 | } | 784 | } |
| 805 | } | 785 | } |
| 786 | |||
| 787 | #endif /* ENABLE_CHECKING */ | ||
diff --git a/src/sysdep.c b/src/sysdep.c index fe6371623a9..bff11fc9f75 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -38,9 +38,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | #include "sysselect.h" | 38 | #include "sysselect.h" |
| 39 | #include "blockinput.h" | 39 | #include "blockinput.h" |
| 40 | 40 | ||
| 41 | #ifdef BSD_SYSTEM | 41 | #if defined DARWIN_OS || defined __FreeBSD__ |
| 42 | #include <sys/param.h> | 42 | # include <sys/sysctl.h> |
| 43 | #include <sys/sysctl.h> | ||
| 44 | #endif | 43 | #endif |
| 45 | 44 | ||
| 46 | #ifdef __FreeBSD__ | 45 | #ifdef __FreeBSD__ |
| @@ -69,9 +68,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 69 | 68 | ||
| 70 | #ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida, MW Aug 1993 */ | 69 | #ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida, MW Aug 1993 */ |
| 71 | #include "msdos.h" | 70 | #include "msdos.h" |
| 72 | #include <sys/param.h> | ||
| 73 | #endif | 71 | #endif |
| 74 | 72 | ||
| 73 | #include <sys/param.h> | ||
| 75 | #include <sys/file.h> | 74 | #include <sys/file.h> |
| 76 | #include <fcntl.h> | 75 | #include <fcntl.h> |
| 77 | 76 | ||
| @@ -1290,10 +1289,9 @@ reset_sys_modes (struct tty_display_info *tty_out) | |||
| 1290 | if (tty_out->terminal->reset_terminal_modes_hook) | 1289 | if (tty_out->terminal->reset_terminal_modes_hook) |
| 1291 | tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal); | 1290 | tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal); |
| 1292 | 1291 | ||
| 1293 | #ifdef BSD_SYSTEM | ||
| 1294 | /* Avoid possible loss of output when changing terminal modes. */ | 1292 | /* Avoid possible loss of output when changing terminal modes. */ |
| 1295 | fsync (fileno (tty_out->output)); | 1293 | while (fdatasync (fileno (tty_out->output)) != 0 && errno == EINTR) |
| 1296 | #endif | 1294 | continue; |
| 1297 | 1295 | ||
| 1298 | #ifndef DOS_NT | 1296 | #ifndef DOS_NT |
| 1299 | #ifdef F_SETOWN | 1297 | #ifdef F_SETOWN |
diff --git a/src/term.c b/src/term.c index 822b74aa44e..38706602a02 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3426,9 +3426,6 @@ maybe_fatal (int must_succeed, struct terminal *terminal, | |||
| 3426 | vfatal (str2, ap); | 3426 | vfatal (str2, ap); |
| 3427 | else | 3427 | else |
| 3428 | verror (str1, ap); | 3428 | verror (str1, ap); |
| 3429 | |||
| 3430 | va_end (ap); | ||
| 3431 | emacs_abort (); | ||
| 3432 | } | 3429 | } |
| 3433 | 3430 | ||
| 3434 | void | 3431 | void |
| @@ -3437,7 +3434,6 @@ fatal (const char *str, ...) | |||
| 3437 | va_list ap; | 3434 | va_list ap; |
| 3438 | va_start (ap, str); | 3435 | va_start (ap, str); |
| 3439 | vfatal (str, ap); | 3436 | vfatal (str, ap); |
| 3440 | va_end (ap); | ||
| 3441 | } | 3437 | } |
| 3442 | 3438 | ||
| 3443 | 3439 | ||
diff --git a/src/w32term.c b/src/w32term.c index 6137d54c837..989ceb0f847 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -236,6 +236,7 @@ static void my_set_focus (struct frame *, HWND); | |||
| 236 | #endif | 236 | #endif |
| 237 | static void my_set_foreground_window (HWND); | 237 | static void my_set_foreground_window (HWND); |
| 238 | static void my_destroy_window (struct frame *, HWND); | 238 | static void my_destroy_window (struct frame *, HWND); |
| 239 | static void w32fullscreen_hook (FRAME_PTR); | ||
| 239 | 240 | ||
| 240 | #ifdef GLYPH_DEBUG | 241 | #ifdef GLYPH_DEBUG |
| 241 | static void x_check_font (struct frame *, struct font *); | 242 | static void x_check_font (struct frame *, struct font *); |
| @@ -4704,20 +4705,23 @@ w32_read_socket (struct terminal *terminal, | |||
| 4704 | } | 4705 | } |
| 4705 | 4706 | ||
| 4706 | case WM_WINDOWPOSCHANGED: | 4707 | case WM_WINDOWPOSCHANGED: |
| 4707 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | ||
| 4708 | if (f) | ||
| 4709 | { | ||
| 4710 | if (f->want_fullscreen & FULLSCREEN_WAIT) | ||
| 4711 | f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH); | ||
| 4712 | } | ||
| 4713 | check_visibility = 1; | ||
| 4714 | break; | ||
| 4715 | |||
| 4716 | case WM_ACTIVATE: | 4708 | case WM_ACTIVATE: |
| 4717 | case WM_ACTIVATEAPP: | 4709 | case WM_ACTIVATEAPP: |
| 4718 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | 4710 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 4719 | if (f) | 4711 | if (f) |
| 4720 | x_check_fullscreen (f); | 4712 | { |
| 4713 | /* Run the full-screen hook function also when we are | ||
| 4714 | being activated, to actually install the required | ||
| 4715 | size in effect, if the WAIT flag is set. This is | ||
| 4716 | because when the hook is run from x_set_fullscreen, | ||
| 4717 | the frame might not yet be visible, if that call is a | ||
| 4718 | result of make-frame, and in that case the hook just | ||
| 4719 | sets the WAIT flag. */ | ||
| 4720 | if ((msg.msg.message == WM_WINDOWPOSCHANGED || msg.msg.wParam) | ||
| 4721 | && (f->want_fullscreen & FULLSCREEN_WAIT)) | ||
| 4722 | w32fullscreen_hook (f); | ||
| 4723 | x_check_fullscreen (f); | ||
| 4724 | } | ||
| 4721 | check_visibility = 1; | 4725 | check_visibility = 1; |
| 4722 | break; | 4726 | break; |
| 4723 | 4727 | ||
| @@ -5678,10 +5682,10 @@ w32fullscreen_hook (FRAME_PTR f) | |||
| 5678 | 5682 | ||
| 5679 | switch (f->want_fullscreen) | 5683 | switch (f->want_fullscreen) |
| 5680 | { | 5684 | { |
| 5681 | case FULLSCREEN_MAXIMIZED: | 5685 | case FULLSCREEN_BOTH: |
| 5682 | PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MAXIMIZE, 0); | 5686 | PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MAXIMIZE, 0); |
| 5683 | break; | 5687 | break; |
| 5684 | case FULLSCREEN_BOTH: | 5688 | case FULLSCREEN_MAXIMIZED: |
| 5685 | height = | 5689 | height = |
| 5686 | FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) | 5690 | FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) |
| 5687 | - XINT (Ftool_bar_lines_needed (selected_frame)) | 5691 | - XINT (Ftool_bar_lines_needed (selected_frame)) |
| @@ -5729,8 +5733,11 @@ w32fullscreen_hook (FRAME_PTR f) | |||
| 5729 | x_set_window_size (f, 1, width, height); | 5733 | x_set_window_size (f, 1, width, height); |
| 5730 | do_pending_window_change (0); | 5734 | do_pending_window_change (0); |
| 5731 | } | 5735 | } |
| 5736 | f->want_fullscreen = FULLSCREEN_NONE; | ||
| 5732 | unblock_input (); | 5737 | unblock_input (); |
| 5733 | } | 5738 | } |
| 5739 | else | ||
| 5740 | f->want_fullscreen |= FULLSCREEN_WAIT; | ||
| 5734 | } | 5741 | } |
| 5735 | 5742 | ||
| 5736 | /* Call this to change the size of frame F's x-window. | 5743 | /* Call this to change the size of frame F's x-window. |
diff --git a/src/window.c b/src/window.c index 77696131512..940e0f7565a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5021,7 +5021,7 @@ specifies the window to scroll. This takes precedence over | |||
| 5021 | ++windows_or_buffers_changed; | 5021 | ++windows_or_buffers_changed; |
| 5022 | 5022 | ||
| 5023 | Fset_buffer (w->buffer); | 5023 | Fset_buffer (w->buffer); |
| 5024 | SET_PT (marker_position (w->pointm)); | 5024 | SET_PT_BOTH (marker_position (w->pointm), marker_byte_position (w->pointm)); |
| 5025 | 5025 | ||
| 5026 | if (NILP (arg)) | 5026 | if (NILP (arg)) |
| 5027 | window_scroll (window, 1, 1, 1); | 5027 | window_scroll (window, 1, 1, 1); |
diff --git a/src/xdisp.c b/src/xdisp.c index 511a5eeb2c3..a5bba1a81cd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2550,7 +2550,7 @@ markpos_of_region (void) | |||
| 2550 | at character position CHARPOS. CHARPOS < 0 means that no buffer | 2550 | at character position CHARPOS. CHARPOS < 0 means that no buffer |
| 2551 | position is specified which is useful when the iterator is assigned | 2551 | position is specified which is useful when the iterator is assigned |
| 2552 | a position later. BYTEPOS is the byte position corresponding to | 2552 | a position later. BYTEPOS is the byte position corresponding to |
| 2553 | CHARPOS. BYTEPOS < 0 means compute it from CHARPOS. | 2553 | CHARPOS. |
| 2554 | 2554 | ||
| 2555 | If ROW is not null, calls to produce_glyphs with IT as parameter | 2555 | If ROW is not null, calls to produce_glyphs with IT as parameter |
| 2556 | will produce glyphs in that row. | 2556 | will produce glyphs in that row. |
| @@ -2828,18 +2828,14 @@ init_iterator (struct it *it, struct window *w, | |||
| 2828 | if (charpos >= BUF_BEG (current_buffer)) | 2828 | if (charpos >= BUF_BEG (current_buffer)) |
| 2829 | { | 2829 | { |
| 2830 | it->end_charpos = ZV; | 2830 | it->end_charpos = ZV; |
| 2831 | eassert (charpos == BYTE_TO_CHAR (bytepos)); | ||
| 2831 | IT_CHARPOS (*it) = charpos; | 2832 | IT_CHARPOS (*it) = charpos; |
| 2833 | IT_BYTEPOS (*it) = bytepos; | ||
| 2832 | 2834 | ||
| 2833 | /* We will rely on `reseat' to set this up properly, via | 2835 | /* We will rely on `reseat' to set this up properly, via |
| 2834 | handle_face_prop. */ | 2836 | handle_face_prop. */ |
| 2835 | it->face_id = it->base_face_id; | 2837 | it->face_id = it->base_face_id; |
| 2836 | 2838 | ||
| 2837 | /* Compute byte position if not specified. */ | ||
| 2838 | if (bytepos < charpos) | ||
| 2839 | IT_BYTEPOS (*it) = CHAR_TO_BYTE (charpos); | ||
| 2840 | else | ||
| 2841 | IT_BYTEPOS (*it) = bytepos; | ||
| 2842 | |||
| 2843 | it->start = it->current; | 2839 | it->start = it->current; |
| 2844 | /* Do we need to reorder bidirectional text? Not if this is a | 2840 | /* Do we need to reorder bidirectional text? Not if this is a |
| 2845 | unibyte buffer: by definition, none of the single-byte | 2841 | unibyte buffer: by definition, none of the single-byte |
diff --git a/src/xfns.c b/src/xfns.c index a6a56c8c5e1..100fd81a155 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3769,7 +3769,6 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 3769 | 3769 | ||
| 3770 | default: | 3770 | default: |
| 3771 | error ("Strange value for BackingStore parameter of screen"); | 3771 | error ("Strange value for BackingStore parameter of screen"); |
| 3772 | result = Qnil; | ||
| 3773 | } | 3772 | } |
| 3774 | 3773 | ||
| 3775 | return result; | 3774 | return result; |
| @@ -3811,7 +3810,6 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 3811 | break; | 3810 | break; |
| 3812 | default: | 3811 | default: |
| 3813 | error ("Display has an unknown visual class"); | 3812 | error ("Display has an unknown visual class"); |
| 3814 | result = Qnil; | ||
| 3815 | } | 3813 | } |
| 3816 | 3814 | ||
| 3817 | return result; | 3815 | return result; |
diff --git a/src/xsmfns.c b/src/xsmfns.c index fe2dfbaf83e..cb7122202df 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -514,9 +514,11 @@ Do not call this function yourself. */) | |||
| 514 | prevent. Fix this in next version. */ | 514 | prevent. Fix this in next version. */ |
| 515 | Fkill_emacs (Qnil); | 515 | Fkill_emacs (Qnil); |
| 516 | 516 | ||
| 517 | #if 0 | ||
| 517 | /* This will not be reached, but we want kill-emacs-hook to be run. */ | 518 | /* This will not be reached, but we want kill-emacs-hook to be run. */ |
| 518 | SmcCloseConnection (smc_conn, 0, 0); | 519 | SmcCloseConnection (smc_conn, 0, 0); |
| 519 | ice_connection_closed (); | 520 | ice_connection_closed (); |
| 521 | #endif | ||
| 520 | } | 522 | } |
| 521 | 523 | ||
| 522 | return Qnil; | 524 | return Qnil; |