aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2012-09-16 20:47:45 +0900
committerKenichi Handa2012-09-16 20:47:45 +0900
commitba13e6168a07a085c0ca8e67c91640b84ee0c1fd (patch)
treea63038205a6803ba06f5e17eda974c3ab23e57fb
parentdcbd9236f7be9da4e658fd559dfbd7454f4b6018 (diff)
parenta8c729af93b08531e5e3f3fff6f16a55c8baac3f (diff)
downloademacs-ba13e6168a07a085c0ca8e67c91640b84ee0c1fd.tar.gz
emacs-ba13e6168a07a085c0ca8e67c91640b84ee0c1fd.zip
merge trunk
-rw-r--r--ChangeLog6
-rw-r--r--autogen/config.in15
-rwxr-xr-xautogen/configure128
-rw-r--r--configure.ac25
-rw-r--r--etc/NEWS1
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/progmodes/compile.el22
-rw-r--r--lisp/version.el94
-rw-r--r--lisp/window.el7
-rw-r--r--nt/ChangeLog7
-rw-r--r--nt/config.nt15
-rw-r--r--src/ChangeLog72
-rw-r--r--src/alloc.c13
-rw-r--r--src/atimer.c2
-rw-r--r--src/bidi.c1
-rw-r--r--src/buffer.c1
-rw-r--r--src/bytecode.c2
-rw-r--r--src/callint.c1
-rw-r--r--src/callproc.c1
-rw-r--r--src/casefiddle.c2
-rw-r--r--src/casetab.c2
-rw-r--r--src/category.c1
-rw-r--r--src/ccl.c1
-rw-r--r--src/character.c1
-rw-r--r--src/charset.c1
-rw-r--r--src/chartab.c2
-rw-r--r--src/cm.c1
-rw-r--r--src/cmds.c2
-rw-r--r--src/coding.c1
-rw-r--r--src/composite.c1
-rw-r--r--src/data.c1
-rw-r--r--src/dbusbind.c2
-rw-r--r--src/dired.c1
-rw-r--r--src/dispnew.c1
-rw-r--r--src/doc.c1
-rw-r--r--src/doprnt.c1
-rw-r--r--src/dosfns.c2
-rw-r--r--src/editfns.c1
-rw-r--r--src/emacs.c1
-rw-r--r--src/emacsgtkfixed.c2
-rw-r--r--src/eval.c15
-rw-r--r--src/fileio.c1
-rw-r--r--src/filelock.c1
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c1
-rw-r--r--src/font.c1
-rw-r--r--src/fontset.c1
-rw-r--r--src/frame.c1
-rw-r--r--src/fringe.c1
-rw-r--r--src/ftfont.c2
-rw-r--r--src/ftxfont.c1
-rw-r--r--src/gnutls.c1
-rw-r--r--src/gtkutil.c1
-rw-r--r--src/image.c23
-rw-r--r--src/indent.c1
-rw-r--r--src/insdel.c1
-rw-r--r--src/intervals.c1
-rw-r--r--src/keyboard.c20
-rw-r--r--src/keymap.c2
-rw-r--r--src/lisp.h23
-rw-r--r--src/lread.c1
-rw-r--r--src/macros.c2
-rw-r--r--src/marker.c2
-rw-r--r--src/menu.c1
-rw-r--r--src/minibuf.c1
-rw-r--r--src/nsfns.m14
-rw-r--r--src/nsfont.m1
-rw-r--r--src/nsimage.m1
-rw-r--r--src/nsmenu.m1
-rw-r--r--src/nsselect.m1
-rw-r--r--src/nsterm.m56
-rw-r--r--src/print.c2
-rw-r--r--src/process.c9
-rw-r--r--src/ralloc.c2
-rw-r--r--src/regex.c1
-rw-r--r--src/region-cache.c1
-rw-r--r--src/scroll.c2
-rw-r--r--src/search.c2
-rw-r--r--src/sheap.c3
-rw-r--r--src/sound.c2
-rw-r--r--src/syntax.c2
-rw-r--r--src/sysdep.c1
-rw-r--r--src/term.c1
-rw-r--r--src/termcap.c1
-rw-r--r--src/terminal.c1
-rw-r--r--src/terminfo.c1
-rw-r--r--src/textprop.c2
-rw-r--r--src/tparam.c2
-rw-r--r--src/undo.c2
-rw-r--r--src/unexaix.c1
-rw-r--r--src/unexcoff.c1
-rw-r--r--src/unexcw.c1
-rw-r--r--src/unexsol.c1
-rw-r--r--src/vm-limit.c1
-rw-r--r--src/w16select.c1
-rw-r--r--src/w32.c1
-rw-r--r--src/w32console.c1
-rw-r--r--src/w32fns.c1
-rw-r--r--src/w32font.c1
-rw-r--r--src/w32heap.c1
-rw-r--r--src/w32inevt.c1
-rw-r--r--src/w32menu.c1
-rw-r--r--src/w32proc.c1
-rw-r--r--src/w32reg.c1
-rw-r--r--src/w32select.c1
-rw-r--r--src/w32term.c1
-rw-r--r--src/w32uniscribe.c1
-rw-r--r--src/w32xfns.c1
-rw-r--r--src/widget.c2
-rw-r--r--src/window.c9
-rw-r--r--src/xdisp.c1
-rw-r--r--src/xfaces.c1
-rw-r--r--src/xfns.c1
-rw-r--r--src/xfont.c1
-rw-r--r--src/xftfont.c1
-rw-r--r--src/xgselect.c2
-rw-r--r--src/xmenu.c1
-rw-r--r--src/xml.c1
-rw-r--r--src/xrdb.c1
-rw-r--r--src/xselect.c1
-rw-r--r--src/xsettings.c5
-rw-r--r--src/xsmfns.c1
-rw-r--r--src/xterm.c2
124 files changed, 431 insertions, 292 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e662edb6bc..8dfe5f2746b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port better to POSIX hosts lacking _setjmp (Bug#12446).
4 * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
5 (_setjmp, _longjmp): Remove.
6
12012-09-14 Paul Eggert <eggert@cs.ucla.edu> 72012-09-14 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 * configure.ac (--without-sync-input): Fix typo in usage message. 9 * configure.ac (--without-sync-input): Fix typo in usage message.
diff --git a/autogen/config.in b/autogen/config.in
index f8e4c2bcce3..39e948ee228 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -791,6 +791,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
791/* Define to 1 if 'wint_t' is a signed integer type. */ 791/* Define to 1 if 'wint_t' is a signed integer type. */
792#undef HAVE_SIGNED_WINT_T 792#undef HAVE_SIGNED_WINT_T
793 793
794/* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is
795 irrelevant if HAVE__SETJMP is defined. */
796#undef HAVE_SIGSETJMP
797
794/* Define to 1 if the system has the type `sigset_t'. */ 798/* Define to 1 if the system has the type `sigset_t'. */
795#undef HAVE_SIGSET_T 799#undef HAVE_SIGSET_T
796 800
@@ -1074,6 +1078,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1074/* Define to 1 if you have the `_ftime' function. */ 1078/* Define to 1 if you have the `_ftime' function. */
1075#undef HAVE__FTIME 1079#undef HAVE__FTIME
1076 1080
1081/* Define to 1 if _setjmp and _longjmp work. */
1082#undef HAVE__SETJMP
1083
1077/* Define to 1 if you have the `__builtin_unwind_init' function. */ 1084/* Define to 1 if you have the `__builtin_unwind_init' function. */
1078#undef HAVE___BUILTIN_UNWIND_INIT 1085#undef HAVE___BUILTIN_UNWIND_INIT
1079 1086
@@ -1502,14 +1509,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1502 declarations. Define as empty for no equivalent. */ 1509 declarations. Define as empty for no equivalent. */
1503#undef __restrict_arr 1510#undef __restrict_arr
1504 1511
1505/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may
1506 alter signal masks, callers of _longjmp should not assume that it leaves
1507 signal masks alone. */
1508#undef _longjmp
1509
1510/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */
1511#undef _setjmp
1512
1513/* Some platforms that do not use configure define this to include extra 1512/* Some platforms that do not use configure define this to include extra
1514 configuration information. */ 1513 configuration information. */
1515#undef config_opsysfile 1514#undef config_opsysfile
diff --git a/autogen/configure b/autogen/configure
index 63295f68db0..0cbdd7c732a 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -2061,7 +2061,7 @@ Optional Packages:
2061 --with-mailhost=HOSTNAME 2061 --with-mailhost=HOSTNAME
2062 string giving default POP mail host 2062 string giving default POP mail host
2063 --without-sound don't compile with sound support 2063 --without-sound don't compile with sound support
2064 --without-sync-input process async input synchronously 2064 --without-sync-input don't process async input synchronously
2065 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, 2065 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2066 gtk3, lucid or athena, motif, no) 2066 gtk3, lucid or athena, motif, no)
2067 --with-wide-int prefer wide Emacs integers (typically 62-bit) 2067 --with-wide-int prefer wide Emacs integers (typically 62-bit)
@@ -8578,8 +8578,9 @@ $as_echo "no" >&6; }
8578 ALSA_CFLAGS="" 8578 ALSA_CFLAGS=""
8579 ALSA_LIBS="" 8579 ALSA_LIBS=""
8580 ## If we have a custom action on failure, don't print errors, but 8580 ## If we have a custom action on failure, don't print errors, but
8581 ## do set a variable so people can do so. 8581 ## do set a variable so people can do so. Do it in a subshell
8582 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` 8582 ## to capture any diagnostics in invoking pkg-config.
8583 ALSA_PKG_ERRORS=`($PKG_CONFIG --print-errors "$ALSA_MODULES") 2>&1`
8583 8584
8584 fi 8585 fi
8585 8586
@@ -10398,8 +10399,9 @@ $as_echo "no" >&6; }
10398 RSVG_CFLAGS="" 10399 RSVG_CFLAGS=""
10399 RSVG_LIBS="" 10400 RSVG_LIBS=""
10400 ## If we have a custom action on failure, don't print errors, but 10401 ## If we have a custom action on failure, don't print errors, but
10401 ## do set a variable so people can do so. 10402 ## do set a variable so people can do so. Do it in a subshell
10402 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` 10403 ## to capture any diagnostics in invoking pkg-config.
10404 RSVG_PKG_ERRORS=`($PKG_CONFIG --print-errors "$RSVG_MODULE") 2>&1`
10403 10405
10404 fi 10406 fi
10405 10407
@@ -10468,8 +10470,9 @@ $as_echo "no" >&6; }
10468 IMAGEMAGICK_CFLAGS="" 10470 IMAGEMAGICK_CFLAGS=""
10469 IMAGEMAGICK_LIBS="" 10471 IMAGEMAGICK_LIBS=""
10470 ## If we have a custom action on failure, don't print errors, but 10472 ## If we have a custom action on failure, don't print errors, but
10471 ## do set a variable so people can do so. 10473 ## do set a variable so people can do so. Do it in a subshell
10472 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` 10474 ## to capture any diagnostics in invoking pkg-config.
10475 IMAGEMAGICK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
10473 10476
10474 fi 10477 fi
10475 10478
@@ -10554,8 +10557,9 @@ $as_echo "no" >&6; }
10554 GTK_CFLAGS="" 10557 GTK_CFLAGS=""
10555 GTK_LIBS="" 10558 GTK_LIBS=""
10556 ## If we have a custom action on failure, don't print errors, but 10559 ## If we have a custom action on failure, don't print errors, but
10557 ## do set a variable so people can do so. 10560 ## do set a variable so people can do so. Do it in a subshell
10558 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` 10561 ## to capture any diagnostics in invoking pkg-config.
10562 GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1`
10559 10563
10560 fi 10564 fi
10561 10565
@@ -10624,8 +10628,9 @@ $as_echo "no" >&6; }
10624 GTK_CFLAGS="" 10628 GTK_CFLAGS=""
10625 GTK_LIBS="" 10629 GTK_LIBS=""
10626 ## If we have a custom action on failure, don't print errors, but 10630 ## If we have a custom action on failure, don't print errors, but
10627 ## do set a variable so people can do so. 10631 ## do set a variable so people can do so. Do it in a subshell
10628 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` 10632 ## to capture any diagnostics in invoking pkg-config.
10633 GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1`
10629 10634
10630 fi 10635 fi
10631 10636
@@ -10643,10 +10648,10 @@ $as_echo "no" >&6; }
10643 pkg_check_gtk=no 10648 pkg_check_gtk=no
10644 fi 10649 fi
10645 10650
10646 if test "$pkg_check_gtk" = "no"; then 10651 if test "$pkg_check_gtk" = "no" &&
10647 if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then 10652 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
10648 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 10653 then
10649 fi 10654 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
10650 fi 10655 fi
10651fi 10656fi
10652 10657
@@ -10785,8 +10790,9 @@ $as_echo "no" >&6; }
10785 DBUS_CFLAGS="" 10790 DBUS_CFLAGS=""
10786 DBUS_LIBS="" 10791 DBUS_LIBS=""
10787 ## If we have a custom action on failure, don't print errors, but 10792 ## If we have a custom action on failure, don't print errors, but
10788 ## do set a variable so people can do so. 10793 ## do set a variable so people can do so. Do it in a subshell
10789 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` 10794 ## to capture any diagnostics in invoking pkg-config.
10795 DBUS_PKG_ERRORS=`($PKG_CONFIG --print-errors "dbus-1 >= 1.0") 2>&1`
10790 10796
10791 fi 10797 fi
10792 10798
@@ -10865,8 +10871,9 @@ $as_echo "no" >&6; }
10865 GSETTINGS_CFLAGS="" 10871 GSETTINGS_CFLAGS=""
10866 GSETTINGS_LIBS="" 10872 GSETTINGS_LIBS=""
10867 ## If we have a custom action on failure, don't print errors, but 10873 ## If we have a custom action on failure, don't print errors, but
10868 ## do set a variable so people can do so. 10874 ## do set a variable so people can do so. Do it in a subshell
10869 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` 10875 ## to capture any diagnostics in invoking pkg-config.
10876 GSETTINGS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gio-2.0 >= 2.26") 2>&1`
10870 10877
10871 fi 10878 fi
10872 10879
@@ -10926,8 +10933,9 @@ $as_echo "no" >&6; }
10926 GCONF_CFLAGS="" 10933 GCONF_CFLAGS=""
10927 GCONF_LIBS="" 10934 GCONF_LIBS=""
10928 ## If we have a custom action on failure, don't print errors, but 10935 ## If we have a custom action on failure, don't print errors, but
10929 ## do set a variable so people can do so. 10936 ## do set a variable so people can do so. Do it in a subshell
10930 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` 10937 ## to capture any diagnostics in invoking pkg-config.
10938 GCONF_PKG_ERRORS=`($PKG_CONFIG --print-errors "gconf-2.0 >= 2.13") 2>&1`
10931 10939
10932 fi 10940 fi
10933 10941
@@ -10986,8 +10994,9 @@ $as_echo "no" >&6; }
10986 GOBJECT_CFLAGS="" 10994 GOBJECT_CFLAGS=""
10987 GOBJECT_LIBS="" 10995 GOBJECT_LIBS=""
10988 ## If we have a custom action on failure, don't print errors, but 10996 ## If we have a custom action on failure, don't print errors, but
10989 ## do set a variable so people can do so. 10997 ## do set a variable so people can do so. Do it in a subshell
10990 GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"` 10998 ## to capture any diagnostics in invoking pkg-config.
10999 GOBJECT_PKG_ERRORS=`($PKG_CONFIG --print-errors "gobject-2.0 >= 2.0") 2>&1`
10991 11000
10992 fi 11001 fi
10993 11002
@@ -11119,8 +11128,9 @@ $as_echo "no" >&6; }
11119 LIBGNUTLS_CFLAGS="" 11128 LIBGNUTLS_CFLAGS=""
11120 LIBGNUTLS_LIBS="" 11129 LIBGNUTLS_LIBS=""
11121 ## If we have a custom action on failure, don't print errors, but 11130 ## If we have a custom action on failure, don't print errors, but
11122 ## do set a variable so people can do so. 11131 ## do set a variable so people can do so. Do it in a subshell
11123 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"` 11132 ## to capture any diagnostics in invoking pkg-config.
11133 LIBGNUTLS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gnutls >= 2.6.6") 2>&1`
11124 11134
11125 fi 11135 fi
11126 11136
@@ -11748,8 +11758,9 @@ $as_echo "no" >&6; }
11748 FONTCONFIG_CFLAGS="" 11758 FONTCONFIG_CFLAGS=""
11749 FONTCONFIG_LIBS="" 11759 FONTCONFIG_LIBS=""
11750 ## If we have a custom action on failure, don't print errors, but 11760 ## If we have a custom action on failure, don't print errors, but
11751 ## do set a variable so people can do so. 11761 ## do set a variable so people can do so. Do it in a subshell
11752 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` 11762 ## to capture any diagnostics in invoking pkg-config.
11763 FONTCONFIG_PKG_ERRORS=`($PKG_CONFIG --print-errors "fontconfig >= 2.2.0") 2>&1`
11753 11764
11754 fi 11765 fi
11755 11766
@@ -11806,8 +11817,9 @@ $as_echo "no" >&6; }
11806 XFT_CFLAGS="" 11817 XFT_CFLAGS=""
11807 XFT_LIBS="" 11818 XFT_LIBS=""
11808 ## If we have a custom action on failure, don't print errors, but 11819 ## If we have a custom action on failure, don't print errors, but
11809 ## do set a variable so people can do so. 11820 ## do set a variable so people can do so. Do it in a subshell
11810 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` 11821 ## to capture any diagnostics in invoking pkg-config.
11822 XFT_PKG_ERRORS=`($PKG_CONFIG --print-errors "xft >= 0.13.0") 2>&1`
11811 11823
11812 fi 11824 fi
11813 11825
@@ -11973,8 +11985,9 @@ $as_echo "no" >&6; }
11973 FREETYPE_CFLAGS="" 11985 FREETYPE_CFLAGS=""
11974 FREETYPE_LIBS="" 11986 FREETYPE_LIBS=""
11975 ## If we have a custom action on failure, don't print errors, but 11987 ## If we have a custom action on failure, don't print errors, but
11976 ## do set a variable so people can do so. 11988 ## do set a variable so people can do so. Do it in a subshell
11977 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` 11989 ## to capture any diagnostics in invoking pkg-config.
11990 FREETYPE_PKG_ERRORS=`($PKG_CONFIG --print-errors "freetype2") 2>&1`
11978 11991
11979 fi 11992 fi
11980 11993
@@ -12033,8 +12046,9 @@ $as_echo "no" >&6; }
12033 LIBOTF_CFLAGS="" 12046 LIBOTF_CFLAGS=""
12034 LIBOTF_LIBS="" 12047 LIBOTF_LIBS=""
12035 ## If we have a custom action on failure, don't print errors, but 12048 ## If we have a custom action on failure, don't print errors, but
12036 ## do set a variable so people can do so. 12049 ## do set a variable so people can do so. Do it in a subshell
12037 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` 12050 ## to capture any diagnostics in invoking pkg-config.
12051 LIBOTF_PKG_ERRORS=`($PKG_CONFIG --print-errors "libotf") 2>&1`
12038 12052
12039 fi 12053 fi
12040 12054
@@ -12141,8 +12155,9 @@ $as_echo "no" >&6; }
12141 M17N_FLT_CFLAGS="" 12155 M17N_FLT_CFLAGS=""
12142 M17N_FLT_LIBS="" 12156 M17N_FLT_LIBS=""
12143 ## If we have a custom action on failure, don't print errors, but 12157 ## If we have a custom action on failure, don't print errors, but
12144 ## do set a variable so people can do so. 12158 ## do set a variable so people can do so. Do it in a subshell
12145 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` 12159 ## to capture any diagnostics in invoking pkg-config.
12160 M17N_FLT_PKG_ERRORS=`($PKG_CONFIG --print-errors "m17n-flt") 2>&1`
12146 12161
12147 fi 12162 fi
12148 12163
@@ -12830,8 +12845,9 @@ $as_echo "no" >&6; }
12830 LIBXML2_CFLAGS="" 12845 LIBXML2_CFLAGS=""
12831 LIBXML2_LIBS="" 12846 LIBXML2_LIBS=""
12832 ## If we have a custom action on failure, don't print errors, but 12847 ## If we have a custom action on failure, don't print errors, but
12833 ## do set a variable so people can do so. 12848 ## do set a variable so people can do so. Do it in a subshell
12834 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` 12849 ## to capture any diagnostics in invoking pkg-config.
12850 LIBXML2_PKG_ERRORS=`($PKG_CONFIG --print-errors "libxml-2.0 > 2.6.17") 2>&1`
12835 12851
12836 fi 12852 fi
12837 12853
@@ -15461,13 +15477,45 @@ rm -f core conftest.err conftest.$ac_objext \
15461fi 15477fi
15462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 15478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15463$as_echo "$emacs_cv_func__setjmp" >&6; } 15479$as_echo "$emacs_cv_func__setjmp" >&6; }
15464if test $emacs_cv_func__setjmp = no; then 15480if test $emacs_cv_func__setjmp = yes; then
15465 15481
15466$as_echo "#define _setjmp setjmp" >>confdefs.h 15482$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
15467 15483
15484else
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
15486$as_echo_n "checking for sigsetjmp... " >&6; }
15487if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
15488 $as_echo_n "(cached) " >&6
15489else
15490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15491/* end confdefs.h. */
15492#include <setjmp.h>
15493
15494int
15495main ()
15496{
15497sigjmp_buf j;
15498 if (! sigsetjmp (j, 1))
15499 siglongjmp (j, 1);
15500 ;
15501 return 0;
15502}
15503_ACEOF
15504if ac_fn_c_try_link "$LINENO"; then :
15505 emacs_cv_func_sigsetjmp=yes
15506else
15507 emacs_cv_func_sigsetjmp=no
15508fi
15509rm -f core conftest.err conftest.$ac_objext \
15510 conftest$ac_exeext conftest.$ac_ext
15511fi
15512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
15513$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
15514 if test $emacs_cv_func_sigsetjmp = yes; then
15468 15515
15469$as_echo "#define _longjmp longjmp" >>confdefs.h 15516$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
15470 15517
15518 fi
15471fi 15519fi
15472 15520
15473case $opsys in 15521case $opsys in
diff --git a/configure.ac b/configure.ac
index 382e62a97a1..f810c839587 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3774,13 +3774,24 @@ AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
3774 _longjmp (j, 1);]])], 3774 _longjmp (j, 1);]])],
3775 [emacs_cv_func__setjmp=yes], 3775 [emacs_cv_func__setjmp=yes],
3776 [emacs_cv_func__setjmp=no])]) 3776 [emacs_cv_func__setjmp=no])])
3777if test $emacs_cv_func__setjmp = no; then 3777if test $emacs_cv_func__setjmp = yes; then
3778 AC_DEFINE([_setjmp], [setjmp], 3778 AC_DEFINE([HAVE__SETJMP], 1, [Define to 1 if _setjmp and _longjmp work.])
3779 [Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.]) 3779else
3780 AC_DEFINE([_longjmp], [longjmp], 3780 AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp],
3781 [Define to longjmp if _setjmp and _longjmp do not work. 3781 [AC_LINK_IFELSE(
3782 Because longjmp may alter signal masks, callers of _longjmp 3782 [AC_LANG_PROGRAM(
3783 should not assume that it leaves signal masks alone.]) 3783 [[#include <setjmp.h>
3784 ]],
3785 [[sigjmp_buf j;
3786 if (! sigsetjmp (j, 1))
3787 siglongjmp (j, 1);]])],
3788 [emacs_cv_func_sigsetjmp=yes],
3789 [emacs_cv_func_sigsetjmp=no])])
3790 if test $emacs_cv_func_sigsetjmp = yes; then
3791 AC_DEFINE([HAVE_SIGSETJMP], 1,
3792 [Define to 1 if sigsetjmp and siglongjmp work.
3793 The value of this symbol is irrelevant if HAVE__SETJMP is defined.])
3794 fi
3784fi 3795fi
3785 3796
3786case $opsys in 3797case $opsys in
diff --git a/etc/NEWS b/etc/NEWS
index 4c6ceae1688..3344158b73c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -735,6 +735,7 @@ in Emacs 24.1:
735**** `special-display-frame-alist' 735**** `special-display-frame-alist'
736**** `special-display-buffer-names' 736**** `special-display-buffer-names'
737**** `special-display-function' 737**** `special-display-function'
738**** `display-buffer-function'
738 739
739** Completion 740** Completion
740 741
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c9aa7e99356..a7538e50d82 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,18 @@
12012-09-16 Chong Yidong <cyd@gnu.org>
2
3 * window.el (special-display-popup-frame): Doc fix (Bug#8853).
4 (display-buffer-function): Mark as obsolete.
5
6 * progmodes/compile.el (compilation-parse-errors): Accept list
7 values similar to font-lock-keywords (Bug#12136). Suggested by
8 Oleksandr Manzyuk.
9 (compilation-error-regexp-alist): Doc fix.
10
12012-09-15 Glenn Morris <rgm@gnu.org> 112012-09-15 Glenn Morris <rgm@gnu.org>
2 12
13 * version.el (emacs-bzr-version-bzr): New function.
14 (emacs-bzr-get-version): Add optional EXTERNAL argument.
15
3 * vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local 16 * vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local
4 checkouts, check the parent dirstate matches the branch. 17 checkouts, check the parent dirstate matches the branch.
5 Add "--tree" to "bzr revno" arguments. Don't try to shorten the 18 Add "--tree" to "bzr revno" arguments. Don't try to shorten the
diff --git a/lisp/dired.el b/lisp/dired.el
index ebc8f5da6d5..54921a4ea66 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3744,7 +3744,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3744;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3744;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3745;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3745;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3746;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3746;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3747;;;;;; dired-diff) "dired-aux" "dired-aux.el" "22ce64daa7ccb5698cb6b1279aa59ec2") 3747;;;;;; dired-diff) "dired-aux" "dired-aux.el" "3c768e470d5d053d0049e0286ce38da7")
3748;;; Generated autoloads from dired-aux.el 3748;;; Generated autoloads from dired-aux.el
3749 3749
3750(autoload 'dired-diff "dired-aux" "\ 3750(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index fbb0c9e204a..f5dedf0cd59 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -488,9 +488,12 @@ What matched the HYPERLINK'th subexpression has `mouse-face' and
488`compilation-message-face' applied. If this is nil, the text 488`compilation-message-face' applied. If this is nil, the text
489matched by the whole REGEXP becomes the hyperlink. 489matched by the whole REGEXP becomes the hyperlink.
490 490
491Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is 491Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where
492the number of a submatch that should be highlighted when it matches, 492SUBMATCH is the number of a submatch and FACE is an expression
493and FACE is an expression returning the face to use for that submatch.." 493which evaluates to a face name (a symbol or string).
494Alternatively, FACE can evaluate to a property list of the
495form (face FACE PROP1 VAL1 PROP2 VAL2 ...), in which case all the
496listed text properties PROP# are given values VAL# as well."
494 :type '(repeat (choice (symbol :tag "Predefined symbol") 497 :type '(repeat (choice (symbol :tag "Predefined symbol")
495 (sexp :tag "Error specification"))) 498 (sexp :tag "Error specification")))
496 :link `(file-link :tag "example file" 499 :link `(file-link :tag "example file"
@@ -1328,16 +1331,27 @@ to `compilation-error-regexp-alist' if RULES is nil."
1328 (compilation--put-prop 1331 (compilation--put-prop
1329 end-col 'font-lock-face compilation-column-face) 1332 end-col 'font-lock-face compilation-column-face)
1330 1333
1334 ;; Obey HIGHLIGHT.
1331 (dolist (extra-item (nthcdr 6 item)) 1335 (dolist (extra-item (nthcdr 6 item))
1332 (let ((mn (pop extra-item))) 1336 (let ((mn (pop extra-item)))
1333 (when (match-beginning mn) 1337 (when (match-beginning mn)
1334 (let ((face (eval (car extra-item)))) 1338 (let ((face (eval (car extra-item))))
1335 (cond 1339 (cond
1336 ((null face)) 1340 ((null face))
1337 ((symbolp face) 1341 ((or (symbolp face) (stringp face))
1338 (put-text-property 1342 (put-text-property
1339 (match-beginning mn) (match-end mn) 1343 (match-beginning mn) (match-end mn)
1340 'font-lock-face face)) 1344 'font-lock-face face))
1345 ((and (listp face)
1346 (eq (car face) 'face)
1347 (or (symbolp (cadr face))
1348 (stringp (cadr face))))
1349 (put-text-property
1350 (match-beginning mn) (match-end mn)
1351 'font-lock-face (cadr face))
1352 (add-text-properties
1353 (match-beginning mn) (match-end mn)
1354 (nthcdr 2 face)))
1341 (t 1355 (t
1342 (error "Don't know how to handle face %S" 1356 (error "Don't know how to handle face %S"
1343 face))))))) 1357 face)))))))
diff --git a/lisp/version.el b/lisp/version.el
index 47476cb268a..1fb3828e15d 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -104,48 +104,74 @@ Returns nil if unable to find this information."
104 (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") 104 (looking-at "[0-9]+\0\\([^\0\n]+\\)\0")
105 (match-string 1)))))) 105 (match-string 1))))))
106 106
107(defun emacs-bzr-get-version (&optional dir) 107(defun emacs-bzr-version-bzr (dir)
108 "Ask bzr itself for the version information for directory DIR."
109 ;; Comments on `bzr version-info':
110 ;; i) Unknown files also cause clean != 1.
111 ;; ii) It can be slow, contacting the upstream repo to get the
112 ;; branch nick if one is not set locally, even with a custom
113 ;; template that is not asking for the nick (as used here). You'd
114 ;; think the latter part would be trivial to fix:
115 ;; https://bugs.launchpad.net/bzr/+bug/882541/comments/3
116 ;; https://bugs.launchpad.net/bzr/+bug/629150
117 ;; You can set the nick locally with `bzr nick ...', which speeds
118 ;; things up enormously. `bzr revno' does not have this issue, but
119 ;; has no way to print the revision_id AFAICS.
120 (message "Waiting for bzr...")
121 (with-temp-buffer
122 (if (zerop
123 (call-process "bzr" nil '(t nil) nil "version-info"
124 "--custom"
125 "--template={revno} {revision_id} (clean = {clean})"
126 "dir"))
127 (buffer-string))))
128
129(defun emacs-bzr-get-version (&optional dir external)
108 "Try to return as a string the bzr revision of the Emacs sources. 130 "Try to return as a string the bzr revision of the Emacs sources.
109The format is: [revno] revision_id, where revno may be absent. 131The format is: [revno] revision_id, where revno may be absent.
110Value is nil if the sources do not seem to be under bzr, or if we could 132Value is nil if the sources do not seem to be under bzr, or if we could
111not determine the revision. Note that this reports on the current state 133not determine the revision. Note that this reports on the current state
112of the sources, which may not correspond to the running Emacs. 134of the sources, which may not correspond to the running Emacs.
113 135
114Optional argument DIR is a directory to use instead of `source-directory'." 136Optional argument DIR is a directory to use instead of `source-directory'.
137Optional argument EXTERNAL non-nil means to maybe ask `bzr' itself,
138if the sources appear to be under bzr. If `force', always ask bzr.
139Otherwise only ask bzr if we cannot find any information ourselves."
115 (or dir (setq dir source-directory)) 140 (or dir (setq dir source-directory))
116 (when (file-directory-p (expand-file-name ".bzr/branch" dir)) 141 (when (file-directory-p (expand-file-name ".bzr/branch" dir))
117 (let (file loc rev) 142 (if (eq external 'force)
118 (cond ((file-readable-p 143 (emacs-bzr-version-bzr dir)
119 (setq file (expand-file-name ".bzr/branch/last-revision" dir))) 144 (let (file loc rev)
120 (with-temp-buffer 145 (cond ((file-readable-p
121 (insert-file-contents file) 146 (setq file (expand-file-name ".bzr/branch/last-revision" dir)))
122 (goto-char (point-max)) 147 (with-temp-buffer
123 (if (looking-back "\n") 148 (insert-file-contents file)
124 (delete-char -1)) 149 (goto-char (point-max))
125 (buffer-string))) 150 (if (looking-back "\n")
126 ;; OK, no last-revision. Is it a lightweight checkout? 151 (delete-char -1))
127 ((file-readable-p 152 (buffer-string)))
128 (setq file (expand-file-name ".bzr/branch/location" dir))) 153 ;; OK, no last-revision. Is it a lightweight checkout?
129 (setq rev (emacs-bzr-version-dirstate dir)) 154 ((file-readable-p
130 ;; If the parent branch is local, try looking there for the rev. 155 (setq file (expand-file-name ".bzr/branch/location" dir)))
131 ;; Note: there is no guarantee that the parent branch's rev 156 (setq rev (emacs-bzr-version-dirstate dir))
132 ;; corresponds to this branch. This branch could have 157 ;; If the parent branch is local, try looking there for the rev.
133 ;; been made with a specific -r revno argument, or the 158 ;; Note: there is no guarantee that the parent branch's rev
134 ;; parent could have been updated since this branch was created. 159 ;; corresponds to this branch. This branch could have
135 ;; To try and detect this, we check the dirstate revids 160 ;; been made with a specific -r revno argument, or the
136 ;; to see if they match. 161 ;; parent could have been updated since this branch was created.
137 (if (and (setq loc (with-temp-buffer 162 ;; To try and detect this, we check the dirstate revids
138 (insert-file-contents file) 163 ;; to see if they match.
139 (if (looking-at "file://\\(.*\\)") 164 (if (and (setq loc (with-temp-buffer
140 (match-string 1)))) 165 (insert-file-contents file)
141 (equal rev (emacs-bzr-version-dirstate loc))) 166 (if (looking-at "file://\\(.*\\)")
142 (emacs-bzr-get-version loc) 167 (match-string 1))))
143 ;; If parent does not match, the best we can do without 168 (equal rev (emacs-bzr-version-dirstate loc)))
144 ;; calling external commands is to use the dirstate rev. 169 (emacs-bzr-get-version loc)
145 rev)) 170 ;; If parent does not match, the best we can do without
146 ;; At this point, could fall back to: 171 ;; calling external commands is to use the dirstate rev.
147 ;; bzr version-info --custom --template='{revno} {revision_id}\n' 172 rev))
148 )))) 173 (external
174 (emacs-bzr-version-bzr dir)))))))
149 175
150;; We put version info into the executable in the form that `ident' uses. 176;; We put version info into the executable in the form that `ident' uses.
151(purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) 177(purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))
diff --git a/lisp/window.el b/lisp/window.el
index dd1f55450c3..fccb68bd94a 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4551,6 +4551,9 @@ of the window used."
4551 (function :tag "function")) 4551 (function :tag "function"))
4552 :group 'windows) 4552 :group 'windows)
4553 4553
4554(make-obsolete-variable 'display-buffer-function
4555 'display-buffer-alist "24.3")
4556
4554;; Eventually, we want to turn this into a defvar; instead of 4557;; Eventually, we want to turn this into a defvar; instead of
4555;; customizing this, the user should use a `pop-up-frame-parameters' 4558;; customizing this, the user should use a `pop-up-frame-parameters'
4556;; alist entry in `display-buffer-base-action'. 4559;; alist entry in `display-buffer-base-action'.
@@ -4768,8 +4771,8 @@ the selected window. If they contain (same-frame . t), display
4768BUFFER in a window of the selected frame. 4771BUFFER in a window of the selected frame.
4769 4772
4770If ARGS is a list whose car is a symbol, use (car ARGS) as a 4773If ARGS is a list whose car is a symbol, use (car ARGS) as a
4771function to do the work. Pass it BUFFER as first argument, 4774function to do the work. Pass it BUFFER as first argument, and
4772and (cdr ARGS) as second." 4775pass the elements of (cdr ARGS) as the remaining arguments."
4773 (if (and args (symbolp (car args))) 4776 (if (and args (symbolp (car args)))
4774 (apply (car args) buffer (cdr args)) 4777 (apply (car args) buffer (cdr args))
4775 (let ((window (get-buffer-window buffer 0))) 4778 (let ((window (get-buffer-window buffer 0)))
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 54e5570072a..197ce0cf850 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,10 @@
12012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port _setjmp fix to POSIXish hosts as well as Microsoft.
4 * config.nt: Attempt to sync with autogen/config.in.
5 (HAVE_SIGSETJMP, HAVE__SETJMP): New macros.
6 (_longjmp, _setjmp): Remove.
7
12012-09-14 Juanma Barranquero <lekktu@gmail.com> 82012-09-14 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * config.nt: Sync with autogen/config.in. 10 * config.nt: Sync with autogen/config.in.
diff --git a/nt/config.nt b/nt/config.nt
index 5121a013aad..82b7da430ab 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -800,6 +800,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
800/* Define to 1 if 'wint_t' is a signed integer type. */ 800/* Define to 1 if 'wint_t' is a signed integer type. */
801#undef HAVE_SIGNED_WINT_T 801#undef HAVE_SIGNED_WINT_T
802 802
803/* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is
804 irrelevant if HAVE__SETJMP is defined. */
805#undef HAVE_SIGSETJMP
806
803/* Define to 1 if the system has the type `sigset_t'. */ 807/* Define to 1 if the system has the type `sigset_t'. */
804#undef HAVE_SIGSET_T 808#undef HAVE_SIGSET_T
805 809
@@ -1084,6 +1088,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1084/* Define to 1 if you have the `_ftime' function. */ 1088/* Define to 1 if you have the `_ftime' function. */
1085#undef HAVE__FTIME 1089#undef HAVE__FTIME
1086 1090
1091/* Define to 1 if _setjmp and _longjmp work. */
1092#define HAVE__SETJMP 1
1093
1087/* Define to 1 if you have the `__builtin_unwind_init' function. */ 1094/* Define to 1 if you have the `__builtin_unwind_init' function. */
1088#undef HAVE___BUILTIN_UNWIND_INIT 1095#undef HAVE___BUILTIN_UNWIND_INIT
1089 1096
@@ -1511,14 +1518,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1511 declarations. Define as empty for no equivalent. */ 1518 declarations. Define as empty for no equivalent. */
1512#undef __restrict_arr 1519#undef __restrict_arr
1513 1520
1514/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may
1515 alter signal masks, callers of _longjmp should not assume that it leaves
1516 signal masks alone. */
1517#undef _longjmp
1518
1519/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */
1520#undef _setjmp
1521
1522/* Some platforms that do not use configure define this to include extra 1521/* Some platforms that do not use configure define this to include extra
1523 configuration information. */ 1522 configuration information. */
1524#define config_opsysfile <ms-w32.h> 1523#define config_opsysfile <ms-w32.h>
diff --git a/src/ChangeLog b/src/ChangeLog
index 88e385c876b..cfcd2b0e2f1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,8 +1,78 @@
12012-09-15 Kenichi Handa <handa@gnu.org> 12012-09-16 Kenichi Handa <handa@gnu.org>
2 2
3 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster 3 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
4 here, but just check the validity of glyphs in the glyph-string. 4 here, but just check the validity of glyphs in the glyph-string.
5 5
62012-09-16 Martin Rudalics <rudalics@gmx.at>
7
8 * window.c (Fwindow_parameter, Fset_window_parameter): Accept
9 any window as argument (Bug#12452).
10
112012-09-16 Jan Djärv <jan.h.d@swipnet.se>
12
13 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
14 to ns_term_init to avoid memory leak.
15
16 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
17 explicit retain/release.
18 (ns_term_init): Only allow one display. Initialize outerpool and
19 ns_*_types.
20
212012-09-15 Paul Eggert <eggert@cs.ucla.edu>
22
23 Port _setjmp fix to POSIXish hosts as well as Microsoft.
24 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
25 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
26 the Microsoft problem in a different way, by altering ../nt/config.nt.
27
282012-09-15 Eli Zaretskii <eliz@gnu.org>
29
30 * w32xfns.c:
31 * w32uniscribe.c:
32 * w32term.c:
33 * w32select.c:
34 * w32reg.c:
35 * w32proc.c:
36 * w32menu.c:
37 * w32inevt.c:
38 * w32heap.c:
39 * w32font.c:
40 * w32fns.c:
41 * w32console.c:
42 * w32.c:
43 * w16select.c: Remove inclusion of setjmp.h, as it is now included
44 by lisp.h. This completes removal of setjmp.h inclusion
45 erroneously announced in the previous commit. (Bug#12446)
46
47 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
48 more accurate.
49
50 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
51 not defined as a macro. The latter happens on MS-Windows.
52 (Bug#12446)
53
542012-09-15 Paul Eggert <eggert@cs.ucla.edu>
55
56 Port better to POSIX hosts lacking _setjmp (Bug#12446).
57 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
58 Some instances of '#include <setjmp.h>' removed, if the
59 only reason for the instance was because "lisp.h" was included.
60 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
61 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
62 and _longjmp with the new symbols. Emacs already uses _setjmp if
63 available, so this change affects only POSIXish hosts that have
64 sigsetjmp but not _setjmp, such as some versions of Solaris and
65 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
66 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
67 (png_load_body) [HAVE_PNG]:
68 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
69 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
70 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
71 since PNG requires jmp_buf. This is the only exception to the
72 general rule that we now use sys_setjmp and sys_longjmp.
73 This exception is OK since this code does not change the signal
74 mask or longjmp out of a signal handler.
75
62012-09-14 Paul Eggert <eggert@cs.ucla.edu> 762012-09-14 Paul Eggert <eggert@cs.ucla.edu>
7 77
8 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: 78 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
diff --git a/src/alloc.c b/src/alloc.c
index 25cf03dfa2e..0bfbb0c88b1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24 24
25#include <stdio.h> 25#include <stdio.h>
26#include <limits.h> /* For CHAR_BIT. */ 26#include <limits.h> /* For CHAR_BIT. */
27#include <setjmp.h>
28 27
29#ifdef ENABLE_CHECKING 28#ifdef ENABLE_CHECKING
30#include <signal.h> /* For SIGABRT. */ 29#include <signal.h> /* For SIGABRT. */
@@ -45,7 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45#include "frame.h" 44#include "frame.h"
46#include "blockinput.h" 45#include "blockinput.h"
47#include "termhooks.h" /* For struct terminal. */ 46#include "termhooks.h" /* For struct terminal. */
48#include <setjmp.h> 47
49#include <verify.h> 48#include <verify.h>
50 49
51/* GC_CHECK_MARKED_OBJECTS means do sanity checks on allocated objects. 50/* GC_CHECK_MARKED_OBJECTS means do sanity checks on allocated objects.
@@ -4764,14 +4763,14 @@ test_setjmp (void)
4764{ 4763{
4765 char buf[10]; 4764 char buf[10];
4766 register int x; 4765 register int x;
4767 jmp_buf jbuf; 4766 sys_jmp_buf jbuf;
4768 4767
4769 /* Arrange for X to be put in a register. */ 4768 /* Arrange for X to be put in a register. */
4770 sprintf (buf, "1"); 4769 sprintf (buf, "1");
4771 x = strlen (buf); 4770 x = strlen (buf);
4772 x = 2 * x - 1; 4771 x = 2 * x - 1;
4773 4772
4774 _setjmp (jbuf); 4773 sys_setjmp (jbuf);
4775 if (longjmps_done == 1) 4774 if (longjmps_done == 1)
4776 { 4775 {
4777 /* Came here after the longjmp at the end of the function. 4776 /* Came here after the longjmp at the end of the function.
@@ -4796,7 +4795,7 @@ test_setjmp (void)
4796 ++longjmps_done; 4795 ++longjmps_done;
4797 x = 2; 4796 x = 2;
4798 if (longjmps_done == 1) 4797 if (longjmps_done == 1)
4799 _longjmp (jbuf, 1); 4798 sys_longjmp (jbuf, 1);
4800} 4799}
4801 4800
4802#endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */ 4801#endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */
@@ -4902,7 +4901,7 @@ mark_stack (void)
4902 /* jmp_buf may not be aligned enough on darwin-ppc64 */ 4901 /* jmp_buf may not be aligned enough on darwin-ppc64 */
4903 union aligned_jmpbuf { 4902 union aligned_jmpbuf {
4904 Lisp_Object o; 4903 Lisp_Object o;
4905 jmp_buf j; 4904 sys_jmp_buf j;
4906 } j; 4905 } j;
4907 volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base; 4906 volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base;
4908#endif 4907#endif
@@ -4938,7 +4937,7 @@ mark_stack (void)
4938 } 4937 }
4939#endif /* GC_SETJMP_WORKS */ 4938#endif /* GC_SETJMP_WORKS */
4940 4939
4941 _setjmp (j.j); 4940 sys_setjmp (j.j);
4942 end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; 4941 end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
4943#endif /* not GC_SAVE_REGISTERS_ON_STACK */ 4942#endif /* not GC_SAVE_REGISTERS_ON_STACK */
4944#endif /* not HAVE___BUILTIN_UNWIND_INIT */ 4943#endif /* not HAVE___BUILTIN_UNWIND_INIT */
diff --git a/src/atimer.c b/src/atimer.c
index 34731920af5..80b813fe4fe 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -18,7 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#include <config.h> 19#include <config.h>
20#include <stdio.h> 20#include <stdio.h>
21#include <setjmp.h> 21
22#include "lisp.h" 22#include "lisp.h"
23#include "syssignal.h" 23#include "syssignal.h"
24#include "systime.h" 24#include "systime.h"
diff --git a/src/bidi.c b/src/bidi.c
index 4186a46e19e..af0209565e2 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -56,7 +56,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56 56
57#include <config.h> 57#include <config.h>
58#include <stdio.h> 58#include <stdio.h>
59#include <setjmp.h>
60 59
61#include "lisp.h" 60#include "lisp.h"
62#include "character.h" 61#include "character.h"
diff --git a/src/buffer.c b/src/buffer.c
index d512547d34e..b020edb9962 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include <sys/param.h> 26#include <sys/param.h>
27#include <errno.h> 27#include <errno.h>
28#include <stdio.h> 28#include <stdio.h>
29#include <setjmp.h>
30#include <unistd.h> 29#include <unistd.h>
31 30
32#include <verify.h> 31#include <verify.h>
diff --git a/src/bytecode.c b/src/bytecode.c
index 97730636d0e..b151078f60f 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -33,7 +33,7 @@ by Hallvard:
33 */ 33 */
34 34
35#include <config.h> 35#include <config.h>
36#include <setjmp.h> 36
37#include "lisp.h" 37#include "lisp.h"
38#include "character.h" 38#include "character.h"
39#include "buffer.h" 39#include "buffer.h"
diff --git a/src/callint.c b/src/callint.c
index b11545ddea2..c4c087e83d7 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h>
23 22
24#include "lisp.h" 23#include "lisp.h"
25#include "character.h" 24#include "character.h"
diff --git a/src/callproc.c b/src/callproc.c
index a92959a1559..9171337ee76 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <config.h> 21#include <config.h>
22#include <errno.h> 22#include <errno.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25#include <sys/types.h> 24#include <sys/types.h>
26#include <unistd.h> 25#include <unistd.h>
27 26
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 1102054b153..e3654627576 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h> 22
23#include "lisp.h" 23#include "lisp.h"
24#include "character.h" 24#include "character.h"
25#include "buffer.h" 25#include "buffer.h"
diff --git a/src/casetab.c b/src/casetab.c
index 3e22d0d0b77..a84bc9202d0 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h> 22
23#include "lisp.h" 23#include "lisp.h"
24#include "character.h" 24#include "character.h"
25#include "buffer.h" 25#include "buffer.h"
diff --git a/src/category.c b/src/category.c
index 80dc6938d8b..01a6f54ad17 100644
--- a/src/category.c
+++ b/src/category.c
@@ -32,7 +32,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32 32
33#define CATEGORY_INLINE EXTERN_INLINE 33#define CATEGORY_INLINE EXTERN_INLINE
34 34
35#include <setjmp.h>
36#include "lisp.h" 35#include "lisp.h"
37#include "character.h" 36#include "character.h"
38#include "buffer.h" 37#include "buffer.h"
diff --git a/src/ccl.c b/src/ccl.c
index dd37934451d..34cc1c98eea 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include <config.h> 26#include <config.h>
27 27
28#include <stdio.h> 28#include <stdio.h>
29#include <setjmp.h>
30#include <limits.h> 29#include <limits.h>
31 30
32#include "lisp.h" 31#include "lisp.h"
diff --git a/src/character.c b/src/character.c
index 37963d1878c..def1ad090fd 100644
--- a/src/character.c
+++ b/src/character.c
@@ -36,7 +36,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
36#ifdef emacs 36#ifdef emacs
37 37
38#include <sys/types.h> 38#include <sys/types.h>
39#include <setjmp.h>
40#include <intprops.h> 39#include <intprops.h>
41#include "lisp.h" 40#include "lisp.h"
42#include "character.h" 41#include "character.h"
diff --git a/src/charset.c b/src/charset.c
index 972a0598059..d8c38e5ea3b 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -32,7 +32,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#include <unistd.h> 32#include <unistd.h>
33#include <limits.h> 33#include <limits.h>
34#include <sys/types.h> 34#include <sys/types.h>
35#include <setjmp.h>
36#include <c-ctype.h> 35#include <c-ctype.h>
37#include "lisp.h" 36#include "lisp.h"
38#include "character.h" 37#include "character.h"
diff --git a/src/chartab.c b/src/chartab.c
index c14df0ebac6..e864514e336 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h> 22
23#include "lisp.h" 23#include "lisp.h"
24#include "character.h" 24#include "character.h"
25#include "charset.h" 25#include "charset.h"
diff --git a/src/cm.c b/src/cm.c
index 4b17b92eebc..eda6430bafa 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <stdio.h> 22#include <stdio.h>
23#include <setjmp.h>
24 23
25#include "lisp.h" 24#include "lisp.h"
26#include "frame.h" 25#include "frame.h"
diff --git a/src/cmds.c b/src/cmds.c
index 90d3cd6dced..45f7df948ae 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h> 22
23#include "lisp.h" 23#include "lisp.h"
24#include "commands.h" 24#include "commands.h"
25#include "character.h" 25#include "character.h"
diff --git a/src/coding.c b/src/coding.c
index 94a2d9fea80..4b3d22f956c 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -285,7 +285,6 @@ encode_coding_XXX (struct coding_system *coding)
285 285
286#include <config.h> 286#include <config.h>
287#include <stdio.h> 287#include <stdio.h>
288#include <setjmp.h>
289 288
290#include "lisp.h" 289#include "lisp.h"
291#include "character.h" 290#include "character.h"
diff --git a/src/composite.c b/src/composite.c
index eddabb66d33..ae46df0a573 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26 26
27#define COMPOSITE_INLINE EXTERN_INLINE 27#define COMPOSITE_INLINE EXTERN_INLINE
28 28
29#include <setjmp.h>
30#include "lisp.h" 29#include "lisp.h"
31#include "character.h" 30#include "character.h"
32#include "buffer.h" 31#include "buffer.h"
diff --git a/src/data.c b/src/data.c
index 5d7f036b70d..72d7c8ccf9a 100644
--- a/src/data.c
+++ b/src/data.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <stdio.h> 22#include <stdio.h>
23#include <setjmp.h>
24 23
25#include <intprops.h> 24#include <intprops.h>
26 25
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 901820648cb..c2eefd605bb 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#ifdef HAVE_DBUS 21#ifdef HAVE_DBUS
22#include <stdio.h> 22#include <stdio.h>
23#include <dbus/dbus.h> 23#include <dbus/dbus.h>
24#include <setjmp.h> 24
25#include "lisp.h" 25#include "lisp.h"
26#include "frame.h" 26#include "frame.h"
27#include "termhooks.h" 27#include "termhooks.h"
diff --git a/src/dired.c b/src/dired.c
index 9af5f76821b..3aa27ecf920 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#include <stdio.h> 22#include <stdio.h>
23#include <sys/types.h> 23#include <sys/types.h>
24#include <sys/stat.h> 24#include <sys/stat.h>
25#include <setjmp.h>
26 25
27#ifdef HAVE_PWD_H 26#ifdef HAVE_PWD_H
28#include <pwd.h> 27#include <pwd.h>
diff --git a/src/dispnew.c b/src/dispnew.c
index f6186e86048..5827316a7b7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#define DISPEXTERN_INLINE EXTERN_INLINE 22#define DISPEXTERN_INLINE EXTERN_INLINE
23 23
24#include <stdio.h> 24#include <stdio.h>
25#include <setjmp.h>
26#include <unistd.h> 25#include <unistd.h>
27 26
28#include "lisp.h" 27#include "lisp.h"
diff --git a/src/doc.c b/src/doc.c
index 02a5b4b8143..d2d664df266 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23#include <sys/types.h> 23#include <sys/types.h>
24#include <sys/file.h> /* Must be after sys/types.h for USG*/ 24#include <sys/file.h> /* Must be after sys/types.h for USG*/
25#include <setjmp.h>
26#include <fcntl.h> 25#include <fcntl.h>
27#include <unistd.h> 26#include <unistd.h>
28 27
diff --git a/src/doprnt.c b/src/doprnt.c
index 3b7391f07d4..caa56d6ae88 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -102,7 +102,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
102 102
103#include <config.h> 103#include <config.h>
104#include <stdio.h> 104#include <stdio.h>
105#include <setjmp.h>
106#include <float.h> 105#include <float.h>
107#include <unistd.h> 106#include <unistd.h>
108#include <limits.h> 107#include <limits.h>
diff --git a/src/dosfns.c b/src/dosfns.c
index 21676f4b4f5..3c649f4d534 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30#include <dos.h> 30#include <dos.h>
31#undef gettime 31#undef gettime
32#undef settime 32#undef settime
33#include <setjmp.h> 33
34#include "lisp.h" 34#include "lisp.h"
35#include "character.h" 35#include "character.h"
36#include "buffer.h" 36#include "buffer.h"
diff --git a/src/editfns.c b/src/editfns.c
index 299cad07fd7..c6744648bc5 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <config.h> 21#include <config.h>
22#include <sys/types.h> 22#include <sys/types.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25 24
26#ifdef HAVE_PWD_H 25#ifdef HAVE_PWD_H
27#include <pwd.h> 26#include <pwd.h>
diff --git a/src/emacs.c b/src/emacs.c
index e8150631311..1416bf76c43 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 25
26#include <sys/types.h> 26#include <sys/types.h>
27#include <sys/file.h> 27#include <sys/file.h>
28#include <setjmp.h>
29#include <unistd.h> 28#include <unistd.h>
30 29
31#include "lisp.h" 30#include "lisp.h"
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index c0d29a640ed..d10185072cc 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -22,7 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23#include "emacsgtkfixed.h" 23#include "emacsgtkfixed.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <setjmp.h> 25
26#include "lisp.h" 26#include "lisp.h"
27#include "frame.h" 27#include "frame.h"
28#include "xterm.h" 28#include "xterm.h"
diff --git a/src/eval.c b/src/eval.c
index 3c0c65e9366..6cca13a8fda 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#include <config.h> 20#include <config.h>
21#include <limits.h> 21#include <limits.h>
22#include <setjmp.h>
23#include <stdio.h> 22#include <stdio.h>
24#include "lisp.h" 23#include "lisp.h"
25#include "blockinput.h" 24#include "blockinput.h"
@@ -1072,7 +1071,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object
1072 catchlist = &c; 1071 catchlist = &c;
1073 1072
1074 /* Call FUNC. */ 1073 /* Call FUNC. */
1075 if (! _setjmp (c.jmp)) 1074 if (! sys_setjmp (c.jmp))
1076 c.val = (*func) (arg); 1075 c.val = (*func) (arg);
1077 1076
1078 /* Throw works by a longjmp that comes right here. */ 1077 /* Throw works by a longjmp that comes right here. */
@@ -1140,7 +1139,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value)
1140 backtrace_list = catch->backlist; 1139 backtrace_list = catch->backlist;
1141 lisp_eval_depth = catch->lisp_eval_depth; 1140 lisp_eval_depth = catch->lisp_eval_depth;
1142 1141
1143 _longjmp (catch->jmp, 1); 1142 sys_longjmp (catch->jmp, 1);
1144} 1143}
1145 1144
1146DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, 1145DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0,
@@ -1246,7 +1245,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
1246 c.interrupt_input_blocked = interrupt_input_blocked; 1245 c.interrupt_input_blocked = interrupt_input_blocked;
1247 c.gcpro = gcprolist; 1246 c.gcpro = gcprolist;
1248 c.byte_stack = byte_stack_list; 1247 c.byte_stack = byte_stack_list;
1249 if (_setjmp (c.jmp)) 1248 if (sys_setjmp (c.jmp))
1250 { 1249 {
1251 if (!NILP (h.var)) 1250 if (!NILP (h.var))
1252 specbind (h.var, c.val); 1251 specbind (h.var, c.val);
@@ -1301,7 +1300,7 @@ internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers,
1301 c.interrupt_input_blocked = interrupt_input_blocked; 1300 c.interrupt_input_blocked = interrupt_input_blocked;
1302 c.gcpro = gcprolist; 1301 c.gcpro = gcprolist;
1303 c.byte_stack = byte_stack_list; 1302 c.byte_stack = byte_stack_list;
1304 if (_setjmp (c.jmp)) 1303 if (sys_setjmp (c.jmp))
1305 { 1304 {
1306 return (*hfun) (c.val); 1305 return (*hfun) (c.val);
1307 } 1306 }
@@ -1339,7 +1338,7 @@ internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg,
1339 c.interrupt_input_blocked = interrupt_input_blocked; 1338 c.interrupt_input_blocked = interrupt_input_blocked;
1340 c.gcpro = gcprolist; 1339 c.gcpro = gcprolist;
1341 c.byte_stack = byte_stack_list; 1340 c.byte_stack = byte_stack_list;
1342 if (_setjmp (c.jmp)) 1341 if (sys_setjmp (c.jmp))
1343 { 1342 {
1344 return (*hfun) (c.val); 1343 return (*hfun) (c.val);
1345 } 1344 }
@@ -1381,7 +1380,7 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object),
1381 c.interrupt_input_blocked = interrupt_input_blocked; 1380 c.interrupt_input_blocked = interrupt_input_blocked;
1382 c.gcpro = gcprolist; 1381 c.gcpro = gcprolist;
1383 c.byte_stack = byte_stack_list; 1382 c.byte_stack = byte_stack_list;
1384 if (_setjmp (c.jmp)) 1383 if (sys_setjmp (c.jmp))
1385 { 1384 {
1386 return (*hfun) (c.val); 1385 return (*hfun) (c.val);
1387 } 1386 }
@@ -1425,7 +1424,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
1425 c.interrupt_input_blocked = interrupt_input_blocked; 1424 c.interrupt_input_blocked = interrupt_input_blocked;
1426 c.gcpro = gcprolist; 1425 c.gcpro = gcprolist;
1427 c.byte_stack = byte_stack_list; 1426 c.byte_stack = byte_stack_list;
1428 if (_setjmp (c.jmp)) 1427 if (sys_setjmp (c.jmp))
1429 { 1428 {
1430 return (*hfun) (c.val, nargs, args); 1429 return (*hfun) (c.val, nargs, args);
1431 } 1430 }
diff --git a/src/fileio.c b/src/fileio.c
index f0b3f0cc2fd..ca71af7ed95 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <stdio.h> 23#include <stdio.h>
24#include <sys/types.h> 24#include <sys/types.h>
25#include <sys/stat.h> 25#include <sys/stat.h>
26#include <setjmp.h>
27#include <unistd.h> 26#include <unistd.h>
28 27
29#ifdef HAVE_PWD_H 28#ifdef HAVE_PWD_H
diff --git a/src/filelock.c b/src/filelock.c
index 1f599c68912..17f3f253249 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <sys/stat.h> 23#include <sys/stat.h>
24#include <signal.h> 24#include <signal.h>
25#include <stdio.h> 25#include <stdio.h>
26#include <setjmp.h>
27 26
28#ifdef HAVE_PWD_H 27#ifdef HAVE_PWD_H
29#include <pwd.h> 28#include <pwd.h>
diff --git a/src/floatfns.c b/src/floatfns.c
index 66d7ca4af2c..4fe209fcb61 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -29,7 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29 */ 29 */
30 30
31#include <config.h> 31#include <config.h>
32#include <setjmp.h> 32
33#include "lisp.h" 33#include "lisp.h"
34#include "syssignal.h" 34#include "syssignal.h"
35 35
diff --git a/src/fns.c b/src/fns.c
index 91dc6639150..42c4f817f29 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <unistd.h> 22#include <unistd.h>
23#include <time.h> 23#include <time.h>
24#include <setjmp.h>
25 24
26#include <intprops.h> 25#include <intprops.h>
27 26
diff --git a/src/font.c b/src/font.c
index ccbeb9956f4..32194d1bb02 100644
--- a/src/font.c
+++ b/src/font.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <config.h> 23#include <config.h>
24#include <float.h> 24#include <float.h>
25#include <stdio.h> 25#include <stdio.h>
26#include <setjmp.h>
27 26
28#include <c-ctype.h> 27#include <c-ctype.h>
29 28
diff --git a/src/fontset.c b/src/fontset.c
index 2b955fe6b11..35d4bfb367e 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26 26
27#include <config.h> 27#include <config.h>
28#include <stdio.h> 28#include <stdio.h>
29#include <setjmp.h>
30 29
31#include "lisp.h" 30#include "lisp.h"
32#include "blockinput.h" 31#include "blockinput.h"
diff --git a/src/frame.c b/src/frame.c
index d10969692ee..6930dac3ce8 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <limits.h> 26#include <limits.h>
27#include <setjmp.h>
28 27
29#include <c-ctype.h> 28#include <c-ctype.h>
30 29
diff --git a/src/fringe.c b/src/fringe.c
index 0c2109a0f8e..6e6deeddb08 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -18,7 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#include <config.h> 19#include <config.h>
20#include <stdio.h> 20#include <stdio.h>
21#include <setjmp.h>
22 21
23#include "lisp.h" 22#include "lisp.h"
24#include "frame.h" 23#include "frame.h"
diff --git a/src/ftfont.c b/src/ftfont.c
index a85773a9a21..f07ad6f33c7 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -21,8 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25
26#include <fontconfig/fontconfig.h> 24#include <fontconfig/fontconfig.h>
27#include <fontconfig/fcfreetype.h> 25#include <fontconfig/fcfreetype.h>
28 26
diff --git a/src/ftxfont.c b/src/ftxfont.c
index c705ede62c4..466250bd43f 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25#include <X11/Xlib.h> 24#include <X11/Xlib.h>
26 25
27#include "lisp.h" 26#include "lisp.h"
diff --git a/src/gnutls.c b/src/gnutls.c
index a2573f6bd99..1c4693aee32 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -18,7 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#include <config.h> 19#include <config.h>
20#include <errno.h> 20#include <errno.h>
21#include <setjmp.h>
22 21
23#include "lisp.h" 22#include "lisp.h"
24#include "process.h" 23#include "process.h"
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 884574e1062..1eb4b2cabdf 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#ifdef USE_GTK 22#ifdef USE_GTK
23#include <float.h> 23#include <float.h>
24#include <stdio.h> 24#include <stdio.h>
25#include <setjmp.h>
26 25
27#include <c-ctype.h> 26#include <c-ctype.h>
28 27
diff --git a/src/image.c b/src/image.c
index d4e54fb7dcd..8fc1c8637eb 100644
--- a/src/image.c
+++ b/src/image.c
@@ -5514,6 +5514,15 @@ init_png_functions (Lisp_Object libraries)
5514 5514
5515#endif /* HAVE_NTGUI */ 5515#endif /* HAVE_NTGUI */
5516 5516
5517/* Possibly inefficient/inexact substitutes for _setjmp and _longjmp.
5518 Do not use sys_setjmp, as PNG supports only jmp_buf. The _longjmp
5519 substitute may munge the signal mask, but that should be OK here.
5520 MinGW (MS-Windows) uses _setjmp and defines setjmp to _setjmp in
5521 the system header setjmp.h; don't mess up that. */
5522#ifndef HAVE__SETJMP
5523# define _setjmp(j) setjmp (j)
5524# define _longjmp longjmp
5525#endif
5517 5526
5518#if (PNG_LIBPNG_VER < 10500) 5527#if (PNG_LIBPNG_VER < 10500)
5519#define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1)) 5528#define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1))
@@ -5593,7 +5602,7 @@ png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length)
5593 5602
5594struct png_load_context 5603struct png_load_context
5595{ 5604{
5596 /* These are members so that _longjmp doesn't munge local variables. */ 5605 /* These are members so that longjmp doesn't munge local variables. */
5597 png_struct *png_ptr; 5606 png_struct *png_ptr;
5598 png_info *info_ptr; 5607 png_info *info_ptr;
5599 png_info *end_info; 5608 png_info *end_info;
@@ -6129,9 +6138,9 @@ jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired)
6129struct my_jpeg_error_mgr 6138struct my_jpeg_error_mgr
6130{ 6139{
6131 struct jpeg_error_mgr pub; 6140 struct jpeg_error_mgr pub;
6132 jmp_buf setjmp_buffer; 6141 sys_jmp_buf setjmp_buffer;
6133 6142
6134 /* The remaining members are so that _longjmp doesn't munge local 6143 /* The remaining members are so that longjmp doesn't munge local
6135 variables. */ 6144 variables. */
6136 struct jpeg_decompress_struct cinfo; 6145 struct jpeg_decompress_struct cinfo;
6137 enum 6146 enum
@@ -6151,7 +6160,7 @@ my_error_exit (j_common_ptr cinfo)
6151{ 6160{
6152 struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; 6161 struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err;
6153 mgr->failure_code = MY_JPEG_ERROR_EXIT; 6162 mgr->failure_code = MY_JPEG_ERROR_EXIT;
6154 _longjmp (mgr->setjmp_buffer, 1); 6163 sys_longjmp (mgr->setjmp_buffer, 1);
6155} 6164}
6156 6165
6157 6166
@@ -6401,7 +6410,7 @@ jpeg_load_body (struct frame *f, struct image *img,
6401 error is detected. This function will perform a longjmp. */ 6410 error is detected. This function will perform a longjmp. */
6402 mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); 6411 mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub);
6403 mgr->pub.error_exit = my_error_exit; 6412 mgr->pub.error_exit = my_error_exit;
6404 if (_setjmp (mgr->setjmp_buffer)) 6413 if (sys_setjmp (mgr->setjmp_buffer))
6405 { 6414 {
6406 switch (mgr->failure_code) 6415 switch (mgr->failure_code)
6407 { 6416 {
@@ -6460,14 +6469,14 @@ jpeg_load_body (struct frame *f, struct image *img,
6460 if (!check_image_size (f, width, height)) 6469 if (!check_image_size (f, width, height))
6461 { 6470 {
6462 mgr->failure_code = MY_JPEG_INVALID_IMAGE_SIZE; 6471 mgr->failure_code = MY_JPEG_INVALID_IMAGE_SIZE;
6463 _longjmp (mgr->setjmp_buffer, 1); 6472 sys_longjmp (mgr->setjmp_buffer, 1);
6464 } 6473 }
6465 6474
6466 /* Create X image and pixmap. */ 6475 /* Create X image and pixmap. */
6467 if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) 6476 if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))
6468 { 6477 {
6469 mgr->failure_code = MY_JPEG_CANNOT_CREATE_X; 6478 mgr->failure_code = MY_JPEG_CANNOT_CREATE_X;
6470 _longjmp (mgr->setjmp_buffer, 1); 6479 sys_longjmp (mgr->setjmp_buffer, 1);
6471 } 6480 }
6472 6481
6473 /* Allocate colors. When color quantization is used, 6482 /* Allocate colors. When color quantization is used,
diff --git a/src/indent.c b/src/indent.c
index c60315a7f6e..053643e6319 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#include <config.h> 20#include <config.h>
21#include <stdio.h> 21#include <stdio.h>
22#include <setjmp.h>
23 22
24#include "lisp.h" 23#include "lisp.h"
25#include "character.h" 24#include "character.h"
diff --git a/src/insdel.c b/src/insdel.c
index bfb2327a696..87010cd8251 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h>
23 22
24#include <intprops.h> 23#include <intprops.h>
25 24
diff --git a/src/intervals.c b/src/intervals.c
index e508f968963..5a47cacb2dd 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -41,7 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41 41
42#define INTERVALS_INLINE EXTERN_INLINE 42#define INTERVALS_INLINE EXTERN_INLINE
43 43
44#include <setjmp.h>
45#include <intprops.h> 44#include <intprops.h>
46#include "lisp.h" 45#include "lisp.h"
47#include "intervals.h" 46#include "intervals.h"
diff --git a/src/keyboard.c b/src/keyboard.c
index 45638bc412b..d164083fb86 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -22,7 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#define KEYBOARD_INLINE EXTERN_INLINE 22#define KEYBOARD_INLINE EXTERN_INLINE
23 23
24#include <stdio.h> 24#include <stdio.h>
25#include <setjmp.h> 25
26#include "lisp.h" 26#include "lisp.h"
27#include "termchar.h" 27#include "termchar.h"
28#include "termopts.h" 28#include "termopts.h"
@@ -145,7 +145,7 @@ static ptrdiff_t before_command_echo_length;
145 145
146/* For longjmp to where kbd input is being done. */ 146/* For longjmp to where kbd input is being done. */
147 147
148static jmp_buf getcjmp; 148static sys_jmp_buf getcjmp;
149 149
150/* True while doing kbd input. */ 150/* True while doing kbd input. */
151int waiting_for_input; 151int waiting_for_input;
@@ -434,8 +434,8 @@ static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object,
434 Lisp_Object *, ptrdiff_t); 434 Lisp_Object *, ptrdiff_t);
435static Lisp_Object make_lispy_switch_frame (Lisp_Object); 435static Lisp_Object make_lispy_switch_frame (Lisp_Object);
436static int help_char_p (Lisp_Object); 436static int help_char_p (Lisp_Object);
437static void save_getcjmp (jmp_buf); 437static void save_getcjmp (sys_jmp_buf);
438static void restore_getcjmp (jmp_buf); 438static void restore_getcjmp (sys_jmp_buf);
439static Lisp_Object apply_modifiers (int, Lisp_Object); 439static Lisp_Object apply_modifiers (int, Lisp_Object);
440static void clear_event (struct input_event *); 440static void clear_event (struct input_event *);
441static Lisp_Object restore_kboard_configuration (Lisp_Object); 441static Lisp_Object restore_kboard_configuration (Lisp_Object);
@@ -2315,8 +2315,8 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2315{ 2315{
2316 volatile Lisp_Object c; 2316 volatile Lisp_Object c;
2317 ptrdiff_t jmpcount; 2317 ptrdiff_t jmpcount;
2318 jmp_buf local_getcjmp; 2318 sys_jmp_buf local_getcjmp;
2319 jmp_buf save_jump; 2319 sys_jmp_buf save_jump;
2320 volatile int key_already_recorded = 0; 2320 volatile int key_already_recorded = 0;
2321 Lisp_Object tem, save; 2321 Lisp_Object tem, save;
2322 volatile Lisp_Object previous_echo_area_message; 2322 volatile Lisp_Object previous_echo_area_message;
@@ -2562,7 +2562,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2562 it *must not* be in effect when we call redisplay. */ 2562 it *must not* be in effect when we call redisplay. */
2563 2563
2564 jmpcount = SPECPDL_INDEX (); 2564 jmpcount = SPECPDL_INDEX ();
2565 if (_setjmp (local_getcjmp)) 2565 if (sys_setjmp (local_getcjmp))
2566 { 2566 {
2567 /* Handle quits while reading the keyboard. */ 2567 /* Handle quits while reading the keyboard. */
2568 /* We must have saved the outer value of getcjmp here, 2568 /* We must have saved the outer value of getcjmp here,
@@ -3394,13 +3394,13 @@ record_char (Lisp_Object c)
3394 See read_process_output. */ 3394 See read_process_output. */
3395 3395
3396static void 3396static void
3397save_getcjmp (jmp_buf temp) 3397save_getcjmp (sys_jmp_buf temp)
3398{ 3398{
3399 memcpy (temp, getcjmp, sizeof getcjmp); 3399 memcpy (temp, getcjmp, sizeof getcjmp);
3400} 3400}
3401 3401
3402static void 3402static void
3403restore_getcjmp (jmp_buf temp) 3403restore_getcjmp (sys_jmp_buf temp)
3404{ 3404{
3405 memcpy (getcjmp, temp, sizeof getcjmp); 3405 memcpy (getcjmp, temp, sizeof getcjmp);
3406} 3406}
@@ -10979,7 +10979,7 @@ quit_throw_to_read_char (int from_signal)
10979 do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), 10979 do_switch_frame (make_lispy_switch_frame (internal_last_event_frame),
10980 0, 0, Qnil); 10980 0, 0, Qnil);
10981 10981
10982 _longjmp (getcjmp, 1); 10982 sys_longjmp (getcjmp, 1);
10983} 10983}
10984 10984
10985DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, 10985DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode,
diff --git a/src/keymap.c b/src/keymap.c
index d79ff89ed67..66fb52061f9 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -40,7 +40,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
40 40
41#include <config.h> 41#include <config.h>
42#include <stdio.h> 42#include <stdio.h>
43#include <setjmp.h> 43
44#include "lisp.h" 44#include "lisp.h"
45#include "commands.h" 45#include "commands.h"
46#include "character.h" 46#include "character.h"
diff --git a/src/lisp.h b/src/lisp.h
index ca22ca81228..447c6bd296b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#ifndef EMACS_LISP_H 20#ifndef EMACS_LISP_H
21#define EMACS_LISP_H 21#define EMACS_LISP_H
22 22
23#include <setjmp.h>
23#include <stdalign.h> 24#include <stdalign.h>
24#include <stdarg.h> 25#include <stdarg.h>
25#include <stdbool.h> 26#include <stdbool.h>
@@ -1963,7 +1964,25 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
1963 static struct Lisp_Kboard_Objfwd ko_fwd; \ 1964 static struct Lisp_Kboard_Objfwd ko_fwd; \
1964 defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ 1965 defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \
1965 } while (0) 1966 } while (0)
1966 1967
1968/* Save and restore the instruction and environment pointers,
1969 without affecting the signal mask. */
1970
1971#ifdef HAVE__SETJMP
1972typedef jmp_buf sys_jmp_buf;
1973# define sys_setjmp(j) _setjmp (j)
1974# define sys_longjmp(j, v) _longjmp (j, v)
1975#elif defined HAVE_SIGSETJMP
1976typedef sigjmp_buf sys_jmp_buf;
1977# define sys_setjmp(j) sigsetjmp (j, 0)
1978# define sys_longjmp(j, v) siglongjmp (j, v)
1979#else
1980/* A platform that uses neither _longjmp nor siglongjmp; assume
1981 longjmp does not affect the sigmask. */
1982typedef jmp_buf sys_jmp_buf;
1983# define sys_setjmp(j) setjmp (j)
1984# define sys_longjmp(j, v) longjmp (j, v)
1985#endif
1967 1986
1968 1987
1969/* Structure for recording Lisp call stack for backtrace purposes. */ 1988/* Structure for recording Lisp call stack for backtrace purposes. */
@@ -2056,7 +2075,7 @@ struct catchtag
2056 Lisp_Object volatile val; 2075 Lisp_Object volatile val;
2057 struct catchtag *volatile next; 2076 struct catchtag *volatile next;
2058 struct gcpro *gcpro; 2077 struct gcpro *gcpro;
2059 jmp_buf jmp; 2078 sys_jmp_buf jmp;
2060 struct backtrace *backlist; 2079 struct backtrace *backlist;
2061 struct handler *handlerlist; 2080 struct handler *handlerlist;
2062 EMACS_INT lisp_eval_depth; 2081 EMACS_INT lisp_eval_depth;
diff --git a/src/lread.c b/src/lread.c
index 08a2e856c00..08d5f97292b 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#include <sys/file.h> 25#include <sys/file.h>
26#include <errno.h> 26#include <errno.h>
27#include <limits.h> /* For CHAR_BIT. */ 27#include <limits.h> /* For CHAR_BIT. */
28#include <setjmp.h>
29#include <stat-time.h> 28#include <stat-time.h>
30#include "lisp.h" 29#include "lisp.h"
31#include "intervals.h" 30#include "intervals.h"
diff --git a/src/macros.c b/src/macros.c
index e81068181b9..a507f12e343 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h> 22
23#include "lisp.h" 23#include "lisp.h"
24#include "macros.h" 24#include "macros.h"
25#include "commands.h" 25#include "commands.h"
diff --git a/src/marker.c b/src/marker.c
index bfbb161a71d..0c4e8cb3b55 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -18,7 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19 19
20#include <config.h> 20#include <config.h>
21#include <setjmp.h> 21
22#include "lisp.h" 22#include "lisp.h"
23#include "character.h" 23#include "character.h"
24#include "buffer.h" 24#include "buffer.h"
diff --git a/src/menu.c b/src/menu.c
index bfdc68ca118..7b01d1faefc 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <stdio.h> 22#include <stdio.h>
23#include <setjmp.h>
24#include <limits.h> /* for INT_MAX */ 23#include <limits.h> /* for INT_MAX */
25 24
26#include "lisp.h" 25#include "lisp.h"
diff --git a/src/minibuf.c b/src/minibuf.c
index 4ed480a8408..8a1e0ddde86 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <config.h> 21#include <config.h>
22#include <errno.h> 22#include <errno.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25 24
26#include "lisp.h" 25#include "lisp.h"
27#include "commands.h" 26#include "commands.h"
diff --git a/src/nsfns.m b/src/nsfns.m
index f73086eeee9..072005d2d3d 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -31,7 +31,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
31#include <config.h> 31#include <config.h>
32 32
33#include <math.h> 33#include <math.h>
34#include <setjmp.h>
35#include <c-strcase.h> 34#include <c-strcase.h>
36 35
37#include "lisp.h" 36#include "lisp.h"
@@ -1797,19 +1796,6 @@ terminate Emacs if we can't open the connection.
1797 SSDATA (display)); 1796 SSDATA (display));
1798 } 1797 }
1799 1798
1800 /* Register our external input/output types, used for determining
1801 applicable services and also drag/drop eligibility. */
1802 ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
1803 ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil]
1804 retain];
1805 ns_drag_types = [[NSArray arrayWithObjects:
1806 NSStringPboardType,
1807 NSTabularTextPboardType,
1808 NSFilenamesPboardType,
1809 NSURLPboardType,
1810 NSColorPboardType,
1811 NSFontPboardType, nil] retain];
1812
1813 return Qnil; 1799 return Qnil;
1814} 1800}
1815 1801
diff --git a/src/nsfont.m b/src/nsfont.m
index 1c9976ec6cc..eba1eb04765 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -23,7 +23,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu)
23/* This should be the first include, as it may set up #defines affecting 23/* This should be the first include, as it may set up #defines affecting
24 interpretation of even the system includes. */ 24 interpretation of even the system includes. */
25#include <config.h> 25#include <config.h>
26#include <setjmp.h>
27 26
28#include "lisp.h" 27#include "lisp.h"
29#include "dispextern.h" 28#include "dispextern.h"
diff --git a/src/nsimage.m b/src/nsimage.m
index 8a8a3ddaae4..668664c7a20 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
28/* This should be the first include, as it may set up #defines affecting 28/* This should be the first include, as it may set up #defines affecting
29 interpretation of even the system includes. */ 29 interpretation of even the system includes. */
30#include <config.h> 30#include <config.h>
31#include <setjmp.h>
32 31
33#include "lisp.h" 32#include "lisp.h"
34#include "dispextern.h" 33#include "dispextern.h"
diff --git a/src/nsmenu.m b/src/nsmenu.m
index d0f3e45e939..3057f4f6a20 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -24,7 +24,6 @@ Carbon version by Yamamoto Mitsuharu. */
24/* This should be the first include, as it may set up #defines affecting 24/* This should be the first include, as it may set up #defines affecting
25 interpretation of even the system includes. */ 25 interpretation of even the system includes. */
26#include <config.h> 26#include <config.h>
27#include <setjmp.h>
28 27
29#include "lisp.h" 28#include "lisp.h"
30#include "window.h" 29#include "window.h"
diff --git a/src/nsselect.m b/src/nsselect.m
index e0bbfe58636..95bc1a95957 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
28/* This should be the first include, as it may set up #defines affecting 28/* This should be the first include, as it may set up #defines affecting
29 interpretation of even the system includes. */ 29 interpretation of even the system includes. */
30#include <config.h> 30#include <config.h>
31#include <setjmp.h>
32 31
33#include "lisp.h" 32#include "lisp.h"
34#include "nsterm.h" 33#include "nsterm.h"
diff --git a/src/nsterm.m b/src/nsterm.m
index f9611fd1210..41520ce74d1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -35,7 +35,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
35#include <time.h> 35#include <time.h>
36#include <signal.h> 36#include <signal.h>
37#include <unistd.h> 37#include <unistd.h>
38#include <setjmp.h>
39 38
40#include <c-ctype.h> 39#include <c-ctype.h>
41#include <c-strcase.h> 40#include <c-strcase.h>
@@ -628,7 +627,7 @@ ns_update_begin (struct frame *f)
628{ 627{
629 NSView *view = FRAME_NS_VIEW (f); 628 NSView *view = FRAME_NS_VIEW (f);
630 NSRect r = [view frame]; 629 NSRect r = [view frame];
631 NSBezierPath *bp = [NSBezierPath bezierPath]; 630 NSBezierPath *bp;
632 NSTRACE (ns_update_begin); 631 NSTRACE (ns_update_begin);
633 632
634 ns_update_auto_hide_menu_bar (); 633 ns_update_auto_hide_menu_bar ();
@@ -640,8 +639,9 @@ ns_update_begin (struct frame *f)
640 is for the minibuffer. But the display engine may draw more because 639 is for the minibuffer. But the display engine may draw more because
641 we have set the frame as garbaged. So reset clip path to the whole 640 we have set the frame as garbaged. So reset clip path to the whole
642 view. */ 641 view. */
643 [bp appendBezierPathWithRect: r]; 642 bp = [[NSBezierPath bezierPathWithRect: r] retain];
644 [bp setClip]; 643 [bp setClip];
644 [bp release];
645 645
646#ifdef NS_IMPL_GNUSTEP 646#ifdef NS_IMPL_GNUSTEP
647 uRect = NSMakeRect (0, 0, 0, 0); 647 uRect = NSMakeRect (0, 0, 0, 0);
@@ -3977,33 +3977,35 @@ ns_term_init (Lisp_Object display_name)
3977 static int ns_initialized = 0; 3977 static int ns_initialized = 0;
3978 Lisp_Object tmp; 3978 Lisp_Object tmp;
3979 3979
3980 if (ns_initialized) return x_display_list;
3981 ns_initialized = 1;
3982
3980 NSTRACE (ns_term_init); 3983 NSTRACE (ns_term_init);
3981 3984
3985 [outerpool release];
3986 outerpool = [[NSAutoreleasePool alloc] init];
3987
3982 /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */ 3988 /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */
3983 /*GSDebugAllocationActive (YES); */ 3989 /*GSDebugAllocationActive (YES); */
3984 BLOCK_INPUT; 3990 BLOCK_INPUT;
3985 handling_signal = 0; 3991 handling_signal = 0;
3986 3992
3987 if (!ns_initialized) 3993 baud_rate = 38400;
3988 { 3994 Fset_input_interrupt_mode (Qnil);
3989 baud_rate = 38400;
3990 Fset_input_interrupt_mode (Qnil);
3991 3995
3992 if (selfds[0] == -1) 3996 if (selfds[0] == -1)
3997 {
3998 if (pipe (selfds) == -1)
3993 { 3999 {
3994 if (pipe (selfds) == -1) 4000 fprintf (stderr, "Failed to create pipe: %s\n",
3995 { 4001 emacs_strerror (errno));
3996 fprintf (stderr, "Failed to create pipe: %s\n", 4002 emacs_abort ();
3997 emacs_strerror (errno));
3998 emacs_abort ();
3999 }
4000
4001 fcntl (selfds[0], F_SETFL, O_NONBLOCK|fcntl (selfds[0], F_GETFL));
4002 FD_ZERO (&select_readfds);
4003 FD_ZERO (&select_writefds);
4004 pthread_mutex_init (&select_mutex, NULL);
4005 } 4003 }
4006 ns_initialized = 1; 4004
4005 fcntl (selfds[0], F_SETFL, O_NONBLOCK|fcntl (selfds[0], F_GETFL));
4006 FD_ZERO (&select_readfds);
4007 FD_ZERO (&select_writefds);
4008 pthread_mutex_init (&select_mutex, NULL);
4007 } 4009 }
4008 4010
4009 ns_pending_files = [[NSMutableArray alloc] init]; 4011 ns_pending_files = [[NSMutableArray alloc] init];
@@ -4194,6 +4196,20 @@ ns_term_init (Lisp_Object display_name)
4194 } 4196 }
4195#endif /* MAC OS X menu setup */ 4197#endif /* MAC OS X menu setup */
4196 4198
4199 /* Register our external input/output types, used for determining
4200 applicable services and also drag/drop eligibility. */
4201 ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
4202 ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil]
4203 retain];
4204 ns_drag_types = [[NSArray arrayWithObjects:
4205 NSStringPboardType,
4206 NSTabularTextPboardType,
4207 NSFilenamesPboardType,
4208 NSURLPboardType,
4209 NSColorPboardType,
4210 NSFontPboardType, nil] retain];
4211
4212
4197 [NSApp run]; 4213 [NSApp run];
4198 ns_do_open_file = YES; 4214 ns_do_open_file = YES;
4199 return dpyinfo; 4215 return dpyinfo;
diff --git a/src/print.c b/src/print.c
index 16116643ad0..aae13bb6764 100644
--- a/src/print.c
+++ b/src/print.c
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h> 24
25#include "lisp.h" 25#include "lisp.h"
26#include "character.h" 26#include "character.h"
27#include "buffer.h" 27#include "buffer.h"
diff --git a/src/process.c b/src/process.c
index b4b05a4b2e2..6dbff6f4b16 100644
--- a/src/process.c
+++ b/src/process.c
@@ -25,12 +25,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 25
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28#include <setjmp.h>
29#include <sys/types.h> /* Some typedefs are used in sys/file.h. */ 28#include <sys/types.h> /* Some typedefs are used in sys/file.h. */
30#include <sys/file.h> 29#include <sys/file.h>
31#include <sys/stat.h> 30#include <sys/stat.h>
32#include <setjmp.h>
33
34#include <unistd.h> 31#include <unistd.h>
35#include <fcntl.h> 32#include <fcntl.h>
36 33
@@ -5421,7 +5418,7 @@ read_process_output (Lisp_Object proc, register int channel)
5421 5418
5422/* Sending data to subprocess */ 5419/* Sending data to subprocess */
5423 5420
5424static jmp_buf send_process_frame; 5421static sys_jmp_buf send_process_frame;
5425static Lisp_Object process_sent_to; 5422static Lisp_Object process_sent_to;
5426 5423
5427static _Noreturn void 5424static _Noreturn void
@@ -5431,7 +5428,7 @@ handle_pipe_signal (int sig)
5431 sigemptyset (&unblocked); 5428 sigemptyset (&unblocked);
5432 sigaddset (&unblocked, SIGPIPE); 5429 sigaddset (&unblocked, SIGPIPE);
5433 pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); 5430 pthread_sigmask (SIG_UNBLOCK, &unblocked, 0);
5434 _longjmp (send_process_frame, 1); 5431 sys_longjmp (send_process_frame, 1);
5435} 5432}
5436 5433
5437static void 5434static void
@@ -5640,7 +5637,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5640 /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, 5637 /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2,
5641 CFLAGS="-g -O": The value of the parameter `proc' is clobbered 5638 CFLAGS="-g -O": The value of the parameter `proc' is clobbered
5642 when returning with longjmp despite being declared volatile. */ 5639 when returning with longjmp despite being declared volatile. */
5643 if (!_setjmp (send_process_frame)) 5640 if (!sys_setjmp (send_process_frame))
5644 { 5641 {
5645 p = XPROCESS (proc); /* Repair any setjmp clobbering. */ 5642 p = XPROCESS (proc); /* Repair any setjmp clobbering. */
5646 process_sent_to = proc; 5643 process_sent_to = proc;
diff --git a/src/ralloc.c b/src/ralloc.c
index 74834333aa3..b0134ea730a 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -25,7 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#ifdef emacs 25#ifdef emacs
26 26
27#include <config.h> 27#include <config.h>
28#include <setjmp.h> 28
29#include "lisp.h" /* Needed for VALBITS. */ 29#include "lisp.h" /* Needed for VALBITS. */
30#include "blockinput.h" 30#include "blockinput.h"
31 31
diff --git a/src/regex.c b/src/regex.c
index 472ef727979..92264ccae23 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -126,7 +126,6 @@
126 that make sense only in Emacs. */ 126 that make sense only in Emacs. */
127#ifdef emacs 127#ifdef emacs
128 128
129# include <setjmp.h>
130# include "lisp.h" 129# include "lisp.h"
131# include "character.h" 130# include "character.h"
132# include "buffer.h" 131# include "buffer.h"
diff --git a/src/region-cache.c b/src/region-cache.c
index c3eb087aade..832f4bfd214 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25 24
26#include "lisp.h" 25#include "lisp.h"
27#include "character.h" 26#include "character.h"
diff --git a/src/scroll.c b/src/scroll.c
index 79dd464b29e..71ce43b2e48 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h> 24
25#include "lisp.h" 25#include "lisp.h"
26#include "termchar.h" 26#include "termchar.h"
27#include "dispextern.h" 27#include "dispextern.h"
diff --git a/src/search.c b/src/search.c
index 72bd5605709..99fd7971e4c 100644
--- a/src/search.c
+++ b/src/search.c
@@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21
22#include <config.h> 22#include <config.h>
23#include <setjmp.h> 23
24#include "lisp.h" 24#include "lisp.h"
25#include "syntax.h" 25#include "syntax.h"
26#include "category.h" 26#include "category.h"
diff --git a/src/sheap.c b/src/sheap.c
index 3ae14b5daec..f6022ea3ce7 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <stdio.h> 22#include <stdio.h>
23#include <setjmp.h> 23
24#include "lisp.h" 24#include "lisp.h"
25 25
26#include <unistd.h> 26#include <unistd.h>
@@ -93,4 +93,3 @@ report_sheap_usage (int die_if_pure_storage_exceeded)
93 bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); 93 bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE);
94 message ("%s", buf); 94 message ("%s", buf);
95} 95}
96
diff --git a/src/sound.c b/src/sound.c
index fe48bb277b2..0ee85312fd3 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -44,7 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
44#include <unistd.h> 44#include <unistd.h>
45#include <sys/types.h> 45#include <sys/types.h>
46#include <errno.h> 46#include <errno.h>
47#include <setjmp.h> 47
48#include "lisp.h" 48#include "lisp.h"
49#include "dispextern.h" 49#include "dispextern.h"
50#include "atimer.h" 50#include "atimer.h"
diff --git a/src/syntax.c b/src/syntax.c
index fdd9353bb87..91ef4e66663 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <config.h> 21#include <config.h>
22 22
23#include <sys/types.h> 23#include <sys/types.h>
24#include <setjmp.h> 24
25#include "lisp.h" 25#include "lisp.h"
26#include "commands.h" 26#include "commands.h"
27#include "character.h" 27#include "character.h"
diff --git a/src/sysdep.c b/src/sysdep.c
index b8f35e79146..9065b38d6fc 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 23
24#include <execinfo.h> 24#include <execinfo.h>
25#include <stdio.h> 25#include <stdio.h>
26#include <setjmp.h>
27#ifdef HAVE_PWD_H 26#ifdef HAVE_PWD_H
28#include <pwd.h> 27#include <pwd.h>
29#include <grp.h> 28#include <grp.h>
diff --git a/src/term.c b/src/term.c
index 47bde5ac240..f4117d67dec 100644
--- a/src/term.c
+++ b/src/term.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#include <sys/file.h> 25#include <sys/file.h>
26#include <sys/time.h> 26#include <sys/time.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <setjmp.h>
29 28
30#include "lisp.h" 29#include "lisp.h"
31#include "termchar.h" 30#include "termchar.h"
diff --git a/src/termcap.c b/src/termcap.c
index d1b05e8df94..e494cd113d9 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -19,7 +19,6 @@ Boston, MA 02110-1301, USA. */
19 19
20/* Emacs config.h may rename various library functions such as malloc. */ 20/* Emacs config.h may rename various library functions such as malloc. */
21#include <config.h> 21#include <config.h>
22#include <setjmp.h>
23#include <sys/file.h> 22#include <sys/file.h>
24#include <fcntl.h> 23#include <fcntl.h>
25#include <unistd.h> 24#include <unistd.h>
diff --git a/src/terminal.c b/src/terminal.c
index c51a18dfa61..719c2a36111 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#define TERMHOOKS_INLINE EXTERN_INLINE 21#define TERMHOOKS_INLINE EXTERN_INLINE
22 22
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25 24
26#include "lisp.h" 25#include "lisp.h"
27#include "frame.h" 26#include "frame.h"
diff --git a/src/terminfo.c b/src/terminfo.c
index ca2d89a000b..124c452a4a9 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19#include <config.h> 19#include <config.h>
20#include "tparam.h" 20#include "tparam.h"
21 21
22#include <setjmp.h>
23#include "lisp.h" 22#include "lisp.h"
24 23
25/* Define these variables that serve as global parameters to termcap, 24/* Define these variables that serve as global parameters to termcap,
diff --git a/src/textprop.c b/src/textprop.c
index 2a9efba1c45..872912ea706 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#include <config.h> 19#include <config.h>
20#include <setjmp.h> 20
21#include "lisp.h" 21#include "lisp.h"
22#include "intervals.h" 22#include "intervals.h"
23#include "character.h" 23#include "character.h"
diff --git a/src/tparam.c b/src/tparam.c
index 58a825c90d7..164f61d471b 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */
19 19
20/* Emacs config.h may rename various library functions such as malloc. */ 20/* Emacs config.h may rename various library functions such as malloc. */
21#include <config.h> 21#include <config.h>
22#include <setjmp.h> 22
23#include "lisp.h" /* for xmalloc */ 23#include "lisp.h" /* for xmalloc */
24#include "tparam.h" 24#include "tparam.h"
25 25
diff --git a/src/undo.c b/src/undo.c
index 9cd1d5f9f67..e878ef4dcf9 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -18,7 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19 19
20#include <config.h> 20#include <config.h>
21#include <setjmp.h> 21
22#include "lisp.h" 22#include "lisp.h"
23#include "character.h" 23#include "character.h"
24#include "buffer.h" 24#include "buffer.h"
diff --git a/src/unexaix.c b/src/unexaix.c
index c09156296f7..c01a22a79f6 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -89,7 +89,6 @@ static int adjust_lnnoptrs (int, int, const char *);
89 89
90static int pagemask; 90static int pagemask;
91 91
92#include <setjmp.h>
93#include "lisp.h" 92#include "lisp.h"
94 93
95static void 94static void
diff --git a/src/unexcoff.c b/src/unexcoff.c
index e83042a379d..966dd58cb6e 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -120,7 +120,6 @@ static int pagemask;
120 120
121#define ADDR_CORRECT(x) ((char *)(x) - (char*)0) 121#define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
122 122
123#include <setjmp.h>
124#include "lisp.h" 123#include "lisp.h"
125 124
126static void 125static void
diff --git a/src/unexcw.c b/src/unexcw.c
index eae534cf4dd..96c4b4a9aec 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <config.h> 21#include <config.h>
22#include "unexec.h" 22#include "unexec.h"
23 23
24#include <setjmp.h>
25#include <lisp.h> 24#include <lisp.h>
26#include <stdio.h> 25#include <stdio.h>
27#include <fcntl.h> 26#include <fcntl.h>
diff --git a/src/unexsol.c b/src/unexsol.c
index 336f3b4faea..470206d5838 100644
--- a/src/unexsol.c
+++ b/src/unexsol.c
@@ -4,7 +4,6 @@
4#include "unexec.h" 4#include "unexec.h"
5 5
6#include <dlfcn.h> 6#include <dlfcn.h>
7#include <setjmp.h>
8 7
9#include "lisp.h" 8#include "lisp.h"
10#include "character.h" 9#include "character.h"
diff --git a/src/vm-limit.c b/src/vm-limit.c
index cf697b56fdf..8de0acd1bb2 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#include <config.h> 19#include <config.h>
20#include <setjmp.h>
21#include <unistd.h> /* for 'environ', on AIX */ 20#include <unistd.h> /* for 'environ', on AIX */
22#include "lisp.h" 21#include "lisp.h"
23#include "mem-limits.h" 22#include "mem-limits.h"
diff --git a/src/w16select.c b/src/w16select.c
index 2026de7421d..a3f6f1fb9ae 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -31,7 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31#include <dpmi.h> 31#include <dpmi.h>
32#include <go32.h> 32#include <go32.h>
33#include <sys/farptr.h> 33#include <sys/farptr.h>
34#include <setjmp.h>
35#include "lisp.h" 34#include "lisp.h"
36#include "dispextern.h" /* frame.h seems to want this */ 35#include "dispextern.h" /* frame.h seems to want this */
37#include "frame.h" /* Need this to get the X window of selected_frame */ 36#include "frame.h" /* Need this to get the X window of selected_frame */
diff --git a/src/w32.c b/src/w32.c
index 04f7471577c..bcb0511e2fa 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
33#include <sys/utime.h> 33#include <sys/utime.h>
34#include <mbstring.h> /* for _mbspbrk */ 34#include <mbstring.h> /* for _mbspbrk */
35#include <math.h> 35#include <math.h>
36#include <setjmp.h>
37#include <time.h> 36#include <time.h>
38 37
39/* must include CRT headers *before* config.h */ 38/* must include CRT headers *before* config.h */
diff --git a/src/w32console.c b/src/w32console.c
index 76585851e7f..b22b09af2f2 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26 26
27#include <stdio.h> 27#include <stdio.h>
28#include <windows.h> 28#include <windows.h>
29#include <setjmp.h>
30 29
31#include "lisp.h" 30#include "lisp.h"
32#include "character.h" 31#include "character.h"
diff --git a/src/w32fns.c b/src/w32fns.c
index ec1acbd89d9..be008bb18c8 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include <limits.h> 26#include <limits.h>
27#include <errno.h> 27#include <errno.h>
28#include <math.h> 28#include <math.h>
29#include <setjmp.h>
30 29
31#include "lisp.h" 30#include "lisp.h"
32#include "w32term.h" 31#include "w32term.h"
diff --git a/src/w32font.c b/src/w32font.c
index 8b3a0e4312e..833b7cdfb25 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <math.h> 21#include <math.h>
22#include <ctype.h> 22#include <ctype.h>
23#include <commdlg.h> 23#include <commdlg.h>
24#include <setjmp.h>
25 24
26#include "lisp.h" 25#include "lisp.h"
27#include "w32term.h" 26#include "w32term.h"
diff --git a/src/w32heap.c b/src/w32heap.c
index 26cc9aa0a0f..dc65198f90b 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23#include <config.h> 23#include <config.h>
24#include <stdio.h> 24#include <stdio.h>
25#include <setjmp.h>
26 25
27#include "w32heap.h" 26#include "w32heap.h"
28#include "lisp.h" /* for VALMASK */ 27#include "lisp.h" /* for VALMASK */
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 731dd6715dc..ee07db5335b 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#include <config.h> 25#include <config.h>
26#include <stdio.h> 26#include <stdio.h>
27#include <windows.h> 27#include <windows.h>
28#include <setjmp.h>
29 28
30#ifndef MOUSE_MOVED 29#ifndef MOUSE_MOVED
31#define MOUSE_MOVED 1 30#define MOUSE_MOVED 1
diff --git a/src/w32menu.c b/src/w32menu.c
index d4de73a0de7..fa7db64f147 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#include <signal.h> 22#include <signal.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <mbstring.h> 24#include <mbstring.h>
25#include <setjmp.h>
26 25
27#include "lisp.h" 26#include "lisp.h"
28#include "keyboard.h" 27#include "keyboard.h"
diff --git a/src/w32proc.c b/src/w32proc.c
index 74427e76a4f..26a0925ad87 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28#include <fcntl.h> 28#include <fcntl.h>
29#include <signal.h> 29#include <signal.h>
30#include <sys/file.h> 30#include <sys/file.h>
31#include <setjmp.h>
32 31
33/* must include CRT headers *before* config.h */ 32/* must include CRT headers *before* config.h */
34#include <config.h> 33#include <config.h>
diff --git a/src/w32reg.c b/src/w32reg.c
index 9c727ae5ab7..8a6a3c853b1 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19/* Written by Kevin Gallo */ 19/* Written by Kevin Gallo */
20 20
21#include <config.h> 21#include <config.h>
22#include <setjmp.h>
23#include "lisp.h" 22#include "lisp.h"
24#include "w32term.h" 23#include "w32term.h"
25#include "blockinput.h" 24#include "blockinput.h"
diff --git a/src/w32select.c b/src/w32select.c
index 3fb88d4f17f..11c68c9c617 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -73,7 +73,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
73 */ 73 */
74 74
75#include <config.h> 75#include <config.h>
76#include <setjmp.h>
77#include "lisp.h" 76#include "lisp.h"
78#include "w32term.h" /* for all of the w32 includes */ 77#include "w32term.h" /* for all of the w32 includes */
79#include "w32heap.h" /* os_subtype */ 78#include "w32heap.h" /* os_subtype */
diff --git a/src/w32term.c b/src/w32term.c
index 28c1c593cf6..69a16e1852b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#include <config.h> 20#include <config.h>
21#include <signal.h> 21#include <signal.h>
22#include <stdio.h> 22#include <stdio.h>
23#include <setjmp.h>
24#include "lisp.h" 23#include "lisp.h"
25#include "blockinput.h" 24#include "blockinput.h"
26#include "w32term.h" 25#include "w32term.h"
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index cf99d14dc77..5d160b9d42f 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -27,7 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#define _WIN32_WINNT 0x500 27#define _WIN32_WINNT 0x500
28#include <windows.h> 28#include <windows.h>
29#include <usp10.h> 29#include <usp10.h>
30#include <setjmp.h>
31 30
32#include "lisp.h" 31#include "lisp.h"
33#include "w32term.h" 32#include "w32term.h"
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 820dbcc76c6..33f40fc7c01 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19#include <config.h> 19#include <config.h>
20#include <signal.h> 20#include <signal.h>
21#include <stdio.h> 21#include <stdio.h>
22#include <setjmp.h>
23#include "lisp.h" 22#include "lisp.h"
24#include "keyboard.h" 23#include "keyboard.h"
25#include "frame.h" 24#include "frame.h"
diff --git a/src/widget.c b/src/widget.c
index 0100acc8143..fd5ad167125 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30 30
31#include <config.h> 31#include <config.h>
32#include <stdio.h> 32#include <stdio.h>
33#include <setjmp.h> 33
34#include "lisp.h" 34#include "lisp.h"
35#include "xterm.h" 35#include "xterm.h"
36 36
diff --git a/src/window.c b/src/window.c
index 18a550782e8..fbccab8b358 100644
--- a/src/window.c
+++ b/src/window.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#define WINDOW_INLINE EXTERN_INLINE 23#define WINDOW_INLINE EXTERN_INLINE
24 24
25#include <stdio.h> 25#include <stdio.h>
26#include <setjmp.h>
27 26
28#include "lisp.h" 27#include "lisp.h"
29#include "character.h" 28#include "character.h"
@@ -1856,23 +1855,23 @@ return value is a list of elements of the form (PARAMETER . VALUE). */)
1856DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, 1855DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter,
1857 2, 2, 0, 1856 2, 2, 0,
1858 doc: /* Return WINDOW's value for PARAMETER. 1857 doc: /* Return WINDOW's value for PARAMETER.
1859WINDOW must be a valid window and defaults to the selected one. */) 1858WINDOW can be any window and defaults to the selected one. */)
1860 (Lisp_Object window, Lisp_Object parameter) 1859 (Lisp_Object window, Lisp_Object parameter)
1861{ 1860{
1862 Lisp_Object result; 1861 Lisp_Object result;
1863 1862
1864 result = Fassq (parameter, decode_valid_window (window)->window_parameters); 1863 result = Fassq (parameter, decode_any_window (window)->window_parameters);
1865 return CDR_SAFE (result); 1864 return CDR_SAFE (result);
1866} 1865}
1867 1866
1868DEFUN ("set-window-parameter", Fset_window_parameter, 1867DEFUN ("set-window-parameter", Fset_window_parameter,
1869 Sset_window_parameter, 3, 3, 0, 1868 Sset_window_parameter, 3, 3, 0,
1870 doc: /* Set WINDOW's value of PARAMETER to VALUE. 1869 doc: /* Set WINDOW's value of PARAMETER to VALUE.
1871WINDOW must be a valid window and defaults to the selected one. 1870WINDOW can be any window and defaults to the selected one.
1872Return VALUE. */) 1871Return VALUE. */)
1873 (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) 1872 (Lisp_Object window, Lisp_Object parameter, Lisp_Object value)
1874{ 1873{
1875 register struct window *w = decode_valid_window (window); 1874 register struct window *w = decode_any_window (window);
1876 Lisp_Object old_alist_elt; 1875 Lisp_Object old_alist_elt;
1877 1876
1878 old_alist_elt = Fassq (parameter, w->window_parameters); 1877 old_alist_elt = Fassq (parameter, w->window_parameters);
diff --git a/src/xdisp.c b/src/xdisp.c
index 320998a5713..8e0975cf65a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -273,7 +273,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
273#include <config.h> 273#include <config.h>
274#include <stdio.h> 274#include <stdio.h>
275#include <limits.h> 275#include <limits.h>
276#include <setjmp.h>
277 276
278#include "lisp.h" 277#include "lisp.h"
279#include "keyboard.h" 278#include "keyboard.h"
diff --git a/src/xfaces.c b/src/xfaces.c
index c113c1a37b7..c240a05c6c0 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -204,7 +204,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
204#include <sys/types.h> 204#include <sys/types.h>
205#include <sys/stat.h> 205#include <sys/stat.h>
206#include <stdio.h> /* This needs to be before termchar.h */ 206#include <stdio.h> /* This needs to be before termchar.h */
207#include <setjmp.h>
208 207
209#include "lisp.h" 208#include "lisp.h"
210#include "character.h" 209#include "character.h"
diff --git a/src/xfns.c b/src/xfns.c
index 90b54d12345..8304a3df04f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#include <config.h> 20#include <config.h>
21#include <stdio.h> 21#include <stdio.h>
22#include <math.h> 22#include <math.h>
23#include <setjmp.h>
24#include <unistd.h> 23#include <unistd.h>
25 24
26/* This makes the fields of a Display accessible, in Xlib header files. */ 25/* This makes the fields of a Display accessible, in Xlib header files. */
diff --git a/src/xfont.c b/src/xfont.c
index 7755b780815..1f2fd13f1b7 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25#include <X11/Xlib.h> 24#include <X11/Xlib.h>
26 25
27#include "lisp.h" 26#include "lisp.h"
diff --git a/src/xftfont.c b/src/xftfont.c
index 404b9124099..9f52eb8b233 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25#include <X11/Xlib.h> 24#include <X11/Xlib.h>
26#include <X11/Xft/Xft.h> 25#include <X11/Xft/Xft.h>
27 26
diff --git a/src/xgselect.c b/src/xgselect.c
index 5f4c7edfb79..c161564a322 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -19,14 +19,12 @@ along with GNU Emacs. If not, see <http§://www.gnu.org/licenses/>. */
19 19
20#include <config.h> 20#include <config.h>
21 21
22#include <setjmp.h>
23#include "xgselect.h" 22#include "xgselect.h"
24 23
25#if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) 24#if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS)
26 25
27#include <glib.h> 26#include <glib.h>
28#include <errno.h> 27#include <errno.h>
29#include <setjmp.h>
30#include "xterm.h" 28#include "xterm.h"
31 29
32int 30int
diff --git a/src/xmenu.c b/src/xmenu.c
index 605db13e149..d03a4bc974b 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
33#include <config.h> 33#include <config.h>
34 34
35#include <stdio.h> 35#include <stdio.h>
36#include <setjmp.h>
37 36
38#include "lisp.h" 37#include "lisp.h"
39#include "keyboard.h" 38#include "keyboard.h"
diff --git a/src/xml.c b/src/xml.c
index 7bc6130b8b1..b668525cf26 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#ifdef HAVE_LIBXML2 21#ifdef HAVE_LIBXML2
22 22
23#include <setjmp.h>
24#include <libxml/tree.h> 23#include <libxml/tree.h>
25#include <libxml/parser.h> 24#include <libxml/parser.h>
26#include <libxml/HTMLparser.h> 25#include <libxml/HTMLparser.h>
diff --git a/src/xrdb.c b/src/xrdb.c
index 624bafa5e92..73672c9617c 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include <epaths.h> 26#include <epaths.h>
27 27
28#include <stdio.h> 28#include <stdio.h>
29#include <setjmp.h>
30 29
31#include "lisp.h" 30#include "lisp.h"
32 31
diff --git a/src/xselect.c b/src/xselect.c
index 5a3b7452c6d..ab199e0b9b9 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#include <config.h> 22#include <config.h>
23#include <limits.h> 23#include <limits.h>
24#include <stdio.h> /* termhooks.h needs this */ 24#include <stdio.h> /* termhooks.h needs this */
25#include <setjmp.h>
26 25
27#ifdef HAVE_SYS_TYPES_H 26#ifdef HAVE_SYS_TYPES_H
28#include <sys/types.h> 27#include <sys/types.h>
diff --git a/src/xsettings.c b/src/xsettings.c
index a28d75d9422..58c84495489 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 21
22#include <float.h> 22#include <float.h>
23#include <limits.h> 23#include <limits.h>
24#include <setjmp.h>
25#include <fcntl.h> 24#include <fcntl.h>
26#include "lisp.h" 25#include "lisp.h"
27#include "xterm.h" 26#include "xterm.h"
@@ -711,12 +710,12 @@ apply_xft_settings (struct x_display_info *dpyinfo,
711 if (send_event_p) 710 if (send_event_p)
712 store_config_changed_event (Qfont_render, 711 store_config_changed_event (Qfont_render,
713 XCAR (dpyinfo->name_list_element)); 712 XCAR (dpyinfo->name_list_element));
714 Vxft_settings 713 Vxft_settings
715 = make_formatted_string (buf, format, 714 = make_formatted_string (buf, format,
716 oldsettings.aa, oldsettings.hinting, 715 oldsettings.aa, oldsettings.hinting,
717 oldsettings.rgba, oldsettings.lcdfilter, 716 oldsettings.rgba, oldsettings.lcdfilter,
718 oldsettings.hintstyle, oldsettings.dpi); 717 oldsettings.hintstyle, oldsettings.dpi);
719 718
720 } 719 }
721 else 720 else
722 FcPatternDestroy (pat); 721 FcPatternDestroy (pat);
diff --git a/src/xsmfns.c b/src/xsmfns.c
index cddbb2aae86..8067899f931 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -29,7 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29#include <unistd.h> 29#include <unistd.h>
30#include <sys/param.h> 30#include <sys/param.h>
31#include <stdio.h> 31#include <stdio.h>
32#include <setjmp.h>
33 32
34#include "lisp.h" 33#include "lisp.h"
35#include "systime.h" 34#include "systime.h"
diff --git a/src/xterm.c b/src/xterm.c
index 54d4f14bdd0..900a1d78b80 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23#include <config.h> 23#include <config.h>
24#include <stdio.h> 24#include <stdio.h>
25#include <setjmp.h>
26 25
27#ifdef HAVE_X_WINDOWS 26#ifdef HAVE_X_WINDOWS
28 27
@@ -47,7 +46,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
47 46
48#include <fcntl.h> 47#include <fcntl.h>
49#include <errno.h> 48#include <errno.h>
50#include <setjmp.h>
51#include <sys/stat.h> 49#include <sys/stat.h>
52/* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed. */ 50/* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed. */
53/* #include <sys/param.h> */ 51/* #include <sys/param.h> */