aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-07-10 23:05:57 -0700
committerPaul Eggert <[email protected]>2011-07-10 23:05:57 -0700
commitda85a02af7585384008d3ebec836a7b8571f175d (patch)
treee6d4f34119ea1c45985eaed207ef6b47f650ea93
parent7f5515125fbc9b46454e1f84b7e3052a0a5326f0 (diff)
parent4d45a8b7a237e1d33d0ae71d95a0ed7165ea6cda (diff)
Merge from trunk.
-rw-r--r--ChangeLog13
-rw-r--r--autogen/Makefile.in90
-rw-r--r--autogen/aclocal.m45
-rw-r--r--autogen/config.in20
-rwxr-xr-xautogen/configure4174
-rw-r--r--doc/emacs/ChangeLog51
-rw-r--r--doc/emacs/Makefile.in2
-rw-r--r--doc/emacs/ack.texi18
-rw-r--r--doc/emacs/cmdargs.texi9
-rw-r--r--doc/emacs/custom.texi183
-rw-r--r--doc/emacs/emacs.texi53
-rw-r--r--doc/emacs/frames.texi181
-rw-r--r--doc/emacs/glossary.texi5
-rw-r--r--doc/emacs/help.texi10
-rw-r--r--doc/emacs/indent.texi2
-rw-r--r--doc/emacs/killing.texi339
-rw-r--r--doc/emacs/major.texi237
-rw-r--r--doc/emacs/makefile.w32-in2
-rw-r--r--doc/emacs/misc.texi4
-rw-r--r--doc/emacs/modes.texi410
-rw-r--r--doc/emacs/mule.texi2
-rw-r--r--doc/emacs/programs.texi5
-rw-r--r--doc/emacs/screen.texi2
-rw-r--r--doc/emacs/search.texi13
-rw-r--r--doc/emacs/text.texi95
-rw-r--r--doc/lispref/ChangeLog8
-rw-r--r--doc/lispref/modes.texi9
-rw-r--r--doc/lispref/text.texi15
-rw-r--r--etc/ChangeLog6
-rw-r--r--etc/MH-E-NEWS19
-rw-r--r--etc/NEWS4
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/update-game-score.c5
-rw-r--r--lib/stdint.in.h96
-rw-r--r--lisp/ChangeLog58
-rw-r--r--lisp/emulation/viper-cmd.el5
-rw-r--r--lisp/faces.el2
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-group.el8
-rw-r--r--lisp/mh-e/ChangeLog30
-rw-r--r--lisp/mh-e/mh-comp.el2
-rw-r--r--lisp/mh-e/mh-e.el6
-rw-r--r--lisp/mh-e/mh-folder.el8
-rw-r--r--lisp/mh-e/mh-funcs.el2
-rw-r--r--lisp/mh-e/mh-mime.el2
-rw-r--r--lisp/mh-e/mh-search.el4
-rw-r--r--lisp/mh-e/mh-speed.el8
-rw-r--r--lisp/mh-e/mh-utils.el1
-rw-r--r--lisp/mh-e/mh-xface.el9
-rw-r--r--lisp/startup.el183
-rw-r--r--lisp/tool-bar.el3
-rw-r--r--lisp/vc/vc.el7
-rw-r--r--lisp/window.el496
-rw-r--r--m4/pthread_sigmask.m452
-rw-r--r--src/ChangeLog68
-rw-r--r--src/alloc.c2
-rw-r--r--src/buffer.c115
-rw-r--r--src/chartab.c8
-rw-r--r--src/cm.c3
-rw-r--r--src/composite.c1
-rw-r--r--src/data.c3
-rw-r--r--src/dispnew.c3
-rw-r--r--src/emacs.c3
-rw-r--r--src/floatfns.c3
-rw-r--r--src/font.c29
-rw-r--r--src/gtkutil.c1
-rw-r--r--src/image.c4
-rw-r--r--src/indent.c3
-rw-r--r--src/intervals.c24
-rw-r--r--src/lread.c4
-rw-r--r--src/ralloc.c2
-rw-r--r--src/regex.c17
-rw-r--r--src/sysdep.c3
-rw-r--r--src/termcap.c50
-rw-r--r--src/tparam.c5
-rw-r--r--src/unexhp9k800.c172
-rw-r--r--src/w32.c8
-rw-r--r--src/widget.c6
-rw-r--r--src/xdisp.c5
-rw-r--r--src/xfaces.c10
-rw-r--r--src/xfns.c7
-rw-r--r--src/xmenu.c11
-rw-r--r--src/xrdb.c23
83 files changed, 4085 insertions, 3492 deletions
diff --git a/ChangeLog b/ChangeLog
index 09d1f9873d..616c345d7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2011-07-09 Paul Eggert <[email protected]>
+2011-07-11 Paul Eggert <[email protected]>
Assume freestanding C89 headers, string.h, stdlib.h.
Again, this simplifies the code, and all current platforms have these.
@@ -15,6 +15,17 @@
2011-07-09 Paul Eggert <[email protected]>
+ * lib/stdint.in.h: Merge from gnulib (Bug#9025).
+ This fixes a build problem on older Mac OS X hosts.
+
+ * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Omit gl_THREADLIB
+ test, which runs afoul of Automake installations where, for example,
+ /usr/share/aclocal contains a copy of gl_THREADLIB.
+ Problem reported by Sven Joachim in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00529.html>.
+ This is just a quick temporary fix, specific to Emacs; I'll work
+ with the other gnulib maintainers to get a more-permanent fix.
+
Add gnulib's strtoimax module, needed on Solaris 8.
* Makefile.in (GNULIB_MODULES): Add strtoimax.
* lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files,
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index fd93b0146a..3348d3a4c0 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -24,7 +24,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@@ -59,14 +59,18 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \
- $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/readlink.m4 \
- $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sha256.m4 \
- $(top_srcdir)/m4/sha512.m4 $(top_srcdir)/m4/socklen.m4 \
+ $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/pthread_sigmask.m4 \
+ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \
+ $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
+ $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \
$(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdarg.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \
+ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
@@ -244,6 +248,7 @@ GNULIB_POPEN = @GNULIB_POPEN@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
@@ -263,6 +268,9 @@ GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
GNULIB_SCANF = @GNULIB_SCANF@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
@@ -384,7 +392,9 @@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
@@ -395,9 +405,13 @@ HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
HAVE_RPMATCH = @HAVE_RPMATCH@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STRPTIME = @HAVE_STRPTIME@
@@ -405,6 +419,7 @@ HAVE_STRTOD = @HAVE_STRTOD@
HAVE_STRTOLL = @HAVE_STRTOLL@
HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
@@ -413,6 +428,7 @@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@@ -479,6 +495,7 @@ LIBXT_OTHER = @LIBXT_OTHER@
LIBX_OTHER = @LIBX_OTHER@
LIB_GCC = @LIB_GCC@
LIB_MATH = @LIB_MATH@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
LIB_STANDARD = @LIB_STANDARD@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
@@ -491,6 +508,7 @@ MKDIR_P = @MKDIR_P@
M_FILE = @M_FILE@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
@@ -501,6 +519,7 @@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
@@ -584,6 +603,7 @@ REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READ = @REPLACE_READ@
@@ -739,25 +759,29 @@ x_default_search_path = @x_default_search_path@
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(GETOPT_H) \
- inttypes.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \
- stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h
+ inttypes.h signal.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) \
+ $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h unistd.h \
+ warn-on-use.h
EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \
$(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \
sha512.h dosname.h ftoastr.c ftoastr.h dup2.c filemode.h \
getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \
ignore-value.h intprops.h inttypes.in.h lstat.c \
- mktime-internal.h mktime.c readlink.c stat.c stdarg.in.h \
- stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
- strftime.h strtol.c strtoul.c strtoull.c strtoimax.c \
- strtoumax.c symlink.c sys_stat.in.h time.in.h time_r.c u64.h \
- unistd.in.h verify.h $(top_srcdir)/./warn-on-use.h
+ mktime-internal.h mktime.c pthread_sigmask.c readlink.c \
+ signal.in.h sigprocmask.c stat.c stdarg.in.h stdbool.in.h \
+ stddef.in.h stdint.in.h stdio.in.h stdlib.in.h strftime.h \
+ strtoimax.c strtol.c strtoll.c strtol.c strtoul.c strtoull.c \
+ strtoimax.c strtoumax.c symlink.c sys_stat.in.h time.in.h \
+ time_r.c u64.h unistd.in.h verify.h \
+ $(top_srcdir)/./warn-on-use.h
MOSTLYCLEANDIRS = sys
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \
- inttypes.h inttypes.h-t stdarg.h stdarg.h-t stdbool.h \
- stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \
- stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \
- time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t
+ inttypes.h inttypes.h-t signal.h signal.h-t stdarg.h \
+ stdarg.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \
+ stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t sys/stat.h \
+ sys/stat.h-t time.h time.h-t unistd.h unistd.h-t warn-on-use.h \
+ warn-on-use.h-t
noinst_LIBRARIES = libgnu.a
DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src
libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \
@@ -765,7 +789,8 @@ libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \
libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \
- getopt1.c lstat.c mktime.c readlink.c stat.c strtol.c \
+ getopt1.c lstat.c mktime.c pthread_sigmask.c readlink.c \
+ sigprocmask.c stat.c strtoimax.c strtol.c strtoll.c strtol.c \
strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \
time_r.c
ARG_NONNULL_H = arg-nonnull.h
@@ -832,14 +857,17 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pthread_sigmask.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@
@@ -1137,6 +1165,36 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_N
} > $@-t && \
mv $@-t $@
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+ -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/signal.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
# We need the following in order to create <stdarg.h> when the system
# doesn't have one that works with the given compiler.
@[email protected]: stdarg.in.h $(top_builddir)/config.status
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4
index 8c0a25eba1..90ed7c0a99 100644
--- a/autogen/aclocal.m4
+++ b/autogen/aclocal.m4
@@ -1001,10 +1001,13 @@ m4_include([m4/lstat.m4])
m4_include([m4/md5.m4])
m4_include([m4/mktime.m4])
m4_include([m4/multiarch.m4])
+m4_include([m4/pthread_sigmask.m4])
m4_include([m4/readlink.m4])
m4_include([m4/sha1.m4])
m4_include([m4/sha256.m4])
m4_include([m4/sha512.m4])
+m4_include([m4/signal_h.m4])
+m4_include([m4/signalblocking.m4])
m4_include([m4/socklen.m4])
m4_include([m4/ssize_t.m4])
m4_include([m4/st_dm_mode.m4])
@@ -1016,6 +1019,8 @@ m4_include([m4/stdint.m4])
m4_include([m4/stdio_h.m4])
m4_include([m4/stdlib_h.m4])
m4_include([m4/strftime.m4])
+m4_include([m4/strtoimax.m4])
+m4_include([m4/strtoll.m4])
m4_include([m4/strtoull.m4])
m4_include([m4/strtoumax.m4])
m4_include([m4/symlink.m4])
diff --git a/autogen/config.in b/autogen/config.in
index 051c0ea26e..e7764e1ae2 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -160,6 +160,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
don't. */
#undef HAVE_DECL_STRMODE
+/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRTOIMAX
+
+/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRTOLL
+
/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
don't. */
#undef HAVE_DECL_STRTOULL
@@ -592,6 +600,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
+/* Define to 1 if you have the `pthread_sigmask' function. */
+#undef HAVE_PTHREAD_SIGMASK
+
/* Define to 1 if you have the <pty.h> header file. */
#undef HAVE_PTY_H
@@ -661,6 +672,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if 'wint_t' is a signed integer type. */
#undef HAVE_SIGNED_WINT_T
+/* Define to 1 if the system has the type `sigset_t'. */
+#undef HAVE_SIGSET_T
+
/* Define to 1 if you have sound support. */
#undef HAVE_SOUND
@@ -697,6 +711,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
+/* Define to 1 if you have the `strtoimax' function. */
+#undef HAVE_STRTOIMAX
+
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
/* Define to 1 if you have the `strtoull' function. */
#undef HAVE_STRTOULL
diff --git a/autogen/configure b/autogen/configure
index 10bdf24c3a..60ef873e39 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -607,55 +607,6 @@ SUBDIR_MAKEFILES_IN
LIB_GCC
LD_FIRSTFLAG
LD_SWITCH_SYSTEM_TEMACS
-POST_ALLOC_OBJ
-PRE_ALLOC_OBJ
-CYGWIN_OBJ
-RALLOC_OBJ
-OLDXMENU_DEPS
-LIBX_OTHER
-LIBXMENU
-OLDXMENU
-OLDXMENU_TARGET
-LIBXT_OTHER
-TOOLKIT_LIBW
-WIDGET_OBJ
-XOBJ
-XMENU_OBJ
-FONT_OBJ
-OTHER_FILES
-GNU_OBJC_CFLAGS
-ns_appsrc
-ns_appresdir
-ns_appbindir
-ns_appdir
-S_FILE
-M_FILE
-X_TOOLKIT_TYPE
-C_SWITCH_X_SYSTEM
-C_SWITCH_X_SITE
-LD_SWITCH_X_SITE
-gameuser
-gamedir
-bitmapdir
-archlibdir
-etcdir
-x_default_search_path
-lisppath
-locallisppath
-lispdir
-srcdir
-canonical
-configuration
-version
-KRB4LIB
-DESLIB
-KRB5LIB
-CRYPTOLIB
-COM_ERRLIB
-LIBRESOLV
-LIBHESIOD
-TERMCAP_OBJ
-LIBS_TERMCAP
LIBGNU_LTLIBDEPS
LIBGNU_LIBDEPS
gltests_WITNESS
@@ -663,8 +614,12 @@ gl_GNULIB_ENABLED_verify_FALSE
gl_GNULIB_ENABLED_verify_TRUE
gl_GNULIB_ENABLED_strtoull_FALSE
gl_GNULIB_ENABLED_strtoull_TRUE
+gl_GNULIB_ENABLED_strtoll_FALSE
+gl_GNULIB_ENABLED_strtoll_TRUE
gl_GNULIB_ENABLED_stat_FALSE
gl_GNULIB_ENABLED_stat_TRUE
+gl_GNULIB_ENABLED_sigprocmask_FALSE
+gl_GNULIB_ENABLED_sigprocmask_TRUE
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
gl_GNULIB_ENABLED_dosname_FALSE
@@ -798,6 +753,22 @@ GL_GENERATE_STDARG_H_TRUE
STDARG_H
NEXT_AS_FIRST_DIRECTIVE_STDARG_H
NEXT_STDARG_H
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
+NEXT_SIGNAL_H
+REPLACE_PTHREAD_SIGMASK
+HAVE_SIGHANDLER_T
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
+HAVE_STRUCT_SIGACTION_SA_SIGACTION
+HAVE_SIGACTION
+HAVE_SIGINFO_T
+HAVE_SIGSET_T
+HAVE_PTHREAD_SIGMASK
+HAVE_POSIX_SIGNALBLOCKING
+GNULIB_SIGACTION
+GNULIB_SIGPROCMASK
+GNULIB_SIGNAL_H_SIGPIPE
+GNULIB_PTHREAD_SIGMASK
+LIB_PTHREAD_SIGMASK
REPLACE_TIMEGM
REPLACE_NANOSLEEP
REPLACE_MKTIME
@@ -1076,6 +1047,55 @@ ALLOCA_H
ALLOCA
GL_COND_LIBTOOL_FALSE
GL_COND_LIBTOOL_TRUE
+POST_ALLOC_OBJ
+PRE_ALLOC_OBJ
+CYGWIN_OBJ
+RALLOC_OBJ
+OLDXMENU_DEPS
+LIBX_OTHER
+LIBXMENU
+OLDXMENU
+OLDXMENU_TARGET
+LIBXT_OTHER
+TOOLKIT_LIBW
+WIDGET_OBJ
+XOBJ
+XMENU_OBJ
+FONT_OBJ
+OTHER_FILES
+GNU_OBJC_CFLAGS
+ns_appsrc
+ns_appresdir
+ns_appbindir
+ns_appdir
+S_FILE
+M_FILE
+X_TOOLKIT_TYPE
+C_SWITCH_X_SYSTEM
+C_SWITCH_X_SITE
+LD_SWITCH_X_SITE
+gameuser
+gamedir
+bitmapdir
+archlibdir
+etcdir
+x_default_search_path
+lisppath
+locallisppath
+lispdir
+srcdir
+canonical
+configuration
+version
+KRB4LIB
+DESLIB
+KRB5LIB
+CRYPTOLIB
+COM_ERRLIB
+LIBRESOLV
+LIBHESIOD
+TERMCAP_OBJ
+LIBS_TERMCAP
BLESSMAIL_TARGET
LIBS_MAIL
liblockfile
@@ -2571,6 +2591,60 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_func
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_type
+
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -2748,60 +2822,6 @@ rm -f conftest.val
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof ($2))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -3097,6 +3117,7 @@ as_fn_append ac_header_list " stdint.h"
as_fn_append ac_header_list " inttypes.h"
as_fn_append ac_func_list " lstat"
as_fn_append ac_func_list " alarm"
+as_fn_append ac_func_list " pthread_sigmask"
as_fn_append ac_func_list " readlink"
as_fn_append ac_header_list " sys/socket.h"
as_fn_append ac_func_list " tzset"
@@ -6579,7 +6600,10 @@ esac
# Code from module lstat:
# Code from module mktime:
# Code from module multiarch:
+ # Code from module pthread_sigmask:
# Code from module readlink:
+ # Code from module signal:
+ # Code from module sigprocmask:
# Code from module socklen:
# Code from module ssize_t:
# Code from module stat:
@@ -6591,6 +6615,8 @@ esac
# Code from module stdio:
# Code from module stdlib:
# Code from module strftime:
+ # Code from module strtoimax:
+ # Code from module strtoll:
# Code from module strtoull:
# Code from module strtoumax:
# Code from module symlink:
@@ -7455,6 +7481,8 @@ fi
# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
+# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
+
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
@@ -13915,7 +13943,1766 @@ $as_echo "#define GETPGRP_VOID 1" >>confdefs.h
fi
-# Configure gnulib.
+# UNIX98 PTYs.
+for ac_func in grantpt
+do :
+ ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
+if test "x$ac_cv_func_grantpt" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GRANTPT 1
+_ACEOF
+
+fi
+done
+
+
+# PTY-related GNU extensions.
+for ac_func in getpt
+do :
+ ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
+if test "x$ac_cv_func_getpt" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPT 1
+_ACEOF
+
+fi
+done
+
+
+# Check this now, so that we will NOT find the above functions in ncurses.
+# That is because we have not set up to link ncurses in lib-src.
+# It's better to believe a function is not available
+# than to expect to find it in ncurses.
+# Also we need tputs and friends to be able to build at all.
+have_tputs_et_al=true
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
+$as_echo_n "checking for library containing tputs... " >&6; }
+if test "${ac_cv_search_tputs+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tputs ();
+int
+main ()
+{
+return tputs ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ncurses terminfo termcap; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_tputs=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_tputs+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_tputs+set}" = set; then :
+
+else
+ ac_cv_search_tputs=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
+$as_echo "$ac_cv_search_tputs" >&6; }
+ac_res=$ac_cv_search_tputs
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+ have_tputs_et_al=false
+fi
+
+if test "$have_tputs_et_al" != true; then
+ as_fn_error "I couldn't find termcap functions (tputs and friends).
+Maybe some development libraries/packages are missing? Try installing
+libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
+fi
+# Must define this when any termcap library is found.
+
+$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
+
+## FIXME This was the cpp logic, but I am not sure it is right.
+## The above test has not necessarily found libncurses.
+HAVE_LIBNCURSES=yes
+
+## Use terminfo instead of termcap?
+## Note only system files NOT using terminfo are:
+## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
+## darwin|gnu without ncurses.
+TERMINFO=no
+LIBS_TERMCAP=
+case "$opsys" in
+ ## cygwin: Fewer environment variables to go wrong, more terminal types.
+ ## hpux10-20: Use the system provided termcap(3) library.
+ ## openbsd: David Mazieres <[email protected]> says this
+ ## is necessary. Otherwise Emacs dumps core when run -nw.
+ aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
+
+ ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
+ ## The ncurses library has been moved out of the System framework in
+ ## Mac OS X 10.2. So if configure detects it, set the command-line
+ ## option to use it.
+ darwin|gnu*)
+ ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
+ if test "x$HAVE_LIBNCURSES" = "xyes"; then
+ TERMINFO=yes
+ LIBS_TERMCAP="-lncurses"
+ fi
+ ;;
+
+ freebsd)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
+$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
+ if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <osreldate.h>
+int
+main ()
+{
+#if __FreeBSD_version < 400000
+fail;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ emacs_cv_freebsd_terminfo=yes
+else
+ emacs_cv_freebsd_terminfo=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
+$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
+
+ if test $emacs_cv_freebsd_terminfo = yes; then
+ TERMINFO=yes
+ LIBS_TERMCAP="-lncurses"
+ else
+ LIBS_TERMCAP="-ltermcap"
+ fi
+ ;;
+
+ netbsd)
+ if test $ac_cv_search_tputs = -lterminfo; then
+ TERMINFO=yes
+ LIBS_TERMCAP="-lterminfo"
+ else
+ LIBS_TERMCAP="-ltermcap"
+ fi
+ ;;
+
+esac
+
+case "$opsys" in
+ ## hpux: Make sure we get select from libc rather than from libcurses
+ ## because libcurses on HPUX 10.10 has a broken version of select.
+ ## We used to use -lc -lcurses, but this may be cleaner.
+ hpux*) LIBS_TERMCAP="-ltermcap" ;;
+
+ openbsd) LIBS_TERMCAP="-lncurses" ;;
+
+ ## Must use system termcap, if we use any termcap. It does special things.
+ sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
+esac
+
+TERMCAP_OBJ=tparam.o
+if test $TERMINFO = yes; then
+
+$as_echo "#define TERMINFO 1" >>confdefs.h
+
+
+ ## Default used to be -ltermcap. Add a case above if need something else.
+ test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
+
+ TERMCAP_OBJ=terminfo.o
+fi
+
+
+
+
+# Do we have res_init, for detecting changes in /etc/resolv.conf?
+resolv=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+int
+main ()
+{
+return res_init();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_res_init=yes
+else
+ have_res_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$have_res_init" = no; then
+ OLIBS="$LIBS"
+ LIBS="$LIBS -lresolv"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
+$as_echo_n "checking for res_init with -lresolv... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+int
+main ()
+{
+return res_init();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_res_init=yes
+else
+ have_res_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
+$as_echo "$have_res_init" >&6; }
+ if test "$have_res_init" = yes ; then
+ resolv=yes
+ fi
+ LIBS="$OLIBS"
+fi
+
+if test "$have_res_init" = yes; then
+
+$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
+
+fi
+
+# Do we need the Hesiod library to provide the support routines?
+LIBHESIOD=
+if test "$with_hesiod" != no ; then
+ # Don't set $LIBS here -- see comments above. FIXME which comments?
+ ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
+if test "x$ac_cv_func_res_send" = x""yes; then :
+
+else
+ ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
+if test "x$ac_cv_func___res_send" = x""yes; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
+$as_echo_n "checking for res_send in -lresolv... " >&6; }
+if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char res_send ();
+int
+main ()
+{
+return res_send ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_resolv_res_send=yes
+else
+ ac_cv_lib_resolv_res_send=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
+$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
+if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
+ resolv=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
+$as_echo_n "checking for __res_send in -lresolv... " >&6; }
+if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __res_send ();
+int
+main ()
+{
+return __res_send ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_resolv___res_send=yes
+else
+ ac_cv_lib_resolv___res_send=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
+$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
+if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
+ resolv=yes
+fi
+
+fi
+
+fi
+
+fi
+
+ if test "$resolv" = yes ; then
+ RESOLVLIB=-lresolv
+ else
+ RESOLVLIB=
+ fi
+ ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
+if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
+$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
+if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lhesiod $RESOLVLIB $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char hes_getmailhost ();
+int
+main ()
+{
+return hes_getmailhost ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_hesiod_hes_getmailhost=yes
+else
+ ac_cv_lib_hesiod_hes_getmailhost=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
+$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
+if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
+ hesiod=yes
+else
+ :
+fi
+
+fi
+
+
+ if test x"$hesiod" = xyes; then
+
+$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
+
+ LIBHESIOD=-lhesiod
+ fi
+fi
+
+
+# Do we need libresolv (due to res_init or Hesiod)?
+if test "$resolv" = yes ; then
+
+$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
+
+ LIBRESOLV=-lresolv
+else
+ LIBRESOLV=
+fi
+
+
+# These tell us which Kerberos-related libraries to use.
+COM_ERRLIB=
+CRYPTOLIB=
+KRB5LIB=
+DESLIB=
+KRB4LIB=
+
+if test "${with_kerberos}" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
+$as_echo_n "checking for com_err in -lcom_err... " >&6; }
+if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcom_err $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char com_err ();
+int
+main ()
+{
+return com_err ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_com_err_com_err=yes
+else
+ ac_cv_lib_com_err_com_err=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
+$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
+if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
+ have_com_err=yes
+else
+ have_com_err=no
+fi
+
+ if test $have_com_err = yes; then
+ COM_ERRLIB=-lcom_err
+ LIBS="$COM_ERRLIB $LIBS"
+
+$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
+$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
+if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mit_des_cbc_encrypt ();
+int
+main ()
+{
+return mit_des_cbc_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
+else
+ ac_cv_lib_crypto_mit_des_cbc_encrypt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
+if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
+ have_crypto=yes
+else
+ have_crypto=no
+fi
+
+ if test $have_crypto = yes; then
+ CRYPTOLIB=-lcrypto
+ LIBS="$CRYPTOLIB $LIBS"
+
+$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
+$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
+if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lk5crypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mit_des_cbc_encrypt ();
+int
+main ()
+{
+return mit_des_cbc_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
+else
+ ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
+if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
+ have_k5crypto=yes
+else
+ have_k5crypto=no
+fi
+
+ if test $have_k5crypto = yes; then
+ CRYPTOLIB=-lk5crypto
+ LIBS="$CRYPTOLIB $LIBS"
+
+$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
+$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
+if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb5 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char krb5_init_context ();
+int
+main ()
+{
+return krb5_init_context ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_krb5_krb5_init_context=yes
+else
+ ac_cv_lib_krb5_krb5_init_context=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
+$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
+if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
+ have_krb5=yes
+else
+ have_krb5=no
+fi
+
+ if test $have_krb5=yes; then
+ KRB5LIB=-lkrb5
+ LIBS="$KRB5LIB $LIBS"
+
+$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
+
+ fi
+ if test "${with_kerberos5}" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
+$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
+if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes425 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char des_cbc_encrypt ();
+int
+main ()
+{
+return des_cbc_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_des425_des_cbc_encrypt=yes
+else
+ ac_cv_lib_des425_des_cbc_encrypt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
+if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
+ have_des425=yes
+else
+ have_des425=no
+fi
+
+ if test $have_des425 = yes; then
+ DESLIB=-ldes425
+ LIBS="$DESLIB $LIBS"
+
+$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
+$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
+if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char des_cbc_encrypt ();
+int
+main ()
+{
+return des_cbc_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_des_des_cbc_encrypt=yes
+else
+ ac_cv_lib_des_des_cbc_encrypt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
+if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
+ have_des=yes
+else
+ have_des=no
+fi
+
+ if test $have_des = yes; then
+ DESLIB=-ldes
+ LIBS="$DESLIB $LIBS"
+
+$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
+
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
+$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
+if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb4 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char krb_get_cred ();
+int
+main ()
+{
+return krb_get_cred ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_krb4_krb_get_cred=yes
+else
+ ac_cv_lib_krb4_krb_get_cred=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
+$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
+if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
+ have_krb4=yes
+else
+ have_krb4=no
+fi
+
+ if test $have_krb4 = yes; then
+ KRB4LIB=-lkrb4
+ LIBS="$KRB4LIB $LIBS"
+
+$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
+$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
+if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char krb_get_cred ();
+int
+main ()
+{
+return krb_get_cred ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_krb_krb_get_cred=yes
+else
+ ac_cv_lib_krb_krb_get_cred=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
+$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
+if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
+ have_krb=yes
+else
+ have_krb=no
+fi
+
+ if test $have_krb = yes; then
+ KRB4LIB=-lkrb
+ LIBS="$KRB4LIB $LIBS"
+
+$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+
+ if test "${with_kerberos5}" != no; then
+ for ac_header in krb5.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
+if test "x$ac_cv_header_krb5_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_H 1
+_ACEOF
+ ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
+"
+if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_ERROR_TEXT 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
+"
+if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_ERROR_E_TEXT 1
+_ACEOF
+
+
+fi
+
+fi
+
+done
+
+ else
+ for ac_header in des.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
+if test "x$ac_cv_header_des_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DES_H 1
+_ACEOF
+
+else
+ for ac_header in kerberosIV/des.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
+if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KERBEROSIV_DES_H 1
+_ACEOF
+
+else
+ for ac_header in kerberos/des.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
+if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KERBEROS_DES_H 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+done
+
+fi
+
+done
+
+ for ac_header in krb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
+if test "x$ac_cv_header_krb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB_H 1
+_ACEOF
+
+else
+ for ac_header in kerberosIV/krb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
+if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KERBEROSIV_KRB_H 1
+_ACEOF
+
+else
+ for ac_header in kerberos/krb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
+if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KERBEROS_KRB_H 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+done
+
+fi
+
+done
+
+ fi
+ for ac_header in com_err.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
+if test "x$ac_cv_header_com_err_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_COM_ERR_H 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+
+
+
+
+
+
+# Solaris requires -lintl if you want strerror (which calls dgettext)
+# to return localized messages.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_dgettext=yes
+else
+ ac_cv_lib_intl_dgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL 1
+_ACEOF
+
+ LIBS="-lintl $LIBS"
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
+$as_echo_n "checking whether localtime caches TZ... " >&6; }
+if test "${emacs_cv_localtime_cache+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x$ac_cv_func_tzset = xyes; then
+if test "$cross_compiling" = yes; then :
+ # If we have tzset, assume the worst when cross-compiling.
+emacs_cv_localtime_cache=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+char TZ_GMT0[] = "TZ=GMT0";
+char TZ_PST8[] = "TZ=PST8";
+main()
+{
+ time_t now = time ((time_t *) 0);
+ int hour_GMT0, hour_unset;
+ if (putenv (TZ_GMT0) != 0)
+ exit (1);
+ hour_GMT0 = localtime (&now)->tm_hour;
+ unsetenv("TZ");
+ hour_unset = localtime (&now)->tm_hour;
+ if (putenv (TZ_PST8) != 0)
+ exit (1);
+ if (localtime (&now)->tm_hour == hour_GMT0)
+ exit (1);
+ unsetenv("TZ");
+ if (localtime (&now)->tm_hour != hour_unset)
+ exit (1);
+ exit (0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ emacs_cv_localtime_cache=no
+else
+ emacs_cv_localtime_cache=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ # If we lack tzset, report that localtime does not cache TZ,
+ # since we can't invalidate the cache if we don't have tzset.
+ emacs_cv_localtime_cache=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
+$as_echo "$emacs_cv_localtime_cache" >&6; }
+if test $emacs_cv_localtime_cache = yes; then
+
+$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
+
+fi
+
+if test "x$HAVE_TIMEVAL" = xyes; then
+ for ac_func in gettimeofday
+do :
+ ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
+if test "x$ac_cv_func_gettimeofday" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETTIMEOFDAY 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_gettimeofday = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
+$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
+if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+int
+main ()
+{
+struct timeval time;
+ gettimeofday (&time, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ emacs_cv_gettimeofday_two_arguments=yes
+else
+ emacs_cv_gettimeofday_two_arguments=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
+$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
+ if test $emacs_cv_gettimeofday_two_arguments = no; then
+
+$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
+
+ fi
+ fi
+fi
+
+ok_so_far=yes
+ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
+if test "x$ac_cv_func_socket" = x""yes; then :
+
+else
+ ok_so_far=no
+fi
+
+if test $ok_so_far = yes; then
+ ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
+
+else
+ ok_so_far=no
+fi
+
+
+fi
+if test $ok_so_far = yes; then
+ ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
+if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
+
+else
+ ok_so_far=no
+fi
+
+
+fi
+if test $ok_so_far = yes; then
+
+$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
+
+fi
+
+if test -f /usr/lpp/X11/bin/smt.exp; then
+
+$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
+$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
+if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+for ac_header in vfork.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VFORK_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in fork vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if test "${ac_cv_func_fork_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_fork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_fork_works=yes
+else
+ ac_cv_func_fork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
+
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if test "${ac_cv_func_vfork_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_vfork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Thanks to Paul Eggert for this test. */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+
+int
+main ()
+{
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test (0);
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ return (
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_vfork_works=yes
+else
+ ac_cv_func_vfork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+$as_echo "#define vfork fork" >>confdefs.h
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${emacs_cv_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ emacs_cv_langinfo_codeset=yes
+else
+ emacs_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
+$as_echo "$emacs_cv_langinfo_codeset" >&6; }
+if test $emacs_cv_langinfo_codeset = yes; then
+
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+# include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_mbstate_t=yes
+else
+ ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+ if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+
+ else
+
+$as_echo "#define mbstate_t int" >>confdefs.h
+
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
+$as_echo_n "checking for C restricted array declarations... " >&6; }
+if test "${emacs_cv_c_restrict_arr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+void fred (int x[__restrict]);
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ emacs_cv_c_restrict_arr=yes
+else
+ emacs_cv_c_restrict_arr=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
+$as_echo "$emacs_cv_c_restrict_arr" >&6; }
+if test "$emacs_cv_c_restrict_arr" = yes; then
+
+$as_echo "#define __restrict_arr __restrict" >>confdefs.h
+
+fi
+
+
+
+# Set up the CFLAGS for real compilation, so we can substitute it.
+CFLAGS="$REAL_CFLAGS"
+CPPFLAGS="$REAL_CPPFLAGS"
+
+## Hack to detect a buggy GCC version.
+if test "x$GCC" = xyes \
+ && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
+ && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
+ && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
+ as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
+fi
+
+version=$PACKAGE_VERSION
+
+### Specify what sort of things we'll be editing into Makefile and config.h.
+### Use configuration here uncanonicalized to avoid exceeding size limits.
+
+
+## Unused?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
+## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
+## end of LIBX_BASE, but nothing ever set it.
+
+
+
+
+## Used in lwlib/Makefile.in.
+
+if test -n "${machfile}"; then
+ M_FILE="\$(srcdir)/${machfile}"
+else
+ M_FILE=
+fi
+S_FILE="\$(srcdir)/${opsysfile}"
+
+
+
+
+
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define EMACS_CONFIGURATION "${canonical}"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
+_ACEOF
+
+if test -n "$machfile"; then
+
+cat >>confdefs.h <<_ACEOF
+#define config_machfile "${machfile}"
+_ACEOF
+
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define config_opsysfile "${opsysfile}"
+_ACEOF
+
+
+XMENU_OBJ=
+XOBJ=
+FONT_OBJ=
+if test "${HAVE_X_WINDOWS}" = "yes" ; then
+
+$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
+
+ XMENU_OBJ=xmenu.o
+ XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
+ FONT_OBJ=xfont.o
+ if test "$HAVE_XFT" = "yes"; then
+ FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
+ elif test "$HAVE_FREETYPE" = "yes"; then
+ FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
+ fi
+
+fi
+
+
+
+
+WIDGET_OBJ=
+MOTIF_LIBW=
+if test "${USE_X_TOOLKIT}" != "none" ; then
+ WIDGET_OBJ=widget.o
+
+$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
+
+ if test "${USE_X_TOOLKIT}" = "LUCID"; then
+
+$as_echo "#define USE_LUCID 1" >>confdefs.h
+
+ elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
+
+$as_echo "#define USE_MOTIF 1" >>confdefs.h
+
+ MOTIF_LIBW=-lXm
+ case "$opsys" in
+ gnu-linux)
+ ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
+ MOTIF_LIBW="$MOTIF_LIBW -lXpm"
+ ;;
+
+ unixware)
+ ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
+ ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
+ MOTIF_LIBW="MOTIF_LIBW -lXimp"
+ ;;
+
+ aix4-2)
+ ## [email protected] says -li18n is needed by -lXm.
+ MOTIF_LIBW="$MOTIF_LIBW -li18n"
+ ;;
+ esac
+ MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
+ fi
+fi
+
+
+TOOLKIT_LIBW=
+case "$USE_X_TOOLKIT" in
+ MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
+ LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
+ none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
+esac
+
+
+if test "$USE_X_TOOLKIT" = "none"; then
+ LIBXT_OTHER="\$(LIBXSM)"
+ OLDXMENU_TARGET="really-oldXMenu"
+else
+ LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
+ OLDXMENU_TARGET="really-lwlib"
+fi
+
+
+## The X Menu stuff is present in the X10 distribution, but missing
+## from X11. If we have X10, just use the installed library;
+## otherwise, use our own copy.
+if test "${HAVE_X11}" = "yes" ; then
+
+$as_echo "#define HAVE_X11 1" >>confdefs.h
+
+
+ if test "$USE_X_TOOLKIT" = "none"; then
+ OLDXMENU="\${oldXMenudir}/libXMenu11.a"
+ else
+ OLDXMENU="\${lwlibdir}/liblw.a"
+ fi
+ LIBXMENU="\$(OLDXMENU)"
+ LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
+ OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
+else
+ ## For a syntactically valid Makefile; not actually used for anything.
+ ## See comments in src/Makefile.in.
+ OLDXMENU=nothing
+ ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
+ if test "${HAVE_X_WINDOWS}" = "yes"; then
+ LIBXMENU="-lXMenu"
+ else
+ LIBXMENU=
+ fi
+ LIBX_OTHER=
+ OLDXMENU_DEPS=
+fi
+
+if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
+ OLDXMENU_TARGET=
+ OLDXMENU=nothing
+ LIBXMENU=
+ OLDXMENU_DEPS=
+fi
+
+
+
+
+
+
+
+if test "${HAVE_MENUS}" = "yes" ; then
+
+$as_echo "#define HAVE_MENUS 1" >>confdefs.h
+
+fi
+
+if test "${GNU_MALLOC}" = "yes" ; then
+
+$as_echo "#define GNU_MALLOC 1" >>confdefs.h
+
+fi
+
+RALLOC_OBJ=
+if test "${REL_ALLOC}" = "yes" ; then
+
+$as_echo "#define REL_ALLOC 1" >>confdefs.h
+
+
+ test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
+fi
+
+
+if test "$opsys" = "cygwin"; then
+ CYGWIN_OBJ="sheap.o"
+ ## Cygwin differs because of its unexec().
+ PRE_ALLOC_OBJ=
+ POST_ALLOC_OBJ=lastfile.o
+else
+ CYGWIN_OBJ=
+ PRE_ALLOC_OBJ=lastfile.o
+ POST_ALLOC_OBJ=
+fi
+
+
+
+
+# Configure gnulib here, now that we know LIBS.
@@ -16308,6 +18095,48 @@ _ACEOF
+ GNULIB_PTHREAD_SIGMASK=0;
+ GNULIB_SIGNAL_H_SIGPIPE=0;
+ GNULIB_SIGPROCMASK=0;
+ GNULIB_SIGACTION=0;
+ HAVE_POSIX_SIGNALBLOCKING=1;
+ HAVE_PTHREAD_SIGMASK=1;
+ HAVE_SIGSET_T=1;
+ HAVE_SIGINFO_T=1;
+ HAVE_SIGACTION=1;
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+
+ HAVE_SIGHANDLER_T=1;
+ REPLACE_PTHREAD_SIGMASK=0;
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
+ #include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+ #include <sys/types.h>
+
+"
+if test "x$ac_cv_type_sigset_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGSET_T 1
+_ACEOF
+
+gl_cv_type_sigset_t=yes
+else
+ gl_cv_type_sigset_t=no
+fi
+
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+
+
+
if test $ac_cv_header_sys_socket_h = no; then
@@ -16560,6 +18389,17 @@ fi
+ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOIMAX $ac_have_decl
+_ACEOF
+
ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
ac_have_decl=1
@@ -17963,6 +19803,99 @@ fi
+ LIB_PTHREAD_SIGMASK=
+ if test $ac_cv_func_pthread_sigmask != yes; then
+ gl_save_LIBS=$LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5
+$as_echo_n "checking for library containing pthread_sigmask... " >&6; }
+if test "${ac_cv_search_pthread_sigmask+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_sigmask ();
+int
+main ()
+{
+return pthread_sigmask ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' pthread c_r; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_sigmask=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_pthread_sigmask+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_pthread_sigmask+set}" = set; then :
+
+else
+ ac_cv_search_pthread_sigmask=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5
+$as_echo "$ac_cv_search_pthread_sigmask" >&6; }
+ac_res=$ac_cv_search_pthread_sigmask
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ LIBS=$gl_save_LIBS
+ if test "$ac_cv_search_pthread_sigmask" = no; then
+ HAVE_PTHREAD_SIGMASK=0
+ elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then
+ LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask
+ fi
+ fi
+
+
+if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
+
+fi
+
+
+
+
+
+ GNULIB_PTHREAD_SIGMASK=1
+
+
+
+
+
+
+
if test $ac_cv_func_readlink = no; then
HAVE_READLINK=0
@@ -18067,6 +20000,92 @@ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_signal_h='<'signal.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+$as_echo_n "checking absolute name of <signal.h>... " >&6; }
+if test "${gl_cv_next_signal_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/signal.h#{
+ s#.*"\(.*/signal.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+$as_echo "$gl_cv_next_signal_h" >&6; }
+ fi
+ NEXT_SIGNAL_H=$gl_cv_next_signal_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'signal.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_signal_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
+
+
+
+
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
+
+else
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+fi
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_sighandler_t" = x""yes; then :
+
+else
+ HAVE_SIGHANDLER_T=0
+fi
+
+
+
+
ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
/* <sys/types.h> is not needed according to POSIX, but the
<sys/socket.h> in i386-unknown-freebsd4.10 and
@@ -18618,6 +20637,62 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h
+ if test "$ac_cv_have_decl_strtoimax" != yes; then
+ HAVE_DECL_STRTOIMAX=0
+
+ for ac_func in strtoimax
+do :
+ ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
+if test "x$ac_cv_func_strtoimax" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOIMAX 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
+
+
+ ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOLL $ac_have_decl
+_ACEOF
+
+
+
+fi
+
+
+
+
+
+ GNULIB_STRTOIMAX=1
+
+
+
+
+
+
+
+
if test "$ac_cv_have_decl_strtoumax" != yes; then
HAVE_DECL_STRTOUMAX=0
@@ -18990,7 +21065,9 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
gl_gnulib_enabled_dosname=false
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
+ gl_gnulib_enabled_sigprocmask=false
gl_gnulib_enabled_stat=false
+ gl_gnulib_enabled_strtoll=false
gl_gnulib_enabled_strtoull=false
gl_gnulib_enabled_verify=false
func_gl_gnulib_m4code_dosname ()
@@ -19007,6 +21084,50 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
fi
}
+ func_gl_gnulib_m4code_sigprocmask ()
+ {
+ if ! $gl_gnulib_enabled_sigprocmask; then
+
+
+
+ if test $gl_cv_type_sigset_t = yes; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = x""yes; then :
+ gl_cv_func_sigprocmask=1
+fi
+
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+
+if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
+
+ :
+fi
+
+
+
+
+
+ GNULIB_SIGPROCMASK=1
+
+
+
+
+
+ gl_gnulib_enabled_sigprocmask=true
+ fi
+ }
func_gl_gnulib_m4code_stat ()
{
if ! $gl_gnulib_enabled_stat; then
@@ -19144,6 +21265,58 @@ fi
fi
fi
}
+ func_gl_gnulib_m4code_strtoll ()
+ {
+ if ! $gl_gnulib_enabled_strtoll; then
+
+
+
+ if test "$ac_cv_type_long_long_int" = yes; then
+ for ac_func in strtoll
+do :
+ ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOLL 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_strtoll = no; then
+ HAVE_STRTOLL=0
+ fi
+ fi
+
+if test $HAVE_STRTOLL = 0; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
+
+
+ :
+
+fi
+
+
+
+
+
+ GNULIB_STRTOLL=1
+
+
+
+
+
+ gl_gnulib_enabled_strtoll=true
+ fi
+ }
func_gl_gnulib_m4code_strtoull ()
{
if ! $gl_gnulib_enabled_strtoull; then
@@ -19211,9 +21384,18 @@ fi
if test $REPLACE_LSTAT = 1; then
func_gl_gnulib_m4code_stat
fi
+ if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
+ func_gl_gnulib_m4code_sigprocmask
+ fi
if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
func_gl_gnulib_m4code_stat
fi
+ if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then
+ func_gl_gnulib_m4code_verify
+ fi
+ if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then
+ func_gl_gnulib_m4code_strtoll
+ fi
if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
func_gl_gnulib_m4code_verify
fi
@@ -19237,6 +21419,14 @@ else
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
fi
+ if $gl_gnulib_enabled_sigprocmask; then
+ gl_GNULIB_ENABLED_sigprocmask_TRUE=
+ gl_GNULIB_ENABLED_sigprocmask_FALSE='#'
+else
+ gl_GNULIB_ENABLED_sigprocmask_TRUE='#'
+ gl_GNULIB_ENABLED_sigprocmask_FALSE=
+fi
+
if $gl_gnulib_enabled_stat; then
gl_GNULIB_ENABLED_stat_TRUE=
gl_GNULIB_ENABLED_stat_FALSE='#'
@@ -19245,6 +21435,14 @@ else
gl_GNULIB_ENABLED_stat_FALSE=
fi
+ if $gl_gnulib_enabled_strtoll; then
+ gl_GNULIB_ENABLED_strtoll_TRUE=
+ gl_GNULIB_ENABLED_strtoll_FALSE='#'
+else
+ gl_GNULIB_ENABLED_strtoll_TRUE='#'
+ gl_GNULIB_ENABLED_strtoll_FALSE=
+fi
+
if $gl_gnulib_enabled_strtoull; then
gl_GNULIB_ENABLED_strtoull_TRUE=
gl_GNULIB_ENABLED_strtoull_FALSE='#'
@@ -19302,1766 +21500,6 @@ fi
-# UNIX98 PTYs.
-for ac_func in grantpt
-do :
- ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
-if test "x$ac_cv_func_grantpt" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GRANTPT 1
-_ACEOF
-
-fi
-done
-
-
-# PTY-related GNU extensions.
-for ac_func in getpt
-do :
- ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
-if test "x$ac_cv_func_getpt" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETPT 1
-_ACEOF
-
-fi
-done
-
-
-# Check this now, so that we will NOT find the above functions in ncurses.
-# That is because we have not set up to link ncurses in lib-src.
-# It's better to believe a function is not available
-# than to expect to find it in ncurses.
-# Also we need tputs and friends to be able to build at all.
-have_tputs_et_al=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
-$as_echo_n "checking for library containing tputs... " >&6; }
-if test "${ac_cv_search_tputs+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char tputs ();
-int
-main ()
-{
-return tputs ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' ncurses terminfo termcap; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_tputs=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if test "${ac_cv_search_tputs+set}" = set; then :
- break
-fi
-done
-if test "${ac_cv_search_tputs+set}" = set; then :
-
-else
- ac_cv_search_tputs=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
-$as_echo "$ac_cv_search_tputs" >&6; }
-ac_res=$ac_cv_search_tputs
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
- have_tputs_et_al=false
-fi
-
-if test "$have_tputs_et_al" != true; then
- as_fn_error "I couldn't find termcap functions (tputs and friends).
-Maybe some development libraries/packages are missing? Try installing
-libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
-fi
-# Must define this when any termcap library is found.
-
-$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
-
-## FIXME This was the cpp logic, but I am not sure it is right.
-## The above test has not necessarily found libncurses.
-HAVE_LIBNCURSES=yes
-
-## Use terminfo instead of termcap?
-## Note only system files NOT using terminfo are:
-## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
-## darwin|gnu without ncurses.
-TERMINFO=no
-LIBS_TERMCAP=
-case "$opsys" in
- ## cygwin: Fewer environment variables to go wrong, more terminal types.
- ## hpux10-20: Use the system provided termcap(3) library.
- ## openbsd: David Mazieres <[email protected]> says this
- ## is necessary. Otherwise Emacs dumps core when run -nw.
- aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
-
- ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
- ## The ncurses library has been moved out of the System framework in
- ## Mac OS X 10.2. So if configure detects it, set the command-line
- ## option to use it.
- darwin|gnu*)
- ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
- if test "x$HAVE_LIBNCURSES" = "xyes"; then
- TERMINFO=yes
- LIBS_TERMCAP="-lncurses"
- fi
- ;;
-
- freebsd)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
-$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
- if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <osreldate.h>
-int
-main ()
-{
-#if __FreeBSD_version < 400000
-fail;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- emacs_cv_freebsd_terminfo=yes
-else
- emacs_cv_freebsd_terminfo=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
-$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
-
- if test $emacs_cv_freebsd_terminfo = yes; then
- TERMINFO=yes
- LIBS_TERMCAP="-lncurses"
- else
- LIBS_TERMCAP="-ltermcap"
- fi
- ;;
-
- netbsd)
- if test $ac_cv_search_tputs = -lterminfo; then
- TERMINFO=yes
- LIBS_TERMCAP="-lterminfo"
- else
- LIBS_TERMCAP="-ltermcap"
- fi
- ;;
-
-esac
-
-case "$opsys" in
- ## hpux: Make sure we get select from libc rather than from libcurses
- ## because libcurses on HPUX 10.10 has a broken version of select.
- ## We used to use -lc -lcurses, but this may be cleaner.
- hpux*) LIBS_TERMCAP="-ltermcap" ;;
-
- openbsd) LIBS_TERMCAP="-lncurses" ;;
-
- ## Must use system termcap, if we use any termcap. It does special things.
- sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
-esac
-
-TERMCAP_OBJ=tparam.o
-if test $TERMINFO = yes; then
-
-$as_echo "#define TERMINFO 1" >>confdefs.h
-
-
- ## Default used to be -ltermcap. Add a case above if need something else.
- test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
-
- TERMCAP_OBJ=terminfo.o
-fi
-
-
-
-
-# Do we have res_init, for detecting changes in /etc/resolv.conf?
-resolv=no
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-int
-main ()
-{
-return res_init();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- have_res_init=yes
-else
- have_res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$have_res_init" = no; then
- OLIBS="$LIBS"
- LIBS="$LIBS -lresolv"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
-$as_echo_n "checking for res_init with -lresolv... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-int
-main ()
-{
-return res_init();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- have_res_init=yes
-else
- have_res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
-$as_echo "$have_res_init" >&6; }
- if test "$have_res_init" = yes ; then
- resolv=yes
- fi
- LIBS="$OLIBS"
-fi
-
-if test "$have_res_init" = yes; then
-
-$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
-
-fi
-
-# Do we need the Hesiod library to provide the support routines?
-LIBHESIOD=
-if test "$with_hesiod" != no ; then
- # Don't set $LIBS here -- see comments above. FIXME which comments?
- ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
-if test "x$ac_cv_func_res_send" = x""yes; then :
-
-else
- ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
-if test "x$ac_cv_func___res_send" = x""yes; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
-$as_echo_n "checking for res_send in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_send ();
-int
-main ()
-{
-return res_send ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_resolv_res_send=yes
-else
- ac_cv_lib_resolv_res_send=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
-$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
-if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
- resolv=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
-$as_echo_n "checking for __res_send in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __res_send ();
-int
-main ()
-{
-return __res_send ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_resolv___res_send=yes
-else
- ac_cv_lib_resolv___res_send=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
-$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
-if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
- resolv=yes
-fi
-
-fi
-
-fi
-
-fi
-
- if test "$resolv" = yes ; then
- RESOLVLIB=-lresolv
- else
- RESOLVLIB=
- fi
- ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
-if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
-$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
-if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lhesiod $RESOLVLIB $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char hes_getmailhost ();
-int
-main ()
-{
-return hes_getmailhost ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_hesiod_hes_getmailhost=yes
-else
- ac_cv_lib_hesiod_hes_getmailhost=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
-$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
-if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
- hesiod=yes
-else
- :
-fi
-
-fi
-
-
- if test x"$hesiod" = xyes; then
-
-$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
-
- LIBHESIOD=-lhesiod
- fi
-fi
-
-
-# Do we need libresolv (due to res_init or Hesiod)?
-if test "$resolv" = yes ; then
-
-$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
-
- LIBRESOLV=-lresolv
-else
- LIBRESOLV=
-fi
-
-
-# These tell us which Kerberos-related libraries to use.
-COM_ERRLIB=
-CRYPTOLIB=
-KRB5LIB=
-DESLIB=
-KRB4LIB=
-
-if test "${with_kerberos}" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
-$as_echo_n "checking for com_err in -lcom_err... " >&6; }
-if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcom_err $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char com_err ();
-int
-main ()
-{
-return com_err ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_com_err_com_err=yes
-else
- ac_cv_lib_com_err_com_err=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
-$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
-if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
- have_com_err=yes
-else
- have_com_err=no
-fi
-
- if test $have_com_err = yes; then
- COM_ERRLIB=-lcom_err
- LIBS="$COM_ERRLIB $LIBS"
-
-$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
-$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mit_des_cbc_encrypt ();
-int
-main ()
-{
-return mit_des_cbc_encrypt ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
-else
- ac_cv_lib_crypto_mit_des_cbc_encrypt=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
- have_crypto=yes
-else
- have_crypto=no
-fi
-
- if test $have_crypto = yes; then
- CRYPTOLIB=-lcrypto
- LIBS="$CRYPTOLIB $LIBS"
-
-$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
-$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
-if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lk5crypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mit_des_cbc_encrypt ();
-int
-main ()
-{
-return mit_des_cbc_encrypt ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
-else
- ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
- have_k5crypto=yes
-else
- have_k5crypto=no
-fi
-
- if test $have_k5crypto = yes; then
- CRYPTOLIB=-lk5crypto
- LIBS="$CRYPTOLIB $LIBS"
-
-$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
-$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
-if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb5 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb5_init_context ();
-int
-main ()
-{
-return krb5_init_context ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_krb5_krb5_init_context=yes
-else
- ac_cv_lib_krb5_krb5_init_context=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
-$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
-if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
- have_krb5=yes
-else
- have_krb5=no
-fi
-
- if test $have_krb5=yes; then
- KRB5LIB=-lkrb5
- LIBS="$KRB5LIB $LIBS"
-
-$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
-
- fi
- if test "${with_kerberos5}" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
-if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes425 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_des425_des_cbc_encrypt=yes
-else
- ac_cv_lib_des425_des_cbc_encrypt=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
- have_des425=yes
-else
- have_des425=no
-fi
-
- if test $have_des425 = yes; then
- DESLIB=-ldes425
- LIBS="$DESLIB $LIBS"
-
-$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
-$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
-if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_des_des_cbc_encrypt=yes
-else
- ac_cv_lib_des_des_cbc_encrypt=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
- have_des=yes
-else
- have_des=no
-fi
-
- if test $have_des = yes; then
- DESLIB=-ldes
- LIBS="$DESLIB $LIBS"
-
-$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
-
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
-$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
-if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb4 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_get_cred ();
-int
-main ()
-{
-return krb_get_cred ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_krb4_krb_get_cred=yes
-else
- ac_cv_lib_krb4_krb_get_cred=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
-$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
-if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
- have_krb4=yes
-else
- have_krb4=no
-fi
-
- if test $have_krb4 = yes; then
- KRB4LIB=-lkrb4
- LIBS="$KRB4LIB $LIBS"
-
-$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
-$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_get_cred ();
-int
-main ()
-{
-return krb_get_cred ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_krb_krb_get_cred=yes
-else
- ac_cv_lib_krb_krb_get_cred=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
-$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
-if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
- have_krb=yes
-else
- have_krb=no
-fi
-
- if test $have_krb = yes; then
- KRB4LIB=-lkrb
- LIBS="$KRB4LIB $LIBS"
-
-$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
-
- fi
- fi
- fi
-
- if test "${with_kerberos5}" != no; then
- for ac_header in krb5.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
-if test "x$ac_cv_header_krb5_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB5_H 1
-_ACEOF
- ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
-"
-if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB5_ERROR_TEXT 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
-"
-if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB5_ERROR_E_TEXT 1
-_ACEOF
-
-
-fi
-
-fi
-
-done
-
- else
- for ac_header in des.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
-if test "x$ac_cv_header_des_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DES_H 1
-_ACEOF
-
-else
- for ac_header in kerberosIV/des.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
-if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KERBEROSIV_DES_H 1
-_ACEOF
-
-else
- for ac_header in kerberos/des.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
-if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KERBEROS_DES_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-done
-
-fi
-
-done
-
- for ac_header in krb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
-if test "x$ac_cv_header_krb_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB_H 1
-_ACEOF
-
-else
- for ac_header in kerberosIV/krb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
-if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KERBEROSIV_KRB_H 1
-_ACEOF
-
-else
- for ac_header in kerberos/krb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
-if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KERBEROS_KRB_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-done
-
-fi
-
-done
-
- fi
- for ac_header in com_err.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
-if test "x$ac_cv_header_com_err_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_COM_ERR_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-
-
-
-
-
-
-# Solaris requires -lintl if you want strerror (which calls dgettext)
-# to return localized messages.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
-$as_echo_n "checking for dgettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dgettext ();
-int
-main ()
-{
-return dgettext ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_intl_dgettext=yes
-else
- ac_cv_lib_intl_dgettext=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
-$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
-if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINTL 1
-_ACEOF
-
- LIBS="-lintl $LIBS"
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
-$as_echo_n "checking whether localtime caches TZ... " >&6; }
-if test "${emacs_cv_localtime_cache+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test x$ac_cv_func_tzset = xyes; then
-if test "$cross_compiling" = yes; then :
- # If we have tzset, assume the worst when cross-compiling.
-emacs_cv_localtime_cache=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <time.h>
-char TZ_GMT0[] = "TZ=GMT0";
-char TZ_PST8[] = "TZ=PST8";
-main()
-{
- time_t now = time ((time_t *) 0);
- int hour_GMT0, hour_unset;
- if (putenv (TZ_GMT0) != 0)
- exit (1);
- hour_GMT0 = localtime (&now)->tm_hour;
- unsetenv("TZ");
- hour_unset = localtime (&now)->tm_hour;
- if (putenv (TZ_PST8) != 0)
- exit (1);
- if (localtime (&now)->tm_hour == hour_GMT0)
- exit (1);
- unsetenv("TZ");
- if (localtime (&now)->tm_hour != hour_unset)
- exit (1);
- exit (0);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- emacs_cv_localtime_cache=no
-else
- emacs_cv_localtime_cache=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-else
- # If we lack tzset, report that localtime does not cache TZ,
- # since we can't invalidate the cache if we don't have tzset.
- emacs_cv_localtime_cache=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
-$as_echo "$emacs_cv_localtime_cache" >&6; }
-if test $emacs_cv_localtime_cache = yes; then
-
-$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
-
-fi
-
-if test "x$HAVE_TIMEVAL" = xyes; then
- for ac_func in gettimeofday
-do :
- ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
-if test "x$ac_cv_func_gettimeofday" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETTIMEOFDAY 1
-_ACEOF
-
-fi
-done
-
- if test $ac_cv_func_gettimeofday = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
-$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
-if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif
-int
-main ()
-{
-struct timeval time;
- gettimeofday (&time, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- emacs_cv_gettimeofday_two_arguments=yes
-else
- emacs_cv_gettimeofday_two_arguments=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
-$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
- if test $emacs_cv_gettimeofday_two_arguments = no; then
-
-$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
-
- fi
- fi
-fi
-
-ok_so_far=yes
-ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
-if test "x$ac_cv_func_socket" = x""yes; then :
-
-else
- ok_so_far=no
-fi
-
-if test $ok_so_far = yes; then
- ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
-if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
-
-else
- ok_so_far=no
-fi
-
-
-fi
-if test $ok_so_far = yes; then
- ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
-if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
-
-else
- ok_so_far=no
-fi
-
-
-fi
-if test $ok_so_far = yes; then
-
-$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
-
-fi
-
-if test -f /usr/lpp/X11/bin/smt.exp; then
-
-$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
-$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
-if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = x""yes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
-
-fi
-
-for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if test "${ac_cv_func_fork_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_fork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-
- /* By Ruediger Kuhlmann. */
- return fork () < 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_fork_works=yes
-else
- ac_cv_func_fork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
-
-else
- ac_cv_func_fork_works=$ac_cv_func_fork
-fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
-fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if test "${ac_cv_func_vfork_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_vfork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Thanks to Paul Eggert for this test. */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
-
-int
-main ()
-{
- pid_t parent = getpid ();
- pid_t child;
-
- sparc_address_test (0);
-
- child = vfork ();
-
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
-
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
-
- while (wait(&status) != child)
- ;
- return (
- /* Was there some problem with vforking? */
- child < 0
-
- /* Did the child fail? (This shouldn't happen.) */
- || status
-
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
-
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_vfork_works=yes
-else
- ac_cv_func_vfork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
-
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
-fi
-
-if test "x$ac_cv_func_vfork_works" = xyes; then
-
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
-
-else
-
-$as_echo "#define vfork fork" >>confdefs.h
-
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
-
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
-$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
-if test "${emacs_cv_langinfo_codeset+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <langinfo.h>
-int
-main ()
-{
-char* cs = nl_langinfo(CODESET);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- emacs_cv_langinfo_codeset=yes
-else
- emacs_cv_langinfo_codeset=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
-$as_echo "$emacs_cv_langinfo_codeset" >&6; }
-if test $emacs_cv_langinfo_codeset = yes; then
-
-$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
-$as_echo_n "checking for mbstate_t... " >&6; }
-if test "${ac_cv_type_mbstate_t+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-# include <wchar.h>
-int
-main ()
-{
-mbstate_t x; return sizeof x;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_mbstate_t=yes
-else
- ac_cv_type_mbstate_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
-$as_echo "$ac_cv_type_mbstate_t" >&6; }
- if test $ac_cv_type_mbstate_t = yes; then
-
-$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
-
- else
-
-$as_echo "#define mbstate_t int" >>confdefs.h
-
- fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
-$as_echo_n "checking for C restricted array declarations... " >&6; }
-if test "${emacs_cv_c_restrict_arr+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-void fred (int x[__restrict]);
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- emacs_cv_c_restrict_arr=yes
-else
- emacs_cv_c_restrict_arr=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
-$as_echo "$emacs_cv_c_restrict_arr" >&6; }
-if test "$emacs_cv_c_restrict_arr" = yes; then
-
-$as_echo "#define __restrict_arr __restrict" >>confdefs.h
-
-fi
-
-
-
-# Set up the CFLAGS for real compilation, so we can substitute it.
-CFLAGS="$REAL_CFLAGS"
-CPPFLAGS="$REAL_CPPFLAGS"
-
-## Hack to detect a buggy GCC version.
-if test "x$GCC" = xyes \
- && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
- && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
- && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
- as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
-fi
-
-version=$PACKAGE_VERSION
-
-### Specify what sort of things we'll be editing into Makefile and config.h.
-### Use configuration here uncanonicalized to avoid exceeding size limits.
-
-
-## Unused?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
-## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
-## end of LIBX_BASE, but nothing ever set it.
-
-
-
-
-## Used in lwlib/Makefile.in.
-
-if test -n "${machfile}"; then
- M_FILE="\$(srcdir)/${machfile}"
-else
- M_FILE=
-fi
-S_FILE="\$(srcdir)/${opsysfile}"
-
-
-
-
-
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define EMACS_CONFIGURATION "${canonical}"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
-_ACEOF
-
-if test -n "$machfile"; then
-
-cat >>confdefs.h <<_ACEOF
-#define config_machfile "${machfile}"
-_ACEOF
-
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define config_opsysfile "${opsysfile}"
-_ACEOF
-
-
-XMENU_OBJ=
-XOBJ=
-FONT_OBJ=
-if test "${HAVE_X_WINDOWS}" = "yes" ; then
-
-$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
-
- XMENU_OBJ=xmenu.o
- XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
- FONT_OBJ=xfont.o
- if test "$HAVE_XFT" = "yes"; then
- FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
- elif test "$HAVE_FREETYPE" = "yes"; then
- FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
- fi
-
-fi
-
-
-
-
-WIDGET_OBJ=
-MOTIF_LIBW=
-if test "${USE_X_TOOLKIT}" != "none" ; then
- WIDGET_OBJ=widget.o
-
-$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
-
- if test "${USE_X_TOOLKIT}" = "LUCID"; then
-
-$as_echo "#define USE_LUCID 1" >>confdefs.h
-
- elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
-
-$as_echo "#define USE_MOTIF 1" >>confdefs.h
-
- MOTIF_LIBW=-lXm
- case "$opsys" in
- gnu-linux)
- ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
- MOTIF_LIBW="$MOTIF_LIBW -lXpm"
- ;;
-
- unixware)
- ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
- ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
- MOTIF_LIBW="MOTIF_LIBW -lXimp"
- ;;
-
- aix4-2)
- ## [email protected] says -li18n is needed by -lXm.
- MOTIF_LIBW="$MOTIF_LIBW -li18n"
- ;;
- esac
- MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
- fi
-fi
-
-
-TOOLKIT_LIBW=
-case "$USE_X_TOOLKIT" in
- MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
- LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
- none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
-esac
-
-
-if test "$USE_X_TOOLKIT" = "none"; then
- LIBXT_OTHER="\$(LIBXSM)"
- OLDXMENU_TARGET="really-oldXMenu"
-else
- LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
- OLDXMENU_TARGET="really-lwlib"
-fi
-
-
-## The X Menu stuff is present in the X10 distribution, but missing
-## from X11. If we have X10, just use the installed library;
-## otherwise, use our own copy.
-if test "${HAVE_X11}" = "yes" ; then
-
-$as_echo "#define HAVE_X11 1" >>confdefs.h
-
-
- if test "$USE_X_TOOLKIT" = "none"; then
- OLDXMENU="\${oldXMenudir}/libXMenu11.a"
- else
- OLDXMENU="\${lwlibdir}/liblw.a"
- fi
- LIBXMENU="\$(OLDXMENU)"
- LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
- OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
-else
- ## For a syntactically valid Makefile; not actually used for anything.
- ## See comments in src/Makefile.in.
- OLDXMENU=nothing
- ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
- if test "${HAVE_X_WINDOWS}" = "yes"; then
- LIBXMENU="-lXMenu"
- else
- LIBXMENU=
- fi
- LIBX_OTHER=
- OLDXMENU_DEPS=
-fi
-
-if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
- OLDXMENU_TARGET=
- OLDXMENU=nothing
- LIBXMENU=
- OLDXMENU_DEPS=
-fi
-
-
-
-
-
-
-
-if test "${HAVE_MENUS}" = "yes" ; then
-
-$as_echo "#define HAVE_MENUS 1" >>confdefs.h
-
-fi
-
-if test "${GNU_MALLOC}" = "yes" ; then
-
-$as_echo "#define GNU_MALLOC 1" >>confdefs.h
-
-fi
-
-RALLOC_OBJ=
-if test "${REL_ALLOC}" = "yes" ; then
-
-$as_echo "#define REL_ALLOC 1" >>confdefs.h
-
-
- test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
-fi
-
-
-if test "$opsys" = "cygwin"; then
- CYGWIN_OBJ="sheap.o"
- ## Cygwin differs because of its unexec().
- PRE_ALLOC_OBJ=
- POST_ALLOC_OBJ=lastfile.o
-else
- CYGWIN_OBJ=
- PRE_ALLOC_OBJ=lastfile.o
- POST_ALLOC_OBJ=
-fi
-
-
-
-
-
case "$opsys" in
aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
@@ -21472,10 +21910,18 @@ if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test
as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then
+ as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
+ as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 87d1211587..ae732a7db0 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,54 @@
+2011-07-11 Chong Yidong <[email protected]>
+
+ * killing.texi (Killing, Deletion and Killing, Killing by Lines)
+ (Other Kill Commands, Kill Options): Copyedits.
+ (Deletion and Killing, Kill Ring): Kill/yank now use clipboard.
+ (Yanking): Move yank-excluded properties discussion here.
+ (Cut and Paste): Move from frames.texi. Update subnodes to
+ describe x-select-enable-clipboard case.
+
+ * frames.texi: Move Cut and Paste node and subnodes into
+ killing.texi, except Mouse Commands and Word and Line Mouse.
+
+2011-07-10 Andy Moreton <[email protected]> (tiny change)
+
+ * makefile.w32-in (EMACSSOURCES): Replace major.texi with modes.texi.
+
+2011-07-10 Lars Magne Ingebrigtsen <[email protected]>
+
+ * screen.texi (Mode Line): Clarify that coding systems are
+ characters, not letters (bug#1749).
+
+ * cmdargs.texi (Environment): Mention removing variables
+ (bug#1615). Text suggested by Kevin Rodgers.
+
+2011-07-10 Chong Yidong <[email protected]>
+
+ * misc.texi (Amusements): Don't mention Yow; it's crippled.
+
+ * modes.texi: Rename from major.texi.
+ (Modes): New node. Make Major Modes and Minor Modes subsections
+ of this. All callers changed.
+
+ * custom.texi (Minor Modes): Move to modes.texi.
+
+2011-07-10 Chong Yidong <[email protected]>
+
+ * custom.texi (Syntax): Node deleted.
+
+ * help.texi (Help Summary):
+ * major.texi (Major Modes):
+ * programs.texi (Parentheses):
+ * search.texi (Regexp Backslash, Regexp Backslash)
+ (Regexp Backslash):
+ * text.texi (Words): Callers changed.
+
+ * text.texi (Refill, Longlines): Delete nodes.
+
+ * ack.texi (Acknowledgments): Longlines removed from manual.
+
+ * emacs.texi (Top): Update node listing.
+
2011-07-09 Glenn Morris <[email protected]>
* fortran-xtra.texi (Fortran): Update handled extensions.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index aca17ce817..9465c726eb 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -84,7 +84,7 @@ EMACSSOURCES= \
${srcdir}/windows.texi \
${srcdir}/frames.texi \
${srcdir}/mule.texi \
- ${srcdir}/major.texi \
+ ${srcdir}/modes.texi \
${srcdir}/indent.texi \
${srcdir}/text.texi \
${srcdir}/programs.texi \
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index e554c71703..1cfb3d9ffe 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -190,9 +190,7 @@ prior to Emacs 23 for Mac OS.
@item
Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many
-improvements to the Emacs display engine; and, together with Kai
-Gro�johann and Alex Schroeder, wrote @file{longlines.el}, a minor
-mode for wrapping long lines.
+improvements to the Emacs display engine.
@item
James Clark wrote SGML mode, a mode for editing SGML documents; and
@@ -689,14 +687,12 @@ the current window on which point is; @file{cap-words.el}, a minor mode
for motion in ``CapitalizedWordIdentifiers''; @file{latin1-disp.el}, a
package that lets you display ISO 8859 characters on Latin-1 terminals
by setting up appropriate display tables; @file{python.el}, a major mode
-for the Python programming language; @file{refill.el}, a mode for
-automatic paragraph refilling, akin to typical word processors;
-@file{smiley.el}, a facility for displaying smiley faces;
-@file{sym-comp.el}, a library for performing mode-dependent symbol
-completion; @file{benchmark.el} for timing code execution; and
-@file{tool-bar.el}, a mode to control the display of the Emacs tool bar.
-With Riccardo Murri he wrote @file{vc-bzr.el}, support for the Bazaar
-version control system.
+for the Python programming language; @file{smiley.el}, a facility for
+displaying smiley faces; @file{sym-comp.el}, a library for performing
+mode-dependent symbol completion; @file{benchmark.el} for timing code
+execution; and @file{tool-bar.el}, a mode to control the display of
+the Emacs tool bar. With Riccardo Murri he wrote @file{vc-bzr.el},
+support for the Bazaar version control system.
@item
Eric Ludlam wrote the Speedbar package; @file{checkdoc.el}, for checking
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 1c3b85559d..af493ade2f 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -427,10 +427,11 @@ software) inherit the environment from Emacs, too.
@vindex initial-environment
Inside Emacs, the command @kbd{M-x getenv} gets the value of an
environment variable. @kbd{M-x setenv} sets a variable in the Emacs
-environment. (Environment variable substitutions with @samp{$} work
-in the value just as in file names; see @ref{File Names with $}.) The
-variable @code{initial-environment} stores the initial environment
-inherited by Emacs.
+environment, and @kbd{C-u M-x setenv} removes a variable.
+(Environment variable substitutions with @samp{$} work in the value
+just as in file names; see @ref{File Names with $}.) The variable
+@code{initial-environment} stores the initial environment inherited by
+Emacs.
The way to set environment variables outside of Emacs depends on the
operating system, and especially the shell that you are using. For
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 434c574ac4..8465dd9351 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -23,169 +23,16 @@ Reference Manual}.
@end ifnottex
@menu
-* Minor Modes:: Each minor mode is a feature you can turn on
- independently of any others.
* Easy Customization:: Convenient way to browse and change settings.
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
you can control their functioning.
* Key Bindings:: The keymaps say what command each key runs.
By changing them, you can "redefine keys".
-* Syntax:: The syntax table controls how words and
- expressions are parsed.
* Init File:: How to write common customizations in the
@file{.emacs} file.
@end menu
-@node Minor Modes
-@section Minor Modes
-@cindex minor modes
-@cindex mode, minor
-
- Minor modes are optional features which you can turn on or off. For
-example, Auto Fill mode is a minor mode in which @key{SPC} breaks
-lines between words as you type. Minor modes are independent of one
-another and of the selected major mode. Most minor modes say in the
-mode line when they are enabled; for example, @samp{Fill} in the mode
-line means that Auto Fill mode is enabled.
-
- Each minor mode is associated with a command, called the @dfn{mode
-command}, which turns it on or off. The name of this command consists
-of the name of the minor mode, followed by @samp{-mode}; for instance,
-the mode command for Auto Fill mode is @code{auto-fill-mode}. Calling
-the minor mode command with no prefix argument @dfn{toggles} the mode,
-turning it on if it was off, and off if it was on. A positive
-argument always turns the mode on, and a zero or negative argument
-always turns it off. Mode commands are usually invoked with
-@kbd{M-x}, but you can bind keys to them if you wish (@pxref{Key
-Bindings}).
-
- Most minor modes also have a @dfn{mode variable}, with the same name
-as the mode command. Its value is non-@code{nil} if the mode is
-enabled, and @code{nil} if it is disabled. In some minor modes---but
-not all---the value of the variable alone determines whether the mode
-is active: the mode command works simply by setting the variable, and
-changing the value of the variable has the same effect as calling the
-mode command. Because not all minor modes work this way, we recommend
-that you avoid changing the mode variables directly; use the mode
-commands instead.
-
- Some minor modes are @dfn{buffer-local}: they apply only to the
-current buffer, so you can enable the mode in certain buffers and not
-others. Other minor modes are @dfn{global}: while enabled, they
-affect everything you do in the Emacs session, in all buffers. Some
-global minor modes are enabled by default.
-
- The following is a list of some buffer-local minor modes:
-
-@itemize @bullet
-@item
-Abbrev mode automatically expands text based on pre-defined
-abbreviation definitions. @xref{Abbrevs}.
-
-@item
-Auto Fill mode inserts newlines as you type to prevent lines from
-becoming too long. @xref{Filling}.
-
-@item
-Auto Save mode saves the buffer contents periodically to reduce the
-amount of work you can lose in case of a crash. @xref{Auto Save}.
-
-@item
-Enriched mode enables editing and saving of formatted text.
-@xref{Formatted Text}.
-
-@item
-Flyspell mode automatically highlights misspelled words.
-@xref{Spelling}.
-
-@item
-Font-Lock mode automatically highlights certain textual units found in
-programs. It is enabled globally by default, but you can disable it
-in individual buffers. @xref{Faces}.
-
-@findex linum-mode
-@cindex Linum mode
-@item
-Linum mode displays each line's line number in the window's left
-margin. Its mode command is @code{linum-mode}.
-
-@item
-Outline minor mode provides similar facilities to the major mode
-called Outline mode. @xref{Outline Mode}.
-
-@cindex Overwrite mode
-@cindex mode, Overwrite
-@findex overwrite-mode
-@kindex INSERT
-@item
-Overwrite mode causes ordinary printing characters to replace existing
-text instead of shoving it to the right. For example, if point is in
-front of the @samp{B} in @samp{FOOBAR}, then in Overwrite mode typing
-a @kbd{G} changes it to @samp{FOOGAR}, instead of producing
-@samp{FOOGBAR} as usual. In Overwrite mode, the command @kbd{C-q}
-inserts the next character whatever it may be, even if it is a
-digit---this gives you a way to insert a character instead of
-replacing an existing character. The mode command,
-@code{overwrite-mode}, is bound to the @key{Insert} key.
-
-@findex binary-overwrite-mode
-@item
-Binary Overwrite mode is a variant of Overwrite mode for editing
-binary files; it treats newlines and tabs like other characters, so
-that they overwrite other characters and can be overwritten by them.
-In Binary Overwrite mode, digits after @kbd{C-q} specify an octal
-character code, as usual.
-
-@item
-Visual Line mode performs ``word wrapping'', causing long lines to be
-wrapped at word boundaries. @xref{Visual Line Mode}.
-@end itemize
-
- Here are some useful global minor modes. Since Line Number mode and
-Transient Mark mode can be enabled or disabled just by setting the
-value of the minor mode variable, you @emph{can} set them differently
-for particular buffers, by explicitly making the corresponding
-variable local in those buffers. @xref{Locals}.
-
-@itemize @bullet
-@item
-Column Number mode enables display of the current column number in the
-mode line. @xref{Mode Line}.
-
-@item
-Delete Selection mode causes text insertion to first delete the text
-in the region, if the region is active. @xref{Using Region}.
-
-@item
-Icomplete mode displays an indication of available completions when
-you are in the minibuffer and completion is active. @xref{Completion
-Options}.
-
-@item
-Line Number mode enables display of the current line number in the
-mode line. It is enabled by default. @xref{Mode Line}.
-
-@item
-Menu Bar mode gives each frame a menu bar. It is enabled by default.
-@xref{Menu Bars}.
-
-@item
-Scroll Bar mode gives each window a scroll bar. It is enabled by
-default, but the scroll bar is only displayed on graphical terminals.
-@xref{Scroll Bars}.
-
-@item
-Tool Bar mode gives each frame a tool bar. It is enabled by default,
-but the tool bar is only displayed on graphical terminals. @xref{Tool
-Bars}.
-
-@item
-Transient Mark mode highlights the region, and makes many Emacs
-commands operate on the region when the mark is active. It is enabled
-by default. @xref{Mark}.
-@end itemize
-
@node Easy Customization
@section Easy Customization Interface
@@ -2085,36 +1932,6 @@ invoke it; disabling also applies if the command is invoked using
@kbd{M-x}. However, disabling a command has no effect on calling it
as a function from Lisp programs.
-@node Syntax
-@section The Syntax Table
-@cindex syntax table
-
- All the Emacs commands which parse words or balance parentheses are
-controlled by the @dfn{syntax table}. The syntax table says which
-characters are opening delimiters, which are parts of words, which are
-string quotes, and so on. It does this by assigning each character to
-one of fifteen-odd @dfn{syntax classes}. In some cases it specifies
-some additional information also.
-
- Each major mode has its own syntax table (though related major modes
-sometimes share one syntax table), which it installs in each buffer
-that uses the mode. The syntax table installed in the current buffer
-is the one that all commands use, so we call it ``the'' syntax table.
-
-@kindex C-h s
-@findex describe-syntax
- To display a description of the contents of the current syntax
-table, type @kbd{C-h s} (@code{describe-syntax}). The description of
-each character includes the string you would have to give to
-@code{modify-syntax-entry} to set up that character's current syntax,
-starting with the character which designates its syntax class, plus
-some English text to explain its meaning.
-
- A syntax table is actually a Lisp object, a char-table, whose
-elements are cons cells. For full information on the syntax table,
-see @ref{Syntax Tables,, Syntax Tables, elisp, The Emacs Lisp
-Reference Manual}.
-
@node Init File
@section The Init File, @file{~/.emacs}
@cindex init file
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index ed7d48877e..a35736f4fe 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -167,16 +167,15 @@ Important Text-Changing Commands
* Mark:: The mark: how to delimit a ``region'' of text.
* Killing:: Killing (cutting) text.
* Yanking:: Recovering killed text. Moving text. (Pasting.)
+* Cut and Paste:: Clipboard and selections on graphical displays.
* Accumulating Text:: Other ways of copying text.
-* Rectangles:: Operating on the text inside a rectangle on the screen.
-* CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} for copy
- and paste, with enhanced rectangle support.
+* Rectangles:: Operating on text in rectangular areas.
+* CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} to kill and yank.
* Registers:: Saving a text string or a location in the buffer.
* Display:: Controlling what text is displayed.
* Search:: Finding or replacing occurrences of a string.
* Fixit:: Commands especially useful for fixing typos.
-* Keyboard Macros:: A keyboard macro records a sequence of
- keystrokes to be replayed with a single command.
+* Keyboard Macros:: Recording a sequence of keystrokes to be replayed.
Major Structures of Emacs
* Files:: All about handling files.
@@ -186,13 +185,13 @@ Major Structures of Emacs
* International:: Using non-@acronym{ASCII} character sets.
Advanced Features
-* Major Modes:: Text mode vs. Lisp mode vs. C mode...
+* Modes:: Major and minor modes alter Emacs' basic behavior.
* Indentation:: Editing the white space at the beginnings of lines.
* Text:: Commands and modes for editing English.
* Programs:: Commands and modes for editing programs.
* Building:: Compiling, running and debugging programs.
* Maintaining:: Features for maintaining large programs.
-* Abbrevs:: How to define text abbreviations to reduce
+* Abbrevs:: Defining text abbreviations to reduce
the number of characters you must type.
@c AFAICS, the tex stuff generates its own index and does not use this one.
@ifnottex
@@ -204,9 +203,9 @@ Advanced Features
* Dired:: You can ``edit'' a directory to manage files in it.
* Calendar/Diary:: The calendar and diary facilities.
* Document View:: Viewing PDF, PS and DVI files.
-* Gnus:: How to read netnews with Emacs.
+* Gnus:: A flexible mail and news reader.
* Shell:: Executing shell commands from Emacs.
-* Emacs Server:: Using Emacs as an editing server for @code{mail}, etc.
+* Emacs Server:: Using Emacs as an editing server.
* Printing:: Printing hardcopies of buffers or regions.
* Sorting:: Sorting lines, paragraphs or pages within Emacs.
* Narrowing:: Restricting display and editing to a portion
@@ -331,6 +330,12 @@ Yanking
* Appending Kills:: Several kills in a row all yank together.
* Earlier Kills:: Yanking something killed some time ago.
+Killing and Yanking on Graphical Displays
+
+* Clipboard:: How Emacs interacts with the system clipboard.
+* Primary Selection:: The temporarily selected text selection.
+* Secondary Selection:: Cutting without altering point and mark.
+
Registers
* RegPos:: Saving positions in registers.
@@ -495,7 +500,8 @@ Multiple Windows
Frames and Graphical Displays
-* Cut and Paste:: Mouse commands for cut and paste.
+* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
+* Word and Line Mouse:: Mouse commands for selecting whole words or lines.
* Mouse References:: Using the mouse to select an item from a list.
* Menu Mouse Clicks:: Mouse clicks that bring up menus.
* Mode Line Mouse:: Mouse clicks on the mode line.
@@ -517,14 +523,6 @@ Frames and Graphical Displays
* Non-Window Terminals:: Multiple frames on terminals that show only one.
* Text-Only Mouse:: Using the mouse in text-only terminals.
-Killing and Yanking on Graphical Displays
-
-* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
-* Word and Line Mouse:: Mouse commands for selecting whole words or lines.
-* Cut/Paste Other App:: Transfering text between Emacs and other apps.
-* Secondary Selection:: Cutting without altering point and mark.
-* Clipboard:: Using the clipboard for selections.
-
International Character Set Support
* International Chars:: Basic concepts of multibyte characters.
@@ -551,9 +549,12 @@ International Character Set Support
to use without multibyte characters.
* Charsets:: How Emacs groups its internal character codes.
-Major Modes
+Modes
-* Choosing Modes:: How major modes are specified or chosen.
+* Major Modes:: Text mode vs. Lisp mode vs. C mode...
+* Minor Modes:: Each minor mode is a feature you can turn on
+ independently of any others.
+* Choosing Modes:: How modes are chosen when visiting files.
Indentation
@@ -585,8 +586,6 @@ Filling Text
* Fill Prefix:: Filling paragraphs that are indented
or in a comment, etc.
* Adaptive Fill:: How Emacs can determine the fill prefix automatically.
-* Refill:: Keeping paragraphs filled.
-* Longlines:: Editing text with very long lines.
Outline Mode
@@ -1062,16 +1061,12 @@ Hyperlinking and Navigation Features
Customization
-* Minor Modes:: Each minor mode is a feature you can turn on
- independently of any others.
* Easy Customization:: Convenient way to browse and change settings.
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
you can control their functioning.
-* Key Bindings:: The keymaps say what command each key runs.
- By changing them, you can "redefine keys".
-* Syntax:: The syntax table controls how words and
- expressions are parsed.
+* Key Bindings:: Keymaps say what command each key runs.
+ By changing them, you can ``redefine'' keys.
* Init File:: How to write common customizations in the
@file{.emacs} file.
@@ -1491,7 +1486,7 @@ Lisp programming.
@include windows.texi
@include frames.texi
@include mule.texi
-@include major.texi
+@include modes.texi
@include indent.texi
@include text.texi
@c Includes fortran-xtra.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 633b65251e..0fc4dfa427 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -33,7 +33,8 @@ so that you can use many of the features described in this chapter.
@end ifnottex
@menu
-* Cut and Paste:: Mouse commands for cut and paste.
+* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
+* Word and Line Mouse:: Mouse commands for selecting whole words or lines.
* Mouse References:: Using the mouse to select an item from a list.
* Menu Mouse Clicks:: Mouse clicks that bring up menus.
* Mode Line Mouse:: Mouse clicks on the mode line.
@@ -56,22 +57,8 @@ so that you can use many of the features described in this chapter.
* Text-Only Mouse:: Using the mouse in text-only terminals.
@end menu
-@node Cut and Paste
-@section Cutting and Pasting on Graphical Displays
-
- This section describes commands for selecting a region, cutting, and
-pasting using the mouse.
-
-@menu
-* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
-* Word and Line Mouse:: Mouse commands for selecting whole words or lines.
-* Cut/Paste Other App:: Transfering text between Emacs and other apps.
-* Secondary Selection:: Cutting without altering point and mark.
-* Clipboard:: Using the clipboard for selections.
-@end menu
-
@node Mouse Commands
-@subsection Mouse Commands for Editing
+@section Mouse Commands for Editing
@cindex mouse buttons (what they do)
@kindex Mouse-1
@@ -141,7 +128,7 @@ variable @code{mouse-yank-at-point} to a non-@code{nil} value,
@kbd{Mouse-2} does not move point. Then it does not matter where you
click, or even which of the frame's windows you click on; the yank
occurs at the existing point. This variable also affects yanking the
-primary and secondary selections (@pxref{Cut/Paste Other App}).
+primary and secondary selections (@pxref{Primary Selection}).
@findex mouse-save-then-kill
Clicking with the right mouse button, @kbd{Mouse-3}, runs the
@@ -195,7 +182,7 @@ make Emacs behave this way by enabling Delete Selection mode.
@xref{Using Region}.
@node Word and Line Mouse
-@subsection Mouse Commands for Words and Lines
+@section Mouse Commands for Words and Lines
These variants of @kbd{Mouse-1} select entire words or lines at a
time. Emacs activates the region around the selected text, which is
@@ -224,164 +211,6 @@ Select the line you click on.
Select the text you drag across, in the form of whole lines.
@end table
-@node Cut/Paste Other App
-@subsection Cut and Paste with Other Window Applications
-
-@cindex X cutting and pasting
-@cindex X selection
-@cindex primary selection
-@cindex selection, primary
- When running Emacs under the X window system, you can easily
-transfer text between Emacs and other X applications using the
-@dfn{primary selection} (also called the @dfn{X selection}). This is
-@emph{not} the same thing as the @dfn{clipboard}, which is a separate
-facility used on desktop environments such as Gnome, and on operating
-systems such as Microsoft Windows (@pxref{Clipboard}).
-
- Under X, whenever you select some text in Emacs by dragging or
-clicking the mouse (@pxref{Mouse Commands}), it is also saved in the
-primary selection. You can then @dfn{paste} that text into any other
-X application, usually by clicking @kbd{Mouse-2} in that application.
-Unlike the Emacs kill ring (@pxref{Kill Ring}), the primary selection
-has no ``memory'': each time you save something in the primary
-selection, either in Emacs or in another X application, the previous
-contents of the primary selection are lost.
-
-@cindex MS-Windows, and primary selection
- MS-Windows provides no primary selection, but Emacs emulates it
-within a single Emacs session, by storing the selected text
-internally. Therefore, all the features and commands related to the
-primary selection work on Windows as they do on X, for cutting and
-pasting within the same session, but not across Emacs sessions or with
-other applications.
-
- Whenever you kill some text using a command such as @kbd{C-w}
-(@code{kill-region}), or copy it into the kill ring using a command
-such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in
-the primary selection. @xref{Killing}.
-
-@vindex select-active-regions
- If you set the region using the keyboard---for instance, by typing
-@kbd{C-@key{SPC}} and moving point away from the mark---the text in
-the region is not normally saved to the primary selection. However,
-if you change the variable @code{select-active-regions} to @code{t},
-the region is saved to the primary selection whenever you activate the
-mark. Each change to the region also updates the primary selection.
-
-@vindex yank-pop-change-selection
- If you change @code{yank-pop-change-selection} to @code{t}, rotating
-the kill ring with @kbd{M-y} (@code{yank-pop}) also saves the new yank
-to the primary selection (@pxref{Yanking}).
-
-@vindex save-interprogram-paste-before-kill
- If you change @code{save-interprogram-paste-before-kill} to
-@code{t}, each kill command first saves the existing selection onto
-the kill ring. This prevents you from losing the existing selection,
-at the risk of large memory consumption if other applications generate
-large selections.
-
- You can yank the primary selection into Emacs using the usual yank
-commands, such as @kbd{C-y} (@code{yank}) and @kbd{Mouse-2}
-(@code{mouse-yank-at-click}). These commands actually check the
-primary selection before referring to the kill ring; if no primary
-selection is available, the kill ring contents are used. To prevent
-yank commands from accessing the primary selection, set the variable
-@code{x-select-enable-primary} to @code{nil}.
-
- The standard coding system for the primary selection is
-@code{compound-text-with-extensions}. You may find that the pasted
-text is not what you expected. In such a case, you can specify
-another coding system for the selection by typing @kbd{C-x @key{RET}
-x} or @kbd{C-x @key{RET} X}. Alternatively, you can request a
-different data type by modifying the variable
-@code{x-select-request-type}. @xref{Communication Coding}.
-
-@node Secondary Selection
-@subsection Secondary Selection
-@cindex secondary selection
-
- In addition to the primary selection, the X Window System provides a
-second similar facility known as the @dfn{secondary selection}.
-Nowadays, few X applications make use of the secondary selection, but
-you can access it using the following Emacs commands:
-
-@table @kbd
-@findex mouse-set-secondary
-@kindex M-Drag-Mouse-1
-@item M-Drag-Mouse-1
-Set the secondary selection, with one end at the place where you press
-down the button, and the other end at the place where you release it
-(@code{mouse-set-secondary}). The selected text is highlighted, using
-the @code{secondary-selection} face, as you drag. The window scrolls
-automatically if you drag the mouse off the top or bottom of the
-window, just like @code{mouse-set-region} (@pxref{Mouse Commands}).
-
-This command does not alter the kill ring.
-
-@findex mouse-start-secondary
-@kindex M-Mouse-1
-@item M-Mouse-1
-Set one endpoint for the @dfn{secondary selection}
-(@code{mouse-start-secondary}).
-
-@findex mouse-secondary-save-then-kill
-@kindex M-Mouse-3
-@item M-Mouse-3
-Set the secondary selection, with one end at the position clicked and
-the other at the position specified with @kbd{M-Mouse-1}
-(@code{mouse-secondary-save-then-kill}). This also puts the selected
-text in the kill ring. A second @kbd{M-Mouse-3} at the same place
-kills the secondary selection just made.
-
-@findex mouse-yank-secondary
-@kindex M-Mouse-2
-@item M-Mouse-2
-Insert the secondary selection where you click, placing point at the
-end of the yanked text (@code{mouse-yank-secondary}).
-@end table
-
-Double or triple clicking of @kbd{M-Mouse-1} operates on words and
-lines, much like @kbd{Mouse-1}.
-
-If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks
-at point. Then it does not matter precisely where you click, or even
-which of the frame's windows you click on. @xref{Mouse Commands}.
-
-@node Clipboard
-@subsection Using the Clipboard
-@cindex clipboard
-
- In desktop environments such as Gnome, and operating systems such as
-Microsoft Windows and Mac OS X, you can transfer data (usually text)
-between different applications using the @dfn{clipboard}. The
-clipboard is distinct from the primary selection and secondary
-selection discussed earlier. You can access the clipboard through the
-@samp{Edit} menu of the menu bar (@pxref{Menu Bar}).
-
-@cindex cut
-@findex clipboard-kill-region
- The command @code{clipboard-kill-region}, which is bound to the
-@code{Cut} menu item, kills the region and saves it in the clipboard.
-
-@cindex copy
-@findex clipboard-kill-ring-save
- The command @code{clipboard-kill-ring-save}, which is bound to the
-@code{Copy} menu item, copies the region to the kill ring and saves it
-in the clipboard.
-
-@findex clipboard-yank
-@cindex paste
- The @code{Paste} menu item in the Edit menu yanks the contents of
-the clipboard at point (@code{clipboard-yank}).
-
-@vindex x-select-enable-clipboard
- You can customize the variable @code{x-select-enable-clipboard} to
-make the Emacs yank functions consult the clipboard before the primary
-selection, and to make the kill functions to store in the clipboard as
-well as the primary selection. Otherwise, these commands do not
-access the clipboard at all. Using the clipboard is the default on
-MS-Windows and Mac OS, but not on other systems.
-
@node Mouse References
@section Following References with the Mouse
@kindex Mouse-1 @r{(selection)}
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index 3cf1cc522b..e37e80bfab 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -962,7 +962,7 @@ special Emacs commands for moving over and operating on paragraphs.
@item Parsing
We say that certain Emacs commands parse words or expressions in the
text being edited. Really, all they know how to do is find the other
-end of a word or expression. @xref{Syntax}.
+end of a word or expression.
@item Point
Point is the place in the buffer at which insertion and deletion
@@ -1212,7 +1212,8 @@ See `font lock.'
@item Syntax Table
The syntax table tells Emacs which characters are part of a word,
which characters balance each other like parentheses, etc.
-@xref{Syntax}.
+@xref{Syntax Tables,, Syntax Tables, elisp, The Emacs Lisp Reference
+Manual}.
@item Super
Super is the name of a modifier bit that a keyboard input character may
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index e00f8b9115..76a9f2413b 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -139,8 +139,11 @@ command.
@item C-h r
Display the Emacs manual in Info (@code{info-emacs-manual}).
@item C-h s
-Display the current contents of the syntax table, with an explanation of
-what they mean (@code{describe-syntax}). @xref{Syntax}.
+Display the current contents of the @dfn{syntax table}, with an
+explanation of what they mean (@code{describe-syntax}). The syntax
+table says which characters are opening delimiters, which are parts of
+words, which are string quotes, and so on. @xref{Syntax Tables,,
+Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for details.
@item C-h t
Enter the Emacs interactive tutorial (@code{help-with-tutorial}).
@item C-h v @var{var} @key{RET}
@@ -583,7 +586,8 @@ bindings now in effect: first the local bindings of the current minor
modes, then the local bindings defined by the current major mode, and
finally the global bindings (@pxref{Key Bindings}). @kbd{C-h s}
displays the contents of the syntax table, with explanations of each
-character's syntax (@pxref{Syntax}).
+character's syntax (@pxref{Syntax Tables,, Syntax Tables, elisp, The
+Emacs Lisp Reference Manual}).
You can get a list of subcommands for a particular prefix key by
typing @kbd{C-h} after the prefix key. (There are a few prefix keys
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi
index c4ef4781aa..e13b2808f0 100644
--- a/doc/emacs/indent.texi
+++ b/doc/emacs/indent.texi
@@ -2,7 +2,7 @@
@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Indentation, Text, Major Modes, Top
+@node Indentation, Text, Modes, Top
@chapter Indentation
@cindex indentation
@cindex tabs
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 41262e9c2d..38124fc315 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -6,20 +6,24 @@
@node Killing, Registers, Mark, Top
@chapter Killing and Moving Text
- @dfn{Killing} means erasing text and copying it into the @dfn{kill
-ring}, from which you can bring it back into the buffer by
-@dfn{yanking} it. (Some applications use the terms ``cutting'' and
-``pasting'' for similar operations.) This is the most common way of
-moving or copying text within Emacs. It is very versatile, because
-there are commands for killing many different types of syntactic
-units.
+ In Emacs, @dfn{killing} means erasing text and copying it into the
+@dfn{kill ring}. @dfn{Yanking} means bringing text from the kill ring
+back into the buffer. (Some applications use the terms ``cutting''
+and ``pasting'' for similar operations.) The kill ring is so-named
+because it can be visualized as a set of blocks of text arranged in a
+ring, which you can access in cyclic order. @xref{Kill Ring}.
+
+ Killing and yanking are the most common way to move or copy text
+within Emacs. It is very versatile, because there are commands for
+killing many different types of syntactic units.
@menu
* Deletion and Killing:: Commands that remove text.
* Yanking:: Commands that insert text.
+* Cut and Paste:: Clipboard and selections on graphical displays.
* Accumulating Text:: Other methods to add text to the buffer.
* Rectangles:: Operating on text in rectangular areas.
-* CUA Bindings:: Using C-x/C-c/C-v to kill and yank.
+* CUA Bindings:: Using @kbd{C-x}/@kbd{C-c}/@kbd{C-v} to kill and yank.
@end menu
@node Deletion and Killing
@@ -29,25 +33,28 @@ units.
@cindex cutting text
@cindex deletion
Most commands which erase text from the buffer save it in the kill
-ring. These are known as @dfn{kill} commands. The kill ring stores
-several recent kills, not just the last one, so killing is a very safe
-operation: when you make a new kill, you don't have to worry much
-about losing text that you previously killed.
+ring. These are known as @dfn{kill} commands, and their names
+normally contain the word @samp{kill} (e.g. @code{kill-line}). The
+kill ring stores several recent kills, not just the last one, so
+killing is a very safe operation: you don't have to worry much about
+losing text that you previously killed. The kill ring is shared by
+all buffers, so text that is killed in one buffer can be yanked into
+another buffer.
+
+ When you use @kbd{C-/} (@code{undo}) to undo a kill command
+(@pxref{Undo}), that brings the killed text back into the buffer, but
+does not remove it from the kill ring.
- You can yank text from the kill ring into any position in a buffer,
-including a position in a different buffer; the kill ring is shared by
-all buffers. The @kbd{C-/} (@code{undo}) command can undo both kill
-and delete commands (@pxref{Undo}); the importance of the kill ring is
-that you can yank the text in a different place.
+ On graphical displays, killing text also copies it to the system
+clipboard. @xref{Cut and Paste}.
Commands that erase text but do not save it in the kill ring are
-known as @dfn{delete} commands. These include @kbd{C-d}
-(@code{delete-char}) and @key{DEL} (@code{delete-backward-char}),
-which delete only one character at a time, and those commands that
-delete only spaces or newlines. Commands that can erase significant
-amounts of nontrivial data generally do a kill operation instead. The
-commands' names and individual descriptions use the words @samp{kill}
-and @samp{delete} to say which kind of operation they perform.
+known as @dfn{delete} commands; their names usually contain the word
+@samp{delete}. These include @kbd{C-d} (@code{delete-char}) and
+@key{DEL} (@code{delete-backward-char}), which delete only one
+character at a time, and those commands that delete only spaces or
+newlines. Commands that can erase significant amounts of nontrivial
+data generally do a kill operation instead.
You can also use the mouse to kill and yank. @xref{Cut and Paste}.
@@ -127,21 +134,22 @@ Kill an entire line at once (@code{kill-whole-line})
@kindex C-k
@findex kill-line
- The simplest kill command is @kbd{C-k}. If given at the beginning
-of a line, it kills all the text on the line@footnote{Here, ``line''
-means a logical text line, not a screen line. @xref{Continuation
-Lines}.}, leaving it blank. When used on a blank line, it kills the
-whole line including its newline.
-
- More precisely, @kbd{C-k} kills from point up to the end of the
-line, unless it is at the end of a line. In that case it kills the
-newline following point, thus merging the next line into the current
-one. Spaces and tabs at the end of the line are ignored when deciding
-which case applies, so as long as point is after the last visible
+ The simplest kill command is @kbd{C-k} (@code{kill-line}). If used
+at the end of a line, it kills the line-ending newline character,
+merging the next line into the current one (thus, a blank line is
+entirely removed). Otherwise, @kbd{C-k} kills all the text from point
+up to the end of the line; if point was originally at the beginning of
+the line, this leaves the line blank.
+
+ Spaces and tabs at the end of the line are ignored when deciding
+which case applies. As long as point is after the last visible
character in the line, you can be sure that @kbd{C-k} will kill the
newline. To kill an entire non-blank line, go to the beginning and
type @kbd{C-k} twice.
+ In this context, ``line'' means a logical text line, not a screen
+line (@pxref{Continuation Lines}).
+
When @kbd{C-k} is given a positive argument @var{n}, it kills
@var{n} lines and the newlines that follow them (text on the current
line before point is not killed). With a negative argument
@@ -157,10 +165,10 @@ following newline. This variable is normally @code{nil}.
@kindex C-S-backspace
@findex kill-whole-line
- @kbd{C-S-backspace} (@code{kill-whole-line}) will kill a whole line
-including its newline regardless of the position of point within the
-line. Note that many character terminals will prevent you from typing
-the key sequence @kbd{C-S-backspace}.
+ @kbd{C-S-backspace} (@code{kill-whole-line}) kills a whole line
+including its newline, regardless of the position of point within the
+line. Note that many text terminals will prevent you from typing the
+key sequence @kbd{C-S-backspace}.
@node Other Kill Commands
@subsection Other Kill Commands
@@ -196,10 +204,8 @@ last set. The mark is deactivated at the end of the command.
@kindex M-w
@findex kill-ring-save
- The command @kbd{M-w} (@code{kill-ring-save}) copies the region into
-the kill ring without removing it from the buffer. This is
-approximately equivalent to @kbd{C-w} followed by @kbd{C-/}, except
-that @kbd{M-w} does not alter the undo history.
+ @kbd{M-w} (@code{kill-ring-save}) copies the region into the kill
+ring without removing it from the buffer.
Emacs also provides commands to kill specific syntactic units:
words, with @kbd{M-@key{DEL}} and @kbd{M-d} (@pxref{Words}); balanced
@@ -220,12 +226,10 @@ search backward and kill text before point.
@vindex kill-read-only-ok
@cindex read-only text, killing
Some specialized buffers contain @dfn{read-only text}, which cannot
-be modified and therefore cannot be killed. But some users like to
-use the kill commands to copy read-only text into the kill ring,
-without actually changing it. Therefore, the kill commands work
-specially in a read-only buffer: they move over text, and copy it to
+be modified and therefore cannot be killed. The kill commands work
+specially in a read-only buffer: they move over text and copy it to
the kill ring, without actually deleting it from the buffer.
-Normally, kill commands beep and display an error message when this
+Normally, they also beep and display an error message when this
happens. But if you set the variable @code{kill-read-only-ok} to a
non-@code{nil} value, they just print a message in the echo area to
explain why the text has not been erased.
@@ -257,10 +261,16 @@ Replace text just yanked with an earlier batch of killed text
Append next kill to last batch of killed text (@code{append-next-kill}).
@end table
- On graphical displays with window systems, if there is a current
-selection in some other application, and you selected it more recently
-than you killed any text in Emacs, @kbd{C-y} copies the selection
-instead of text killed within Emacs.
+@cindex yanking and text properties
+@vindex yank-excluded-properties
+ The yank commands discard certain properties from the yanked text.
+These are properties that might lead to annoying results, such as
+causing the text to respond to the mouse or specifying key bindings.
+The list of properties to discard is stored in the variable
+@code{yank-excluded-properties}. These properties are also discarded
+when yanking register contents and rectangles. @xref{Text
+Properties,,, elisp, the Emacs Lisp Reference Manual}, for more
+information about text properties.
@menu
* Kill Ring:: Where killed text is stored. Basic yanking.
@@ -271,38 +281,34 @@ instead of text killed within Emacs.
@node Kill Ring
@subsection The Kill Ring
- All killed text is recorded in the @dfn{kill ring}, a list of blocks
-of text that have been killed. There is only one kill ring, shared by
-all buffers, so you can kill text in one buffer and yank it in another
-buffer. This is the usual way to move text from one file to another.
-(There are several other methods: for instance, you could store the
-text in a register. @xref{Registers}, for information about
-registers. @xref{Accumulating Text}, for some other ways to move text
-around.)
+ The @dfn{kill ring} is a list of blocks of text that were previously
+killed. There is only one kill ring, shared by all buffers, so you
+can kill text in one buffer and yank it in another buffer. This is
+the usual way to move text from one file to another. (There are
+several other methods: for instance, you could store the text in a
+register; see @ref{Registers}. @xref{Accumulating Text}, for some
+other ways to move text around.)
@kindex C-y
@findex yank
- The command @kbd{C-y} (@code{yank}) reinserts the text of the most
-recent kill, leaving the cursor at the end of the text. It also adds
-the position of the beginning of the text to the mark ring, without
-activating the mark; this allows you to jump easily to that position
-with @kbd{C-x C-x} (@pxref{Setting Mark}). With a plain prefix
-argument (@kbd{C-u C-y}), it instead leaves the cursor in front of the
-text, and adds the position of the end of the text to the mark ring.
-Using other sort of prefix argument specifies an earlier kill; for
-example, @kbd{C-u 4 C-y} reinserts the fourth most recent kill.
-@xref{Earlier Kills}.
-
-@cindex yanking and text properties
-@vindex yank-excluded-properties
- The yank commands discard certain properties from the yanked text.
-These are properties that might lead to annoying results, such as
-causing the text to respond to the mouse or specifying key bindings.
-The list of properties to discard is stored in the variable
-@code{yank-excluded-properties}. Yanking of register contents and
-rectangles also discard these properties. @xref{Text Properties,,,
-elisp, the Emacs Lisp Reference Manual}, for more information about
-text properties.
+ @kbd{C-y} (@code{yank}) reinserts the text of the most recent kill,
+leaving the cursor at the end of the text. It also adds the position
+of the beginning of the text to the mark ring, without activating the
+mark; this allows you to jump easily to that position with @kbd{C-x
+C-x} (@pxref{Setting Mark}).
+
+ On graphical displays, @kbd{C-y} first checks if another application
+has placed any text in the system clipboard more recently than the
+last Emacs kill. If so, it inserts from the clipboard instead of the
+kill ring. Conceptually, you can think of the clipboard as an
+``extra'' entry in the kill ring, which is present if you recently cut
+or copied some text in another application. @xref{Cut and Paste}.
+
+ With a plain prefix argument (@kbd{C-u C-y}), the @code{yank}
+command instead leaves the cursor in front of the text, and adds the
+position of the end of the text to the mark ring. Using any other
+prefix argument specifies an earlier kill; for example, @kbd{C-u 4
+C-y} reinserts the fourth most recent kill. @xref{Earlier Kills}.
@node Appending Kills
@subsection Appending Kills
@@ -418,6 +424,177 @@ saved.
@code{kill-ring}; you can view the entire contents of the kill ring with
the command @kbd{C-h v kill-ring}.
+@node Cut and Paste
+@section ``Cut and Paste'' Operations on Graphical Displays
+@cindex cut
+@cindex copy
+@cindex paste
+
+ In most graphical desktop environments, you can transfer data
+(usually text) between different applications using a system facility
+called the @dfn{clipboard}. On X, two other similar facilities are
+available: the primary selection and the secondary selection. When
+Emacs is run on a graphical display, its kill and yank commands
+integrate with these facilities, so that you can easily transfer text
+between Emacs and other graphical applications.
+
+ By default, Emacs uses UTF-8 as the coding system for inter-program
+text transfers. If you find that the pasted text is not what you
+expected, you can specify another coding system by typing @kbd{C-x
+@key{RET} x} or @kbd{C-x @key{RET} X}. You can also request a
+different data type by customizing @code{x-select-request-type}.
+@xref{Communication Coding}.
+
+@menu
+* Clipboard:: How Emacs uses the system clipboard.
+* Primary Selection:: The temporarily selected text selection.
+* Secondary Selection:: Cutting without altering point and mark.
+@end menu
+
+@node Clipboard
+@subsection Using the Clipboard
+@cindex clipboard
+
+ The @dfn{clipboard} is the facility that most graphical applications
+use for ``cutting and pasting''. When the clipboard exists, the kill
+and yank commands in Emacs make use of it.
+
+ When you kill some text with a command such as @kbd{C-w}
+(@code{kill-region}), or copy it to the kill ring with a command such
+as @kbd{M-w} (@code{kill-ring-save}), that text is also put in the
+clipboard. @xref{Killing}.
+
+@vindex save-interprogram-paste-before-kill
+ When an Emacs kill command puts text in the clipboard, the existing
+clipboard contents are normally lost. Optionally, you can change
+@code{save-interprogram-paste-before-kill} to @code{t}. Then Emacs
+will first save the clipboard to its kill ring, preventing you from
+losing the old clipboard data---at the risk of high memory consumption
+if that data turns out to be large.
+
+ The usual yank commands, such as @kbd{C-y} (@code{yank}), also use
+the clipboard. If another application ``owns'' the clipboard---i.e.,
+if you cut or copied text there more recently than your last kill
+command in Emacs---then Emacs yanks from the clipboard instead of the
+kill ring. Otherwise, it yanks from the kill ring, as described in
+@ref{Yanking}.
+
+@vindex yank-pop-change-selection
+ Normally, rotating the kill ring with @kbd{M-y} (@code{yank-pop})
+does not alter the clipboard. However, if you change
+@code{yank-pop-change-selection} to @code{t}, then @kbd{M-y} saves the
+new yank to the clipboard.
+
+@vindex x-select-enable-clipboard
+ To prevent kill and yank commands from accessing the clipboard,
+change the variable @code{x-select-enable-clipboard} to @code{nil}.
+
+@vindex x-select-enable-primary
+@findex clipboard-kill-region
+@findex clipboard-kill-ring-save
+@findex clipboard-yank
+ Prior to Emacs 24, the kill and yank commands used the primary
+selection (@pxref{Primary Selection}), not the clipboard. If you
+prefer this behavior, change @code{x-select-enable-clipboard} to
+@code{nil}, @code{x-select-enable-primary} to @code{t}, and
+@code{mouse-drag-copy-region} to @code{t}. In this case, you can use
+the following commands to act explicitly on the clipboard:
+@code{clipboard-kill-region} kills the region and saves it to the
+clipboard; @code{clipboard-kill-ring-save} copies the region to the
+kill ring and saves it to the clipboard; and @code{clipboard-yank}
+yanks the contents of the clipboard at point.
+
+@node Primary Selection
+@subsection Cut and Paste with Other Window Applications
+@cindex X cutting and pasting
+@cindex X selection
+@cindex primary selection
+@cindex selection, primary
+
+ Under the X window system, there exists a @dfn{primary selection}
+containing the last stretch of text selected in an X application
+(usually by dragging the mouse). Typically, this text can be inserted
+into other X applications by @kbd{mouse-2} clicks. The primary
+selection is separate from the clipboard (@pxref{Clipboard}). Its
+contents are more ``fragile''; they are overwritten by any mouse
+selection, whereas the clipboard is only overwritten by explicit
+``cut'' or ``copy'' commands.
+
+ Under X, whenever you select some text in Emacs by dragging or
+clicking the mouse (@pxref{Mouse Commands}), it is also saved to the
+primary selection.
+
+@vindex select-active-regions
+ If you set the region using the keyboard---for instance, by typing
+@kbd{C-@key{SPC}} and moving point away from the mark---the text in
+the region is also saved to the primary selection. (The updating of
+the primary selection is done at the end of each command, as long as
+the region is active and non-empty.) To disable this behavior, change
+the variable @code{select-active-regions} to @code{nil}.
+
+ To insert the primary selection into an Emacs buffer, click
+@kbd{mouse-2} (@code{mouse-yank-primary}) where you want to insert it.
+@xref{Mouse Commands}.
+
+@cindex MS-Windows, and primary selection
+ MS-Windows provides no primary selection, but Emacs emulates it
+within a single Emacs session by storing the selected text internally.
+Therefore, all the features and commands related to the primary
+selection work on Windows as they do on X, for cutting and pasting
+within the same session, but not across Emacs sessions or with other
+applications.
+
+@node Secondary Selection
+@subsection Secondary Selection
+@cindex secondary selection
+
+ In addition to the primary selection, the X Window System provides a
+second similar facility known as the @dfn{secondary selection}.
+Nowadays, few X applications make use of the secondary selection, but
+you can access it using the following Emacs commands:
+
+@table @kbd
+@findex mouse-set-secondary
+@kindex M-Drag-Mouse-1
+@item M-Drag-Mouse-1
+Set the secondary selection, with one end at the place where you press
+down the button, and the other end at the place where you release it
+(@code{mouse-set-secondary}). The selected text is highlighted, using
+the @code{secondary-selection} face, as you drag. The window scrolls
+automatically if you drag the mouse off the top or bottom of the
+window, just like @code{mouse-set-region} (@pxref{Mouse Commands}).
+
+This command does not alter the kill ring.
+
+@findex mouse-start-secondary
+@kindex M-Mouse-1
+@item M-Mouse-1
+Set one endpoint for the @dfn{secondary selection}
+(@code{mouse-start-secondary}).
+
+@findex mouse-secondary-save-then-kill
+@kindex M-Mouse-3
+@item M-Mouse-3
+Set the secondary selection, with one end at the position clicked and
+the other at the position specified with @kbd{M-Mouse-1}
+(@code{mouse-secondary-save-then-kill}). This also puts the selected
+text in the kill ring. A second @kbd{M-Mouse-3} at the same place
+kills the secondary selection just made.
+
+@findex mouse-yank-secondary
+@kindex M-Mouse-2
+@item M-Mouse-2
+Insert the secondary selection where you click, placing point at the
+end of the yanked text (@code{mouse-yank-secondary}).
+@end table
+
+Double or triple clicking of @kbd{M-Mouse-1} operates on words and
+lines, much like @kbd{Mouse-1}.
+
+If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks
+at point. Then it does not matter precisely where you click, or even
+which of the frame's windows you click on. @xref{Mouse Commands}.
+
@node Accumulating Text
@section Accumulating Text
@findex append-to-buffer
diff --git a/doc/emacs/major.texi b/doc/emacs/major.texi
deleted file mode 100644
index 9256c712f0..0000000000
--- a/doc/emacs/major.texi
+++ /dev/null
@@ -1,237 +0,0 @@
-@c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
-@c Free Software Foundation, Inc.
-@c See file emacs.texi for copying conditions.
-@node Major Modes, Indentation, International, Top
-@chapter Major Modes
-@cindex major modes
-@cindex mode, major
-@kindex TAB @r{(and major modes)}
-@kindex DEL @r{(and major modes)}
-@kindex C-j @r{(and major modes)}
-
- Emacs provides many alternative @dfn{major modes}, each of which
-customizes Emacs for editing text of a particular sort. The major modes
-are mutually exclusive, and each buffer has one major mode at any time.
-The mode line normally shows the name of the current major mode, in
-parentheses (@pxref{Mode Line}).
-
- The least specialized major mode is called @dfn{Fundamental mode}.
-This mode has no mode-specific redefinitions or variable settings, so
-that each Emacs command behaves in its most general manner, and each
-user option variable is in its default state. For editing text of a
-specific type that Emacs knows about, such as Lisp code or English
-text, you should switch to the appropriate major mode, such as Lisp
-mode or Text mode.
-
- Selecting a major mode changes the meanings of a few keys to become
-more specifically adapted to the language being edited. The ones that
-are changed frequently are @key{TAB}, @key{DEL}, and @kbd{C-j}. The
-prefix key @kbd{C-c} normally contains mode-specific commands. In
-addition, the commands which handle comments use the mode to determine
-how comments are to be delimited. Many major modes redefine the
-syntactical properties of characters appearing in the buffer.
-@xref{Syntax}.
-
- The major modes fall into three major groups. The first group
-contains modes for normal text, either plain or with mark-up. It
-includes Text mode, HTML mode, SGML mode, @TeX{} mode and Outline
-mode. The second group contains modes for specific programming
-languages. These include Lisp mode (which has several variants), C
-mode, Fortran mode, and others. The remaining major modes are not
-intended for use on users' files; they are used in buffers created for
-specific purposes by Emacs, such as Dired mode for buffers made by
-Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m}
-(@pxref{Sending Mail}), and Shell mode for buffers used for
-communicating with an inferior shell process (@pxref{Interactive
-Shell}).
-
- Most programming-language major modes specify that only blank lines
-separate paragraphs. This is to make the paragraph commands useful.
-(@xref{Paragraphs}.) They also cause Auto Fill mode to use the
-definition of @key{TAB} to indent the new lines it creates. This is
-because most lines in a program are usually indented
-(@pxref{Indentation}).
-
-@menu
-* Choosing Modes:: How major modes are specified or chosen.
-@end menu
-
-@node Choosing Modes,,Major Modes,Major Modes
-@section How Major Modes are Chosen
-
-@cindex choosing a major mode
- You can select a major mode explicitly for the current buffer, but
-most of the time Emacs determines which mode to use based on the file
-name or on special text in the file.
-
- To explicitly select a new major, you use an @kbd{M-x} command.
-Take the name of a major mode and add @code{-mode} to get the name of
-the command to select that mode. Thus, you can enter Lisp mode by
-executing @kbd{M-x lisp-mode}.
-
-@vindex auto-mode-alist
- When you visit a file, Emacs usually chooses the right major mode
-automatically. Normally, it makes the choice based on the file
-name---for example, files whose names end in @samp{.c} are normally
-edited in C mode---but sometimes it chooses the major mode based on
-the contents of the file. Here is the exact procedure:
-
- First, Emacs checks whether the file contains a file-local variable
-that specifies the major mode. If so, it uses that major mode,
-ignoring all other criteria. @xref{File Variables}. There are
-several methods to specify a major mode using a file-local variable;
-the simplest is to put the mode name in the first nonblank line,
-preceded and followed by @samp{-*-}. Other text may appear on the
-line as well. For example,
-
-@example
-; -*-Lisp-*-
-@end example
-
-@noindent
-tells Emacs to use Lisp mode. Note how the semicolon is used to make
-Lisp treat this line as a comment. Alternatively, you could write
-
-@example
-; -*- mode: Lisp;-*-
-@end example
-
-@noindent
-The latter format allows you to specify local variables as well, like
-this:
-
-@example
-; -*- mode: Lisp; tab-width: 4; -*-
-@end example
-
-@vindex interpreter-mode-alist
- Second, Emacs checks whether the file's contents begin with
-@samp{#!}. If so, that indicates that the file can serve as an
-executable shell command, which works by running an interpreter named
-on the file's first line (the rest of the file is used as input to the
-interpreter). Therefore, Emacs tries to use the interpreter name to
-choose a mode. For instance, a file that begins with
-@samp{#!/usr/bin/perl} is opened in Perl mode. The variable
-@code{interpreter-mode-alist} specifies the correspondence between
-interpreter program names and major modes.
-
- When the first line starts with @samp{#!}, you usually cannot use
-the @samp{-*-} feature on the first line, because the system would get
-confused when running the interpreter. So Emacs looks for @samp{-*-}
-on the second line in such files as well as on the first line. The
-same is true for man pages which start with the magic string
-@samp{'\"} to specify a list of troff preprocessors.
-
-@vindex magic-mode-alist
- Third, Emacs tries to determine the major mode by looking at the
-text at the start of the buffer, based on the variable
-@code{magic-mode-alist}. By default, this variable is @code{nil} (an
-empty list), so Emacs skips this step; however, you can customize it
-in your init file (@pxref{Init File}). The value should be a list of
-elements of the form
-
-@example
-(@var{regexp} . @var{mode-function})
-@end example
-
-@noindent
-where @var{regexp} is a regular expression (@pxref{Regexps}), and
-@var{mode-function} is a Lisp function that toggles a major mode. If
-the text at the beginning of the file matches @var{regexp}, Emacs
-chooses the major mode specified by @var{mode-function}.
-
-Alternatively, an element of @code{magic-mode-alist} may have the form
-
-@example
-(@var{match-function} . @var{mode-function})
-@end example
-
-@noindent
-where @var{match-function} is a Lisp function that is called at the
-beginning of the buffer; if the function returns non-@code{nil}, Emacs
-set the major mode wit @var{mode-function}.
-
- Fourth---if Emacs still hasn't found a suitable major mode---it
-looks at the file's name. The correspondence between file names and
-major modes is controlled by the variable @code{auto-mode-alist}. Its
-value is a list in which each element has this form,
-
-@example
-(@var{regexp} . @var{mode-function})
-@end example
-
-@noindent
-or this form,
-
-@example
-(@var{regexp} @var{mode-function} @var{flag})
-@end example
-
-@noindent
-For example, one element normally found in the list has the form
-@code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C
-mode for files whose names end in @file{.c}. (Note that @samp{\\} is
-needed in Lisp syntax to include a @samp{\} in the string, which must
-be used to suppress the special meaning of @samp{.} in regexps.) If
-the element has the form @code{(@var{regexp} @var{mode-function}
-@var{flag})} and @var{flag} is non-@code{nil}, then after calling
-@var{mode-function}, Emacs discards the suffix that matched
-@var{regexp} and searches the list again for another match.
-
-@vindex auto-mode-case-fold
- On systems with case-insensitive file names, such as Microsoft
-Windows, Emacs performs a single case-insensitive search through
-@code{auto-mode-alist}. On other systems, Emacs normally performs a
-single case-sensitive search through the alist. However, if you
-change the variable @code{auto-mode-case-fold} to @code{t}, Emacs
-performs a second case-insensitive search if the first search fails.
-
-@vindex magic-fallback-mode-alist
- Finally, if Emacs @emph{still} hasn't found a major mode to use, it
-compares the text at the start of the buffer to the variable
-@code{magic-fallback-mode-alist}. This variable works like
-@code{magic-mode-alist}, described above, except that is consulted
-only after @code{auto-mode-alist}. By default,
-@code{magic-fallback-mode-alist} contains forms that check for image
-files, HTML/XML/SGML files, and Postscript files.
-
-@vindex major-mode
- Once a major mode is chosen, Emacs sets the value of the variable
-@code{major-mode} to the symbol for that major mode (e.g.,
-@code{text-mode} for Text mode). This is a per-buffer variable
-(@pxref{Locals}); its buffer-local value is set automatically, and you
-should not change it yourself.
-
- The default value of @code{major-mode} determines the major mode to
-use for files that do not specify a major mode, and for new buffers
-created with @kbd{C-x b}. Normally, this default value is the symbol
-@code{fundamental-mode}, which specifies Fundamental mode. You can
-change it via the Customization interface (@pxref{Easy
-Customization}), or by adding a line like this to your init file
-(@pxref{Init File}):
-
-@smallexample
-(setq-default major-mode 'text-mode)
-@end smallexample
-
-@noindent
-If the default value of @code{major-mode} is @code{nil}, the major
-mode is taken from the previously current buffer.
-
-@findex normal-mode
- If you have changed the major mode of a buffer, you can return to
-the major mode Emacs would have chosen automatically, by typing
-@kbd{M-x normal-mode}. This is the same function that
-@code{find-file} calls to choose the major mode. It also processes
-the file's @samp{-*-} line or local variables list (if any).
-@xref{File Variables}.
-
-@vindex change-major-mode-with-file-name
- The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to
-a new major mode if the new file name implies a mode (@pxref{Saving}).
-(@kbd{C-x C-s} does this too, if the buffer wasn't visiting a file.)
-However, this does not happen if the buffer contents specify a major
-mode, and certain ``special'' major modes do not allow the mode to
-change. You can turn off this mode-changing feature by setting
-@code{change-major-mode-with-file-name} to @code{nil}.
diff --git a/doc/emacs/makefile.w32-in b/doc/emacs/makefile.w32-in
index ad976468be..4064f4ef6a 100644
--- a/doc/emacs/makefile.w32-in
+++ b/doc/emacs/makefile.w32-in
@@ -76,7 +76,7 @@ EMACSSOURCES= \
$(srcdir)/windows.texi \
$(srcdir)/frames.texi \
$(srcdir)/mule.texi \
- $(srcdir)/major.texi \
+ $(srcdir)/modes.texi \
$(srcdir)/indent.texi \
$(srcdir)/text.texi \
$(srcdir)/programs.texi \
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index f83ac38469..b7b634af8b 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2794,7 +2794,6 @@ userenced and properbose. Have fun. Your buggestions are welcome.
@section Other Amusements
@cindex boredom
@findex hanoi
-@findex yow
@findex gomoku
@cindex tower of Hanoi
@@ -2882,9 +2881,6 @@ Likewise, @kbd{M-x snake} provides an implementation of Snake.
When you are frustrated, try the famous Eliza program. Just do
@kbd{M-x doctor}. End each input by typing @key{RET} twice.
-@cindex Zippy
- When you are feeling strange, type @kbd{M-x yow}.
-
@findex zone
The command @kbd{M-x zone} plays games with the display when Emacs is
idle.
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
new file mode 100644
index 0000000000..314d5d4347
--- /dev/null
+++ b/doc/emacs/modes.texi
@@ -0,0 +1,410 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
+@c Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@node Modes, Indentation, International, Top
+@chapter Editing Modes
+
+ Emacs contains many @dfn{editing modes}, each of which alters its
+basic behavior in useful ways. These are divided into @dfn{major
+modes} and @dfn{minor modes}.
+
+ Major modes provide specialized facilities for working on a
+particular file type, such as a C source file (@pxref{Programs}), or a
+particular type of non-file buffer, such as a shell buffer
+(@pxref{Shell}). Major modes are mutually exclusive; each buffer has
+one and only one major mode at any time.
+
+ Minor modes are optional features which you can turn on or off, not
+necessarily specific to a type of file or buffer. For example, Auto
+Fill mode is a minor mode in which @key{SPC} breaks lines between
+words as you type (@pxref{Auto Fill}). Minor modes are independent of
+one another, and of the selected major mode.
+
+@menu
+* Major Modes:: Text mode vs. Lisp mode vs. C mode...
+* Minor Modes:: Each minor mode is a feature you can turn on
+ independently of any others.
+* Choosing Modes:: How modes are chosen when visiting files.
+@end menu
+
+@node Major Modes
+@section Major Modes
+@cindex major modes
+@cindex mode, major
+@kindex TAB @r{(and major modes)}
+@kindex DEL @r{(and major modes)}
+@kindex C-j @r{(and major modes)}
+
+ Every buffer possesses a major mode, which determines the editing
+behavior of Emacs while that buffer is current. The mode line
+normally shows the name of the current major mode, in parentheses.
+@xref{Mode Line}.
+
+ Usually, the major mode is automatically set by Emacs, when you
+first visit a file or create a buffer. @xref{Choosing Modes}. You
+can explicitly select a new major mode by using an @kbd{M-x} command.
+Take the name of the mode and add @code{-mode} to get the name of the
+command to select that mode. Thus, you can enter Lisp mode with
+@kbd{M-x lisp-mode}.
+
+ The least specialized major mode is called @dfn{Fundamental mode}.
+This mode has no mode-specific redefinitions or variable settings, so
+that each Emacs command behaves in its most general manner, and each
+user option variable is in its default state.
+
+ For editing text of a specific type that Emacs knows about, such as
+Lisp code or English text, you typically use a more specialized major
+mode, such as Lisp mode or Text mode. Such major modes change the
+meanings of some keys to become more specifically adapted to the
+language being edited. The ones that are commonly changed are
+@key{TAB}, @key{DEL}, and @kbd{C-j}. The prefix key @kbd{C-c}
+normally contains mode-specific commands. In addition, the commands
+which handle comments use the mode to determine how comments are to be
+delimited. Many major modes redefine the syntactical properties of
+characters appearing in the buffer.
+
+ The major modes fall into three major groups. The first group
+contains modes for normal text, either plain or with mark-up. It
+includes Text mode, HTML mode, SGML mode, @TeX{} mode and Outline
+mode. The second group contains modes for specific programming
+languages. These include Lisp mode (which has several variants), C
+mode, Fortran mode, and others. The remaining major modes are not
+intended for use on users' files; they are used in buffers created for
+specific purposes by Emacs, such as Dired mode for buffers made by
+Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m}
+(@pxref{Sending Mail}), and Shell mode for buffers used for
+communicating with an inferior shell process (@pxref{Interactive
+Shell}).
+
+ Most programming-language major modes specify that only blank lines
+separate paragraphs. This is to make the paragraph commands useful.
+(@xref{Paragraphs}.) They also cause Auto Fill mode to use the
+definition of @key{TAB} to indent the new lines it creates. This is
+because most lines in a program are usually indented
+(@pxref{Indentation}).
+
+@node Minor Modes
+@section Minor Modes
+@cindex minor modes
+@cindex mode, minor
+
+ A minor mode is an optional editing modes that alters the behavior
+of Emacs in some well-defined way. Unlike major modes, any number of
+minor modes can be in effect at any time. Some minor modes are
+@dfn{buffer-local}: they apply only to the current buffer, so you can
+enable the mode in certain buffers and not others. Other minor modes
+are @dfn{global}: while enabled, they affect everything you do in the
+Emacs session, in all buffers. Some global minor modes are enabled by
+default.
+
+ Most minor modes say in the mode line when they are enabled, just
+after the major mode indicator. For example, @samp{Fill} in the mode
+line means that Auto Fill mode is enabled. @xref{Mode Line}.
+
+ Each minor mode is associated with a command, called the @dfn{mode
+command}, which turns it on or off. The name of this command consists
+of the name of the minor mode, followed by @samp{-mode}; for instance,
+the mode command for Auto Fill mode is @code{auto-fill-mode}. Calling
+the minor mode command with no prefix argument @dfn{toggles} the mode,
+turning it on if it was off, and off if it was on. A positive
+argument always turns the mode on, and a zero or negative argument
+always turns it off. Mode commands are usually invoked with
+@kbd{M-x}, but you can bind keys to them if you wish (@pxref{Key
+Bindings}).
+
+ Most minor modes also have a @dfn{mode variable}, with the same name
+as the mode command. Its value is non-@code{nil} if the mode is
+enabled, and @code{nil} if it is disabled. In some minor modes---but
+not all---the value of the variable alone determines whether the mode
+is active: the mode command works simply by setting the variable, and
+changing the value of the variable has the same effect as calling the
+mode command. Because not all minor modes work this way, we recommend
+that you avoid changing the mode variables directly; use the mode
+commands instead.
+
+ The following is a list of some buffer-local minor modes:
+
+@itemize @bullet
+@item
+Abbrev mode automatically expands text based on pre-defined
+abbreviation definitions. @xref{Abbrevs}.
+
+@item
+Auto Fill mode inserts newlines as you type to prevent lines from
+becoming too long. @xref{Filling}.
+
+@item
+Auto Save mode saves the buffer contents periodically to reduce the
+amount of work you can lose in case of a crash. @xref{Auto Save}.
+
+@item
+Enriched mode enables editing and saving of formatted text.
+@xref{Formatted Text}.
+
+@item
+Flyspell mode automatically highlights misspelled words.
+@xref{Spelling}.
+
+@item
+Font-Lock mode automatically highlights certain textual units found in
+programs. It is enabled globally by default, but you can disable it
+in individual buffers. @xref{Faces}.
+
+@findex linum-mode
+@cindex Linum mode
+@item
+Linum mode displays each line's line number in the window's left
+margin. Its mode command is @code{linum-mode}.
+
+@item
+Outline minor mode provides similar facilities to the major mode
+called Outline mode. @xref{Outline Mode}.
+
+@cindex Overwrite mode
+@cindex mode, Overwrite
+@findex overwrite-mode
+@kindex INSERT
+@item
+Overwrite mode causes ordinary printing characters to replace existing
+text instead of shoving it to the right. For example, if point is in
+front of the @samp{B} in @samp{FOOBAR}, then in Overwrite mode typing
+a @kbd{G} changes it to @samp{FOOGAR}, instead of producing
+@samp{FOOGBAR} as usual. In Overwrite mode, the command @kbd{C-q}
+inserts the next character whatever it may be, even if it is a
+digit---this gives you a way to insert a character instead of
+replacing an existing character. The mode command,
+@code{overwrite-mode}, is bound to the @key{Insert} key.
+
+@findex binary-overwrite-mode
+@item
+Binary Overwrite mode is a variant of Overwrite mode for editing
+binary files; it treats newlines and tabs like other characters, so
+that they overwrite other characters and can be overwritten by them.
+In Binary Overwrite mode, digits after @kbd{C-q} specify an octal
+character code, as usual.
+
+@item
+Visual Line mode performs ``word wrapping'', causing long lines to be
+wrapped at word boundaries. @xref{Visual Line Mode}.
+@end itemize
+
+ Here are some useful global minor modes. Since Line Number mode and
+Transient Mark mode can be enabled or disabled just by setting the
+value of the minor mode variable, you @emph{can} set them differently
+for particular buffers, by explicitly making the corresponding
+variable local in those buffers. @xref{Locals}.
+
+@itemize @bullet
+@item
+Column Number mode enables display of the current column number in the
+mode line. @xref{Mode Line}.
+
+@item
+Delete Selection mode causes text insertion to first delete the text
+in the region, if the region is active. @xref{Using Region}.
+
+@item
+Icomplete mode displays an indication of available completions when
+you are in the minibuffer and completion is active. @xref{Completion
+Options}.
+
+@item
+Line Number mode enables display of the current line number in the
+mode line. It is enabled by default. @xref{Mode Line}.
+
+@item
+Menu Bar mode gives each frame a menu bar. It is enabled by default.
+@xref{Menu Bars}.
+
+@item
+Scroll Bar mode gives each window a scroll bar. It is enabled by
+default, but the scroll bar is only displayed on graphical terminals.
+@xref{Scroll Bars}.
+
+@item
+Tool Bar mode gives each frame a tool bar. It is enabled by default,
+but the tool bar is only displayed on graphical terminals. @xref{Tool
+Bars}.
+
+@item
+Transient Mark mode highlights the region, and makes many Emacs
+commands operate on the region when the mark is active. It is enabled
+by default. @xref{Mark}.
+@end itemize
+
+@node Choosing Modes
+@section Choosing File Modes
+
+@cindex choosing a major mode
+@cindex choosing a minor mode
+@vindex auto-mode-alist
+ When you visit a file, Emacs chooses a major mode automatically.
+Normally, it makes the choice based on the file name---for example,
+files whose names end in @samp{.c} are normally edited in C mode---but
+sometimes it chooses the major mode based on special text in the file.
+This special text can also be used to enable buffer-local minor modes.
+
+ Here is the exact procedure:
+
+ First, Emacs checks whether the file contains file-local mode
+variables. @xref{File Variables}. If there is a file-local variable
+that specifies a major mode, then Emacs uses that major mode, ignoring
+all other criteria. There are several methods to specify a major mode
+using a file-local variable; the simplest is to put the mode name in
+the first nonblank line, preceded and followed by @samp{-*-}. Other
+text may appear on the line as well. For example,
+
+@example
+; -*-Lisp-*-
+@end example
+
+@noindent
+tells Emacs to use Lisp mode. Note how the semicolon is used to make
+Lisp treat this line as a comment. Alternatively, you could write
+
+@example
+; -*- mode: Lisp;-*-
+@end example
+
+@noindent
+The latter format allows you to specify local variables as well, like
+this:
+
+@example
+; -*- mode: Lisp; tab-width: 4; -*-
+@end example
+
+ If a file variable specifies a buffer-local minor mode, Emacs
+enables that minor mode in the buffer.
+
+@vindex interpreter-mode-alist
+ Second, if there is no file variable specifying a major mode, Emacs
+checks whether the file's contents begin with @samp{#!}. If so, that
+indicates that the file can serve as an executable shell command,
+which works by running an interpreter named on the file's first line
+(the rest of the file is used as input to the interpreter).
+Therefore, Emacs tries to use the interpreter name to choose a mode.
+For instance, a file that begins with @samp{#!/usr/bin/perl} is opened
+in Perl mode. The variable @code{interpreter-mode-alist} specifies
+the correspondence between interpreter program names and major modes.
+
+ When the first line starts with @samp{#!}, you usually cannot use
+the @samp{-*-} feature on the first line, because the system would get
+confused when running the interpreter. So Emacs looks for @samp{-*-}
+on the second line in such files as well as on the first line. The
+same is true for man pages which start with the magic string
+@samp{'\"} to specify a list of troff preprocessors.
+
+@vindex magic-mode-alist
+ Third, Emacs tries to determine the major mode by looking at the
+text at the start of the buffer, based on the variable
+@code{magic-mode-alist}. By default, this variable is @code{nil} (an
+empty list), so Emacs skips this step; however, you can customize it
+in your init file (@pxref{Init File}). The value should be a list of
+elements of the form
+
+@example
+(@var{regexp} . @var{mode-function})
+@end example
+
+@noindent
+where @var{regexp} is a regular expression (@pxref{Regexps}), and
+@var{mode-function} is a Lisp function that toggles a major mode. If
+the text at the beginning of the file matches @var{regexp}, Emacs
+chooses the major mode specified by @var{mode-function}.
+
+Alternatively, an element of @code{magic-mode-alist} may have the form
+
+@example
+(@var{match-function} . @var{mode-function})
+@end example
+
+@noindent
+where @var{match-function} is a Lisp function that is called at the
+beginning of the buffer; if the function returns non-@code{nil}, Emacs
+set the major mode wit @var{mode-function}.
+
+ Fourth---if Emacs still hasn't found a suitable major mode---it
+looks at the file's name. The correspondence between file names and
+major modes is controlled by the variable @code{auto-mode-alist}. Its
+value is a list in which each element has this form,
+
+@example
+(@var{regexp} . @var{mode-function})
+@end example
+
+@noindent
+or this form,
+
+@example
+(@var{regexp} @var{mode-function} @var{flag})
+@end example
+
+@noindent
+For example, one element normally found in the list has the form
+@code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C
+mode for files whose names end in @file{.c}. (Note that @samp{\\} is
+needed in Lisp syntax to include a @samp{\} in the string, which must
+be used to suppress the special meaning of @samp{.} in regexps.) If
+the element has the form @code{(@var{regexp} @var{mode-function}
+@var{flag})} and @var{flag} is non-@code{nil}, then after calling
+@var{mode-function}, Emacs discards the suffix that matched
+@var{regexp} and searches the list again for another match.
+
+@vindex auto-mode-case-fold
+ On systems with case-insensitive file names, such as Microsoft
+Windows, Emacs performs a single case-insensitive search through
+@code{auto-mode-alist}. On other systems, Emacs normally performs a
+single case-sensitive search through the alist. However, if you
+change the variable @code{auto-mode-case-fold} to @code{t}, Emacs
+performs a second case-insensitive search if the first search fails.
+
+@vindex magic-fallback-mode-alist
+ Finally, if Emacs @emph{still} hasn't found a major mode to use, it
+compares the text at the start of the buffer to the variable
+@code{magic-fallback-mode-alist}. This variable works like
+@code{magic-mode-alist}, described above, except that is consulted
+only after @code{auto-mode-alist}. By default,
+@code{magic-fallback-mode-alist} contains forms that check for image
+files, HTML/XML/SGML files, and Postscript files.
+
+@vindex major-mode
+ Once a major mode is chosen, Emacs sets the value of the variable
+@code{major-mode} to the symbol for that major mode (e.g.,
+@code{text-mode} for Text mode). This is a per-buffer variable
+(@pxref{Locals}); its buffer-local value is set automatically, and you
+should not change it yourself.
+
+ The default value of @code{major-mode} determines the major mode to
+use for files that do not specify a major mode, and for new buffers
+created with @kbd{C-x b}. Normally, this default value is the symbol
+@code{fundamental-mode}, which specifies Fundamental mode. You can
+change it via the Customization interface (@pxref{Easy
+Customization}), or by adding a line like this to your init file
+(@pxref{Init File}):
+
+@smallexample
+(setq-default major-mode 'text-mode)
+@end smallexample
+
+@noindent
+If the default value of @code{major-mode} is @code{nil}, the major
+mode is taken from the previously current buffer.
+
+@findex normal-mode
+ If you have changed the major mode of a buffer, you can return to
+the major mode Emacs would have chosen automatically, by typing
+@kbd{M-x normal-mode}. This is the same function that
+@code{find-file} calls to choose the major mode. It also processes
+the file's @samp{-*-} line or local variables list (if any).
+@xref{File Variables}.
+
+@vindex change-major-mode-with-file-name
+ The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to
+a new major mode if the new file name implies a mode (@pxref{Saving}).
+(@kbd{C-x C-s} does this too, if the buffer wasn't visiting a file.)
+However, this does not happen if the buffer contents specify a major
+mode, and certain ``special'' major modes do not allow the mode to
+change. You can turn off this mode-changing feature by setting
+@code{change-major-mode-with-file-name} to @code{nil}.
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 3f3da50376..3c970ecb12 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1,7 +1,7 @@
@c This is part of the Emacs manual.
@c Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node International, Major Modes, Frames, Top
+@node International, Modes, Frames, Top
@chapter International Character Set Support
@c This node is referenced in the tutorial. When renaming or deleting
@c it, the tutorial needs to be adjusted. (TUTORIAL.de)
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 803f6b6ce4..870986d421 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -643,8 +643,9 @@ balanced.
When talking about these facilities, the term ``parenthesis'' also
includes braces, brackets, or whatever delimiters are defined to match
in pairs. The major mode controls which delimiters are significant,
-through the syntax table (@pxref{Syntax}). In Lisp, only parentheses
-count; in C, these commands apply to braces and brackets too.
+through the syntax table (@pxref{Syntax Tables,, Syntax Tables, elisp,
+The Emacs Lisp Reference Manual}). In Lisp, only parentheses count;
+in C, these commands apply to braces and brackets too.
You can use @kbd{M-x check-parens} to find any unbalanced
parentheses and unbalanced string quotes in the buffer.
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 0bc3ce3db8..145687270c 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -190,7 +190,7 @@ sometimes useful to have this information.
Systems}). If it is a dash (@samp{-}), that indicates the default
state of affairs: no special character set handling, except for the
end-of-line translations described in the next paragraph. @samp{=}
-means no conversion whatsoever. Letters represent various nontrivial
+means no conversion whatsoever. Characters represent various nontrivial
@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1.
On a text-only terminal, @var{cs} is preceded by two additional
characters that describe the coding system for keyboard input and the
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index b5d426210a..015f9529b7 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -870,8 +870,9 @@ matches at the end of the buffer only if the contents end with a
word-constituent character.
@item \w
-matches any word-constituent character. The syntax table
-determines which characters these are. @xref{Syntax}.
+matches any word-constituent character. The syntax table determines
+which characters these are. @xref{Syntax Tables,, Syntax Tables,
+elisp, The Emacs Lisp Reference Manual}.
@item \W
matches any character that is not a word-constituent.
@@ -892,7 +893,8 @@ symbol-constituent character.
matches any character whose syntax is @var{c}. Here @var{c} is a
character that designates a particular syntax class: thus, @samp{w}
for word constituent, @samp{-} or @samp{ } for whitespace, @samp{.}
-for ordinary punctuation, etc. @xref{Syntax}.
+for ordinary punctuation, etc. @xref{Syntax Tables,, Syntax Tables,
+elisp, The Emacs Lisp Reference Manual}.
@item \S@var{c}
matches any character whose syntax is not @var{c}.
@@ -911,8 +913,9 @@ matches any character that does @emph{not} belong to category
@var{c}.
@end table
- The constructs that pertain to words and syntax are controlled by the
-setting of the syntax table (@pxref{Syntax}).
+ The constructs that pertain to words and syntax are controlled by
+the setting of the syntax table. @xref{Syntax Tables,, Syntax Tables,
+elisp, The Emacs Lisp Reference Manual}.
@node Regexp Example
@section Regular Expression Example
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index c0139c6055..dbda771e6a 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -154,9 +154,10 @@ the mark by one additional word. @kbd{M-@@} also accepts a numeric
argument that says how many words to scan for the place to put the
mark.
- The word commands' understanding of word boundaries is controlled
-by the syntax table. Any character can, for example, be declared to
-be a word delimiter. @xref{Syntax}.
+ The word commands' understanding of word boundaries is controlled by
+the syntax table. Any character can, for example, be declared to be a
+word delimiter. @xref{Syntax Tables,, Syntax Tables, elisp, The Emacs
+Lisp Reference Manual}.
@node Sentences
@section Sentences
@@ -406,8 +407,6 @@ Text}).
* Fill Commands:: Commands to refill paragraphs and center lines.
* Fill Prefix:: Filling paragraphs that are indented or in a comment, etc.
* Adaptive Fill:: How Emacs can determine the fill prefix automatically.
-* Refill:: Keeping paragraphs filled.
-* Longlines:: Editing text with very long lines.
@end menu
@node Auto Fill
@@ -722,92 +721,6 @@ line, and it should return the appropriate fill prefix based on that
line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets
a chance to find a prefix.
-@node Refill
-@subsection Refill Mode
-@cindex refilling text, word processor style
-@cindex modes, Refill
-@cindex Refill minor mode
-
- Refill minor mode provides support for keeping paragraphs filled as
-you type or modify them in other ways. It provides an effect similar
-to typical word processor behavior. This works by running a
-paragraph-filling command at suitable times.
-
- To toggle the use of Refill mode in the current buffer, type
-@kbd{M-x refill-mode}. When you are typing text, only characters
-which normally trigger auto filling, like the space character, will
-trigger refilling. This is to avoid making it too slow. Apart from
-self-inserting characters, other commands which modify the text cause
-refilling.
-
- The current implementation is preliminary and not robust. You can
-get better ``line wrapping'' behavior using Longlines mode.
-@xref{Longlines}. However, Longlines mode has an important
-side-effect: the newlines that it inserts for you are not saved to
-disk, so the files that you make with Longlines mode will appear to be
-completely unfilled if you edit them without Longlines mode.
-
-@node Longlines
-@subsection Long Lines Mode
-@cindex refilling text, word processor style
-@cindex modes, Long Lines
-@cindex word wrap
-@cindex Long Lines minor mode
-
- Sometimes, you may come across ``unfilled'' text files, which Emacs
-normally displays as a bunch of extremely long lines. Comfortably
-reading and editing such files normally requires ``word wrap'', a
-feature that breaks up each long text line into multiple screen lines
-in a readable manner---by putting the breaks at word boundaries. Many
-text editors, such as those built into many web browsers, perform word
-wrapping by default.
-
- There are two different minor modes in Emacs that perform word
-wrapping. The first is Visual Line mode, which does it by altering
-the behavior of screen line continuation. @xref{Visual Line Mode},
-for information about Visual Line mode.
-
-@findex longlines-mode
- Instead of using Visual Line mode, you can use a minor mode called
-Long Lines mode. Long Lines mode wraps lines by inserting or deleting
-@dfn{soft newlines} as you type (@pxref{Hard and Soft Newlines}).
-These soft newlines won't show up when you save the buffer into a
-file, or when you copy the text into the kill ring, clipboard, or a
-register. Unlike Visual Line mode, Lone Lines mode breaks long lines
-at the fill column (@pxref{Fill Commands}), rather than the right
-window edge. To enable Long Lines mode, type @kbd{M-x
-longlines-mode}. If the text is full of long lines, this also
-immediately ``wraps'' them all.
-
-@findex longlines-auto-wrap
- The word wrap performed by Long Lines mode is @emph{not} the same as
-ordinary filling (@pxref{Fill Commands}). It does not contract
-multiple spaces into a single space, recognize fill prefixes
-(@pxref{Fill Prefix}), or perform adaptive filling (@pxref{Adaptive
-Fill}). The reason for this is that a wrapped line is still,
-conceptually, a single line. Each soft newline is equivalent to
-exactly one space in that long line, and vice versa. However, you can
-still call filling functions such as @kbd{M-q}, and these will work as
-expected, inserting soft newlines that won't show up on disk or when
-the text is copied. You can even rely entirely on the normal fill
-commands by turning off automatic line wrapping, with @kbd{C-u M-x
-longlines-auto-wrap}. To turn automatic line wrapping back on, type
-@kbd{M-x longlines-auto-wrap}.
-
-@findex longlines-show-hard-newlines
- Type @kbd{RET} to insert a hard newline, one which automatic
-refilling will not remove. If you want to see where all the hard
-newlines are, type @kbd{M-x longlines-show-hard-newlines}. This will
-mark each hard newline with a special symbol. The same command with a
-prefix argument turns this display off.
-
- Long Lines mode does not change normal text files that are already
-filled, since the existing newlines are considered hard newlines.
-Before Long Lines can do anything, you need to transform each
-paragraph into a long line. One way is to set @code{fill-column} to a
-large number (e.g., @kbd{C-u 9999 C-x f}), re-fill all the paragraphs,
-and then set @code{fill-column} back to its original value.
-
@node Case
@section Case Conversion Commands
@cindex case conversion
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 7e8dac0cb2..c265b9e878 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,11 @@
+2011-07-10 Lars Magne Ingebrigtsen <[email protected]>
+
+ * modes.texi (Mode Line Variables): Document `mode-line-remote'
+ and `mode-line-client' (bug#2974).
+
+ * text.texi (Insertion): Clarify marker movements (bug#1651).
+ Text from Drew Adams.
+
2011-07-07 Lars Magne Ingebrigtsen <[email protected]>
* text.texi (Special Properties): Clarify the format of `face'
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 562cc76c3f..a8a10f750c 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1866,6 +1866,15 @@ default value also displays the recursive editing level, information
on the process status, and whether narrowing is in effect.
@end defopt
+@defopt mode-line-remote
+This variable is used to show whether @code{default-directory} for the
+current buffer is remote.
+@end defopt
+
+@defopt mode-line-client
+This variable is used to identify @code{emacsclient} frames.
+@end defopt
+
The following three variables are used in @code{mode-line-modes}:
@defvar mode-name
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 2d48735224..b91afb044f 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -364,14 +364,13 @@ after point. Some insertion functions leave point before the inserted
text, while other functions leave it after. We call the former
insertion @dfn{after point} and the latter insertion @dfn{before point}.
- Insertion relocates markers that point at positions after the
-insertion point, so that they stay with the surrounding text
-(@pxref{Markers}). When a marker points at the place of insertion,
-insertion may or may not relocate the marker, depending on the marker's
-insertion type (@pxref{Marker Insertion Types}). Certain special
-functions such as @code{insert-before-markers} relocate all such markers
-to point after the inserted text, regardless of the markers' insertion
-type.
+ Insertion moves markers located at positions after the insertion
+point, so that they stay with the surrounding text (@pxref{Markers}).
+When a marker points at the place of insertion, insertion may or may
+not relocate the marker, depending on the marker's insertion type
+(@pxref{Marker Insertion Types}). Certain special functions such as
+@code{insert-before-markers} relocate all such markers to point after
+the inserted text, regardless of the markers' insertion type.
Insertion functions signal an error if the current buffer is
read-only or if they insert within read-only text.
diff --git a/etc/ChangeLog b/etc/ChangeLog
index f7ecbb5d77..1a9771a960 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-10 Bill Wohler <[email protected]>
+
+ Release MH-E version 8.2.90.
+
+ * NEWS, MH-E-NEWS: Update for MH-E release 8.2.90.
+
2011-07-07 Tassilo Horn <[email protected]>
* themes/tsdh-light-theme.el:
diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS
index aaafe76990..0db76bb123 100644
--- a/etc/MH-E-NEWS
+++ b/etc/MH-E-NEWS
@@ -4,6 +4,25 @@ Copyright (C) 2001-2011 Free Software Foundation, Inc.
See the end of the file for license conditions.
+* Changes in MH-E 8.2.90
+
+In 2010, the version control system (VCS) of Emacs was upgraded from
+CVS to Bazaar. In 2011, the MH-E team followed suit and upgraded the
+MH-E repository at SourceForge from CVS to Bazaar as well. The result
+is version 8.2.90 of MH-E, which includes needed changes to the build
+scripts.
+
+Otherwise, this is a small release that includes mostly internal
+changes from the Emacs team. One of these changes manifests itself in
+the user interface--you can now complete folders with abbreviations,
+meaning that `+f/b/b TAB' can complete to `+foo/bar/baz'. This version
+of MH-E is packaged with GNU Emacs 24.1
+
+Also, RFC 2047-encoded Subject header fields in replies are now
+decoded.
+
+
+
* Changes in MH-E 8.2
Version 8.2 of MH-E appeared in GNU Emacs 23.1. This is a small
diff --git a/etc/NEWS b/etc/NEWS
index 8a06c9f2bc..c32159f654 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -473,6 +473,10 @@ $ESHELL nor variable `explicit-shell-file-name' is set.
* Changes in Specialized Modes and Packages in Emacs 24.1
+** MH-E
+
+*** Upgraded to MH-E version 8.2.90. See MH-E-NEWS for details.
+
** comint and modes derived from it use the generic completion code.
** Compilation mode
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 5d95ec7427..04d0828a8a 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,4 +1,4 @@
-2011-07-06 Paul Eggert <[email protected]>
+2011-07-11 Paul Eggert <[email protected]>
Assume freestanding C89 headers, string.h, stdlib.h.
* ebrowse.c: Include stdlib.h unconditionally.
@@ -11,6 +11,10 @@
Assume support for memcmp, memcpy, memmove, memset.
* etags.c (absolute_filename): Assume memmove exists.
+2011-07-09 Andreas Schwab <[email protected]>
+
+ * update-game-score.c (usage): Update usage line.
+
2011-07-02 Jason Rumney <[email protected]>
* emacsclient.c (decode_options) [WINDOWSNT]: Avoid tty mode on
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 284beafb9d..2a89379aef 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -64,7 +64,7 @@ static int usage (int err) NO_RETURN;
static int
usage (int err)
{
- fprintf (stdout, "Usage: update-game-score [-m MAX ] [ -r ] game/scorefile SCORE DATA\n");
+ fprintf (stdout, "Usage: update-game-score [-m MAX] [-r] [-d DIR] game/scorefile SCORE DATA\n");
fprintf (stdout, " update-game-score -h\n");
fprintf (stdout, " -h\t\tDisplay this help.\n");
fprintf (stdout, " -m MAX\t\tLimit the maximum number of scores to MAX.\n");
@@ -106,8 +106,7 @@ static void lose_syserr (const char *msg) NO_RETURN;
#ifndef HAVE_STRERROR
#ifndef WINDOWSNT
char *
-strerror (errnum)
- int errnum;
+strerror (int errnum)
{
extern char *sys_errlist[];
extern int sys_nerr;
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 09ac138b85..b6d08c754a 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -270,26 +270,36 @@ typedef unsigned long int gl_uintptr_t;
/* Note: These types are compiler dependent. It may be unwise to use them in
public header files. */
-#undef intmax_t
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+/* If the system defines INTMAX_MAX, assume that intmax_t works, and
+ similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
+ assuming one type where another is used by the system. */
+
+#ifndef INTMAX_MAX
+# undef INTMAX_C
+# undef intmax_t
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-#elif defined GL_INT64_T
-# define intmax_t int64_t
-#else
+# define intmax_t gl_intmax_t
+# elif defined GL_INT64_T
+# define intmax_t int64_t
+# else
typedef long int gl_intmax_t;
-# define intmax_t gl_intmax_t
+# define intmax_t gl_intmax_t
+# endif
#endif
-#undef uintmax_t
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#ifndef UINTMAX_MAX
+# undef UINTMAX_C
+# undef uintmax_t
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-#elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-#else
+# define uintmax_t gl_uintmax_t
+# elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+# else
typedef unsigned long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
+# define uintmax_t gl_uintmax_t
+# endif
#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
@@ -431,21 +441,23 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* 7.18.2.5. Limits of greatest-width integer types */
-#undef INTMAX_MIN
-#undef INTMAX_MAX
-#ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-#else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
+#ifndef INTMAX_MAX
+# undef INTMAX_MIN
+# ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+# else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+# endif
#endif
-#undef UINTMAX_MAX
-#ifdef UINT64_MAX
-# define UINTMAX_MAX UINT64_MAX
-#else
-# define UINTMAX_MAX UINT32_MAX
+#ifndef UINTMAX_MAX
+# ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+# else
+# define UINTMAX_MAX UINT32_MAX
+# endif
#endif
/* 7.18.3. Limits of other integer types */
@@ -568,22 +580,24 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* 7.18.4.2. Macros for greatest-width integer constants */
-#undef INTMAX_C
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-#elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-#else
-# define INTMAX_C(x) x##L
+#ifndef INTMAX_C
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+# elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+# else
+# define INTMAX_C(x) x##L
+# endif
#endif
-#undef UINTMAX_C
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-#elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-#else
-# define UINTMAX_C(x) x##UL
+#ifndef UINTMAX_C
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+# elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+# else
+# define UINTMAX_C(x) x##UL
+# endif
#endif
#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 67615431b8..a3faab15c3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,61 @@
+2011-07-10 Lars Magne Ingebrigtsen <[email protected]>
+
+ * tool-bar.el (tool-bar-mode): Clarify positive/negative arguments
+ (bug#1526).
+
+2011-07-10 Martin Rudalics <[email protected]>
+
+ * window.el (display-buffer-normalize-default): Don't invert
+ meaning of even-window-heights. Reported by Eli Zaretskii
+
+2011-07-10 Bob Rogers <[email protected]>
+
+ * vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256).
+
+2011-07-10 Chong Yidong <[email protected]>
+
+ * window.el (display-buffer): Fix arguments to
+ display-buffer-reuse-window in last change.
+
+ * faces.el (link): Use a less saturated blue on light backgrounds.
+
+ * startup.el (fancy-startup-text, fancy-about-text)
+ (fancy-startup-tail): Use font-lock faces, for background safety.
+
+2011-07-09 Bob Nnamtrop <[email protected]> (tiny change)
+
+ * emulation/viper-cmd.el (viper-change-state-to-vi): Limit
+ triggering of abbrev expansion (Bug#9038).
+
+2011-07-09 Martin Rudalics <[email protected]>
+
+ * window.el (display-buffer-default-specifiers): Remove.
+ (display-buffer-macro-specifiers): Remove default specifiers.
+ (display-buffer-alist): Default to nil.
+ (display-buffer-reuse-window): New optional argument
+ other-window.
+ (display-buffer-pop-up-window): Allow splitting internal
+ windows. Check whether a live window was created.
+ (display-buffer-other-window-means-other-frame)
+ (display-buffer-normalize-arguments): Rename to
+ display-buffer-normalize-argument and rewrite. Set the
+ other-window specifier.
+ (display-buffer-normalize-special): New function.
+ (display-buffer-normalize-options): Rename to
+ display-buffer-normalize-default and rewrite.
+ (display-buffer-normalize-options-inhibit): Remove.
+ (display-buffer-normalize-specifiers): Rewrite.
+ (display-buffer): Process other-window specifier and call
+ display-buffer-reuse-window with it. Emulate Emacs 23 behavior
+ more faithfully.
+ (pop-up-windows, even-window-heights): Restore Emacs 23 default
+ values.
+ (display-buffer-alist-set): Don't handle 'unset default values.
+ (display-buffer-in-window, display-buffer-alist-set): Replace
+ symbol "dedicated" by "dedicate". Reported by Tassilo Horn
+
2011-07-09 Leo Liu <[email protected]>
* register.el (insert-register): Restore accidental change on
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index f06428d81e..9d0eb6c0d1 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -617,7 +617,10 @@
(or (viper-overlay-p viper-replace-overlay)
(viper-set-replace-overlay (point-min) (point-min)))
(viper-hide-replace-overlay)
- (if abbrev-mode (expand-abbrev))
+ ;; Expand abbrevs iff the previous character has word syntax.
+ (and abbrev-mode
+ (eq (char-syntax (preceding-char)) ?w)
+ (expand-abbrev))
(if (and auto-fill-function (> (current-column) fill-column))
(funcall auto-fill-function))
;; don't leave whitespace lines around
diff --git a/lisp/faces.el b/lisp/faces.el
index 34e154314b..302f8af35a 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2109,7 +2109,7 @@ terminal type to a different value."
(defface link
'((((class color) (min-colors 88) (background light))
- :foreground "blue1" :underline t)
+ :foreground "RoyalBlue3" :underline t)
(((class color) (background light))
:foreground "blue" :underline t)
(((class color) (min-colors 88) (background dark))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index a0f2d5809a..f780cf7b9f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-10 Lars Magne Ingebrigtsen <[email protected]>
+
+ * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): `debbugs-*'
+ renamed to `debbugs-gnu-*'.
+
2011-07-08 Daiki Ueno <[email protected]>
* plstore.el: Revert the editing feature since it is not urgent.
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index da925700bd..2ea2a5c9bc 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2469,7 +2469,7 @@ the bug number, and browsing the URL must return mbox output."
number
(cdr (assoc 'debian gnus-bug-group-download-format-alist))))
-(defvar debbugs-bug-number) ; debbugs-gnu
+(defvar debbugs-gnu-bug-number) ; debbugs-gnu
(defun gnus-read-ephemeral-emacs-bug-group (ids &optional window-conf)
"Browse Emacs bugs IDS as an ephemeral group."
@@ -2482,10 +2482,10 @@ the bug number, and browsing the URL must return mbox output."
ids
(cdr (assoc 'emacs gnus-bug-group-download-format-alist))
window-conf)
- (when (fboundp 'debbugs-summary-mode)
+ (when (fboundp 'debbugs-gnu-summary-mode)
(with-current-buffer (window-buffer (selected-window))
- (debbugs-summary-mode 1)
- (set (make-local-variable 'debbugs-bug-number) (car ids)))))
+ (debbugs-gnu-summary-mode 1)
+ (set (make-local-variable 'debbugs-gnu-bug-number) (car ids)))))
(defun gnus-group-jump-to-group (group &optional prompt)
"Jump to newsgroup GROUP.
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 365c444d59..197c87a26a 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,33 @@
+2011-07-10 Bill Wohler <[email protected]>
+
+ Release MH-E version 8.9.90.
+
+ * mh-e.el (Version, mh-version): Update for release 8.2.90.
+
+ * mh-utils.el (mh-sub-folders-actual): Remove FIXME question.
+
+ * mh-mime.el (mh-decode-message-subject): Fix case of Subject.
+
+ * mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder)
+ (mh-make-folder): Replace calls to switch-to-buffer with of
+ pop-to-buffer. The former is intended for interactive use only and
+ generates warnings in Emacs 24.
+
+2011-07-09 Bill Wohler <[email protected]>
+
+ * mh-speed.el (mh-speed-toggle,mh-speed-view): Document "ignored"
+ arguments to keep checkdoc happy.
+
+ * mh-search.el (mh-flists-execute): Ditto.
+
+ * mh-funcs.el (mh-undo-folder): Ditto.
+
+ * mh-comp.el (mh-user-agent-compose): Ditto.
+
+ * mh-xface.el (mh-face-to-png, mh-uncompface)
+ (mh-picon-file-contents): Only call set-buffer-multibyte if it
+ exists, which it doesn't in XEmacs.
+
2011-07-04 Bill Wohler <[email protected]>
* mh-e.el: Just require mh-loaddefs since loading it in an
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 1aa57316f5..882a8771e2 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -213,7 +213,7 @@ Elements look like (HEADER . VALUE) where both HEADER and VALUE
are strings.
CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and
-RETURN-ACTION are ignored."
+RETURN-ACTION and any additional arguments are IGNORED."
(mh-find-path)
(let ((mh-error-if-no-draft t))
(mh-send to "" subject)
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 87272b1c83..70d0cb5fcd 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -5,7 +5,7 @@
;; Author: Bill Wohler <[email protected]>
;; Maintainer: Bill Wohler <[email protected]>
-;; Version: 8.2
+;; Version: 8.2.90
;; Keywords: mail
;; This file is part of GNU Emacs.
@@ -27,7 +27,7 @@
;; MH-E is an Emacs interface to the MH mail system.
-;; MH-E is supported in GNU Emacs 21 and 22, as well as XEmacs 21
+;; MH-E is supported in GNU Emacs 21 and higher, as well as XEmacs 21
;; (except for versions 21.5.9-21.5.16). It is compatible with MH
;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils
;; 1.0 and higher. Gnus is also required; version 5.10 or higher is
@@ -127,7 +127,7 @@
;; Try to keep variables local to a single file. Provide accessors if
;; variables are shared. Use this section as a last resort.
-(defconst mh-version "8.2" "Version number of MH-E.")
+(defconst mh-version "8.2.90" "Version number of MH-E.")
;; Variants
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 40febd641d..2248221664 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -795,7 +795,7 @@ instead."
(setq threading-needed-flag mh-show-threads-flag)
(setq mh-previous-window-config config))
((not (eq (current-buffer) (get-buffer folder)))
- (switch-to-buffer folder)
+ (pop-to-buffer folder)
(setq mh-previous-window-config config))))
(mh-get-new-mail file)
(when (and threading-needed-flag
@@ -855,7 +855,7 @@ From a program, edit MESSAGE; nil means edit current message."
;; Just show the edit buffer...
(delete-other-windows)
- (switch-to-buffer edit-buffer)))
+ (pop-to-buffer edit-buffer)))
;;;###mh-autoload
(defun mh-next-button (&optional backward-flag)
@@ -1705,7 +1705,7 @@ DONT-EXEC-PENDING is non-nil."
(unless dont-exec-pending
(mh-process-or-undo-commands folder)
(mh-reset-threads-and-narrowing))
- (switch-to-buffer folder)))
+ (pop-to-buffer folder)))
(mh-regenerate-headers range)
(if (zerop (buffer-size))
(if (equal range "all")
@@ -1786,7 +1786,7 @@ Also removes all content from the folder buffer."
(defun mh-make-folder (name)
"Create a new mail folder called NAME.
Make it the current folder."
- (switch-to-buffer name)
+ (pop-to-buffer name)
(setq buffer-read-only nil)
(erase-buffer)
(if mh-adaptive-cmd-note-flag
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index dfac684ed5..46a04c3884 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -349,7 +349,7 @@ See `mh-store-msg' for a description of DIRECTORY."
(error "Error occurred during execution of %s" command)))))
;;;###mh-autoload
-(defun mh-undo-folder (&rest _ignored)
+(defun mh-undo-folder (&rest ignored)
"Undo all refiles and deletes in the current folder.
Arguments are IGNORED (for `revert-buffer')."
(interactive)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index 25554b7822..bc5080a5d3 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -511,7 +511,7 @@ decoding the same message multiple times."
(when mh-decode-mime-flag
(save-excursion
(let ((buffer-read-only nil))
- (rfc2047-decode-region (progn (mh-goto-header-field "subject:") (point))
+ (rfc2047-decode-region (progn (mh-goto-header-field "Subject:") (point))
(progn (mh-header-field-end) (point)))))))
;;;###mh-autoload
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 1e764291f5..a547dd8d80 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -454,12 +454,12 @@ search all folders."
(defvar mh-flists-search-folders)
-(defun mh-flists-execute (&rest args)
+(defun mh-flists-execute (&rest ignored)
"Execute flists.
Search for messages belonging to `mh-flists-sequence' in the
folders specified by `mh-flists-search-folders'. If
`mh-recursive-folders-flag' is t, then the folders are searched
-recursively. All parameters ARGS are ignored."
+recursively. All arguments are IGNORED."
(set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(unless (executable-find "sh")
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index b782081c85..5c3679e8ce 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -126,9 +126,9 @@ With non-nil FORCE, the update is always carried out."
;; Otherwise on to your regular programming
(t t)))
-(defun mh-speed-toggle (&rest args)
+(defun mh-speed-toggle (&rest ignored)
"Toggle the display of child folders in the speedbar.
-The optional ARGS from speedbar are ignored."
+The optional arguments from speedbar are IGNORED."
(interactive)
(declare (ignore args))
(beginning-of-line)
@@ -165,9 +165,9 @@ The optional ARGS from speedbar are ignored."
(mh-line-beginning-position) (1+ (line-beginning-position))
`(mh-expanded t)))))))
-(defun mh-speed-view (&rest args)
+(defun mh-speed-view (&rest ignored)
"Visits the selected folder just as if you had used \\<mh-folder-mode-map>\\[mh-visit-folder].
-The optional ARGS from speedbar are ignored."
+The optional arguments from speedbar are IGNORED."
(interactive)
(declare (ignore args))
(let* ((folder (get-text-property (mh-line-beginning-position) 'mh-folder))
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index a77633cd4b..6132af17da 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -596,7 +596,6 @@ Expects FOLDER to have already been normalized with
(setq name (substring name 0 (1- (length name)))))
(push
(cons name
- ;; FIXME: what is this used for? --Stef
(search-forward "(others)" (mh-line-end-position) t))
results))))
(forward-line 1))))
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 027d79a948..1c7531b59d 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -125,7 +125,8 @@ in this order is used."
(defun mh-face-to-png (data)
"Convert base64 encoded DATA to png image."
(with-temp-buffer
- (set-buffer-multibyte nil)
+ (if (fboundp 'set-buffer-multibyte)
+ (set-buffer-multibyte nil))
(insert data)
(ignore-errors (base64-decode-region (point-min) (point-max)))
(buffer-string)))
@@ -133,7 +134,8 @@ in this order is used."
(defun mh-uncompface (data)
"Run DATA through `uncompface' to generate bitmap."
(with-temp-buffer
- (set-buffer-multibyte nil)
+ (if (fboundp 'set-buffer-multibyte)
+ (set-buffer-multibyte nil))
(insert data)
(when (and mh-uncompface-executable
(equal (call-process-region (point-min) (point-max)
@@ -271,7 +273,8 @@ file contents as a string is returned. If FILE is nil, then both
elements of the list are nil."
(if (stringp file)
(with-temp-buffer
- (set-buffer-multibyte nil)
+ (if (fboundp 'set-buffer-multibyte)
+ (set-buffer-multibyte nil))
(let ((type (and (string-match ".*\\.\\(...\\)$" file)
(intern (match-string 1 file)))))
(insert-file-contents-literally file)
diff --git a/lisp/startup.el b/lisp/startup.el
index 26c5a46933..c6f3063ca9 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1293,7 +1293,7 @@ If this is nil, no message will be displayed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst fancy-startup-text
- `((:face (variable-pitch (:foreground "red"))
+ `((:face (variable-pitch font-lock-comment-face)
"Welcome to "
:link ("GNU Emacs"
,(lambda (_button) (browse-url "http://www.gnu.org/software/emacs/"))
@@ -1350,7 +1350,7 @@ Each element in the list should be a list of strings or pairs
`:face FACE', like `fancy-splash-insert' accepts them.")
(defconst fancy-about-text
- `((:face (variable-pitch (:foreground "red"))
+ `((:face (variable-pitch font-lock-comment-face)
"This is "
:link ("GNU Emacs"
,(lambda (_button) (browse-url "http://www.gnu.org/software/emacs/"))
@@ -1366,11 +1366,7 @@ Each element in the list should be a list of strings or pairs
`("GNU" ,(lambda (_button) (describe-gnu-project))
"Display info on the GNU project.")))
" operating system.\n"
- :face ,(lambda ()
- (list 'variable-pitch
- (list :foreground
- (if (eq (frame-parameter nil 'background-mode) 'dark)
- "cyan" "darkblue"))))
+ :face (variable-pitch font-lock-builtin-face)
"\n"
,(lambda () (emacs-version))
"\n"
@@ -1426,8 +1422,7 @@ Each element in the list should be a list of strings or pairs
,(lambda (_button)
(browse-url "http://www.gnu.org/software/emacs/tour/"))
"Browse http://www.gnu.org/software/emacs/tour/")
- "\tSee an overview of Emacs features at gnu.org"
- ))
+ "\tSee an overview of Emacs features at gnu.org"))
"A list of texts to show in the middle part of the About screen.
Each element in the list should be a list of strings or pairs
`:face FACE', like `fancy-splash-insert' accepts them.")
@@ -1537,93 +1532,91 @@ a face or button specification."
(defun fancy-startup-tail (&optional concise)
"Insert the tail part of the splash screen into the current buffer."
- (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark)
- "cyan" "darkblue")))
- (unless concise
- (fancy-splash-insert
- :face 'variable-pitch
- "\nTo start... "
- :link `("Open a File"
- ,(lambda (_button) (call-interactively 'find-file))
- "Specify a new file's name, to edit the file")
- " "
- :link `("Open Home Directory"
- ,(lambda (_button) (dired "~"))
- "Open your home directory, to operate on its files")
- " "
- :link `("Customize Startup"
- ,(lambda (_button) (customize-group 'initialization))
- "Change initialization settings including this screen")
- "\n"))
+ (unless concise
(fancy-splash-insert
- :face 'variable-pitch "To quit a partially entered command, type "
- :face 'default "Control-g"
- :face 'variable-pitch ".\n")
- (fancy-splash-insert :face `(variable-pitch (:foreground ,fg))
- "\nThis is "
- (emacs-version)
- "\n"
- :face '(variable-pitch (:height 0.8))
- emacs-copyright
- "\n")
- (and auto-save-list-file-prefix
- ;; Don't signal an error if the
- ;; directory for auto-save-list files
- ;; does not yet exist.
- (file-directory-p (file-name-directory
- auto-save-list-file-prefix))
- (directory-files
- (file-name-directory auto-save-list-file-prefix)
- nil
- (concat "\\`"
- (regexp-quote (file-name-nondirectory
- auto-save-list-file-prefix)))
- t)
- (fancy-splash-insert :face '(variable-pitch (:foreground "red"))
- "\nIf an Emacs session crashed recently, "
- "type "
- :face '(fixed-pitch :foreground "red")
- "Meta-x recover-session RET"
- :face '(variable-pitch (:foreground "red"))
- "\nto recover"
- " the files you were editing."))
-
- (when concise
- (fancy-splash-insert
- :face 'variable-pitch "\n"
- :link `("Dismiss this startup screen"
- ,(lambda (_button)
- (when startup-screen-inhibit-startup-screen
- (customize-set-variable 'inhibit-startup-screen t)
- (customize-mark-to-save 'inhibit-startup-screen)
- (custom-save-all))
- (let ((w (get-buffer-window "*GNU Emacs*")))
- (and w (not (one-window-p)) (delete-window w)))
- (kill-buffer "*GNU Emacs*")))
- " ")
- (when (or user-init-file custom-file)
- (let ((checked (create-image "checked.xpm"
- nil nil :ascent 'center))
- (unchecked (create-image "unchecked.xpm"
- nil nil :ascent 'center)))
- (insert-button
- " "
- :on-glyph checked
- :off-glyph unchecked
- 'checked nil 'display unchecked 'follow-link t
- 'action (lambda (button)
- (if (overlay-get button 'checked)
- (progn (overlay-put button 'checked nil)
- (overlay-put button 'display
- (overlay-get button :off-glyph))
- (setq startup-screen-inhibit-startup-screen
- nil))
- (overlay-put button 'checked t)
- (overlay-put button 'display
- (overlay-get button :on-glyph))
- (setq startup-screen-inhibit-startup-screen t)))))
- (fancy-splash-insert :face '(variable-pitch (:height 0.9))
- " Never show it again.")))))
+ :face 'variable-pitch
+ "\nTo start... "
+ :link `("Open a File"
+ ,(lambda (_button) (call-interactively 'find-file))
+ "Specify a new file's name, to edit the file")
+ " "
+ :link `("Open Home Directory"
+ ,(lambda (_button) (dired "~"))
+ "Open your home directory, to operate on its files")
+ " "
+ :link `("Customize Startup"
+ ,(lambda (_button) (customize-group 'initialization))
+ "Change initialization settings including this screen")
+ "\n"))
+ (fancy-splash-insert
+ :face 'variable-pitch "To quit a partially entered command, type "
+ :face 'default "Control-g"
+ :face 'variable-pitch ".\n")
+ (fancy-splash-insert :face `(variable-pitch font-lock-builtin-face)
+ "\nThis is "
+ (emacs-version)
+ "\n"
+ :face '(variable-pitch (:height 0.8))
+ emacs-copyright
+ "\n")
+ (and auto-save-list-file-prefix
+ ;; Don't signal an error if the
+ ;; directory for auto-save-list files
+ ;; does not yet exist.
+ (file-directory-p (file-name-directory
+ auto-save-list-file-prefix))
+ (directory-files
+ (file-name-directory auto-save-list-file-prefix)
+ nil
+ (concat "\\`"
+ (regexp-quote (file-name-nondirectory
+ auto-save-list-file-prefix)))
+ t)
+ (fancy-splash-insert :face '(variable-pitch font-lock-comment-face)
+ "\nIf an Emacs session crashed recently, "
+ "type "
+ :face '(fixed-pitch font-lock-comment-face)
+ "Meta-x recover-session RET"
+ :face '(variable-pitch font-lock-comment-face)
+ "\nto recover"
+ " the files you were editing."))
+
+ (when concise
+ (fancy-splash-insert
+ :face 'variable-pitch "\n"
+ :link `("Dismiss this startup screen"
+ ,(lambda (_button)
+ (when startup-screen-inhibit-startup-screen
+ (customize-set-variable 'inhibit-startup-screen t)
+ (customize-mark-to-save 'inhibit-startup-screen)
+ (custom-save-all))
+ (let ((w (get-buffer-window "*GNU Emacs*")))
+ (and w (not (one-window-p)) (delete-window w)))
+ (kill-buffer "*GNU Emacs*")))
+ " ")
+ (when (or user-init-file custom-file)
+ (let ((checked (create-image "checked.xpm"
+ nil nil :ascent 'center))
+ (unchecked (create-image "unchecked.xpm"
+ nil nil :ascent 'center)))
+ (insert-button
+ " "
+ :on-glyph checked
+ :off-glyph unchecked
+ 'checked nil 'display unchecked 'follow-link t
+ 'action (lambda (button)
+ (if (overlay-get button 'checked)
+ (progn (overlay-put button 'checked nil)
+ (overlay-put button 'display
+ (overlay-get button :off-glyph))
+ (setq startup-screen-inhibit-startup-screen
+ nil))
+ (overlay-put button 'checked t)
+ (overlay-put button 'display
+ (overlay-get button :on-glyph))
+ (setq startup-screen-inhibit-startup-screen t)))))
+ (fancy-splash-insert :face '(variable-pitch (:height 0.9))
+ " Never show it again."))))
(defun exit-splash-screen ()
"Stop displaying the splash screen buffer."
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 8fdce17df8..05208abb72 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -44,7 +44,8 @@
;; when you are on a tty. I hope that won't cause too much trouble -- rms.
(define-minor-mode tool-bar-mode
"Toggle use of the tool bar.
-With numeric ARG, display the tool bar if and only if ARG is positive.
+With a numeric argument, if the argument is positive, turn on the
+tool bar; otherwise, turn off the tool bar.
See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for
conveniently adding tool bar items."
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index e3f3c15304..796311f8f6 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1605,10 +1605,13 @@ Return t if the buffer had changes, nil otherwise."
;; bindings are nicer for read only buffers. pcl-cvs does the
;; same thing.
(setq buffer-read-only t)
- (vc-exec-after `(vc-diff-finish ,(current-buffer) ',(when verbose
- messages)))
;; Display the buffer, but at the end because it can change point.
(pop-to-buffer (current-buffer))
+ ;; The diff process may finish early, so call `vc-diff-finish'
+ ;; after `pop-to-buffer'; the former assumes the diff buffer is
+ ;; shown in some window.
+ (vc-exec-after `(vc-diff-finish ,(current-buffer)
+ ',(when verbose messages)))
;; In the async case, we return t even if there are no differences
;; because we don't know that yet.
t)))
diff --git a/lisp/window.el b/lisp/window.el
index 2c4bf0dcb2..999e408bdb 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3829,22 +3829,6 @@ subwindows can get as small as `window-safe-min-height' and
(window-state-put-2 ignore))
(window-check frame))))
-;;; Displaying buffers.
-(defconst display-buffer-default-specifiers
- '((reuse-window nil same visible)
- (pop-up-window (largest . nil) (lru . nil))
- (pop-up-window-min-height . 40)
- (pop-up-window-min-width . 80)
- (reuse-window other nil nil)
- (reuse-window nil other visible)
- (reuse-window nil nil t)
- (reuse-window-even-sizes . t))
- "Buffer display default specifiers.
-The value specified here is used when no other specifiers have
-been specified by the user or the application. Consult the
-documentation of `display-buffer-alist' for a description of
-buffer display specifiers.")
-
(defconst display-buffer-macro-specifiers
'((same-window
;; Use the same window.
@@ -3854,11 +3838,6 @@ buffer display specifiers.")
(reuse-window nil same nil)
(pop-up-window (largest . nil) (lru . nil))
(reuse-window nil other nil))
- ;; (other-window
- ;; ;; Avoid selected window.
- ;; (reuse-window other same visible)
- ;; (pop-up-window (largest . nil) (lru . nil))
- ;; (reuse-window other other visible))
(same-frame-other-window
;; Avoid other frames and selected window.
(reuse-window other same nil)
@@ -3868,25 +3847,10 @@ buffer display specifiers.")
;; Avoid selected frame.
(reuse-window nil same other)
(pop-up-frame)
- (reuse-window nil other other))
- (default
- ;; The default specifiers.
- display-buffer-default-specifiers))
+ (reuse-window nil other other)))
"Buffer display macro specifiers.")
-(defcustom display-buffer-alist
- '((((regexp . ".*"))
- ;; Reuse window showing same buffer on same frame.
- reuse-window (reuse-window nil same nil)
- ;; Pop up window.
- pop-up-window
- ;; Split largest or lru window.
- (pop-up-window (largest . nil) (lru . nil))
- (pop-up-window-min-height . 40) ; split-height-threshold / 2
- (pop-up-window-min-width . 80) ; split-width-threshold / 2
- ;; Reuse any but selected window on same frame.
- reuse-window (reuse-window other nil nil)
- (reuse-window-even-sizes . t)))
+(defcustom display-buffer-alist nil
"List associating buffer identifiers with display specifiers.
The car of each element of this list is built from a set of cons
cells called buffer identifiers. `display-buffer' shows a buffer
@@ -4751,15 +4715,15 @@ documentation of `display-buffer-alist' for a description."
(setq window (window-normalize-live-window window))
(let* ((old-frame (selected-frame))
(new-frame (window-frame window))
- (dedicated (cdr (assq 'dedicated specifiers)))
+ (dedicate (cdr (assq 'dedicate specifiers)))
(no-other-window (cdr (assq 'no-other-window specifiers))))
;; Show BUFFER in WINDOW.
(unless (eq buffer (window-buffer window))
;; If we show another buffer in WINDOW, undedicate it first.
(set-window-dedicated-p window nil))
(set-window-buffer window buffer)
- (when dedicated
- (set-window-dedicated-p window dedicated))
+ (when dedicate
+ (set-window-dedicated-p window dedicate))
(when no-other-window
(set-window-parameter window 'no-other-window t))
(unless (or (eq old-frame new-frame)
@@ -4775,7 +4739,7 @@ documentation of `display-buffer-alist' for a description."
;; Return window.
window))
-(defun display-buffer-reuse-window (buffer method &optional specifiers)
+(defun display-buffer-reuse-window (buffer method &optional specifiers other-window)
"Display BUFFER in an existing window.
METHOD must be a list in the form of the cdr of a `reuse-window'
buffer display specifier, see `display-buffer-alist' for an
@@ -4787,8 +4751,9 @@ frame to use - either nil, 0, `visible', `other', t, or a live
frame.
Optional argument SPECIFIERS must be a list of valid display
-specifiers. Return the window chosen to display BUFFER, nil if
-none was found."
+specifiers. Optional argument OTHER-WINDOW, if non-nil, means do
+not use the selected window. Return the window chosen to display
+BUFFER, nil if none was found."
(let* ((method-window (nth 0 method))
(method-buffer (nth 1 method))
(method-frame (nth 2 method))
@@ -4806,6 +4771,7 @@ none was found."
(eq window-buffer buffer))
(or (not method-window)
(and (eq method-window 'same)
+ (not other-window)
(eq window (selected-window)))
(and (eq method-window 'other)
(not (eq window (selected-window))))
@@ -5064,7 +5030,7 @@ description."
;; A window, directly specified.
cand)))
- (when (and (window-live-p window)
+ (when (and (window-any-p window)
;; The window must be on the correct frame,
(eq (window-frame window) frame)
;; and must be neither a minibuffer window
@@ -5084,7 +5050,7 @@ description."
;; Don't pass any specifiers to this function.
(funcall side window)))))
- (when window
+ (when (window-live-p window)
;; Adjust sizes if asked for.
(display-buffer-set-height window specifiers)
(display-buffer-set-width window specifiers)
@@ -5324,201 +5290,225 @@ Optional argument LABEL is like the same argument of
The calculation of the return value is exclusively based on the
user preferences expressed in `display-buffer-alist'."
- (let* ((buffer (window-normalize-buffer buffer-or-name))
- (list (display-buffer-normalize-alist (buffer-name buffer) label))
- (value (assq 'other-window-means-other-frame
- (or (car list) (cdr list)))))
- (when value (cdr value))))
-
-(defun display-buffer-normalize-arguments (buffer-name specifiers label other-frame)
- "Normalize second and third argument of `display-buffer'.
-BUFFER-NAME is the name of the buffer that shall be displayed,
-SPECIFIERS is the second argument of `display-buffer'. LABEL is
-the same argument of `display-buffer'. OTHER-FRAME non-nil means
-use other-frame for other-window."
- (let (normalized entry specifier pars)
- (setq specifier
- (cond
- ((not specifiers)
- nil)
- ((listp specifiers)
- ;; If SPECIFIERS is a list, we assume it is a list of specifiers.
- (dolist (specifier specifiers)
- (cond
- ((consp specifier)
- (setq normalized (cons specifier normalized)))
- ((eq specifier 'other-window)
- ;; `other-window' must be treated separately.
- (let ((entry (assq (if other-frame
- 'other-frame
- 'same-frame-other-window)
- display-buffer-macro-specifiers)))
- (dolist (item (cdr entry))
- (setq normalized (cons item normalized)))))
- ((symbolp specifier)
- ;; Might be a macro specifier, try to expand it (the cdr is a
- ;; list and we have to reverse it later, so do it one at a
- ;; time).
- (let ((entry (assq specifier display-buffer-macro-specifiers)))
- (dolist (item (cdr entry))
- (setq normalized (cons item normalized)))))))
- ;; Reverse list.
- (nreverse normalized))
- ((setq entry (assq specifiers display-buffer-macro-specifiers))
- ;; A macro specifier.
- (cdr entry))
- ((or other-frame (with-no-warnings pop-up-frames))
- ;; `special-display-p' group.
- (if (and (with-no-warnings special-display-function)
- ;; `special-display-p' returns either t or a list
- ;; of frame parameters to pass to
- ;; `special-display-function'.
- (setq pars (with-no-warnings
- (special-display-p buffer-name))))
- (list (list 'function
- (with-no-warnings special-display-function)
- (when (listp pars) pars)))
- ;; Pop up another frame.
- (cddr (assq 'other-frame display-buffer-macro-specifiers))))
- (t
- ;; In any other case pop up a new window.
- (cdr (assq 'same-frame-other-window
- display-buffer-macro-specifiers)))))
-
- ;; Handle the old meaning of the LABEL argument of `display-buffer'.
- (cond
- ((or (memq label '(visible 0 t)) (frame-live-p label))
- ;; LABEL must be one of visible (and visible frame), 0 (any
- ;; visible or iconfied frame), t (any frame), or a live frame.
- (cons `(reuse-window nil same ,label) specifier))
- ((or other-frame
- (with-no-warnings pop-up-frames)
- (with-no-warnings display-buffer-reuse-frames))
- (cons '(reuse-window nil same 0) specifier))
- (t
- specifier))))
-
-(defun display-buffer-normalize-options (buffer-or-name)
+ (let* ((buffer-name
+ (buffer-name (window-normalize-buffer buffer-or-name)))
+ (default (display-buffer-normalize-default buffer-name))
+ (alist (display-buffer-normalize-alist buffer-name label)))
+ (or (cdr (assq 'other-window-means-other-frame default))
+ (cdr (assq 'other-window-means-other-frame (cdr alist))))))
+
+(defun display-buffer-normalize-special (&optional args)
+ "Return buffer display specifiers for `special-display-frame-alist'."
+ (progn ;; <-- reserved for with-no-warnings
+ (if (and (listp args) (symbolp (car args)))
+ ;; Note: `display-buffer' funcalls this so take "(nth 1 args)"
+ ;; where `special-display-popup-frame' (which uses apply) takes
+ ;; "(cdr args)".
+ `((function ,(car args) ,(nth 1 args)))
+ (append
+ '((reuse-window nil same 0))
+ (when (and (listp args) (cdr (assq 'same-window args)))
+ '((reuse-window same nil nil) (reuse-dedicated . weak)))
+ (when (and (listp args)
+ (or (cdr (assq 'same-frame args))
+ (cdr (assq 'same-window args))))
+ '((pop-up-window (largest . nil) (lru . nil))
+ (reuse-window nil nil nil)))
+ (unless display-buffer-mark-dedicated
+ ;; Don't make anything created above dedicated unless requested.
+ ;; Otherwise the dedication request below gets in our way.
+ '((dedicated . nil)))
+ `((pop-up-frame t)
+ ,(append '(pop-up-frame-alist)
+ (when (listp args) args)
+ special-display-frame-alist)
+ (dedicated . t))))))
+
+(defun display-buffer-normalize-default (buffer-or-name)
"Subroutine of `display-buffer-normalize-specifiers'.
-BUFFER-OR-NAME is the buffer to display. This routine provides a
-compatibility layer for the now obsolete Emacs 23 buffer display
-options."
- (with-no-warnings
+BUFFER-OR-NAME is the buffer to display.
+
+This routine provides a compatibility layer for the obsolete
+Emacs 23 buffer display options to set up the corresponding
+buffer display specifiers."
+ (progn ;; <-- reserved for with-no-warnings
(let* ((buffer (window-normalize-buffer buffer-or-name))
(buffer-name (buffer-name buffer))
- (use-pop-up-frames
- (or (and (eq pop-up-frames 'graphic-only)
- (display-graphic-p))
- pop-up-frames))
- specifiers)
- ;; `even-window-heights', unless nil or unset.
- (unless (memq even-window-heights '(nil unset))
+ (pop-up-frames
+ (and (boundp 'pop-up-frames)
+ (or (and (eq pop-up-frames 'graphic-only)
+ (display-graphic-p))
+ pop-up-frames)))
+ specifiers args)
+ ;; `other-window-means-other-frame'
+ (when pop-up-frames
+ (setq specifiers
+ (cons (cons 'other-window-means-other-frame t) specifiers)))
+
+ ;; `even-window-heights'
+ (unless (and (boundp 'even-window-heights)
+ (not even-window-heights))
(setq specifiers
(cons (cons 'reuse-window-even-sizes t) specifiers)))
;; `display-buffer-mark-dedicated'
- (when display-buffer-mark-dedicated
+ (when (and (boundp 'display-buffer-mark-dedicated)
+ display-buffer-mark-dedicated)
(setq specifiers
(cons (cons 'dedicate display-buffer-mark-dedicated)
specifiers)))
- ;; `pop-up-window' group. Anything is added here iff
- ;; `pop-up-windows' is neither nil nor unset.
- (let ((pop-up-window (not (memq pop-up-windows '(nil unset))))
- (fun (unless (eq split-window-preferred-function
- 'split-window-sensibly)
- split-window-preferred-function))
- (min-height (if (numberp split-height-threshold)
- (/ split-height-threshold 2)
- 1.0))
- (min-width (if (numberp split-width-threshold)
- (/ split-width-threshold 2)
- 1.0)))
- ;; Create an entry only if a default value was changed.
- (when (or pop-up-window
- (not (equal split-height-threshold 80))
- (not (equal split-width-threshold 160)))
- ;; `reuse-window' (needed as fallback when popping up the new
- ;; window fails).
- (setq specifiers
- (cons (list 'reuse-window 'other nil nil)
- specifiers))
- ;; `split-width-threshold'
- (setq specifiers
- (cons (cons 'pop-up-window-min-width min-width)
- specifiers))
- ;; `split-height-threshold'
- (setq specifiers
- (cons (cons 'pop-up-window-min-height min-height)
- specifiers))
+ ;; `pop-up-window-min-height'
+ (let ((min-height
+ (if (boundp 'split-height-threshold)
+ (if (numberp split-height-threshold)
+ (/ split-height-threshold 2)
+ 1.0)
+ 40)))
+ (setq specifiers
+ (cons (cons 'pop-up-window-min-height min-height)
+ specifiers)))
+
+ ;; `pop-up-window-min-width'
+ (let ((min-width
+ (if (boundp 'split-width-threshold)
+ (if (numberp split-width-threshold)
+ (/ split-width-threshold 2)
+ 1.0)
+ 80)))
+ (setq specifiers
+ (cons (cons 'pop-up-window-min-width min-width)
+ specifiers)))
+
+ ;; `pop-up-window'
+ (unless (and (boundp 'pop-up-windows) (not pop-up-windows))
+ (let ((fun (when (and (boundp 'split-window-preferred-function)
+ (not (eq split-window-preferred-function
+ 'split-window-sensibly)))
+ split-window-preferred-function)))
;; `pop-up-window'
(setq specifiers
- (cons (list 'pop-up-window
- (cons 'largest fun) (cons 'lru fun))
- specifiers))))
+ (cons
+ (list 'pop-up-window (cons 'largest fun) (cons 'lru fun))
+ specifiers))))
+
+ ;; `pop-up-frame-function'
+ (when (and (boundp 'pop-up-frame-function)
+ (not (equal pop-up-frame-function
+ '(lambda nil
+ (make-frame pop-up-frame-alist)))))
+ (setq specifiers
+ (cons (cons 'pop-up-frame-function pop-up-frame-function)
+ specifiers)))
- ;; `pop-up-frame' group.
- (when use-pop-up-frames
+ ;; `pop-up-frame-alist'
+ (when pop-up-frame-alist
+ (setq specifiers
+ (cons (cons 'pop-up-frame-alist pop-up-frame-alist)
+ specifiers)))
+
+ ;; `pop-up-frame'
+ (when pop-up-frames
;; `pop-up-frame-function'. If `pop-up-frame-function' uses the
;; now obsolete `pop-up-frame-alist' it will continue to do so.
- (setq specifiers
- (cons (cons 'pop-up-frame-function pop-up-frame-function)
- specifiers))
;; `pop-up-frame'
(setq specifiers
+ ;; Maybe we should merge graphic-only into the following?
(cons (list 'pop-up-frame t) specifiers)))
- ;; `pop-up-windows' and `use-pop-up-frames' both nil means means
- ;; we are supposed to reuse any window on the same frame (unless
- ;; we find one showing the same buffer already).
- (unless (or pop-up-windows use-pop-up-frames)
- ;; `reuse-window' showing any buffer on same frame.
- (setq specifiers
- (cons (list 'reuse-window nil nil nil)
- specifiers)))
-
- ;; `special-display-p' group.
- (when special-display-function
- ;; `special-display-p' returns either t or a list of frame
- ;; parameters to pass to `special-display-function'.
- (let ((pars (special-display-p buffer-name)))
- (when pars
+ ;; `special-display'
+ (when (and (boundp 'special-display-function)
+ special-display-function
+ (fboundp 'special-display-p)
+ (setq args (special-display-p buffer-name)))
+ ;; `special-display-p' returns either t or a list of arguments
+ ;; to pass to `special-display-function'.
+ (if (eq special-display-function 'special-display-popup-frame)
(setq specifiers
- (cons (list 'function special-display-function
- (when (listp pars) pars))
- specifiers)))))
+ (append (display-buffer-normalize-special args)
+ specifiers))
+ (setq specifiers
+ (cons
+ `(function ,special-display-function ,(when (listp args) args))
+ specifiers))))
+ ;; Reuse window showing same buffer on visible or iconified frame.
;; `pop-up-frames', `display-buffer-reuse-frames' means search for
;; a window showing the buffer on some visible or iconfied frame.
- ;; `last-nonminibuffer-frame' set and not the same frame means
- ;; search that frame.
- (let ((frames (or (and (or use-pop-up-frames
- display-buffer-reuse-frames
+ ;; `last-nonminibuffer-frame' non-nil means search that frame.
+ (let ((frames (or (and (or pop-up-frames
+ (and (boundp 'display-buffer-reuse-frames)
+ display-buffer-reuse-frames)
(not (last-nonminibuffer-frame)))
;; All visible or iconfied frames.
0)
- ;; Same frame.
+ ;; The following usually returns the same frame
+ ;; so we implicitly search for a window showing
+ ;; the buffer on the same frame already.
(last-nonminibuffer-frame))))
(when frames
(setq specifiers
(cons (list 'reuse-window 'other 'same frames)
specifiers))))
- ;; `same-window-p' group.
- (when (same-window-p buffer-name)
+ ;; `same-window'
+ (when (and (fboundp 'same-window-p) (same-window-p buffer-name))
;; Try to reuse the same (selected) window.
(setq specifiers
- (cons (list 'reuse-window 'same nil nil)
- specifiers)))
+ (cons (list 'reuse-window 'same nil nil) specifiers)))
- ;; Prepend "reuse window on same frame if showing the buffer
- ;; already" specifier. It will be overriden by the application
- ;; supplied 'other-window specifier.
- (setq specifiers (cons (list 'reuse-window nil 'same nil)
- specifiers))
+ ;; Same window if showing this buffer already. Can be overridden
+ ;; by `other-window' argument if the buffer is already shown in
+ ;; the same window.
+ (setq specifiers
+ (cons (list 'reuse-window 'same 'same nil) specifiers))
specifiers)))
+(defun display-buffer-normalize-argument (buffer-name specifiers other-window-means-other-frame)
+ "Normalize second argument of `display-buffer'.
+BUFFER-NAME is the name of the buffer that shall be displayed,
+SPECIFIERS is the second argument of `display-buffer'.
+OTHER-WINDOW-MEANS-OTHER-FRAME non-nil means use other-frame for
+other-window."
+ (progn ;; <-- reserved for with-no-warnings
+ (let (normalized entry specifier pars)
+ (cond
+ ((not specifiers)
+ nil)
+ ((listp specifiers)
+ ;; If SPECIFIERS is a list, we assume it is a list of valid
+ ;; specifiers.
+ (dolist (specifier specifiers)
+ (cond
+ ((consp specifier)
+ (setq normalized (cons specifier normalized)))
+ ((eq specifier 'other-window)
+ ;; `other-window' must be treated separately.
+ (let ((entry (assq (if other-window-means-other-frame
+ 'other-frame
+ 'same-frame-other-window)
+ display-buffer-macro-specifiers)))
+ (dolist (item (cdr entry))
+ (setq normalized (cons item normalized)))))
+ ((symbolp specifier)
+ ;; Might be a macro specifier, try to expand it (the cdr is a
+ ;; list and we have to reverse it later, so do it one at a
+ ;; time).
+ (let ((entry (assq specifier display-buffer-macro-specifiers)))
+ (dolist (item (cdr entry))
+ (setq normalized (cons item normalized)))))))
+ ;; Reverse list.
+ (nreverse normalized))
+ ((setq entry (assq specifiers display-buffer-macro-specifiers))
+ ;; A macro specifier.
+ (cdr entry))
+ (t
+ ;; Anything else means use another window according to the
+ ;; non-overriding specifiers of `display-buffer-alist' and the
+ ;; specifiers produced by `display-buffer-normalize-default'.
+ '((other-window . t)))))))
+
(defun display-buffer-normalize-alist-1 (specifiers label)
"Subroutine of `display-buffer-normalize-alist'.
SPECIFIERS is a list of buffer display specfiers. LABEL is the
@@ -5579,9 +5569,6 @@ LABEL the corresponding argument of `display-buffer'."
(cons list-1 list-2)))
-(defvar display-buffer-normalize-options-inhibit nil
- "If non-nil, `display-buffer' doesn't process obsolete options.")
-
(defun display-buffer-normalize-specifiers (buffer-name specifiers label)
"Return normalized specifiers for a buffer matching BUFFER-NAME or LABEL.
BUFFER-NAME must be a string specifying a valid buffer name.
@@ -5600,25 +5587,33 @@ specifiers:
- The specifiers in `display-buffer-alist' whose buffer
identifier matches BUFFER-NAME or LABEL and whose 'override
- component is not set.
-
-- `display-buffer-default-specifiers'."
- (let* ((list (display-buffer-normalize-alist buffer-name label))
- (other-frame (cdr (assq 'other-window-means-other-frame
- (or (car list) (cdr list))))))
+ component is not set."
+ (let* ((default (display-buffer-normalize-default buffer-name))
+ (alist (display-buffer-normalize-alist buffer-name label))
+ (other-window-means-other-frame
+ (or (cdr (assq 'other-window-means-other-frame default))
+ (cdr (assq 'other-window-means-other-frame (cdr alist)))))
+ (arg2 (display-buffer-normalize-argument
+ buffer-name specifiers other-window-means-other-frame))
+ (arg3
+ ;; Handle special meaning of the LABEL argument of
+ ;; `display-buffer'.
+ (when (or (memq label '(visible 0 t)) (frame-live-p label))
+ ;; LABEL must be one of visible (any visible frame), 0 (any
+ ;; visible or iconfied frame), t (any frame), or a live
+ ;; frame.
+ `((reuse-window nil same ,label)))))
(append
;; Overriding user specifiers.
- (car list)
- ;; Application specifiers.
- (display-buffer-normalize-arguments
- buffer-name specifiers label other-frame)
- ;; Emacs 23 compatibility specifiers.
- (unless display-buffer-normalize-options-inhibit
- (display-buffer-normalize-options buffer-name))
+ (car alist)
+ ;; Special value of third argument of display-buffer.
+ arg3
+ ;; Second argument of display-buffer.
+ arg2
;; Non-overriding user specifiers.
- (cdr list)
+ (cdr alist)
;; Default specifiers.
- display-buffer-default-specifiers)))
+ default)))
;; Minibuffer-only frames should be documented better. They really
;; deserve a separate section in the manual. Also
@@ -5653,9 +5648,8 @@ For convenience, SPECIFIERS may also consist of a single buffer
display location specifier or t, where the latter means to
display the buffer in any but the selected window. If SPECIFIERS
is nil or omitted, this means to exclusively use the specifiers
-provided by `display-buffer-alist'. If the value of the latter
-is nil too, all specifiers are provided by the constant
-`display-buffer-default-specifiers'.
+provided by the variable `display-buffer-alist' and the function
+`display-buffer-normalize-default'.
As a special case, the `reuse-window' specifier allows to specify
as second element an arbitrary window, as third element an
@@ -5707,7 +5701,7 @@ this list as arguments."
;; Don't use a minibuffer frame.
(frame (display-buffer-frame))
;; `window' is the window we use for showing `buffer'.
- window specifier method)
+ window specifier method other-window)
;; Reset this.
(setq display-buffer-window nil)
(if display-buffer-function
@@ -5723,7 +5717,7 @@ this list as arguments."
(cond
((eq method 'reuse-window)
(display-buffer-reuse-window
- buffer (cdr specifier) normalized))
+ buffer (cdr specifier) normalized other-window))
((eq method 'pop-up-window)
(display-buffer-pop-up-window
buffer (cdr specifier) normalized))
@@ -5734,25 +5728,31 @@ this list as arguments."
(display-buffer-in-side-window
buffer (nth 1 specifier) (nth 2 specifier) normalized))
((eq method 'function)
- (funcall (nth 1 specifier) buffer (nth 2 specifier))))))
+ (funcall (nth 1 specifier) buffer (nth 2 specifier)))
+ ((eq method 'other-window)
+ (setq other-window t)))))
;; If we don't have a window yet, try a fallback method. All
- ;; specifiers have been used up by now.
+ ;; specifiers have been used up by now. Try reusing a window
(or (and (window-live-p window) window)
- ;; Try reusing a window showing BUFFER on any visible or
- ;; iconfied frame.
- (display-buffer-reuse-window buffer `(nil ,buffer 0))
- ;; Try reusing a window not showing BUFFER on any visible or
- ;; iconified frame.
- (display-buffer-reuse-window buffer '(nil other 0))
- ;; Eli says it's better to never try making a new frame.
- ;; (display-buffer-pop-up-frame buffer)
- ;; Try using a weakly dedicated window.
+ ;; on the selected frame,
+ (display-buffer-reuse-window
+ buffer '(nil nil nil) nil other-window)
+ ;; showing BUFFER on any visible frame,
+ (display-buffer-reuse-window
+ buffer '(nil same visible) nil other-window)
+ ;; not showing BUFFER on any visible frame,
(display-buffer-reuse-window
- buffer '(nil nil t) '((reuse-window-dedicated . weak)))
- ;; Try using a strongly dedicated window.
+ buffer '(nil other visible) nil other-window)
+ ;; showing BUFFER on any visible or iconified frame,
(display-buffer-reuse-window
- buffer '(nil nil t) '((reuse-window-dedicated . t)))))))
+ buffer '(nil same 0) nil other-window)
+ ;; not showing BUFFER on any visible or iconified frame.
+ (display-buffer-reuse-window
+ buffer '(nil other 0) nil other-window)
+ ;; If everything failed so far, try popping up a new frame
+ ;; regardless of graphic-only restrictions.
+ (display-buffer-pop-up-frame buffer)))))
(defsubst display-buffer-same-window (&optional buffer-or-name label)
"Display buffer specified by BUFFER-OR-NAME in the selected window.
@@ -6395,10 +6395,9 @@ that frame."
;; 'display-buffer-reuse-frames
;; "use 2nd arg of `display-buffer' instead." "24.1")
-(defcustom pop-up-windows 'unset ; t
- "Set and non-nil means `display-buffer' should make a new window."
+(defcustom pop-up-windows t
+ "Non-nil means `display-buffer' should make a new window."
:type 'boolean
- :version "24.1"
:group 'windows)
;; (make-obsolete-variable
;; 'pop-up-windows
@@ -6459,13 +6458,12 @@ is nil, `display-buffer' cannot split windows horizontally."
;; 'split-width-threshold
;; "use 2nd arg of `display-buffer' instead." "24.1")
-(defcustom even-window-heights 'unset ; t
- "If set and non-nil `display-buffer' will try to even window heights.
+(defcustom even-window-heights t
+ "If non-nil `display-buffer' will try to even window heights.
Otherwise `display-buffer' will leave the window configuration
-alone. Heights are evened only when `display-buffer' reuses a
+alone. Heights are evened only when `display-buffer' chooses a
window that appears above or below the selected window."
:type 'boolean
- :version "24.1"
:group 'windows)
;; (make-obsolete-variable
;; 'even-window-heights
@@ -6635,7 +6633,7 @@ value of `display-buffer-alist'."
1.0)))
(list
'pop-up-window
- (when pop-up-windows ; unset qualifies as t
+ (when pop-up-windows
(list
'pop-up-window
(cons 'largest fun)
@@ -6789,7 +6787,7 @@ value of `display-buffer-alist'."
;; "0" (all visible and iconified frames) is hardcoded in
;; Emacs 23.
0))
- (unless (memq even-window-heights '(nil unset))
+ (when even-window-heights
(cons 'reuse-window-even-sizes t)))
no-custom)
@@ -6798,7 +6796,7 @@ value of `display-buffer-alist'."
(display-buffer-alist-add
nil
(list
- (cons 'dedicated display-buffer-mark-dedicated))
+ (cons 'dedicate display-buffer-mark-dedicated))
no-custom)))
display-buffer-alist)
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index dfa0f660a7..e98d8e0f4e 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,4 +1,4 @@
-# pthread_sigmask.m4 serial 7
+# pthread_sigmask.m4 serial 7-emacs1
dnl Copyright (C) 2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,55 +8,6 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[
AC_CHECK_FUNCS_ONCE([pthread_sigmask])
LIB_PTHREAD_SIGMASK=
- m4_ifdef([gl_THREADLIB], [
- AC_REQUIRE([gl_THREADLIB])
- if test "$gl_threads_api" = posix; then
- if test $ac_cv_func_pthread_sigmask = yes; then
- dnl pthread_sigmask is available without -lpthread.
- :
- else
- if test -n "$LIBMULTITHREAD"; then
- AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD],
- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD],
- [gl_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBMULTITHREAD"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <pthread.h>
- #include <signal.h>
- ]],
- [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]])
- ],
- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes],
- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no])
- LIBS="$gl_save_LIBS"
- ])
- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
- dnl pthread_sigmask is available with -lpthread.
- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
- else
- dnl pthread_sigmask is not available at all.
- HAVE_PTHREAD_SIGMASK=0
- fi
- else
- dnl pthread_sigmask is not available at all.
- HAVE_PTHREAD_SIGMASK=0
- fi
- fi
- else
- dnl pthread_sigmask may exist but does not interoperate with the chosen
- dnl multithreading facility.
- dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask,
- dnl but it is equivalent to sigprocmask, so we choose to emulate
- dnl pthread_sigmask with sigprocmask also in this case. This yields fewer
- dnl link dependencies.
- if test $ac_cv_func_pthread_sigmask = yes; then
- REPLACE_PTHREAD_SIGMASK=1
- else
- HAVE_PTHREAD_SIGMASK=0
- fi
- fi
- ] ,[
dnl gl_THREADLIB is not in use. Assume the application wants
dnl POSIX semantics.
if test $ac_cv_func_pthread_sigmask != yes; then
@@ -69,7 +20,6 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask
fi
fi
- ])
AC_SUBST([LIB_PTHREAD_SIGMASK])
dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
diff --git a/src/ChangeLog b/src/ChangeLog
index e4f3401eb4..4e69399154 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2011-07-09 Paul Eggert <[email protected]>
+2011-07-11 Paul Eggert <[email protected]>
* image.c: Integer signedness and overflow and related fixes.
This is not an exhaustive set of fixes, but it's time to
@@ -151,6 +151,72 @@
Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
well either way, and we prefer signed to unsigned.
+2011-07-10 Johan Bockgård <[email protected]>
+
+ * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
+
+2011-07-10 Jan Djärv <[email protected]>
+
+ * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
+ for non-popups (Bug#3642).
+
+2011-07-10 Andreas Schwab <[email protected]>
+
+ * alloc.c (reset_malloc_hooks): Protoize.
+ * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
+ (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
+ * cm.c (losecursor): Likewise.
+ * data.c (fmod): Likewise.
+ * dispnew.c (swap_glyphs_in_rows): Likewise.
+ * emacs.c (memory_warning_signal): Likewise.
+ * floatfns.c (float_error): Likewise.
+ * font.c (check_gstring, check_otf_features, otf_tag_symbol)
+ (otf_open, font_otf_capability, generate_otf_features)
+ (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
+ Likewise.
+ * image.c (pbm_read_file): Likewise.
+ * indent.c (string_display_width): Likewise.
+ * intervals.c (check_for_interval, search_for_interval)
+ (inc_interval_count, count_intervals, root_interval)
+ (adjust_intervals_for_insertion, make_new_interval): Likewise.
+ * lread.c (defalias): Likewise.
+ * ralloc.c (r_alloc_check): Likewise.
+ * regex.c (set_image_of_range_1, set_image_of_range)
+ (regex_grow_registers): Likewise.
+ * sysdep.c (strerror): Likewise.
+ * termcap.c (valid_filename_p, tprint, main): Likewise.
+ * tparam.c (main): Likewise.
+ * unexhp9k800.c (run_time_remap, save_data_space)
+ (update_file_ptrs, read_header, write_header, calculate_checksum)
+ (copy_file, copy_rest, display_header): Likewise.
+ * widget.c (mark_shell_size_user_specified, create_frame_gcs):
+ Likewise.
+ * xdisp.c (check_it): Likewise.
+ * xfaces.c (register_color, unregister_color, unregister_colors):
+ Likewise.
+ * xfns.c (print_fontset_result): Likewise.
+ * xrdb.c (member, fatal, main): Likewise.
+
+2011-07-10 Paul Eggert <[email protected]>
+
+ Fix minor problems found by static checking (Bug#9031).
+ * chartab.c (char_table_set_range, map_sub_char_table):
+ Remove unused locals.
+ (uniprop_table): Now static.
+ * composite.c (_work_char): Remove unused static var.
+
+2011-07-09 Juanma Barranquero <[email protected]>
+
+ * chartab.c (uniprop_table_uncompress): Remove unused local variable.
+
+2011-07-09 Jan Djärv <[email protected]>
+
+ * gtkutil.c (qttip_cb): Remove code without function.
+
+2011-07-09 Eli Zaretskii <[email protected]>
+
+ * w32.c (pthread_sigmask): New stub.
+
2011-07-08 Paul Eggert <[email protected]>
Use pthread_sigmask, not sigprocmask (Bug#9010).
diff --git a/src/alloc.c b/src/alloc.c
index 5cdd5af9ec..f325b6ed44 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1277,7 +1277,7 @@ emacs_blocked_realloc (void *ptr, size_t size, const void *ptr2)
calls malloc because it is the first call, and we have an endless loop. */
void
-reset_malloc_hooks ()
+reset_malloc_hooks (void)
{
__free_hook = old_free_hook;
__malloc_hook = old_malloc_hook;
diff --git a/src/buffer.c b/src/buffer.c
index 48dde18b02..05e96e8511 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4466,24 +4466,40 @@ static int mmap_initialized_p;
#define MMAP_ALLOCATED_P(start, end) 1
#endif
-/* Function prototypes. */
+/* Perform necessary intializations for the use of mmap. */
-static int mmap_free_1 (struct mmap_region *);
-static int mmap_enlarge (struct mmap_region *, int);
-static struct mmap_region *mmap_find (POINTER_TYPE *, POINTER_TYPE *);
-static POINTER_TYPE *mmap_alloc (POINTER_TYPE **, size_t);
-static POINTER_TYPE *mmap_realloc (POINTER_TYPE **, size_t);
-static void mmap_free (POINTER_TYPE **ptr);
-static void mmap_init (void);
+static void
+mmap_init (void)
+{
+#if MAP_ANON == 0
+ /* The value of mmap_fd is initially 0 in temacs, and -1
+ in a dumped Emacs. */
+ if (mmap_fd <= 0)
+ {
+ /* No anonymous mmap -- we need the file descriptor. */
+ mmap_fd = open ("/dev/zero", O_RDONLY);
+ if (mmap_fd == -1)
+ fatal ("Cannot open /dev/zero: %s", emacs_strerror (errno));
+ }
+#endif /* MAP_ANON == 0 */
+
+ if (mmap_initialized_p)
+ return;
+ mmap_initialized_p = 1;
+#if MAP_ANON != 0
+ mmap_fd = -1;
+#endif
+
+ mmap_page_size = getpagesize ();
+}
/* Return a region overlapping address range START...END, or null if
none. END is not including, i.e. the last byte in the range
is at END - 1. */
static struct mmap_region *
-mmap_find (start, end)
- POINTER_TYPE *start, *end;
+mmap_find (POINTER_TYPE *start, POINTER_TYPE *end);
{
struct mmap_region *r;
char *s = (char *) start, *e = (char *) end;
@@ -4512,8 +4528,7 @@ mmap_find (start, end)
the region. Value is non-zero if successful. */
static int
-mmap_free_1 (r)
- struct mmap_region *r;
+mmap_free_1 (struct mmap_region *r)
{
if (r->next)
r->next->prev = r->prev;
@@ -4536,9 +4551,7 @@ mmap_free_1 (r)
Value is non-zero if successful. */
static int
-mmap_enlarge (r, npages)
- struct mmap_region *r;
- int npages;
+mmap_enlarge (struct mmap_region *r, int npages)
{
char *region_end = (char *) r + r->nbytes_mapped;
size_t nbytes;
@@ -4602,8 +4615,7 @@ mmap_enlarge (r, npages)
when Emacs starts. */
void
-mmap_set_vars (restore_p)
- int restore_p;
+mmap_set_vars (int restore_p)
{
struct mmap_region *r;
@@ -4636,9 +4648,7 @@ mmap_set_vars (restore_p)
return null. */
static POINTER_TYPE *
-mmap_alloc (var, nbytes)
- POINTER_TYPE **var;
- size_t nbytes;
+mmap_alloc (POINTER_TYPE **var, size_t nbytes)
{
void *p;
size_t map;
@@ -4675,15 +4685,29 @@ mmap_alloc (var, nbytes)
}
+/* Free a block of relocatable storage whose data is pointed to by
+ PTR. Store 0 in *PTR to show there's no block allocated. */
+
+static void
+mmap_free (POINTER_TYPE **var)
+{
+ mmap_init ();
+
+ if (*var)
+ {
+ mmap_free_1 (MMAP_REGION (*var));
+ *var = NULL;
+ }
+}
+
+
/* Given a pointer at address VAR to data allocated with mmap_alloc,
resize it to size NBYTES. Change *VAR to reflect the new block,
and return this value. If more memory cannot be allocated, then
leave *VAR unchanged, and return null. */
static POINTER_TYPE *
-mmap_realloc (var, nbytes)
- POINTER_TYPE **var;
- size_t nbytes;
+mmap_realloc (POINTER_TYPE **var, size_t nbytes)
{
POINTER_TYPE *result;
@@ -4753,51 +4777,6 @@ mmap_realloc (var, nbytes)
}
-/* Free a block of relocatable storage whose data is pointed to by
- PTR. Store 0 in *PTR to show there's no block allocated. */
-
-static void
-mmap_free (var)
- POINTER_TYPE **var;
-{
- mmap_init ();
-
- if (*var)
- {
- mmap_free_1 (MMAP_REGION (*var));
- *var = NULL;
- }
-}
-
-
-/* Perform necessary intializations for the use of mmap. */
-
-static void
-mmap_init ()
-{
-#if MAP_ANON == 0
- /* The value of mmap_fd is initially 0 in temacs, and -1
- in a dumped Emacs. */
- if (mmap_fd <= 0)
- {
- /* No anonymous mmap -- we need the file descriptor. */
- mmap_fd = open ("/dev/zero", O_RDONLY);
- if (mmap_fd == -1)
- fatal ("Cannot open /dev/zero: %s", emacs_strerror (errno));
- }
-#endif /* MAP_ANON == 0 */
-
- if (mmap_initialized_p)
- return;
- mmap_initialized_p = 1;
-
-#if MAP_ANON != 0
- mmap_fd = -1;
-#endif
-
- mmap_page_size = getpagesize ();
-}
-
#endif /* USE_MMAP_FOR_BUFFERS */
diff --git a/src/chartab.c b/src/chartab.c
index e900a3ae71..efe23eca83 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -485,7 +485,6 @@ Lisp_Object
char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val)
{
struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
- Lisp_Object *contents = tbl->contents;
if (from == to)
char_table_set (table, from, val);
@@ -759,8 +758,6 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
Lisp_Object function, Lisp_Object table, Lisp_Object arg, Lisp_Object val,
Lisp_Object range, Lisp_Object top)
{
- /* Pointer to the elements of TABLE. */
- Lisp_Object *contents;
/* Depth of TABLE. */
int depth;
/* Minimum and maxinum characters covered by TABLE. */
@@ -777,14 +774,12 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
depth = XINT (tbl->depth);
- contents = tbl->contents;
min_char = XINT (tbl->min_char);
max_char = min_char + chartab_chars[depth - 1] - 1;
}
else
{
depth = 0;
- contents = XCHAR_TABLE (table)->contents;
min_char = 0;
max_char = MAX_CHAR;
}
@@ -1143,7 +1138,6 @@ uniprop_table_uncompress (Lisp_Object table, int idx)
Lisp_Object sub = make_sub_char_table (3, min_char, Qnil);
struct Lisp_Sub_Char_Table *subtbl = XSUB_CHAR_TABLE (sub);
const unsigned char *p, *pend;
- int i;
XSUB_CHAR_TABLE (table)->contents[idx] = sub;
p = SDATA (val), pend = p + SBYTES (val);
@@ -1316,7 +1310,7 @@ uniprop_get_encoder (Lisp_Object table)
function may load a Lisp file and thus may cause
garbage-collection. */
-Lisp_Object
+static Lisp_Object
uniprop_table (Lisp_Object prop)
{
Lisp_Object val, table, result;
diff --git a/src/cm.c b/src/cm.c
index 42f855f169..609632eba1 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -305,7 +305,8 @@ done:
}
#if 0
-losecursor ()
+void
+losecursor (void)
{
curY = -1;
}
diff --git a/src/composite.c b/src/composite.c
index cf1e053f02..d402d5ad0c 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -967,7 +967,6 @@ autocmp_chars (Lisp_Object rule, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT
}
static Lisp_Object _work_val;
-static int _work_char;
/* 1 iff the character C is composable. Characters of general
category Z? or C? are not composable except for ZWNJ and ZWJ. */
diff --git a/src/data.c b/src/data.c
index eb3f870b97..76a54547a5 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2733,8 +2733,7 @@ Both must be integers or markers. */)
#ifndef HAVE_FMOD
double
-fmod (f1, f2)
- double f1, f2;
+fmod (double f1, double f2)
{
double r = f1;
diff --git a/src/dispnew.c b/src/dispnew.c
index c95404b5c5..15d8036770 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1029,8 +1029,7 @@ increment_row_positions (struct glyph_row *row,
B without changing glyph pointers in A and B. */
static void
-swap_glyphs_in_rows (a, b)
- struct glyph_row *a, *b;
+swap_glyphs_in_rows (struct glyph_row *a, struct glyph_row *b)
{
int area;
diff --git a/src/emacs.c b/src/emacs.c
index a055d89d35..39870ec007 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -356,8 +356,7 @@ fatal_error_signal (int sig)
/* Handler for SIGDANGER. */
void
-memory_warning_signal (sig)
- int sig;
+memory_warning_signal (int sig)
{
signal (sig, memory_warning_signal);
SIGNAL_THREAD_CHECK (sig);
diff --git a/src/floatfns.c b/src/floatfns.c
index 850eb9f1bc..89aa052e8b 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -958,8 +958,7 @@ Rounds the value toward zero. */)
#ifdef FLOAT_CATCH_SIGILL
static void
-float_error (signo)
- int signo;
+float_error (int signo)
{
if (! in_float)
fatal_error_signal (signo);
diff --git a/src/font.c b/src/font.c
index 5aff20b134..5f8d22157d 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1738,8 +1738,7 @@ font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Objec
#define LGSTRING_GLYPH_SIZE 8
static int
-check_gstring (gstring)
- Lisp_Object gstring;
+check_gstring (Lisp_Object gstring)
{
Lisp_Object val;
int i, j;
@@ -1793,8 +1792,7 @@ check_gstring (gstring)
}
static void
-check_otf_features (otf_features)
- Lisp_Object otf_features;
+check_otf_features (Lisp_Object otf_features)
{
Lisp_Object val;
@@ -1827,8 +1825,7 @@ check_otf_features (otf_features)
Lisp_Object otf_list;
static Lisp_Object
-otf_tag_symbol (tag)
- OTF_Tag tag;
+otf_tag_symbol (OTF_Tag tag)
{
char name[5];
@@ -1837,8 +1834,7 @@ otf_tag_symbol (tag)
}
static OTF *
-otf_open (file)
- Lisp_Object file;
+otf_open (Lisp_Object file)
{
Lisp_Object val = Fassoc (file, otf_list);
OTF *otf;
@@ -1860,8 +1856,7 @@ otf_open (file)
(struct font_driver).otf_capability. */
Lisp_Object
-font_otf_capability (font)
- struct font *font;
+font_otf_capability (struct font *font)
{
OTF *otf;
Lisp_Object capability = Fcons (Qnil, Qnil);
@@ -1935,9 +1930,7 @@ font_otf_capability (font)
FEATURES. */
static void
-generate_otf_features (spec, features)
- Lisp_Object spec;
- char *features;
+generate_otf_features (Lisp_Object spec, char *features)
{
Lisp_Object val;
char *p;
@@ -1972,8 +1965,7 @@ generate_otf_features (spec, features)
}
Lisp_Object
-font_otf_DeviceTable (device_table)
- OTF_DeviceTable *device_table;
+font_otf_DeviceTable (OTF_DeviceTable *device_table)
{
int len = device_table->StartSize - device_table->EndSize + 1;
@@ -1982,9 +1974,7 @@ font_otf_DeviceTable (device_table)
}
Lisp_Object
-font_otf_ValueRecord (value_format, value_record)
- int value_format;
- OTF_ValueRecord *value_record;
+font_otf_ValueRecord (int value_format, OTF_ValueRecord *value_record)
{
Lisp_Object val = Fmake_vector (make_number (8), Qnil);
@@ -2008,8 +1998,7 @@ font_otf_ValueRecord (value_format, value_record)
}
Lisp_Object
-font_otf_Anchor (anchor)
- OTF_Anchor *anchor;
+font_otf_Anchor (OTF_Anchor *anchor)
{
Lisp_Object val;
diff --git a/src/gtkutil.c b/src/gtkutil.c
index dfc5b63f37..35b366222d 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -647,7 +647,6 @@ qttip_cb (GtkWidget *widget,
/* Change stupid Gtk+ default line wrapping. */
p = gtk_widget_get_parent (x->ttip_lbl);
list = gtk_container_get_children (GTK_CONTAINER (p));
- iter;
for (iter = list; iter; iter = g_list_next (iter))
{
GtkWidget *w = GTK_WIDGET (iter->data);
diff --git a/src/image.c b/src/image.c
index a09fc7a897..f6626f61c8 100644
--- a/src/image.c
+++ b/src/image.c
@@ -5002,9 +5002,7 @@ pbm_scan_number (unsigned char **s, unsigned char *end)
occurred. *SIZE is set to the size of the file. */
static char *
-pbm_read_file (file, size)
- Lisp_Object file;
- int *size;
+pbm_read_file (Lisp_Object file, int *size)
{
FILE *fp = NULL;
char *buf = NULL;
diff --git a/src/indent.c b/src/indent.c
index 02d99d14de..5c5966175a 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -725,8 +725,7 @@ current_column_1 (void)
If END is nil, that stands for the end of STRING. */
static double
-string_display_width (string, beg, end)
- Lisp_Object string, beg, end;
+string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end)
{
register int col;
register unsigned char *ptr, *stop;
diff --git a/src/intervals.c b/src/intervals.c
index 4de001f2ff..2063655cdb 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -247,8 +247,7 @@ static int zero_length;
INTERVAL search_interval, found_interval;
void
-check_for_interval (i)
- register INTERVAL i;
+check_for_interval (INTERVAL i)
{
if (i == search_interval)
{
@@ -258,8 +257,7 @@ check_for_interval (i)
}
INTERVAL
-search_for_interval (i, tree)
- register INTERVAL i, tree;
+search_for_interval (INTERVAL i, INTERVAL tree)
{
icount = 0;
search_interval = i;
@@ -269,8 +267,7 @@ search_for_interval (i, tree)
}
static void
-inc_interval_count (i)
- INTERVAL i;
+inc_interval_count (INTERVAL i)
{
icount++;
if (LENGTH (i) == 0)
@@ -280,8 +277,7 @@ inc_interval_count (i)
}
int
-count_intervals (i)
- register INTERVAL i;
+count_intervals (INTERVAL i)
{
icount = 0;
idepth = 0;
@@ -292,8 +288,7 @@ count_intervals (i)
}
static INTERVAL
-root_interval (interval)
- INTERVAL interval;
+root_interval (INTERVAL interval)
{
register INTERVAL i = interval;
@@ -804,9 +799,8 @@ update_interval (register INTERVAL i, EMACS_INT pos)
to the root. */
static INTERVAL
-adjust_intervals_for_insertion (tree, position, length)
- INTERVAL tree;
- EMACS_INT position, length;
+adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position,
+ EMACS_INT length)
{
register EMACS_INT relative_position;
register INTERVAL this;
@@ -1615,9 +1609,7 @@ reproduce_tree_obj (INTERVAL source, Lisp_Object parent)
interval. */
static INTERVAL
-make_new_interval (intervals, start, length)
- INTERVAL intervals;
- EMACS_INT start, length;
+make_new_interval (INTERVAL intervals, EMACS_INT start, EMACS_INT length)
{
INTERVAL slot;
diff --git a/src/lread.c b/src/lread.c
index 6a97be2be4..bef1cc8e59 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3981,9 +3981,7 @@ defsubr (struct Lisp_Subr *sname)
#ifdef NOTDEF /* use fset in subr.el now */
void
-defalias (sname, string)
- struct Lisp_Subr *sname;
- char *string;
+defalias (struct Lisp_Subr *sname, char *string)
{
Lisp_Object sym;
sym = intern (string);
diff --git a/src/ralloc.c b/src/ralloc.c
index 9c601a0ac2..64a4741620 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1079,7 +1079,7 @@ r_alloc_reinit (void)
#include <assert.h>
void
-r_alloc_check ()
+r_alloc_check (void)
{
int found = 0;
heap_ptr h, ph = 0;
diff --git a/src/regex.c b/src/regex.c
index d347d27481..190d1d0fe2 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -2169,10 +2169,9 @@ extend_range_table_work_area (struct range_table_work_area *work_area)
Returns -1 if successful, REG_ESPACE if ran out of space. */
static int
-set_image_of_range_1 (work_area, start, end, translate)
- RE_TRANSLATE_TYPE translate;
- struct range_table_work_area *work_area;
- re_wchar_t start, end;
+set_image_of_range_1 (struct range_table_work_area *work_area,
+ re_wchar_t start, re_wchar_t end,
+ RE_TRANSLATE_TYPE translate)
{
/* `one_case' indicates a character, or a run of characters,
each of which is an isolate (no case-equivalents).
@@ -2322,10 +2321,9 @@ set_image_of_range_1 (work_area, start, end, translate)
Returns -1 if successful, REG_ESPACE if ran out of space. */
static int
-set_image_of_range (work_area, start, end, translate)
- RE_TRANSLATE_TYPE translate;
- struct range_table_work_area *work_area;
- re_wchar_t start, end;
+set_image_of_range (struct range_table_work_area *work_area,
+ re_wchar_t start, re_wchar_t end,
+ RE_TRANSLATE_TYPE translate)
{
re_wchar_t cmin, cmax;
@@ -2412,8 +2410,7 @@ static re_char **best_regstart, **best_regend;
but don't make them smaller. */
static
-regex_grow_registers (num_regs)
- int num_regs;
+regex_grow_registers (int num_regs)
{
if (num_regs > regs_allocated_size)
{
diff --git a/src/sysdep.c b/src/sysdep.c
index 077d440559..4bd1f54b9e 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1800,8 +1800,7 @@ get_random (void)
#ifndef HAVE_STRERROR
#ifndef WINDOWSNT
char *
-strerror (errnum)
- int errnum;
+strerror (int errnum)
{
extern char *sys_errlist[];
extern int sys_nerr;
diff --git a/src/termcap.c b/src/termcap.c
index e191f6b3af..96b9303d62 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -338,8 +338,7 @@ static int name_match (char *line, char *name);
#ifdef MSDOS /* MW, May 1993 */
static int
-valid_filename_p (fn)
- char *fn;
+valid_filename_p (char *fn)
{
return *fn == '/' || fn[1] == ':';
}
@@ -669,9 +668,29 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
#include <stdio.h>
-main (argc, argv)
- int argc;
- char **argv;
+static void
+tprint (char *cap)
+{
+ char *x = tgetstr (cap, 0);
+ register char *y;
+
+ printf ("%s: ", cap);
+ if (x)
+ {
+ for (y = x; *y; y++)
+ if (*y <= ' ' || *y == 0177)
+ printf ("\\%0o", *y);
+ else
+ putchar (*y);
+ free (x);
+ }
+ else
+ printf ("none");
+ putchar ('\n');
+}
+
+int
+main (int argc, char **argv)
{
char *term;
char *buf;
@@ -693,27 +712,8 @@ main (argc, argv)
printf ("co: %d\n", tgetnum ("co"));
printf ("am: %d\n", tgetflag ("am"));
-}
-
-tprint (cap)
- char *cap;
-{
- char *x = tgetstr (cap, 0);
- register char *y;
- printf ("%s: ", cap);
- if (x)
- {
- for (y = x; *y; y++)
- if (*y <= ' ' || *y == 0177)
- printf ("\\%0o", *y);
- else
- putchar (*y);
- free (x);
- }
- else
- printf ("none");
- putchar ('\n');
+ return 0;
}
#endif /* TEST */
diff --git a/src/tparam.c b/src/tparam.c
index 6aae0b97db..ed28cd7397 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -265,9 +265,8 @@ tparam1 (const char *string, char *outstring, int len,
#ifdef DEBUG
-main (argc, argv)
- int argc;
- char **argv;
+int
+main (int argc, char **argv)
{
char buf[50];
int args[3];
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c
index f27415a252..ce65faffd4 100644
--- a/src/unexhp9k800.c
+++ b/src/unexhp9k800.c
@@ -64,8 +64,7 @@ static long brk_on_dump = 0;
/* Called from main, if we use shared libraries. */
int
-run_time_remap (ignored)
- char *ignored;
+run_time_remap (char *ignored)
{
brk ((char *) brk_on_dump);
}
@@ -74,74 +73,11 @@ run_time_remap (ignored)
#define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */
#define min(x,y) (((x) < (y)) ? (x) : (y))
-
-/* Create a new a.out file, same as old but with current data space */
-void
-unexec (const char *new_name, /* name of the new a.out file to be created */
- const char *old_name) /* name of the old a.out file */
-{
- int old, new;
- int old_size, new_size;
- struct header hdr;
- struct som_exec_auxhdr auxhdr;
- long i;
-
- /* For the greatest flexibility, should create a temporary file in
- the same directory as the new file. When everything is complete,
- rename the temp file to the new name.
- This way, a program could update its own a.out file even while
- it is still executing. If problems occur, everything is still
- intact. NOT implemented. */
-
- /* Open the input and output a.out files */
- old = open (old_name, O_RDONLY);
- if (old < 0)
- { perror (old_name); exit (1); }
- new = open (new_name, O_CREAT|O_RDWR|O_TRUNC, 0777);
- if (new < 0)
- { perror (new_name); exit (1); }
-
- /* Read the old headers */
- read_header (old, &hdr, &auxhdr);
-
- brk_on_dump = (long) sbrk (0);
-
- /* Decide how large the new and old data areas are */
- old_size = auxhdr.exec_dsize;
- /* I suspect these two statements are separate
- to avoid a compiler bug in hpux version 8. */
- i = (long) sbrk (0);
- new_size = i - auxhdr.exec_dmem;
-
- /* Copy the old file to the new, up to the data space */
- lseek (old, 0, 0);
- copy_file (old, new, auxhdr.exec_dfile);
-
- /* Skip the old data segment and write a new one */
- lseek (old, old_size, 1);
- save_data_space (new, &hdr, &auxhdr, new_size);
-
- /* Copy the rest of the file */
- copy_rest (old, new);
-
- /* Update file pointers since we probably changed size of data area */
- update_file_ptrs (new, &hdr, &auxhdr, auxhdr.exec_dfile, new_size-old_size);
-
- /* Save the modified header */
- write_header (new, &hdr, &auxhdr);
-
- /* Close the binary file */
- close (old);
- close (new);
-}
-
/* Save current data space in the file, update header. */
-save_data_space (file, hdr, auxhdr, size)
- int file;
- struct header *hdr;
- struct som_exec_auxhdr *auxhdr;
- int size;
+static void
+save_data_space (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr,
+ int size)
{
/* Write the entire data space out to the file */
if (write (file, auxhdr->exec_dmem, size) != size)
@@ -154,12 +90,9 @@ save_data_space (file, hdr, auxhdr, size)
/* Update the values of file pointers when something is inserted. */
-update_file_ptrs (file, hdr, auxhdr, location, offset)
- int file;
- struct header *hdr;
- struct som_exec_auxhdr *auxhdr;
- unsigned int location;
- int offset;
+static void
+update_file_ptrs (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr,
+ unsigned int location, int offset)
{
struct subspace_dictionary_record subspace;
int i;
@@ -205,10 +138,8 @@ update_file_ptrs (file, hdr, auxhdr, location, offset)
/* Read in the header records from an a.out file. */
-read_header (file, hdr, auxhdr)
- int file;
- struct header *hdr;
- struct som_exec_auxhdr *auxhdr;
+static void
+read_header (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr)
{
/* Read the header in */
@@ -233,10 +164,8 @@ read_header (file, hdr, auxhdr)
/* Write out the header records into an a.out file. */
-write_header (file, hdr, auxhdr)
- int file;
- struct header *hdr;
- struct som_exec_auxhdr *auxhdr;
+static void
+write_header (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr)
{
/* Update the checksum */
hdr->checksum = calculate_checksum (hdr);
@@ -252,8 +181,8 @@ write_header (file, hdr, auxhdr)
/* Calculate the checksum of a SOM header record. */
-calculate_checksum (hdr)
- struct header *hdr;
+static int
+calculate_checksum (struct header *hdr)
{
int checksum, i, *ptr;
@@ -267,9 +196,8 @@ calculate_checksum (hdr)
/* Copy size bytes from the old file to the new one. */
-copy_file (old, new, size)
- int new, old;
- int size;
+static void
+copy_file (int old, int new, int size)
{
int len;
int buffer[8192]; /* word aligned will be faster */
@@ -286,8 +214,8 @@ copy_file (old, new, size)
/* Copy the rest of the file, up to EOF. */
-copy_rest (old, new)
- int new, old;
+static void
+copy_rest (int old, int new)
{
int buffer[4096];
int len;
@@ -301,9 +229,8 @@ copy_rest (old, new)
}
#ifdef DEBUG
-display_header (hdr, auxhdr)
- struct header *hdr;
- struct som_exec_auxhdr *auxhdr;
+static void
+display_header (struct header *hdr, struct som_exec_auxhdr *auxhdr)
{
/* Display the header information (debug) */
printf ("\n\nFILE HEADER\n");
@@ -320,3 +247,64 @@ display_header (hdr, auxhdr)
hdr->unloadable_sp_location, hdr->unloadable_sp_size);
}
#endif /* DEBUG */
+
+
+/* Create a new a.out file, same as old but with current data space */
+void
+unexec (const char *new_name, /* name of the new a.out file to be created */
+ const char *old_name) /* name of the old a.out file */
+{
+ int old, new;
+ int old_size, new_size;
+ struct header hdr;
+ struct som_exec_auxhdr auxhdr;
+ long i;
+
+ /* For the greatest flexibility, should create a temporary file in
+ the same directory as the new file. When everything is complete,
+ rename the temp file to the new name.
+ This way, a program could update its own a.out file even while
+ it is still executing. If problems occur, everything is still
+ intact. NOT implemented. */
+
+ /* Open the input and output a.out files */
+ old = open (old_name, O_RDONLY);
+ if (old < 0)
+ { perror (old_name); exit (1); }
+ new = open (new_name, O_CREAT|O_RDWR|O_TRUNC, 0777);
+ if (new < 0)
+ { perror (new_name); exit (1); }
+
+ /* Read the old headers */
+ read_header (old, &hdr, &auxhdr);
+
+ brk_on_dump = (long) sbrk (0);
+
+ /* Decide how large the new and old data areas are */
+ old_size = auxhdr.exec_dsize;
+ /* I suspect these two statements are separate
+ to avoid a compiler bug in hpux version 8. */
+ i = (long) sbrk (0);
+ new_size = i - auxhdr.exec_dmem;
+
+ /* Copy the old file to the new, up to the data space */
+ lseek (old, 0, 0);
+ copy_file (old, new, auxhdr.exec_dfile);
+
+ /* Skip the old data segment and write a new one */
+ lseek (old, old_size, 1);
+ save_data_space (new, &hdr, &auxhdr, new_size);
+
+ /* Copy the rest of the file */
+ copy_rest (old, new);
+
+ /* Update file pointers since we probably changed size of data area */
+ update_file_ptrs (new, &hdr, &auxhdr, auxhdr.exec_dfile, new_size-old_size);
+
+ /* Save the modified header */
+ write_header (new, &hdr, &auxhdr);
+
+ /* Close the binary file */
+ close (old);
+ close (new);
+}
diff --git a/src/w32.c b/src/w32.c
index 53bf2e811e..de72e180c6 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1452,6 +1452,14 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oset)
}
int
+pthread_sigmask (int how, const sigset_t *set, sigset_t *oset)
+{
+ if (sigprocmask (how, set, oset) == -1)
+ return EINVAL;
+ return 0;
+}
+
+int
setpgrp (int pid, int gid)
{
return 0;
diff --git a/src/widget.c b/src/widget.c
index 6d871ad7cb..a09ec2631a 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -224,8 +224,7 @@ get_wm_shell (Widget w)
#if 0 /* Currently not used. */
static void
-mark_shell_size_user_specified (wmshell)
- Widget wmshell;
+mark_shell_size_user_specified (Widget wmshell)
{
if (! XtIsWMShell (wmshell)) abort ();
/* This is kind of sleazy, but I can't see how else to tell it to make it
@@ -510,8 +509,7 @@ update_wm_hints (EmacsFrame ew)
#if 0
static void
-create_frame_gcs (ew)
- EmacsFrame ew;
+create_frame_gcs (EmacsFrame ew)
{
struct frame *s = ew->emacs_frame.frame;
diff --git a/src/xdisp.c b/src/xdisp.c
index dfaa9cdeac..a4a9e236a9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2209,8 +2209,7 @@ safe_call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
This is for debugging. It is too slow to do unconditionally. */
static void
-check_it (it)
- struct it *it;
+check_it (struct it *it)
{
if (it->method == GET_FROM_STRING)
{
@@ -10510,7 +10509,7 @@ DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed,
f = XFRAME (frame);
if (WINDOWP (f->tool_bar_window)
- || (w = XWINDOW (f->tool_bar_window),
+ && (w = XWINDOW (f->tool_bar_window),
WINDOW_TOTAL_LINES (w) > 0))
{
update_tool_bar (f, 1);
diff --git a/src/xfaces.c b/src/xfaces.c
index 91f4b13346..c1e75ab3e5 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -536,8 +536,7 @@ int color_count[256];
/* Register color PIXEL as allocated. */
void
-register_color (pixel)
- unsigned long pixel;
+register_color (unsigned long pixel)
{
xassert (pixel < 256);
++color_count[pixel];
@@ -547,8 +546,7 @@ register_color (pixel)
/* Register color PIXEL as deallocated. */
void
-unregister_color (pixel)
- unsigned long pixel;
+unregister_color (unsigned long pixel)
{
xassert (pixel < 256);
if (color_count[pixel] > 0)
@@ -561,9 +559,7 @@ unregister_color (pixel)
/* Register N colors from PIXELS as deallocated. */
void
-unregister_colors (pixels, n)
- unsigned long *pixels;
- int n;
+unregister_colors (unsigned long *pixels, int n)
{
int i;
for (i = 0; i < n; ++i)
diff --git a/src/xfns.c b/src/xfns.c
index c70f4bb9a8..0d1e4a1bb5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2001,11 +2001,8 @@ xic_create_fontsetname (const char *base_fontname, int motif)
#ifdef DEBUG_XIC_FONTSET
static void
-print_fontset_result (xfs, name, missing_list, missing_count)
- XFontSet xfs;
- char *name;
- char **missing_list;
- int missing_count;
+print_fontset_result (XFontSet xfs, char *name, char **missing_list,
+ int missing_count)
{
if (xfs)
fprintf (stderr, "XIC Fontset created: %s\n", name);
diff --git a/src/xmenu.c b/src/xmenu.c
index fc629b3510..b4338c1d65 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -740,10 +740,13 @@ menu_highlight_callback (GtkWidget *widget, gpointer call_data)
help = call_data ? cb_data->help : Qnil;
/* If popup_activated_flag is greater than 1 we are in a popup menu.
- Don't show help for them, they won't appear before the
- popup is popped down. */
- if (popup_activated_flag <= 1)
- show_help_event (cb_data->cl_data->f, widget, help);
+ Don't pass the frame to show_help_event for those.
+ Passing frame creates an Emacs event. As we are looping in
+ popup_widget_loop, it won't be handeled. Passing NULL shows the tip
+ directly without using an Emacs event. This is what the Lucid code
+ does below. */
+ show_help_event (popup_activated_flag <= 1 ? cb_data->cl_data->f : NULL,
+ widget, help);
}
#else
static void
diff --git a/src/xrdb.c b/src/xrdb.c
index e18ff65f79..6a16e3260b 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -651,9 +651,7 @@ typedef char **List;
#define free_arglist(list)
static List
-member (elt, list)
- char *elt;
- List list;
+member (char *elt, List list)
{
List p;
@@ -665,20 +663,17 @@ member (elt, list)
}
static void
-fatal (msg, prog, x1, x2, x3, x4, x5)
- char *msg, *prog;
- int x1, x2, x3, x4, x5;
+fatal (char *msg, char *prog)
{
- if (errno)
- perror (prog);
+ if (errno)
+ perror (prog);
- (void) fprintf (stderr, msg, prog, x1, x2, x3, x4, x5);
- exit (1);
+ (void) fprintf (stderr, msg, prog);
+ exit (1);
}
-main (argc, argv)
- int argc;
- char **argv;
+int
+main (int argc, char **argv)
{
Display *display;
char *displayname, *resource_string, *class, *name;
@@ -749,5 +744,7 @@ main (argc, argv)
printf ("\tExit.\n\n");
XCloseDisplay (display);
+
+ return 0;
}
#endif /* TESTRM */