diff options
| author | Paul Eggert | 2011-07-10 23:05:57 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-10 23:05:57 -0700 |
| commit | da85a02af7585384008d3ebec836a7b8571f175d (patch) | |
| tree | e6d4f34119ea1c45985eaed207ef6b47f650ea93 | |
| parent | 7f5515125fbc9b46454e1f84b7e3052a0a5326f0 (diff) | |
| parent | 4d45a8b7a237e1d33d0ae71d95a0ed7165ea6cda (diff) | |
| download | emacs-da85a02af7585384008d3ebec836a7b8571f175d.tar.gz emacs-da85a02af7585384008d3ebec836a7b8571f175d.zip | |
Merge from trunk.
83 files changed, 4085 insertions, 3492 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-07-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Assume freestanding C89 headers, string.h, stdlib.h. | 3 | Assume freestanding C89 headers, string.h, stdlib.h. |
| 4 | Again, this simplifies the code, and all current platforms have these. | 4 | Again, this simplifies the code, and all current platforms have these. |
| @@ -15,6 +15,17 @@ | |||
| 15 | 15 | ||
| 16 | 2011-07-09 Paul Eggert <eggert@cs.ucla.edu> | 16 | 2011-07-09 Paul Eggert <eggert@cs.ucla.edu> |
| 17 | 17 | ||
| 18 | * lib/stdint.in.h: Merge from gnulib (Bug#9025). | ||
| 19 | This fixes a build problem on older Mac OS X hosts. | ||
| 20 | |||
| 21 | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Omit gl_THREADLIB | ||
| 22 | test, which runs afoul of Automake installations where, for example, | ||
| 23 | /usr/share/aclocal contains a copy of gl_THREADLIB. | ||
| 24 | Problem reported by Sven Joachim in | ||
| 25 | <http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00529.html>. | ||
| 26 | This is just a quick temporary fix, specific to Emacs; I'll work | ||
| 27 | with the other gnulib maintainers to get a more-permanent fix. | ||
| 28 | |||
| 18 | Add gnulib's strtoimax module, needed on Solaris 8. | 29 | Add gnulib's strtoimax module, needed on Solaris 8. |
| 19 | * Makefile.in (GNULIB_MODULES): Add strtoimax. | 30 | * Makefile.in (GNULIB_MODULES): Add strtoimax. |
| 20 | * lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files, | 31 | * lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files, |
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index fd93b0146a6..3348d3a4c02 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | # the same distribution terms as the rest of that program. | 24 | # the same distribution terms as the rest of that program. |
| 25 | # | 25 | # |
| 26 | # Generated by gnulib-tool. | 26 | # Generated by gnulib-tool. |
| 27 | # 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 | 27 | # 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 |
| 28 | 28 | ||
| 29 | VPATH = @srcdir@ | 29 | VPATH = @srcdir@ |
| 30 | pkgdatadir = $(datadir)/@PACKAGE@ | 30 | pkgdatadir = $(datadir)/@PACKAGE@ |
| @@ -59,14 +59,18 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ | |||
| 59 | $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ | 59 | $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ |
| 60 | $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ | 60 | $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ |
| 61 | $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ | 61 | $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ |
| 62 | $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/readlink.m4 \ | 62 | $(top_srcdir)/m4/multiarch.m4 \ |
| 63 | $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sha256.m4 \ | 63 | $(top_srcdir)/m4/pthread_sigmask.m4 \ |
| 64 | $(top_srcdir)/m4/sha512.m4 $(top_srcdir)/m4/socklen.m4 \ | 64 | $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \ |
| 65 | $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \ | ||
| 66 | $(top_srcdir)/m4/signal_h.m4 \ | ||
| 67 | $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/socklen.m4 \ | ||
| 65 | $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ | 68 | $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ |
| 66 | $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdarg.m4 \ | 69 | $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdarg.m4 \ |
| 67 | $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ | 70 | $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ |
| 68 | $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ | 71 | $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ |
| 69 | $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ | 72 | $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ |
| 73 | $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ | ||
| 70 | $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ | 74 | $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ |
| 71 | $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ | 75 | $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ |
| 72 | $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ | 76 | $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ |
| @@ -244,6 +248,7 @@ GNULIB_POPEN = @GNULIB_POPEN@ | |||
| 244 | GNULIB_PREAD = @GNULIB_PREAD@ | 248 | GNULIB_PREAD = @GNULIB_PREAD@ |
| 245 | GNULIB_PRINTF = @GNULIB_PRINTF@ | 249 | GNULIB_PRINTF = @GNULIB_PRINTF@ |
| 246 | GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ | 250 | GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ |
| 251 | GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ | ||
| 247 | GNULIB_PTSNAME = @GNULIB_PTSNAME@ | 252 | GNULIB_PTSNAME = @GNULIB_PTSNAME@ |
| 248 | GNULIB_PUTC = @GNULIB_PUTC@ | 253 | GNULIB_PUTC = @GNULIB_PUTC@ |
| 249 | GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ | 254 | GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ |
| @@ -263,6 +268,9 @@ GNULIB_RMDIR = @GNULIB_RMDIR@ | |||
| 263 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ | 268 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ |
| 264 | GNULIB_SCANF = @GNULIB_SCANF@ | 269 | GNULIB_SCANF = @GNULIB_SCANF@ |
| 265 | GNULIB_SETENV = @GNULIB_SETENV@ | 270 | GNULIB_SETENV = @GNULIB_SETENV@ |
| 271 | GNULIB_SIGACTION = @GNULIB_SIGACTION@ | ||
| 272 | GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ | ||
| 273 | GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ | ||
| 266 | GNULIB_SLEEP = @GNULIB_SLEEP@ | 274 | GNULIB_SLEEP = @GNULIB_SLEEP@ |
| 267 | GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ | 275 | GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ |
| 268 | GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ | 276 | GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ |
| @@ -384,7 +392,9 @@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ | |||
| 384 | HAVE_OS_H = @HAVE_OS_H@ | 392 | HAVE_OS_H = @HAVE_OS_H@ |
| 385 | HAVE_PIPE = @HAVE_PIPE@ | 393 | HAVE_PIPE = @HAVE_PIPE@ |
| 386 | HAVE_PIPE2 = @HAVE_PIPE2@ | 394 | HAVE_PIPE2 = @HAVE_PIPE2@ |
| 395 | HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ | ||
| 387 | HAVE_PREAD = @HAVE_PREAD@ | 396 | HAVE_PREAD = @HAVE_PREAD@ |
| 397 | HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ | ||
| 388 | HAVE_PTSNAME = @HAVE_PTSNAME@ | 398 | HAVE_PTSNAME = @HAVE_PTSNAME@ |
| 389 | HAVE_PWRITE = @HAVE_PWRITE@ | 399 | HAVE_PWRITE = @HAVE_PWRITE@ |
| 390 | HAVE_RANDOM_H = @HAVE_RANDOM_H@ | 400 | HAVE_RANDOM_H = @HAVE_RANDOM_H@ |
| @@ -395,9 +405,13 @@ HAVE_REALPATH = @HAVE_REALPATH@ | |||
| 395 | HAVE_RENAMEAT = @HAVE_RENAMEAT@ | 405 | HAVE_RENAMEAT = @HAVE_RENAMEAT@ |
| 396 | HAVE_RPMATCH = @HAVE_RPMATCH@ | 406 | HAVE_RPMATCH = @HAVE_RPMATCH@ |
| 397 | HAVE_SETENV = @HAVE_SETENV@ | 407 | HAVE_SETENV = @HAVE_SETENV@ |
| 408 | HAVE_SIGACTION = @HAVE_SIGACTION@ | ||
| 409 | HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ | ||
| 410 | HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ | ||
| 398 | HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ | 411 | HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ |
| 399 | HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ | 412 | HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ |
| 400 | HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ | 413 | HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ |
| 414 | HAVE_SIGSET_T = @HAVE_SIGSET_T@ | ||
| 401 | HAVE_SLEEP = @HAVE_SLEEP@ | 415 | HAVE_SLEEP = @HAVE_SLEEP@ |
| 402 | HAVE_STDINT_H = @HAVE_STDINT_H@ | 416 | HAVE_STDINT_H = @HAVE_STDINT_H@ |
| 403 | HAVE_STRPTIME = @HAVE_STRPTIME@ | 417 | HAVE_STRPTIME = @HAVE_STRPTIME@ |
| @@ -405,6 +419,7 @@ HAVE_STRTOD = @HAVE_STRTOD@ | |||
| 405 | HAVE_STRTOLL = @HAVE_STRTOLL@ | 419 | HAVE_STRTOLL = @HAVE_STRTOLL@ |
| 406 | HAVE_STRTOULL = @HAVE_STRTOULL@ | 420 | HAVE_STRTOULL = @HAVE_STRTOULL@ |
| 407 | HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ | 421 | HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ |
| 422 | HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ | ||
| 408 | HAVE_SYMLINK = @HAVE_SYMLINK@ | 423 | HAVE_SYMLINK = @HAVE_SYMLINK@ |
| 409 | HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ | 424 | HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ |
| 410 | HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ | 425 | HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ |
| @@ -413,6 +428,7 @@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ | |||
| 413 | HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ | 428 | HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ |
| 414 | HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ | 429 | HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ |
| 415 | HAVE_TIMEGM = @HAVE_TIMEGM@ | 430 | HAVE_TIMEGM = @HAVE_TIMEGM@ |
| 431 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ | ||
| 416 | HAVE_UNISTD_H = @HAVE_UNISTD_H@ | 432 | HAVE_UNISTD_H = @HAVE_UNISTD_H@ |
| 417 | HAVE_UNLINKAT = @HAVE_UNLINKAT@ | 433 | HAVE_UNLINKAT = @HAVE_UNLINKAT@ |
| 418 | HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ | 434 | HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ |
| @@ -479,6 +495,7 @@ LIBXT_OTHER = @LIBXT_OTHER@ | |||
| 479 | LIBX_OTHER = @LIBX_OTHER@ | 495 | LIBX_OTHER = @LIBX_OTHER@ |
| 480 | LIB_GCC = @LIB_GCC@ | 496 | LIB_GCC = @LIB_GCC@ |
| 481 | LIB_MATH = @LIB_MATH@ | 497 | LIB_MATH = @LIB_MATH@ |
| 498 | LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ | ||
| 482 | LIB_STANDARD = @LIB_STANDARD@ | 499 | LIB_STANDARD = @LIB_STANDARD@ |
| 483 | LTLIBINTL = @LTLIBINTL@ | 500 | LTLIBINTL = @LTLIBINTL@ |
| 484 | LTLIBOBJS = @LTLIBOBJS@ | 501 | LTLIBOBJS = @LTLIBOBJS@ |
| @@ -491,6 +508,7 @@ MKDIR_P = @MKDIR_P@ | |||
| 491 | M_FILE = @M_FILE@ | 508 | M_FILE = @M_FILE@ |
| 492 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ | 509 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ |
| 493 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ | 510 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ |
| 511 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ | ||
| 494 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ | 512 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ |
| 495 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ | 513 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ |
| 496 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ | 514 | 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@ | |||
| 501 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ | 519 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ |
| 502 | NEXT_GETOPT_H = @NEXT_GETOPT_H@ | 520 | NEXT_GETOPT_H = @NEXT_GETOPT_H@ |
| 503 | NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ | 521 | NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ |
| 522 | NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ | ||
| 504 | NEXT_STDARG_H = @NEXT_STDARG_H@ | 523 | NEXT_STDARG_H = @NEXT_STDARG_H@ |
| 505 | NEXT_STDDEF_H = @NEXT_STDDEF_H@ | 524 | NEXT_STDDEF_H = @NEXT_STDDEF_H@ |
| 506 | NEXT_STDINT_H = @NEXT_STDINT_H@ | 525 | NEXT_STDINT_H = @NEXT_STDINT_H@ |
| @@ -584,6 +603,7 @@ REPLACE_PERROR = @REPLACE_PERROR@ | |||
| 584 | REPLACE_POPEN = @REPLACE_POPEN@ | 603 | REPLACE_POPEN = @REPLACE_POPEN@ |
| 585 | REPLACE_PREAD = @REPLACE_PREAD@ | 604 | REPLACE_PREAD = @REPLACE_PREAD@ |
| 586 | REPLACE_PRINTF = @REPLACE_PRINTF@ | 605 | REPLACE_PRINTF = @REPLACE_PRINTF@ |
| 606 | REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ | ||
| 587 | REPLACE_PUTENV = @REPLACE_PUTENV@ | 607 | REPLACE_PUTENV = @REPLACE_PUTENV@ |
| 588 | REPLACE_PWRITE = @REPLACE_PWRITE@ | 608 | REPLACE_PWRITE = @REPLACE_PWRITE@ |
| 589 | REPLACE_READ = @REPLACE_READ@ | 609 | REPLACE_READ = @REPLACE_READ@ |
| @@ -739,25 +759,29 @@ x_default_search_path = @x_default_search_path@ | |||
| 739 | # present in all Makefile.am that need it. This is ensured by the applicability | 759 | # present in all Makefile.am that need it. This is ensured by the applicability |
| 740 | # 'all' defined above. | 760 | # 'all' defined above. |
| 741 | BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(GETOPT_H) \ | 761 | BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(GETOPT_H) \ |
| 742 | inttypes.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \ | 762 | inttypes.h signal.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) \ |
| 743 | stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h | 763 | $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h unistd.h \ |
| 764 | warn-on-use.h | ||
| 744 | EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \ | 765 | EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \ |
| 745 | $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \ | 766 | $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \ |
| 746 | sha512.h dosname.h ftoastr.c ftoastr.h dup2.c filemode.h \ | 767 | sha512.h dosname.h ftoastr.c ftoastr.h dup2.c filemode.h \ |
| 747 | getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \ | 768 | getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \ |
| 748 | ignore-value.h intprops.h inttypes.in.h lstat.c \ | 769 | ignore-value.h intprops.h inttypes.in.h lstat.c \ |
| 749 | mktime-internal.h mktime.c readlink.c stat.c stdarg.in.h \ | 770 | mktime-internal.h mktime.c pthread_sigmask.c readlink.c \ |
| 750 | stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \ | 771 | signal.in.h sigprocmask.c stat.c stdarg.in.h stdbool.in.h \ |
| 751 | strftime.h strtol.c strtoul.c strtoull.c strtoimax.c \ | 772 | stddef.in.h stdint.in.h stdio.in.h stdlib.in.h strftime.h \ |
| 752 | strtoumax.c symlink.c sys_stat.in.h time.in.h time_r.c u64.h \ | 773 | strtoimax.c strtol.c strtoll.c strtol.c strtoul.c strtoull.c \ |
| 753 | unistd.in.h verify.h $(top_srcdir)/./warn-on-use.h | 774 | strtoimax.c strtoumax.c symlink.c sys_stat.in.h time.in.h \ |
| 775 | time_r.c u64.h unistd.in.h verify.h \ | ||
| 776 | $(top_srcdir)/./warn-on-use.h | ||
| 754 | MOSTLYCLEANDIRS = sys | 777 | MOSTLYCLEANDIRS = sys |
| 755 | MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ | 778 | MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ |
| 756 | arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \ | 779 | arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \ |
| 757 | inttypes.h inttypes.h-t stdarg.h stdarg.h-t stdbool.h \ | 780 | inttypes.h inttypes.h-t signal.h signal.h-t stdarg.h \ |
| 758 | stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ | 781 | stdarg.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \ |
| 759 | stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ | 782 | stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t sys/stat.h \ |
| 760 | time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t | 783 | sys/stat.h-t time.h time.h-t unistd.h unistd.h-t warn-on-use.h \ |
| 784 | warn-on-use.h-t | ||
| 761 | noinst_LIBRARIES = libgnu.a | 785 | noinst_LIBRARIES = libgnu.a |
| 762 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src | 786 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src |
| 763 | libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \ | 787 | 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 \ | |||
| 765 | libgnu_a_LIBADD = $(gl_LIBOBJS) | 789 | libgnu_a_LIBADD = $(gl_LIBOBJS) |
| 766 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) | 790 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) |
| 767 | EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \ | 791 | EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \ |
| 768 | getopt1.c lstat.c mktime.c readlink.c stat.c strtol.c \ | 792 | getopt1.c lstat.c mktime.c pthread_sigmask.c readlink.c \ |
| 793 | sigprocmask.c stat.c strtoimax.c strtol.c strtoll.c strtol.c \ | ||
| 769 | strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ | 794 | strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ |
| 770 | time_r.c | 795 | time_r.c |
| 771 | ARG_NONNULL_H = arg-nonnull.h | 796 | ARG_NONNULL_H = arg-nonnull.h |
| @@ -832,14 +857,17 @@ distclean-compile: | |||
| 832 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ | 857 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ |
| 833 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ | 858 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ |
| 834 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ | 859 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ |
| 860 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pthread_sigmask.Po@am__quote@ | ||
| 835 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ | 861 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ |
| 836 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@ | 862 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@ |
| 837 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256.Po@am__quote@ | 863 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256.Po@am__quote@ |
| 838 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512.Po@am__quote@ | 864 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512.Po@am__quote@ |
| 865 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ | ||
| 839 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ | 866 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ |
| 840 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ | 867 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ |
| 841 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ | 868 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ |
| 842 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ | 869 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ |
| 870 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@ | ||
| 843 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ | 871 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ |
| 844 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ | 872 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ |
| 845 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ | 873 | @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 | |||
| 1137 | } > $@-t && \ | 1165 | } > $@-t && \ |
| 1138 | mv $@-t $@ | 1166 | mv $@-t $@ |
| 1139 | 1167 | ||
| 1168 | # We need the following in order to create <signal.h> when the system | ||
| 1169 | # doesn't have a complete one. | ||
| 1170 | signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | ||
| 1171 | $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 1172 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | ||
| 1173 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ | ||
| 1174 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 1175 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | ||
| 1176 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | ||
| 1177 | -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ | ||
| 1178 | -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ | ||
| 1179 | -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ | ||
| 1180 | -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ | ||
| 1181 | -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ | ||
| 1182 | -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ | ||
| 1183 | -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ | ||
| 1184 | -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ | ||
| 1185 | -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ | ||
| 1186 | -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ | ||
| 1187 | -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ | ||
| 1188 | -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ | ||
| 1189 | -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ | ||
| 1190 | -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ | ||
| 1191 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | ||
| 1192 | -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ | ||
| 1193 | -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ | ||
| 1194 | < $(srcdir)/signal.in.h; \ | ||
| 1195 | } > $@-t && \ | ||
| 1196 | mv $@-t $@ | ||
| 1197 | |||
| 1140 | # We need the following in order to create <stdarg.h> when the system | 1198 | # We need the following in order to create <stdarg.h> when the system |
| 1141 | # doesn't have one that works with the given compiler. | 1199 | # doesn't have one that works with the given compiler. |
| 1142 | @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status | 1200 | @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status |
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4 index 8c0a25eba14..90ed7c0a99f 100644 --- a/autogen/aclocal.m4 +++ b/autogen/aclocal.m4 | |||
| @@ -1001,10 +1001,13 @@ m4_include([m4/lstat.m4]) | |||
| 1001 | m4_include([m4/md5.m4]) | 1001 | m4_include([m4/md5.m4]) |
| 1002 | m4_include([m4/mktime.m4]) | 1002 | m4_include([m4/mktime.m4]) |
| 1003 | m4_include([m4/multiarch.m4]) | 1003 | m4_include([m4/multiarch.m4]) |
| 1004 | m4_include([m4/pthread_sigmask.m4]) | ||
| 1004 | m4_include([m4/readlink.m4]) | 1005 | m4_include([m4/readlink.m4]) |
| 1005 | m4_include([m4/sha1.m4]) | 1006 | m4_include([m4/sha1.m4]) |
| 1006 | m4_include([m4/sha256.m4]) | 1007 | m4_include([m4/sha256.m4]) |
| 1007 | m4_include([m4/sha512.m4]) | 1008 | m4_include([m4/sha512.m4]) |
| 1009 | m4_include([m4/signal_h.m4]) | ||
| 1010 | m4_include([m4/signalblocking.m4]) | ||
| 1008 | m4_include([m4/socklen.m4]) | 1011 | m4_include([m4/socklen.m4]) |
| 1009 | m4_include([m4/ssize_t.m4]) | 1012 | m4_include([m4/ssize_t.m4]) |
| 1010 | m4_include([m4/st_dm_mode.m4]) | 1013 | m4_include([m4/st_dm_mode.m4]) |
| @@ -1016,6 +1019,8 @@ m4_include([m4/stdint.m4]) | |||
| 1016 | m4_include([m4/stdio_h.m4]) | 1019 | m4_include([m4/stdio_h.m4]) |
| 1017 | m4_include([m4/stdlib_h.m4]) | 1020 | m4_include([m4/stdlib_h.m4]) |
| 1018 | m4_include([m4/strftime.m4]) | 1021 | m4_include([m4/strftime.m4]) |
| 1022 | m4_include([m4/strtoimax.m4]) | ||
| 1023 | m4_include([m4/strtoll.m4]) | ||
| 1019 | m4_include([m4/strtoull.m4]) | 1024 | m4_include([m4/strtoull.m4]) |
| 1020 | m4_include([m4/strtoumax.m4]) | 1025 | m4_include([m4/strtoumax.m4]) |
| 1021 | m4_include([m4/symlink.m4]) | 1026 | m4_include([m4/symlink.m4]) |
diff --git a/autogen/config.in b/autogen/config.in index 051c0ea26ea..e7764e1ae24 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/>. */ | |||
| 160 | don't. */ | 160 | don't. */ |
| 161 | #undef HAVE_DECL_STRMODE | 161 | #undef HAVE_DECL_STRMODE |
| 162 | 162 | ||
| 163 | /* Define to 1 if you have the declaration of `strtoimax', and to 0 if you | ||
| 164 | don't. */ | ||
| 165 | #undef HAVE_DECL_STRTOIMAX | ||
| 166 | |||
| 167 | /* Define to 1 if you have the declaration of `strtoll', and to 0 if you | ||
| 168 | don't. */ | ||
| 169 | #undef HAVE_DECL_STRTOLL | ||
| 170 | |||
| 163 | /* Define to 1 if you have the declaration of `strtoull', and to 0 if you | 171 | /* Define to 1 if you have the declaration of `strtoull', and to 0 if you |
| 164 | don't. */ | 172 | don't. */ |
| 165 | #undef HAVE_DECL_STRTOULL | 173 | #undef HAVE_DECL_STRTOULL |
| @@ -592,6 +600,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 592 | /* Define to 1 if you have the <pthread.h> header file. */ | 600 | /* Define to 1 if you have the <pthread.h> header file. */ |
| 593 | #undef HAVE_PTHREAD_H | 601 | #undef HAVE_PTHREAD_H |
| 594 | 602 | ||
| 603 | /* Define to 1 if you have the `pthread_sigmask' function. */ | ||
| 604 | #undef HAVE_PTHREAD_SIGMASK | ||
| 605 | |||
| 595 | /* Define to 1 if you have the <pty.h> header file. */ | 606 | /* Define to 1 if you have the <pty.h> header file. */ |
| 596 | #undef HAVE_PTY_H | 607 | #undef HAVE_PTY_H |
| 597 | 608 | ||
| @@ -661,6 +672,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 661 | /* Define to 1 if 'wint_t' is a signed integer type. */ | 672 | /* Define to 1 if 'wint_t' is a signed integer type. */ |
| 662 | #undef HAVE_SIGNED_WINT_T | 673 | #undef HAVE_SIGNED_WINT_T |
| 663 | 674 | ||
| 675 | /* Define to 1 if the system has the type `sigset_t'. */ | ||
| 676 | #undef HAVE_SIGSET_T | ||
| 677 | |||
| 664 | /* Define to 1 if you have sound support. */ | 678 | /* Define to 1 if you have sound support. */ |
| 665 | #undef HAVE_SOUND | 679 | #undef HAVE_SOUND |
| 666 | 680 | ||
| @@ -697,6 +711,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 697 | /* Define to 1 if you have the `strsignal' function. */ | 711 | /* Define to 1 if you have the `strsignal' function. */ |
| 698 | #undef HAVE_STRSIGNAL | 712 | #undef HAVE_STRSIGNAL |
| 699 | 713 | ||
| 714 | /* Define to 1 if you have the `strtoimax' function. */ | ||
| 715 | #undef HAVE_STRTOIMAX | ||
| 716 | |||
| 717 | /* Define to 1 if you have the `strtoll' function. */ | ||
| 718 | #undef HAVE_STRTOLL | ||
| 719 | |||
| 700 | /* Define to 1 if you have the `strtoull' function. */ | 720 | /* Define to 1 if you have the `strtoull' function. */ |
| 701 | #undef HAVE_STRTOULL | 721 | #undef HAVE_STRTOULL |
| 702 | 722 | ||
diff --git a/autogen/configure b/autogen/configure index 10bdf24c3a9..60ef873e39d 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -607,55 +607,6 @@ SUBDIR_MAKEFILES_IN | |||
| 607 | LIB_GCC | 607 | LIB_GCC |
| 608 | LD_FIRSTFLAG | 608 | LD_FIRSTFLAG |
| 609 | LD_SWITCH_SYSTEM_TEMACS | 609 | LD_SWITCH_SYSTEM_TEMACS |
| 610 | POST_ALLOC_OBJ | ||
| 611 | PRE_ALLOC_OBJ | ||
| 612 | CYGWIN_OBJ | ||
| 613 | RALLOC_OBJ | ||
| 614 | OLDXMENU_DEPS | ||
| 615 | LIBX_OTHER | ||
| 616 | LIBXMENU | ||
| 617 | OLDXMENU | ||
| 618 | OLDXMENU_TARGET | ||
| 619 | LIBXT_OTHER | ||
| 620 | TOOLKIT_LIBW | ||
| 621 | WIDGET_OBJ | ||
| 622 | XOBJ | ||
| 623 | XMENU_OBJ | ||
| 624 | FONT_OBJ | ||
| 625 | OTHER_FILES | ||
| 626 | GNU_OBJC_CFLAGS | ||
| 627 | ns_appsrc | ||
| 628 | ns_appresdir | ||
| 629 | ns_appbindir | ||
| 630 | ns_appdir | ||
| 631 | S_FILE | ||
| 632 | M_FILE | ||
| 633 | X_TOOLKIT_TYPE | ||
| 634 | C_SWITCH_X_SYSTEM | ||
| 635 | C_SWITCH_X_SITE | ||
| 636 | LD_SWITCH_X_SITE | ||
| 637 | gameuser | ||
| 638 | gamedir | ||
| 639 | bitmapdir | ||
| 640 | archlibdir | ||
| 641 | etcdir | ||
| 642 | x_default_search_path | ||
| 643 | lisppath | ||
| 644 | locallisppath | ||
| 645 | lispdir | ||
| 646 | srcdir | ||
| 647 | canonical | ||
| 648 | configuration | ||
| 649 | version | ||
| 650 | KRB4LIB | ||
| 651 | DESLIB | ||
| 652 | KRB5LIB | ||
| 653 | CRYPTOLIB | ||
| 654 | COM_ERRLIB | ||
| 655 | LIBRESOLV | ||
| 656 | LIBHESIOD | ||
| 657 | TERMCAP_OBJ | ||
| 658 | LIBS_TERMCAP | ||
| 659 | LIBGNU_LTLIBDEPS | 610 | LIBGNU_LTLIBDEPS |
| 660 | LIBGNU_LIBDEPS | 611 | LIBGNU_LIBDEPS |
| 661 | gltests_WITNESS | 612 | gltests_WITNESS |
| @@ -663,8 +614,12 @@ gl_GNULIB_ENABLED_verify_FALSE | |||
| 663 | gl_GNULIB_ENABLED_verify_TRUE | 614 | gl_GNULIB_ENABLED_verify_TRUE |
| 664 | gl_GNULIB_ENABLED_strtoull_FALSE | 615 | gl_GNULIB_ENABLED_strtoull_FALSE |
| 665 | gl_GNULIB_ENABLED_strtoull_TRUE | 616 | gl_GNULIB_ENABLED_strtoull_TRUE |
| 617 | gl_GNULIB_ENABLED_strtoll_FALSE | ||
| 618 | gl_GNULIB_ENABLED_strtoll_TRUE | ||
| 666 | gl_GNULIB_ENABLED_stat_FALSE | 619 | gl_GNULIB_ENABLED_stat_FALSE |
| 667 | gl_GNULIB_ENABLED_stat_TRUE | 620 | gl_GNULIB_ENABLED_stat_TRUE |
| 621 | gl_GNULIB_ENABLED_sigprocmask_FALSE | ||
| 622 | gl_GNULIB_ENABLED_sigprocmask_TRUE | ||
| 668 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE | 623 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE |
| 669 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE | 624 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE |
| 670 | gl_GNULIB_ENABLED_dosname_FALSE | 625 | gl_GNULIB_ENABLED_dosname_FALSE |
| @@ -798,6 +753,22 @@ GL_GENERATE_STDARG_H_TRUE | |||
| 798 | STDARG_H | 753 | STDARG_H |
| 799 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H | 754 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H |
| 800 | NEXT_STDARG_H | 755 | NEXT_STDARG_H |
| 756 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H | ||
| 757 | NEXT_SIGNAL_H | ||
| 758 | REPLACE_PTHREAD_SIGMASK | ||
| 759 | HAVE_SIGHANDLER_T | ||
| 760 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | ||
| 761 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | ||
| 762 | HAVE_SIGACTION | ||
| 763 | HAVE_SIGINFO_T | ||
| 764 | HAVE_SIGSET_T | ||
| 765 | HAVE_PTHREAD_SIGMASK | ||
| 766 | HAVE_POSIX_SIGNALBLOCKING | ||
| 767 | GNULIB_SIGACTION | ||
| 768 | GNULIB_SIGPROCMASK | ||
| 769 | GNULIB_SIGNAL_H_SIGPIPE | ||
| 770 | GNULIB_PTHREAD_SIGMASK | ||
| 771 | LIB_PTHREAD_SIGMASK | ||
| 801 | REPLACE_TIMEGM | 772 | REPLACE_TIMEGM |
| 802 | REPLACE_NANOSLEEP | 773 | REPLACE_NANOSLEEP |
| 803 | REPLACE_MKTIME | 774 | REPLACE_MKTIME |
| @@ -1076,6 +1047,55 @@ ALLOCA_H | |||
| 1076 | ALLOCA | 1047 | ALLOCA |
| 1077 | GL_COND_LIBTOOL_FALSE | 1048 | GL_COND_LIBTOOL_FALSE |
| 1078 | GL_COND_LIBTOOL_TRUE | 1049 | GL_COND_LIBTOOL_TRUE |
| 1050 | POST_ALLOC_OBJ | ||
| 1051 | PRE_ALLOC_OBJ | ||
| 1052 | CYGWIN_OBJ | ||
| 1053 | RALLOC_OBJ | ||
| 1054 | OLDXMENU_DEPS | ||
| 1055 | LIBX_OTHER | ||
| 1056 | LIBXMENU | ||
| 1057 | OLDXMENU | ||
| 1058 | OLDXMENU_TARGET | ||
| 1059 | LIBXT_OTHER | ||
| 1060 | TOOLKIT_LIBW | ||
| 1061 | WIDGET_OBJ | ||
| 1062 | XOBJ | ||
| 1063 | XMENU_OBJ | ||
| 1064 | FONT_OBJ | ||
| 1065 | OTHER_FILES | ||
| 1066 | GNU_OBJC_CFLAGS | ||
| 1067 | ns_appsrc | ||
| 1068 | ns_appresdir | ||
| 1069 | ns_appbindir | ||
| 1070 | ns_appdir | ||
| 1071 | S_FILE | ||
| 1072 | M_FILE | ||
| 1073 | X_TOOLKIT_TYPE | ||
| 1074 | C_SWITCH_X_SYSTEM | ||
| 1075 | C_SWITCH_X_SITE | ||
| 1076 | LD_SWITCH_X_SITE | ||
| 1077 | gameuser | ||
| 1078 | gamedir | ||
| 1079 | bitmapdir | ||
| 1080 | archlibdir | ||
| 1081 | etcdir | ||
| 1082 | x_default_search_path | ||
| 1083 | lisppath | ||
| 1084 | locallisppath | ||
| 1085 | lispdir | ||
| 1086 | srcdir | ||
| 1087 | canonical | ||
| 1088 | configuration | ||
| 1089 | version | ||
| 1090 | KRB4LIB | ||
| 1091 | DESLIB | ||
| 1092 | KRB5LIB | ||
| 1093 | CRYPTOLIB | ||
| 1094 | COM_ERRLIB | ||
| 1095 | LIBRESOLV | ||
| 1096 | LIBHESIOD | ||
| 1097 | TERMCAP_OBJ | ||
| 1098 | LIBS_TERMCAP | ||
| 1079 | BLESSMAIL_TARGET | 1099 | BLESSMAIL_TARGET |
| 1080 | LIBS_MAIL | 1100 | LIBS_MAIL |
| 1081 | liblockfile | 1101 | liblockfile |
| @@ -2571,6 +2591,60 @@ $as_echo "$ac_res" >&6; } | |||
| 2571 | 2591 | ||
| 2572 | } # ac_fn_c_check_func | 2592 | } # ac_fn_c_check_func |
| 2573 | 2593 | ||
| 2594 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | ||
| 2595 | # ------------------------------------------- | ||
| 2596 | # Tests whether TYPE exists after having included INCLUDES, setting cache | ||
| 2597 | # variable VAR accordingly. | ||
| 2598 | ac_fn_c_check_type () | ||
| 2599 | { | ||
| 2600 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | ||
| 2601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | ||
| 2602 | $as_echo_n "checking for $2... " >&6; } | ||
| 2603 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 2604 | $as_echo_n "(cached) " >&6 | ||
| 2605 | else | ||
| 2606 | eval "$3=no" | ||
| 2607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 2608 | /* end confdefs.h. */ | ||
| 2609 | $4 | ||
| 2610 | int | ||
| 2611 | main () | ||
| 2612 | { | ||
| 2613 | if (sizeof ($2)) | ||
| 2614 | return 0; | ||
| 2615 | ; | ||
| 2616 | return 0; | ||
| 2617 | } | ||
| 2618 | _ACEOF | ||
| 2619 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 2620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 2621 | /* end confdefs.h. */ | ||
| 2622 | $4 | ||
| 2623 | int | ||
| 2624 | main () | ||
| 2625 | { | ||
| 2626 | if (sizeof (($2))) | ||
| 2627 | return 0; | ||
| 2628 | ; | ||
| 2629 | return 0; | ||
| 2630 | } | ||
| 2631 | _ACEOF | ||
| 2632 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 2633 | |||
| 2634 | else | ||
| 2635 | eval "$3=yes" | ||
| 2636 | fi | ||
| 2637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 2638 | fi | ||
| 2639 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 2640 | fi | ||
| 2641 | eval ac_res=\$$3 | ||
| 2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 2643 | $as_echo "$ac_res" >&6; } | ||
| 2644 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | ||
| 2645 | |||
| 2646 | } # ac_fn_c_check_type | ||
| 2647 | |||
| 2574 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES | 2648 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
| 2575 | # -------------------------------------------- | 2649 | # -------------------------------------------- |
| 2576 | # Tries to find the compile-time value of EXPR in a program that includes | 2650 | # Tries to find the compile-time value of EXPR in a program that includes |
| @@ -2748,60 +2822,6 @@ rm -f conftest.val | |||
| 2748 | as_fn_set_status $ac_retval | 2822 | as_fn_set_status $ac_retval |
| 2749 | 2823 | ||
| 2750 | } # ac_fn_c_compute_int | 2824 | } # ac_fn_c_compute_int |
| 2751 | |||
| 2752 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | ||
| 2753 | # ------------------------------------------- | ||
| 2754 | # Tests whether TYPE exists after having included INCLUDES, setting cache | ||
| 2755 | # variable VAR accordingly. | ||
| 2756 | ac_fn_c_check_type () | ||
| 2757 | { | ||
| 2758 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | ||
| 2759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | ||
| 2760 | $as_echo_n "checking for $2... " >&6; } | ||
| 2761 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 2762 | $as_echo_n "(cached) " >&6 | ||
| 2763 | else | ||
| 2764 | eval "$3=no" | ||
| 2765 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 2766 | /* end confdefs.h. */ | ||
| 2767 | $4 | ||
| 2768 | int | ||
| 2769 | main () | ||
| 2770 | { | ||
| 2771 | if (sizeof ($2)) | ||
| 2772 | return 0; | ||
| 2773 | ; | ||
| 2774 | return 0; | ||
| 2775 | } | ||
| 2776 | _ACEOF | ||
| 2777 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 2778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 2779 | /* end confdefs.h. */ | ||
| 2780 | $4 | ||
| 2781 | int | ||
| 2782 | main () | ||
| 2783 | { | ||
| 2784 | if (sizeof (($2))) | ||
| 2785 | return 0; | ||
| 2786 | ; | ||
| 2787 | return 0; | ||
| 2788 | } | ||
| 2789 | _ACEOF | ||
| 2790 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 2791 | |||
| 2792 | else | ||
| 2793 | eval "$3=yes" | ||
| 2794 | fi | ||
| 2795 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 2796 | fi | ||
| 2797 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 2798 | fi | ||
| 2799 | eval ac_res=\$$3 | ||
| 2800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 2801 | $as_echo "$ac_res" >&6; } | ||
| 2802 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | ||
| 2803 | |||
| 2804 | } # ac_fn_c_check_type | ||
| 2805 | cat >config.log <<_ACEOF | 2825 | cat >config.log <<_ACEOF |
| 2806 | This file contains any messages produced by compilers while | 2826 | This file contains any messages produced by compilers while |
| 2807 | running configure, to aid debugging if configure makes a mistake. | 2827 | running configure, to aid debugging if configure makes a mistake. |
| @@ -3097,6 +3117,7 @@ as_fn_append ac_header_list " stdint.h" | |||
| 3097 | as_fn_append ac_header_list " inttypes.h" | 3117 | as_fn_append ac_header_list " inttypes.h" |
| 3098 | as_fn_append ac_func_list " lstat" | 3118 | as_fn_append ac_func_list " lstat" |
| 3099 | as_fn_append ac_func_list " alarm" | 3119 | as_fn_append ac_func_list " alarm" |
| 3120 | as_fn_append ac_func_list " pthread_sigmask" | ||
| 3100 | as_fn_append ac_func_list " readlink" | 3121 | as_fn_append ac_func_list " readlink" |
| 3101 | as_fn_append ac_header_list " sys/socket.h" | 3122 | as_fn_append ac_header_list " sys/socket.h" |
| 3102 | as_fn_append ac_func_list " tzset" | 3123 | as_fn_append ac_func_list " tzset" |
| @@ -6579,7 +6600,10 @@ esac | |||
| 6579 | # Code from module lstat: | 6600 | # Code from module lstat: |
| 6580 | # Code from module mktime: | 6601 | # Code from module mktime: |
| 6581 | # Code from module multiarch: | 6602 | # Code from module multiarch: |
| 6603 | # Code from module pthread_sigmask: | ||
| 6582 | # Code from module readlink: | 6604 | # Code from module readlink: |
| 6605 | # Code from module signal: | ||
| 6606 | # Code from module sigprocmask: | ||
| 6583 | # Code from module socklen: | 6607 | # Code from module socklen: |
| 6584 | # Code from module ssize_t: | 6608 | # Code from module ssize_t: |
| 6585 | # Code from module stat: | 6609 | # Code from module stat: |
| @@ -6591,6 +6615,8 @@ esac | |||
| 6591 | # Code from module stdio: | 6615 | # Code from module stdio: |
| 6592 | # Code from module stdlib: | 6616 | # Code from module stdlib: |
| 6593 | # Code from module strftime: | 6617 | # Code from module strftime: |
| 6618 | # Code from module strtoimax: | ||
| 6619 | # Code from module strtoll: | ||
| 6594 | # Code from module strtoull: | 6620 | # Code from module strtoull: |
| 6595 | # Code from module strtoumax: | 6621 | # Code from module strtoumax: |
| 6596 | # Code from module symlink: | 6622 | # Code from module symlink: |
| @@ -7455,6 +7481,8 @@ fi | |||
| 7455 | 7481 | ||
| 7456 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. | 7482 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. |
| 7457 | 7483 | ||
| 7484 | # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. | ||
| 7485 | |||
| 7458 | 7486 | ||
| 7459 | # Check whether --enable-largefile was given. | 7487 | # Check whether --enable-largefile was given. |
| 7460 | if test "${enable_largefile+set}" = set; then : | 7488 | if test "${enable_largefile+set}" = set; then : |
| @@ -13915,7 +13943,1766 @@ $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |||
| 13915 | fi | 13943 | fi |
| 13916 | 13944 | ||
| 13917 | 13945 | ||
| 13918 | # Configure gnulib. | 13946 | # UNIX98 PTYs. |
| 13947 | for ac_func in grantpt | ||
| 13948 | do : | ||
| 13949 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | ||
| 13950 | if test "x$ac_cv_func_grantpt" = x""yes; then : | ||
| 13951 | cat >>confdefs.h <<_ACEOF | ||
| 13952 | #define HAVE_GRANTPT 1 | ||
| 13953 | _ACEOF | ||
| 13954 | |||
| 13955 | fi | ||
| 13956 | done | ||
| 13957 | |||
| 13958 | |||
| 13959 | # PTY-related GNU extensions. | ||
| 13960 | for ac_func in getpt | ||
| 13961 | do : | ||
| 13962 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | ||
| 13963 | if test "x$ac_cv_func_getpt" = x""yes; then : | ||
| 13964 | cat >>confdefs.h <<_ACEOF | ||
| 13965 | #define HAVE_GETPT 1 | ||
| 13966 | _ACEOF | ||
| 13967 | |||
| 13968 | fi | ||
| 13969 | done | ||
| 13970 | |||
| 13971 | |||
| 13972 | # Check this now, so that we will NOT find the above functions in ncurses. | ||
| 13973 | # That is because we have not set up to link ncurses in lib-src. | ||
| 13974 | # It's better to believe a function is not available | ||
| 13975 | # than to expect to find it in ncurses. | ||
| 13976 | # Also we need tputs and friends to be able to build at all. | ||
| 13977 | have_tputs_et_al=true | ||
| 13978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | ||
| 13979 | $as_echo_n "checking for library containing tputs... " >&6; } | ||
| 13980 | if test "${ac_cv_search_tputs+set}" = set; then : | ||
| 13981 | $as_echo_n "(cached) " >&6 | ||
| 13982 | else | ||
| 13983 | ac_func_search_save_LIBS=$LIBS | ||
| 13984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 13985 | /* end confdefs.h. */ | ||
| 13986 | |||
| 13987 | /* Override any GCC internal prototype to avoid an error. | ||
| 13988 | Use char because int might match the return type of a GCC | ||
| 13989 | builtin and then its argument prototype would still apply. */ | ||
| 13990 | #ifdef __cplusplus | ||
| 13991 | extern "C" | ||
| 13992 | #endif | ||
| 13993 | char tputs (); | ||
| 13994 | int | ||
| 13995 | main () | ||
| 13996 | { | ||
| 13997 | return tputs (); | ||
| 13998 | ; | ||
| 13999 | return 0; | ||
| 14000 | } | ||
| 14001 | _ACEOF | ||
| 14002 | for ac_lib in '' ncurses terminfo termcap; do | ||
| 14003 | if test -z "$ac_lib"; then | ||
| 14004 | ac_res="none required" | ||
| 14005 | else | ||
| 14006 | ac_res=-l$ac_lib | ||
| 14007 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 14008 | fi | ||
| 14009 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14010 | ac_cv_search_tputs=$ac_res | ||
| 14011 | fi | ||
| 14012 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14013 | conftest$ac_exeext | ||
| 14014 | if test "${ac_cv_search_tputs+set}" = set; then : | ||
| 14015 | break | ||
| 14016 | fi | ||
| 14017 | done | ||
| 14018 | if test "${ac_cv_search_tputs+set}" = set; then : | ||
| 14019 | |||
| 14020 | else | ||
| 14021 | ac_cv_search_tputs=no | ||
| 14022 | fi | ||
| 14023 | rm conftest.$ac_ext | ||
| 14024 | LIBS=$ac_func_search_save_LIBS | ||
| 14025 | fi | ||
| 14026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | ||
| 14027 | $as_echo "$ac_cv_search_tputs" >&6; } | ||
| 14028 | ac_res=$ac_cv_search_tputs | ||
| 14029 | if test "$ac_res" != no; then : | ||
| 14030 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 14031 | |||
| 14032 | else | ||
| 14033 | have_tputs_et_al=false | ||
| 14034 | fi | ||
| 14035 | |||
| 14036 | if test "$have_tputs_et_al" != true; then | ||
| 14037 | as_fn_error "I couldn't find termcap functions (tputs and friends). | ||
| 14038 | Maybe some development libraries/packages are missing? Try installing | ||
| 14039 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | ||
| 14040 | fi | ||
| 14041 | # Must define this when any termcap library is found. | ||
| 14042 | |||
| 14043 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h | ||
| 14044 | |||
| 14045 | ## FIXME This was the cpp logic, but I am not sure it is right. | ||
| 14046 | ## The above test has not necessarily found libncurses. | ||
| 14047 | HAVE_LIBNCURSES=yes | ||
| 14048 | |||
| 14049 | ## Use terminfo instead of termcap? | ||
| 14050 | ## Note only system files NOT using terminfo are: | ||
| 14051 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | ||
| 14052 | ## darwin|gnu without ncurses. | ||
| 14053 | TERMINFO=no | ||
| 14054 | LIBS_TERMCAP= | ||
| 14055 | case "$opsys" in | ||
| 14056 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | ||
| 14057 | ## hpux10-20: Use the system provided termcap(3) library. | ||
| 14058 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | ||
| 14059 | ## is necessary. Otherwise Emacs dumps core when run -nw. | ||
| 14060 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | ||
| 14061 | |||
| 14062 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | ||
| 14063 | ## The ncurses library has been moved out of the System framework in | ||
| 14064 | ## Mac OS X 10.2. So if configure detects it, set the command-line | ||
| 14065 | ## option to use it. | ||
| 14066 | darwin|gnu*) | ||
| 14067 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | ||
| 14068 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | ||
| 14069 | TERMINFO=yes | ||
| 14070 | LIBS_TERMCAP="-lncurses" | ||
| 14071 | fi | ||
| 14072 | ;; | ||
| 14073 | |||
| 14074 | freebsd) | ||
| 14075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | ||
| 14076 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | ||
| 14077 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | ||
| 14078 | $as_echo_n "(cached) " >&6 | ||
| 14079 | else | ||
| 14080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14081 | /* end confdefs.h. */ | ||
| 14082 | #include <osreldate.h> | ||
| 14083 | int | ||
| 14084 | main () | ||
| 14085 | { | ||
| 14086 | #if __FreeBSD_version < 400000 | ||
| 14087 | fail; | ||
| 14088 | #endif | ||
| 14089 | |||
| 14090 | ; | ||
| 14091 | return 0; | ||
| 14092 | } | ||
| 14093 | _ACEOF | ||
| 14094 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14095 | emacs_cv_freebsd_terminfo=yes | ||
| 14096 | else | ||
| 14097 | emacs_cv_freebsd_terminfo=no | ||
| 14098 | fi | ||
| 14099 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14100 | conftest$ac_exeext conftest.$ac_ext | ||
| 14101 | fi | ||
| 14102 | |||
| 14103 | |||
| 14104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | ||
| 14105 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | ||
| 14106 | |||
| 14107 | if test $emacs_cv_freebsd_terminfo = yes; then | ||
| 14108 | TERMINFO=yes | ||
| 14109 | LIBS_TERMCAP="-lncurses" | ||
| 14110 | else | ||
| 14111 | LIBS_TERMCAP="-ltermcap" | ||
| 14112 | fi | ||
| 14113 | ;; | ||
| 14114 | |||
| 14115 | netbsd) | ||
| 14116 | if test $ac_cv_search_tputs = -lterminfo; then | ||
| 14117 | TERMINFO=yes | ||
| 14118 | LIBS_TERMCAP="-lterminfo" | ||
| 14119 | else | ||
| 14120 | LIBS_TERMCAP="-ltermcap" | ||
| 14121 | fi | ||
| 14122 | ;; | ||
| 14123 | |||
| 14124 | esac | ||
| 14125 | |||
| 14126 | case "$opsys" in | ||
| 14127 | ## hpux: Make sure we get select from libc rather than from libcurses | ||
| 14128 | ## because libcurses on HPUX 10.10 has a broken version of select. | ||
| 14129 | ## We used to use -lc -lcurses, but this may be cleaner. | ||
| 14130 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | ||
| 14131 | |||
| 14132 | openbsd) LIBS_TERMCAP="-lncurses" ;; | ||
| 14133 | |||
| 14134 | ## Must use system termcap, if we use any termcap. It does special things. | ||
| 14135 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | ||
| 14136 | esac | ||
| 14137 | |||
| 14138 | TERMCAP_OBJ=tparam.o | ||
| 14139 | if test $TERMINFO = yes; then | ||
| 14140 | |||
| 14141 | $as_echo "#define TERMINFO 1" >>confdefs.h | ||
| 14142 | |||
| 14143 | |||
| 14144 | ## Default used to be -ltermcap. Add a case above if need something else. | ||
| 14145 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | ||
| 14146 | |||
| 14147 | TERMCAP_OBJ=terminfo.o | ||
| 14148 | fi | ||
| 14149 | |||
| 14150 | |||
| 14151 | |||
| 14152 | |||
| 14153 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | ||
| 14154 | resolv=no | ||
| 14155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14156 | /* end confdefs.h. */ | ||
| 14157 | #include <netinet/in.h> | ||
| 14158 | #include <arpa/nameser.h> | ||
| 14159 | #include <resolv.h> | ||
| 14160 | int | ||
| 14161 | main () | ||
| 14162 | { | ||
| 14163 | return res_init(); | ||
| 14164 | ; | ||
| 14165 | return 0; | ||
| 14166 | } | ||
| 14167 | _ACEOF | ||
| 14168 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14169 | have_res_init=yes | ||
| 14170 | else | ||
| 14171 | have_res_init=no | ||
| 14172 | fi | ||
| 14173 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14174 | conftest$ac_exeext conftest.$ac_ext | ||
| 14175 | if test "$have_res_init" = no; then | ||
| 14176 | OLIBS="$LIBS" | ||
| 14177 | LIBS="$LIBS -lresolv" | ||
| 14178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | ||
| 14179 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | ||
| 14180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14181 | /* end confdefs.h. */ | ||
| 14182 | #include <netinet/in.h> | ||
| 14183 | #include <arpa/nameser.h> | ||
| 14184 | #include <resolv.h> | ||
| 14185 | int | ||
| 14186 | main () | ||
| 14187 | { | ||
| 14188 | return res_init(); | ||
| 14189 | ; | ||
| 14190 | return 0; | ||
| 14191 | } | ||
| 14192 | _ACEOF | ||
| 14193 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14194 | have_res_init=yes | ||
| 14195 | else | ||
| 14196 | have_res_init=no | ||
| 14197 | fi | ||
| 14198 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14199 | conftest$ac_exeext conftest.$ac_ext | ||
| 14200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | ||
| 14201 | $as_echo "$have_res_init" >&6; } | ||
| 14202 | if test "$have_res_init" = yes ; then | ||
| 14203 | resolv=yes | ||
| 14204 | fi | ||
| 14205 | LIBS="$OLIBS" | ||
| 14206 | fi | ||
| 14207 | |||
| 14208 | if test "$have_res_init" = yes; then | ||
| 14209 | |||
| 14210 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | ||
| 14211 | |||
| 14212 | fi | ||
| 14213 | |||
| 14214 | # Do we need the Hesiod library to provide the support routines? | ||
| 14215 | LIBHESIOD= | ||
| 14216 | if test "$with_hesiod" != no ; then | ||
| 14217 | # Don't set $LIBS here -- see comments above. FIXME which comments? | ||
| 14218 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | ||
| 14219 | if test "x$ac_cv_func_res_send" = x""yes; then : | ||
| 14220 | |||
| 14221 | else | ||
| 14222 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | ||
| 14223 | if test "x$ac_cv_func___res_send" = x""yes; then : | ||
| 14224 | |||
| 14225 | else | ||
| 14226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | ||
| 14227 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | ||
| 14228 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | ||
| 14229 | $as_echo_n "(cached) " >&6 | ||
| 14230 | else | ||
| 14231 | ac_check_lib_save_LIBS=$LIBS | ||
| 14232 | LIBS="-lresolv $LIBS" | ||
| 14233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14234 | /* end confdefs.h. */ | ||
| 14235 | |||
| 14236 | /* Override any GCC internal prototype to avoid an error. | ||
| 14237 | Use char because int might match the return type of a GCC | ||
| 14238 | builtin and then its argument prototype would still apply. */ | ||
| 14239 | #ifdef __cplusplus | ||
| 14240 | extern "C" | ||
| 14241 | #endif | ||
| 14242 | char res_send (); | ||
| 14243 | int | ||
| 14244 | main () | ||
| 14245 | { | ||
| 14246 | return res_send (); | ||
| 14247 | ; | ||
| 14248 | return 0; | ||
| 14249 | } | ||
| 14250 | _ACEOF | ||
| 14251 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14252 | ac_cv_lib_resolv_res_send=yes | ||
| 14253 | else | ||
| 14254 | ac_cv_lib_resolv_res_send=no | ||
| 14255 | fi | ||
| 14256 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14257 | conftest$ac_exeext conftest.$ac_ext | ||
| 14258 | LIBS=$ac_check_lib_save_LIBS | ||
| 14259 | fi | ||
| 14260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | ||
| 14261 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | ||
| 14262 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | ||
| 14263 | resolv=yes | ||
| 14264 | else | ||
| 14265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | ||
| 14266 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | ||
| 14267 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | ||
| 14268 | $as_echo_n "(cached) " >&6 | ||
| 14269 | else | ||
| 14270 | ac_check_lib_save_LIBS=$LIBS | ||
| 14271 | LIBS="-lresolv $LIBS" | ||
| 14272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14273 | /* end confdefs.h. */ | ||
| 14274 | |||
| 14275 | /* Override any GCC internal prototype to avoid an error. | ||
| 14276 | Use char because int might match the return type of a GCC | ||
| 14277 | builtin and then its argument prototype would still apply. */ | ||
| 14278 | #ifdef __cplusplus | ||
| 14279 | extern "C" | ||
| 14280 | #endif | ||
| 14281 | char __res_send (); | ||
| 14282 | int | ||
| 14283 | main () | ||
| 14284 | { | ||
| 14285 | return __res_send (); | ||
| 14286 | ; | ||
| 14287 | return 0; | ||
| 14288 | } | ||
| 14289 | _ACEOF | ||
| 14290 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14291 | ac_cv_lib_resolv___res_send=yes | ||
| 14292 | else | ||
| 14293 | ac_cv_lib_resolv___res_send=no | ||
| 14294 | fi | ||
| 14295 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14296 | conftest$ac_exeext conftest.$ac_ext | ||
| 14297 | LIBS=$ac_check_lib_save_LIBS | ||
| 14298 | fi | ||
| 14299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | ||
| 14300 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | ||
| 14301 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | ||
| 14302 | resolv=yes | ||
| 14303 | fi | ||
| 14304 | |||
| 14305 | fi | ||
| 14306 | |||
| 14307 | fi | ||
| 14308 | |||
| 14309 | fi | ||
| 14310 | |||
| 14311 | if test "$resolv" = yes ; then | ||
| 14312 | RESOLVLIB=-lresolv | ||
| 14313 | else | ||
| 14314 | RESOLVLIB= | ||
| 14315 | fi | ||
| 14316 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | ||
| 14317 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | ||
| 14318 | |||
| 14319 | else | ||
| 14320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | ||
| 14321 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | ||
| 14322 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | ||
| 14323 | $as_echo_n "(cached) " >&6 | ||
| 14324 | else | ||
| 14325 | ac_check_lib_save_LIBS=$LIBS | ||
| 14326 | LIBS="-lhesiod $RESOLVLIB $LIBS" | ||
| 14327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14328 | /* end confdefs.h. */ | ||
| 14329 | |||
| 14330 | /* Override any GCC internal prototype to avoid an error. | ||
| 14331 | Use char because int might match the return type of a GCC | ||
| 14332 | builtin and then its argument prototype would still apply. */ | ||
| 14333 | #ifdef __cplusplus | ||
| 14334 | extern "C" | ||
| 14335 | #endif | ||
| 14336 | char hes_getmailhost (); | ||
| 14337 | int | ||
| 14338 | main () | ||
| 14339 | { | ||
| 14340 | return hes_getmailhost (); | ||
| 14341 | ; | ||
| 14342 | return 0; | ||
| 14343 | } | ||
| 14344 | _ACEOF | ||
| 14345 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14346 | ac_cv_lib_hesiod_hes_getmailhost=yes | ||
| 14347 | else | ||
| 14348 | ac_cv_lib_hesiod_hes_getmailhost=no | ||
| 14349 | fi | ||
| 14350 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14351 | conftest$ac_exeext conftest.$ac_ext | ||
| 14352 | LIBS=$ac_check_lib_save_LIBS | ||
| 14353 | fi | ||
| 14354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | ||
| 14355 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | ||
| 14356 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | ||
| 14357 | hesiod=yes | ||
| 14358 | else | ||
| 14359 | : | ||
| 14360 | fi | ||
| 14361 | |||
| 14362 | fi | ||
| 14363 | |||
| 14364 | |||
| 14365 | if test x"$hesiod" = xyes; then | ||
| 14366 | |||
| 14367 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | ||
| 14368 | |||
| 14369 | LIBHESIOD=-lhesiod | ||
| 14370 | fi | ||
| 14371 | fi | ||
| 14372 | |||
| 14373 | |||
| 14374 | # Do we need libresolv (due to res_init or Hesiod)? | ||
| 14375 | if test "$resolv" = yes ; then | ||
| 14376 | |||
| 14377 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | ||
| 14378 | |||
| 14379 | LIBRESOLV=-lresolv | ||
| 14380 | else | ||
| 14381 | LIBRESOLV= | ||
| 14382 | fi | ||
| 14383 | |||
| 14384 | |||
| 14385 | # These tell us which Kerberos-related libraries to use. | ||
| 14386 | COM_ERRLIB= | ||
| 14387 | CRYPTOLIB= | ||
| 14388 | KRB5LIB= | ||
| 14389 | DESLIB= | ||
| 14390 | KRB4LIB= | ||
| 14391 | |||
| 14392 | if test "${with_kerberos}" != no; then | ||
| 14393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | ||
| 14394 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | ||
| 14395 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | ||
| 14396 | $as_echo_n "(cached) " >&6 | ||
| 14397 | else | ||
| 14398 | ac_check_lib_save_LIBS=$LIBS | ||
| 14399 | LIBS="-lcom_err $LIBS" | ||
| 14400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14401 | /* end confdefs.h. */ | ||
| 14402 | |||
| 14403 | /* Override any GCC internal prototype to avoid an error. | ||
| 14404 | Use char because int might match the return type of a GCC | ||
| 14405 | builtin and then its argument prototype would still apply. */ | ||
| 14406 | #ifdef __cplusplus | ||
| 14407 | extern "C" | ||
| 14408 | #endif | ||
| 14409 | char com_err (); | ||
| 14410 | int | ||
| 14411 | main () | ||
| 14412 | { | ||
| 14413 | return com_err (); | ||
| 14414 | ; | ||
| 14415 | return 0; | ||
| 14416 | } | ||
| 14417 | _ACEOF | ||
| 14418 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14419 | ac_cv_lib_com_err_com_err=yes | ||
| 14420 | else | ||
| 14421 | ac_cv_lib_com_err_com_err=no | ||
| 14422 | fi | ||
| 14423 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14424 | conftest$ac_exeext conftest.$ac_ext | ||
| 14425 | LIBS=$ac_check_lib_save_LIBS | ||
| 14426 | fi | ||
| 14427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | ||
| 14428 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | ||
| 14429 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | ||
| 14430 | have_com_err=yes | ||
| 14431 | else | ||
| 14432 | have_com_err=no | ||
| 14433 | fi | ||
| 14434 | |||
| 14435 | if test $have_com_err = yes; then | ||
| 14436 | COM_ERRLIB=-lcom_err | ||
| 14437 | LIBS="$COM_ERRLIB $LIBS" | ||
| 14438 | |||
| 14439 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h | ||
| 14440 | |||
| 14441 | fi | ||
| 14442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | ||
| 14443 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | ||
| 14444 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | ||
| 14445 | $as_echo_n "(cached) " >&6 | ||
| 14446 | else | ||
| 14447 | ac_check_lib_save_LIBS=$LIBS | ||
| 14448 | LIBS="-lcrypto $LIBS" | ||
| 14449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14450 | /* end confdefs.h. */ | ||
| 14451 | |||
| 14452 | /* Override any GCC internal prototype to avoid an error. | ||
| 14453 | Use char because int might match the return type of a GCC | ||
| 14454 | builtin and then its argument prototype would still apply. */ | ||
| 14455 | #ifdef __cplusplus | ||
| 14456 | extern "C" | ||
| 14457 | #endif | ||
| 14458 | char mit_des_cbc_encrypt (); | ||
| 14459 | int | ||
| 14460 | main () | ||
| 14461 | { | ||
| 14462 | return mit_des_cbc_encrypt (); | ||
| 14463 | ; | ||
| 14464 | return 0; | ||
| 14465 | } | ||
| 14466 | _ACEOF | ||
| 14467 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14468 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | ||
| 14469 | else | ||
| 14470 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | ||
| 14471 | fi | ||
| 14472 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14473 | conftest$ac_exeext conftest.$ac_ext | ||
| 14474 | LIBS=$ac_check_lib_save_LIBS | ||
| 14475 | fi | ||
| 14476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | ||
| 14477 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | ||
| 14478 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | ||
| 14479 | have_crypto=yes | ||
| 14480 | else | ||
| 14481 | have_crypto=no | ||
| 14482 | fi | ||
| 14483 | |||
| 14484 | if test $have_crypto = yes; then | ||
| 14485 | CRYPTOLIB=-lcrypto | ||
| 14486 | LIBS="$CRYPTOLIB $LIBS" | ||
| 14487 | |||
| 14488 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h | ||
| 14489 | |||
| 14490 | fi | ||
| 14491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | ||
| 14492 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | ||
| 14493 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | ||
| 14494 | $as_echo_n "(cached) " >&6 | ||
| 14495 | else | ||
| 14496 | ac_check_lib_save_LIBS=$LIBS | ||
| 14497 | LIBS="-lk5crypto $LIBS" | ||
| 14498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14499 | /* end confdefs.h. */ | ||
| 14500 | |||
| 14501 | /* Override any GCC internal prototype to avoid an error. | ||
| 14502 | Use char because int might match the return type of a GCC | ||
| 14503 | builtin and then its argument prototype would still apply. */ | ||
| 14504 | #ifdef __cplusplus | ||
| 14505 | extern "C" | ||
| 14506 | #endif | ||
| 14507 | char mit_des_cbc_encrypt (); | ||
| 14508 | int | ||
| 14509 | main () | ||
| 14510 | { | ||
| 14511 | return mit_des_cbc_encrypt (); | ||
| 14512 | ; | ||
| 14513 | return 0; | ||
| 14514 | } | ||
| 14515 | _ACEOF | ||
| 14516 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14517 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | ||
| 14518 | else | ||
| 14519 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | ||
| 14520 | fi | ||
| 14521 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14522 | conftest$ac_exeext conftest.$ac_ext | ||
| 14523 | LIBS=$ac_check_lib_save_LIBS | ||
| 14524 | fi | ||
| 14525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | ||
| 14526 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | ||
| 14527 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | ||
| 14528 | have_k5crypto=yes | ||
| 14529 | else | ||
| 14530 | have_k5crypto=no | ||
| 14531 | fi | ||
| 14532 | |||
| 14533 | if test $have_k5crypto = yes; then | ||
| 14534 | CRYPTOLIB=-lk5crypto | ||
| 14535 | LIBS="$CRYPTOLIB $LIBS" | ||
| 14536 | |||
| 14537 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h | ||
| 14538 | |||
| 14539 | fi | ||
| 14540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | ||
| 14541 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | ||
| 14542 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | ||
| 14543 | $as_echo_n "(cached) " >&6 | ||
| 14544 | else | ||
| 14545 | ac_check_lib_save_LIBS=$LIBS | ||
| 14546 | LIBS="-lkrb5 $LIBS" | ||
| 14547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14548 | /* end confdefs.h. */ | ||
| 14549 | |||
| 14550 | /* Override any GCC internal prototype to avoid an error. | ||
| 14551 | Use char because int might match the return type of a GCC | ||
| 14552 | builtin and then its argument prototype would still apply. */ | ||
| 14553 | #ifdef __cplusplus | ||
| 14554 | extern "C" | ||
| 14555 | #endif | ||
| 14556 | char krb5_init_context (); | ||
| 14557 | int | ||
| 14558 | main () | ||
| 14559 | { | ||
| 14560 | return krb5_init_context (); | ||
| 14561 | ; | ||
| 14562 | return 0; | ||
| 14563 | } | ||
| 14564 | _ACEOF | ||
| 14565 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14566 | ac_cv_lib_krb5_krb5_init_context=yes | ||
| 14567 | else | ||
| 14568 | ac_cv_lib_krb5_krb5_init_context=no | ||
| 14569 | fi | ||
| 14570 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14571 | conftest$ac_exeext conftest.$ac_ext | ||
| 14572 | LIBS=$ac_check_lib_save_LIBS | ||
| 14573 | fi | ||
| 14574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | ||
| 14575 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | ||
| 14576 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | ||
| 14577 | have_krb5=yes | ||
| 14578 | else | ||
| 14579 | have_krb5=no | ||
| 14580 | fi | ||
| 14581 | |||
| 14582 | if test $have_krb5=yes; then | ||
| 14583 | KRB5LIB=-lkrb5 | ||
| 14584 | LIBS="$KRB5LIB $LIBS" | ||
| 14585 | |||
| 14586 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h | ||
| 14587 | |||
| 14588 | fi | ||
| 14589 | if test "${with_kerberos5}" = no; then | ||
| 14590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | ||
| 14591 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | ||
| 14592 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | ||
| 14593 | $as_echo_n "(cached) " >&6 | ||
| 14594 | else | ||
| 14595 | ac_check_lib_save_LIBS=$LIBS | ||
| 14596 | LIBS="-ldes425 $LIBS" | ||
| 14597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14598 | /* end confdefs.h. */ | ||
| 14599 | |||
| 14600 | /* Override any GCC internal prototype to avoid an error. | ||
| 14601 | Use char because int might match the return type of a GCC | ||
| 14602 | builtin and then its argument prototype would still apply. */ | ||
| 14603 | #ifdef __cplusplus | ||
| 14604 | extern "C" | ||
| 14605 | #endif | ||
| 14606 | char des_cbc_encrypt (); | ||
| 14607 | int | ||
| 14608 | main () | ||
| 14609 | { | ||
| 14610 | return des_cbc_encrypt (); | ||
| 14611 | ; | ||
| 14612 | return 0; | ||
| 14613 | } | ||
| 14614 | _ACEOF | ||
| 14615 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14616 | ac_cv_lib_des425_des_cbc_encrypt=yes | ||
| 14617 | else | ||
| 14618 | ac_cv_lib_des425_des_cbc_encrypt=no | ||
| 14619 | fi | ||
| 14620 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14621 | conftest$ac_exeext conftest.$ac_ext | ||
| 14622 | LIBS=$ac_check_lib_save_LIBS | ||
| 14623 | fi | ||
| 14624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | ||
| 14625 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | ||
| 14626 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | ||
| 14627 | have_des425=yes | ||
| 14628 | else | ||
| 14629 | have_des425=no | ||
| 14630 | fi | ||
| 14631 | |||
| 14632 | if test $have_des425 = yes; then | ||
| 14633 | DESLIB=-ldes425 | ||
| 14634 | LIBS="$DESLIB $LIBS" | ||
| 14635 | |||
| 14636 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h | ||
| 14637 | |||
| 14638 | else | ||
| 14639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | ||
| 14640 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | ||
| 14641 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | ||
| 14642 | $as_echo_n "(cached) " >&6 | ||
| 14643 | else | ||
| 14644 | ac_check_lib_save_LIBS=$LIBS | ||
| 14645 | LIBS="-ldes $LIBS" | ||
| 14646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14647 | /* end confdefs.h. */ | ||
| 14648 | |||
| 14649 | /* Override any GCC internal prototype to avoid an error. | ||
| 14650 | Use char because int might match the return type of a GCC | ||
| 14651 | builtin and then its argument prototype would still apply. */ | ||
| 14652 | #ifdef __cplusplus | ||
| 14653 | extern "C" | ||
| 14654 | #endif | ||
| 14655 | char des_cbc_encrypt (); | ||
| 14656 | int | ||
| 14657 | main () | ||
| 14658 | { | ||
| 14659 | return des_cbc_encrypt (); | ||
| 14660 | ; | ||
| 14661 | return 0; | ||
| 14662 | } | ||
| 14663 | _ACEOF | ||
| 14664 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14665 | ac_cv_lib_des_des_cbc_encrypt=yes | ||
| 14666 | else | ||
| 14667 | ac_cv_lib_des_des_cbc_encrypt=no | ||
| 14668 | fi | ||
| 14669 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14670 | conftest$ac_exeext conftest.$ac_ext | ||
| 14671 | LIBS=$ac_check_lib_save_LIBS | ||
| 14672 | fi | ||
| 14673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | ||
| 14674 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | ||
| 14675 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | ||
| 14676 | have_des=yes | ||
| 14677 | else | ||
| 14678 | have_des=no | ||
| 14679 | fi | ||
| 14680 | |||
| 14681 | if test $have_des = yes; then | ||
| 14682 | DESLIB=-ldes | ||
| 14683 | LIBS="$DESLIB $LIBS" | ||
| 14684 | |||
| 14685 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h | ||
| 14686 | |||
| 14687 | fi | ||
| 14688 | fi | ||
| 14689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | ||
| 14690 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | ||
| 14691 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | ||
| 14692 | $as_echo_n "(cached) " >&6 | ||
| 14693 | else | ||
| 14694 | ac_check_lib_save_LIBS=$LIBS | ||
| 14695 | LIBS="-lkrb4 $LIBS" | ||
| 14696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14697 | /* end confdefs.h. */ | ||
| 14698 | |||
| 14699 | /* Override any GCC internal prototype to avoid an error. | ||
| 14700 | Use char because int might match the return type of a GCC | ||
| 14701 | builtin and then its argument prototype would still apply. */ | ||
| 14702 | #ifdef __cplusplus | ||
| 14703 | extern "C" | ||
| 14704 | #endif | ||
| 14705 | char krb_get_cred (); | ||
| 14706 | int | ||
| 14707 | main () | ||
| 14708 | { | ||
| 14709 | return krb_get_cred (); | ||
| 14710 | ; | ||
| 14711 | return 0; | ||
| 14712 | } | ||
| 14713 | _ACEOF | ||
| 14714 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14715 | ac_cv_lib_krb4_krb_get_cred=yes | ||
| 14716 | else | ||
| 14717 | ac_cv_lib_krb4_krb_get_cred=no | ||
| 14718 | fi | ||
| 14719 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14720 | conftest$ac_exeext conftest.$ac_ext | ||
| 14721 | LIBS=$ac_check_lib_save_LIBS | ||
| 14722 | fi | ||
| 14723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | ||
| 14724 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | ||
| 14725 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | ||
| 14726 | have_krb4=yes | ||
| 14727 | else | ||
| 14728 | have_krb4=no | ||
| 14729 | fi | ||
| 14730 | |||
| 14731 | if test $have_krb4 = yes; then | ||
| 14732 | KRB4LIB=-lkrb4 | ||
| 14733 | LIBS="$KRB4LIB $LIBS" | ||
| 14734 | |||
| 14735 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | ||
| 14736 | |||
| 14737 | else | ||
| 14738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | ||
| 14739 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | ||
| 14740 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | ||
| 14741 | $as_echo_n "(cached) " >&6 | ||
| 14742 | else | ||
| 14743 | ac_check_lib_save_LIBS=$LIBS | ||
| 14744 | LIBS="-lkrb $LIBS" | ||
| 14745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14746 | /* end confdefs.h. */ | ||
| 14747 | |||
| 14748 | /* Override any GCC internal prototype to avoid an error. | ||
| 14749 | Use char because int might match the return type of a GCC | ||
| 14750 | builtin and then its argument prototype would still apply. */ | ||
| 14751 | #ifdef __cplusplus | ||
| 14752 | extern "C" | ||
| 14753 | #endif | ||
| 14754 | char krb_get_cred (); | ||
| 14755 | int | ||
| 14756 | main () | ||
| 14757 | { | ||
| 14758 | return krb_get_cred (); | ||
| 14759 | ; | ||
| 14760 | return 0; | ||
| 14761 | } | ||
| 14762 | _ACEOF | ||
| 14763 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14764 | ac_cv_lib_krb_krb_get_cred=yes | ||
| 14765 | else | ||
| 14766 | ac_cv_lib_krb_krb_get_cred=no | ||
| 14767 | fi | ||
| 14768 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14769 | conftest$ac_exeext conftest.$ac_ext | ||
| 14770 | LIBS=$ac_check_lib_save_LIBS | ||
| 14771 | fi | ||
| 14772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | ||
| 14773 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | ||
| 14774 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | ||
| 14775 | have_krb=yes | ||
| 14776 | else | ||
| 14777 | have_krb=no | ||
| 14778 | fi | ||
| 14779 | |||
| 14780 | if test $have_krb = yes; then | ||
| 14781 | KRB4LIB=-lkrb | ||
| 14782 | LIBS="$KRB4LIB $LIBS" | ||
| 14783 | |||
| 14784 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | ||
| 14785 | |||
| 14786 | fi | ||
| 14787 | fi | ||
| 14788 | fi | ||
| 14789 | |||
| 14790 | if test "${with_kerberos5}" != no; then | ||
| 14791 | for ac_header in krb5.h | ||
| 14792 | do : | ||
| 14793 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | ||
| 14794 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | ||
| 14795 | cat >>confdefs.h <<_ACEOF | ||
| 14796 | #define HAVE_KRB5_H 1 | ||
| 14797 | _ACEOF | ||
| 14798 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | ||
| 14799 | " | ||
| 14800 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | ||
| 14801 | |||
| 14802 | cat >>confdefs.h <<_ACEOF | ||
| 14803 | #define HAVE_KRB5_ERROR_TEXT 1 | ||
| 14804 | _ACEOF | ||
| 14805 | |||
| 14806 | |||
| 14807 | fi | ||
| 14808 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | ||
| 14809 | " | ||
| 14810 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | ||
| 14811 | |||
| 14812 | cat >>confdefs.h <<_ACEOF | ||
| 14813 | #define HAVE_KRB5_ERROR_E_TEXT 1 | ||
| 14814 | _ACEOF | ||
| 14815 | |||
| 14816 | |||
| 14817 | fi | ||
| 14818 | |||
| 14819 | fi | ||
| 14820 | |||
| 14821 | done | ||
| 14822 | |||
| 14823 | else | ||
| 14824 | for ac_header in des.h | ||
| 14825 | do : | ||
| 14826 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | ||
| 14827 | if test "x$ac_cv_header_des_h" = x""yes; then : | ||
| 14828 | cat >>confdefs.h <<_ACEOF | ||
| 14829 | #define HAVE_DES_H 1 | ||
| 14830 | _ACEOF | ||
| 14831 | |||
| 14832 | else | ||
| 14833 | for ac_header in kerberosIV/des.h | ||
| 14834 | do : | ||
| 14835 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | ||
| 14836 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | ||
| 14837 | cat >>confdefs.h <<_ACEOF | ||
| 14838 | #define HAVE_KERBEROSIV_DES_H 1 | ||
| 14839 | _ACEOF | ||
| 14840 | |||
| 14841 | else | ||
| 14842 | for ac_header in kerberos/des.h | ||
| 14843 | do : | ||
| 14844 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | ||
| 14845 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | ||
| 14846 | cat >>confdefs.h <<_ACEOF | ||
| 14847 | #define HAVE_KERBEROS_DES_H 1 | ||
| 14848 | _ACEOF | ||
| 14849 | |||
| 14850 | fi | ||
| 14851 | |||
| 14852 | done | ||
| 14853 | |||
| 14854 | fi | ||
| 14855 | |||
| 14856 | done | ||
| 14857 | |||
| 14858 | fi | ||
| 14859 | |||
| 14860 | done | ||
| 14861 | |||
| 14862 | for ac_header in krb.h | ||
| 14863 | do : | ||
| 14864 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | ||
| 14865 | if test "x$ac_cv_header_krb_h" = x""yes; then : | ||
| 14866 | cat >>confdefs.h <<_ACEOF | ||
| 14867 | #define HAVE_KRB_H 1 | ||
| 14868 | _ACEOF | ||
| 14869 | |||
| 14870 | else | ||
| 14871 | for ac_header in kerberosIV/krb.h | ||
| 14872 | do : | ||
| 14873 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | ||
| 14874 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | ||
| 14875 | cat >>confdefs.h <<_ACEOF | ||
| 14876 | #define HAVE_KERBEROSIV_KRB_H 1 | ||
| 14877 | _ACEOF | ||
| 14878 | |||
| 14879 | else | ||
| 14880 | for ac_header in kerberos/krb.h | ||
| 14881 | do : | ||
| 14882 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | ||
| 14883 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | ||
| 14884 | cat >>confdefs.h <<_ACEOF | ||
| 14885 | #define HAVE_KERBEROS_KRB_H 1 | ||
| 14886 | _ACEOF | ||
| 14887 | |||
| 14888 | fi | ||
| 14889 | |||
| 14890 | done | ||
| 14891 | |||
| 14892 | fi | ||
| 14893 | |||
| 14894 | done | ||
| 14895 | |||
| 14896 | fi | ||
| 14897 | |||
| 14898 | done | ||
| 14899 | |||
| 14900 | fi | ||
| 14901 | for ac_header in com_err.h | ||
| 14902 | do : | ||
| 14903 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" | ||
| 14904 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | ||
| 14905 | cat >>confdefs.h <<_ACEOF | ||
| 14906 | #define HAVE_COM_ERR_H 1 | ||
| 14907 | _ACEOF | ||
| 14908 | |||
| 14909 | fi | ||
| 14910 | |||
| 14911 | done | ||
| 14912 | |||
| 14913 | fi | ||
| 14914 | |||
| 14915 | |||
| 14916 | |||
| 14917 | |||
| 14918 | |||
| 14919 | |||
| 14920 | |||
| 14921 | # Solaris requires -lintl if you want strerror (which calls dgettext) | ||
| 14922 | # to return localized messages. | ||
| 14923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | ||
| 14924 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | ||
| 14925 | if test "${ac_cv_lib_intl_dgettext+set}" = set; then : | ||
| 14926 | $as_echo_n "(cached) " >&6 | ||
| 14927 | else | ||
| 14928 | ac_check_lib_save_LIBS=$LIBS | ||
| 14929 | LIBS="-lintl $LIBS" | ||
| 14930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14931 | /* end confdefs.h. */ | ||
| 14932 | |||
| 14933 | /* Override any GCC internal prototype to avoid an error. | ||
| 14934 | Use char because int might match the return type of a GCC | ||
| 14935 | builtin and then its argument prototype would still apply. */ | ||
| 14936 | #ifdef __cplusplus | ||
| 14937 | extern "C" | ||
| 14938 | #endif | ||
| 14939 | char dgettext (); | ||
| 14940 | int | ||
| 14941 | main () | ||
| 14942 | { | ||
| 14943 | return dgettext (); | ||
| 14944 | ; | ||
| 14945 | return 0; | ||
| 14946 | } | ||
| 14947 | _ACEOF | ||
| 14948 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 14949 | ac_cv_lib_intl_dgettext=yes | ||
| 14950 | else | ||
| 14951 | ac_cv_lib_intl_dgettext=no | ||
| 14952 | fi | ||
| 14953 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 14954 | conftest$ac_exeext conftest.$ac_ext | ||
| 14955 | LIBS=$ac_check_lib_save_LIBS | ||
| 14956 | fi | ||
| 14957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | ||
| 14958 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | ||
| 14959 | if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : | ||
| 14960 | cat >>confdefs.h <<_ACEOF | ||
| 14961 | #define HAVE_LIBINTL 1 | ||
| 14962 | _ACEOF | ||
| 14963 | |||
| 14964 | LIBS="-lintl $LIBS" | ||
| 14965 | |||
| 14966 | fi | ||
| 14967 | |||
| 14968 | |||
| 14969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | ||
| 14970 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | ||
| 14971 | if test "${emacs_cv_localtime_cache+set}" = set; then : | ||
| 14972 | $as_echo_n "(cached) " >&6 | ||
| 14973 | else | ||
| 14974 | if test x$ac_cv_func_tzset = xyes; then | ||
| 14975 | if test "$cross_compiling" = yes; then : | ||
| 14976 | # If we have tzset, assume the worst when cross-compiling. | ||
| 14977 | emacs_cv_localtime_cache=yes | ||
| 14978 | else | ||
| 14979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14980 | /* end confdefs.h. */ | ||
| 14981 | #include <time.h> | ||
| 14982 | char TZ_GMT0[] = "TZ=GMT0"; | ||
| 14983 | char TZ_PST8[] = "TZ=PST8"; | ||
| 14984 | main() | ||
| 14985 | { | ||
| 14986 | time_t now = time ((time_t *) 0); | ||
| 14987 | int hour_GMT0, hour_unset; | ||
| 14988 | if (putenv (TZ_GMT0) != 0) | ||
| 14989 | exit (1); | ||
| 14990 | hour_GMT0 = localtime (&now)->tm_hour; | ||
| 14991 | unsetenv("TZ"); | ||
| 14992 | hour_unset = localtime (&now)->tm_hour; | ||
| 14993 | if (putenv (TZ_PST8) != 0) | ||
| 14994 | exit (1); | ||
| 14995 | if (localtime (&now)->tm_hour == hour_GMT0) | ||
| 14996 | exit (1); | ||
| 14997 | unsetenv("TZ"); | ||
| 14998 | if (localtime (&now)->tm_hour != hour_unset) | ||
| 14999 | exit (1); | ||
| 15000 | exit (0); | ||
| 15001 | } | ||
| 15002 | _ACEOF | ||
| 15003 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 15004 | emacs_cv_localtime_cache=no | ||
| 15005 | else | ||
| 15006 | emacs_cv_localtime_cache=yes | ||
| 15007 | fi | ||
| 15008 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 15009 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 15010 | fi | ||
| 15011 | |||
| 15012 | else | ||
| 15013 | # If we lack tzset, report that localtime does not cache TZ, | ||
| 15014 | # since we can't invalidate the cache if we don't have tzset. | ||
| 15015 | emacs_cv_localtime_cache=no | ||
| 15016 | fi | ||
| 15017 | fi | ||
| 15018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | ||
| 15019 | $as_echo "$emacs_cv_localtime_cache" >&6; } | ||
| 15020 | if test $emacs_cv_localtime_cache = yes; then | ||
| 15021 | |||
| 15022 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h | ||
| 15023 | |||
| 15024 | fi | ||
| 15025 | |||
| 15026 | if test "x$HAVE_TIMEVAL" = xyes; then | ||
| 15027 | for ac_func in gettimeofday | ||
| 15028 | do : | ||
| 15029 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | ||
| 15030 | if test "x$ac_cv_func_gettimeofday" = x""yes; then : | ||
| 15031 | cat >>confdefs.h <<_ACEOF | ||
| 15032 | #define HAVE_GETTIMEOFDAY 1 | ||
| 15033 | _ACEOF | ||
| 15034 | |||
| 15035 | fi | ||
| 15036 | done | ||
| 15037 | |||
| 15038 | if test $ac_cv_func_gettimeofday = yes; then | ||
| 15039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | ||
| 15040 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | ||
| 15041 | if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : | ||
| 15042 | $as_echo_n "(cached) " >&6 | ||
| 15043 | else | ||
| 15044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15045 | /* end confdefs.h. */ | ||
| 15046 | |||
| 15047 | #ifdef TIME_WITH_SYS_TIME | ||
| 15048 | #include <sys/time.h> | ||
| 15049 | #include <time.h> | ||
| 15050 | #else | ||
| 15051 | #ifdef HAVE_SYS_TIME_H | ||
| 15052 | #include <sys/time.h> | ||
| 15053 | #else | ||
| 15054 | #include <time.h> | ||
| 15055 | #endif | ||
| 15056 | #endif | ||
| 15057 | int | ||
| 15058 | main () | ||
| 15059 | { | ||
| 15060 | struct timeval time; | ||
| 15061 | gettimeofday (&time, 0); | ||
| 15062 | ; | ||
| 15063 | return 0; | ||
| 15064 | } | ||
| 15065 | _ACEOF | ||
| 15066 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 15067 | emacs_cv_gettimeofday_two_arguments=yes | ||
| 15068 | else | ||
| 15069 | emacs_cv_gettimeofday_two_arguments=no | ||
| 15070 | fi | ||
| 15071 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 15072 | fi | ||
| 15073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 | ||
| 15074 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | ||
| 15075 | if test $emacs_cv_gettimeofday_two_arguments = no; then | ||
| 15076 | |||
| 15077 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h | ||
| 15078 | |||
| 15079 | fi | ||
| 15080 | fi | ||
| 15081 | fi | ||
| 15082 | |||
| 15083 | ok_so_far=yes | ||
| 15084 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | ||
| 15085 | if test "x$ac_cv_func_socket" = x""yes; then : | ||
| 15086 | |||
| 15087 | else | ||
| 15088 | ok_so_far=no | ||
| 15089 | fi | ||
| 15090 | |||
| 15091 | if test $ok_so_far = yes; then | ||
| 15092 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | ||
| 15093 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | ||
| 15094 | |||
| 15095 | else | ||
| 15096 | ok_so_far=no | ||
| 15097 | fi | ||
| 15098 | |||
| 15099 | |||
| 15100 | fi | ||
| 15101 | if test $ok_so_far = yes; then | ||
| 15102 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | ||
| 15103 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | ||
| 15104 | |||
| 15105 | else | ||
| 15106 | ok_so_far=no | ||
| 15107 | fi | ||
| 15108 | |||
| 15109 | |||
| 15110 | fi | ||
| 15111 | if test $ok_so_far = yes; then | ||
| 15112 | |||
| 15113 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h | ||
| 15114 | |||
| 15115 | fi | ||
| 15116 | |||
| 15117 | if test -f /usr/lpp/X11/bin/smt.exp; then | ||
| 15118 | |||
| 15119 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h | ||
| 15120 | |||
| 15121 | fi | ||
| 15122 | |||
| 15123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 | ||
| 15124 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | ||
| 15125 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | ||
| 15126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
| 15127 | $as_echo "yes" >&6; } | ||
| 15128 | |||
| 15129 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | ||
| 15130 | |||
| 15131 | else | ||
| 15132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 15133 | $as_echo "no" >&6; } | ||
| 15134 | fi | ||
| 15135 | |||
| 15136 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | ||
| 15137 | if test "x$ac_cv_type_pid_t" = x""yes; then : | ||
| 15138 | |||
| 15139 | else | ||
| 15140 | |||
| 15141 | cat >>confdefs.h <<_ACEOF | ||
| 15142 | #define pid_t int | ||
| 15143 | _ACEOF | ||
| 15144 | |||
| 15145 | fi | ||
| 15146 | |||
| 15147 | for ac_header in vfork.h | ||
| 15148 | do : | ||
| 15149 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | ||
| 15150 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | ||
| 15151 | cat >>confdefs.h <<_ACEOF | ||
| 15152 | #define HAVE_VFORK_H 1 | ||
| 15153 | _ACEOF | ||
| 15154 | |||
| 15155 | fi | ||
| 15156 | |||
| 15157 | done | ||
| 15158 | |||
| 15159 | for ac_func in fork vfork | ||
| 15160 | do : | ||
| 15161 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
| 15162 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | ||
| 15163 | eval as_val=\$$as_ac_var | ||
| 15164 | if test "x$as_val" = x""yes; then : | ||
| 15165 | cat >>confdefs.h <<_ACEOF | ||
| 15166 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
| 15167 | _ACEOF | ||
| 15168 | |||
| 15169 | fi | ||
| 15170 | done | ||
| 15171 | |||
| 15172 | if test "x$ac_cv_func_fork" = xyes; then | ||
| 15173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | ||
| 15174 | $as_echo_n "checking for working fork... " >&6; } | ||
| 15175 | if test "${ac_cv_func_fork_works+set}" = set; then : | ||
| 15176 | $as_echo_n "(cached) " >&6 | ||
| 15177 | else | ||
| 15178 | if test "$cross_compiling" = yes; then : | ||
| 15179 | ac_cv_func_fork_works=cross | ||
| 15180 | else | ||
| 15181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15182 | /* end confdefs.h. */ | ||
| 15183 | $ac_includes_default | ||
| 15184 | int | ||
| 15185 | main () | ||
| 15186 | { | ||
| 15187 | |||
| 15188 | /* By Ruediger Kuhlmann. */ | ||
| 15189 | return fork () < 0; | ||
| 15190 | |||
| 15191 | ; | ||
| 15192 | return 0; | ||
| 15193 | } | ||
| 15194 | _ACEOF | ||
| 15195 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 15196 | ac_cv_func_fork_works=yes | ||
| 15197 | else | ||
| 15198 | ac_cv_func_fork_works=no | ||
| 15199 | fi | ||
| 15200 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 15201 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 15202 | fi | ||
| 15203 | |||
| 15204 | fi | ||
| 15205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | ||
| 15206 | $as_echo "$ac_cv_func_fork_works" >&6; } | ||
| 15207 | |||
| 15208 | else | ||
| 15209 | ac_cv_func_fork_works=$ac_cv_func_fork | ||
| 15210 | fi | ||
| 15211 | if test "x$ac_cv_func_fork_works" = xcross; then | ||
| 15212 | case $host in | ||
| 15213 | *-*-amigaos* | *-*-msdosdjgpp*) | ||
| 15214 | # Override, as these systems have only a dummy fork() stub | ||
| 15215 | ac_cv_func_fork_works=no | ||
| 15216 | ;; | ||
| 15217 | *) | ||
| 15218 | ac_cv_func_fork_works=yes | ||
| 15219 | ;; | ||
| 15220 | esac | ||
| 15221 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | ||
| 15222 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | ||
| 15223 | fi | ||
| 15224 | ac_cv_func_vfork_works=$ac_cv_func_vfork | ||
| 15225 | if test "x$ac_cv_func_vfork" = xyes; then | ||
| 15226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | ||
| 15227 | $as_echo_n "checking for working vfork... " >&6; } | ||
| 15228 | if test "${ac_cv_func_vfork_works+set}" = set; then : | ||
| 15229 | $as_echo_n "(cached) " >&6 | ||
| 15230 | else | ||
| 15231 | if test "$cross_compiling" = yes; then : | ||
| 15232 | ac_cv_func_vfork_works=cross | ||
| 15233 | else | ||
| 15234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15235 | /* end confdefs.h. */ | ||
| 15236 | /* Thanks to Paul Eggert for this test. */ | ||
| 15237 | $ac_includes_default | ||
| 15238 | #include <sys/wait.h> | ||
| 15239 | #ifdef HAVE_VFORK_H | ||
| 15240 | # include <vfork.h> | ||
| 15241 | #endif | ||
| 15242 | /* On some sparc systems, changes by the child to local and incoming | ||
| 15243 | argument registers are propagated back to the parent. The compiler | ||
| 15244 | is told about this with #include <vfork.h>, but some compilers | ||
| 15245 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | ||
| 15246 | static variable whose address is put into a register that is | ||
| 15247 | clobbered by the vfork. */ | ||
| 15248 | static void | ||
| 15249 | #ifdef __cplusplus | ||
| 15250 | sparc_address_test (int arg) | ||
| 15251 | # else | ||
| 15252 | sparc_address_test (arg) int arg; | ||
| 15253 | #endif | ||
| 15254 | { | ||
| 15255 | static pid_t child; | ||
| 15256 | if (!child) { | ||
| 15257 | child = vfork (); | ||
| 15258 | if (child < 0) { | ||
| 15259 | perror ("vfork"); | ||
| 15260 | _exit(2); | ||
| 15261 | } | ||
| 15262 | if (!child) { | ||
| 15263 | arg = getpid(); | ||
| 15264 | write(-1, "", 0); | ||
| 15265 | _exit (arg); | ||
| 15266 | } | ||
| 15267 | } | ||
| 15268 | } | ||
| 15269 | |||
| 15270 | int | ||
| 15271 | main () | ||
| 15272 | { | ||
| 15273 | pid_t parent = getpid (); | ||
| 15274 | pid_t child; | ||
| 15275 | |||
| 15276 | sparc_address_test (0); | ||
| 15277 | |||
| 15278 | child = vfork (); | ||
| 15279 | |||
| 15280 | if (child == 0) { | ||
| 15281 | /* Here is another test for sparc vfork register problems. This | ||
| 15282 | test uses lots of local variables, at least as many local | ||
| 15283 | variables as main has allocated so far including compiler | ||
| 15284 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | ||
| 15285 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | ||
| 15286 | reuse the register of parent for one of the local variables, | ||
| 15287 | since it will think that parent can't possibly be used any more | ||
| 15288 | in this routine. Assigning to the local variable will thus | ||
| 15289 | munge parent in the parent process. */ | ||
| 15290 | pid_t | ||
| 15291 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | ||
| 15292 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | ||
| 15293 | /* Convince the compiler that p..p7 are live; otherwise, it might | ||
| 15294 | use the same hardware register for all 8 local variables. */ | ||
| 15295 | if (p != p1 || p != p2 || p != p3 || p != p4 | ||
| 15296 | || p != p5 || p != p6 || p != p7) | ||
| 15297 | _exit(1); | ||
| 15298 | |||
| 15299 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | ||
| 15300 | from child file descriptors. If the child closes a descriptor | ||
| 15301 | before it execs or exits, this munges the parent's descriptor | ||
| 15302 | as well. Test for this by closing stdout in the child. */ | ||
| 15303 | _exit(close(fileno(stdout)) != 0); | ||
| 15304 | } else { | ||
| 15305 | int status; | ||
| 15306 | struct stat st; | ||
| 15307 | |||
| 15308 | while (wait(&status) != child) | ||
| 15309 | ; | ||
| 15310 | return ( | ||
| 15311 | /* Was there some problem with vforking? */ | ||
| 15312 | child < 0 | ||
| 15313 | |||
| 15314 | /* Did the child fail? (This shouldn't happen.) */ | ||
| 15315 | || status | ||
| 15316 | |||
| 15317 | /* Did the vfork/compiler bug occur? */ | ||
| 15318 | || parent != getpid() | ||
| 15319 | |||
| 15320 | /* Did the file descriptor bug occur? */ | ||
| 15321 | || fstat(fileno(stdout), &st) != 0 | ||
| 15322 | ); | ||
| 15323 | } | ||
| 15324 | } | ||
| 15325 | _ACEOF | ||
| 15326 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 15327 | ac_cv_func_vfork_works=yes | ||
| 15328 | else | ||
| 15329 | ac_cv_func_vfork_works=no | ||
| 15330 | fi | ||
| 15331 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 15332 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 15333 | fi | ||
| 15334 | |||
| 15335 | fi | ||
| 15336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | ||
| 15337 | $as_echo "$ac_cv_func_vfork_works" >&6; } | ||
| 15338 | |||
| 15339 | fi; | ||
| 15340 | if test "x$ac_cv_func_fork_works" = xcross; then | ||
| 15341 | ac_cv_func_vfork_works=$ac_cv_func_vfork | ||
| 15342 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | ||
| 15343 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | ||
| 15344 | fi | ||
| 15345 | |||
| 15346 | if test "x$ac_cv_func_vfork_works" = xyes; then | ||
| 15347 | |||
| 15348 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | ||
| 15349 | |||
| 15350 | else | ||
| 15351 | |||
| 15352 | $as_echo "#define vfork fork" >>confdefs.h | ||
| 15353 | |||
| 15354 | fi | ||
| 15355 | if test "x$ac_cv_func_fork_works" = xyes; then | ||
| 15356 | |||
| 15357 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | ||
| 15358 | |||
| 15359 | fi | ||
| 15360 | |||
| 15361 | |||
| 15362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | ||
| 15363 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | ||
| 15364 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | ||
| 15365 | $as_echo_n "(cached) " >&6 | ||
| 15366 | else | ||
| 15367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15368 | /* end confdefs.h. */ | ||
| 15369 | #include <langinfo.h> | ||
| 15370 | int | ||
| 15371 | main () | ||
| 15372 | { | ||
| 15373 | char* cs = nl_langinfo(CODESET); | ||
| 15374 | ; | ||
| 15375 | return 0; | ||
| 15376 | } | ||
| 15377 | _ACEOF | ||
| 15378 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 15379 | emacs_cv_langinfo_codeset=yes | ||
| 15380 | else | ||
| 15381 | emacs_cv_langinfo_codeset=no | ||
| 15382 | fi | ||
| 15383 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 15384 | conftest$ac_exeext conftest.$ac_ext | ||
| 15385 | |||
| 15386 | fi | ||
| 15387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | ||
| 15388 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | ||
| 15389 | if test $emacs_cv_langinfo_codeset = yes; then | ||
| 15390 | |||
| 15391 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | ||
| 15392 | |||
| 15393 | fi | ||
| 15394 | |||
| 15395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 | ||
| 15396 | $as_echo_n "checking for mbstate_t... " >&6; } | ||
| 15397 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | ||
| 15398 | $as_echo_n "(cached) " >&6 | ||
| 15399 | else | ||
| 15400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15401 | /* end confdefs.h. */ | ||
| 15402 | $ac_includes_default | ||
| 15403 | # include <wchar.h> | ||
| 15404 | int | ||
| 15405 | main () | ||
| 15406 | { | ||
| 15407 | mbstate_t x; return sizeof x; | ||
| 15408 | ; | ||
| 15409 | return 0; | ||
| 15410 | } | ||
| 15411 | _ACEOF | ||
| 15412 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 15413 | ac_cv_type_mbstate_t=yes | ||
| 15414 | else | ||
| 15415 | ac_cv_type_mbstate_t=no | ||
| 15416 | fi | ||
| 15417 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 15418 | fi | ||
| 15419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | ||
| 15420 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | ||
| 15421 | if test $ac_cv_type_mbstate_t = yes; then | ||
| 15422 | |||
| 15423 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h | ||
| 15424 | |||
| 15425 | else | ||
| 15426 | |||
| 15427 | $as_echo "#define mbstate_t int" >>confdefs.h | ||
| 15428 | |||
| 15429 | fi | ||
| 15430 | |||
| 15431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 | ||
| 15432 | $as_echo_n "checking for C restricted array declarations... " >&6; } | ||
| 15433 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | ||
| 15434 | $as_echo_n "(cached) " >&6 | ||
| 15435 | else | ||
| 15436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15437 | /* end confdefs.h. */ | ||
| 15438 | void fred (int x[__restrict]); | ||
| 15439 | int | ||
| 15440 | main () | ||
| 15441 | { | ||
| 15442 | |||
| 15443 | ; | ||
| 15444 | return 0; | ||
| 15445 | } | ||
| 15446 | _ACEOF | ||
| 15447 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 15448 | emacs_cv_c_restrict_arr=yes | ||
| 15449 | else | ||
| 15450 | emacs_cv_c_restrict_arr=no | ||
| 15451 | fi | ||
| 15452 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 15453 | fi | ||
| 15454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | ||
| 15455 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | ||
| 15456 | if test "$emacs_cv_c_restrict_arr" = yes; then | ||
| 15457 | |||
| 15458 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h | ||
| 15459 | |||
| 15460 | fi | ||
| 15461 | |||
| 15462 | |||
| 15463 | |||
| 15464 | # Set up the CFLAGS for real compilation, so we can substitute it. | ||
| 15465 | CFLAGS="$REAL_CFLAGS" | ||
| 15466 | CPPFLAGS="$REAL_CPPFLAGS" | ||
| 15467 | |||
| 15468 | ## Hack to detect a buggy GCC version. | ||
| 15469 | if test "x$GCC" = xyes \ | ||
| 15470 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | ||
| 15471 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | ||
| 15472 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | ||
| 15473 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | ||
| 15474 | fi | ||
| 15475 | |||
| 15476 | version=$PACKAGE_VERSION | ||
| 15477 | |||
| 15478 | ### Specify what sort of things we'll be editing into Makefile and config.h. | ||
| 15479 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | ||
| 15480 | |||
| 15481 | |||
| 15482 | ## Unused? | ||
| 15483 | |||
| 15484 | |||
| 15485 | |||
| 15486 | |||
| 15487 | |||
| 15488 | |||
| 15489 | |||
| 15490 | |||
| 15491 | |||
| 15492 | |||
| 15493 | |||
| 15494 | |||
| 15495 | |||
| 15496 | |||
| 15497 | |||
| 15498 | |||
| 15499 | |||
| 15500 | |||
| 15501 | |||
| 15502 | |||
| 15503 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. | ||
| 15504 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | ||
| 15505 | ## end of LIBX_BASE, but nothing ever set it. | ||
| 15506 | |||
| 15507 | |||
| 15508 | |||
| 15509 | |||
| 15510 | ## Used in lwlib/Makefile.in. | ||
| 15511 | |||
| 15512 | if test -n "${machfile}"; then | ||
| 15513 | M_FILE="\$(srcdir)/${machfile}" | ||
| 15514 | else | ||
| 15515 | M_FILE= | ||
| 15516 | fi | ||
| 15517 | S_FILE="\$(srcdir)/${opsysfile}" | ||
| 15518 | |||
| 15519 | |||
| 15520 | |||
| 15521 | |||
| 15522 | |||
| 15523 | |||
| 15524 | |||
| 15525 | |||
| 15526 | |||
| 15527 | |||
| 15528 | cat >>confdefs.h <<_ACEOF | ||
| 15529 | #define EMACS_CONFIGURATION "${canonical}" | ||
| 15530 | _ACEOF | ||
| 15531 | |||
| 15532 | |||
| 15533 | cat >>confdefs.h <<_ACEOF | ||
| 15534 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | ||
| 15535 | _ACEOF | ||
| 15536 | |||
| 15537 | if test -n "$machfile"; then | ||
| 15538 | |||
| 15539 | cat >>confdefs.h <<_ACEOF | ||
| 15540 | #define config_machfile "${machfile}" | ||
| 15541 | _ACEOF | ||
| 15542 | |||
| 15543 | fi | ||
| 15544 | |||
| 15545 | cat >>confdefs.h <<_ACEOF | ||
| 15546 | #define config_opsysfile "${opsysfile}" | ||
| 15547 | _ACEOF | ||
| 15548 | |||
| 15549 | |||
| 15550 | XMENU_OBJ= | ||
| 15551 | XOBJ= | ||
| 15552 | FONT_OBJ= | ||
| 15553 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | ||
| 15554 | |||
| 15555 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | ||
| 15556 | |||
| 15557 | XMENU_OBJ=xmenu.o | ||
| 15558 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | ||
| 15559 | FONT_OBJ=xfont.o | ||
| 15560 | if test "$HAVE_XFT" = "yes"; then | ||
| 15561 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | ||
| 15562 | elif test "$HAVE_FREETYPE" = "yes"; then | ||
| 15563 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | ||
| 15564 | fi | ||
| 15565 | |||
| 15566 | fi | ||
| 15567 | |||
| 15568 | |||
| 15569 | |||
| 15570 | |||
| 15571 | WIDGET_OBJ= | ||
| 15572 | MOTIF_LIBW= | ||
| 15573 | if test "${USE_X_TOOLKIT}" != "none" ; then | ||
| 15574 | WIDGET_OBJ=widget.o | ||
| 15575 | |||
| 15576 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | ||
| 15577 | |||
| 15578 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | ||
| 15579 | |||
| 15580 | $as_echo "#define USE_LUCID 1" >>confdefs.h | ||
| 15581 | |||
| 15582 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then | ||
| 15583 | |||
| 15584 | $as_echo "#define USE_MOTIF 1" >>confdefs.h | ||
| 15585 | |||
| 15586 | MOTIF_LIBW=-lXm | ||
| 15587 | case "$opsys" in | ||
| 15588 | gnu-linux) | ||
| 15589 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | ||
| 15590 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | ||
| 15591 | ;; | ||
| 15592 | |||
| 15593 | unixware) | ||
| 15594 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | ||
| 15595 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | ||
| 15596 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | ||
| 15597 | ;; | ||
| 15598 | |||
| 15599 | aix4-2) | ||
| 15600 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | ||
| 15601 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | ||
| 15602 | ;; | ||
| 15603 | esac | ||
| 15604 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | ||
| 15605 | fi | ||
| 15606 | fi | ||
| 15607 | |||
| 15608 | |||
| 15609 | TOOLKIT_LIBW= | ||
| 15610 | case "$USE_X_TOOLKIT" in | ||
| 15611 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | ||
| 15612 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | ||
| 15613 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | ||
| 15614 | esac | ||
| 15615 | |||
| 15616 | |||
| 15617 | if test "$USE_X_TOOLKIT" = "none"; then | ||
| 15618 | LIBXT_OTHER="\$(LIBXSM)" | ||
| 15619 | OLDXMENU_TARGET="really-oldXMenu" | ||
| 15620 | else | ||
| 15621 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | ||
| 15622 | OLDXMENU_TARGET="really-lwlib" | ||
| 15623 | fi | ||
| 15624 | |||
| 15625 | |||
| 15626 | ## The X Menu stuff is present in the X10 distribution, but missing | ||
| 15627 | ## from X11. If we have X10, just use the installed library; | ||
| 15628 | ## otherwise, use our own copy. | ||
| 15629 | if test "${HAVE_X11}" = "yes" ; then | ||
| 15630 | |||
| 15631 | $as_echo "#define HAVE_X11 1" >>confdefs.h | ||
| 15632 | |||
| 15633 | |||
| 15634 | if test "$USE_X_TOOLKIT" = "none"; then | ||
| 15635 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | ||
| 15636 | else | ||
| 15637 | OLDXMENU="\${lwlibdir}/liblw.a" | ||
| 15638 | fi | ||
| 15639 | LIBXMENU="\$(OLDXMENU)" | ||
| 15640 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | ||
| 15641 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | ||
| 15642 | else | ||
| 15643 | ## For a syntactically valid Makefile; not actually used for anything. | ||
| 15644 | ## See comments in src/Makefile.in. | ||
| 15645 | OLDXMENU=nothing | ||
| 15646 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | ||
| 15647 | if test "${HAVE_X_WINDOWS}" = "yes"; then | ||
| 15648 | LIBXMENU="-lXMenu" | ||
| 15649 | else | ||
| 15650 | LIBXMENU= | ||
| 15651 | fi | ||
| 15652 | LIBX_OTHER= | ||
| 15653 | OLDXMENU_DEPS= | ||
| 15654 | fi | ||
| 15655 | |||
| 15656 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | ||
| 15657 | OLDXMENU_TARGET= | ||
| 15658 | OLDXMENU=nothing | ||
| 15659 | LIBXMENU= | ||
| 15660 | OLDXMENU_DEPS= | ||
| 15661 | fi | ||
| 15662 | |||
| 15663 | |||
| 15664 | |||
| 15665 | |||
| 15666 | |||
| 15667 | |||
| 15668 | |||
| 15669 | if test "${HAVE_MENUS}" = "yes" ; then | ||
| 15670 | |||
| 15671 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | ||
| 15672 | |||
| 15673 | fi | ||
| 15674 | |||
| 15675 | if test "${GNU_MALLOC}" = "yes" ; then | ||
| 15676 | |||
| 15677 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h | ||
| 15678 | |||
| 15679 | fi | ||
| 15680 | |||
| 15681 | RALLOC_OBJ= | ||
| 15682 | if test "${REL_ALLOC}" = "yes" ; then | ||
| 15683 | |||
| 15684 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | ||
| 15685 | |||
| 15686 | |||
| 15687 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | ||
| 15688 | fi | ||
| 15689 | |||
| 15690 | |||
| 15691 | if test "$opsys" = "cygwin"; then | ||
| 15692 | CYGWIN_OBJ="sheap.o" | ||
| 15693 | ## Cygwin differs because of its unexec(). | ||
| 15694 | PRE_ALLOC_OBJ= | ||
| 15695 | POST_ALLOC_OBJ=lastfile.o | ||
| 15696 | else | ||
| 15697 | CYGWIN_OBJ= | ||
| 15698 | PRE_ALLOC_OBJ=lastfile.o | ||
| 15699 | POST_ALLOC_OBJ= | ||
| 15700 | fi | ||
| 15701 | |||
| 15702 | |||
| 15703 | |||
| 15704 | |||
| 15705 | # Configure gnulib here, now that we know LIBS. | ||
| 13919 | 15706 | ||
| 13920 | 15707 | ||
| 13921 | 15708 | ||
| @@ -16308,6 +18095,48 @@ _ACEOF | |||
| 16308 | 18095 | ||
| 16309 | 18096 | ||
| 16310 | 18097 | ||
| 18098 | GNULIB_PTHREAD_SIGMASK=0; | ||
| 18099 | GNULIB_SIGNAL_H_SIGPIPE=0; | ||
| 18100 | GNULIB_SIGPROCMASK=0; | ||
| 18101 | GNULIB_SIGACTION=0; | ||
| 18102 | HAVE_POSIX_SIGNALBLOCKING=1; | ||
| 18103 | HAVE_PTHREAD_SIGMASK=1; | ||
| 18104 | HAVE_SIGSET_T=1; | ||
| 18105 | HAVE_SIGINFO_T=1; | ||
| 18106 | HAVE_SIGACTION=1; | ||
| 18107 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | ||
| 18108 | |||
| 18109 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; | ||
| 18110 | |||
| 18111 | HAVE_SIGHANDLER_T=1; | ||
| 18112 | REPLACE_PTHREAD_SIGMASK=0; | ||
| 18113 | |||
| 18114 | |||
| 18115 | |||
| 18116 | |||
| 18117 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " | ||
| 18118 | #include <signal.h> | ||
| 18119 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | ||
| 18120 | #include <sys/types.h> | ||
| 18121 | |||
| 18122 | " | ||
| 18123 | if test "x$ac_cv_type_sigset_t" = x""yes; then : | ||
| 18124 | |||
| 18125 | cat >>confdefs.h <<_ACEOF | ||
| 18126 | #define HAVE_SIGSET_T 1 | ||
| 18127 | _ACEOF | ||
| 18128 | |||
| 18129 | gl_cv_type_sigset_t=yes | ||
| 18130 | else | ||
| 18131 | gl_cv_type_sigset_t=no | ||
| 18132 | fi | ||
| 18133 | |||
| 18134 | if test $gl_cv_type_sigset_t != yes; then | ||
| 18135 | HAVE_SIGSET_T=0 | ||
| 18136 | fi | ||
| 18137 | |||
| 18138 | |||
| 18139 | |||
| 16311 | 18140 | ||
| 16312 | 18141 | ||
| 16313 | if test $ac_cv_header_sys_socket_h = no; then | 18142 | if test $ac_cv_header_sys_socket_h = no; then |
| @@ -16560,6 +18389,17 @@ fi | |||
| 16560 | 18389 | ||
| 16561 | 18390 | ||
| 16562 | 18391 | ||
| 18392 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" | ||
| 18393 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | ||
| 18394 | ac_have_decl=1 | ||
| 18395 | else | ||
| 18396 | ac_have_decl=0 | ||
| 18397 | fi | ||
| 18398 | |||
| 18399 | cat >>confdefs.h <<_ACEOF | ||
| 18400 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | ||
| 18401 | _ACEOF | ||
| 18402 | |||
| 16563 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" | 18403 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" |
| 16564 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | 18404 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : |
| 16565 | ac_have_decl=1 | 18405 | ac_have_decl=1 |
| @@ -17963,6 +19803,99 @@ fi | |||
| 17963 | 19803 | ||
| 17964 | 19804 | ||
| 17965 | 19805 | ||
| 19806 | LIB_PTHREAD_SIGMASK= | ||
| 19807 | if test $ac_cv_func_pthread_sigmask != yes; then | ||
| 19808 | gl_save_LIBS=$LIBS | ||
| 19809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 | ||
| 19810 | $as_echo_n "checking for library containing pthread_sigmask... " >&6; } | ||
| 19811 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | ||
| 19812 | $as_echo_n "(cached) " >&6 | ||
| 19813 | else | ||
| 19814 | ac_func_search_save_LIBS=$LIBS | ||
| 19815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19816 | /* end confdefs.h. */ | ||
| 19817 | |||
| 19818 | /* Override any GCC internal prototype to avoid an error. | ||
| 19819 | Use char because int might match the return type of a GCC | ||
| 19820 | builtin and then its argument prototype would still apply. */ | ||
| 19821 | #ifdef __cplusplus | ||
| 19822 | extern "C" | ||
| 19823 | #endif | ||
| 19824 | char pthread_sigmask (); | ||
| 19825 | int | ||
| 19826 | main () | ||
| 19827 | { | ||
| 19828 | return pthread_sigmask (); | ||
| 19829 | ; | ||
| 19830 | return 0; | ||
| 19831 | } | ||
| 19832 | _ACEOF | ||
| 19833 | for ac_lib in '' pthread c_r; do | ||
| 19834 | if test -z "$ac_lib"; then | ||
| 19835 | ac_res="none required" | ||
| 19836 | else | ||
| 19837 | ac_res=-l$ac_lib | ||
| 19838 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 19839 | fi | ||
| 19840 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19841 | ac_cv_search_pthread_sigmask=$ac_res | ||
| 19842 | fi | ||
| 19843 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19844 | conftest$ac_exeext | ||
| 19845 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | ||
| 19846 | break | ||
| 19847 | fi | ||
| 19848 | done | ||
| 19849 | if test "${ac_cv_search_pthread_sigmask+set}" = set; then : | ||
| 19850 | |||
| 19851 | else | ||
| 19852 | ac_cv_search_pthread_sigmask=no | ||
| 19853 | fi | ||
| 19854 | rm conftest.$ac_ext | ||
| 19855 | LIBS=$ac_func_search_save_LIBS | ||
| 19856 | fi | ||
| 19857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 | ||
| 19858 | $as_echo "$ac_cv_search_pthread_sigmask" >&6; } | ||
| 19859 | ac_res=$ac_cv_search_pthread_sigmask | ||
| 19860 | if test "$ac_res" != no; then : | ||
| 19861 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 19862 | |||
| 19863 | fi | ||
| 19864 | |||
| 19865 | LIBS=$gl_save_LIBS | ||
| 19866 | if test "$ac_cv_search_pthread_sigmask" = no; then | ||
| 19867 | HAVE_PTHREAD_SIGMASK=0 | ||
| 19868 | elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then | ||
| 19869 | LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask | ||
| 19870 | fi | ||
| 19871 | fi | ||
| 19872 | |||
| 19873 | |||
| 19874 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then | ||
| 19875 | |||
| 19876 | |||
| 19877 | |||
| 19878 | |||
| 19879 | |||
| 19880 | |||
| 19881 | |||
| 19882 | |||
| 19883 | gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" | ||
| 19884 | |||
| 19885 | fi | ||
| 19886 | |||
| 19887 | |||
| 19888 | |||
| 19889 | |||
| 19890 | |||
| 19891 | GNULIB_PTHREAD_SIGMASK=1 | ||
| 19892 | |||
| 19893 | |||
| 19894 | |||
| 19895 | |||
| 19896 | |||
| 19897 | |||
| 19898 | |||
| 17966 | 19899 | ||
| 17967 | if test $ac_cv_func_readlink = no; then | 19900 | if test $ac_cv_func_readlink = no; then |
| 17968 | HAVE_READLINK=0 | 19901 | HAVE_READLINK=0 |
| @@ -18067,6 +20000,92 @@ fi | |||
| 18067 | 20000 | ||
| 18068 | 20001 | ||
| 18069 | 20002 | ||
| 20003 | |||
| 20004 | |||
| 20005 | |||
| 20006 | |||
| 20007 | |||
| 20008 | |||
| 20009 | |||
| 20010 | |||
| 20011 | |||
| 20012 | |||
| 20013 | |||
| 20014 | if test $gl_cv_have_include_next = yes; then | ||
| 20015 | gl_cv_next_signal_h='<'signal.h'>' | ||
| 20016 | else | ||
| 20017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 | ||
| 20018 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | ||
| 20019 | if test "${gl_cv_next_signal_h+set}" = set; then : | ||
| 20020 | $as_echo_n "(cached) " >&6 | ||
| 20021 | else | ||
| 20022 | |||
| 20023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20024 | /* end confdefs.h. */ | ||
| 20025 | #include <signal.h> | ||
| 20026 | |||
| 20027 | _ACEOF | ||
| 20028 | case "$host_os" in | ||
| 20029 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | ||
| 20030 | *) gl_absname_cpp="$ac_cpp" ;; | ||
| 20031 | esac | ||
| 20032 | gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | ||
| 20033 | sed -n '\#/signal.h#{ | ||
| 20034 | s#.*"\(.*/signal.h\)".*#\1# | ||
| 20035 | s#^/[^/]#//&# | ||
| 20036 | p | ||
| 20037 | q | ||
| 20038 | }'`'"' | ||
| 20039 | |||
| 20040 | |||
| 20041 | fi | ||
| 20042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 | ||
| 20043 | $as_echo "$gl_cv_next_signal_h" >&6; } | ||
| 20044 | fi | ||
| 20045 | NEXT_SIGNAL_H=$gl_cv_next_signal_h | ||
| 20046 | |||
| 20047 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | ||
| 20048 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | ||
| 20049 | gl_next_as_first_directive='<'signal.h'>' | ||
| 20050 | else | ||
| 20051 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | ||
| 20052 | gl_next_as_first_directive=$gl_cv_next_signal_h | ||
| 20053 | fi | ||
| 20054 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive | ||
| 20055 | |||
| 20056 | |||
| 20057 | |||
| 20058 | |||
| 20059 | |||
| 20060 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers | ||
| 20061 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | ||
| 20062 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | ||
| 20063 | #include <signal.h> | ||
| 20064 | |||
| 20065 | " | ||
| 20066 | if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : | ||
| 20067 | |||
| 20068 | else | ||
| 20069 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | ||
| 20070 | fi | ||
| 20071 | |||
| 20072 | |||
| 20073 | |||
| 20074 | |||
| 20075 | |||
| 20076 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " | ||
| 20077 | #include <signal.h> | ||
| 20078 | |||
| 20079 | " | ||
| 20080 | if test "x$ac_cv_type_sighandler_t" = x""yes; then : | ||
| 20081 | |||
| 20082 | else | ||
| 20083 | HAVE_SIGHANDLER_T=0 | ||
| 20084 | fi | ||
| 20085 | |||
| 20086 | |||
| 20087 | |||
| 20088 | |||
| 18070 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " | 20089 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
| 18071 | /* <sys/types.h> is not needed according to POSIX, but the | 20090 | /* <sys/types.h> is not needed according to POSIX, but the |
| 18072 | <sys/socket.h> in i386-unknown-freebsd4.10 and | 20091 | <sys/socket.h> in i386-unknown-freebsd4.10 and |
| @@ -18618,6 +20637,62 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h | |||
| 18618 | 20637 | ||
| 18619 | 20638 | ||
| 18620 | 20639 | ||
| 20640 | if test "$ac_cv_have_decl_strtoimax" != yes; then | ||
| 20641 | HAVE_DECL_STRTOIMAX=0 | ||
| 20642 | |||
| 20643 | for ac_func in strtoimax | ||
| 20644 | do : | ||
| 20645 | ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" | ||
| 20646 | if test "x$ac_cv_func_strtoimax" = x""yes; then : | ||
| 20647 | cat >>confdefs.h <<_ACEOF | ||
| 20648 | #define HAVE_STRTOIMAX 1 | ||
| 20649 | _ACEOF | ||
| 20650 | |||
| 20651 | fi | ||
| 20652 | done | ||
| 20653 | |||
| 20654 | fi | ||
| 20655 | |||
| 20656 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then | ||
| 20657 | |||
| 20658 | |||
| 20659 | |||
| 20660 | |||
| 20661 | |||
| 20662 | |||
| 20663 | |||
| 20664 | |||
| 20665 | gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" | ||
| 20666 | |||
| 20667 | |||
| 20668 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | ||
| 20669 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | ||
| 20670 | ac_have_decl=1 | ||
| 20671 | else | ||
| 20672 | ac_have_decl=0 | ||
| 20673 | fi | ||
| 20674 | |||
| 20675 | cat >>confdefs.h <<_ACEOF | ||
| 20676 | #define HAVE_DECL_STRTOLL $ac_have_decl | ||
| 20677 | _ACEOF | ||
| 20678 | |||
| 20679 | |||
| 20680 | |||
| 20681 | fi | ||
| 20682 | |||
| 20683 | |||
| 20684 | |||
| 20685 | |||
| 20686 | |||
| 20687 | GNULIB_STRTOIMAX=1 | ||
| 20688 | |||
| 20689 | |||
| 20690 | |||
| 20691 | |||
| 20692 | |||
| 20693 | |||
| 20694 | |||
| 20695 | |||
| 18621 | if test "$ac_cv_have_decl_strtoumax" != yes; then | 20696 | if test "$ac_cv_have_decl_strtoumax" != yes; then |
| 18622 | HAVE_DECL_STRTOUMAX=0 | 20697 | HAVE_DECL_STRTOUMAX=0 |
| 18623 | 20698 | ||
| @@ -18990,7 +21065,9 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } | |||
| 18990 | 21065 | ||
| 18991 | gl_gnulib_enabled_dosname=false | 21066 | gl_gnulib_enabled_dosname=false |
| 18992 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false | 21067 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false |
| 21068 | gl_gnulib_enabled_sigprocmask=false | ||
| 18993 | gl_gnulib_enabled_stat=false | 21069 | gl_gnulib_enabled_stat=false |
| 21070 | gl_gnulib_enabled_strtoll=false | ||
| 18994 | gl_gnulib_enabled_strtoull=false | 21071 | gl_gnulib_enabled_strtoull=false |
| 18995 | gl_gnulib_enabled_verify=false | 21072 | gl_gnulib_enabled_verify=false |
| 18996 | func_gl_gnulib_m4code_dosname () | 21073 | func_gl_gnulib_m4code_dosname () |
| @@ -19007,6 +21084,50 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } | |||
| 19007 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true | 21084 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true |
| 19008 | fi | 21085 | fi |
| 19009 | } | 21086 | } |
| 21087 | func_gl_gnulib_m4code_sigprocmask () | ||
| 21088 | { | ||
| 21089 | if ! $gl_gnulib_enabled_sigprocmask; then | ||
| 21090 | |||
| 21091 | |||
| 21092 | |||
| 21093 | if test $gl_cv_type_sigset_t = yes; then | ||
| 21094 | ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" | ||
| 21095 | if test "x$ac_cv_func_sigprocmask" = x""yes; then : | ||
| 21096 | gl_cv_func_sigprocmask=1 | ||
| 21097 | fi | ||
| 21098 | |||
| 21099 | fi | ||
| 21100 | if test -z "$gl_cv_func_sigprocmask"; then | ||
| 21101 | HAVE_POSIX_SIGNALBLOCKING=0 | ||
| 21102 | fi | ||
| 21103 | |||
| 21104 | if test $HAVE_POSIX_SIGNALBLOCKING = 0; then | ||
| 21105 | |||
| 21106 | |||
| 21107 | |||
| 21108 | |||
| 21109 | |||
| 21110 | |||
| 21111 | |||
| 21112 | |||
| 21113 | gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" | ||
| 21114 | |||
| 21115 | : | ||
| 21116 | fi | ||
| 21117 | |||
| 21118 | |||
| 21119 | |||
| 21120 | |||
| 21121 | |||
| 21122 | GNULIB_SIGPROCMASK=1 | ||
| 21123 | |||
| 21124 | |||
| 21125 | |||
| 21126 | |||
| 21127 | |||
| 21128 | gl_gnulib_enabled_sigprocmask=true | ||
| 21129 | fi | ||
| 21130 | } | ||
| 19010 | func_gl_gnulib_m4code_stat () | 21131 | func_gl_gnulib_m4code_stat () |
| 19011 | { | 21132 | { |
| 19012 | if ! $gl_gnulib_enabled_stat; then | 21133 | if ! $gl_gnulib_enabled_stat; then |
| @@ -19144,6 +21265,58 @@ fi | |||
| 19144 | fi | 21265 | fi |
| 19145 | fi | 21266 | fi |
| 19146 | } | 21267 | } |
| 21268 | func_gl_gnulib_m4code_strtoll () | ||
| 21269 | { | ||
| 21270 | if ! $gl_gnulib_enabled_strtoll; then | ||
| 21271 | |||
| 21272 | |||
| 21273 | |||
| 21274 | if test "$ac_cv_type_long_long_int" = yes; then | ||
| 21275 | for ac_func in strtoll | ||
| 21276 | do : | ||
| 21277 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | ||
| 21278 | if test "x$ac_cv_func_strtoll" = x""yes; then : | ||
| 21279 | cat >>confdefs.h <<_ACEOF | ||
| 21280 | #define HAVE_STRTOLL 1 | ||
| 21281 | _ACEOF | ||
| 21282 | |||
| 21283 | fi | ||
| 21284 | done | ||
| 21285 | |||
| 21286 | if test $ac_cv_func_strtoll = no; then | ||
| 21287 | HAVE_STRTOLL=0 | ||
| 21288 | fi | ||
| 21289 | fi | ||
| 21290 | |||
| 21291 | if test $HAVE_STRTOLL = 0; then | ||
| 21292 | |||
| 21293 | |||
| 21294 | |||
| 21295 | |||
| 21296 | |||
| 21297 | |||
| 21298 | |||
| 21299 | |||
| 21300 | gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" | ||
| 21301 | |||
| 21302 | |||
| 21303 | : | ||
| 21304 | |||
| 21305 | fi | ||
| 21306 | |||
| 21307 | |||
| 21308 | |||
| 21309 | |||
| 21310 | |||
| 21311 | GNULIB_STRTOLL=1 | ||
| 21312 | |||
| 21313 | |||
| 21314 | |||
| 21315 | |||
| 21316 | |||
| 21317 | gl_gnulib_enabled_strtoll=true | ||
| 21318 | fi | ||
| 21319 | } | ||
| 19147 | func_gl_gnulib_m4code_strtoull () | 21320 | func_gl_gnulib_m4code_strtoull () |
| 19148 | { | 21321 | { |
| 19149 | if ! $gl_gnulib_enabled_strtoull; then | 21322 | if ! $gl_gnulib_enabled_strtoull; then |
| @@ -19211,9 +21384,18 @@ fi | |||
| 19211 | if test $REPLACE_LSTAT = 1; then | 21384 | if test $REPLACE_LSTAT = 1; then |
| 19212 | func_gl_gnulib_m4code_stat | 21385 | func_gl_gnulib_m4code_stat |
| 19213 | fi | 21386 | fi |
| 21387 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then | ||
| 21388 | func_gl_gnulib_m4code_sigprocmask | ||
| 21389 | fi | ||
| 19214 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | 21390 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
| 19215 | func_gl_gnulib_m4code_stat | 21391 | func_gl_gnulib_m4code_stat |
| 19216 | fi | 21392 | fi |
| 21393 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then | ||
| 21394 | func_gl_gnulib_m4code_verify | ||
| 21395 | fi | ||
| 21396 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then | ||
| 21397 | func_gl_gnulib_m4code_strtoll | ||
| 21398 | fi | ||
| 19217 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then | 21399 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then |
| 19218 | func_gl_gnulib_m4code_verify | 21400 | func_gl_gnulib_m4code_verify |
| 19219 | fi | 21401 | fi |
| @@ -19237,6 +21419,14 @@ else | |||
| 19237 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= | 21419 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= |
| 19238 | fi | 21420 | fi |
| 19239 | 21421 | ||
| 21422 | if $gl_gnulib_enabled_sigprocmask; then | ||
| 21423 | gl_GNULIB_ENABLED_sigprocmask_TRUE= | ||
| 21424 | gl_GNULIB_ENABLED_sigprocmask_FALSE='#' | ||
| 21425 | else | ||
| 21426 | gl_GNULIB_ENABLED_sigprocmask_TRUE='#' | ||
| 21427 | gl_GNULIB_ENABLED_sigprocmask_FALSE= | ||
| 21428 | fi | ||
| 21429 | |||
| 19240 | if $gl_gnulib_enabled_stat; then | 21430 | if $gl_gnulib_enabled_stat; then |
| 19241 | gl_GNULIB_ENABLED_stat_TRUE= | 21431 | gl_GNULIB_ENABLED_stat_TRUE= |
| 19242 | gl_GNULIB_ENABLED_stat_FALSE='#' | 21432 | gl_GNULIB_ENABLED_stat_FALSE='#' |
| @@ -19245,6 +21435,14 @@ else | |||
| 19245 | gl_GNULIB_ENABLED_stat_FALSE= | 21435 | gl_GNULIB_ENABLED_stat_FALSE= |
| 19246 | fi | 21436 | fi |
| 19247 | 21437 | ||
| 21438 | if $gl_gnulib_enabled_strtoll; then | ||
| 21439 | gl_GNULIB_ENABLED_strtoll_TRUE= | ||
| 21440 | gl_GNULIB_ENABLED_strtoll_FALSE='#' | ||
| 21441 | else | ||
| 21442 | gl_GNULIB_ENABLED_strtoll_TRUE='#' | ||
| 21443 | gl_GNULIB_ENABLED_strtoll_FALSE= | ||
| 21444 | fi | ||
| 21445 | |||
| 19248 | if $gl_gnulib_enabled_strtoull; then | 21446 | if $gl_gnulib_enabled_strtoull; then |
| 19249 | gl_GNULIB_ENABLED_strtoull_TRUE= | 21447 | gl_GNULIB_ENABLED_strtoull_TRUE= |
| 19250 | gl_GNULIB_ENABLED_strtoull_FALSE='#' | 21448 | gl_GNULIB_ENABLED_strtoull_FALSE='#' |
| @@ -19302,1766 +21500,6 @@ fi | |||
| 19302 | 21500 | ||
| 19303 | 21501 | ||
| 19304 | 21502 | ||
| 19305 | # UNIX98 PTYs. | ||
| 19306 | for ac_func in grantpt | ||
| 19307 | do : | ||
| 19308 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | ||
| 19309 | if test "x$ac_cv_func_grantpt" = x""yes; then : | ||
| 19310 | cat >>confdefs.h <<_ACEOF | ||
| 19311 | #define HAVE_GRANTPT 1 | ||
| 19312 | _ACEOF | ||
| 19313 | |||
| 19314 | fi | ||
| 19315 | done | ||
| 19316 | |||
| 19317 | |||
| 19318 | # PTY-related GNU extensions. | ||
| 19319 | for ac_func in getpt | ||
| 19320 | do : | ||
| 19321 | ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" | ||
| 19322 | if test "x$ac_cv_func_getpt" = x""yes; then : | ||
| 19323 | cat >>confdefs.h <<_ACEOF | ||
| 19324 | #define HAVE_GETPT 1 | ||
| 19325 | _ACEOF | ||
| 19326 | |||
| 19327 | fi | ||
| 19328 | done | ||
| 19329 | |||
| 19330 | |||
| 19331 | # Check this now, so that we will NOT find the above functions in ncurses. | ||
| 19332 | # That is because we have not set up to link ncurses in lib-src. | ||
| 19333 | # It's better to believe a function is not available | ||
| 19334 | # than to expect to find it in ncurses. | ||
| 19335 | # Also we need tputs and friends to be able to build at all. | ||
| 19336 | have_tputs_et_al=true | ||
| 19337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | ||
| 19338 | $as_echo_n "checking for library containing tputs... " >&6; } | ||
| 19339 | if test "${ac_cv_search_tputs+set}" = set; then : | ||
| 19340 | $as_echo_n "(cached) " >&6 | ||
| 19341 | else | ||
| 19342 | ac_func_search_save_LIBS=$LIBS | ||
| 19343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19344 | /* end confdefs.h. */ | ||
| 19345 | |||
| 19346 | /* Override any GCC internal prototype to avoid an error. | ||
| 19347 | Use char because int might match the return type of a GCC | ||
| 19348 | builtin and then its argument prototype would still apply. */ | ||
| 19349 | #ifdef __cplusplus | ||
| 19350 | extern "C" | ||
| 19351 | #endif | ||
| 19352 | char tputs (); | ||
| 19353 | int | ||
| 19354 | main () | ||
| 19355 | { | ||
| 19356 | return tputs (); | ||
| 19357 | ; | ||
| 19358 | return 0; | ||
| 19359 | } | ||
| 19360 | _ACEOF | ||
| 19361 | for ac_lib in '' ncurses terminfo termcap; do | ||
| 19362 | if test -z "$ac_lib"; then | ||
| 19363 | ac_res="none required" | ||
| 19364 | else | ||
| 19365 | ac_res=-l$ac_lib | ||
| 19366 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 19367 | fi | ||
| 19368 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19369 | ac_cv_search_tputs=$ac_res | ||
| 19370 | fi | ||
| 19371 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19372 | conftest$ac_exeext | ||
| 19373 | if test "${ac_cv_search_tputs+set}" = set; then : | ||
| 19374 | break | ||
| 19375 | fi | ||
| 19376 | done | ||
| 19377 | if test "${ac_cv_search_tputs+set}" = set; then : | ||
| 19378 | |||
| 19379 | else | ||
| 19380 | ac_cv_search_tputs=no | ||
| 19381 | fi | ||
| 19382 | rm conftest.$ac_ext | ||
| 19383 | LIBS=$ac_func_search_save_LIBS | ||
| 19384 | fi | ||
| 19385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 | ||
| 19386 | $as_echo "$ac_cv_search_tputs" >&6; } | ||
| 19387 | ac_res=$ac_cv_search_tputs | ||
| 19388 | if test "$ac_res" != no; then : | ||
| 19389 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 19390 | |||
| 19391 | else | ||
| 19392 | have_tputs_et_al=false | ||
| 19393 | fi | ||
| 19394 | |||
| 19395 | if test "$have_tputs_et_al" != true; then | ||
| 19396 | as_fn_error "I couldn't find termcap functions (tputs and friends). | ||
| 19397 | Maybe some development libraries/packages are missing? Try installing | ||
| 19398 | libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 | ||
| 19399 | fi | ||
| 19400 | # Must define this when any termcap library is found. | ||
| 19401 | |||
| 19402 | $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h | ||
| 19403 | |||
| 19404 | ## FIXME This was the cpp logic, but I am not sure it is right. | ||
| 19405 | ## The above test has not necessarily found libncurses. | ||
| 19406 | HAVE_LIBNCURSES=yes | ||
| 19407 | |||
| 19408 | ## Use terminfo instead of termcap? | ||
| 19409 | ## Note only system files NOT using terminfo are: | ||
| 19410 | ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and | ||
| 19411 | ## darwin|gnu without ncurses. | ||
| 19412 | TERMINFO=no | ||
| 19413 | LIBS_TERMCAP= | ||
| 19414 | case "$opsys" in | ||
| 19415 | ## cygwin: Fewer environment variables to go wrong, more terminal types. | ||
| 19416 | ## hpux10-20: Use the system provided termcap(3) library. | ||
| 19417 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | ||
| 19418 | ## is necessary. Otherwise Emacs dumps core when run -nw. | ||
| 19419 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; | ||
| 19420 | |||
| 19421 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | ||
| 19422 | ## The ncurses library has been moved out of the System framework in | ||
| 19423 | ## Mac OS X 10.2. So if configure detects it, set the command-line | ||
| 19424 | ## option to use it. | ||
| 19425 | darwin|gnu*) | ||
| 19426 | ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) | ||
| 19427 | if test "x$HAVE_LIBNCURSES" = "xyes"; then | ||
| 19428 | TERMINFO=yes | ||
| 19429 | LIBS_TERMCAP="-lncurses" | ||
| 19430 | fi | ||
| 19431 | ;; | ||
| 19432 | |||
| 19433 | freebsd) | ||
| 19434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | ||
| 19435 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | ||
| 19436 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | ||
| 19437 | $as_echo_n "(cached) " >&6 | ||
| 19438 | else | ||
| 19439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19440 | /* end confdefs.h. */ | ||
| 19441 | #include <osreldate.h> | ||
| 19442 | int | ||
| 19443 | main () | ||
| 19444 | { | ||
| 19445 | #if __FreeBSD_version < 400000 | ||
| 19446 | fail; | ||
| 19447 | #endif | ||
| 19448 | |||
| 19449 | ; | ||
| 19450 | return 0; | ||
| 19451 | } | ||
| 19452 | _ACEOF | ||
| 19453 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19454 | emacs_cv_freebsd_terminfo=yes | ||
| 19455 | else | ||
| 19456 | emacs_cv_freebsd_terminfo=no | ||
| 19457 | fi | ||
| 19458 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19459 | conftest$ac_exeext conftest.$ac_ext | ||
| 19460 | fi | ||
| 19461 | |||
| 19462 | |||
| 19463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | ||
| 19464 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | ||
| 19465 | |||
| 19466 | if test $emacs_cv_freebsd_terminfo = yes; then | ||
| 19467 | TERMINFO=yes | ||
| 19468 | LIBS_TERMCAP="-lncurses" | ||
| 19469 | else | ||
| 19470 | LIBS_TERMCAP="-ltermcap" | ||
| 19471 | fi | ||
| 19472 | ;; | ||
| 19473 | |||
| 19474 | netbsd) | ||
| 19475 | if test $ac_cv_search_tputs = -lterminfo; then | ||
| 19476 | TERMINFO=yes | ||
| 19477 | LIBS_TERMCAP="-lterminfo" | ||
| 19478 | else | ||
| 19479 | LIBS_TERMCAP="-ltermcap" | ||
| 19480 | fi | ||
| 19481 | ;; | ||
| 19482 | |||
| 19483 | esac | ||
| 19484 | |||
| 19485 | case "$opsys" in | ||
| 19486 | ## hpux: Make sure we get select from libc rather than from libcurses | ||
| 19487 | ## because libcurses on HPUX 10.10 has a broken version of select. | ||
| 19488 | ## We used to use -lc -lcurses, but this may be cleaner. | ||
| 19489 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | ||
| 19490 | |||
| 19491 | openbsd) LIBS_TERMCAP="-lncurses" ;; | ||
| 19492 | |||
| 19493 | ## Must use system termcap, if we use any termcap. It does special things. | ||
| 19494 | sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; | ||
| 19495 | esac | ||
| 19496 | |||
| 19497 | TERMCAP_OBJ=tparam.o | ||
| 19498 | if test $TERMINFO = yes; then | ||
| 19499 | |||
| 19500 | $as_echo "#define TERMINFO 1" >>confdefs.h | ||
| 19501 | |||
| 19502 | |||
| 19503 | ## Default used to be -ltermcap. Add a case above if need something else. | ||
| 19504 | test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" | ||
| 19505 | |||
| 19506 | TERMCAP_OBJ=terminfo.o | ||
| 19507 | fi | ||
| 19508 | |||
| 19509 | |||
| 19510 | |||
| 19511 | |||
| 19512 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | ||
| 19513 | resolv=no | ||
| 19514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19515 | /* end confdefs.h. */ | ||
| 19516 | #include <netinet/in.h> | ||
| 19517 | #include <arpa/nameser.h> | ||
| 19518 | #include <resolv.h> | ||
| 19519 | int | ||
| 19520 | main () | ||
| 19521 | { | ||
| 19522 | return res_init(); | ||
| 19523 | ; | ||
| 19524 | return 0; | ||
| 19525 | } | ||
| 19526 | _ACEOF | ||
| 19527 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19528 | have_res_init=yes | ||
| 19529 | else | ||
| 19530 | have_res_init=no | ||
| 19531 | fi | ||
| 19532 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19533 | conftest$ac_exeext conftest.$ac_ext | ||
| 19534 | if test "$have_res_init" = no; then | ||
| 19535 | OLIBS="$LIBS" | ||
| 19536 | LIBS="$LIBS -lresolv" | ||
| 19537 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | ||
| 19538 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | ||
| 19539 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19540 | /* end confdefs.h. */ | ||
| 19541 | #include <netinet/in.h> | ||
| 19542 | #include <arpa/nameser.h> | ||
| 19543 | #include <resolv.h> | ||
| 19544 | int | ||
| 19545 | main () | ||
| 19546 | { | ||
| 19547 | return res_init(); | ||
| 19548 | ; | ||
| 19549 | return 0; | ||
| 19550 | } | ||
| 19551 | _ACEOF | ||
| 19552 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19553 | have_res_init=yes | ||
| 19554 | else | ||
| 19555 | have_res_init=no | ||
| 19556 | fi | ||
| 19557 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19558 | conftest$ac_exeext conftest.$ac_ext | ||
| 19559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 | ||
| 19560 | $as_echo "$have_res_init" >&6; } | ||
| 19561 | if test "$have_res_init" = yes ; then | ||
| 19562 | resolv=yes | ||
| 19563 | fi | ||
| 19564 | LIBS="$OLIBS" | ||
| 19565 | fi | ||
| 19566 | |||
| 19567 | if test "$have_res_init" = yes; then | ||
| 19568 | |||
| 19569 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | ||
| 19570 | |||
| 19571 | fi | ||
| 19572 | |||
| 19573 | # Do we need the Hesiod library to provide the support routines? | ||
| 19574 | LIBHESIOD= | ||
| 19575 | if test "$with_hesiod" != no ; then | ||
| 19576 | # Don't set $LIBS here -- see comments above. FIXME which comments? | ||
| 19577 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | ||
| 19578 | if test "x$ac_cv_func_res_send" = x""yes; then : | ||
| 19579 | |||
| 19580 | else | ||
| 19581 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | ||
| 19582 | if test "x$ac_cv_func___res_send" = x""yes; then : | ||
| 19583 | |||
| 19584 | else | ||
| 19585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | ||
| 19586 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | ||
| 19587 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | ||
| 19588 | $as_echo_n "(cached) " >&6 | ||
| 19589 | else | ||
| 19590 | ac_check_lib_save_LIBS=$LIBS | ||
| 19591 | LIBS="-lresolv $LIBS" | ||
| 19592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19593 | /* end confdefs.h. */ | ||
| 19594 | |||
| 19595 | /* Override any GCC internal prototype to avoid an error. | ||
| 19596 | Use char because int might match the return type of a GCC | ||
| 19597 | builtin and then its argument prototype would still apply. */ | ||
| 19598 | #ifdef __cplusplus | ||
| 19599 | extern "C" | ||
| 19600 | #endif | ||
| 19601 | char res_send (); | ||
| 19602 | int | ||
| 19603 | main () | ||
| 19604 | { | ||
| 19605 | return res_send (); | ||
| 19606 | ; | ||
| 19607 | return 0; | ||
| 19608 | } | ||
| 19609 | _ACEOF | ||
| 19610 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19611 | ac_cv_lib_resolv_res_send=yes | ||
| 19612 | else | ||
| 19613 | ac_cv_lib_resolv_res_send=no | ||
| 19614 | fi | ||
| 19615 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19616 | conftest$ac_exeext conftest.$ac_ext | ||
| 19617 | LIBS=$ac_check_lib_save_LIBS | ||
| 19618 | fi | ||
| 19619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 | ||
| 19620 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | ||
| 19621 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | ||
| 19622 | resolv=yes | ||
| 19623 | else | ||
| 19624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | ||
| 19625 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | ||
| 19626 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | ||
| 19627 | $as_echo_n "(cached) " >&6 | ||
| 19628 | else | ||
| 19629 | ac_check_lib_save_LIBS=$LIBS | ||
| 19630 | LIBS="-lresolv $LIBS" | ||
| 19631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19632 | /* end confdefs.h. */ | ||
| 19633 | |||
| 19634 | /* Override any GCC internal prototype to avoid an error. | ||
| 19635 | Use char because int might match the return type of a GCC | ||
| 19636 | builtin and then its argument prototype would still apply. */ | ||
| 19637 | #ifdef __cplusplus | ||
| 19638 | extern "C" | ||
| 19639 | #endif | ||
| 19640 | char __res_send (); | ||
| 19641 | int | ||
| 19642 | main () | ||
| 19643 | { | ||
| 19644 | return __res_send (); | ||
| 19645 | ; | ||
| 19646 | return 0; | ||
| 19647 | } | ||
| 19648 | _ACEOF | ||
| 19649 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19650 | ac_cv_lib_resolv___res_send=yes | ||
| 19651 | else | ||
| 19652 | ac_cv_lib_resolv___res_send=no | ||
| 19653 | fi | ||
| 19654 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19655 | conftest$ac_exeext conftest.$ac_ext | ||
| 19656 | LIBS=$ac_check_lib_save_LIBS | ||
| 19657 | fi | ||
| 19658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 | ||
| 19659 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | ||
| 19660 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | ||
| 19661 | resolv=yes | ||
| 19662 | fi | ||
| 19663 | |||
| 19664 | fi | ||
| 19665 | |||
| 19666 | fi | ||
| 19667 | |||
| 19668 | fi | ||
| 19669 | |||
| 19670 | if test "$resolv" = yes ; then | ||
| 19671 | RESOLVLIB=-lresolv | ||
| 19672 | else | ||
| 19673 | RESOLVLIB= | ||
| 19674 | fi | ||
| 19675 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | ||
| 19676 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | ||
| 19677 | |||
| 19678 | else | ||
| 19679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | ||
| 19680 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | ||
| 19681 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | ||
| 19682 | $as_echo_n "(cached) " >&6 | ||
| 19683 | else | ||
| 19684 | ac_check_lib_save_LIBS=$LIBS | ||
| 19685 | LIBS="-lhesiod $RESOLVLIB $LIBS" | ||
| 19686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19687 | /* end confdefs.h. */ | ||
| 19688 | |||
| 19689 | /* Override any GCC internal prototype to avoid an error. | ||
| 19690 | Use char because int might match the return type of a GCC | ||
| 19691 | builtin and then its argument prototype would still apply. */ | ||
| 19692 | #ifdef __cplusplus | ||
| 19693 | extern "C" | ||
| 19694 | #endif | ||
| 19695 | char hes_getmailhost (); | ||
| 19696 | int | ||
| 19697 | main () | ||
| 19698 | { | ||
| 19699 | return hes_getmailhost (); | ||
| 19700 | ; | ||
| 19701 | return 0; | ||
| 19702 | } | ||
| 19703 | _ACEOF | ||
| 19704 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19705 | ac_cv_lib_hesiod_hes_getmailhost=yes | ||
| 19706 | else | ||
| 19707 | ac_cv_lib_hesiod_hes_getmailhost=no | ||
| 19708 | fi | ||
| 19709 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19710 | conftest$ac_exeext conftest.$ac_ext | ||
| 19711 | LIBS=$ac_check_lib_save_LIBS | ||
| 19712 | fi | ||
| 19713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 | ||
| 19714 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | ||
| 19715 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | ||
| 19716 | hesiod=yes | ||
| 19717 | else | ||
| 19718 | : | ||
| 19719 | fi | ||
| 19720 | |||
| 19721 | fi | ||
| 19722 | |||
| 19723 | |||
| 19724 | if test x"$hesiod" = xyes; then | ||
| 19725 | |||
| 19726 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h | ||
| 19727 | |||
| 19728 | LIBHESIOD=-lhesiod | ||
| 19729 | fi | ||
| 19730 | fi | ||
| 19731 | |||
| 19732 | |||
| 19733 | # Do we need libresolv (due to res_init or Hesiod)? | ||
| 19734 | if test "$resolv" = yes ; then | ||
| 19735 | |||
| 19736 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h | ||
| 19737 | |||
| 19738 | LIBRESOLV=-lresolv | ||
| 19739 | else | ||
| 19740 | LIBRESOLV= | ||
| 19741 | fi | ||
| 19742 | |||
| 19743 | |||
| 19744 | # These tell us which Kerberos-related libraries to use. | ||
| 19745 | COM_ERRLIB= | ||
| 19746 | CRYPTOLIB= | ||
| 19747 | KRB5LIB= | ||
| 19748 | DESLIB= | ||
| 19749 | KRB4LIB= | ||
| 19750 | |||
| 19751 | if test "${with_kerberos}" != no; then | ||
| 19752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | ||
| 19753 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | ||
| 19754 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | ||
| 19755 | $as_echo_n "(cached) " >&6 | ||
| 19756 | else | ||
| 19757 | ac_check_lib_save_LIBS=$LIBS | ||
| 19758 | LIBS="-lcom_err $LIBS" | ||
| 19759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19760 | /* end confdefs.h. */ | ||
| 19761 | |||
| 19762 | /* Override any GCC internal prototype to avoid an error. | ||
| 19763 | Use char because int might match the return type of a GCC | ||
| 19764 | builtin and then its argument prototype would still apply. */ | ||
| 19765 | #ifdef __cplusplus | ||
| 19766 | extern "C" | ||
| 19767 | #endif | ||
| 19768 | char com_err (); | ||
| 19769 | int | ||
| 19770 | main () | ||
| 19771 | { | ||
| 19772 | return com_err (); | ||
| 19773 | ; | ||
| 19774 | return 0; | ||
| 19775 | } | ||
| 19776 | _ACEOF | ||
| 19777 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19778 | ac_cv_lib_com_err_com_err=yes | ||
| 19779 | else | ||
| 19780 | ac_cv_lib_com_err_com_err=no | ||
| 19781 | fi | ||
| 19782 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19783 | conftest$ac_exeext conftest.$ac_ext | ||
| 19784 | LIBS=$ac_check_lib_save_LIBS | ||
| 19785 | fi | ||
| 19786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | ||
| 19787 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | ||
| 19788 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | ||
| 19789 | have_com_err=yes | ||
| 19790 | else | ||
| 19791 | have_com_err=no | ||
| 19792 | fi | ||
| 19793 | |||
| 19794 | if test $have_com_err = yes; then | ||
| 19795 | COM_ERRLIB=-lcom_err | ||
| 19796 | LIBS="$COM_ERRLIB $LIBS" | ||
| 19797 | |||
| 19798 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h | ||
| 19799 | |||
| 19800 | fi | ||
| 19801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | ||
| 19802 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | ||
| 19803 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | ||
| 19804 | $as_echo_n "(cached) " >&6 | ||
| 19805 | else | ||
| 19806 | ac_check_lib_save_LIBS=$LIBS | ||
| 19807 | LIBS="-lcrypto $LIBS" | ||
| 19808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19809 | /* end confdefs.h. */ | ||
| 19810 | |||
| 19811 | /* Override any GCC internal prototype to avoid an error. | ||
| 19812 | Use char because int might match the return type of a GCC | ||
| 19813 | builtin and then its argument prototype would still apply. */ | ||
| 19814 | #ifdef __cplusplus | ||
| 19815 | extern "C" | ||
| 19816 | #endif | ||
| 19817 | char mit_des_cbc_encrypt (); | ||
| 19818 | int | ||
| 19819 | main () | ||
| 19820 | { | ||
| 19821 | return mit_des_cbc_encrypt (); | ||
| 19822 | ; | ||
| 19823 | return 0; | ||
| 19824 | } | ||
| 19825 | _ACEOF | ||
| 19826 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19827 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | ||
| 19828 | else | ||
| 19829 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | ||
| 19830 | fi | ||
| 19831 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19832 | conftest$ac_exeext conftest.$ac_ext | ||
| 19833 | LIBS=$ac_check_lib_save_LIBS | ||
| 19834 | fi | ||
| 19835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | ||
| 19836 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | ||
| 19837 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | ||
| 19838 | have_crypto=yes | ||
| 19839 | else | ||
| 19840 | have_crypto=no | ||
| 19841 | fi | ||
| 19842 | |||
| 19843 | if test $have_crypto = yes; then | ||
| 19844 | CRYPTOLIB=-lcrypto | ||
| 19845 | LIBS="$CRYPTOLIB $LIBS" | ||
| 19846 | |||
| 19847 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h | ||
| 19848 | |||
| 19849 | fi | ||
| 19850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | ||
| 19851 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | ||
| 19852 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | ||
| 19853 | $as_echo_n "(cached) " >&6 | ||
| 19854 | else | ||
| 19855 | ac_check_lib_save_LIBS=$LIBS | ||
| 19856 | LIBS="-lk5crypto $LIBS" | ||
| 19857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19858 | /* end confdefs.h. */ | ||
| 19859 | |||
| 19860 | /* Override any GCC internal prototype to avoid an error. | ||
| 19861 | Use char because int might match the return type of a GCC | ||
| 19862 | builtin and then its argument prototype would still apply. */ | ||
| 19863 | #ifdef __cplusplus | ||
| 19864 | extern "C" | ||
| 19865 | #endif | ||
| 19866 | char mit_des_cbc_encrypt (); | ||
| 19867 | int | ||
| 19868 | main () | ||
| 19869 | { | ||
| 19870 | return mit_des_cbc_encrypt (); | ||
| 19871 | ; | ||
| 19872 | return 0; | ||
| 19873 | } | ||
| 19874 | _ACEOF | ||
| 19875 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19876 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | ||
| 19877 | else | ||
| 19878 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | ||
| 19879 | fi | ||
| 19880 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19881 | conftest$ac_exeext conftest.$ac_ext | ||
| 19882 | LIBS=$ac_check_lib_save_LIBS | ||
| 19883 | fi | ||
| 19884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | ||
| 19885 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | ||
| 19886 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | ||
| 19887 | have_k5crypto=yes | ||
| 19888 | else | ||
| 19889 | have_k5crypto=no | ||
| 19890 | fi | ||
| 19891 | |||
| 19892 | if test $have_k5crypto = yes; then | ||
| 19893 | CRYPTOLIB=-lk5crypto | ||
| 19894 | LIBS="$CRYPTOLIB $LIBS" | ||
| 19895 | |||
| 19896 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h | ||
| 19897 | |||
| 19898 | fi | ||
| 19899 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | ||
| 19900 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | ||
| 19901 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | ||
| 19902 | $as_echo_n "(cached) " >&6 | ||
| 19903 | else | ||
| 19904 | ac_check_lib_save_LIBS=$LIBS | ||
| 19905 | LIBS="-lkrb5 $LIBS" | ||
| 19906 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19907 | /* end confdefs.h. */ | ||
| 19908 | |||
| 19909 | /* Override any GCC internal prototype to avoid an error. | ||
| 19910 | Use char because int might match the return type of a GCC | ||
| 19911 | builtin and then its argument prototype would still apply. */ | ||
| 19912 | #ifdef __cplusplus | ||
| 19913 | extern "C" | ||
| 19914 | #endif | ||
| 19915 | char krb5_init_context (); | ||
| 19916 | int | ||
| 19917 | main () | ||
| 19918 | { | ||
| 19919 | return krb5_init_context (); | ||
| 19920 | ; | ||
| 19921 | return 0; | ||
| 19922 | } | ||
| 19923 | _ACEOF | ||
| 19924 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19925 | ac_cv_lib_krb5_krb5_init_context=yes | ||
| 19926 | else | ||
| 19927 | ac_cv_lib_krb5_krb5_init_context=no | ||
| 19928 | fi | ||
| 19929 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19930 | conftest$ac_exeext conftest.$ac_ext | ||
| 19931 | LIBS=$ac_check_lib_save_LIBS | ||
| 19932 | fi | ||
| 19933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | ||
| 19934 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | ||
| 19935 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | ||
| 19936 | have_krb5=yes | ||
| 19937 | else | ||
| 19938 | have_krb5=no | ||
| 19939 | fi | ||
| 19940 | |||
| 19941 | if test $have_krb5=yes; then | ||
| 19942 | KRB5LIB=-lkrb5 | ||
| 19943 | LIBS="$KRB5LIB $LIBS" | ||
| 19944 | |||
| 19945 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h | ||
| 19946 | |||
| 19947 | fi | ||
| 19948 | if test "${with_kerberos5}" = no; then | ||
| 19949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | ||
| 19950 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | ||
| 19951 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | ||
| 19952 | $as_echo_n "(cached) " >&6 | ||
| 19953 | else | ||
| 19954 | ac_check_lib_save_LIBS=$LIBS | ||
| 19955 | LIBS="-ldes425 $LIBS" | ||
| 19956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 19957 | /* end confdefs.h. */ | ||
| 19958 | |||
| 19959 | /* Override any GCC internal prototype to avoid an error. | ||
| 19960 | Use char because int might match the return type of a GCC | ||
| 19961 | builtin and then its argument prototype would still apply. */ | ||
| 19962 | #ifdef __cplusplus | ||
| 19963 | extern "C" | ||
| 19964 | #endif | ||
| 19965 | char des_cbc_encrypt (); | ||
| 19966 | int | ||
| 19967 | main () | ||
| 19968 | { | ||
| 19969 | return des_cbc_encrypt (); | ||
| 19970 | ; | ||
| 19971 | return 0; | ||
| 19972 | } | ||
| 19973 | _ACEOF | ||
| 19974 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 19975 | ac_cv_lib_des425_des_cbc_encrypt=yes | ||
| 19976 | else | ||
| 19977 | ac_cv_lib_des425_des_cbc_encrypt=no | ||
| 19978 | fi | ||
| 19979 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 19980 | conftest$ac_exeext conftest.$ac_ext | ||
| 19981 | LIBS=$ac_check_lib_save_LIBS | ||
| 19982 | fi | ||
| 19983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 | ||
| 19984 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | ||
| 19985 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | ||
| 19986 | have_des425=yes | ||
| 19987 | else | ||
| 19988 | have_des425=no | ||
| 19989 | fi | ||
| 19990 | |||
| 19991 | if test $have_des425 = yes; then | ||
| 19992 | DESLIB=-ldes425 | ||
| 19993 | LIBS="$DESLIB $LIBS" | ||
| 19994 | |||
| 19995 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h | ||
| 19996 | |||
| 19997 | else | ||
| 19998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | ||
| 19999 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | ||
| 20000 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | ||
| 20001 | $as_echo_n "(cached) " >&6 | ||
| 20002 | else | ||
| 20003 | ac_check_lib_save_LIBS=$LIBS | ||
| 20004 | LIBS="-ldes $LIBS" | ||
| 20005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20006 | /* end confdefs.h. */ | ||
| 20007 | |||
| 20008 | /* Override any GCC internal prototype to avoid an error. | ||
| 20009 | Use char because int might match the return type of a GCC | ||
| 20010 | builtin and then its argument prototype would still apply. */ | ||
| 20011 | #ifdef __cplusplus | ||
| 20012 | extern "C" | ||
| 20013 | #endif | ||
| 20014 | char des_cbc_encrypt (); | ||
| 20015 | int | ||
| 20016 | main () | ||
| 20017 | { | ||
| 20018 | return des_cbc_encrypt (); | ||
| 20019 | ; | ||
| 20020 | return 0; | ||
| 20021 | } | ||
| 20022 | _ACEOF | ||
| 20023 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 20024 | ac_cv_lib_des_des_cbc_encrypt=yes | ||
| 20025 | else | ||
| 20026 | ac_cv_lib_des_des_cbc_encrypt=no | ||
| 20027 | fi | ||
| 20028 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 20029 | conftest$ac_exeext conftest.$ac_ext | ||
| 20030 | LIBS=$ac_check_lib_save_LIBS | ||
| 20031 | fi | ||
| 20032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | ||
| 20033 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | ||
| 20034 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | ||
| 20035 | have_des=yes | ||
| 20036 | else | ||
| 20037 | have_des=no | ||
| 20038 | fi | ||
| 20039 | |||
| 20040 | if test $have_des = yes; then | ||
| 20041 | DESLIB=-ldes | ||
| 20042 | LIBS="$DESLIB $LIBS" | ||
| 20043 | |||
| 20044 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h | ||
| 20045 | |||
| 20046 | fi | ||
| 20047 | fi | ||
| 20048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | ||
| 20049 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | ||
| 20050 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | ||
| 20051 | $as_echo_n "(cached) " >&6 | ||
| 20052 | else | ||
| 20053 | ac_check_lib_save_LIBS=$LIBS | ||
| 20054 | LIBS="-lkrb4 $LIBS" | ||
| 20055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20056 | /* end confdefs.h. */ | ||
| 20057 | |||
| 20058 | /* Override any GCC internal prototype to avoid an error. | ||
| 20059 | Use char because int might match the return type of a GCC | ||
| 20060 | builtin and then its argument prototype would still apply. */ | ||
| 20061 | #ifdef __cplusplus | ||
| 20062 | extern "C" | ||
| 20063 | #endif | ||
| 20064 | char krb_get_cred (); | ||
| 20065 | int | ||
| 20066 | main () | ||
| 20067 | { | ||
| 20068 | return krb_get_cred (); | ||
| 20069 | ; | ||
| 20070 | return 0; | ||
| 20071 | } | ||
| 20072 | _ACEOF | ||
| 20073 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 20074 | ac_cv_lib_krb4_krb_get_cred=yes | ||
| 20075 | else | ||
| 20076 | ac_cv_lib_krb4_krb_get_cred=no | ||
| 20077 | fi | ||
| 20078 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 20079 | conftest$ac_exeext conftest.$ac_ext | ||
| 20080 | LIBS=$ac_check_lib_save_LIBS | ||
| 20081 | fi | ||
| 20082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | ||
| 20083 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | ||
| 20084 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | ||
| 20085 | have_krb4=yes | ||
| 20086 | else | ||
| 20087 | have_krb4=no | ||
| 20088 | fi | ||
| 20089 | |||
| 20090 | if test $have_krb4 = yes; then | ||
| 20091 | KRB4LIB=-lkrb4 | ||
| 20092 | LIBS="$KRB4LIB $LIBS" | ||
| 20093 | |||
| 20094 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | ||
| 20095 | |||
| 20096 | else | ||
| 20097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | ||
| 20098 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | ||
| 20099 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | ||
| 20100 | $as_echo_n "(cached) " >&6 | ||
| 20101 | else | ||
| 20102 | ac_check_lib_save_LIBS=$LIBS | ||
| 20103 | LIBS="-lkrb $LIBS" | ||
| 20104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20105 | /* end confdefs.h. */ | ||
| 20106 | |||
| 20107 | /* Override any GCC internal prototype to avoid an error. | ||
| 20108 | Use char because int might match the return type of a GCC | ||
| 20109 | builtin and then its argument prototype would still apply. */ | ||
| 20110 | #ifdef __cplusplus | ||
| 20111 | extern "C" | ||
| 20112 | #endif | ||
| 20113 | char krb_get_cred (); | ||
| 20114 | int | ||
| 20115 | main () | ||
| 20116 | { | ||
| 20117 | return krb_get_cred (); | ||
| 20118 | ; | ||
| 20119 | return 0; | ||
| 20120 | } | ||
| 20121 | _ACEOF | ||
| 20122 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 20123 | ac_cv_lib_krb_krb_get_cred=yes | ||
| 20124 | else | ||
| 20125 | ac_cv_lib_krb_krb_get_cred=no | ||
| 20126 | fi | ||
| 20127 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 20128 | conftest$ac_exeext conftest.$ac_ext | ||
| 20129 | LIBS=$ac_check_lib_save_LIBS | ||
| 20130 | fi | ||
| 20131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 | ||
| 20132 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | ||
| 20133 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | ||
| 20134 | have_krb=yes | ||
| 20135 | else | ||
| 20136 | have_krb=no | ||
| 20137 | fi | ||
| 20138 | |||
| 20139 | if test $have_krb = yes; then | ||
| 20140 | KRB4LIB=-lkrb | ||
| 20141 | LIBS="$KRB4LIB $LIBS" | ||
| 20142 | |||
| 20143 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | ||
| 20144 | |||
| 20145 | fi | ||
| 20146 | fi | ||
| 20147 | fi | ||
| 20148 | |||
| 20149 | if test "${with_kerberos5}" != no; then | ||
| 20150 | for ac_header in krb5.h | ||
| 20151 | do : | ||
| 20152 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | ||
| 20153 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | ||
| 20154 | cat >>confdefs.h <<_ACEOF | ||
| 20155 | #define HAVE_KRB5_H 1 | ||
| 20156 | _ACEOF | ||
| 20157 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | ||
| 20158 | " | ||
| 20159 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | ||
| 20160 | |||
| 20161 | cat >>confdefs.h <<_ACEOF | ||
| 20162 | #define HAVE_KRB5_ERROR_TEXT 1 | ||
| 20163 | _ACEOF | ||
| 20164 | |||
| 20165 | |||
| 20166 | fi | ||
| 20167 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | ||
| 20168 | " | ||
| 20169 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | ||
| 20170 | |||
| 20171 | cat >>confdefs.h <<_ACEOF | ||
| 20172 | #define HAVE_KRB5_ERROR_E_TEXT 1 | ||
| 20173 | _ACEOF | ||
| 20174 | |||
| 20175 | |||
| 20176 | fi | ||
| 20177 | |||
| 20178 | fi | ||
| 20179 | |||
| 20180 | done | ||
| 20181 | |||
| 20182 | else | ||
| 20183 | for ac_header in des.h | ||
| 20184 | do : | ||
| 20185 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | ||
| 20186 | if test "x$ac_cv_header_des_h" = x""yes; then : | ||
| 20187 | cat >>confdefs.h <<_ACEOF | ||
| 20188 | #define HAVE_DES_H 1 | ||
| 20189 | _ACEOF | ||
| 20190 | |||
| 20191 | else | ||
| 20192 | for ac_header in kerberosIV/des.h | ||
| 20193 | do : | ||
| 20194 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | ||
| 20195 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | ||
| 20196 | cat >>confdefs.h <<_ACEOF | ||
| 20197 | #define HAVE_KERBEROSIV_DES_H 1 | ||
| 20198 | _ACEOF | ||
| 20199 | |||
| 20200 | else | ||
| 20201 | for ac_header in kerberos/des.h | ||
| 20202 | do : | ||
| 20203 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | ||
| 20204 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | ||
| 20205 | cat >>confdefs.h <<_ACEOF | ||
| 20206 | #define HAVE_KERBEROS_DES_H 1 | ||
| 20207 | _ACEOF | ||
| 20208 | |||
| 20209 | fi | ||
| 20210 | |||
| 20211 | done | ||
| 20212 | |||
| 20213 | fi | ||
| 20214 | |||
| 20215 | done | ||
| 20216 | |||
| 20217 | fi | ||
| 20218 | |||
| 20219 | done | ||
| 20220 | |||
| 20221 | for ac_header in krb.h | ||
| 20222 | do : | ||
| 20223 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" | ||
| 20224 | if test "x$ac_cv_header_krb_h" = x""yes; then : | ||
| 20225 | cat >>confdefs.h <<_ACEOF | ||
| 20226 | #define HAVE_KRB_H 1 | ||
| 20227 | _ACEOF | ||
| 20228 | |||
| 20229 | else | ||
| 20230 | for ac_header in kerberosIV/krb.h | ||
| 20231 | do : | ||
| 20232 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | ||
| 20233 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | ||
| 20234 | cat >>confdefs.h <<_ACEOF | ||
| 20235 | #define HAVE_KERBEROSIV_KRB_H 1 | ||
| 20236 | _ACEOF | ||
| 20237 | |||
| 20238 | else | ||
| 20239 | for ac_header in kerberos/krb.h | ||
| 20240 | do : | ||
| 20241 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | ||
| 20242 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | ||
| 20243 | cat >>confdefs.h <<_ACEOF | ||
| 20244 | #define HAVE_KERBEROS_KRB_H 1 | ||
| 20245 | _ACEOF | ||
| 20246 | |||
| 20247 | fi | ||
| 20248 | |||
| 20249 | done | ||
| 20250 | |||
| 20251 | fi | ||
| 20252 | |||
| 20253 | done | ||
| 20254 | |||
| 20255 | fi | ||
| 20256 | |||
| 20257 | done | ||
| 20258 | |||
| 20259 | fi | ||
| 20260 | for ac_header in com_err.h | ||
| 20261 | do : | ||
| 20262 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" | ||
| 20263 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | ||
| 20264 | cat >>confdefs.h <<_ACEOF | ||
| 20265 | #define HAVE_COM_ERR_H 1 | ||
| 20266 | _ACEOF | ||
| 20267 | |||
| 20268 | fi | ||
| 20269 | |||
| 20270 | done | ||
| 20271 | |||
| 20272 | fi | ||
| 20273 | |||
| 20274 | |||
| 20275 | |||
| 20276 | |||
| 20277 | |||
| 20278 | |||
| 20279 | |||
| 20280 | # Solaris requires -lintl if you want strerror (which calls dgettext) | ||
| 20281 | # to return localized messages. | ||
| 20282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 | ||
| 20283 | $as_echo_n "checking for dgettext in -lintl... " >&6; } | ||
| 20284 | if test "${ac_cv_lib_intl_dgettext+set}" = set; then : | ||
| 20285 | $as_echo_n "(cached) " >&6 | ||
| 20286 | else | ||
| 20287 | ac_check_lib_save_LIBS=$LIBS | ||
| 20288 | LIBS="-lintl $LIBS" | ||
| 20289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20290 | /* end confdefs.h. */ | ||
| 20291 | |||
| 20292 | /* Override any GCC internal prototype to avoid an error. | ||
| 20293 | Use char because int might match the return type of a GCC | ||
| 20294 | builtin and then its argument prototype would still apply. */ | ||
| 20295 | #ifdef __cplusplus | ||
| 20296 | extern "C" | ||
| 20297 | #endif | ||
| 20298 | char dgettext (); | ||
| 20299 | int | ||
| 20300 | main () | ||
| 20301 | { | ||
| 20302 | return dgettext (); | ||
| 20303 | ; | ||
| 20304 | return 0; | ||
| 20305 | } | ||
| 20306 | _ACEOF | ||
| 20307 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 20308 | ac_cv_lib_intl_dgettext=yes | ||
| 20309 | else | ||
| 20310 | ac_cv_lib_intl_dgettext=no | ||
| 20311 | fi | ||
| 20312 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 20313 | conftest$ac_exeext conftest.$ac_ext | ||
| 20314 | LIBS=$ac_check_lib_save_LIBS | ||
| 20315 | fi | ||
| 20316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 | ||
| 20317 | $as_echo "$ac_cv_lib_intl_dgettext" >&6; } | ||
| 20318 | if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : | ||
| 20319 | cat >>confdefs.h <<_ACEOF | ||
| 20320 | #define HAVE_LIBINTL 1 | ||
| 20321 | _ACEOF | ||
| 20322 | |||
| 20323 | LIBS="-lintl $LIBS" | ||
| 20324 | |||
| 20325 | fi | ||
| 20326 | |||
| 20327 | |||
| 20328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 | ||
| 20329 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | ||
| 20330 | if test "${emacs_cv_localtime_cache+set}" = set; then : | ||
| 20331 | $as_echo_n "(cached) " >&6 | ||
| 20332 | else | ||
| 20333 | if test x$ac_cv_func_tzset = xyes; then | ||
| 20334 | if test "$cross_compiling" = yes; then : | ||
| 20335 | # If we have tzset, assume the worst when cross-compiling. | ||
| 20336 | emacs_cv_localtime_cache=yes | ||
| 20337 | else | ||
| 20338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20339 | /* end confdefs.h. */ | ||
| 20340 | #include <time.h> | ||
| 20341 | char TZ_GMT0[] = "TZ=GMT0"; | ||
| 20342 | char TZ_PST8[] = "TZ=PST8"; | ||
| 20343 | main() | ||
| 20344 | { | ||
| 20345 | time_t now = time ((time_t *) 0); | ||
| 20346 | int hour_GMT0, hour_unset; | ||
| 20347 | if (putenv (TZ_GMT0) != 0) | ||
| 20348 | exit (1); | ||
| 20349 | hour_GMT0 = localtime (&now)->tm_hour; | ||
| 20350 | unsetenv("TZ"); | ||
| 20351 | hour_unset = localtime (&now)->tm_hour; | ||
| 20352 | if (putenv (TZ_PST8) != 0) | ||
| 20353 | exit (1); | ||
| 20354 | if (localtime (&now)->tm_hour == hour_GMT0) | ||
| 20355 | exit (1); | ||
| 20356 | unsetenv("TZ"); | ||
| 20357 | if (localtime (&now)->tm_hour != hour_unset) | ||
| 20358 | exit (1); | ||
| 20359 | exit (0); | ||
| 20360 | } | ||
| 20361 | _ACEOF | ||
| 20362 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 20363 | emacs_cv_localtime_cache=no | ||
| 20364 | else | ||
| 20365 | emacs_cv_localtime_cache=yes | ||
| 20366 | fi | ||
| 20367 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 20368 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 20369 | fi | ||
| 20370 | |||
| 20371 | else | ||
| 20372 | # If we lack tzset, report that localtime does not cache TZ, | ||
| 20373 | # since we can't invalidate the cache if we don't have tzset. | ||
| 20374 | emacs_cv_localtime_cache=no | ||
| 20375 | fi | ||
| 20376 | fi | ||
| 20377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | ||
| 20378 | $as_echo "$emacs_cv_localtime_cache" >&6; } | ||
| 20379 | if test $emacs_cv_localtime_cache = yes; then | ||
| 20380 | |||
| 20381 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h | ||
| 20382 | |||
| 20383 | fi | ||
| 20384 | |||
| 20385 | if test "x$HAVE_TIMEVAL" = xyes; then | ||
| 20386 | for ac_func in gettimeofday | ||
| 20387 | do : | ||
| 20388 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | ||
| 20389 | if test "x$ac_cv_func_gettimeofday" = x""yes; then : | ||
| 20390 | cat >>confdefs.h <<_ACEOF | ||
| 20391 | #define HAVE_GETTIMEOFDAY 1 | ||
| 20392 | _ACEOF | ||
| 20393 | |||
| 20394 | fi | ||
| 20395 | done | ||
| 20396 | |||
| 20397 | if test $ac_cv_func_gettimeofday = yes; then | ||
| 20398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 | ||
| 20399 | $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } | ||
| 20400 | if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : | ||
| 20401 | $as_echo_n "(cached) " >&6 | ||
| 20402 | else | ||
| 20403 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20404 | /* end confdefs.h. */ | ||
| 20405 | |||
| 20406 | #ifdef TIME_WITH_SYS_TIME | ||
| 20407 | #include <sys/time.h> | ||
| 20408 | #include <time.h> | ||
| 20409 | #else | ||
| 20410 | #ifdef HAVE_SYS_TIME_H | ||
| 20411 | #include <sys/time.h> | ||
| 20412 | #else | ||
| 20413 | #include <time.h> | ||
| 20414 | #endif | ||
| 20415 | #endif | ||
| 20416 | int | ||
| 20417 | main () | ||
| 20418 | { | ||
| 20419 | struct timeval time; | ||
| 20420 | gettimeofday (&time, 0); | ||
| 20421 | ; | ||
| 20422 | return 0; | ||
| 20423 | } | ||
| 20424 | _ACEOF | ||
| 20425 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 20426 | emacs_cv_gettimeofday_two_arguments=yes | ||
| 20427 | else | ||
| 20428 | emacs_cv_gettimeofday_two_arguments=no | ||
| 20429 | fi | ||
| 20430 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 20431 | fi | ||
| 20432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 | ||
| 20433 | $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } | ||
| 20434 | if test $emacs_cv_gettimeofday_two_arguments = no; then | ||
| 20435 | |||
| 20436 | $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h | ||
| 20437 | |||
| 20438 | fi | ||
| 20439 | fi | ||
| 20440 | fi | ||
| 20441 | |||
| 20442 | ok_so_far=yes | ||
| 20443 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | ||
| 20444 | if test "x$ac_cv_func_socket" = x""yes; then : | ||
| 20445 | |||
| 20446 | else | ||
| 20447 | ok_so_far=no | ||
| 20448 | fi | ||
| 20449 | |||
| 20450 | if test $ok_so_far = yes; then | ||
| 20451 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | ||
| 20452 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | ||
| 20453 | |||
| 20454 | else | ||
| 20455 | ok_so_far=no | ||
| 20456 | fi | ||
| 20457 | |||
| 20458 | |||
| 20459 | fi | ||
| 20460 | if test $ok_so_far = yes; then | ||
| 20461 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | ||
| 20462 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | ||
| 20463 | |||
| 20464 | else | ||
| 20465 | ok_so_far=no | ||
| 20466 | fi | ||
| 20467 | |||
| 20468 | |||
| 20469 | fi | ||
| 20470 | if test $ok_so_far = yes; then | ||
| 20471 | |||
| 20472 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h | ||
| 20473 | |||
| 20474 | fi | ||
| 20475 | |||
| 20476 | if test -f /usr/lpp/X11/bin/smt.exp; then | ||
| 20477 | |||
| 20478 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h | ||
| 20479 | |||
| 20480 | fi | ||
| 20481 | |||
| 20482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 | ||
| 20483 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | ||
| 20484 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | ||
| 20485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
| 20486 | $as_echo "yes" >&6; } | ||
| 20487 | |||
| 20488 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | ||
| 20489 | |||
| 20490 | else | ||
| 20491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 20492 | $as_echo "no" >&6; } | ||
| 20493 | fi | ||
| 20494 | |||
| 20495 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | ||
| 20496 | if test "x$ac_cv_type_pid_t" = x""yes; then : | ||
| 20497 | |||
| 20498 | else | ||
| 20499 | |||
| 20500 | cat >>confdefs.h <<_ACEOF | ||
| 20501 | #define pid_t int | ||
| 20502 | _ACEOF | ||
| 20503 | |||
| 20504 | fi | ||
| 20505 | |||
| 20506 | for ac_header in vfork.h | ||
| 20507 | do : | ||
| 20508 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | ||
| 20509 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | ||
| 20510 | cat >>confdefs.h <<_ACEOF | ||
| 20511 | #define HAVE_VFORK_H 1 | ||
| 20512 | _ACEOF | ||
| 20513 | |||
| 20514 | fi | ||
| 20515 | |||
| 20516 | done | ||
| 20517 | |||
| 20518 | for ac_func in fork vfork | ||
| 20519 | do : | ||
| 20520 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
| 20521 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | ||
| 20522 | eval as_val=\$$as_ac_var | ||
| 20523 | if test "x$as_val" = x""yes; then : | ||
| 20524 | cat >>confdefs.h <<_ACEOF | ||
| 20525 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
| 20526 | _ACEOF | ||
| 20527 | |||
| 20528 | fi | ||
| 20529 | done | ||
| 20530 | |||
| 20531 | if test "x$ac_cv_func_fork" = xyes; then | ||
| 20532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | ||
| 20533 | $as_echo_n "checking for working fork... " >&6; } | ||
| 20534 | if test "${ac_cv_func_fork_works+set}" = set; then : | ||
| 20535 | $as_echo_n "(cached) " >&6 | ||
| 20536 | else | ||
| 20537 | if test "$cross_compiling" = yes; then : | ||
| 20538 | ac_cv_func_fork_works=cross | ||
| 20539 | else | ||
| 20540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20541 | /* end confdefs.h. */ | ||
| 20542 | $ac_includes_default | ||
| 20543 | int | ||
| 20544 | main () | ||
| 20545 | { | ||
| 20546 | |||
| 20547 | /* By Ruediger Kuhlmann. */ | ||
| 20548 | return fork () < 0; | ||
| 20549 | |||
| 20550 | ; | ||
| 20551 | return 0; | ||
| 20552 | } | ||
| 20553 | _ACEOF | ||
| 20554 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 20555 | ac_cv_func_fork_works=yes | ||
| 20556 | else | ||
| 20557 | ac_cv_func_fork_works=no | ||
| 20558 | fi | ||
| 20559 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 20560 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 20561 | fi | ||
| 20562 | |||
| 20563 | fi | ||
| 20564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | ||
| 20565 | $as_echo "$ac_cv_func_fork_works" >&6; } | ||
| 20566 | |||
| 20567 | else | ||
| 20568 | ac_cv_func_fork_works=$ac_cv_func_fork | ||
| 20569 | fi | ||
| 20570 | if test "x$ac_cv_func_fork_works" = xcross; then | ||
| 20571 | case $host in | ||
| 20572 | *-*-amigaos* | *-*-msdosdjgpp*) | ||
| 20573 | # Override, as these systems have only a dummy fork() stub | ||
| 20574 | ac_cv_func_fork_works=no | ||
| 20575 | ;; | ||
| 20576 | *) | ||
| 20577 | ac_cv_func_fork_works=yes | ||
| 20578 | ;; | ||
| 20579 | esac | ||
| 20580 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | ||
| 20581 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | ||
| 20582 | fi | ||
| 20583 | ac_cv_func_vfork_works=$ac_cv_func_vfork | ||
| 20584 | if test "x$ac_cv_func_vfork" = xyes; then | ||
| 20585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | ||
| 20586 | $as_echo_n "checking for working vfork... " >&6; } | ||
| 20587 | if test "${ac_cv_func_vfork_works+set}" = set; then : | ||
| 20588 | $as_echo_n "(cached) " >&6 | ||
| 20589 | else | ||
| 20590 | if test "$cross_compiling" = yes; then : | ||
| 20591 | ac_cv_func_vfork_works=cross | ||
| 20592 | else | ||
| 20593 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20594 | /* end confdefs.h. */ | ||
| 20595 | /* Thanks to Paul Eggert for this test. */ | ||
| 20596 | $ac_includes_default | ||
| 20597 | #include <sys/wait.h> | ||
| 20598 | #ifdef HAVE_VFORK_H | ||
| 20599 | # include <vfork.h> | ||
| 20600 | #endif | ||
| 20601 | /* On some sparc systems, changes by the child to local and incoming | ||
| 20602 | argument registers are propagated back to the parent. The compiler | ||
| 20603 | is told about this with #include <vfork.h>, but some compilers | ||
| 20604 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | ||
| 20605 | static variable whose address is put into a register that is | ||
| 20606 | clobbered by the vfork. */ | ||
| 20607 | static void | ||
| 20608 | #ifdef __cplusplus | ||
| 20609 | sparc_address_test (int arg) | ||
| 20610 | # else | ||
| 20611 | sparc_address_test (arg) int arg; | ||
| 20612 | #endif | ||
| 20613 | { | ||
| 20614 | static pid_t child; | ||
| 20615 | if (!child) { | ||
| 20616 | child = vfork (); | ||
| 20617 | if (child < 0) { | ||
| 20618 | perror ("vfork"); | ||
| 20619 | _exit(2); | ||
| 20620 | } | ||
| 20621 | if (!child) { | ||
| 20622 | arg = getpid(); | ||
| 20623 | write(-1, "", 0); | ||
| 20624 | _exit (arg); | ||
| 20625 | } | ||
| 20626 | } | ||
| 20627 | } | ||
| 20628 | |||
| 20629 | int | ||
| 20630 | main () | ||
| 20631 | { | ||
| 20632 | pid_t parent = getpid (); | ||
| 20633 | pid_t child; | ||
| 20634 | |||
| 20635 | sparc_address_test (0); | ||
| 20636 | |||
| 20637 | child = vfork (); | ||
| 20638 | |||
| 20639 | if (child == 0) { | ||
| 20640 | /* Here is another test for sparc vfork register problems. This | ||
| 20641 | test uses lots of local variables, at least as many local | ||
| 20642 | variables as main has allocated so far including compiler | ||
| 20643 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | ||
| 20644 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | ||
| 20645 | reuse the register of parent for one of the local variables, | ||
| 20646 | since it will think that parent can't possibly be used any more | ||
| 20647 | in this routine. Assigning to the local variable will thus | ||
| 20648 | munge parent in the parent process. */ | ||
| 20649 | pid_t | ||
| 20650 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | ||
| 20651 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | ||
| 20652 | /* Convince the compiler that p..p7 are live; otherwise, it might | ||
| 20653 | use the same hardware register for all 8 local variables. */ | ||
| 20654 | if (p != p1 || p != p2 || p != p3 || p != p4 | ||
| 20655 | || p != p5 || p != p6 || p != p7) | ||
| 20656 | _exit(1); | ||
| 20657 | |||
| 20658 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | ||
| 20659 | from child file descriptors. If the child closes a descriptor | ||
| 20660 | before it execs or exits, this munges the parent's descriptor | ||
| 20661 | as well. Test for this by closing stdout in the child. */ | ||
| 20662 | _exit(close(fileno(stdout)) != 0); | ||
| 20663 | } else { | ||
| 20664 | int status; | ||
| 20665 | struct stat st; | ||
| 20666 | |||
| 20667 | while (wait(&status) != child) | ||
| 20668 | ; | ||
| 20669 | return ( | ||
| 20670 | /* Was there some problem with vforking? */ | ||
| 20671 | child < 0 | ||
| 20672 | |||
| 20673 | /* Did the child fail? (This shouldn't happen.) */ | ||
| 20674 | || status | ||
| 20675 | |||
| 20676 | /* Did the vfork/compiler bug occur? */ | ||
| 20677 | || parent != getpid() | ||
| 20678 | |||
| 20679 | /* Did the file descriptor bug occur? */ | ||
| 20680 | || fstat(fileno(stdout), &st) != 0 | ||
| 20681 | ); | ||
| 20682 | } | ||
| 20683 | } | ||
| 20684 | _ACEOF | ||
| 20685 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 20686 | ac_cv_func_vfork_works=yes | ||
| 20687 | else | ||
| 20688 | ac_cv_func_vfork_works=no | ||
| 20689 | fi | ||
| 20690 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 20691 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 20692 | fi | ||
| 20693 | |||
| 20694 | fi | ||
| 20695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | ||
| 20696 | $as_echo "$ac_cv_func_vfork_works" >&6; } | ||
| 20697 | |||
| 20698 | fi; | ||
| 20699 | if test "x$ac_cv_func_fork_works" = xcross; then | ||
| 20700 | ac_cv_func_vfork_works=$ac_cv_func_vfork | ||
| 20701 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | ||
| 20702 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | ||
| 20703 | fi | ||
| 20704 | |||
| 20705 | if test "x$ac_cv_func_vfork_works" = xyes; then | ||
| 20706 | |||
| 20707 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | ||
| 20708 | |||
| 20709 | else | ||
| 20710 | |||
| 20711 | $as_echo "#define vfork fork" >>confdefs.h | ||
| 20712 | |||
| 20713 | fi | ||
| 20714 | if test "x$ac_cv_func_fork_works" = xyes; then | ||
| 20715 | |||
| 20716 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | ||
| 20717 | |||
| 20718 | fi | ||
| 20719 | |||
| 20720 | |||
| 20721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | ||
| 20722 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | ||
| 20723 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | ||
| 20724 | $as_echo_n "(cached) " >&6 | ||
| 20725 | else | ||
| 20726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20727 | /* end confdefs.h. */ | ||
| 20728 | #include <langinfo.h> | ||
| 20729 | int | ||
| 20730 | main () | ||
| 20731 | { | ||
| 20732 | char* cs = nl_langinfo(CODESET); | ||
| 20733 | ; | ||
| 20734 | return 0; | ||
| 20735 | } | ||
| 20736 | _ACEOF | ||
| 20737 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 20738 | emacs_cv_langinfo_codeset=yes | ||
| 20739 | else | ||
| 20740 | emacs_cv_langinfo_codeset=no | ||
| 20741 | fi | ||
| 20742 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 20743 | conftest$ac_exeext conftest.$ac_ext | ||
| 20744 | |||
| 20745 | fi | ||
| 20746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | ||
| 20747 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | ||
| 20748 | if test $emacs_cv_langinfo_codeset = yes; then | ||
| 20749 | |||
| 20750 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | ||
| 20751 | |||
| 20752 | fi | ||
| 20753 | |||
| 20754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 | ||
| 20755 | $as_echo_n "checking for mbstate_t... " >&6; } | ||
| 20756 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | ||
| 20757 | $as_echo_n "(cached) " >&6 | ||
| 20758 | else | ||
| 20759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20760 | /* end confdefs.h. */ | ||
| 20761 | $ac_includes_default | ||
| 20762 | # include <wchar.h> | ||
| 20763 | int | ||
| 20764 | main () | ||
| 20765 | { | ||
| 20766 | mbstate_t x; return sizeof x; | ||
| 20767 | ; | ||
| 20768 | return 0; | ||
| 20769 | } | ||
| 20770 | _ACEOF | ||
| 20771 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 20772 | ac_cv_type_mbstate_t=yes | ||
| 20773 | else | ||
| 20774 | ac_cv_type_mbstate_t=no | ||
| 20775 | fi | ||
| 20776 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 20777 | fi | ||
| 20778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | ||
| 20779 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | ||
| 20780 | if test $ac_cv_type_mbstate_t = yes; then | ||
| 20781 | |||
| 20782 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h | ||
| 20783 | |||
| 20784 | else | ||
| 20785 | |||
| 20786 | $as_echo "#define mbstate_t int" >>confdefs.h | ||
| 20787 | |||
| 20788 | fi | ||
| 20789 | |||
| 20790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 | ||
| 20791 | $as_echo_n "checking for C restricted array declarations... " >&6; } | ||
| 20792 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | ||
| 20793 | $as_echo_n "(cached) " >&6 | ||
| 20794 | else | ||
| 20795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20796 | /* end confdefs.h. */ | ||
| 20797 | void fred (int x[__restrict]); | ||
| 20798 | int | ||
| 20799 | main () | ||
| 20800 | { | ||
| 20801 | |||
| 20802 | ; | ||
| 20803 | return 0; | ||
| 20804 | } | ||
| 20805 | _ACEOF | ||
| 20806 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 20807 | emacs_cv_c_restrict_arr=yes | ||
| 20808 | else | ||
| 20809 | emacs_cv_c_restrict_arr=no | ||
| 20810 | fi | ||
| 20811 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 20812 | fi | ||
| 20813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | ||
| 20814 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | ||
| 20815 | if test "$emacs_cv_c_restrict_arr" = yes; then | ||
| 20816 | |||
| 20817 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h | ||
| 20818 | |||
| 20819 | fi | ||
| 20820 | |||
| 20821 | |||
| 20822 | |||
| 20823 | # Set up the CFLAGS for real compilation, so we can substitute it. | ||
| 20824 | CFLAGS="$REAL_CFLAGS" | ||
| 20825 | CPPFLAGS="$REAL_CPPFLAGS" | ||
| 20826 | |||
| 20827 | ## Hack to detect a buggy GCC version. | ||
| 20828 | if test "x$GCC" = xyes \ | ||
| 20829 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | ||
| 20830 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | ||
| 20831 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | ||
| 20832 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | ||
| 20833 | fi | ||
| 20834 | |||
| 20835 | version=$PACKAGE_VERSION | ||
| 20836 | |||
| 20837 | ### Specify what sort of things we'll be editing into Makefile and config.h. | ||
| 20838 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | ||
| 20839 | |||
| 20840 | |||
| 20841 | ## Unused? | ||
| 20842 | |||
| 20843 | |||
| 20844 | |||
| 20845 | |||
| 20846 | |||
| 20847 | |||
| 20848 | |||
| 20849 | |||
| 20850 | |||
| 20851 | |||
| 20852 | |||
| 20853 | |||
| 20854 | |||
| 20855 | |||
| 20856 | |||
| 20857 | |||
| 20858 | |||
| 20859 | |||
| 20860 | |||
| 20861 | |||
| 20862 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. | ||
| 20863 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | ||
| 20864 | ## end of LIBX_BASE, but nothing ever set it. | ||
| 20865 | |||
| 20866 | |||
| 20867 | |||
| 20868 | |||
| 20869 | ## Used in lwlib/Makefile.in. | ||
| 20870 | |||
| 20871 | if test -n "${machfile}"; then | ||
| 20872 | M_FILE="\$(srcdir)/${machfile}" | ||
| 20873 | else | ||
| 20874 | M_FILE= | ||
| 20875 | fi | ||
| 20876 | S_FILE="\$(srcdir)/${opsysfile}" | ||
| 20877 | |||
| 20878 | |||
| 20879 | |||
| 20880 | |||
| 20881 | |||
| 20882 | |||
| 20883 | |||
| 20884 | |||
| 20885 | |||
| 20886 | |||
| 20887 | cat >>confdefs.h <<_ACEOF | ||
| 20888 | #define EMACS_CONFIGURATION "${canonical}" | ||
| 20889 | _ACEOF | ||
| 20890 | |||
| 20891 | |||
| 20892 | cat >>confdefs.h <<_ACEOF | ||
| 20893 | #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" | ||
| 20894 | _ACEOF | ||
| 20895 | |||
| 20896 | if test -n "$machfile"; then | ||
| 20897 | |||
| 20898 | cat >>confdefs.h <<_ACEOF | ||
| 20899 | #define config_machfile "${machfile}" | ||
| 20900 | _ACEOF | ||
| 20901 | |||
| 20902 | fi | ||
| 20903 | |||
| 20904 | cat >>confdefs.h <<_ACEOF | ||
| 20905 | #define config_opsysfile "${opsysfile}" | ||
| 20906 | _ACEOF | ||
| 20907 | |||
| 20908 | |||
| 20909 | XMENU_OBJ= | ||
| 20910 | XOBJ= | ||
| 20911 | FONT_OBJ= | ||
| 20912 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | ||
| 20913 | |||
| 20914 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | ||
| 20915 | |||
| 20916 | XMENU_OBJ=xmenu.o | ||
| 20917 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | ||
| 20918 | FONT_OBJ=xfont.o | ||
| 20919 | if test "$HAVE_XFT" = "yes"; then | ||
| 20920 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | ||
| 20921 | elif test "$HAVE_FREETYPE" = "yes"; then | ||
| 20922 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | ||
| 20923 | fi | ||
| 20924 | |||
| 20925 | fi | ||
| 20926 | |||
| 20927 | |||
| 20928 | |||
| 20929 | |||
| 20930 | WIDGET_OBJ= | ||
| 20931 | MOTIF_LIBW= | ||
| 20932 | if test "${USE_X_TOOLKIT}" != "none" ; then | ||
| 20933 | WIDGET_OBJ=widget.o | ||
| 20934 | |||
| 20935 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | ||
| 20936 | |||
| 20937 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | ||
| 20938 | |||
| 20939 | $as_echo "#define USE_LUCID 1" >>confdefs.h | ||
| 20940 | |||
| 20941 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then | ||
| 20942 | |||
| 20943 | $as_echo "#define USE_MOTIF 1" >>confdefs.h | ||
| 20944 | |||
| 20945 | MOTIF_LIBW=-lXm | ||
| 20946 | case "$opsys" in | ||
| 20947 | gnu-linux) | ||
| 20948 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | ||
| 20949 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | ||
| 20950 | ;; | ||
| 20951 | |||
| 20952 | unixware) | ||
| 20953 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | ||
| 20954 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | ||
| 20955 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | ||
| 20956 | ;; | ||
| 20957 | |||
| 20958 | aix4-2) | ||
| 20959 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | ||
| 20960 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | ||
| 20961 | ;; | ||
| 20962 | esac | ||
| 20963 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | ||
| 20964 | fi | ||
| 20965 | fi | ||
| 20966 | |||
| 20967 | |||
| 20968 | TOOLKIT_LIBW= | ||
| 20969 | case "$USE_X_TOOLKIT" in | ||
| 20970 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | ||
| 20971 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | ||
| 20972 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | ||
| 20973 | esac | ||
| 20974 | |||
| 20975 | |||
| 20976 | if test "$USE_X_TOOLKIT" = "none"; then | ||
| 20977 | LIBXT_OTHER="\$(LIBXSM)" | ||
| 20978 | OLDXMENU_TARGET="really-oldXMenu" | ||
| 20979 | else | ||
| 20980 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | ||
| 20981 | OLDXMENU_TARGET="really-lwlib" | ||
| 20982 | fi | ||
| 20983 | |||
| 20984 | |||
| 20985 | ## The X Menu stuff is present in the X10 distribution, but missing | ||
| 20986 | ## from X11. If we have X10, just use the installed library; | ||
| 20987 | ## otherwise, use our own copy. | ||
| 20988 | if test "${HAVE_X11}" = "yes" ; then | ||
| 20989 | |||
| 20990 | $as_echo "#define HAVE_X11 1" >>confdefs.h | ||
| 20991 | |||
| 20992 | |||
| 20993 | if test "$USE_X_TOOLKIT" = "none"; then | ||
| 20994 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | ||
| 20995 | else | ||
| 20996 | OLDXMENU="\${lwlibdir}/liblw.a" | ||
| 20997 | fi | ||
| 20998 | LIBXMENU="\$(OLDXMENU)" | ||
| 20999 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | ||
| 21000 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | ||
| 21001 | else | ||
| 21002 | ## For a syntactically valid Makefile; not actually used for anything. | ||
| 21003 | ## See comments in src/Makefile.in. | ||
| 21004 | OLDXMENU=nothing | ||
| 21005 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | ||
| 21006 | if test "${HAVE_X_WINDOWS}" = "yes"; then | ||
| 21007 | LIBXMENU="-lXMenu" | ||
| 21008 | else | ||
| 21009 | LIBXMENU= | ||
| 21010 | fi | ||
| 21011 | LIBX_OTHER= | ||
| 21012 | OLDXMENU_DEPS= | ||
| 21013 | fi | ||
| 21014 | |||
| 21015 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | ||
| 21016 | OLDXMENU_TARGET= | ||
| 21017 | OLDXMENU=nothing | ||
| 21018 | LIBXMENU= | ||
| 21019 | OLDXMENU_DEPS= | ||
| 21020 | fi | ||
| 21021 | |||
| 21022 | |||
| 21023 | |||
| 21024 | |||
| 21025 | |||
| 21026 | |||
| 21027 | |||
| 21028 | if test "${HAVE_MENUS}" = "yes" ; then | ||
| 21029 | |||
| 21030 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h | ||
| 21031 | |||
| 21032 | fi | ||
| 21033 | |||
| 21034 | if test "${GNU_MALLOC}" = "yes" ; then | ||
| 21035 | |||
| 21036 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h | ||
| 21037 | |||
| 21038 | fi | ||
| 21039 | |||
| 21040 | RALLOC_OBJ= | ||
| 21041 | if test "${REL_ALLOC}" = "yes" ; then | ||
| 21042 | |||
| 21043 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | ||
| 21044 | |||
| 21045 | |||
| 21046 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | ||
| 21047 | fi | ||
| 21048 | |||
| 21049 | |||
| 21050 | if test "$opsys" = "cygwin"; then | ||
| 21051 | CYGWIN_OBJ="sheap.o" | ||
| 21052 | ## Cygwin differs because of its unexec(). | ||
| 21053 | PRE_ALLOC_OBJ= | ||
| 21054 | POST_ALLOC_OBJ=lastfile.o | ||
| 21055 | else | ||
| 21056 | CYGWIN_OBJ= | ||
| 21057 | PRE_ALLOC_OBJ=lastfile.o | ||
| 21058 | POST_ALLOC_OBJ= | ||
| 21059 | fi | ||
| 21060 | |||
| 21061 | |||
| 21062 | |||
| 21063 | |||
| 21064 | |||
| 21065 | case "$opsys" in | 21503 | case "$opsys" in |
| 21066 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | 21504 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; |
| 21067 | 21505 | ||
| @@ -21472,10 +21910,18 @@ if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test | |||
| 21472 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. | 21910 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. |
| 21473 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 21911 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 21474 | fi | 21912 | fi |
| 21913 | if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then | ||
| 21914 | as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined. | ||
| 21915 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
| 21916 | fi | ||
| 21475 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then | 21917 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then |
| 21476 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. | 21918 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. |
| 21477 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 21919 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 21478 | fi | 21920 | fi |
| 21921 | if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then | ||
| 21922 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. | ||
| 21923 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
| 21924 | fi | ||
| 21479 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then | 21925 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then |
| 21480 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. | 21926 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. |
| 21481 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 21927 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 87d1211587f..ae732a7db0f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2011-07-11 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * killing.texi (Killing, Deletion and Killing, Killing by Lines) | ||
| 4 | (Other Kill Commands, Kill Options): Copyedits. | ||
| 5 | (Deletion and Killing, Kill Ring): Kill/yank now use clipboard. | ||
| 6 | (Yanking): Move yank-excluded properties discussion here. | ||
| 7 | (Cut and Paste): Move from frames.texi. Update subnodes to | ||
| 8 | describe x-select-enable-clipboard case. | ||
| 9 | |||
| 10 | * frames.texi: Move Cut and Paste node and subnodes into | ||
| 11 | killing.texi, except Mouse Commands and Word and Line Mouse. | ||
| 12 | |||
| 13 | 2011-07-10 Andy Moreton <andrewjmoreton@gmail.com> (tiny change) | ||
| 14 | |||
| 15 | * makefile.w32-in (EMACSSOURCES): Replace major.texi with modes.texi. | ||
| 16 | |||
| 17 | 2011-07-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 18 | |||
| 19 | * screen.texi (Mode Line): Clarify that coding systems are | ||
| 20 | characters, not letters (bug#1749). | ||
| 21 | |||
| 22 | * cmdargs.texi (Environment): Mention removing variables | ||
| 23 | (bug#1615). Text suggested by Kevin Rodgers. | ||
| 24 | |||
| 25 | 2011-07-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 26 | |||
| 27 | * misc.texi (Amusements): Don't mention Yow; it's crippled. | ||
| 28 | |||
| 29 | * modes.texi: Rename from major.texi. | ||
| 30 | (Modes): New node. Make Major Modes and Minor Modes subsections | ||
| 31 | of this. All callers changed. | ||
| 32 | |||
| 33 | * custom.texi (Minor Modes): Move to modes.texi. | ||
| 34 | |||
| 35 | 2011-07-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 36 | |||
| 37 | * custom.texi (Syntax): Node deleted. | ||
| 38 | |||
| 39 | * help.texi (Help Summary): | ||
| 40 | * major.texi (Major Modes): | ||
| 41 | * programs.texi (Parentheses): | ||
| 42 | * search.texi (Regexp Backslash, Regexp Backslash) | ||
| 43 | (Regexp Backslash): | ||
| 44 | * text.texi (Words): Callers changed. | ||
| 45 | |||
| 46 | * text.texi (Refill, Longlines): Delete nodes. | ||
| 47 | |||
| 48 | * ack.texi (Acknowledgments): Longlines removed from manual. | ||
| 49 | |||
| 50 | * emacs.texi (Top): Update node listing. | ||
| 51 | |||
| 1 | 2011-07-09 Glenn Morris <rgm@gnu.org> | 52 | 2011-07-09 Glenn Morris <rgm@gnu.org> |
| 2 | 53 | ||
| 3 | * fortran-xtra.texi (Fortran): Update handled extensions. | 54 | * fortran-xtra.texi (Fortran): Update handled extensions. |
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index aca17ce817d..9465c726eba 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in | |||
| @@ -84,7 +84,7 @@ EMACSSOURCES= \ | |||
| 84 | ${srcdir}/windows.texi \ | 84 | ${srcdir}/windows.texi \ |
| 85 | ${srcdir}/frames.texi \ | 85 | ${srcdir}/frames.texi \ |
| 86 | ${srcdir}/mule.texi \ | 86 | ${srcdir}/mule.texi \ |
| 87 | ${srcdir}/major.texi \ | 87 | ${srcdir}/modes.texi \ |
| 88 | ${srcdir}/indent.texi \ | 88 | ${srcdir}/indent.texi \ |
| 89 | ${srcdir}/text.texi \ | 89 | ${srcdir}/text.texi \ |
| 90 | ${srcdir}/programs.texi \ | 90 | ${srcdir}/programs.texi \ |
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index e554c71703f..1cfb3d9ffe9 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi | |||
| @@ -190,9 +190,7 @@ prior to Emacs 23 for Mac OS. | |||
| 190 | 190 | ||
| 191 | @item | 191 | @item |
| 192 | Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many | 192 | Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many |
| 193 | improvements to the Emacs display engine; and, together with Kai | 193 | improvements to the Emacs display engine. |
| 194 | Großjohann and Alex Schroeder, wrote @file{longlines.el}, a minor | ||
| 195 | mode for wrapping long lines. | ||
| 196 | 194 | ||
| 197 | @item | 195 | @item |
| 198 | James Clark wrote SGML mode, a mode for editing SGML documents; and | 196 | 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 | |||
| 689 | for motion in ``CapitalizedWordIdentifiers''; @file{latin1-disp.el}, a | 687 | for motion in ``CapitalizedWordIdentifiers''; @file{latin1-disp.el}, a |
| 690 | package that lets you display ISO 8859 characters on Latin-1 terminals | 688 | package that lets you display ISO 8859 characters on Latin-1 terminals |
| 691 | by setting up appropriate display tables; @file{python.el}, a major mode | 689 | by setting up appropriate display tables; @file{python.el}, a major mode |
| 692 | for the Python programming language; @file{refill.el}, a mode for | 690 | for the Python programming language; @file{smiley.el}, a facility for |
| 693 | automatic paragraph refilling, akin to typical word processors; | 691 | displaying smiley faces; @file{sym-comp.el}, a library for performing |
| 694 | @file{smiley.el}, a facility for displaying smiley faces; | 692 | mode-dependent symbol completion; @file{benchmark.el} for timing code |
| 695 | @file{sym-comp.el}, a library for performing mode-dependent symbol | 693 | execution; and @file{tool-bar.el}, a mode to control the display of |
| 696 | completion; @file{benchmark.el} for timing code execution; and | 694 | the Emacs tool bar. With Riccardo Murri he wrote @file{vc-bzr.el}, |
| 697 | @file{tool-bar.el}, a mode to control the display of the Emacs tool bar. | 695 | support for the Bazaar version control system. |
| 698 | With Riccardo Murri he wrote @file{vc-bzr.el}, support for the Bazaar | ||
| 699 | version control system. | ||
| 700 | 696 | ||
| 701 | @item | 697 | @item |
| 702 | Eric Ludlam wrote the Speedbar package; @file{checkdoc.el}, for checking | 698 | Eric Ludlam wrote the Speedbar package; @file{checkdoc.el}, for checking |
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 1c3b85559d2..af493ade2f2 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi | |||
| @@ -427,10 +427,11 @@ software) inherit the environment from Emacs, too. | |||
| 427 | @vindex initial-environment | 427 | @vindex initial-environment |
| 428 | Inside Emacs, the command @kbd{M-x getenv} gets the value of an | 428 | Inside Emacs, the command @kbd{M-x getenv} gets the value of an |
| 429 | environment variable. @kbd{M-x setenv} sets a variable in the Emacs | 429 | environment variable. @kbd{M-x setenv} sets a variable in the Emacs |
| 430 | environment. (Environment variable substitutions with @samp{$} work | 430 | environment, and @kbd{C-u M-x setenv} removes a variable. |
| 431 | in the value just as in file names; see @ref{File Names with $}.) The | 431 | (Environment variable substitutions with @samp{$} work in the value |
| 432 | variable @code{initial-environment} stores the initial environment | 432 | just as in file names; see @ref{File Names with $}.) The variable |
| 433 | inherited by Emacs. | 433 | @code{initial-environment} stores the initial environment inherited by |
| 434 | Emacs. | ||
| 434 | 435 | ||
| 435 | The way to set environment variables outside of Emacs depends on the | 436 | The way to set environment variables outside of Emacs depends on the |
| 436 | operating system, and especially the shell that you are using. For | 437 | operating system, and especially the shell that you are using. For |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 434c574ac42..8465dd93519 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -23,169 +23,16 @@ Reference Manual}. | |||
| 23 | @end ifnottex | 23 | @end ifnottex |
| 24 | 24 | ||
| 25 | @menu | 25 | @menu |
| 26 | * Minor Modes:: Each minor mode is a feature you can turn on | ||
| 27 | independently of any others. | ||
| 28 | * Easy Customization:: Convenient way to browse and change settings. | 26 | * Easy Customization:: Convenient way to browse and change settings. |
| 29 | * Variables:: Many Emacs commands examine Emacs variables | 27 | * Variables:: Many Emacs commands examine Emacs variables |
| 30 | to decide what to do; by setting variables, | 28 | to decide what to do; by setting variables, |
| 31 | you can control their functioning. | 29 | you can control their functioning. |
| 32 | * Key Bindings:: The keymaps say what command each key runs. | 30 | * Key Bindings:: The keymaps say what command each key runs. |
| 33 | By changing them, you can "redefine keys". | 31 | By changing them, you can "redefine keys". |
| 34 | * Syntax:: The syntax table controls how words and | ||
| 35 | expressions are parsed. | ||
| 36 | * Init File:: How to write common customizations in the | 32 | * Init File:: How to write common customizations in the |
| 37 | @file{.emacs} file. | 33 | @file{.emacs} file. |
| 38 | @end menu | 34 | @end menu |
| 39 | 35 | ||
| 40 | @node Minor Modes | ||
| 41 | @section Minor Modes | ||
| 42 | @cindex minor modes | ||
| 43 | @cindex mode, minor | ||
| 44 | |||
| 45 | Minor modes are optional features which you can turn on or off. For | ||
| 46 | example, Auto Fill mode is a minor mode in which @key{SPC} breaks | ||
| 47 | lines between words as you type. Minor modes are independent of one | ||
| 48 | another and of the selected major mode. Most minor modes say in the | ||
| 49 | mode line when they are enabled; for example, @samp{Fill} in the mode | ||
| 50 | line means that Auto Fill mode is enabled. | ||
| 51 | |||
| 52 | Each minor mode is associated with a command, called the @dfn{mode | ||
| 53 | command}, which turns it on or off. The name of this command consists | ||
| 54 | of the name of the minor mode, followed by @samp{-mode}; for instance, | ||
| 55 | the mode command for Auto Fill mode is @code{auto-fill-mode}. Calling | ||
| 56 | the minor mode command with no prefix argument @dfn{toggles} the mode, | ||
| 57 | turning it on if it was off, and off if it was on. A positive | ||
| 58 | argument always turns the mode on, and a zero or negative argument | ||
| 59 | always turns it off. Mode commands are usually invoked with | ||
| 60 | @kbd{M-x}, but you can bind keys to them if you wish (@pxref{Key | ||
| 61 | Bindings}). | ||
| 62 | |||
| 63 | Most minor modes also have a @dfn{mode variable}, with the same name | ||
| 64 | as the mode command. Its value is non-@code{nil} if the mode is | ||
| 65 | enabled, and @code{nil} if it is disabled. In some minor modes---but | ||
| 66 | not all---the value of the variable alone determines whether the mode | ||
| 67 | is active: the mode command works simply by setting the variable, and | ||
| 68 | changing the value of the variable has the same effect as calling the | ||
| 69 | mode command. Because not all minor modes work this way, we recommend | ||
| 70 | that you avoid changing the mode variables directly; use the mode | ||
| 71 | commands instead. | ||
| 72 | |||
| 73 | Some minor modes are @dfn{buffer-local}: they apply only to the | ||
| 74 | current buffer, so you can enable the mode in certain buffers and not | ||
| 75 | others. Other minor modes are @dfn{global}: while enabled, they | ||
| 76 | affect everything you do in the Emacs session, in all buffers. Some | ||
| 77 | global minor modes are enabled by default. | ||
| 78 | |||
| 79 | The following is a list of some buffer-local minor modes: | ||
| 80 | |||
| 81 | @itemize @bullet | ||
| 82 | @item | ||
| 83 | Abbrev mode automatically expands text based on pre-defined | ||
| 84 | abbreviation definitions. @xref{Abbrevs}. | ||
| 85 | |||
| 86 | @item | ||
| 87 | Auto Fill mode inserts newlines as you type to prevent lines from | ||
| 88 | becoming too long. @xref{Filling}. | ||
| 89 | |||
| 90 | @item | ||
| 91 | Auto Save mode saves the buffer contents periodically to reduce the | ||
| 92 | amount of work you can lose in case of a crash. @xref{Auto Save}. | ||
| 93 | |||
| 94 | @item | ||
| 95 | Enriched mode enables editing and saving of formatted text. | ||
| 96 | @xref{Formatted Text}. | ||
| 97 | |||
| 98 | @item | ||
| 99 | Flyspell mode automatically highlights misspelled words. | ||
| 100 | @xref{Spelling}. | ||
| 101 | |||
| 102 | @item | ||
| 103 | Font-Lock mode automatically highlights certain textual units found in | ||
| 104 | programs. It is enabled globally by default, but you can disable it | ||
| 105 | in individual buffers. @xref{Faces}. | ||
| 106 | |||
| 107 | @findex linum-mode | ||
| 108 | @cindex Linum mode | ||
| 109 | @item | ||
| 110 | Linum mode displays each line's line number in the window's left | ||
| 111 | margin. Its mode command is @code{linum-mode}. | ||
| 112 | |||
| 113 | @item | ||
| 114 | Outline minor mode provides similar facilities to the major mode | ||
| 115 | called Outline mode. @xref{Outline Mode}. | ||
| 116 | |||
| 117 | @cindex Overwrite mode | ||
| 118 | @cindex mode, Overwrite | ||
| 119 | @findex overwrite-mode | ||
| 120 | @kindex INSERT | ||
| 121 | @item | ||
| 122 | Overwrite mode causes ordinary printing characters to replace existing | ||
| 123 | text instead of shoving it to the right. For example, if point is in | ||
| 124 | front of the @samp{B} in @samp{FOOBAR}, then in Overwrite mode typing | ||
| 125 | a @kbd{G} changes it to @samp{FOOGAR}, instead of producing | ||
| 126 | @samp{FOOGBAR} as usual. In Overwrite mode, the command @kbd{C-q} | ||
| 127 | inserts the next character whatever it may be, even if it is a | ||
| 128 | digit---this gives you a way to insert a character instead of | ||
| 129 | replacing an existing character. The mode command, | ||
| 130 | @code{overwrite-mode}, is bound to the @key{Insert} key. | ||
| 131 | |||
| 132 | @findex binary-overwrite-mode | ||
| 133 | @item | ||
| 134 | Binary Overwrite mode is a variant of Overwrite mode for editing | ||
| 135 | binary files; it treats newlines and tabs like other characters, so | ||
| 136 | that they overwrite other characters and can be overwritten by them. | ||
| 137 | In Binary Overwrite mode, digits after @kbd{C-q} specify an octal | ||
| 138 | character code, as usual. | ||
| 139 | |||
| 140 | @item | ||
| 141 | Visual Line mode performs ``word wrapping'', causing long lines to be | ||
| 142 | wrapped at word boundaries. @xref{Visual Line Mode}. | ||
| 143 | @end itemize | ||
| 144 | |||
| 145 | Here are some useful global minor modes. Since Line Number mode and | ||
| 146 | Transient Mark mode can be enabled or disabled just by setting the | ||
| 147 | value of the minor mode variable, you @emph{can} set them differently | ||
| 148 | for particular buffers, by explicitly making the corresponding | ||
| 149 | variable local in those buffers. @xref{Locals}. | ||
| 150 | |||
| 151 | @itemize @bullet | ||
| 152 | @item | ||
| 153 | Column Number mode enables display of the current column number in the | ||
| 154 | mode line. @xref{Mode Line}. | ||
| 155 | |||
| 156 | @item | ||
| 157 | Delete Selection mode causes text insertion to first delete the text | ||
| 158 | in the region, if the region is active. @xref{Using Region}. | ||
| 159 | |||
| 160 | @item | ||
| 161 | Icomplete mode displays an indication of available completions when | ||
| 162 | you are in the minibuffer and completion is active. @xref{Completion | ||
| 163 | Options}. | ||
| 164 | |||
| 165 | @item | ||
| 166 | Line Number mode enables display of the current line number in the | ||
| 167 | mode line. It is enabled by default. @xref{Mode Line}. | ||
| 168 | |||
| 169 | @item | ||
| 170 | Menu Bar mode gives each frame a menu bar. It is enabled by default. | ||
| 171 | @xref{Menu Bars}. | ||
| 172 | |||
| 173 | @item | ||
| 174 | Scroll Bar mode gives each window a scroll bar. It is enabled by | ||
| 175 | default, but the scroll bar is only displayed on graphical terminals. | ||
| 176 | @xref{Scroll Bars}. | ||
| 177 | |||
| 178 | @item | ||
| 179 | Tool Bar mode gives each frame a tool bar. It is enabled by default, | ||
| 180 | but the tool bar is only displayed on graphical terminals. @xref{Tool | ||
| 181 | Bars}. | ||
| 182 | |||
| 183 | @item | ||
| 184 | Transient Mark mode highlights the region, and makes many Emacs | ||
| 185 | commands operate on the region when the mark is active. It is enabled | ||
| 186 | by default. @xref{Mark}. | ||
| 187 | @end itemize | ||
| 188 | |||
| 189 | @node Easy Customization | 36 | @node Easy Customization |
| 190 | @section Easy Customization Interface | 37 | @section Easy Customization Interface |
| 191 | 38 | ||
| @@ -2085,36 +1932,6 @@ invoke it; disabling also applies if the command is invoked using | |||
| 2085 | @kbd{M-x}. However, disabling a command has no effect on calling it | 1932 | @kbd{M-x}. However, disabling a command has no effect on calling it |
| 2086 | as a function from Lisp programs. | 1933 | as a function from Lisp programs. |
| 2087 | 1934 | ||
| 2088 | @node Syntax | ||
| 2089 | @section The Syntax Table | ||
| 2090 | @cindex syntax table | ||
| 2091 | |||
| 2092 | All the Emacs commands which parse words or balance parentheses are | ||
| 2093 | controlled by the @dfn{syntax table}. The syntax table says which | ||
| 2094 | characters are opening delimiters, which are parts of words, which are | ||
| 2095 | string quotes, and so on. It does this by assigning each character to | ||
| 2096 | one of fifteen-odd @dfn{syntax classes}. In some cases it specifies | ||
| 2097 | some additional information also. | ||
| 2098 | |||
| 2099 | Each major mode has its own syntax table (though related major modes | ||
| 2100 | sometimes share one syntax table), which it installs in each buffer | ||
| 2101 | that uses the mode. The syntax table installed in the current buffer | ||
| 2102 | is the one that all commands use, so we call it ``the'' syntax table. | ||
| 2103 | |||
| 2104 | @kindex C-h s | ||
| 2105 | @findex describe-syntax | ||
| 2106 | To display a description of the contents of the current syntax | ||
| 2107 | table, type @kbd{C-h s} (@code{describe-syntax}). The description of | ||
| 2108 | each character includes the string you would have to give to | ||
| 2109 | @code{modify-syntax-entry} to set up that character's current syntax, | ||
| 2110 | starting with the character which designates its syntax class, plus | ||
| 2111 | some English text to explain its meaning. | ||
| 2112 | |||
| 2113 | A syntax table is actually a Lisp object, a char-table, whose | ||
| 2114 | elements are cons cells. For full information on the syntax table, | ||
| 2115 | see @ref{Syntax Tables,, Syntax Tables, elisp, The Emacs Lisp | ||
| 2116 | Reference Manual}. | ||
| 2117 | |||
| 2118 | @node Init File | 1935 | @node Init File |
| 2119 | @section The Init File, @file{~/.emacs} | 1936 | @section The Init File, @file{~/.emacs} |
| 2120 | @cindex init file | 1937 | @cindex init file |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index ed7d48877e5..a35736f4fe7 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -167,16 +167,15 @@ Important Text-Changing Commands | |||
| 167 | * Mark:: The mark: how to delimit a ``region'' of text. | 167 | * Mark:: The mark: how to delimit a ``region'' of text. |
| 168 | * Killing:: Killing (cutting) text. | 168 | * Killing:: Killing (cutting) text. |
| 169 | * Yanking:: Recovering killed text. Moving text. (Pasting.) | 169 | * Yanking:: Recovering killed text. Moving text. (Pasting.) |
| 170 | * Cut and Paste:: Clipboard and selections on graphical displays. | ||
| 170 | * Accumulating Text:: Other ways of copying text. | 171 | * Accumulating Text:: Other ways of copying text. |
| 171 | * Rectangles:: Operating on the text inside a rectangle on the screen. | 172 | * Rectangles:: Operating on text in rectangular areas. |
| 172 | * CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} for copy | 173 | * CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} to kill and yank. |
| 173 | and paste, with enhanced rectangle support. | ||
| 174 | * Registers:: Saving a text string or a location in the buffer. | 174 | * Registers:: Saving a text string or a location in the buffer. |
| 175 | * Display:: Controlling what text is displayed. | 175 | * Display:: Controlling what text is displayed. |
| 176 | * Search:: Finding or replacing occurrences of a string. | 176 | * Search:: Finding or replacing occurrences of a string. |
| 177 | * Fixit:: Commands especially useful for fixing typos. | 177 | * Fixit:: Commands especially useful for fixing typos. |
| 178 | * Keyboard Macros:: A keyboard macro records a sequence of | 178 | * Keyboard Macros:: Recording a sequence of keystrokes to be replayed. |
| 179 | keystrokes to be replayed with a single command. | ||
| 180 | 179 | ||
| 181 | Major Structures of Emacs | 180 | Major Structures of Emacs |
| 182 | * Files:: All about handling files. | 181 | * Files:: All about handling files. |
| @@ -186,13 +185,13 @@ Major Structures of Emacs | |||
| 186 | * International:: Using non-@acronym{ASCII} character sets. | 185 | * International:: Using non-@acronym{ASCII} character sets. |
| 187 | 186 | ||
| 188 | Advanced Features | 187 | Advanced Features |
| 189 | * Major Modes:: Text mode vs. Lisp mode vs. C mode... | 188 | * Modes:: Major and minor modes alter Emacs' basic behavior. |
| 190 | * Indentation:: Editing the white space at the beginnings of lines. | 189 | * Indentation:: Editing the white space at the beginnings of lines. |
| 191 | * Text:: Commands and modes for editing English. | 190 | * Text:: Commands and modes for editing English. |
| 192 | * Programs:: Commands and modes for editing programs. | 191 | * Programs:: Commands and modes for editing programs. |
| 193 | * Building:: Compiling, running and debugging programs. | 192 | * Building:: Compiling, running and debugging programs. |
| 194 | * Maintaining:: Features for maintaining large programs. | 193 | * Maintaining:: Features for maintaining large programs. |
| 195 | * Abbrevs:: How to define text abbreviations to reduce | 194 | * Abbrevs:: Defining text abbreviations to reduce |
| 196 | the number of characters you must type. | 195 | the number of characters you must type. |
| 197 | @c AFAICS, the tex stuff generates its own index and does not use this one. | 196 | @c AFAICS, the tex stuff generates its own index and does not use this one. |
| 198 | @ifnottex | 197 | @ifnottex |
| @@ -204,9 +203,9 @@ Advanced Features | |||
| 204 | * Dired:: You can ``edit'' a directory to manage files in it. | 203 | * Dired:: You can ``edit'' a directory to manage files in it. |
| 205 | * Calendar/Diary:: The calendar and diary facilities. | 204 | * Calendar/Diary:: The calendar and diary facilities. |
| 206 | * Document View:: Viewing PDF, PS and DVI files. | 205 | * Document View:: Viewing PDF, PS and DVI files. |
| 207 | * Gnus:: How to read netnews with Emacs. | 206 | * Gnus:: A flexible mail and news reader. |
| 208 | * Shell:: Executing shell commands from Emacs. | 207 | * Shell:: Executing shell commands from Emacs. |
| 209 | * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc. | 208 | * Emacs Server:: Using Emacs as an editing server. |
| 210 | * Printing:: Printing hardcopies of buffers or regions. | 209 | * Printing:: Printing hardcopies of buffers or regions. |
| 211 | * Sorting:: Sorting lines, paragraphs or pages within Emacs. | 210 | * Sorting:: Sorting lines, paragraphs or pages within Emacs. |
| 212 | * Narrowing:: Restricting display and editing to a portion | 211 | * Narrowing:: Restricting display and editing to a portion |
| @@ -331,6 +330,12 @@ Yanking | |||
| 331 | * Appending Kills:: Several kills in a row all yank together. | 330 | * Appending Kills:: Several kills in a row all yank together. |
| 332 | * Earlier Kills:: Yanking something killed some time ago. | 331 | * Earlier Kills:: Yanking something killed some time ago. |
| 333 | 332 | ||
| 333 | Killing and Yanking on Graphical Displays | ||
| 334 | |||
| 335 | * Clipboard:: How Emacs interacts with the system clipboard. | ||
| 336 | * Primary Selection:: The temporarily selected text selection. | ||
| 337 | * Secondary Selection:: Cutting without altering point and mark. | ||
| 338 | |||
| 334 | Registers | 339 | Registers |
| 335 | 340 | ||
| 336 | * RegPos:: Saving positions in registers. | 341 | * RegPos:: Saving positions in registers. |
| @@ -495,7 +500,8 @@ Multiple Windows | |||
| 495 | 500 | ||
| 496 | Frames and Graphical Displays | 501 | Frames and Graphical Displays |
| 497 | 502 | ||
| 498 | * Cut and Paste:: Mouse commands for cut and paste. | 503 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. |
| 504 | * Word and Line Mouse:: Mouse commands for selecting whole words or lines. | ||
| 499 | * Mouse References:: Using the mouse to select an item from a list. | 505 | * Mouse References:: Using the mouse to select an item from a list. |
| 500 | * Menu Mouse Clicks:: Mouse clicks that bring up menus. | 506 | * Menu Mouse Clicks:: Mouse clicks that bring up menus. |
| 501 | * Mode Line Mouse:: Mouse clicks on the mode line. | 507 | * Mode Line Mouse:: Mouse clicks on the mode line. |
| @@ -517,14 +523,6 @@ Frames and Graphical Displays | |||
| 517 | * Non-Window Terminals:: Multiple frames on terminals that show only one. | 523 | * Non-Window Terminals:: Multiple frames on terminals that show only one. |
| 518 | * Text-Only Mouse:: Using the mouse in text-only terminals. | 524 | * Text-Only Mouse:: Using the mouse in text-only terminals. |
| 519 | 525 | ||
| 520 | Killing and Yanking on Graphical Displays | ||
| 521 | |||
| 522 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. | ||
| 523 | * Word and Line Mouse:: Mouse commands for selecting whole words or lines. | ||
| 524 | * Cut/Paste Other App:: Transfering text between Emacs and other apps. | ||
| 525 | * Secondary Selection:: Cutting without altering point and mark. | ||
| 526 | * Clipboard:: Using the clipboard for selections. | ||
| 527 | |||
| 528 | International Character Set Support | 526 | International Character Set Support |
| 529 | 527 | ||
| 530 | * International Chars:: Basic concepts of multibyte characters. | 528 | * International Chars:: Basic concepts of multibyte characters. |
| @@ -551,9 +549,12 @@ International Character Set Support | |||
| 551 | to use without multibyte characters. | 549 | to use without multibyte characters. |
| 552 | * Charsets:: How Emacs groups its internal character codes. | 550 | * Charsets:: How Emacs groups its internal character codes. |
| 553 | 551 | ||
| 554 | Major Modes | 552 | Modes |
| 555 | 553 | ||
| 556 | * Choosing Modes:: How major modes are specified or chosen. | 554 | * Major Modes:: Text mode vs. Lisp mode vs. C mode... |
| 555 | * Minor Modes:: Each minor mode is a feature you can turn on | ||
| 556 | independently of any others. | ||
| 557 | * Choosing Modes:: How modes are chosen when visiting files. | ||
| 557 | 558 | ||
| 558 | Indentation | 559 | Indentation |
| 559 | 560 | ||
| @@ -585,8 +586,6 @@ Filling Text | |||
| 585 | * Fill Prefix:: Filling paragraphs that are indented | 586 | * Fill Prefix:: Filling paragraphs that are indented |
| 586 | or in a comment, etc. | 587 | or in a comment, etc. |
| 587 | * Adaptive Fill:: How Emacs can determine the fill prefix automatically. | 588 | * Adaptive Fill:: How Emacs can determine the fill prefix automatically. |
| 588 | * Refill:: Keeping paragraphs filled. | ||
| 589 | * Longlines:: Editing text with very long lines. | ||
| 590 | 589 | ||
| 591 | Outline Mode | 590 | Outline Mode |
| 592 | 591 | ||
| @@ -1062,16 +1061,12 @@ Hyperlinking and Navigation Features | |||
| 1062 | 1061 | ||
| 1063 | Customization | 1062 | Customization |
| 1064 | 1063 | ||
| 1065 | * Minor Modes:: Each minor mode is a feature you can turn on | ||
| 1066 | independently of any others. | ||
| 1067 | * Easy Customization:: Convenient way to browse and change settings. | 1064 | * Easy Customization:: Convenient way to browse and change settings. |
| 1068 | * Variables:: Many Emacs commands examine Emacs variables | 1065 | * Variables:: Many Emacs commands examine Emacs variables |
| 1069 | to decide what to do; by setting variables, | 1066 | to decide what to do; by setting variables, |
| 1070 | you can control their functioning. | 1067 | you can control their functioning. |
| 1071 | * Key Bindings:: The keymaps say what command each key runs. | 1068 | * Key Bindings:: Keymaps say what command each key runs. |
| 1072 | By changing them, you can "redefine keys". | 1069 | By changing them, you can ``redefine'' keys. |
| 1073 | * Syntax:: The syntax table controls how words and | ||
| 1074 | expressions are parsed. | ||
| 1075 | * Init File:: How to write common customizations in the | 1070 | * Init File:: How to write common customizations in the |
| 1076 | @file{.emacs} file. | 1071 | @file{.emacs} file. |
| 1077 | 1072 | ||
| @@ -1491,7 +1486,7 @@ Lisp programming. | |||
| 1491 | @include windows.texi | 1486 | @include windows.texi |
| 1492 | @include frames.texi | 1487 | @include frames.texi |
| 1493 | @include mule.texi | 1488 | @include mule.texi |
| 1494 | @include major.texi | 1489 | @include modes.texi |
| 1495 | @include indent.texi | 1490 | @include indent.texi |
| 1496 | @include text.texi | 1491 | @include text.texi |
| 1497 | @c Includes fortran-xtra. | 1492 | @c Includes fortran-xtra. |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 633b65251e4..0fc4dfa427d 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. | |||
| 33 | @end ifnottex | 33 | @end ifnottex |
| 34 | 34 | ||
| 35 | @menu | 35 | @menu |
| 36 | * Cut and Paste:: Mouse commands for cut and paste. | 36 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. |
| 37 | * Word and Line Mouse:: Mouse commands for selecting whole words or lines. | ||
| 37 | * Mouse References:: Using the mouse to select an item from a list. | 38 | * Mouse References:: Using the mouse to select an item from a list. |
| 38 | * Menu Mouse Clicks:: Mouse clicks that bring up menus. | 39 | * Menu Mouse Clicks:: Mouse clicks that bring up menus. |
| 39 | * Mode Line Mouse:: Mouse clicks on the mode line. | 40 | * 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. | |||
| 56 | * Text-Only Mouse:: Using the mouse in text-only terminals. | 57 | * Text-Only Mouse:: Using the mouse in text-only terminals. |
| 57 | @end menu | 58 | @end menu |
| 58 | 59 | ||
| 59 | @node Cut and Paste | ||
| 60 | @section Cutting and Pasting on Graphical Displays | ||
| 61 | |||
| 62 | This section describes commands for selecting a region, cutting, and | ||
| 63 | pasting using the mouse. | ||
| 64 | |||
| 65 | @menu | ||
| 66 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. | ||
| 67 | * Word and Line Mouse:: Mouse commands for selecting whole words or lines. | ||
| 68 | * Cut/Paste Other App:: Transfering text between Emacs and other apps. | ||
| 69 | * Secondary Selection:: Cutting without altering point and mark. | ||
| 70 | * Clipboard:: Using the clipboard for selections. | ||
| 71 | @end menu | ||
| 72 | |||
| 73 | @node Mouse Commands | 60 | @node Mouse Commands |
| 74 | @subsection Mouse Commands for Editing | 61 | @section Mouse Commands for Editing |
| 75 | @cindex mouse buttons (what they do) | 62 | @cindex mouse buttons (what they do) |
| 76 | 63 | ||
| 77 | @kindex Mouse-1 | 64 | @kindex Mouse-1 |
| @@ -141,7 +128,7 @@ variable @code{mouse-yank-at-point} to a non-@code{nil} value, | |||
| 141 | @kbd{Mouse-2} does not move point. Then it does not matter where you | 128 | @kbd{Mouse-2} does not move point. Then it does not matter where you |
| 142 | click, or even which of the frame's windows you click on; the yank | 129 | click, or even which of the frame's windows you click on; the yank |
| 143 | occurs at the existing point. This variable also affects yanking the | 130 | occurs at the existing point. This variable also affects yanking the |
| 144 | primary and secondary selections (@pxref{Cut/Paste Other App}). | 131 | primary and secondary selections (@pxref{Primary Selection}). |
| 145 | 132 | ||
| 146 | @findex mouse-save-then-kill | 133 | @findex mouse-save-then-kill |
| 147 | Clicking with the right mouse button, @kbd{Mouse-3}, runs the | 134 | 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. | |||
| 195 | @xref{Using Region}. | 182 | @xref{Using Region}. |
| 196 | 183 | ||
| 197 | @node Word and Line Mouse | 184 | @node Word and Line Mouse |
| 198 | @subsection Mouse Commands for Words and Lines | 185 | @section Mouse Commands for Words and Lines |
| 199 | 186 | ||
| 200 | These variants of @kbd{Mouse-1} select entire words or lines at a | 187 | These variants of @kbd{Mouse-1} select entire words or lines at a |
| 201 | time. Emacs activates the region around the selected text, which is | 188 | time. Emacs activates the region around the selected text, which is |
| @@ -224,164 +211,6 @@ Select the line you click on. | |||
| 224 | Select the text you drag across, in the form of whole lines. | 211 | Select the text you drag across, in the form of whole lines. |
| 225 | @end table | 212 | @end table |
| 226 | 213 | ||
| 227 | @node Cut/Paste Other App | ||
| 228 | @subsection Cut and Paste with Other Window Applications | ||
| 229 | |||
| 230 | @cindex X cutting and pasting | ||
| 231 | @cindex X selection | ||
| 232 | @cindex primary selection | ||
| 233 | @cindex selection, primary | ||
| 234 | When running Emacs under the X window system, you can easily | ||
| 235 | transfer text between Emacs and other X applications using the | ||
| 236 | @dfn{primary selection} (also called the @dfn{X selection}). This is | ||
| 237 | @emph{not} the same thing as the @dfn{clipboard}, which is a separate | ||
| 238 | facility used on desktop environments such as Gnome, and on operating | ||
| 239 | systems such as Microsoft Windows (@pxref{Clipboard}). | ||
| 240 | |||
| 241 | Under X, whenever you select some text in Emacs by dragging or | ||
| 242 | clicking the mouse (@pxref{Mouse Commands}), it is also saved in the | ||
| 243 | primary selection. You can then @dfn{paste} that text into any other | ||
| 244 | X application, usually by clicking @kbd{Mouse-2} in that application. | ||
| 245 | Unlike the Emacs kill ring (@pxref{Kill Ring}), the primary selection | ||
| 246 | has no ``memory'': each time you save something in the primary | ||
| 247 | selection, either in Emacs or in another X application, the previous | ||
| 248 | contents of the primary selection are lost. | ||
| 249 | |||
| 250 | @cindex MS-Windows, and primary selection | ||
| 251 | MS-Windows provides no primary selection, but Emacs emulates it | ||
| 252 | within a single Emacs session, by storing the selected text | ||
| 253 | internally. Therefore, all the features and commands related to the | ||
| 254 | primary selection work on Windows as they do on X, for cutting and | ||
| 255 | pasting within the same session, but not across Emacs sessions or with | ||
| 256 | other applications. | ||
| 257 | |||
| 258 | Whenever you kill some text using a command such as @kbd{C-w} | ||
| 259 | (@code{kill-region}), or copy it into the kill ring using a command | ||
| 260 | such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in | ||
| 261 | the primary selection. @xref{Killing}. | ||
| 262 | |||
| 263 | @vindex select-active-regions | ||
| 264 | If you set the region using the keyboard---for instance, by typing | ||
| 265 | @kbd{C-@key{SPC}} and moving point away from the mark---the text in | ||
| 266 | the region is not normally saved to the primary selection. However, | ||
| 267 | if you change the variable @code{select-active-regions} to @code{t}, | ||
| 268 | the region is saved to the primary selection whenever you activate the | ||
| 269 | mark. Each change to the region also updates the primary selection. | ||
| 270 | |||
| 271 | @vindex yank-pop-change-selection | ||
| 272 | If you change @code{yank-pop-change-selection} to @code{t}, rotating | ||
| 273 | the kill ring with @kbd{M-y} (@code{yank-pop}) also saves the new yank | ||
| 274 | to the primary selection (@pxref{Yanking}). | ||
| 275 | |||
| 276 | @vindex save-interprogram-paste-before-kill | ||
| 277 | If you change @code{save-interprogram-paste-before-kill} to | ||
| 278 | @code{t}, each kill command first saves the existing selection onto | ||
| 279 | the kill ring. This prevents you from losing the existing selection, | ||
| 280 | at the risk of large memory consumption if other applications generate | ||
| 281 | large selections. | ||
| 282 | |||
| 283 | You can yank the primary selection into Emacs using the usual yank | ||
| 284 | commands, such as @kbd{C-y} (@code{yank}) and @kbd{Mouse-2} | ||
| 285 | (@code{mouse-yank-at-click}). These commands actually check the | ||
| 286 | primary selection before referring to the kill ring; if no primary | ||
| 287 | selection is available, the kill ring contents are used. To prevent | ||
| 288 | yank commands from accessing the primary selection, set the variable | ||
| 289 | @code{x-select-enable-primary} to @code{nil}. | ||
| 290 | |||
| 291 | The standard coding system for the primary selection is | ||
| 292 | @code{compound-text-with-extensions}. You may find that the pasted | ||
| 293 | text is not what you expected. In such a case, you can specify | ||
| 294 | another coding system for the selection by typing @kbd{C-x @key{RET} | ||
| 295 | x} or @kbd{C-x @key{RET} X}. Alternatively, you can request a | ||
| 296 | different data type by modifying the variable | ||
| 297 | @code{x-select-request-type}. @xref{Communication Coding}. | ||
| 298 | |||
| 299 | @node Secondary Selection | ||
| 300 | @subsection Secondary Selection | ||
| 301 | @cindex secondary selection | ||
| 302 | |||
| 303 | In addition to the primary selection, the X Window System provides a | ||
| 304 | second similar facility known as the @dfn{secondary selection}. | ||
| 305 | Nowadays, few X applications make use of the secondary selection, but | ||
| 306 | you can access it using the following Emacs commands: | ||
| 307 | |||
| 308 | @table @kbd | ||
| 309 | @findex mouse-set-secondary | ||
| 310 | @kindex M-Drag-Mouse-1 | ||
| 311 | @item M-Drag-Mouse-1 | ||
| 312 | Set the secondary selection, with one end at the place where you press | ||
| 313 | down the button, and the other end at the place where you release it | ||
| 314 | (@code{mouse-set-secondary}). The selected text is highlighted, using | ||
| 315 | the @code{secondary-selection} face, as you drag. The window scrolls | ||
| 316 | automatically if you drag the mouse off the top or bottom of the | ||
| 317 | window, just like @code{mouse-set-region} (@pxref{Mouse Commands}). | ||
| 318 | |||
| 319 | This command does not alter the kill ring. | ||
| 320 | |||
| 321 | @findex mouse-start-secondary | ||
| 322 | @kindex M-Mouse-1 | ||
| 323 | @item M-Mouse-1 | ||
| 324 | Set one endpoint for the @dfn{secondary selection} | ||
| 325 | (@code{mouse-start-secondary}). | ||
| 326 | |||
| 327 | @findex mouse-secondary-save-then-kill | ||
| 328 | @kindex M-Mouse-3 | ||
| 329 | @item M-Mouse-3 | ||
| 330 | Set the secondary selection, with one end at the position clicked and | ||
| 331 | the other at the position specified with @kbd{M-Mouse-1} | ||
| 332 | (@code{mouse-secondary-save-then-kill}). This also puts the selected | ||
| 333 | text in the kill ring. A second @kbd{M-Mouse-3} at the same place | ||
| 334 | kills the secondary selection just made. | ||
| 335 | |||
| 336 | @findex mouse-yank-secondary | ||
| 337 | @kindex M-Mouse-2 | ||
| 338 | @item M-Mouse-2 | ||
| 339 | Insert the secondary selection where you click, placing point at the | ||
| 340 | end of the yanked text (@code{mouse-yank-secondary}). | ||
| 341 | @end table | ||
| 342 | |||
| 343 | Double or triple clicking of @kbd{M-Mouse-1} operates on words and | ||
| 344 | lines, much like @kbd{Mouse-1}. | ||
| 345 | |||
| 346 | If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks | ||
| 347 | at point. Then it does not matter precisely where you click, or even | ||
| 348 | which of the frame's windows you click on. @xref{Mouse Commands}. | ||
| 349 | |||
| 350 | @node Clipboard | ||
| 351 | @subsection Using the Clipboard | ||
| 352 | @cindex clipboard | ||
| 353 | |||
| 354 | In desktop environments such as Gnome, and operating systems such as | ||
| 355 | Microsoft Windows and Mac OS X, you can transfer data (usually text) | ||
| 356 | between different applications using the @dfn{clipboard}. The | ||
| 357 | clipboard is distinct from the primary selection and secondary | ||
| 358 | selection discussed earlier. You can access the clipboard through the | ||
| 359 | @samp{Edit} menu of the menu bar (@pxref{Menu Bar}). | ||
| 360 | |||
| 361 | @cindex cut | ||
| 362 | @findex clipboard-kill-region | ||
| 363 | The command @code{clipboard-kill-region}, which is bound to the | ||
| 364 | @code{Cut} menu item, kills the region and saves it in the clipboard. | ||
| 365 | |||
| 366 | @cindex copy | ||
| 367 | @findex clipboard-kill-ring-save | ||
| 368 | The command @code{clipboard-kill-ring-save}, which is bound to the | ||
| 369 | @code{Copy} menu item, copies the region to the kill ring and saves it | ||
| 370 | in the clipboard. | ||
| 371 | |||
| 372 | @findex clipboard-yank | ||
| 373 | @cindex paste | ||
| 374 | The @code{Paste} menu item in the Edit menu yanks the contents of | ||
| 375 | the clipboard at point (@code{clipboard-yank}). | ||
| 376 | |||
| 377 | @vindex x-select-enable-clipboard | ||
| 378 | You can customize the variable @code{x-select-enable-clipboard} to | ||
| 379 | make the Emacs yank functions consult the clipboard before the primary | ||
| 380 | selection, and to make the kill functions to store in the clipboard as | ||
| 381 | well as the primary selection. Otherwise, these commands do not | ||
| 382 | access the clipboard at all. Using the clipboard is the default on | ||
| 383 | MS-Windows and Mac OS, but not on other systems. | ||
| 384 | |||
| 385 | @node Mouse References | 214 | @node Mouse References |
| 386 | @section Following References with the Mouse | 215 | @section Following References with the Mouse |
| 387 | @kindex Mouse-1 @r{(selection)} | 216 | @kindex Mouse-1 @r{(selection)} |
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 3cf1cc522bf..e37e80bfab8 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. | |||
| 962 | @item Parsing | 962 | @item Parsing |
| 963 | We say that certain Emacs commands parse words or expressions in the | 963 | We say that certain Emacs commands parse words or expressions in the |
| 964 | text being edited. Really, all they know how to do is find the other | 964 | text being edited. Really, all they know how to do is find the other |
| 965 | end of a word or expression. @xref{Syntax}. | 965 | end of a word or expression. |
| 966 | 966 | ||
| 967 | @item Point | 967 | @item Point |
| 968 | Point is the place in the buffer at which insertion and deletion | 968 | Point is the place in the buffer at which insertion and deletion |
| @@ -1212,7 +1212,8 @@ See `font lock.' | |||
| 1212 | @item Syntax Table | 1212 | @item Syntax Table |
| 1213 | The syntax table tells Emacs which characters are part of a word, | 1213 | The syntax table tells Emacs which characters are part of a word, |
| 1214 | which characters balance each other like parentheses, etc. | 1214 | which characters balance each other like parentheses, etc. |
| 1215 | @xref{Syntax}. | 1215 | @xref{Syntax Tables,, Syntax Tables, elisp, The Emacs Lisp Reference |
| 1216 | Manual}. | ||
| 1216 | 1217 | ||
| 1217 | @item Super | 1218 | @item Super |
| 1218 | Super is the name of a modifier bit that a keyboard input character may | 1219 | 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 e00f8b9115a..76a9f2413b1 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -139,8 +139,11 @@ command. | |||
| 139 | @item C-h r | 139 | @item C-h r |
| 140 | Display the Emacs manual in Info (@code{info-emacs-manual}). | 140 | Display the Emacs manual in Info (@code{info-emacs-manual}). |
| 141 | @item C-h s | 141 | @item C-h s |
| 142 | Display the current contents of the syntax table, with an explanation of | 142 | Display the current contents of the @dfn{syntax table}, with an |
| 143 | what they mean (@code{describe-syntax}). @xref{Syntax}. | 143 | explanation of what they mean (@code{describe-syntax}). The syntax |
| 144 | table says which characters are opening delimiters, which are parts of | ||
| 145 | words, which are string quotes, and so on. @xref{Syntax Tables,, | ||
| 146 | Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for details. | ||
| 144 | @item C-h t | 147 | @item C-h t |
| 145 | Enter the Emacs interactive tutorial (@code{help-with-tutorial}). | 148 | Enter the Emacs interactive tutorial (@code{help-with-tutorial}). |
| 146 | @item C-h v @var{var} @key{RET} | 149 | @item C-h v @var{var} @key{RET} |
| @@ -583,7 +586,8 @@ bindings now in effect: first the local bindings of the current minor | |||
| 583 | modes, then the local bindings defined by the current major mode, and | 586 | modes, then the local bindings defined by the current major mode, and |
| 584 | finally the global bindings (@pxref{Key Bindings}). @kbd{C-h s} | 587 | finally the global bindings (@pxref{Key Bindings}). @kbd{C-h s} |
| 585 | displays the contents of the syntax table, with explanations of each | 588 | displays the contents of the syntax table, with explanations of each |
| 586 | character's syntax (@pxref{Syntax}). | 589 | character's syntax (@pxref{Syntax Tables,, Syntax Tables, elisp, The |
| 590 | Emacs Lisp Reference Manual}). | ||
| 587 | 591 | ||
| 588 | You can get a list of subcommands for a particular prefix key by | 592 | You can get a list of subcommands for a particular prefix key by |
| 589 | typing @kbd{C-h} after the prefix key. (There are a few prefix keys | 593 | 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 c4ef4781aaf..e13b2808f09 100644 --- a/doc/emacs/indent.texi +++ b/doc/emacs/indent.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 | 2 | @c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 |
| 3 | @c Free Software Foundation, Inc. | 3 | @c Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Indentation, Text, Major Modes, Top | 5 | @node Indentation, Text, Modes, Top |
| 6 | @chapter Indentation | 6 | @chapter Indentation |
| 7 | @cindex indentation | 7 | @cindex indentation |
| 8 | @cindex tabs | 8 | @cindex tabs |
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 41262e9c2d8..38124fc315a 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi | |||
| @@ -6,20 +6,24 @@ | |||
| 6 | @node Killing, Registers, Mark, Top | 6 | @node Killing, Registers, Mark, Top |
| 7 | @chapter Killing and Moving Text | 7 | @chapter Killing and Moving Text |
| 8 | 8 | ||
| 9 | @dfn{Killing} means erasing text and copying it into the @dfn{kill | 9 | In Emacs, @dfn{killing} means erasing text and copying it into the |
| 10 | ring}, from which you can bring it back into the buffer by | 10 | @dfn{kill ring}. @dfn{Yanking} means bringing text from the kill ring |
| 11 | @dfn{yanking} it. (Some applications use the terms ``cutting'' and | 11 | back into the buffer. (Some applications use the terms ``cutting'' |
| 12 | ``pasting'' for similar operations.) This is the most common way of | 12 | and ``pasting'' for similar operations.) The kill ring is so-named |
| 13 | moving or copying text within Emacs. It is very versatile, because | 13 | because it can be visualized as a set of blocks of text arranged in a |
| 14 | there are commands for killing many different types of syntactic | 14 | ring, which you can access in cyclic order. @xref{Kill Ring}. |
| 15 | units. | 15 | |
| 16 | Killing and yanking are the most common way to move or copy text | ||
| 17 | within Emacs. It is very versatile, because there are commands for | ||
| 18 | killing many different types of syntactic units. | ||
| 16 | 19 | ||
| 17 | @menu | 20 | @menu |
| 18 | * Deletion and Killing:: Commands that remove text. | 21 | * Deletion and Killing:: Commands that remove text. |
| 19 | * Yanking:: Commands that insert text. | 22 | * Yanking:: Commands that insert text. |
| 23 | * Cut and Paste:: Clipboard and selections on graphical displays. | ||
| 20 | * Accumulating Text:: Other methods to add text to the buffer. | 24 | * Accumulating Text:: Other methods to add text to the buffer. |
| 21 | * Rectangles:: Operating on text in rectangular areas. | 25 | * Rectangles:: Operating on text in rectangular areas. |
| 22 | * CUA Bindings:: Using C-x/C-c/C-v to kill and yank. | 26 | * CUA Bindings:: Using @kbd{C-x}/@kbd{C-c}/@kbd{C-v} to kill and yank. |
| 23 | @end menu | 27 | @end menu |
| 24 | 28 | ||
| 25 | @node Deletion and Killing | 29 | @node Deletion and Killing |
| @@ -29,25 +33,28 @@ units. | |||
| 29 | @cindex cutting text | 33 | @cindex cutting text |
| 30 | @cindex deletion | 34 | @cindex deletion |
| 31 | Most commands which erase text from the buffer save it in the kill | 35 | Most commands which erase text from the buffer save it in the kill |
| 32 | ring. These are known as @dfn{kill} commands. The kill ring stores | 36 | ring. These are known as @dfn{kill} commands, and their names |
| 33 | several recent kills, not just the last one, so killing is a very safe | 37 | normally contain the word @samp{kill} (e.g. @code{kill-line}). The |
| 34 | operation: when you make a new kill, you don't have to worry much | 38 | kill ring stores several recent kills, not just the last one, so |
| 35 | about losing text that you previously killed. | 39 | killing is a very safe operation: you don't have to worry much about |
| 40 | losing text that you previously killed. The kill ring is shared by | ||
| 41 | all buffers, so text that is killed in one buffer can be yanked into | ||
| 42 | another buffer. | ||
| 43 | |||
| 44 | When you use @kbd{C-/} (@code{undo}) to undo a kill command | ||
| 45 | (@pxref{Undo}), that brings the killed text back into the buffer, but | ||
| 46 | does not remove it from the kill ring. | ||
| 36 | 47 | ||
| 37 | You can yank text from the kill ring into any position in a buffer, | 48 | On graphical displays, killing text also copies it to the system |
| 38 | including a position in a different buffer; the kill ring is shared by | 49 | clipboard. @xref{Cut and Paste}. |
| 39 | all buffers. The @kbd{C-/} (@code{undo}) command can undo both kill | ||
| 40 | and delete commands (@pxref{Undo}); the importance of the kill ring is | ||
| 41 | that you can yank the text in a different place. | ||
| 42 | 50 | ||
| 43 | Commands that erase text but do not save it in the kill ring are | 51 | Commands that erase text but do not save it in the kill ring are |
| 44 | known as @dfn{delete} commands. These include @kbd{C-d} | 52 | known as @dfn{delete} commands; their names usually contain the word |
| 45 | (@code{delete-char}) and @key{DEL} (@code{delete-backward-char}), | 53 | @samp{delete}. These include @kbd{C-d} (@code{delete-char}) and |
| 46 | which delete only one character at a time, and those commands that | 54 | @key{DEL} (@code{delete-backward-char}), which delete only one |
| 47 | delete only spaces or newlines. Commands that can erase significant | 55 | character at a time, and those commands that delete only spaces or |
| 48 | amounts of nontrivial data generally do a kill operation instead. The | 56 | newlines. Commands that can erase significant amounts of nontrivial |
| 49 | commands' names and individual descriptions use the words @samp{kill} | 57 | data generally do a kill operation instead. |
| 50 | and @samp{delete} to say which kind of operation they perform. | ||
| 51 | 58 | ||
| 52 | You can also use the mouse to kill and yank. @xref{Cut and Paste}. | 59 | You can also use the mouse to kill and yank. @xref{Cut and Paste}. |
| 53 | 60 | ||
| @@ -127,21 +134,22 @@ Kill an entire line at once (@code{kill-whole-line}) | |||
| 127 | 134 | ||
| 128 | @kindex C-k | 135 | @kindex C-k |
| 129 | @findex kill-line | 136 | @findex kill-line |
| 130 | The simplest kill command is @kbd{C-k}. If given at the beginning | 137 | The simplest kill command is @kbd{C-k} (@code{kill-line}). If used |
| 131 | of a line, it kills all the text on the line@footnote{Here, ``line'' | 138 | at the end of a line, it kills the line-ending newline character, |
| 132 | means a logical text line, not a screen line. @xref{Continuation | 139 | merging the next line into the current one (thus, a blank line is |
| 133 | Lines}.}, leaving it blank. When used on a blank line, it kills the | 140 | entirely removed). Otherwise, @kbd{C-k} kills all the text from point |
| 134 | whole line including its newline. | 141 | up to the end of the line; if point was originally at the beginning of |
| 135 | 142 | the line, this leaves the line blank. | |
| 136 | More precisely, @kbd{C-k} kills from point up to the end of the | 143 | |
| 137 | line, unless it is at the end of a line. In that case it kills the | 144 | Spaces and tabs at the end of the line are ignored when deciding |
| 138 | newline following point, thus merging the next line into the current | 145 | which case applies. As long as point is after the last visible |
| 139 | one. Spaces and tabs at the end of the line are ignored when deciding | ||
| 140 | which case applies, so as long as point is after the last visible | ||
| 141 | character in the line, you can be sure that @kbd{C-k} will kill the | 146 | character in the line, you can be sure that @kbd{C-k} will kill the |
| 142 | newline. To kill an entire non-blank line, go to the beginning and | 147 | newline. To kill an entire non-blank line, go to the beginning and |
| 143 | type @kbd{C-k} twice. | 148 | type @kbd{C-k} twice. |
| 144 | 149 | ||
| 150 | In this context, ``line'' means a logical text line, not a screen | ||
| 151 | line (@pxref{Continuation Lines}). | ||
| 152 | |||
| 145 | When @kbd{C-k} is given a positive argument @var{n}, it kills | 153 | When @kbd{C-k} is given a positive argument @var{n}, it kills |
| 146 | @var{n} lines and the newlines that follow them (text on the current | 154 | @var{n} lines and the newlines that follow them (text on the current |
| 147 | line before point is not killed). With a negative argument | 155 | line before point is not killed). With a negative argument |
| @@ -157,10 +165,10 @@ following newline. This variable is normally @code{nil}. | |||
| 157 | 165 | ||
| 158 | @kindex C-S-backspace | 166 | @kindex C-S-backspace |
| 159 | @findex kill-whole-line | 167 | @findex kill-whole-line |
| 160 | @kbd{C-S-backspace} (@code{kill-whole-line}) will kill a whole line | 168 | @kbd{C-S-backspace} (@code{kill-whole-line}) kills a whole line |
| 161 | including its newline regardless of the position of point within the | 169 | including its newline, regardless of the position of point within the |
| 162 | line. Note that many character terminals will prevent you from typing | 170 | line. Note that many text terminals will prevent you from typing the |
| 163 | the key sequence @kbd{C-S-backspace}. | 171 | key sequence @kbd{C-S-backspace}. |
| 164 | 172 | ||
| 165 | @node Other Kill Commands | 173 | @node Other Kill Commands |
| 166 | @subsection Other Kill Commands | 174 | @subsection Other Kill Commands |
| @@ -196,10 +204,8 @@ last set. The mark is deactivated at the end of the command. | |||
| 196 | 204 | ||
| 197 | @kindex M-w | 205 | @kindex M-w |
| 198 | @findex kill-ring-save | 206 | @findex kill-ring-save |
| 199 | The command @kbd{M-w} (@code{kill-ring-save}) copies the region into | 207 | @kbd{M-w} (@code{kill-ring-save}) copies the region into the kill |
| 200 | the kill ring without removing it from the buffer. This is | 208 | ring without removing it from the buffer. |
| 201 | approximately equivalent to @kbd{C-w} followed by @kbd{C-/}, except | ||
| 202 | that @kbd{M-w} does not alter the undo history. | ||
| 203 | 209 | ||
| 204 | Emacs also provides commands to kill specific syntactic units: | 210 | Emacs also provides commands to kill specific syntactic units: |
| 205 | words, with @kbd{M-@key{DEL}} and @kbd{M-d} (@pxref{Words}); balanced | 211 | words, with @kbd{M-@key{DEL}} and @kbd{M-d} (@pxref{Words}); balanced |
| @@ -220,12 +226,10 @@ search backward and kill text before point. | |||
| 220 | @vindex kill-read-only-ok | 226 | @vindex kill-read-only-ok |
| 221 | @cindex read-only text, killing | 227 | @cindex read-only text, killing |
| 222 | Some specialized buffers contain @dfn{read-only text}, which cannot | 228 | Some specialized buffers contain @dfn{read-only text}, which cannot |
| 223 | be modified and therefore cannot be killed. But some users like to | 229 | be modified and therefore cannot be killed. The kill commands work |
| 224 | use the kill commands to copy read-only text into the kill ring, | 230 | specially in a read-only buffer: they move over text and copy it to |
| 225 | without actually changing it. Therefore, the kill commands work | ||
| 226 | specially in a read-only buffer: they move over text, and copy it to | ||
| 227 | the kill ring, without actually deleting it from the buffer. | 231 | the kill ring, without actually deleting it from the buffer. |
| 228 | Normally, kill commands beep and display an error message when this | 232 | Normally, they also beep and display an error message when this |
| 229 | happens. But if you set the variable @code{kill-read-only-ok} to a | 233 | happens. But if you set the variable @code{kill-read-only-ok} to a |
| 230 | non-@code{nil} value, they just print a message in the echo area to | 234 | non-@code{nil} value, they just print a message in the echo area to |
| 231 | explain why the text has not been erased. | 235 | explain why the text has not been erased. |
| @@ -257,10 +261,16 @@ Replace text just yanked with an earlier batch of killed text | |||
| 257 | Append next kill to last batch of killed text (@code{append-next-kill}). | 261 | Append next kill to last batch of killed text (@code{append-next-kill}). |
| 258 | @end table | 262 | @end table |
| 259 | 263 | ||
| 260 | On graphical displays with window systems, if there is a current | 264 | @cindex yanking and text properties |
| 261 | selection in some other application, and you selected it more recently | 265 | @vindex yank-excluded-properties |
| 262 | than you killed any text in Emacs, @kbd{C-y} copies the selection | 266 | The yank commands discard certain properties from the yanked text. |
| 263 | instead of text killed within Emacs. | 267 | These are properties that might lead to annoying results, such as |
| 268 | causing the text to respond to the mouse or specifying key bindings. | ||
| 269 | The list of properties to discard is stored in the variable | ||
| 270 | @code{yank-excluded-properties}. These properties are also discarded | ||
| 271 | when yanking register contents and rectangles. @xref{Text | ||
| 272 | Properties,,, elisp, the Emacs Lisp Reference Manual}, for more | ||
| 273 | information about text properties. | ||
| 264 | 274 | ||
| 265 | @menu | 275 | @menu |
| 266 | * Kill Ring:: Where killed text is stored. Basic yanking. | 276 | * Kill Ring:: Where killed text is stored. Basic yanking. |
| @@ -271,38 +281,34 @@ instead of text killed within Emacs. | |||
| 271 | @node Kill Ring | 281 | @node Kill Ring |
| 272 | @subsection The Kill Ring | 282 | @subsection The Kill Ring |
| 273 | 283 | ||
| 274 | All killed text is recorded in the @dfn{kill ring}, a list of blocks | 284 | The @dfn{kill ring} is a list of blocks of text that were previously |
| 275 | of text that have been killed. There is only one kill ring, shared by | 285 | killed. There is only one kill ring, shared by all buffers, so you |
| 276 | all buffers, so you can kill text in one buffer and yank it in another | 286 | can kill text in one buffer and yank it in another buffer. This is |
| 277 | buffer. This is the usual way to move text from one file to another. | 287 | the usual way to move text from one file to another. (There are |
| 278 | (There are several other methods: for instance, you could store the | 288 | several other methods: for instance, you could store the text in a |
| 279 | text in a register. @xref{Registers}, for information about | 289 | register; see @ref{Registers}. @xref{Accumulating Text}, for some |
| 280 | registers. @xref{Accumulating Text}, for some other ways to move text | 290 | other ways to move text around.) |
| 281 | around.) | ||
| 282 | 291 | ||
| 283 | @kindex C-y | 292 | @kindex C-y |
| 284 | @findex yank | 293 | @findex yank |
| 285 | The command @kbd{C-y} (@code{yank}) reinserts the text of the most | 294 | @kbd{C-y} (@code{yank}) reinserts the text of the most recent kill, |
| 286 | recent kill, leaving the cursor at the end of the text. It also adds | 295 | leaving the cursor at the end of the text. It also adds the position |
| 287 | the position of the beginning of the text to the mark ring, without | 296 | of the beginning of the text to the mark ring, without activating the |
| 288 | activating the mark; this allows you to jump easily to that position | 297 | mark; this allows you to jump easily to that position with @kbd{C-x |
| 289 | with @kbd{C-x C-x} (@pxref{Setting Mark}). With a plain prefix | 298 | C-x} (@pxref{Setting Mark}). |
| 290 | argument (@kbd{C-u C-y}), it instead leaves the cursor in front of the | 299 | |
| 291 | text, and adds the position of the end of the text to the mark ring. | 300 | On graphical displays, @kbd{C-y} first checks if another application |
| 292 | Using other sort of prefix argument specifies an earlier kill; for | 301 | has placed any text in the system clipboard more recently than the |
| 293 | example, @kbd{C-u 4 C-y} reinserts the fourth most recent kill. | 302 | last Emacs kill. If so, it inserts from the clipboard instead of the |
| 294 | @xref{Earlier Kills}. | 303 | kill ring. Conceptually, you can think of the clipboard as an |
| 295 | 304 | ``extra'' entry in the kill ring, which is present if you recently cut | |
| 296 | @cindex yanking and text properties | 305 | or copied some text in another application. @xref{Cut and Paste}. |
| 297 | @vindex yank-excluded-properties | 306 | |
| 298 | The yank commands discard certain properties from the yanked text. | 307 | With a plain prefix argument (@kbd{C-u C-y}), the @code{yank} |
| 299 | These are properties that might lead to annoying results, such as | 308 | command instead leaves the cursor in front of the text, and adds the |
| 300 | causing the text to respond to the mouse or specifying key bindings. | 309 | position of the end of the text to the mark ring. Using any other |
| 301 | The list of properties to discard is stored in the variable | 310 | prefix argument specifies an earlier kill; for example, @kbd{C-u 4 |
| 302 | @code{yank-excluded-properties}. Yanking of register contents and | 311 | C-y} reinserts the fourth most recent kill. @xref{Earlier Kills}. |
| 303 | rectangles also discard these properties. @xref{Text Properties,,, | ||
| 304 | elisp, the Emacs Lisp Reference Manual}, for more information about | ||
| 305 | text properties. | ||
| 306 | 312 | ||
| 307 | @node Appending Kills | 313 | @node Appending Kills |
| 308 | @subsection Appending Kills | 314 | @subsection Appending Kills |
| @@ -418,6 +424,177 @@ saved. | |||
| 418 | @code{kill-ring}; you can view the entire contents of the kill ring with | 424 | @code{kill-ring}; you can view the entire contents of the kill ring with |
| 419 | the command @kbd{C-h v kill-ring}. | 425 | the command @kbd{C-h v kill-ring}. |
| 420 | 426 | ||
| 427 | @node Cut and Paste | ||
| 428 | @section ``Cut and Paste'' Operations on Graphical Displays | ||
| 429 | @cindex cut | ||
| 430 | @cindex copy | ||
| 431 | @cindex paste | ||
| 432 | |||
| 433 | In most graphical desktop environments, you can transfer data | ||
| 434 | (usually text) between different applications using a system facility | ||
| 435 | called the @dfn{clipboard}. On X, two other similar facilities are | ||
| 436 | available: the primary selection and the secondary selection. When | ||
| 437 | Emacs is run on a graphical display, its kill and yank commands | ||
| 438 | integrate with these facilities, so that you can easily transfer text | ||
| 439 | between Emacs and other graphical applications. | ||
| 440 | |||
| 441 | By default, Emacs uses UTF-8 as the coding system for inter-program | ||
| 442 | text transfers. If you find that the pasted text is not what you | ||
| 443 | expected, you can specify another coding system by typing @kbd{C-x | ||
| 444 | @key{RET} x} or @kbd{C-x @key{RET} X}. You can also request a | ||
| 445 | different data type by customizing @code{x-select-request-type}. | ||
| 446 | @xref{Communication Coding}. | ||
| 447 | |||
| 448 | @menu | ||
| 449 | * Clipboard:: How Emacs uses the system clipboard. | ||
| 450 | * Primary Selection:: The temporarily selected text selection. | ||
| 451 | * Secondary Selection:: Cutting without altering point and mark. | ||
| 452 | @end menu | ||
| 453 | |||
| 454 | @node Clipboard | ||
| 455 | @subsection Using the Clipboard | ||
| 456 | @cindex clipboard | ||
| 457 | |||
| 458 | The @dfn{clipboard} is the facility that most graphical applications | ||
| 459 | use for ``cutting and pasting''. When the clipboard exists, the kill | ||
| 460 | and yank commands in Emacs make use of it. | ||
| 461 | |||
| 462 | When you kill some text with a command such as @kbd{C-w} | ||
| 463 | (@code{kill-region}), or copy it to the kill ring with a command such | ||
| 464 | as @kbd{M-w} (@code{kill-ring-save}), that text is also put in the | ||
| 465 | clipboard. @xref{Killing}. | ||
| 466 | |||
| 467 | @vindex save-interprogram-paste-before-kill | ||
| 468 | When an Emacs kill command puts text in the clipboard, the existing | ||
| 469 | clipboard contents are normally lost. Optionally, you can change | ||
| 470 | @code{save-interprogram-paste-before-kill} to @code{t}. Then Emacs | ||
| 471 | will first save the clipboard to its kill ring, preventing you from | ||
| 472 | losing the old clipboard data---at the risk of high memory consumption | ||
| 473 | if that data turns out to be large. | ||
| 474 | |||
| 475 | The usual yank commands, such as @kbd{C-y} (@code{yank}), also use | ||
| 476 | the clipboard. If another application ``owns'' the clipboard---i.e., | ||
| 477 | if you cut or copied text there more recently than your last kill | ||
| 478 | command in Emacs---then Emacs yanks from the clipboard instead of the | ||
| 479 | kill ring. Otherwise, it yanks from the kill ring, as described in | ||
| 480 | @ref{Yanking}. | ||
| 481 | |||
| 482 | @vindex yank-pop-change-selection | ||
| 483 | Normally, rotating the kill ring with @kbd{M-y} (@code{yank-pop}) | ||
| 484 | does not alter the clipboard. However, if you change | ||
| 485 | @code{yank-pop-change-selection} to @code{t}, then @kbd{M-y} saves the | ||
| 486 | new yank to the clipboard. | ||
| 487 | |||
| 488 | @vindex x-select-enable-clipboard | ||
| 489 | To prevent kill and yank commands from accessing the clipboard, | ||
| 490 | change the variable @code{x-select-enable-clipboard} to @code{nil}. | ||
| 491 | |||
| 492 | @vindex x-select-enable-primary | ||
| 493 | @findex clipboard-kill-region | ||
| 494 | @findex clipboard-kill-ring-save | ||
| 495 | @findex clipboard-yank | ||
| 496 | Prior to Emacs 24, the kill and yank commands used the primary | ||
| 497 | selection (@pxref{Primary Selection}), not the clipboard. If you | ||
| 498 | prefer this behavior, change @code{x-select-enable-clipboard} to | ||
| 499 | @code{nil}, @code{x-select-enable-primary} to @code{t}, and | ||
| 500 | @code{mouse-drag-copy-region} to @code{t}. In this case, you can use | ||
| 501 | the following commands to act explicitly on the clipboard: | ||
| 502 | @code{clipboard-kill-region} kills the region and saves it to the | ||
| 503 | clipboard; @code{clipboard-kill-ring-save} copies the region to the | ||
| 504 | kill ring and saves it to the clipboard; and @code{clipboard-yank} | ||
| 505 | yanks the contents of the clipboard at point. | ||
| 506 | |||
| 507 | @node Primary Selection | ||
| 508 | @subsection Cut and Paste with Other Window Applications | ||
| 509 | @cindex X cutting and pasting | ||
| 510 | @cindex X selection | ||
| 511 | @cindex primary selection | ||
| 512 | @cindex selection, primary | ||
| 513 | |||
| 514 | Under the X window system, there exists a @dfn{primary selection} | ||
| 515 | containing the last stretch of text selected in an X application | ||
| 516 | (usually by dragging the mouse). Typically, this text can be inserted | ||
| 517 | into other X applications by @kbd{mouse-2} clicks. The primary | ||
| 518 | selection is separate from the clipboard (@pxref{Clipboard}). Its | ||
| 519 | contents are more ``fragile''; they are overwritten by any mouse | ||
| 520 | selection, whereas the clipboard is only overwritten by explicit | ||
| 521 | ``cut'' or ``copy'' commands. | ||
| 522 | |||
| 523 | Under X, whenever you select some text in Emacs by dragging or | ||
| 524 | clicking the mouse (@pxref{Mouse Commands}), it is also saved to the | ||
| 525 | primary selection. | ||
| 526 | |||
| 527 | @vindex select-active-regions | ||
| 528 | If you set the region using the keyboard---for instance, by typing | ||
| 529 | @kbd{C-@key{SPC}} and moving point away from the mark---the text in | ||
| 530 | the region is also saved to the primary selection. (The updating of | ||
| 531 | the primary selection is done at the end of each command, as long as | ||
| 532 | the region is active and non-empty.) To disable this behavior, change | ||
| 533 | the variable @code{select-active-regions} to @code{nil}. | ||
| 534 | |||
| 535 | To insert the primary selection into an Emacs buffer, click | ||
| 536 | @kbd{mouse-2} (@code{mouse-yank-primary}) where you want to insert it. | ||
| 537 | @xref{Mouse Commands}. | ||
| 538 | |||
| 539 | @cindex MS-Windows, and primary selection | ||
| 540 | MS-Windows provides no primary selection, but Emacs emulates it | ||
| 541 | within a single Emacs session by storing the selected text internally. | ||
| 542 | Therefore, all the features and commands related to the primary | ||
| 543 | selection work on Windows as they do on X, for cutting and pasting | ||
| 544 | within the same session, but not across Emacs sessions or with other | ||
| 545 | applications. | ||
| 546 | |||
| 547 | @node Secondary Selection | ||
| 548 | @subsection Secondary Selection | ||
| 549 | @cindex secondary selection | ||
| 550 | |||
| 551 | In addition to the primary selection, the X Window System provides a | ||
| 552 | second similar facility known as the @dfn{secondary selection}. | ||
| 553 | Nowadays, few X applications make use of the secondary selection, but | ||
| 554 | you can access it using the following Emacs commands: | ||
| 555 | |||
| 556 | @table @kbd | ||
| 557 | @findex mouse-set-secondary | ||
| 558 | @kindex M-Drag-Mouse-1 | ||
| 559 | @item M-Drag-Mouse-1 | ||
| 560 | Set the secondary selection, with one end at the place where you press | ||
| 561 | down the button, and the other end at the place where you release it | ||
| 562 | (@code{mouse-set-secondary}). The selected text is highlighted, using | ||
| 563 | the @code{secondary-selection} face, as you drag. The window scrolls | ||
| 564 | automatically if you drag the mouse off the top or bottom of the | ||
| 565 | window, just like @code{mouse-set-region} (@pxref{Mouse Commands}). | ||
| 566 | |||
| 567 | This command does not alter the kill ring. | ||
| 568 | |||
| 569 | @findex mouse-start-secondary | ||
| 570 | @kindex M-Mouse-1 | ||
| 571 | @item M-Mouse-1 | ||
| 572 | Set one endpoint for the @dfn{secondary selection} | ||
| 573 | (@code{mouse-start-secondary}). | ||
| 574 | |||
| 575 | @findex mouse-secondary-save-then-kill | ||
| 576 | @kindex M-Mouse-3 | ||
| 577 | @item M-Mouse-3 | ||
| 578 | Set the secondary selection, with one end at the position clicked and | ||
| 579 | the other at the position specified with @kbd{M-Mouse-1} | ||
| 580 | (@code{mouse-secondary-save-then-kill}). This also puts the selected | ||
| 581 | text in the kill ring. A second @kbd{M-Mouse-3} at the same place | ||
| 582 | kills the secondary selection just made. | ||
| 583 | |||
| 584 | @findex mouse-yank-secondary | ||
| 585 | @kindex M-Mouse-2 | ||
| 586 | @item M-Mouse-2 | ||
| 587 | Insert the secondary selection where you click, placing point at the | ||
| 588 | end of the yanked text (@code{mouse-yank-secondary}). | ||
| 589 | @end table | ||
| 590 | |||
| 591 | Double or triple clicking of @kbd{M-Mouse-1} operates on words and | ||
| 592 | lines, much like @kbd{Mouse-1}. | ||
| 593 | |||
| 594 | If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks | ||
| 595 | at point. Then it does not matter precisely where you click, or even | ||
| 596 | which of the frame's windows you click on. @xref{Mouse Commands}. | ||
| 597 | |||
| 421 | @node Accumulating Text | 598 | @node Accumulating Text |
| 422 | @section Accumulating Text | 599 | @section Accumulating Text |
| 423 | @findex append-to-buffer | 600 | @findex append-to-buffer |
diff --git a/doc/emacs/major.texi b/doc/emacs/major.texi deleted file mode 100644 index 9256c712f02..00000000000 --- a/doc/emacs/major.texi +++ /dev/null | |||
| @@ -1,237 +0,0 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 | ||
| 3 | @c Free Software Foundation, Inc. | ||
| 4 | @c See file emacs.texi for copying conditions. | ||
| 5 | @node Major Modes, Indentation, International, Top | ||
| 6 | @chapter Major Modes | ||
| 7 | @cindex major modes | ||
| 8 | @cindex mode, major | ||
| 9 | @kindex TAB @r{(and major modes)} | ||
| 10 | @kindex DEL @r{(and major modes)} | ||
| 11 | @kindex C-j @r{(and major modes)} | ||
| 12 | |||
| 13 | Emacs provides many alternative @dfn{major modes}, each of which | ||
| 14 | customizes Emacs for editing text of a particular sort. The major modes | ||
| 15 | are mutually exclusive, and each buffer has one major mode at any time. | ||
| 16 | The mode line normally shows the name of the current major mode, in | ||
| 17 | parentheses (@pxref{Mode Line}). | ||
| 18 | |||
| 19 | The least specialized major mode is called @dfn{Fundamental mode}. | ||
| 20 | This mode has no mode-specific redefinitions or variable settings, so | ||
| 21 | that each Emacs command behaves in its most general manner, and each | ||
| 22 | user option variable is in its default state. For editing text of a | ||
| 23 | specific type that Emacs knows about, such as Lisp code or English | ||
| 24 | text, you should switch to the appropriate major mode, such as Lisp | ||
| 25 | mode or Text mode. | ||
| 26 | |||
| 27 | Selecting a major mode changes the meanings of a few keys to become | ||
| 28 | more specifically adapted to the language being edited. The ones that | ||
| 29 | are changed frequently are @key{TAB}, @key{DEL}, and @kbd{C-j}. The | ||
| 30 | prefix key @kbd{C-c} normally contains mode-specific commands. In | ||
| 31 | addition, the commands which handle comments use the mode to determine | ||
| 32 | how comments are to be delimited. Many major modes redefine the | ||
| 33 | syntactical properties of characters appearing in the buffer. | ||
| 34 | @xref{Syntax}. | ||
| 35 | |||
| 36 | The major modes fall into three major groups. The first group | ||
| 37 | contains modes for normal text, either plain or with mark-up. It | ||
| 38 | includes Text mode, HTML mode, SGML mode, @TeX{} mode and Outline | ||
| 39 | mode. The second group contains modes for specific programming | ||
| 40 | languages. These include Lisp mode (which has several variants), C | ||
| 41 | mode, Fortran mode, and others. The remaining major modes are not | ||
| 42 | intended for use on users' files; they are used in buffers created for | ||
| 43 | specific purposes by Emacs, such as Dired mode for buffers made by | ||
| 44 | Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m} | ||
| 45 | (@pxref{Sending Mail}), and Shell mode for buffers used for | ||
| 46 | communicating with an inferior shell process (@pxref{Interactive | ||
| 47 | Shell}). | ||
| 48 | |||
| 49 | Most programming-language major modes specify that only blank lines | ||
| 50 | separate paragraphs. This is to make the paragraph commands useful. | ||
| 51 | (@xref{Paragraphs}.) They also cause Auto Fill mode to use the | ||
| 52 | definition of @key{TAB} to indent the new lines it creates. This is | ||
| 53 | because most lines in a program are usually indented | ||
| 54 | (@pxref{Indentation}). | ||
| 55 | |||
| 56 | @menu | ||
| 57 | * Choosing Modes:: How major modes are specified or chosen. | ||
| 58 | @end menu | ||
| 59 | |||
| 60 | @node Choosing Modes,,Major Modes,Major Modes | ||
| 61 | @section How Major Modes are Chosen | ||
| 62 | |||
| 63 | @cindex choosing a major mode | ||
| 64 | You can select a major mode explicitly for the current buffer, but | ||
| 65 | most of the time Emacs determines which mode to use based on the file | ||
| 66 | name or on special text in the file. | ||
| 67 | |||
| 68 | To explicitly select a new major, you use an @kbd{M-x} command. | ||
| 69 | Take the name of a major mode and add @code{-mode} to get the name of | ||
| 70 | the command to select that mode. Thus, you can enter Lisp mode by | ||
| 71 | executing @kbd{M-x lisp-mode}. | ||
| 72 | |||
| 73 | @vindex auto-mode-alist | ||
| 74 | When you visit a file, Emacs usually chooses the right major mode | ||
| 75 | automatically. Normally, it makes the choice based on the file | ||
| 76 | name---for example, files whose names end in @samp{.c} are normally | ||
| 77 | edited in C mode---but sometimes it chooses the major mode based on | ||
| 78 | the contents of the file. Here is the exact procedure: | ||
| 79 | |||
| 80 | First, Emacs checks whether the file contains a file-local variable | ||
| 81 | that specifies the major mode. If so, it uses that major mode, | ||
| 82 | ignoring all other criteria. @xref{File Variables}. There are | ||
| 83 | several methods to specify a major mode using a file-local variable; | ||
| 84 | the simplest is to put the mode name in the first nonblank line, | ||
| 85 | preceded and followed by @samp{-*-}. Other text may appear on the | ||
| 86 | line as well. For example, | ||
| 87 | |||
| 88 | @example | ||
| 89 | ; -*-Lisp-*- | ||
| 90 | @end example | ||
| 91 | |||
| 92 | @noindent | ||
| 93 | tells Emacs to use Lisp mode. Note how the semicolon is used to make | ||
| 94 | Lisp treat this line as a comment. Alternatively, you could write | ||
| 95 | |||
| 96 | @example | ||
| 97 | ; -*- mode: Lisp;-*- | ||
| 98 | @end example | ||
| 99 | |||
| 100 | @noindent | ||
| 101 | The latter format allows you to specify local variables as well, like | ||
| 102 | this: | ||
| 103 | |||
| 104 | @example | ||
| 105 | ; -*- mode: Lisp; tab-width: 4; -*- | ||
| 106 | @end example | ||
| 107 | |||
| 108 | @vindex interpreter-mode-alist | ||
| 109 | Second, Emacs checks whether the file's contents begin with | ||
| 110 | @samp{#!}. If so, that indicates that the file can serve as an | ||
| 111 | executable shell command, which works by running an interpreter named | ||
| 112 | on the file's first line (the rest of the file is used as input to the | ||
| 113 | interpreter). Therefore, Emacs tries to use the interpreter name to | ||
| 114 | choose a mode. For instance, a file that begins with | ||
| 115 | @samp{#!/usr/bin/perl} is opened in Perl mode. The variable | ||
| 116 | @code{interpreter-mode-alist} specifies the correspondence between | ||
| 117 | interpreter program names and major modes. | ||
| 118 | |||
| 119 | When the first line starts with @samp{#!}, you usually cannot use | ||
| 120 | the @samp{-*-} feature on the first line, because the system would get | ||
| 121 | confused when running the interpreter. So Emacs looks for @samp{-*-} | ||
| 122 | on the second line in such files as well as on the first line. The | ||
| 123 | same is true for man pages which start with the magic string | ||
| 124 | @samp{'\"} to specify a list of troff preprocessors. | ||
| 125 | |||
| 126 | @vindex magic-mode-alist | ||
| 127 | Third, Emacs tries to determine the major mode by looking at the | ||
| 128 | text at the start of the buffer, based on the variable | ||
| 129 | @code{magic-mode-alist}. By default, this variable is @code{nil} (an | ||
| 130 | empty list), so Emacs skips this step; however, you can customize it | ||
| 131 | in your init file (@pxref{Init File}). The value should be a list of | ||
| 132 | elements of the form | ||
| 133 | |||
| 134 | @example | ||
| 135 | (@var{regexp} . @var{mode-function}) | ||
| 136 | @end example | ||
| 137 | |||
| 138 | @noindent | ||
| 139 | where @var{regexp} is a regular expression (@pxref{Regexps}), and | ||
| 140 | @var{mode-function} is a Lisp function that toggles a major mode. If | ||
| 141 | the text at the beginning of the file matches @var{regexp}, Emacs | ||
| 142 | chooses the major mode specified by @var{mode-function}. | ||
| 143 | |||
| 144 | Alternatively, an element of @code{magic-mode-alist} may have the form | ||
| 145 | |||
| 146 | @example | ||
| 147 | (@var{match-function} . @var{mode-function}) | ||
| 148 | @end example | ||
| 149 | |||
| 150 | @noindent | ||
| 151 | where @var{match-function} is a Lisp function that is called at the | ||
| 152 | beginning of the buffer; if the function returns non-@code{nil}, Emacs | ||
| 153 | set the major mode wit @var{mode-function}. | ||
| 154 | |||
| 155 | Fourth---if Emacs still hasn't found a suitable major mode---it | ||
| 156 | looks at the file's name. The correspondence between file names and | ||
| 157 | major modes is controlled by the variable @code{auto-mode-alist}. Its | ||
| 158 | value is a list in which each element has this form, | ||
| 159 | |||
| 160 | @example | ||
| 161 | (@var{regexp} . @var{mode-function}) | ||
| 162 | @end example | ||
| 163 | |||
| 164 | @noindent | ||
| 165 | or this form, | ||
| 166 | |||
| 167 | @example | ||
| 168 | (@var{regexp} @var{mode-function} @var{flag}) | ||
| 169 | @end example | ||
| 170 | |||
| 171 | @noindent | ||
| 172 | For example, one element normally found in the list has the form | ||
| 173 | @code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C | ||
| 174 | mode for files whose names end in @file{.c}. (Note that @samp{\\} is | ||
| 175 | needed in Lisp syntax to include a @samp{\} in the string, which must | ||
| 176 | be used to suppress the special meaning of @samp{.} in regexps.) If | ||
| 177 | the element has the form @code{(@var{regexp} @var{mode-function} | ||
| 178 | @var{flag})} and @var{flag} is non-@code{nil}, then after calling | ||
| 179 | @var{mode-function}, Emacs discards the suffix that matched | ||
| 180 | @var{regexp} and searches the list again for another match. | ||
| 181 | |||
| 182 | @vindex auto-mode-case-fold | ||
| 183 | On systems with case-insensitive file names, such as Microsoft | ||
| 184 | Windows, Emacs performs a single case-insensitive search through | ||
| 185 | @code{auto-mode-alist}. On other systems, Emacs normally performs a | ||
| 186 | single case-sensitive search through the alist. However, if you | ||
| 187 | change the variable @code{auto-mode-case-fold} to @code{t}, Emacs | ||
| 188 | performs a second case-insensitive search if the first search fails. | ||
| 189 | |||
| 190 | @vindex magic-fallback-mode-alist | ||
| 191 | Finally, if Emacs @emph{still} hasn't found a major mode to use, it | ||
| 192 | compares the text at the start of the buffer to the variable | ||
| 193 | @code{magic-fallback-mode-alist}. This variable works like | ||
| 194 | @code{magic-mode-alist}, described above, except that is consulted | ||
| 195 | only after @code{auto-mode-alist}. By default, | ||
| 196 | @code{magic-fallback-mode-alist} contains forms that check for image | ||
| 197 | files, HTML/XML/SGML files, and Postscript files. | ||
| 198 | |||
| 199 | @vindex major-mode | ||
| 200 | Once a major mode is chosen, Emacs sets the value of the variable | ||
| 201 | @code{major-mode} to the symbol for that major mode (e.g., | ||
| 202 | @code{text-mode} for Text mode). This is a per-buffer variable | ||
| 203 | (@pxref{Locals}); its buffer-local value is set automatically, and you | ||
| 204 | should not change it yourself. | ||
| 205 | |||
| 206 | The default value of @code{major-mode} determines the major mode to | ||
| 207 | use for files that do not specify a major mode, and for new buffers | ||
| 208 | created with @kbd{C-x b}. Normally, this default value is the symbol | ||
| 209 | @code{fundamental-mode}, which specifies Fundamental mode. You can | ||
| 210 | change it via the Customization interface (@pxref{Easy | ||
| 211 | Customization}), or by adding a line like this to your init file | ||
| 212 | (@pxref{Init File}): | ||
| 213 | |||
| 214 | @smallexample | ||
| 215 | (setq-default major-mode 'text-mode) | ||
| 216 | @end smallexample | ||
| 217 | |||
| 218 | @noindent | ||
| 219 | If the default value of @code{major-mode} is @code{nil}, the major | ||
| 220 | mode is taken from the previously current buffer. | ||
| 221 | |||
| 222 | @findex normal-mode | ||
| 223 | If you have changed the major mode of a buffer, you can return to | ||
| 224 | the major mode Emacs would have chosen automatically, by typing | ||
| 225 | @kbd{M-x normal-mode}. This is the same function that | ||
| 226 | @code{find-file} calls to choose the major mode. It also processes | ||
| 227 | the file's @samp{-*-} line or local variables list (if any). | ||
| 228 | @xref{File Variables}. | ||
| 229 | |||
| 230 | @vindex change-major-mode-with-file-name | ||
| 231 | The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to | ||
| 232 | a new major mode if the new file name implies a mode (@pxref{Saving}). | ||
| 233 | (@kbd{C-x C-s} does this too, if the buffer wasn't visiting a file.) | ||
| 234 | However, this does not happen if the buffer contents specify a major | ||
| 235 | mode, and certain ``special'' major modes do not allow the mode to | ||
| 236 | change. You can turn off this mode-changing feature by setting | ||
| 237 | @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 ad976468be9..4064f4ef6a3 100644 --- a/doc/emacs/makefile.w32-in +++ b/doc/emacs/makefile.w32-in | |||
| @@ -76,7 +76,7 @@ EMACSSOURCES= \ | |||
| 76 | $(srcdir)/windows.texi \ | 76 | $(srcdir)/windows.texi \ |
| 77 | $(srcdir)/frames.texi \ | 77 | $(srcdir)/frames.texi \ |
| 78 | $(srcdir)/mule.texi \ | 78 | $(srcdir)/mule.texi \ |
| 79 | $(srcdir)/major.texi \ | 79 | $(srcdir)/modes.texi \ |
| 80 | $(srcdir)/indent.texi \ | 80 | $(srcdir)/indent.texi \ |
| 81 | $(srcdir)/text.texi \ | 81 | $(srcdir)/text.texi \ |
| 82 | $(srcdir)/programs.texi \ | 82 | $(srcdir)/programs.texi \ |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index f83ac38469a..b7b634af8b1 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -2794,7 +2794,6 @@ userenced and properbose. Have fun. Your buggestions are welcome. | |||
| 2794 | @section Other Amusements | 2794 | @section Other Amusements |
| 2795 | @cindex boredom | 2795 | @cindex boredom |
| 2796 | @findex hanoi | 2796 | @findex hanoi |
| 2797 | @findex yow | ||
| 2798 | @findex gomoku | 2797 | @findex gomoku |
| 2799 | @cindex tower of Hanoi | 2798 | @cindex tower of Hanoi |
| 2800 | 2799 | ||
| @@ -2882,9 +2881,6 @@ Likewise, @kbd{M-x snake} provides an implementation of Snake. | |||
| 2882 | When you are frustrated, try the famous Eliza program. Just do | 2881 | When you are frustrated, try the famous Eliza program. Just do |
| 2883 | @kbd{M-x doctor}. End each input by typing @key{RET} twice. | 2882 | @kbd{M-x doctor}. End each input by typing @key{RET} twice. |
| 2884 | 2883 | ||
| 2885 | @cindex Zippy | ||
| 2886 | When you are feeling strange, type @kbd{M-x yow}. | ||
| 2887 | |||
| 2888 | @findex zone | 2884 | @findex zone |
| 2889 | The command @kbd{M-x zone} plays games with the display when Emacs is | 2885 | The command @kbd{M-x zone} plays games with the display when Emacs is |
| 2890 | idle. | 2886 | idle. |
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi new file mode 100644 index 00000000000..314d5d4347e --- /dev/null +++ b/doc/emacs/modes.texi | |||
| @@ -0,0 +1,410 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 | ||
| 3 | @c Free Software Foundation, Inc. | ||
| 4 | @c See file emacs.texi for copying conditions. | ||
| 5 | @node Modes, Indentation, International, Top | ||
| 6 | @chapter Editing Modes | ||
| 7 | |||
| 8 | Emacs contains many @dfn{editing modes}, each of which alters its | ||
| 9 | basic behavior in useful ways. These are divided into @dfn{major | ||
| 10 | modes} and @dfn{minor modes}. | ||
| 11 | |||
| 12 | Major modes provide specialized facilities for working on a | ||
| 13 | particular file type, such as a C source file (@pxref{Programs}), or a | ||
| 14 | particular type of non-file buffer, such as a shell buffer | ||
| 15 | (@pxref{Shell}). Major modes are mutually exclusive; each buffer has | ||
| 16 | one and only one major mode at any time. | ||
| 17 | |||
| 18 | Minor modes are optional features which you can turn on or off, not | ||
| 19 | necessarily specific to a type of file or buffer. For example, Auto | ||
| 20 | Fill mode is a minor mode in which @key{SPC} breaks lines between | ||
| 21 | words as you type (@pxref{Auto Fill}). Minor modes are independent of | ||
| 22 | one another, and of the selected major mode. | ||
| 23 | |||
| 24 | @menu | ||
| 25 | * Major Modes:: Text mode vs. Lisp mode vs. C mode... | ||
| 26 | * Minor Modes:: Each minor mode is a feature you can turn on | ||
| 27 | independently of any others. | ||
| 28 | * Choosing Modes:: How modes are chosen when visiting files. | ||
| 29 | @end menu | ||
| 30 | |||
| 31 | @node Major Modes | ||
| 32 | @section Major Modes | ||
| 33 | @cindex major modes | ||
| 34 | @cindex mode, major | ||
| 35 | @kindex TAB @r{(and major modes)} | ||
| 36 | @kindex DEL @r{(and major modes)} | ||
| 37 | @kindex C-j @r{(and major modes)} | ||
| 38 | |||
| 39 | Every buffer possesses a major mode, which determines the editing | ||
| 40 | behavior of Emacs while that buffer is current. The mode line | ||
| 41 | normally shows the name of the current major mode, in parentheses. | ||
| 42 | @xref{Mode Line}. | ||
| 43 | |||
| 44 | Usually, the major mode is automatically set by Emacs, when you | ||
| 45 | first visit a file or create a buffer. @xref{Choosing Modes}. You | ||
| 46 | can explicitly select a new major mode by using an @kbd{M-x} command. | ||
| 47 | Take the name of the mode and add @code{-mode} to get the name of the | ||
| 48 | command to select that mode. Thus, you can enter Lisp mode with | ||
| 49 | @kbd{M-x lisp-mode}. | ||
| 50 | |||
| 51 | The least specialized major mode is called @dfn{Fundamental mode}. | ||
| 52 | This mode has no mode-specific redefinitions or variable settings, so | ||
| 53 | that each Emacs command behaves in its most general manner, and each | ||
| 54 | user option variable is in its default state. | ||
| 55 | |||
| 56 | For editing text of a specific type that Emacs knows about, such as | ||
| 57 | Lisp code or English text, you typically use a more specialized major | ||
| 58 | mode, such as Lisp mode or Text mode. Such major modes change the | ||
| 59 | meanings of some keys to become more specifically adapted to the | ||
| 60 | language being edited. The ones that are commonly changed are | ||
| 61 | @key{TAB}, @key{DEL}, and @kbd{C-j}. The prefix key @kbd{C-c} | ||
| 62 | normally contains mode-specific commands. In addition, the commands | ||
| 63 | which handle comments use the mode to determine how comments are to be | ||
| 64 | delimited. Many major modes redefine the syntactical properties of | ||
| 65 | characters appearing in the buffer. | ||
| 66 | |||
| 67 | The major modes fall into three major groups. The first group | ||
| 68 | contains modes for normal text, either plain or with mark-up. It | ||
| 69 | includes Text mode, HTML mode, SGML mode, @TeX{} mode and Outline | ||
| 70 | mode. The second group contains modes for specific programming | ||
| 71 | languages. These include Lisp mode (which has several variants), C | ||
| 72 | mode, Fortran mode, and others. The remaining major modes are not | ||
| 73 | intended for use on users' files; they are used in buffers created for | ||
| 74 | specific purposes by Emacs, such as Dired mode for buffers made by | ||
| 75 | Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m} | ||
| 76 | (@pxref{Sending Mail}), and Shell mode for buffers used for | ||
| 77 | communicating with an inferior shell process (@pxref{Interactive | ||
| 78 | Shell}). | ||
| 79 | |||
| 80 | Most programming-language major modes specify that only blank lines | ||
| 81 | separate paragraphs. This is to make the paragraph commands useful. | ||
| 82 | (@xref{Paragraphs}.) They also cause Auto Fill mode to use the | ||
| 83 | definition of @key{TAB} to indent the new lines it creates. This is | ||
| 84 | because most lines in a program are usually indented | ||
| 85 | (@pxref{Indentation}). | ||
| 86 | |||
| 87 | @node Minor Modes | ||
| 88 | @section Minor Modes | ||
| 89 | @cindex minor modes | ||
| 90 | @cindex mode, minor | ||
| 91 | |||
| 92 | A minor mode is an optional editing modes that alters the behavior | ||
| 93 | of Emacs in some well-defined way. Unlike major modes, any number of | ||
| 94 | minor modes can be in effect at any time. Some minor modes are | ||
| 95 | @dfn{buffer-local}: they apply only to the current buffer, so you can | ||
| 96 | enable the mode in certain buffers and not others. Other minor modes | ||
| 97 | are @dfn{global}: while enabled, they affect everything you do in the | ||
| 98 | Emacs session, in all buffers. Some global minor modes are enabled by | ||
| 99 | default. | ||
| 100 | |||
| 101 | Most minor modes say in the mode line when they are enabled, just | ||
| 102 | after the major mode indicator. For example, @samp{Fill} in the mode | ||
| 103 | line means that Auto Fill mode is enabled. @xref{Mode Line}. | ||
| 104 | |||
| 105 | Each minor mode is associated with a command, called the @dfn{mode | ||
| 106 | command}, which turns it on or off. The name of this command consists | ||
| 107 | of the name of the minor mode, followed by @samp{-mode}; for instance, | ||
| 108 | the mode command for Auto Fill mode is @code{auto-fill-mode}. Calling | ||
| 109 | the minor mode command with no prefix argument @dfn{toggles} the mode, | ||
| 110 | turning it on if it was off, and off if it was on. A positive | ||
| 111 | argument always turns the mode on, and a zero or negative argument | ||
| 112 | always turns it off. Mode commands are usually invoked with | ||
| 113 | @kbd{M-x}, but you can bind keys to them if you wish (@pxref{Key | ||
| 114 | Bindings}). | ||
| 115 | |||
| 116 | Most minor modes also have a @dfn{mode variable}, with the same name | ||
| 117 | as the mode command. Its value is non-@code{nil} if the mode is | ||
| 118 | enabled, and @code{nil} if it is disabled. In some minor modes---but | ||
| 119 | not all---the value of the variable alone determines whether the mode | ||
| 120 | is active: the mode command works simply by setting the variable, and | ||
| 121 | changing the value of the variable has the same effect as calling the | ||
| 122 | mode command. Because not all minor modes work this way, we recommend | ||
| 123 | that you avoid changing the mode variables directly; use the mode | ||
| 124 | commands instead. | ||
| 125 | |||
| 126 | The following is a list of some buffer-local minor modes: | ||
| 127 | |||
| 128 | @itemize @bullet | ||
| 129 | @item | ||
| 130 | Abbrev mode automatically expands text based on pre-defined | ||
| 131 | abbreviation definitions. @xref{Abbrevs}. | ||
| 132 | |||
| 133 | @item | ||
| 134 | Auto Fill mode inserts newlines as you type to prevent lines from | ||
| 135 | becoming too long. @xref{Filling}. | ||
| 136 | |||
| 137 | @item | ||
| 138 | Auto Save mode saves the buffer contents periodically to reduce the | ||
| 139 | amount of work you can lose in case of a crash. @xref{Auto Save}. | ||
| 140 | |||
| 141 | @item | ||
| 142 | Enriched mode enables editing and saving of formatted text. | ||
| 143 | @xref{Formatted Text}. | ||
| 144 | |||
| 145 | @item | ||
| 146 | Flyspell mode automatically highlights misspelled words. | ||
| 147 | @xref{Spelling}. | ||
| 148 | |||
| 149 | @item | ||
| 150 | Font-Lock mode automatically highlights certain textual units found in | ||
| 151 | programs. It is enabled globally by default, but you can disable it | ||
| 152 | in individual buffers. @xref{Faces}. | ||
| 153 | |||
| 154 | @findex linum-mode | ||
| 155 | @cindex Linum mode | ||
| 156 | @item | ||
| 157 | Linum mode displays each line's line number in the window's left | ||
| 158 | margin. Its mode command is @code{linum-mode}. | ||
| 159 | |||
| 160 | @item | ||
| 161 | Outline minor mode provides similar facilities to the major mode | ||
| 162 | called Outline mode. @xref{Outline Mode}. | ||
| 163 | |||
| 164 | @cindex Overwrite mode | ||
| 165 | @cindex mode, Overwrite | ||
| 166 | @findex overwrite-mode | ||
| 167 | @kindex INSERT | ||
| 168 | @item | ||
| 169 | Overwrite mode causes ordinary printing characters to replace existing | ||
| 170 | text instead of shoving it to the right. For example, if point is in | ||
| 171 | front of the @samp{B} in @samp{FOOBAR}, then in Overwrite mode typing | ||
| 172 | a @kbd{G} changes it to @samp{FOOGAR}, instead of producing | ||
| 173 | @samp{FOOGBAR} as usual. In Overwrite mode, the command @kbd{C-q} | ||
| 174 | inserts the next character whatever it may be, even if it is a | ||
| 175 | digit---this gives you a way to insert a character instead of | ||
| 176 | replacing an existing character. The mode command, | ||
| 177 | @code{overwrite-mode}, is bound to the @key{Insert} key. | ||
| 178 | |||
| 179 | @findex binary-overwrite-mode | ||
| 180 | @item | ||
| 181 | Binary Overwrite mode is a variant of Overwrite mode for editing | ||
| 182 | binary files; it treats newlines and tabs like other characters, so | ||
| 183 | that they overwrite other characters and can be overwritten by them. | ||
| 184 | In Binary Overwrite mode, digits after @kbd{C-q} specify an octal | ||
| 185 | character code, as usual. | ||
| 186 | |||
| 187 | @item | ||
| 188 | Visual Line mode performs ``word wrapping'', causing long lines to be | ||
| 189 | wrapped at word boundaries. @xref{Visual Line Mode}. | ||
| 190 | @end itemize | ||
| 191 | |||
| 192 | Here are some useful global minor modes. Since Line Number mode and | ||
| 193 | Transient Mark mode can be enabled or disabled just by setting the | ||
| 194 | value of the minor mode variable, you @emph{can} set them differently | ||
| 195 | for particular buffers, by explicitly making the corresponding | ||
| 196 | variable local in those buffers. @xref{Locals}. | ||
| 197 | |||
| 198 | @itemize @bullet | ||
| 199 | @item | ||
| 200 | Column Number mode enables display of the current column number in the | ||
| 201 | mode line. @xref{Mode Line}. | ||
| 202 | |||
| 203 | @item | ||
| 204 | Delete Selection mode causes text insertion to first delete the text | ||
| 205 | in the region, if the region is active. @xref{Using Region}. | ||
| 206 | |||
| 207 | @item | ||
| 208 | Icomplete mode displays an indication of available completions when | ||
| 209 | you are in the minibuffer and completion is active. @xref{Completion | ||
| 210 | Options}. | ||
| 211 | |||
| 212 | @item | ||
| 213 | Line Number mode enables display of the current line number in the | ||
| 214 | mode line. It is enabled by default. @xref{Mode Line}. | ||
| 215 | |||
| 216 | @item | ||
| 217 | Menu Bar mode gives each frame a menu bar. It is enabled by default. | ||
| 218 | @xref{Menu Bars}. | ||
| 219 | |||
| 220 | @item | ||
| 221 | Scroll Bar mode gives each window a scroll bar. It is enabled by | ||
| 222 | default, but the scroll bar is only displayed on graphical terminals. | ||
| 223 | @xref{Scroll Bars}. | ||
| 224 | |||
| 225 | @item | ||
| 226 | Tool Bar mode gives each frame a tool bar. It is enabled by default, | ||
| 227 | but the tool bar is only displayed on graphical terminals. @xref{Tool | ||
| 228 | Bars}. | ||
| 229 | |||
| 230 | @item | ||
| 231 | Transient Mark mode highlights the region, and makes many Emacs | ||
| 232 | commands operate on the region when the mark is active. It is enabled | ||
| 233 | by default. @xref{Mark}. | ||
| 234 | @end itemize | ||
| 235 | |||
| 236 | @node Choosing Modes | ||
| 237 | @section Choosing File Modes | ||
| 238 | |||
| 239 | @cindex choosing a major mode | ||
| 240 | @cindex choosing a minor mode | ||
| 241 | @vindex auto-mode-alist | ||
| 242 | When you visit a file, Emacs chooses a major mode automatically. | ||
| 243 | Normally, it makes the choice based on the file name---for example, | ||
| 244 | files whose names end in @samp{.c} are normally edited in C mode---but | ||
| 245 | sometimes it chooses the major mode based on special text in the file. | ||
| 246 | This special text can also be used to enable buffer-local minor modes. | ||
| 247 | |||
| 248 | Here is the exact procedure: | ||
| 249 | |||
| 250 | First, Emacs checks whether the file contains file-local mode | ||
| 251 | variables. @xref{File Variables}. If there is a file-local variable | ||
| 252 | that specifies a major mode, then Emacs uses that major mode, ignoring | ||
| 253 | all other criteria. There are several methods to specify a major mode | ||
| 254 | using a file-local variable; the simplest is to put the mode name in | ||
| 255 | the first nonblank line, preceded and followed by @samp{-*-}. Other | ||
| 256 | text may appear on the line as well. For example, | ||
| 257 | |||
| 258 | @example | ||
| 259 | ; -*-Lisp-*- | ||
| 260 | @end example | ||
| 261 | |||
| 262 | @noindent | ||
| 263 | tells Emacs to use Lisp mode. Note how the semicolon is used to make | ||
| 264 | Lisp treat this line as a comment. Alternatively, you could write | ||
| 265 | |||
| 266 | @example | ||
| 267 | ; -*- mode: Lisp;-*- | ||
| 268 | @end example | ||
| 269 | |||
| 270 | @noindent | ||
| 271 | The latter format allows you to specify local variables as well, like | ||
| 272 | this: | ||
| 273 | |||
| 274 | @example | ||
| 275 | ; -*- mode: Lisp; tab-width: 4; -*- | ||
| 276 | @end example | ||
| 277 | |||
| 278 | If a file variable specifies a buffer-local minor mode, Emacs | ||
| 279 | enables that minor mode in the buffer. | ||
| 280 | |||
| 281 | @vindex interpreter-mode-alist | ||
| 282 | Second, if there is no file variable specifying a major mode, Emacs | ||
| 283 | checks whether the file's contents begin with @samp{#!}. If so, that | ||
| 284 | indicates that the file can serve as an executable shell command, | ||
| 285 | which works by running an interpreter named on the file's first line | ||
| 286 | (the rest of the file is used as input to the interpreter). | ||
| 287 | Therefore, Emacs tries to use the interpreter name to choose a mode. | ||
| 288 | For instance, a file that begins with @samp{#!/usr/bin/perl} is opened | ||
| 289 | in Perl mode. The variable @code{interpreter-mode-alist} specifies | ||
| 290 | the correspondence between interpreter program names and major modes. | ||
| 291 | |||
| 292 | When the first line starts with @samp{#!}, you usually cannot use | ||
| 293 | the @samp{-*-} feature on the first line, because the system would get | ||
| 294 | confused when running the interpreter. So Emacs looks for @samp{-*-} | ||
| 295 | on the second line in such files as well as on the first line. The | ||
| 296 | same is true for man pages which start with the magic string | ||
| 297 | @samp{'\"} to specify a list of troff preprocessors. | ||
| 298 | |||
| 299 | @vindex magic-mode-alist | ||
| 300 | Third, Emacs tries to determine the major mode by looking at the | ||
| 301 | text at the start of the buffer, based on the variable | ||
| 302 | @code{magic-mode-alist}. By default, this variable is @code{nil} (an | ||
| 303 | empty list), so Emacs skips this step; however, you can customize it | ||
| 304 | in your init file (@pxref{Init File}). The value should be a list of | ||
| 305 | elements of the form | ||
| 306 | |||
| 307 | @example | ||
| 308 | (@var{regexp} . @var{mode-function}) | ||
| 309 | @end example | ||
| 310 | |||
| 311 | @noindent | ||
| 312 | where @var{regexp} is a regular expression (@pxref{Regexps}), and | ||
| 313 | @var{mode-function} is a Lisp function that toggles a major mode. If | ||
| 314 | the text at the beginning of the file matches @var{regexp}, Emacs | ||
| 315 | chooses the major mode specified by @var{mode-function}. | ||
| 316 | |||
| 317 | Alternatively, an element of @code{magic-mode-alist} may have the form | ||
| 318 | |||
| 319 | @example | ||
| 320 | (@var{match-function} . @var{mode-function}) | ||
| 321 | @end example | ||
| 322 | |||
| 323 | @noindent | ||
| 324 | where @var{match-function} is a Lisp function that is called at the | ||
| 325 | beginning of the buffer; if the function returns non-@code{nil}, Emacs | ||
| 326 | set the major mode wit @var{mode-function}. | ||
| 327 | |||
| 328 | Fourth---if Emacs still hasn't found a suitable major mode---it | ||
| 329 | looks at the file's name. The correspondence between file names and | ||
| 330 | major modes is controlled by the variable @code{auto-mode-alist}. Its | ||
| 331 | value is a list in which each element has this form, | ||
| 332 | |||
| 333 | @example | ||
| 334 | (@var{regexp} . @var{mode-function}) | ||
| 335 | @end example | ||
| 336 | |||
| 337 | @noindent | ||
| 338 | or this form, | ||
| 339 | |||
| 340 | @example | ||
| 341 | (@var{regexp} @var{mode-function} @var{flag}) | ||
| 342 | @end example | ||
| 343 | |||
| 344 | @noindent | ||
| 345 | For example, one element normally found in the list has the form | ||
| 346 | @code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C | ||
| 347 | mode for files whose names end in @file{.c}. (Note that @samp{\\} is | ||
| 348 | needed in Lisp syntax to include a @samp{\} in the string, which must | ||
| 349 | be used to suppress the special meaning of @samp{.} in regexps.) If | ||
| 350 | the element has the form @code{(@var{regexp} @var{mode-function} | ||
| 351 | @var{flag})} and @var{flag} is non-@code{nil}, then after calling | ||
| 352 | @var{mode-function}, Emacs discards the suffix that matched | ||
| 353 | @var{regexp} and searches the list again for another match. | ||
| 354 | |||
| 355 | @vindex auto-mode-case-fold | ||
| 356 | On systems with case-insensitive file names, such as Microsoft | ||
| 357 | Windows, Emacs performs a single case-insensitive search through | ||
| 358 | @code{auto-mode-alist}. On other systems, Emacs normally performs a | ||
| 359 | single case-sensitive search through the alist. However, if you | ||
| 360 | change the variable @code{auto-mode-case-fold} to @code{t}, Emacs | ||
| 361 | performs a second case-insensitive search if the first search fails. | ||
| 362 | |||
| 363 | @vindex magic-fallback-mode-alist | ||
| 364 | Finally, if Emacs @emph{still} hasn't found a major mode to use, it | ||
| 365 | compares the text at the start of the buffer to the variable | ||
| 366 | @code{magic-fallback-mode-alist}. This variable works like | ||
| 367 | @code{magic-mode-alist}, described above, except that is consulted | ||
| 368 | only after @code{auto-mode-alist}. By default, | ||
| 369 | @code{magic-fallback-mode-alist} contains forms that check for image | ||
| 370 | files, HTML/XML/SGML files, and Postscript files. | ||
| 371 | |||
| 372 | @vindex major-mode | ||
| 373 | Once a major mode is chosen, Emacs sets the value of the variable | ||
| 374 | @code{major-mode} to the symbol for that major mode (e.g., | ||
| 375 | @code{text-mode} for Text mode). This is a per-buffer variable | ||
| 376 | (@pxref{Locals}); its buffer-local value is set automatically, and you | ||
| 377 | should not change it yourself. | ||
| 378 | |||
| 379 | The default value of @code{major-mode} determines the major mode to | ||
| 380 | use for files that do not specify a major mode, and for new buffers | ||
| 381 | created with @kbd{C-x b}. Normally, this default value is the symbol | ||
| 382 | @code{fundamental-mode}, which specifies Fundamental mode. You can | ||
| 383 | change it via the Customization interface (@pxref{Easy | ||
| 384 | Customization}), or by adding a line like this to your init file | ||
| 385 | (@pxref{Init File}): | ||
| 386 | |||
| 387 | @smallexample | ||
| 388 | (setq-default major-mode 'text-mode) | ||
| 389 | @end smallexample | ||
| 390 | |||
| 391 | @noindent | ||
| 392 | If the default value of @code{major-mode} is @code{nil}, the major | ||
| 393 | mode is taken from the previously current buffer. | ||
| 394 | |||
| 395 | @findex normal-mode | ||
| 396 | If you have changed the major mode of a buffer, you can return to | ||
| 397 | the major mode Emacs would have chosen automatically, by typing | ||
| 398 | @kbd{M-x normal-mode}. This is the same function that | ||
| 399 | @code{find-file} calls to choose the major mode. It also processes | ||
| 400 | the file's @samp{-*-} line or local variables list (if any). | ||
| 401 | @xref{File Variables}. | ||
| 402 | |||
| 403 | @vindex change-major-mode-with-file-name | ||
| 404 | The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to | ||
| 405 | a new major mode if the new file name implies a mode (@pxref{Saving}). | ||
| 406 | (@kbd{C-x C-s} does this too, if the buffer wasn't visiting a file.) | ||
| 407 | However, this does not happen if the buffer contents specify a major | ||
| 408 | mode, and certain ``special'' major modes do not allow the mode to | ||
| 409 | change. You can turn off this mode-changing feature by setting | ||
| 410 | @code{change-major-mode-with-file-name} to @code{nil}. | ||
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 3f3da503769..3c970ecb12c 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc. | 2 | @c Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc. |
| 3 | @c See file emacs.texi for copying conditions. | 3 | @c See file emacs.texi for copying conditions. |
| 4 | @node International, Major Modes, Frames, Top | 4 | @node International, Modes, Frames, Top |
| 5 | @chapter International Character Set Support | 5 | @chapter International Character Set Support |
| 6 | @c This node is referenced in the tutorial. When renaming or deleting | 6 | @c This node is referenced in the tutorial. When renaming or deleting |
| 7 | @c it, the tutorial needs to be adjusted. (TUTORIAL.de) | 7 | @c it, the tutorial needs to be adjusted. (TUTORIAL.de) |
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 803f6b6ce49..870986d421a 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi | |||
| @@ -643,8 +643,9 @@ balanced. | |||
| 643 | When talking about these facilities, the term ``parenthesis'' also | 643 | When talking about these facilities, the term ``parenthesis'' also |
| 644 | includes braces, brackets, or whatever delimiters are defined to match | 644 | includes braces, brackets, or whatever delimiters are defined to match |
| 645 | in pairs. The major mode controls which delimiters are significant, | 645 | in pairs. The major mode controls which delimiters are significant, |
| 646 | through the syntax table (@pxref{Syntax}). In Lisp, only parentheses | 646 | through the syntax table (@pxref{Syntax Tables,, Syntax Tables, elisp, |
| 647 | count; in C, these commands apply to braces and brackets too. | 647 | The Emacs Lisp Reference Manual}). In Lisp, only parentheses count; |
| 648 | in C, these commands apply to braces and brackets too. | ||
| 648 | 649 | ||
| 649 | You can use @kbd{M-x check-parens} to find any unbalanced | 650 | You can use @kbd{M-x check-parens} to find any unbalanced |
| 650 | parentheses and unbalanced string quotes in the buffer. | 651 | parentheses and unbalanced string quotes in the buffer. |
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 0bc3ce3db8c..145687270ca 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi | |||
| @@ -190,7 +190,7 @@ sometimes useful to have this information. | |||
| 190 | Systems}). If it is a dash (@samp{-}), that indicates the default | 190 | Systems}). If it is a dash (@samp{-}), that indicates the default |
| 191 | state of affairs: no special character set handling, except for the | 191 | state of affairs: no special character set handling, except for the |
| 192 | end-of-line translations described in the next paragraph. @samp{=} | 192 | end-of-line translations described in the next paragraph. @samp{=} |
| 193 | means no conversion whatsoever. Letters represent various nontrivial | 193 | means no conversion whatsoever. Characters represent various nontrivial |
| 194 | @dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. | 194 | @dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. |
| 195 | On a text-only terminal, @var{cs} is preceded by two additional | 195 | On a text-only terminal, @var{cs} is preceded by two additional |
| 196 | characters that describe the coding system for keyboard input and the | 196 | characters that describe the coding system for keyboard input and the |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index b5d426210aa..015f9529b73 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 | |||
| 870 | word-constituent character. | 870 | word-constituent character. |
| 871 | 871 | ||
| 872 | @item \w | 872 | @item \w |
| 873 | matches any word-constituent character. The syntax table | 873 | matches any word-constituent character. The syntax table determines |
| 874 | determines which characters these are. @xref{Syntax}. | 874 | which characters these are. @xref{Syntax Tables,, Syntax Tables, |
| 875 | elisp, The Emacs Lisp Reference Manual}. | ||
| 875 | 876 | ||
| 876 | @item \W | 877 | @item \W |
| 877 | matches any character that is not a word-constituent. | 878 | matches any character that is not a word-constituent. |
| @@ -892,7 +893,8 @@ symbol-constituent character. | |||
| 892 | matches any character whose syntax is @var{c}. Here @var{c} is a | 893 | matches any character whose syntax is @var{c}. Here @var{c} is a |
| 893 | character that designates a particular syntax class: thus, @samp{w} | 894 | character that designates a particular syntax class: thus, @samp{w} |
| 894 | for word constituent, @samp{-} or @samp{ } for whitespace, @samp{.} | 895 | for word constituent, @samp{-} or @samp{ } for whitespace, @samp{.} |
| 895 | for ordinary punctuation, etc. @xref{Syntax}. | 896 | for ordinary punctuation, etc. @xref{Syntax Tables,, Syntax Tables, |
| 897 | elisp, The Emacs Lisp Reference Manual}. | ||
| 896 | 898 | ||
| 897 | @item \S@var{c} | 899 | @item \S@var{c} |
| 898 | matches any character whose syntax is not @var{c}. | 900 | matches any character whose syntax is not @var{c}. |
| @@ -911,8 +913,9 @@ matches any character that does @emph{not} belong to category | |||
| 911 | @var{c}. | 913 | @var{c}. |
| 912 | @end table | 914 | @end table |
| 913 | 915 | ||
| 914 | The constructs that pertain to words and syntax are controlled by the | 916 | The constructs that pertain to words and syntax are controlled by |
| 915 | setting of the syntax table (@pxref{Syntax}). | 917 | the setting of the syntax table. @xref{Syntax Tables,, Syntax Tables, |
| 918 | elisp, The Emacs Lisp Reference Manual}. | ||
| 916 | 919 | ||
| 917 | @node Regexp Example | 920 | @node Regexp Example |
| 918 | @section Regular Expression Example | 921 | @section Regular Expression Example |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index c0139c60557..dbda771e6a3 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 | |||
| 154 | argument that says how many words to scan for the place to put the | 154 | argument that says how many words to scan for the place to put the |
| 155 | mark. | 155 | mark. |
| 156 | 156 | ||
| 157 | The word commands' understanding of word boundaries is controlled | 157 | The word commands' understanding of word boundaries is controlled by |
| 158 | by the syntax table. Any character can, for example, be declared to | 158 | the syntax table. Any character can, for example, be declared to be a |
| 159 | be a word delimiter. @xref{Syntax}. | 159 | word delimiter. @xref{Syntax Tables,, Syntax Tables, elisp, The Emacs |
| 160 | Lisp Reference Manual}. | ||
| 160 | 161 | ||
| 161 | @node Sentences | 162 | @node Sentences |
| 162 | @section Sentences | 163 | @section Sentences |
| @@ -406,8 +407,6 @@ Text}). | |||
| 406 | * Fill Commands:: Commands to refill paragraphs and center lines. | 407 | * Fill Commands:: Commands to refill paragraphs and center lines. |
| 407 | * Fill Prefix:: Filling paragraphs that are indented or in a comment, etc. | 408 | * Fill Prefix:: Filling paragraphs that are indented or in a comment, etc. |
| 408 | * Adaptive Fill:: How Emacs can determine the fill prefix automatically. | 409 | * Adaptive Fill:: How Emacs can determine the fill prefix automatically. |
| 409 | * Refill:: Keeping paragraphs filled. | ||
| 410 | * Longlines:: Editing text with very long lines. | ||
| 411 | @end menu | 410 | @end menu |
| 412 | 411 | ||
| 413 | @node Auto Fill | 412 | @node Auto Fill |
| @@ -722,92 +721,6 @@ line, and it should return the appropriate fill prefix based on that | |||
| 722 | line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets | 721 | line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets |
| 723 | a chance to find a prefix. | 722 | a chance to find a prefix. |
| 724 | 723 | ||
| 725 | @node Refill | ||
| 726 | @subsection Refill Mode | ||
| 727 | @cindex refilling text, word processor style | ||
| 728 | @cindex modes, Refill | ||
| 729 | @cindex Refill minor mode | ||
| 730 | |||
| 731 | Refill minor mode provides support for keeping paragraphs filled as | ||
| 732 | you type or modify them in other ways. It provides an effect similar | ||
| 733 | to typical word processor behavior. This works by running a | ||
| 734 | paragraph-filling command at suitable times. | ||
| 735 | |||
| 736 | To toggle the use of Refill mode in the current buffer, type | ||
| 737 | @kbd{M-x refill-mode}. When you are typing text, only characters | ||
| 738 | which normally trigger auto filling, like the space character, will | ||
| 739 | trigger refilling. This is to avoid making it too slow. Apart from | ||
| 740 | self-inserting characters, other commands which modify the text cause | ||
| 741 | refilling. | ||
| 742 | |||
| 743 | The current implementation is preliminary and not robust. You can | ||
| 744 | get better ``line wrapping'' behavior using Longlines mode. | ||
| 745 | @xref{Longlines}. However, Longlines mode has an important | ||
| 746 | side-effect: the newlines that it inserts for you are not saved to | ||
| 747 | disk, so the files that you make with Longlines mode will appear to be | ||
| 748 | completely unfilled if you edit them without Longlines mode. | ||
| 749 | |||
| 750 | @node Longlines | ||
| 751 | @subsection Long Lines Mode | ||
| 752 | @cindex refilling text, word processor style | ||
| 753 | @cindex modes, Long Lines | ||
| 754 | @cindex word wrap | ||
| 755 | @cindex Long Lines minor mode | ||
| 756 | |||
| 757 | Sometimes, you may come across ``unfilled'' text files, which Emacs | ||
| 758 | normally displays as a bunch of extremely long lines. Comfortably | ||
| 759 | reading and editing such files normally requires ``word wrap'', a | ||
| 760 | feature that breaks up each long text line into multiple screen lines | ||
| 761 | in a readable manner---by putting the breaks at word boundaries. Many | ||
| 762 | text editors, such as those built into many web browsers, perform word | ||
| 763 | wrapping by default. | ||
| 764 | |||
| 765 | There are two different minor modes in Emacs that perform word | ||
| 766 | wrapping. The first is Visual Line mode, which does it by altering | ||
| 767 | the behavior of screen line continuation. @xref{Visual Line Mode}, | ||
| 768 | for information about Visual Line mode. | ||
| 769 | |||
| 770 | @findex longlines-mode | ||
| 771 | Instead of using Visual Line mode, you can use a minor mode called | ||
| 772 | Long Lines mode. Long Lines mode wraps lines by inserting or deleting | ||
| 773 | @dfn{soft newlines} as you type (@pxref{Hard and Soft Newlines}). | ||
| 774 | These soft newlines won't show up when you save the buffer into a | ||
| 775 | file, or when you copy the text into the kill ring, clipboard, or a | ||
| 776 | register. Unlike Visual Line mode, Lone Lines mode breaks long lines | ||
| 777 | at the fill column (@pxref{Fill Commands}), rather than the right | ||
| 778 | window edge. To enable Long Lines mode, type @kbd{M-x | ||
| 779 | longlines-mode}. If the text is full of long lines, this also | ||
| 780 | immediately ``wraps'' them all. | ||
| 781 | |||
| 782 | @findex longlines-auto-wrap | ||
| 783 | The word wrap performed by Long Lines mode is @emph{not} the same as | ||
| 784 | ordinary filling (@pxref{Fill Commands}). It does not contract | ||
| 785 | multiple spaces into a single space, recognize fill prefixes | ||
| 786 | (@pxref{Fill Prefix}), or perform adaptive filling (@pxref{Adaptive | ||
| 787 | Fill}). The reason for this is that a wrapped line is still, | ||
| 788 | conceptually, a single line. Each soft newline is equivalent to | ||
| 789 | exactly one space in that long line, and vice versa. However, you can | ||
| 790 | still call filling functions such as @kbd{M-q}, and these will work as | ||
| 791 | expected, inserting soft newlines that won't show up on disk or when | ||
| 792 | the text is copied. You can even rely entirely on the normal fill | ||
| 793 | commands by turning off automatic line wrapping, with @kbd{C-u M-x | ||
| 794 | longlines-auto-wrap}. To turn automatic line wrapping back on, type | ||
| 795 | @kbd{M-x longlines-auto-wrap}. | ||
| 796 | |||
| 797 | @findex longlines-show-hard-newlines | ||
| 798 | Type @kbd{RET} to insert a hard newline, one which automatic | ||
| 799 | refilling will not remove. If you want to see where all the hard | ||
| 800 | newlines are, type @kbd{M-x longlines-show-hard-newlines}. This will | ||
| 801 | mark each hard newline with a special symbol. The same command with a | ||
| 802 | prefix argument turns this display off. | ||
| 803 | |||
| 804 | Long Lines mode does not change normal text files that are already | ||
| 805 | filled, since the existing newlines are considered hard newlines. | ||
| 806 | Before Long Lines can do anything, you need to transform each | ||
| 807 | paragraph into a long line. One way is to set @code{fill-column} to a | ||
| 808 | large number (e.g., @kbd{C-u 9999 C-x f}), re-fill all the paragraphs, | ||
| 809 | and then set @code{fill-column} back to its original value. | ||
| 810 | |||
| 811 | @node Case | 724 | @node Case |
| 812 | @section Case Conversion Commands | 725 | @section Case Conversion Commands |
| 813 | @cindex case conversion | 726 | @cindex case conversion |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7e8dac0cb27..c265b9e878d 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-07-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * modes.texi (Mode Line Variables): Document `mode-line-remote' | ||
| 4 | and `mode-line-client' (bug#2974). | ||
| 5 | |||
| 6 | * text.texi (Insertion): Clarify marker movements (bug#1651). | ||
| 7 | Text from Drew Adams. | ||
| 8 | |||
| 1 | 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org> | 9 | 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 10 | ||
| 3 | * text.texi (Special Properties): Clarify the format of `face' | 11 | * text.texi (Special Properties): Clarify the format of `face' |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 562cc76c3f0..a8a10f750cc 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1866,6 +1866,15 @@ default value also displays the recursive editing level, information | |||
| 1866 | on the process status, and whether narrowing is in effect. | 1866 | on the process status, and whether narrowing is in effect. |
| 1867 | @end defopt | 1867 | @end defopt |
| 1868 | 1868 | ||
| 1869 | @defopt mode-line-remote | ||
| 1870 | This variable is used to show whether @code{default-directory} for the | ||
| 1871 | current buffer is remote. | ||
| 1872 | @end defopt | ||
| 1873 | |||
| 1874 | @defopt mode-line-client | ||
| 1875 | This variable is used to identify @code{emacsclient} frames. | ||
| 1876 | @end defopt | ||
| 1877 | |||
| 1869 | The following three variables are used in @code{mode-line-modes}: | 1878 | The following three variables are used in @code{mode-line-modes}: |
| 1870 | 1879 | ||
| 1871 | @defvar mode-name | 1880 | @defvar mode-name |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 2d487352243..b91afb044f0 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 | |||
| 364 | text, while other functions leave it after. We call the former | 364 | text, while other functions leave it after. We call the former |
| 365 | insertion @dfn{after point} and the latter insertion @dfn{before point}. | 365 | insertion @dfn{after point} and the latter insertion @dfn{before point}. |
| 366 | 366 | ||
| 367 | Insertion relocates markers that point at positions after the | 367 | Insertion moves markers located at positions after the insertion |
| 368 | insertion point, so that they stay with the surrounding text | 368 | point, so that they stay with the surrounding text (@pxref{Markers}). |
| 369 | (@pxref{Markers}). When a marker points at the place of insertion, | 369 | When a marker points at the place of insertion, insertion may or may |
| 370 | insertion may or may not relocate the marker, depending on the marker's | 370 | not relocate the marker, depending on the marker's insertion type |
| 371 | insertion type (@pxref{Marker Insertion Types}). Certain special | 371 | (@pxref{Marker Insertion Types}). Certain special functions such as |
| 372 | functions such as @code{insert-before-markers} relocate all such markers | 372 | @code{insert-before-markers} relocate all such markers to point after |
| 373 | to point after the inserted text, regardless of the markers' insertion | 373 | the inserted text, regardless of the markers' insertion type. |
| 374 | type. | ||
| 375 | 374 | ||
| 376 | Insertion functions signal an error if the current buffer is | 375 | Insertion functions signal an error if the current buffer is |
| 377 | read-only or if they insert within read-only text. | 376 | read-only or if they insert within read-only text. |
diff --git a/etc/ChangeLog b/etc/ChangeLog index f7ecbb5d777..1a9771a960a 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-07-10 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | Release MH-E version 8.2.90. | ||
| 4 | |||
| 5 | * NEWS, MH-E-NEWS: Update for MH-E release 8.2.90. | ||
| 6 | |||
| 1 | 2011-07-07 Tassilo Horn <tassilo@member.fsf.org> | 7 | 2011-07-07 Tassilo Horn <tassilo@member.fsf.org> |
| 2 | 8 | ||
| 3 | * themes/tsdh-light-theme.el: | 9 | * themes/tsdh-light-theme.el: |
diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index aaafe76990b..0db76bb1237 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS | |||
| @@ -4,6 +4,25 @@ Copyright (C) 2001-2011 Free Software Foundation, Inc. | |||
| 4 | See the end of the file for license conditions. | 4 | See the end of the file for license conditions. |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | * Changes in MH-E 8.2.90 | ||
| 8 | |||
| 9 | In 2010, the version control system (VCS) of Emacs was upgraded from | ||
| 10 | CVS to Bazaar. In 2011, the MH-E team followed suit and upgraded the | ||
| 11 | MH-E repository at SourceForge from CVS to Bazaar as well. The result | ||
| 12 | is version 8.2.90 of MH-E, which includes needed changes to the build | ||
| 13 | scripts. | ||
| 14 | |||
| 15 | Otherwise, this is a small release that includes mostly internal | ||
| 16 | changes from the Emacs team. One of these changes manifests itself in | ||
| 17 | the user interface--you can now complete folders with abbreviations, | ||
| 18 | meaning that `+f/b/b TAB' can complete to `+foo/bar/baz'. This version | ||
| 19 | of MH-E is packaged with GNU Emacs 24.1 | ||
| 20 | |||
| 21 | Also, RFC 2047-encoded Subject header fields in replies are now | ||
| 22 | decoded. | ||
| 23 | |||
| 24 | |||
| 25 | |||
| 7 | * Changes in MH-E 8.2 | 26 | * Changes in MH-E 8.2 |
| 8 | 27 | ||
| 9 | Version 8.2 of MH-E appeared in GNU Emacs 23.1. This is a small | 28 | Version 8.2 of MH-E appeared in GNU Emacs 23.1. This is a small |
| @@ -473,6 +473,10 @@ $ESHELL nor variable `explicit-shell-file-name' is set. | |||
| 473 | 473 | ||
| 474 | * Changes in Specialized Modes and Packages in Emacs 24.1 | 474 | * Changes in Specialized Modes and Packages in Emacs 24.1 |
| 475 | 475 | ||
| 476 | ** MH-E | ||
| 477 | |||
| 478 | *** Upgraded to MH-E version 8.2.90. See MH-E-NEWS for details. | ||
| 479 | |||
| 476 | ** comint and modes derived from it use the generic completion code. | 480 | ** comint and modes derived from it use the generic completion code. |
| 477 | 481 | ||
| 478 | ** Compilation mode | 482 | ** Compilation mode |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5d95ec74277..04d0828a8ab 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-07-06 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Assume freestanding C89 headers, string.h, stdlib.h. | 3 | Assume freestanding C89 headers, string.h, stdlib.h. |
| 4 | * ebrowse.c: Include stdlib.h unconditionally. | 4 | * ebrowse.c: Include stdlib.h unconditionally. |
| @@ -11,6 +11,10 @@ | |||
| 11 | Assume support for memcmp, memcpy, memmove, memset. | 11 | Assume support for memcmp, memcpy, memmove, memset. |
| 12 | * etags.c (absolute_filename): Assume memmove exists. | 12 | * etags.c (absolute_filename): Assume memmove exists. |
| 13 | 13 | ||
| 14 | 2011-07-09 Andreas Schwab <schwab@linux-m68k.org> | ||
| 15 | |||
| 16 | * update-game-score.c (usage): Update usage line. | ||
| 17 | |||
| 14 | 2011-07-02 Jason Rumney <jasonr@gnu.org> | 18 | 2011-07-02 Jason Rumney <jasonr@gnu.org> |
| 15 | 19 | ||
| 16 | * emacsclient.c (decode_options) [WINDOWSNT]: Avoid tty mode on | 20 | * 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 284beafb9d9..2a89379aefe 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; | |||
| 64 | static int | 64 | static int |
| 65 | usage (int err) | 65 | usage (int err) |
| 66 | { | 66 | { |
| 67 | fprintf (stdout, "Usage: update-game-score [-m MAX ] [ -r ] game/scorefile SCORE DATA\n"); | 67 | fprintf (stdout, "Usage: update-game-score [-m MAX] [-r] [-d DIR] game/scorefile SCORE DATA\n"); |
| 68 | fprintf (stdout, " update-game-score -h\n"); | 68 | fprintf (stdout, " update-game-score -h\n"); |
| 69 | fprintf (stdout, " -h\t\tDisplay this help.\n"); | 69 | fprintf (stdout, " -h\t\tDisplay this help.\n"); |
| 70 | fprintf (stdout, " -m MAX\t\tLimit the maximum number of scores to MAX.\n"); | 70 | 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; | |||
| 106 | #ifndef HAVE_STRERROR | 106 | #ifndef HAVE_STRERROR |
| 107 | #ifndef WINDOWSNT | 107 | #ifndef WINDOWSNT |
| 108 | char * | 108 | char * |
| 109 | strerror (errnum) | 109 | strerror (int errnum) |
| 110 | int errnum; | ||
| 111 | { | 110 | { |
| 112 | extern char *sys_errlist[]; | 111 | extern char *sys_errlist[]; |
| 113 | extern int sys_nerr; | 112 | extern int sys_nerr; |
diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 09ac138b851..b6d08c754ae 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h | |||
| @@ -270,26 +270,36 @@ typedef unsigned long int gl_uintptr_t; | |||
| 270 | /* Note: These types are compiler dependent. It may be unwise to use them in | 270 | /* Note: These types are compiler dependent. It may be unwise to use them in |
| 271 | public header files. */ | 271 | public header files. */ |
| 272 | 272 | ||
| 273 | #undef intmax_t | 273 | /* If the system defines INTMAX_MAX, assume that intmax_t works, and |
| 274 | #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | 274 | similarly for UINTMAX_MAX and uintmax_t. This avoids problems with |
| 275 | assuming one type where another is used by the system. */ | ||
| 276 | |||
| 277 | #ifndef INTMAX_MAX | ||
| 278 | # undef INTMAX_C | ||
| 279 | # undef intmax_t | ||
| 280 | # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | ||
| 275 | typedef long long int gl_intmax_t; | 281 | typedef long long int gl_intmax_t; |
| 276 | # define intmax_t gl_intmax_t | 282 | # define intmax_t gl_intmax_t |
| 277 | #elif defined GL_INT64_T | 283 | # elif defined GL_INT64_T |
| 278 | # define intmax_t int64_t | 284 | # define intmax_t int64_t |
| 279 | #else | 285 | # else |
| 280 | typedef long int gl_intmax_t; | 286 | typedef long int gl_intmax_t; |
| 281 | # define intmax_t gl_intmax_t | 287 | # define intmax_t gl_intmax_t |
| 288 | # endif | ||
| 282 | #endif | 289 | #endif |
| 283 | 290 | ||
| 284 | #undef uintmax_t | 291 | #ifndef UINTMAX_MAX |
| 285 | #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | 292 | # undef UINTMAX_C |
| 293 | # undef uintmax_t | ||
| 294 | # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | ||
| 286 | typedef unsigned long long int gl_uintmax_t; | 295 | typedef unsigned long long int gl_uintmax_t; |
| 287 | # define uintmax_t gl_uintmax_t | 296 | # define uintmax_t gl_uintmax_t |
| 288 | #elif defined GL_UINT64_T | 297 | # elif defined GL_UINT64_T |
| 289 | # define uintmax_t uint64_t | 298 | # define uintmax_t uint64_t |
| 290 | #else | 299 | # else |
| 291 | typedef unsigned long int gl_uintmax_t; | 300 | typedef unsigned long int gl_uintmax_t; |
| 292 | # define uintmax_t gl_uintmax_t | 301 | # define uintmax_t gl_uintmax_t |
| 302 | # endif | ||
| 293 | #endif | 303 | #endif |
| 294 | 304 | ||
| 295 | /* Verify that intmax_t and uintmax_t have the same size. Too much code | 305 | /* 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) | |||
| 431 | 441 | ||
| 432 | /* 7.18.2.5. Limits of greatest-width integer types */ | 442 | /* 7.18.2.5. Limits of greatest-width integer types */ |
| 433 | 443 | ||
| 434 | #undef INTMAX_MIN | 444 | #ifndef INTMAX_MAX |
| 435 | #undef INTMAX_MAX | 445 | # undef INTMAX_MIN |
| 436 | #ifdef INT64_MAX | 446 | # ifdef INT64_MAX |
| 437 | # define INTMAX_MIN INT64_MIN | 447 | # define INTMAX_MIN INT64_MIN |
| 438 | # define INTMAX_MAX INT64_MAX | 448 | # define INTMAX_MAX INT64_MAX |
| 439 | #else | 449 | # else |
| 440 | # define INTMAX_MIN INT32_MIN | 450 | # define INTMAX_MIN INT32_MIN |
| 441 | # define INTMAX_MAX INT32_MAX | 451 | # define INTMAX_MAX INT32_MAX |
| 452 | # endif | ||
| 442 | #endif | 453 | #endif |
| 443 | 454 | ||
| 444 | #undef UINTMAX_MAX | 455 | #ifndef UINTMAX_MAX |
| 445 | #ifdef UINT64_MAX | 456 | # ifdef UINT64_MAX |
| 446 | # define UINTMAX_MAX UINT64_MAX | 457 | # define UINTMAX_MAX UINT64_MAX |
| 447 | #else | 458 | # else |
| 448 | # define UINTMAX_MAX UINT32_MAX | 459 | # define UINTMAX_MAX UINT32_MAX |
| 460 | # endif | ||
| 449 | #endif | 461 | #endif |
| 450 | 462 | ||
| 451 | /* 7.18.3. Limits of other integer types */ | 463 | /* 7.18.3. Limits of other integer types */ |
| @@ -568,22 +580,24 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 568 | 580 | ||
| 569 | /* 7.18.4.2. Macros for greatest-width integer constants */ | 581 | /* 7.18.4.2. Macros for greatest-width integer constants */ |
| 570 | 582 | ||
| 571 | #undef INTMAX_C | 583 | #ifndef INTMAX_C |
| 572 | #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | 584 | # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 |
| 573 | # define INTMAX_C(x) x##LL | 585 | # define INTMAX_C(x) x##LL |
| 574 | #elif defined GL_INT64_T | 586 | # elif defined GL_INT64_T |
| 575 | # define INTMAX_C(x) INT64_C(x) | 587 | # define INTMAX_C(x) INT64_C(x) |
| 576 | #else | 588 | # else |
| 577 | # define INTMAX_C(x) x##L | 589 | # define INTMAX_C(x) x##L |
| 590 | # endif | ||
| 578 | #endif | 591 | #endif |
| 579 | 592 | ||
| 580 | #undef UINTMAX_C | 593 | #ifndef UINTMAX_C |
| 581 | #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | 594 | # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 |
| 582 | # define UINTMAX_C(x) x##ULL | 595 | # define UINTMAX_C(x) x##ULL |
| 583 | #elif defined GL_UINT64_T | 596 | # elif defined GL_UINT64_T |
| 584 | # define UINTMAX_C(x) UINT64_C(x) | 597 | # define UINTMAX_C(x) UINT64_C(x) |
| 585 | #else | 598 | # else |
| 586 | # define UINTMAX_C(x) x##UL | 599 | # define UINTMAX_C(x) x##UL |
| 600 | # endif | ||
| 587 | #endif | 601 | #endif |
| 588 | 602 | ||
| 589 | #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ | 603 | #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67615431b8f..a3faab15c35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,61 @@ | |||
| 1 | 2011-07-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * tool-bar.el (tool-bar-mode): Clarify positive/negative arguments | ||
| 4 | (bug#1526). | ||
| 5 | |||
| 6 | 2011-07-10 Martin Rudalics <rudalics@gmx.at> | ||
| 7 | |||
| 8 | * window.el (display-buffer-normalize-default): Don't invert | ||
| 9 | meaning of even-window-heights. Reported by Eli Zaretskii | ||
| 10 | <eliz@gnu.org>. | ||
| 11 | |||
| 12 | 2011-07-10 Bob Rogers <rogers@rgrjr.dyndns.org> | ||
| 13 | |||
| 14 | * vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256). | ||
| 15 | |||
| 16 | 2011-07-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 17 | |||
| 18 | * window.el (display-buffer): Fix arguments to | ||
| 19 | display-buffer-reuse-window in last change. | ||
| 20 | |||
| 21 | * faces.el (link): Use a less saturated blue on light backgrounds. | ||
| 22 | |||
| 23 | * startup.el (fancy-startup-text, fancy-about-text) | ||
| 24 | (fancy-startup-tail): Use font-lock faces, for background safety. | ||
| 25 | |||
| 26 | 2011-07-09 Bob Nnamtrop <bobnnamtrop@gmail.com> (tiny change) | ||
| 27 | |||
| 28 | * emulation/viper-cmd.el (viper-change-state-to-vi): Limit | ||
| 29 | triggering of abbrev expansion (Bug#9038). | ||
| 30 | |||
| 31 | 2011-07-09 Martin Rudalics <rudalics@gmx.at> | ||
| 32 | |||
| 33 | * window.el (display-buffer-default-specifiers): Remove. | ||
| 34 | (display-buffer-macro-specifiers): Remove default specifiers. | ||
| 35 | (display-buffer-alist): Default to nil. | ||
| 36 | (display-buffer-reuse-window): New optional argument | ||
| 37 | other-window. | ||
| 38 | (display-buffer-pop-up-window): Allow splitting internal | ||
| 39 | windows. Check whether a live window was created. | ||
| 40 | (display-buffer-other-window-means-other-frame) | ||
| 41 | (display-buffer-normalize-arguments): Rename to | ||
| 42 | display-buffer-normalize-argument and rewrite. Set the | ||
| 43 | other-window specifier. | ||
| 44 | (display-buffer-normalize-special): New function. | ||
| 45 | (display-buffer-normalize-options): Rename to | ||
| 46 | display-buffer-normalize-default and rewrite. | ||
| 47 | (display-buffer-normalize-options-inhibit): Remove. | ||
| 48 | (display-buffer-normalize-specifiers): Rewrite. | ||
| 49 | (display-buffer): Process other-window specifier and call | ||
| 50 | display-buffer-reuse-window with it. Emulate Emacs 23 behavior | ||
| 51 | more faithfully. | ||
| 52 | (pop-up-windows, even-window-heights): Restore Emacs 23 default | ||
| 53 | values. | ||
| 54 | (display-buffer-alist-set): Don't handle 'unset default values. | ||
| 55 | (display-buffer-in-window, display-buffer-alist-set): Replace | ||
| 56 | symbol "dedicated" by "dedicate". Reported by Tassilo Horn | ||
| 57 | <tassilo@member.fsf.org>. | ||
| 58 | |||
| 1 | 2011-07-09 Leo Liu <sdl.web@gmail.com> | 59 | 2011-07-09 Leo Liu <sdl.web@gmail.com> |
| 2 | 60 | ||
| 3 | * register.el (insert-register): Restore accidental change on | 61 | * register.el (insert-register): Restore accidental change on |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index f06428d81eb..9d0eb6c0d14 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -617,7 +617,10 @@ | |||
| 617 | (or (viper-overlay-p viper-replace-overlay) | 617 | (or (viper-overlay-p viper-replace-overlay) |
| 618 | (viper-set-replace-overlay (point-min) (point-min))) | 618 | (viper-set-replace-overlay (point-min) (point-min))) |
| 619 | (viper-hide-replace-overlay) | 619 | (viper-hide-replace-overlay) |
| 620 | (if abbrev-mode (expand-abbrev)) | 620 | ;; Expand abbrevs iff the previous character has word syntax. |
| 621 | (and abbrev-mode | ||
| 622 | (eq (char-syntax (preceding-char)) ?w) | ||
| 623 | (expand-abbrev)) | ||
| 621 | (if (and auto-fill-function (> (current-column) fill-column)) | 624 | (if (and auto-fill-function (> (current-column) fill-column)) |
| 622 | (funcall auto-fill-function)) | 625 | (funcall auto-fill-function)) |
| 623 | ;; don't leave whitespace lines around | 626 | ;; don't leave whitespace lines around |
diff --git a/lisp/faces.el b/lisp/faces.el index 34e154314b5..302f8af35ac 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2109,7 +2109,7 @@ terminal type to a different value." | |||
| 2109 | 2109 | ||
| 2110 | (defface link | 2110 | (defface link |
| 2111 | '((((class color) (min-colors 88) (background light)) | 2111 | '((((class color) (min-colors 88) (background light)) |
| 2112 | :foreground "blue1" :underline t) | 2112 | :foreground "RoyalBlue3" :underline t) |
| 2113 | (((class color) (background light)) | 2113 | (((class color) (background light)) |
| 2114 | :foreground "blue" :underline t) | 2114 | :foreground "blue" :underline t) |
| 2115 | (((class color) (min-colors 88) (background dark)) | 2115 | (((class color) (min-colors 88) (background dark)) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a0f2d5809a6..f780cf7b9f0 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-07-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): `debbugs-*' | ||
| 4 | renamed to `debbugs-gnu-*'. | ||
| 5 | |||
| 1 | 2011-07-08 Daiki Ueno <ueno@unixuser.org> | 6 | 2011-07-08 Daiki Ueno <ueno@unixuser.org> |
| 2 | 7 | ||
| 3 | * plstore.el: Revert the editing feature since it is not urgent. | 8 | * 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 da925700bd2..2ea2a5c9bc7 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." | |||
| 2469 | number | 2469 | number |
| 2470 | (cdr (assoc 'debian gnus-bug-group-download-format-alist)))) | 2470 | (cdr (assoc 'debian gnus-bug-group-download-format-alist)))) |
| 2471 | 2471 | ||
| 2472 | (defvar debbugs-bug-number) ; debbugs-gnu | 2472 | (defvar debbugs-gnu-bug-number) ; debbugs-gnu |
| 2473 | 2473 | ||
| 2474 | (defun gnus-read-ephemeral-emacs-bug-group (ids &optional window-conf) | 2474 | (defun gnus-read-ephemeral-emacs-bug-group (ids &optional window-conf) |
| 2475 | "Browse Emacs bugs IDS as an ephemeral group." | 2475 | "Browse Emacs bugs IDS as an ephemeral group." |
| @@ -2482,10 +2482,10 @@ the bug number, and browsing the URL must return mbox output." | |||
| 2482 | ids | 2482 | ids |
| 2483 | (cdr (assoc 'emacs gnus-bug-group-download-format-alist)) | 2483 | (cdr (assoc 'emacs gnus-bug-group-download-format-alist)) |
| 2484 | window-conf) | 2484 | window-conf) |
| 2485 | (when (fboundp 'debbugs-summary-mode) | 2485 | (when (fboundp 'debbugs-gnu-summary-mode) |
| 2486 | (with-current-buffer (window-buffer (selected-window)) | 2486 | (with-current-buffer (window-buffer (selected-window)) |
| 2487 | (debbugs-summary-mode 1) | 2487 | (debbugs-gnu-summary-mode 1) |
| 2488 | (set (make-local-variable 'debbugs-bug-number) (car ids))))) | 2488 | (set (make-local-variable 'debbugs-gnu-bug-number) (car ids))))) |
| 2489 | 2489 | ||
| 2490 | (defun gnus-group-jump-to-group (group &optional prompt) | 2490 | (defun gnus-group-jump-to-group (group &optional prompt) |
| 2491 | "Jump to newsgroup GROUP. | 2491 | "Jump to newsgroup GROUP. |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 365c444d591..197c87a26ab 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,33 @@ | |||
| 1 | 2011-07-10 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | Release MH-E version 8.9.90. | ||
| 4 | |||
| 5 | * mh-e.el (Version, mh-version): Update for release 8.2.90. | ||
| 6 | |||
| 7 | * mh-utils.el (mh-sub-folders-actual): Remove FIXME question. | ||
| 8 | |||
| 9 | * mh-mime.el (mh-decode-message-subject): Fix case of Subject. | ||
| 10 | |||
| 11 | * mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder) | ||
| 12 | (mh-make-folder): Replace calls to switch-to-buffer with of | ||
| 13 | pop-to-buffer. The former is intended for interactive use only and | ||
| 14 | generates warnings in Emacs 24. | ||
| 15 | |||
| 16 | 2011-07-09 Bill Wohler <wohler@newt.com> | ||
| 17 | |||
| 18 | * mh-speed.el (mh-speed-toggle,mh-speed-view): Document "ignored" | ||
| 19 | arguments to keep checkdoc happy. | ||
| 20 | |||
| 21 | * mh-search.el (mh-flists-execute): Ditto. | ||
| 22 | |||
| 23 | * mh-funcs.el (mh-undo-folder): Ditto. | ||
| 24 | |||
| 25 | * mh-comp.el (mh-user-agent-compose): Ditto. | ||
| 26 | |||
| 27 | * mh-xface.el (mh-face-to-png, mh-uncompface) | ||
| 28 | (mh-picon-file-contents): Only call set-buffer-multibyte if it | ||
| 29 | exists, which it doesn't in XEmacs. | ||
| 30 | |||
| 1 | 2011-07-04 Bill Wohler <wohler@newt.com> | 31 | 2011-07-04 Bill Wohler <wohler@newt.com> |
| 2 | 32 | ||
| 3 | * mh-e.el: Just require mh-loaddefs since loading it in an | 33 | * 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 1aa57316f50..882a8771e28 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 | |||
| 213 | are strings. | 213 | are strings. |
| 214 | 214 | ||
| 215 | CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and | 215 | CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and |
| 216 | RETURN-ACTION are ignored." | 216 | RETURN-ACTION and any additional arguments are IGNORED." |
| 217 | (mh-find-path) | 217 | (mh-find-path) |
| 218 | (let ((mh-error-if-no-draft t)) | 218 | (let ((mh-error-if-no-draft t)) |
| 219 | (mh-send to "" subject) | 219 | (mh-send to "" subject) |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 87272b1c83b..70d0cb5fcd5 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Bill Wohler <wohler@newt.com> | 6 | ;; Author: Bill Wohler <wohler@newt.com> |
| 7 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 7 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| 8 | ;; Version: 8.2 | 8 | ;; Version: 8.2.90 |
| 9 | ;; Keywords: mail | 9 | ;; Keywords: mail |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | ;; MH-E is an Emacs interface to the MH mail system. | 28 | ;; MH-E is an Emacs interface to the MH mail system. |
| 29 | 29 | ||
| 30 | ;; MH-E is supported in GNU Emacs 21 and 22, as well as XEmacs 21 | 30 | ;; MH-E is supported in GNU Emacs 21 and higher, as well as XEmacs 21 |
| 31 | ;; (except for versions 21.5.9-21.5.16). It is compatible with MH | 31 | ;; (except for versions 21.5.9-21.5.16). It is compatible with MH |
| 32 | ;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils | 32 | ;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils |
| 33 | ;; 1.0 and higher. Gnus is also required; version 5.10 or higher is | 33 | ;; 1.0 and higher. Gnus is also required; version 5.10 or higher is |
| @@ -127,7 +127,7 @@ | |||
| 127 | ;; Try to keep variables local to a single file. Provide accessors if | 127 | ;; Try to keep variables local to a single file. Provide accessors if |
| 128 | ;; variables are shared. Use this section as a last resort. | 128 | ;; variables are shared. Use this section as a last resort. |
| 129 | 129 | ||
| 130 | (defconst mh-version "8.2" "Version number of MH-E.") | 130 | (defconst mh-version "8.2.90" "Version number of MH-E.") |
| 131 | 131 | ||
| 132 | ;; Variants | 132 | ;; Variants |
| 133 | 133 | ||
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 40febd641de..2248221664b 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el | |||
| @@ -795,7 +795,7 @@ instead." | |||
| 795 | (setq threading-needed-flag mh-show-threads-flag) | 795 | (setq threading-needed-flag mh-show-threads-flag) |
| 796 | (setq mh-previous-window-config config)) | 796 | (setq mh-previous-window-config config)) |
| 797 | ((not (eq (current-buffer) (get-buffer folder))) | 797 | ((not (eq (current-buffer) (get-buffer folder))) |
| 798 | (switch-to-buffer folder) | 798 | (pop-to-buffer folder) |
| 799 | (setq mh-previous-window-config config)))) | 799 | (setq mh-previous-window-config config)))) |
| 800 | (mh-get-new-mail file) | 800 | (mh-get-new-mail file) |
| 801 | (when (and threading-needed-flag | 801 | (when (and threading-needed-flag |
| @@ -855,7 +855,7 @@ From a program, edit MESSAGE; nil means edit current message." | |||
| 855 | 855 | ||
| 856 | ;; Just show the edit buffer... | 856 | ;; Just show the edit buffer... |
| 857 | (delete-other-windows) | 857 | (delete-other-windows) |
| 858 | (switch-to-buffer edit-buffer))) | 858 | (pop-to-buffer edit-buffer))) |
| 859 | 859 | ||
| 860 | ;;;###mh-autoload | 860 | ;;;###mh-autoload |
| 861 | (defun mh-next-button (&optional backward-flag) | 861 | (defun mh-next-button (&optional backward-flag) |
| @@ -1705,7 +1705,7 @@ DONT-EXEC-PENDING is non-nil." | |||
| 1705 | (unless dont-exec-pending | 1705 | (unless dont-exec-pending |
| 1706 | (mh-process-or-undo-commands folder) | 1706 | (mh-process-or-undo-commands folder) |
| 1707 | (mh-reset-threads-and-narrowing)) | 1707 | (mh-reset-threads-and-narrowing)) |
| 1708 | (switch-to-buffer folder))) | 1708 | (pop-to-buffer folder))) |
| 1709 | (mh-regenerate-headers range) | 1709 | (mh-regenerate-headers range) |
| 1710 | (if (zerop (buffer-size)) | 1710 | (if (zerop (buffer-size)) |
| 1711 | (if (equal range "all") | 1711 | (if (equal range "all") |
| @@ -1786,7 +1786,7 @@ Also removes all content from the folder buffer." | |||
| 1786 | (defun mh-make-folder (name) | 1786 | (defun mh-make-folder (name) |
| 1787 | "Create a new mail folder called NAME. | 1787 | "Create a new mail folder called NAME. |
| 1788 | Make it the current folder." | 1788 | Make it the current folder." |
| 1789 | (switch-to-buffer name) | 1789 | (pop-to-buffer name) |
| 1790 | (setq buffer-read-only nil) | 1790 | (setq buffer-read-only nil) |
| 1791 | (erase-buffer) | 1791 | (erase-buffer) |
| 1792 | (if mh-adaptive-cmd-note-flag | 1792 | (if mh-adaptive-cmd-note-flag |
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index dfac684ed50..46a04c38845 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." | |||
| 349 | (error "Error occurred during execution of %s" command))))) | 349 | (error "Error occurred during execution of %s" command))))) |
| 350 | 350 | ||
| 351 | ;;;###mh-autoload | 351 | ;;;###mh-autoload |
| 352 | (defun mh-undo-folder (&rest _ignored) | 352 | (defun mh-undo-folder (&rest ignored) |
| 353 | "Undo all refiles and deletes in the current folder. | 353 | "Undo all refiles and deletes in the current folder. |
| 354 | Arguments are IGNORED (for `revert-buffer')." | 354 | Arguments are IGNORED (for `revert-buffer')." |
| 355 | (interactive) | 355 | (interactive) |
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 25554b7822e..bc5080a5d30 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." | |||
| 511 | (when mh-decode-mime-flag | 511 | (when mh-decode-mime-flag |
| 512 | (save-excursion | 512 | (save-excursion |
| 513 | (let ((buffer-read-only nil)) | 513 | (let ((buffer-read-only nil)) |
| 514 | (rfc2047-decode-region (progn (mh-goto-header-field "subject:") (point)) | 514 | (rfc2047-decode-region (progn (mh-goto-header-field "Subject:") (point)) |
| 515 | (progn (mh-header-field-end) (point))))))) | 515 | (progn (mh-header-field-end) (point))))))) |
| 516 | 516 | ||
| 517 | ;;;###mh-autoload | 517 | ;;;###mh-autoload |
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 1e764291f5d..a547dd8d80a 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el | |||
| @@ -454,12 +454,12 @@ search all folders." | |||
| 454 | 454 | ||
| 455 | (defvar mh-flists-search-folders) | 455 | (defvar mh-flists-search-folders) |
| 456 | 456 | ||
| 457 | (defun mh-flists-execute (&rest args) | 457 | (defun mh-flists-execute (&rest ignored) |
| 458 | "Execute flists. | 458 | "Execute flists. |
| 459 | Search for messages belonging to `mh-flists-sequence' in the | 459 | Search for messages belonging to `mh-flists-sequence' in the |
| 460 | folders specified by `mh-flists-search-folders'. If | 460 | folders specified by `mh-flists-search-folders'. If |
| 461 | `mh-recursive-folders-flag' is t, then the folders are searched | 461 | `mh-recursive-folders-flag' is t, then the folders are searched |
| 462 | recursively. All parameters ARGS are ignored." | 462 | recursively. All arguments are IGNORED." |
| 463 | (set-buffer (get-buffer-create mh-temp-index-buffer)) | 463 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 464 | (erase-buffer) | 464 | (erase-buffer) |
| 465 | (unless (executable-find "sh") | 465 | (unless (executable-find "sh") |
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index b782081c85c..5c3679e8ce6 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." | |||
| 126 | ;; Otherwise on to your regular programming | 126 | ;; Otherwise on to your regular programming |
| 127 | (t t))) | 127 | (t t))) |
| 128 | 128 | ||
| 129 | (defun mh-speed-toggle (&rest args) | 129 | (defun mh-speed-toggle (&rest ignored) |
| 130 | "Toggle the display of child folders in the speedbar. | 130 | "Toggle the display of child folders in the speedbar. |
| 131 | The optional ARGS from speedbar are ignored." | 131 | The optional arguments from speedbar are IGNORED." |
| 132 | (interactive) | 132 | (interactive) |
| 133 | (declare (ignore args)) | 133 | (declare (ignore args)) |
| 134 | (beginning-of-line) | 134 | (beginning-of-line) |
| @@ -165,9 +165,9 @@ The optional ARGS from speedbar are ignored." | |||
| 165 | (mh-line-beginning-position) (1+ (line-beginning-position)) | 165 | (mh-line-beginning-position) (1+ (line-beginning-position)) |
| 166 | `(mh-expanded t))))))) | 166 | `(mh-expanded t))))))) |
| 167 | 167 | ||
| 168 | (defun mh-speed-view (&rest args) | 168 | (defun mh-speed-view (&rest ignored) |
| 169 | "Visits the selected folder just as if you had used \\<mh-folder-mode-map>\\[mh-visit-folder]. | 169 | "Visits the selected folder just as if you had used \\<mh-folder-mode-map>\\[mh-visit-folder]. |
| 170 | The optional ARGS from speedbar are ignored." | 170 | The optional arguments from speedbar are IGNORED." |
| 171 | (interactive) | 171 | (interactive) |
| 172 | (declare (ignore args)) | 172 | (declare (ignore args)) |
| 173 | (let* ((folder (get-text-property (mh-line-beginning-position) 'mh-folder)) | 173 | (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 a77633cd4bd..6132af17dab 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 | |||
| 596 | (setq name (substring name 0 (1- (length name))))) | 596 | (setq name (substring name 0 (1- (length name))))) |
| 597 | (push | 597 | (push |
| 598 | (cons name | 598 | (cons name |
| 599 | ;; FIXME: what is this used for? --Stef | ||
| 600 | (search-forward "(others)" (mh-line-end-position) t)) | 599 | (search-forward "(others)" (mh-line-end-position) t)) |
| 601 | results)))) | 600 | results)))) |
| 602 | (forward-line 1)))) | 601 | (forward-line 1)))) |
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el index 027d79a948a..1c7531b59d1 100644 --- a/lisp/mh-e/mh-xface.el +++ b/lisp/mh-e/mh-xface.el | |||
| @@ -125,7 +125,8 @@ in this order is used." | |||
| 125 | (defun mh-face-to-png (data) | 125 | (defun mh-face-to-png (data) |
| 126 | "Convert base64 encoded DATA to png image." | 126 | "Convert base64 encoded DATA to png image." |
| 127 | (with-temp-buffer | 127 | (with-temp-buffer |
| 128 | (set-buffer-multibyte nil) | 128 | (if (fboundp 'set-buffer-multibyte) |
| 129 | (set-buffer-multibyte nil)) | ||
| 129 | (insert data) | 130 | (insert data) |
| 130 | (ignore-errors (base64-decode-region (point-min) (point-max))) | 131 | (ignore-errors (base64-decode-region (point-min) (point-max))) |
| 131 | (buffer-string))) | 132 | (buffer-string))) |
| @@ -133,7 +134,8 @@ in this order is used." | |||
| 133 | (defun mh-uncompface (data) | 134 | (defun mh-uncompface (data) |
| 134 | "Run DATA through `uncompface' to generate bitmap." | 135 | "Run DATA through `uncompface' to generate bitmap." |
| 135 | (with-temp-buffer | 136 | (with-temp-buffer |
| 136 | (set-buffer-multibyte nil) | 137 | (if (fboundp 'set-buffer-multibyte) |
| 138 | (set-buffer-multibyte nil)) | ||
| 137 | (insert data) | 139 | (insert data) |
| 138 | (when (and mh-uncompface-executable | 140 | (when (and mh-uncompface-executable |
| 139 | (equal (call-process-region (point-min) (point-max) | 141 | (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 | |||
| 271 | elements of the list are nil." | 273 | elements of the list are nil." |
| 272 | (if (stringp file) | 274 | (if (stringp file) |
| 273 | (with-temp-buffer | 275 | (with-temp-buffer |
| 274 | (set-buffer-multibyte nil) | 276 | (if (fboundp 'set-buffer-multibyte) |
| 277 | (set-buffer-multibyte nil)) | ||
| 275 | (let ((type (and (string-match ".*\\.\\(...\\)$" file) | 278 | (let ((type (and (string-match ".*\\.\\(...\\)$" file) |
| 276 | (intern (match-string 1 file))))) | 279 | (intern (match-string 1 file))))) |
| 277 | (insert-file-contents-literally file) | 280 | (insert-file-contents-literally file) |
diff --git a/lisp/startup.el b/lisp/startup.el index 26c5a469330..c6f3063ca90 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1293,7 +1293,7 @@ If this is nil, no message will be displayed." | |||
| 1293 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1293 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1294 | 1294 | ||
| 1295 | (defconst fancy-startup-text | 1295 | (defconst fancy-startup-text |
| 1296 | `((:face (variable-pitch (:foreground "red")) | 1296 | `((:face (variable-pitch font-lock-comment-face) |
| 1297 | "Welcome to " | 1297 | "Welcome to " |
| 1298 | :link ("GNU Emacs" | 1298 | :link ("GNU Emacs" |
| 1299 | ,(lambda (_button) (browse-url "http://www.gnu.org/software/emacs/")) | 1299 | ,(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 | |||
| 1350 | `:face FACE', like `fancy-splash-insert' accepts them.") | 1350 | `:face FACE', like `fancy-splash-insert' accepts them.") |
| 1351 | 1351 | ||
| 1352 | (defconst fancy-about-text | 1352 | (defconst fancy-about-text |
| 1353 | `((:face (variable-pitch (:foreground "red")) | 1353 | `((:face (variable-pitch font-lock-comment-face) |
| 1354 | "This is " | 1354 | "This is " |
| 1355 | :link ("GNU Emacs" | 1355 | :link ("GNU Emacs" |
| 1356 | ,(lambda (_button) (browse-url "http://www.gnu.org/software/emacs/")) | 1356 | ,(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 | |||
| 1366 | `("GNU" ,(lambda (_button) (describe-gnu-project)) | 1366 | `("GNU" ,(lambda (_button) (describe-gnu-project)) |
| 1367 | "Display info on the GNU project."))) | 1367 | "Display info on the GNU project."))) |
| 1368 | " operating system.\n" | 1368 | " operating system.\n" |
| 1369 | :face ,(lambda () | 1369 | :face (variable-pitch font-lock-builtin-face) |
| 1370 | (list 'variable-pitch | ||
| 1371 | (list :foreground | ||
| 1372 | (if (eq (frame-parameter nil 'background-mode) 'dark) | ||
| 1373 | "cyan" "darkblue")))) | ||
| 1374 | "\n" | 1370 | "\n" |
| 1375 | ,(lambda () (emacs-version)) | 1371 | ,(lambda () (emacs-version)) |
| 1376 | "\n" | 1372 | "\n" |
| @@ -1426,8 +1422,7 @@ Each element in the list should be a list of strings or pairs | |||
| 1426 | ,(lambda (_button) | 1422 | ,(lambda (_button) |
| 1427 | (browse-url "http://www.gnu.org/software/emacs/tour/")) | 1423 | (browse-url "http://www.gnu.org/software/emacs/tour/")) |
| 1428 | "Browse http://www.gnu.org/software/emacs/tour/") | 1424 | "Browse http://www.gnu.org/software/emacs/tour/") |
| 1429 | "\tSee an overview of Emacs features at gnu.org" | 1425 | "\tSee an overview of Emacs features at gnu.org")) |
| 1430 | )) | ||
| 1431 | "A list of texts to show in the middle part of the About screen. | 1426 | "A list of texts to show in the middle part of the About screen. |
| 1432 | Each element in the list should be a list of strings or pairs | 1427 | Each element in the list should be a list of strings or pairs |
| 1433 | `:face FACE', like `fancy-splash-insert' accepts them.") | 1428 | `:face FACE', like `fancy-splash-insert' accepts them.") |
| @@ -1537,93 +1532,91 @@ a face or button specification." | |||
| 1537 | 1532 | ||
| 1538 | (defun fancy-startup-tail (&optional concise) | 1533 | (defun fancy-startup-tail (&optional concise) |
| 1539 | "Insert the tail part of the splash screen into the current buffer." | 1534 | "Insert the tail part of the splash screen into the current buffer." |
| 1540 | (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark) | 1535 | (unless concise |
| 1541 | "cyan" "darkblue"))) | ||
| 1542 | (unless concise | ||
| 1543 | (fancy-splash-insert | ||
| 1544 | :face 'variable-pitch | ||
| 1545 | "\nTo start... " | ||
| 1546 | :link `("Open a File" | ||
| 1547 | ,(lambda (_button) (call-interactively 'find-file)) | ||
| 1548 | "Specify a new file's name, to edit the file") | ||
| 1549 | " " | ||
| 1550 | :link `("Open Home Directory" | ||
| 1551 | ,(lambda (_button) (dired "~")) | ||
| 1552 | "Open your home directory, to operate on its files") | ||
| 1553 | " " | ||
| 1554 | :link `("Customize Startup" | ||
| 1555 | ,(lambda (_button) (customize-group 'initialization)) | ||
| 1556 | "Change initialization settings including this screen") | ||
| 1557 | "\n")) | ||
| 1558 | (fancy-splash-insert | 1536 | (fancy-splash-insert |
| 1559 | :face 'variable-pitch "To quit a partially entered command, type " | 1537 | :face 'variable-pitch |
| 1560 | :face 'default "Control-g" | 1538 | "\nTo start... " |
| 1561 | :face 'variable-pitch ".\n") | 1539 | :link `("Open a File" |
| 1562 | (fancy-splash-insert :face `(variable-pitch (:foreground ,fg)) | 1540 | ,(lambda (_button) (call-interactively 'find-file)) |
| 1563 | "\nThis is " | 1541 | "Specify a new file's name, to edit the file") |
| 1564 | (emacs-version) | 1542 | " " |
| 1565 | "\n" | 1543 | :link `("Open Home Directory" |
| 1566 | :face '(variable-pitch (:height 0.8)) | 1544 | ,(lambda (_button) (dired "~")) |
| 1567 | emacs-copyright | 1545 | "Open your home directory, to operate on its files") |
| 1568 | "\n") | 1546 | " " |
| 1569 | (and auto-save-list-file-prefix | 1547 | :link `("Customize Startup" |
| 1570 | ;; Don't signal an error if the | 1548 | ,(lambda (_button) (customize-group 'initialization)) |
| 1571 | ;; directory for auto-save-list files | 1549 | "Change initialization settings including this screen") |
| 1572 | ;; does not yet exist. | 1550 | "\n")) |
| 1573 | (file-directory-p (file-name-directory | 1551 | (fancy-splash-insert |
| 1574 | auto-save-list-file-prefix)) | 1552 | :face 'variable-pitch "To quit a partially entered command, type " |
| 1575 | (directory-files | 1553 | :face 'default "Control-g" |
| 1576 | (file-name-directory auto-save-list-file-prefix) | 1554 | :face 'variable-pitch ".\n") |
| 1577 | nil | 1555 | (fancy-splash-insert :face `(variable-pitch font-lock-builtin-face) |
| 1578 | (concat "\\`" | 1556 | "\nThis is " |
| 1579 | (regexp-quote (file-name-nondirectory | 1557 | (emacs-version) |
| 1580 | auto-save-list-file-prefix))) | 1558 | "\n" |
| 1581 | t) | 1559 | :face '(variable-pitch (:height 0.8)) |
| 1582 | (fancy-splash-insert :face '(variable-pitch (:foreground "red")) | 1560 | emacs-copyright |
| 1583 | "\nIf an Emacs session crashed recently, " | 1561 | "\n") |
| 1584 | "type " | 1562 | (and auto-save-list-file-prefix |
| 1585 | :face '(fixed-pitch :foreground "red") | 1563 | ;; Don't signal an error if the |
| 1586 | "Meta-x recover-session RET" | 1564 | ;; directory for auto-save-list files |
| 1587 | :face '(variable-pitch (:foreground "red")) | 1565 | ;; does not yet exist. |
| 1588 | "\nto recover" | 1566 | (file-directory-p (file-name-directory |
| 1589 | " the files you were editing.")) | 1567 | auto-save-list-file-prefix)) |
| 1590 | 1568 | (directory-files | |
| 1591 | (when concise | 1569 | (file-name-directory auto-save-list-file-prefix) |
| 1592 | (fancy-splash-insert | 1570 | nil |
| 1593 | :face 'variable-pitch "\n" | 1571 | (concat "\\`" |
| 1594 | :link `("Dismiss this startup screen" | 1572 | (regexp-quote (file-name-nondirectory |
| 1595 | ,(lambda (_button) | 1573 | auto-save-list-file-prefix))) |
| 1596 | (when startup-screen-inhibit-startup-screen | 1574 | t) |
| 1597 | (customize-set-variable 'inhibit-startup-screen t) | 1575 | (fancy-splash-insert :face '(variable-pitch font-lock-comment-face) |
| 1598 | (customize-mark-to-save 'inhibit-startup-screen) | 1576 | "\nIf an Emacs session crashed recently, " |
| 1599 | (custom-save-all)) | 1577 | "type " |
| 1600 | (let ((w (get-buffer-window "*GNU Emacs*"))) | 1578 | :face '(fixed-pitch font-lock-comment-face) |
| 1601 | (and w (not (one-window-p)) (delete-window w))) | 1579 | "Meta-x recover-session RET" |
| 1602 | (kill-buffer "*GNU Emacs*"))) | 1580 | :face '(variable-pitch font-lock-comment-face) |
| 1603 | " ") | 1581 | "\nto recover" |
| 1604 | (when (or user-init-file custom-file) | 1582 | " the files you were editing.")) |
| 1605 | (let ((checked (create-image "checked.xpm" | 1583 | |
| 1606 | nil nil :ascent 'center)) | 1584 | (when concise |
| 1607 | (unchecked (create-image "unchecked.xpm" | 1585 | (fancy-splash-insert |
| 1608 | nil nil :ascent 'center))) | 1586 | :face 'variable-pitch "\n" |
| 1609 | (insert-button | 1587 | :link `("Dismiss this startup screen" |
| 1610 | " " | 1588 | ,(lambda (_button) |
| 1611 | :on-glyph checked | 1589 | (when startup-screen-inhibit-startup-screen |
| 1612 | :off-glyph unchecked | 1590 | (customize-set-variable 'inhibit-startup-screen t) |
| 1613 | 'checked nil 'display unchecked 'follow-link t | 1591 | (customize-mark-to-save 'inhibit-startup-screen) |
| 1614 | 'action (lambda (button) | 1592 | (custom-save-all)) |
| 1615 | (if (overlay-get button 'checked) | 1593 | (let ((w (get-buffer-window "*GNU Emacs*"))) |
| 1616 | (progn (overlay-put button 'checked nil) | 1594 | (and w (not (one-window-p)) (delete-window w))) |
| 1617 | (overlay-put button 'display | 1595 | (kill-buffer "*GNU Emacs*"))) |
| 1618 | (overlay-get button :off-glyph)) | 1596 | " ") |
| 1619 | (setq startup-screen-inhibit-startup-screen | 1597 | (when (or user-init-file custom-file) |
| 1620 | nil)) | 1598 | (let ((checked (create-image "checked.xpm" |
| 1621 | (overlay-put button 'checked t) | 1599 | nil nil :ascent 'center)) |
| 1622 | (overlay-put button 'display | 1600 | (unchecked (create-image "unchecked.xpm" |
| 1623 | (overlay-get button :on-glyph)) | 1601 | nil nil :ascent 'center))) |
| 1624 | (setq startup-screen-inhibit-startup-screen t))))) | 1602 | (insert-button |
| 1625 | (fancy-splash-insert :face '(variable-pitch (:height 0.9)) | 1603 | " " |
| 1626 | " Never show it again."))))) | 1604 | :on-glyph checked |
| 1605 | :off-glyph unchecked | ||
| 1606 | 'checked nil 'display unchecked 'follow-link t | ||
| 1607 | 'action (lambda (button) | ||
| 1608 | (if (overlay-get button 'checked) | ||
| 1609 | (progn (overlay-put button 'checked nil) | ||
| 1610 | (overlay-put button 'display | ||
| 1611 | (overlay-get button :off-glyph)) | ||
| 1612 | (setq startup-screen-inhibit-startup-screen | ||
| 1613 | nil)) | ||
| 1614 | (overlay-put button 'checked t) | ||
| 1615 | (overlay-put button 'display | ||
| 1616 | (overlay-get button :on-glyph)) | ||
| 1617 | (setq startup-screen-inhibit-startup-screen t))))) | ||
| 1618 | (fancy-splash-insert :face '(variable-pitch (:height 0.9)) | ||
| 1619 | " Never show it again.")))) | ||
| 1627 | 1620 | ||
| 1628 | (defun exit-splash-screen () | 1621 | (defun exit-splash-screen () |
| 1629 | "Stop displaying the splash screen buffer." | 1622 | "Stop displaying the splash screen buffer." |
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 8fdce17df86..05208abb720 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el | |||
| @@ -44,7 +44,8 @@ | |||
| 44 | ;; when you are on a tty. I hope that won't cause too much trouble -- rms. | 44 | ;; when you are on a tty. I hope that won't cause too much trouble -- rms. |
| 45 | (define-minor-mode tool-bar-mode | 45 | (define-minor-mode tool-bar-mode |
| 46 | "Toggle use of the tool bar. | 46 | "Toggle use of the tool bar. |
| 47 | With numeric ARG, display the tool bar if and only if ARG is positive. | 47 | With a numeric argument, if the argument is positive, turn on the |
| 48 | tool bar; otherwise, turn off the tool bar. | ||
| 48 | 49 | ||
| 49 | See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for | 50 | See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for |
| 50 | conveniently adding tool bar items." | 51 | conveniently adding tool bar items." |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index e3f3c153043..796311f8f66 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1605,10 +1605,13 @@ Return t if the buffer had changes, nil otherwise." | |||
| 1605 | ;; bindings are nicer for read only buffers. pcl-cvs does the | 1605 | ;; bindings are nicer for read only buffers. pcl-cvs does the |
| 1606 | ;; same thing. | 1606 | ;; same thing. |
| 1607 | (setq buffer-read-only t) | 1607 | (setq buffer-read-only t) |
| 1608 | (vc-exec-after `(vc-diff-finish ,(current-buffer) ',(when verbose | ||
| 1609 | messages))) | ||
| 1610 | ;; Display the buffer, but at the end because it can change point. | 1608 | ;; Display the buffer, but at the end because it can change point. |
| 1611 | (pop-to-buffer (current-buffer)) | 1609 | (pop-to-buffer (current-buffer)) |
| 1610 | ;; The diff process may finish early, so call `vc-diff-finish' | ||
| 1611 | ;; after `pop-to-buffer'; the former assumes the diff buffer is | ||
| 1612 | ;; shown in some window. | ||
| 1613 | (vc-exec-after `(vc-diff-finish ,(current-buffer) | ||
| 1614 | ',(when verbose messages))) | ||
| 1612 | ;; In the async case, we return t even if there are no differences | 1615 | ;; In the async case, we return t even if there are no differences |
| 1613 | ;; because we don't know that yet. | 1616 | ;; because we don't know that yet. |
| 1614 | t))) | 1617 | t))) |
diff --git a/lisp/window.el b/lisp/window.el index 2c4bf0dcb23..999e408bdb1 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -3829,22 +3829,6 @@ subwindows can get as small as `window-safe-min-height' and | |||
| 3829 | (window-state-put-2 ignore)) | 3829 | (window-state-put-2 ignore)) |
| 3830 | (window-check frame)))) | 3830 | (window-check frame)))) |
| 3831 | 3831 | ||
| 3832 | ;;; Displaying buffers. | ||
| 3833 | (defconst display-buffer-default-specifiers | ||
| 3834 | '((reuse-window nil same visible) | ||
| 3835 | (pop-up-window (largest . nil) (lru . nil)) | ||
| 3836 | (pop-up-window-min-height . 40) | ||
| 3837 | (pop-up-window-min-width . 80) | ||
| 3838 | (reuse-window other nil nil) | ||
| 3839 | (reuse-window nil other visible) | ||
| 3840 | (reuse-window nil nil t) | ||
| 3841 | (reuse-window-even-sizes . t)) | ||
| 3842 | "Buffer display default specifiers. | ||
| 3843 | The value specified here is used when no other specifiers have | ||
| 3844 | been specified by the user or the application. Consult the | ||
| 3845 | documentation of `display-buffer-alist' for a description of | ||
| 3846 | buffer display specifiers.") | ||
| 3847 | |||
| 3848 | (defconst display-buffer-macro-specifiers | 3832 | (defconst display-buffer-macro-specifiers |
| 3849 | '((same-window | 3833 | '((same-window |
| 3850 | ;; Use the same window. | 3834 | ;; Use the same window. |
| @@ -3854,11 +3838,6 @@ buffer display specifiers.") | |||
| 3854 | (reuse-window nil same nil) | 3838 | (reuse-window nil same nil) |
| 3855 | (pop-up-window (largest . nil) (lru . nil)) | 3839 | (pop-up-window (largest . nil) (lru . nil)) |
| 3856 | (reuse-window nil other nil)) | 3840 | (reuse-window nil other nil)) |
| 3857 | ;; (other-window | ||
| 3858 | ;; ;; Avoid selected window. | ||
| 3859 | ;; (reuse-window other same visible) | ||
| 3860 | ;; (pop-up-window (largest . nil) (lru . nil)) | ||
| 3861 | ;; (reuse-window other other visible)) | ||
| 3862 | (same-frame-other-window | 3841 | (same-frame-other-window |
| 3863 | ;; Avoid other frames and selected window. | 3842 | ;; Avoid other frames and selected window. |
| 3864 | (reuse-window other same nil) | 3843 | (reuse-window other same nil) |
| @@ -3868,25 +3847,10 @@ buffer display specifiers.") | |||
| 3868 | ;; Avoid selected frame. | 3847 | ;; Avoid selected frame. |
| 3869 | (reuse-window nil same other) | 3848 | (reuse-window nil same other) |
| 3870 | (pop-up-frame) | 3849 | (pop-up-frame) |
| 3871 | (reuse-window nil other other)) | 3850 | (reuse-window nil other other))) |
| 3872 | (default | ||
| 3873 | ;; The default specifiers. | ||
| 3874 | display-buffer-default-specifiers)) | ||
| 3875 | "Buffer display macro specifiers.") | 3851 | "Buffer display macro specifiers.") |
| 3876 | 3852 | ||
| 3877 | (defcustom display-buffer-alist | 3853 | (defcustom display-buffer-alist nil |
| 3878 | '((((regexp . ".*")) | ||
| 3879 | ;; Reuse window showing same buffer on same frame. | ||
| 3880 | reuse-window (reuse-window nil same nil) | ||
| 3881 | ;; Pop up window. | ||
| 3882 | pop-up-window | ||
| 3883 | ;; Split largest or lru window. | ||
| 3884 | (pop-up-window (largest . nil) (lru . nil)) | ||
| 3885 | (pop-up-window-min-height . 40) ; split-height-threshold / 2 | ||
| 3886 | (pop-up-window-min-width . 80) ; split-width-threshold / 2 | ||
| 3887 | ;; Reuse any but selected window on same frame. | ||
| 3888 | reuse-window (reuse-window other nil nil) | ||
| 3889 | (reuse-window-even-sizes . t))) | ||
| 3890 | "List associating buffer identifiers with display specifiers. | 3854 | "List associating buffer identifiers with display specifiers. |
| 3891 | The car of each element of this list is built from a set of cons | 3855 | The car of each element of this list is built from a set of cons |
| 3892 | cells called buffer identifiers. `display-buffer' shows a buffer | 3856 | cells called buffer identifiers. `display-buffer' shows a buffer |
| @@ -4751,15 +4715,15 @@ documentation of `display-buffer-alist' for a description." | |||
| 4751 | (setq window (window-normalize-live-window window)) | 4715 | (setq window (window-normalize-live-window window)) |
| 4752 | (let* ((old-frame (selected-frame)) | 4716 | (let* ((old-frame (selected-frame)) |
| 4753 | (new-frame (window-frame window)) | 4717 | (new-frame (window-frame window)) |
| 4754 | (dedicated (cdr (assq 'dedicated specifiers))) | 4718 | (dedicate (cdr (assq 'dedicate specifiers))) |
| 4755 | (no-other-window (cdr (assq 'no-other-window specifiers)))) | 4719 | (no-other-window (cdr (assq 'no-other-window specifiers)))) |
| 4756 | ;; Show BUFFER in WINDOW. | 4720 | ;; Show BUFFER in WINDOW. |
| 4757 | (unless (eq buffer (window-buffer window)) | 4721 | (unless (eq buffer (window-buffer window)) |
| 4758 | ;; If we show another buffer in WINDOW, undedicate it first. | 4722 | ;; If we show another buffer in WINDOW, undedicate it first. |
| 4759 | (set-window-dedicated-p window nil)) | 4723 | (set-window-dedicated-p window nil)) |
| 4760 | (set-window-buffer window buffer) | 4724 | (set-window-buffer window buffer) |
| 4761 | (when dedicated | 4725 | (when dedicate |
| 4762 | (set-window-dedicated-p window dedicated)) | 4726 | (set-window-dedicated-p window dedicate)) |
| 4763 | (when no-other-window | 4727 | (when no-other-window |
| 4764 | (set-window-parameter window 'no-other-window t)) | 4728 | (set-window-parameter window 'no-other-window t)) |
| 4765 | (unless (or (eq old-frame new-frame) | 4729 | (unless (or (eq old-frame new-frame) |
| @@ -4775,7 +4739,7 @@ documentation of `display-buffer-alist' for a description." | |||
| 4775 | ;; Return window. | 4739 | ;; Return window. |
| 4776 | window)) | 4740 | window)) |
| 4777 | 4741 | ||
| 4778 | (defun display-buffer-reuse-window (buffer method &optional specifiers) | 4742 | (defun display-buffer-reuse-window (buffer method &optional specifiers other-window) |
| 4779 | "Display BUFFER in an existing window. | 4743 | "Display BUFFER in an existing window. |
| 4780 | METHOD must be a list in the form of the cdr of a `reuse-window' | 4744 | METHOD must be a list in the form of the cdr of a `reuse-window' |
| 4781 | buffer display specifier, see `display-buffer-alist' for an | 4745 | 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 | |||
| 4787 | frame. | 4751 | frame. |
| 4788 | 4752 | ||
| 4789 | Optional argument SPECIFIERS must be a list of valid display | 4753 | Optional argument SPECIFIERS must be a list of valid display |
| 4790 | specifiers. Return the window chosen to display BUFFER, nil if | 4754 | specifiers. Optional argument OTHER-WINDOW, if non-nil, means do |
| 4791 | none was found." | 4755 | not use the selected window. Return the window chosen to display |
| 4756 | BUFFER, nil if none was found." | ||
| 4792 | (let* ((method-window (nth 0 method)) | 4757 | (let* ((method-window (nth 0 method)) |
| 4793 | (method-buffer (nth 1 method)) | 4758 | (method-buffer (nth 1 method)) |
| 4794 | (method-frame (nth 2 method)) | 4759 | (method-frame (nth 2 method)) |
| @@ -4806,6 +4771,7 @@ none was found." | |||
| 4806 | (eq window-buffer buffer)) | 4771 | (eq window-buffer buffer)) |
| 4807 | (or (not method-window) | 4772 | (or (not method-window) |
| 4808 | (and (eq method-window 'same) | 4773 | (and (eq method-window 'same) |
| 4774 | (not other-window) | ||
| 4809 | (eq window (selected-window))) | 4775 | (eq window (selected-window))) |
| 4810 | (and (eq method-window 'other) | 4776 | (and (eq method-window 'other) |
| 4811 | (not (eq window (selected-window)))) | 4777 | (not (eq window (selected-window)))) |
| @@ -5064,7 +5030,7 @@ description." | |||
| 5064 | ;; A window, directly specified. | 5030 | ;; A window, directly specified. |
| 5065 | cand))) | 5031 | cand))) |
| 5066 | 5032 | ||
| 5067 | (when (and (window-live-p window) | 5033 | (when (and (window-any-p window) |
| 5068 | ;; The window must be on the correct frame, | 5034 | ;; The window must be on the correct frame, |
| 5069 | (eq (window-frame window) frame) | 5035 | (eq (window-frame window) frame) |
| 5070 | ;; and must be neither a minibuffer window | 5036 | ;; and must be neither a minibuffer window |
| @@ -5084,7 +5050,7 @@ description." | |||
| 5084 | ;; Don't pass any specifiers to this function. | 5050 | ;; Don't pass any specifiers to this function. |
| 5085 | (funcall side window))))) | 5051 | (funcall side window))))) |
| 5086 | 5052 | ||
| 5087 | (when window | 5053 | (when (window-live-p window) |
| 5088 | ;; Adjust sizes if asked for. | 5054 | ;; Adjust sizes if asked for. |
| 5089 | (display-buffer-set-height window specifiers) | 5055 | (display-buffer-set-height window specifiers) |
| 5090 | (display-buffer-set-width window specifiers) | 5056 | (display-buffer-set-width window specifiers) |
| @@ -5324,201 +5290,225 @@ Optional argument LABEL is like the same argument of | |||
| 5324 | 5290 | ||
| 5325 | The calculation of the return value is exclusively based on the | 5291 | The calculation of the return value is exclusively based on the |
| 5326 | user preferences expressed in `display-buffer-alist'." | 5292 | user preferences expressed in `display-buffer-alist'." |
| 5327 | (let* ((buffer (window-normalize-buffer buffer-or-name)) | 5293 | (let* ((buffer-name |
| 5328 | (list (display-buffer-normalize-alist (buffer-name buffer) label)) | 5294 | (buffer-name (window-normalize-buffer buffer-or-name))) |
| 5329 | (value (assq 'other-window-means-other-frame | 5295 | (default (display-buffer-normalize-default buffer-name)) |
| 5330 | (or (car list) (cdr list))))) | 5296 | (alist (display-buffer-normalize-alist buffer-name label))) |
| 5331 | (when value (cdr value)))) | 5297 | (or (cdr (assq 'other-window-means-other-frame default)) |
| 5332 | 5298 | (cdr (assq 'other-window-means-other-frame (cdr alist)))))) | |
| 5333 | (defun display-buffer-normalize-arguments (buffer-name specifiers label other-frame) | 5299 | |
| 5334 | "Normalize second and third argument of `display-buffer'. | 5300 | (defun display-buffer-normalize-special (&optional args) |
| 5335 | BUFFER-NAME is the name of the buffer that shall be displayed, | 5301 | "Return buffer display specifiers for `special-display-frame-alist'." |
| 5336 | SPECIFIERS is the second argument of `display-buffer'. LABEL is | 5302 | (progn ;; <-- reserved for with-no-warnings |
| 5337 | the same argument of `display-buffer'. OTHER-FRAME non-nil means | 5303 | (if (and (listp args) (symbolp (car args))) |
| 5338 | use other-frame for other-window." | 5304 | ;; Note: `display-buffer' funcalls this so take "(nth 1 args)" |
| 5339 | (let (normalized entry specifier pars) | 5305 | ;; where `special-display-popup-frame' (which uses apply) takes |
| 5340 | (setq specifier | 5306 | ;; "(cdr args)". |
| 5341 | (cond | 5307 | `((function ,(car args) ,(nth 1 args))) |
| 5342 | ((not specifiers) | 5308 | (append |
| 5343 | nil) | 5309 | '((reuse-window nil same 0)) |
| 5344 | ((listp specifiers) | 5310 | (when (and (listp args) (cdr (assq 'same-window args))) |
| 5345 | ;; If SPECIFIERS is a list, we assume it is a list of specifiers. | 5311 | '((reuse-window same nil nil) (reuse-dedicated . weak))) |
| 5346 | (dolist (specifier specifiers) | 5312 | (when (and (listp args) |
| 5347 | (cond | 5313 | (or (cdr (assq 'same-frame args)) |
| 5348 | ((consp specifier) | 5314 | (cdr (assq 'same-window args)))) |
| 5349 | (setq normalized (cons specifier normalized))) | 5315 | '((pop-up-window (largest . nil) (lru . nil)) |
| 5350 | ((eq specifier 'other-window) | 5316 | (reuse-window nil nil nil))) |
| 5351 | ;; `other-window' must be treated separately. | 5317 | (unless display-buffer-mark-dedicated |
| 5352 | (let ((entry (assq (if other-frame | 5318 | ;; Don't make anything created above dedicated unless requested. |
| 5353 | 'other-frame | 5319 | ;; Otherwise the dedication request below gets in our way. |
| 5354 | 'same-frame-other-window) | 5320 | '((dedicated . nil))) |
| 5355 | display-buffer-macro-specifiers))) | 5321 | `((pop-up-frame t) |
| 5356 | (dolist (item (cdr entry)) | 5322 | ,(append '(pop-up-frame-alist) |
| 5357 | (setq normalized (cons item normalized))))) | 5323 | (when (listp args) args) |
| 5358 | ((symbolp specifier) | 5324 | special-display-frame-alist) |
| 5359 | ;; Might be a macro specifier, try to expand it (the cdr is a | 5325 | (dedicated . t)))))) |
| 5360 | ;; list and we have to reverse it later, so do it one at a | 5326 | |
| 5361 | ;; time). | 5327 | (defun display-buffer-normalize-default (buffer-or-name) |
| 5362 | (let ((entry (assq specifier display-buffer-macro-specifiers))) | ||
| 5363 | (dolist (item (cdr entry)) | ||
| 5364 | (setq normalized (cons item normalized))))))) | ||
| 5365 | ;; Reverse list. | ||
| 5366 | (nreverse normalized)) | ||
| 5367 | ((setq entry (assq specifiers display-buffer-macro-specifiers)) | ||
| 5368 | ;; A macro specifier. | ||
| 5369 | (cdr entry)) | ||
| 5370 | ((or other-frame (with-no-warnings pop-up-frames)) | ||
| 5371 | ;; `special-display-p' group. | ||
| 5372 | (if (and (with-no-warnings special-display-function) | ||
| 5373 | ;; `special-display-p' returns either t or a list | ||
| 5374 | ;; of frame parameters to pass to | ||
| 5375 | ;; `special-display-function'. | ||
| 5376 | (setq pars (with-no-warnings | ||
| 5377 | (special-display-p buffer-name)))) | ||
| 5378 | (list (list 'function | ||
| 5379 | (with-no-warnings special-display-function) | ||
| 5380 | (when (listp pars) pars))) | ||
| 5381 | ;; Pop up another frame. | ||
| 5382 | (cddr (assq 'other-frame display-buffer-macro-specifiers)))) | ||
| 5383 | (t | ||
| 5384 | ;; In any other case pop up a new window. | ||
| 5385 | (cdr (assq 'same-frame-other-window | ||
| 5386 | display-buffer-macro-specifiers))))) | ||
| 5387 | |||
| 5388 | ;; Handle the old meaning of the LABEL argument of `display-buffer'. | ||
| 5389 | (cond | ||
| 5390 | ((or (memq label '(visible 0 t)) (frame-live-p label)) | ||
| 5391 | ;; LABEL must be one of visible (and visible frame), 0 (any | ||
| 5392 | ;; visible or iconfied frame), t (any frame), or a live frame. | ||
| 5393 | (cons `(reuse-window nil same ,label) specifier)) | ||
| 5394 | ((or other-frame | ||
| 5395 | (with-no-warnings pop-up-frames) | ||
| 5396 | (with-no-warnings display-buffer-reuse-frames)) | ||
| 5397 | (cons '(reuse-window nil same 0) specifier)) | ||
| 5398 | (t | ||
| 5399 | specifier)))) | ||
| 5400 | |||
| 5401 | (defun display-buffer-normalize-options (buffer-or-name) | ||
| 5402 | "Subroutine of `display-buffer-normalize-specifiers'. | 5328 | "Subroutine of `display-buffer-normalize-specifiers'. |
| 5403 | BUFFER-OR-NAME is the buffer to display. This routine provides a | 5329 | BUFFER-OR-NAME is the buffer to display. |
| 5404 | compatibility layer for the now obsolete Emacs 23 buffer display | 5330 | |
| 5405 | options." | 5331 | This routine provides a compatibility layer for the obsolete |
| 5406 | (with-no-warnings | 5332 | Emacs 23 buffer display options to set up the corresponding |
| 5333 | buffer display specifiers." | ||
| 5334 | (progn ;; <-- reserved for with-no-warnings | ||
| 5407 | (let* ((buffer (window-normalize-buffer buffer-or-name)) | 5335 | (let* ((buffer (window-normalize-buffer buffer-or-name)) |
| 5408 | (buffer-name (buffer-name buffer)) | 5336 | (buffer-name (buffer-name buffer)) |
| 5409 | (use-pop-up-frames | 5337 | (pop-up-frames |
| 5410 | (or (and (eq pop-up-frames 'graphic-only) | 5338 | (and (boundp 'pop-up-frames) |
| 5411 | (display-graphic-p)) | 5339 | (or (and (eq pop-up-frames 'graphic-only) |
| 5412 | pop-up-frames)) | 5340 | (display-graphic-p)) |
| 5413 | specifiers) | 5341 | pop-up-frames))) |
| 5414 | ;; `even-window-heights', unless nil or unset. | 5342 | specifiers args) |
| 5415 | (unless (memq even-window-heights '(nil unset)) | 5343 | ;; `other-window-means-other-frame' |
| 5344 | (when pop-up-frames | ||
| 5345 | (setq specifiers | ||
| 5346 | (cons (cons 'other-window-means-other-frame t) specifiers))) | ||
| 5347 | |||
| 5348 | ;; `even-window-heights' | ||
| 5349 | (unless (and (boundp 'even-window-heights) | ||
| 5350 | (not even-window-heights)) | ||
| 5416 | (setq specifiers | 5351 | (setq specifiers |
| 5417 | (cons (cons 'reuse-window-even-sizes t) specifiers))) | 5352 | (cons (cons 'reuse-window-even-sizes t) specifiers))) |
| 5418 | 5353 | ||
| 5419 | ;; `display-buffer-mark-dedicated' | 5354 | ;; `display-buffer-mark-dedicated' |
| 5420 | (when display-buffer-mark-dedicated | 5355 | (when (and (boundp 'display-buffer-mark-dedicated) |
| 5356 | display-buffer-mark-dedicated) | ||
| 5421 | (setq specifiers | 5357 | (setq specifiers |
| 5422 | (cons (cons 'dedicate display-buffer-mark-dedicated) | 5358 | (cons (cons 'dedicate display-buffer-mark-dedicated) |
| 5423 | specifiers))) | 5359 | specifiers))) |
| 5424 | 5360 | ||
| 5425 | ;; `pop-up-window' group. Anything is added here iff | 5361 | ;; `pop-up-window-min-height' |
| 5426 | ;; `pop-up-windows' is neither nil nor unset. | 5362 | (let ((min-height |
| 5427 | (let ((pop-up-window (not (memq pop-up-windows '(nil unset)))) | 5363 | (if (boundp 'split-height-threshold) |
| 5428 | (fun (unless (eq split-window-preferred-function | 5364 | (if (numberp split-height-threshold) |
| 5429 | 'split-window-sensibly) | 5365 | (/ split-height-threshold 2) |
| 5430 | split-window-preferred-function)) | 5366 | 1.0) |
| 5431 | (min-height (if (numberp split-height-threshold) | 5367 | 40))) |
| 5432 | (/ split-height-threshold 2) | 5368 | (setq specifiers |
| 5433 | 1.0)) | 5369 | (cons (cons 'pop-up-window-min-height min-height) |
| 5434 | (min-width (if (numberp split-width-threshold) | 5370 | specifiers))) |
| 5435 | (/ split-width-threshold 2) | 5371 | |
| 5436 | 1.0))) | 5372 | ;; `pop-up-window-min-width' |
| 5437 | ;; Create an entry only if a default value was changed. | 5373 | (let ((min-width |
| 5438 | (when (or pop-up-window | 5374 | (if (boundp 'split-width-threshold) |
| 5439 | (not (equal split-height-threshold 80)) | 5375 | (if (numberp split-width-threshold) |
| 5440 | (not (equal split-width-threshold 160))) | 5376 | (/ split-width-threshold 2) |
| 5441 | ;; `reuse-window' (needed as fallback when popping up the new | 5377 | 1.0) |
| 5442 | ;; window fails). | 5378 | 80))) |
| 5443 | (setq specifiers | 5379 | (setq specifiers |
| 5444 | (cons (list 'reuse-window 'other nil nil) | 5380 | (cons (cons 'pop-up-window-min-width min-width) |
| 5445 | specifiers)) | 5381 | specifiers))) |
| 5446 | ;; `split-width-threshold' | 5382 | |
| 5447 | (setq specifiers | 5383 | ;; `pop-up-window' |
| 5448 | (cons (cons 'pop-up-window-min-width min-width) | 5384 | (unless (and (boundp 'pop-up-windows) (not pop-up-windows)) |
| 5449 | specifiers)) | 5385 | (let ((fun (when (and (boundp 'split-window-preferred-function) |
| 5450 | ;; `split-height-threshold' | 5386 | (not (eq split-window-preferred-function |
| 5451 | (setq specifiers | 5387 | 'split-window-sensibly))) |
| 5452 | (cons (cons 'pop-up-window-min-height min-height) | 5388 | split-window-preferred-function))) |
| 5453 | specifiers)) | ||
| 5454 | ;; `pop-up-window' | 5389 | ;; `pop-up-window' |
| 5455 | (setq specifiers | 5390 | (setq specifiers |
| 5456 | (cons (list 'pop-up-window | 5391 | (cons |
| 5457 | (cons 'largest fun) (cons 'lru fun)) | 5392 | (list 'pop-up-window (cons 'largest fun) (cons 'lru fun)) |
| 5458 | specifiers)))) | 5393 | specifiers)))) |
| 5394 | |||
| 5395 | ;; `pop-up-frame-function' | ||
| 5396 | (when (and (boundp 'pop-up-frame-function) | ||
| 5397 | (not (equal pop-up-frame-function | ||
| 5398 | '(lambda nil | ||
| 5399 | (make-frame pop-up-frame-alist))))) | ||
| 5400 | (setq specifiers | ||
| 5401 | (cons (cons 'pop-up-frame-function pop-up-frame-function) | ||
| 5402 | specifiers))) | ||
| 5459 | 5403 | ||
| 5460 | ;; `pop-up-frame' group. | 5404 | ;; `pop-up-frame-alist' |
| 5461 | (when use-pop-up-frames | 5405 | (when pop-up-frame-alist |
| 5406 | (setq specifiers | ||
| 5407 | (cons (cons 'pop-up-frame-alist pop-up-frame-alist) | ||
| 5408 | specifiers))) | ||
| 5409 | |||
| 5410 | ;; `pop-up-frame' | ||
| 5411 | (when pop-up-frames | ||
| 5462 | ;; `pop-up-frame-function'. If `pop-up-frame-function' uses the | 5412 | ;; `pop-up-frame-function'. If `pop-up-frame-function' uses the |
| 5463 | ;; now obsolete `pop-up-frame-alist' it will continue to do so. | 5413 | ;; now obsolete `pop-up-frame-alist' it will continue to do so. |
| 5464 | (setq specifiers | ||
| 5465 | (cons (cons 'pop-up-frame-function pop-up-frame-function) | ||
| 5466 | specifiers)) | ||
| 5467 | ;; `pop-up-frame' | 5414 | ;; `pop-up-frame' |
| 5468 | (setq specifiers | 5415 | (setq specifiers |
| 5416 | ;; Maybe we should merge graphic-only into the following? | ||
| 5469 | (cons (list 'pop-up-frame t) specifiers))) | 5417 | (cons (list 'pop-up-frame t) specifiers))) |
| 5470 | 5418 | ||
| 5471 | ;; `pop-up-windows' and `use-pop-up-frames' both nil means means | 5419 | ;; `special-display' |
| 5472 | ;; we are supposed to reuse any window on the same frame (unless | 5420 | (when (and (boundp 'special-display-function) |
| 5473 | ;; we find one showing the same buffer already). | 5421 | special-display-function |
| 5474 | (unless (or pop-up-windows use-pop-up-frames) | 5422 | (fboundp 'special-display-p) |
| 5475 | ;; `reuse-window' showing any buffer on same frame. | 5423 | (setq args (special-display-p buffer-name))) |
| 5476 | (setq specifiers | 5424 | ;; `special-display-p' returns either t or a list of arguments |
| 5477 | (cons (list 'reuse-window nil nil nil) | 5425 | ;; to pass to `special-display-function'. |
| 5478 | specifiers))) | 5426 | (if (eq special-display-function 'special-display-popup-frame) |
| 5479 | |||
| 5480 | ;; `special-display-p' group. | ||
| 5481 | (when special-display-function | ||
| 5482 | ;; `special-display-p' returns either t or a list of frame | ||
| 5483 | ;; parameters to pass to `special-display-function'. | ||
| 5484 | (let ((pars (special-display-p buffer-name))) | ||
| 5485 | (when pars | ||
| 5486 | (setq specifiers | 5427 | (setq specifiers |
| 5487 | (cons (list 'function special-display-function | 5428 | (append (display-buffer-normalize-special args) |
| 5488 | (when (listp pars) pars)) | 5429 | specifiers)) |
| 5489 | specifiers))))) | 5430 | (setq specifiers |
| 5431 | (cons | ||
| 5432 | `(function ,special-display-function ,(when (listp args) args)) | ||
| 5433 | specifiers)))) | ||
| 5490 | 5434 | ||
| 5435 | ;; Reuse window showing same buffer on visible or iconified frame. | ||
| 5491 | ;; `pop-up-frames', `display-buffer-reuse-frames' means search for | 5436 | ;; `pop-up-frames', `display-buffer-reuse-frames' means search for |
| 5492 | ;; a window showing the buffer on some visible or iconfied frame. | 5437 | ;; a window showing the buffer on some visible or iconfied frame. |
| 5493 | ;; `last-nonminibuffer-frame' set and not the same frame means | 5438 | ;; `last-nonminibuffer-frame' non-nil means search that frame. |
| 5494 | ;; search that frame. | 5439 | (let ((frames (or (and (or pop-up-frames |
| 5495 | (let ((frames (or (and (or use-pop-up-frames | 5440 | (and (boundp 'display-buffer-reuse-frames) |
| 5496 | display-buffer-reuse-frames | 5441 | display-buffer-reuse-frames) |
| 5497 | (not (last-nonminibuffer-frame))) | 5442 | (not (last-nonminibuffer-frame))) |
| 5498 | ;; All visible or iconfied frames. | 5443 | ;; All visible or iconfied frames. |
| 5499 | 0) | 5444 | 0) |
| 5500 | ;; Same frame. | 5445 | ;; The following usually returns the same frame |
| 5446 | ;; so we implicitly search for a window showing | ||
| 5447 | ;; the buffer on the same frame already. | ||
| 5501 | (last-nonminibuffer-frame)))) | 5448 | (last-nonminibuffer-frame)))) |
| 5502 | (when frames | 5449 | (when frames |
| 5503 | (setq specifiers | 5450 | (setq specifiers |
| 5504 | (cons (list 'reuse-window 'other 'same frames) | 5451 | (cons (list 'reuse-window 'other 'same frames) |
| 5505 | specifiers)))) | 5452 | specifiers)))) |
| 5506 | 5453 | ||
| 5507 | ;; `same-window-p' group. | 5454 | ;; `same-window' |
| 5508 | (when (same-window-p buffer-name) | 5455 | (when (and (fboundp 'same-window-p) (same-window-p buffer-name)) |
| 5509 | ;; Try to reuse the same (selected) window. | 5456 | ;; Try to reuse the same (selected) window. |
| 5510 | (setq specifiers | 5457 | (setq specifiers |
| 5511 | (cons (list 'reuse-window 'same nil nil) | 5458 | (cons (list 'reuse-window 'same nil nil) specifiers))) |
| 5512 | specifiers))) | ||
| 5513 | 5459 | ||
| 5514 | ;; Prepend "reuse window on same frame if showing the buffer | 5460 | ;; Same window if showing this buffer already. Can be overridden |
| 5515 | ;; already" specifier. It will be overriden by the application | 5461 | ;; by `other-window' argument if the buffer is already shown in |
| 5516 | ;; supplied 'other-window specifier. | 5462 | ;; the same window. |
| 5517 | (setq specifiers (cons (list 'reuse-window nil 'same nil) | 5463 | (setq specifiers |
| 5518 | specifiers)) | 5464 | (cons (list 'reuse-window 'same 'same nil) specifiers)) |
| 5519 | 5465 | ||
| 5520 | specifiers))) | 5466 | specifiers))) |
| 5521 | 5467 | ||
| 5468 | (defun display-buffer-normalize-argument (buffer-name specifiers other-window-means-other-frame) | ||
| 5469 | "Normalize second argument of `display-buffer'. | ||
| 5470 | BUFFER-NAME is the name of the buffer that shall be displayed, | ||
| 5471 | SPECIFIERS is the second argument of `display-buffer'. | ||
| 5472 | OTHER-WINDOW-MEANS-OTHER-FRAME non-nil means use other-frame for | ||
| 5473 | other-window." | ||
| 5474 | (progn ;; <-- reserved for with-no-warnings | ||
| 5475 | (let (normalized entry specifier pars) | ||
| 5476 | (cond | ||
| 5477 | ((not specifiers) | ||
| 5478 | nil) | ||
| 5479 | ((listp specifiers) | ||
| 5480 | ;; If SPECIFIERS is a list, we assume it is a list of valid | ||
| 5481 | ;; specifiers. | ||
| 5482 | (dolist (specifier specifiers) | ||
| 5483 | (cond | ||
| 5484 | ((consp specifier) | ||
| 5485 | (setq normalized (cons specifier normalized))) | ||
| 5486 | ((eq specifier 'other-window) | ||
| 5487 | ;; `other-window' must be treated separately. | ||
| 5488 | (let ((entry (assq (if other-window-means-other-frame | ||
| 5489 | 'other-frame | ||
| 5490 | 'same-frame-other-window) | ||
| 5491 | display-buffer-macro-specifiers))) | ||
| 5492 | (dolist (item (cdr entry)) | ||
| 5493 | (setq normalized (cons item normalized))))) | ||
| 5494 | ((symbolp specifier) | ||
| 5495 | ;; Might be a macro specifier, try to expand it (the cdr is a | ||
| 5496 | ;; list and we have to reverse it later, so do it one at a | ||
| 5497 | ;; time). | ||
| 5498 | (let ((entry (assq specifier display-buffer-macro-specifiers))) | ||
| 5499 | (dolist (item (cdr entry)) | ||
| 5500 | (setq normalized (cons item normalized))))))) | ||
| 5501 | ;; Reverse list. | ||
| 5502 | (nreverse normalized)) | ||
| 5503 | ((setq entry (assq specifiers display-buffer-macro-specifiers)) | ||
| 5504 | ;; A macro specifier. | ||
| 5505 | (cdr entry)) | ||
| 5506 | (t | ||
| 5507 | ;; Anything else means use another window according to the | ||
| 5508 | ;; non-overriding specifiers of `display-buffer-alist' and the | ||
| 5509 | ;; specifiers produced by `display-buffer-normalize-default'. | ||
| 5510 | '((other-window . t))))))) | ||
| 5511 | |||
| 5522 | (defun display-buffer-normalize-alist-1 (specifiers label) | 5512 | (defun display-buffer-normalize-alist-1 (specifiers label) |
| 5523 | "Subroutine of `display-buffer-normalize-alist'. | 5513 | "Subroutine of `display-buffer-normalize-alist'. |
| 5524 | SPECIFIERS is a list of buffer display specfiers. LABEL is the | 5514 | SPECIFIERS is a list of buffer display specfiers. LABEL is the |
| @@ -5579,9 +5569,6 @@ LABEL the corresponding argument of `display-buffer'." | |||
| 5579 | 5569 | ||
| 5580 | (cons list-1 list-2))) | 5570 | (cons list-1 list-2))) |
| 5581 | 5571 | ||
| 5582 | (defvar display-buffer-normalize-options-inhibit nil | ||
| 5583 | "If non-nil, `display-buffer' doesn't process obsolete options.") | ||
| 5584 | |||
| 5585 | (defun display-buffer-normalize-specifiers (buffer-name specifiers label) | 5572 | (defun display-buffer-normalize-specifiers (buffer-name specifiers label) |
| 5586 | "Return normalized specifiers for a buffer matching BUFFER-NAME or LABEL. | 5573 | "Return normalized specifiers for a buffer matching BUFFER-NAME or LABEL. |
| 5587 | BUFFER-NAME must be a string specifying a valid buffer name. | 5574 | BUFFER-NAME must be a string specifying a valid buffer name. |
| @@ -5600,25 +5587,33 @@ specifiers: | |||
| 5600 | 5587 | ||
| 5601 | - The specifiers in `display-buffer-alist' whose buffer | 5588 | - The specifiers in `display-buffer-alist' whose buffer |
| 5602 | identifier matches BUFFER-NAME or LABEL and whose 'override | 5589 | identifier matches BUFFER-NAME or LABEL and whose 'override |
| 5603 | component is not set. | 5590 | component is not set." |
| 5604 | 5591 | (let* ((default (display-buffer-normalize-default buffer-name)) | |
| 5605 | - `display-buffer-default-specifiers'." | 5592 | (alist (display-buffer-normalize-alist buffer-name label)) |
| 5606 | (let* ((list (display-buffer-normalize-alist buffer-name label)) | 5593 | (other-window-means-other-frame |
| 5607 | (other-frame (cdr (assq 'other-window-means-other-frame | 5594 | (or (cdr (assq 'other-window-means-other-frame default)) |
| 5608 | (or (car list) (cdr list)))))) | 5595 | (cdr (assq 'other-window-means-other-frame (cdr alist))))) |
| 5596 | (arg2 (display-buffer-normalize-argument | ||
| 5597 | buffer-name specifiers other-window-means-other-frame)) | ||
| 5598 | (arg3 | ||
| 5599 | ;; Handle special meaning of the LABEL argument of | ||
| 5600 | ;; `display-buffer'. | ||
| 5601 | (when (or (memq label '(visible 0 t)) (frame-live-p label)) | ||
| 5602 | ;; LABEL must be one of visible (any visible frame), 0 (any | ||
| 5603 | ;; visible or iconfied frame), t (any frame), or a live | ||
| 5604 | ;; frame. | ||
| 5605 | `((reuse-window nil same ,label))))) | ||
| 5609 | (append | 5606 | (append |
| 5610 | ;; Overriding user specifiers. | 5607 | ;; Overriding user specifiers. |
| 5611 | (car list) | 5608 | (car alist) |
| 5612 | ;; Application specifiers. | 5609 | ;; Special value of third argument of display-buffer. |
| 5613 | (display-buffer-normalize-arguments | 5610 | arg3 |
| 5614 | buffer-name specifiers label other-frame) | 5611 | ;; Second argument of display-buffer. |
| 5615 | ;; Emacs 23 compatibility specifiers. | 5612 | arg2 |
| 5616 | (unless display-buffer-normalize-options-inhibit | ||
| 5617 | (display-buffer-normalize-options buffer-name)) | ||
| 5618 | ;; Non-overriding user specifiers. | 5613 | ;; Non-overriding user specifiers. |
| 5619 | (cdr list) | 5614 | (cdr alist) |
| 5620 | ;; Default specifiers. | 5615 | ;; Default specifiers. |
| 5621 | display-buffer-default-specifiers))) | 5616 | default))) |
| 5622 | 5617 | ||
| 5623 | ;; Minibuffer-only frames should be documented better. They really | 5618 | ;; Minibuffer-only frames should be documented better. They really |
| 5624 | ;; deserve a separate section in the manual. Also | 5619 | ;; deserve a separate section in the manual. Also |
| @@ -5653,9 +5648,8 @@ For convenience, SPECIFIERS may also consist of a single buffer | |||
| 5653 | display location specifier or t, where the latter means to | 5648 | display location specifier or t, where the latter means to |
| 5654 | display the buffer in any but the selected window. If SPECIFIERS | 5649 | display the buffer in any but the selected window. If SPECIFIERS |
| 5655 | is nil or omitted, this means to exclusively use the specifiers | 5650 | is nil or omitted, this means to exclusively use the specifiers |
| 5656 | provided by `display-buffer-alist'. If the value of the latter | 5651 | provided by the variable `display-buffer-alist' and the function |
| 5657 | is nil too, all specifiers are provided by the constant | 5652 | `display-buffer-normalize-default'. |
| 5658 | `display-buffer-default-specifiers'. | ||
| 5659 | 5653 | ||
| 5660 | As a special case, the `reuse-window' specifier allows to specify | 5654 | As a special case, the `reuse-window' specifier allows to specify |
| 5661 | as second element an arbitrary window, as third element an | 5655 | as second element an arbitrary window, as third element an |
| @@ -5707,7 +5701,7 @@ this list as arguments." | |||
| 5707 | ;; Don't use a minibuffer frame. | 5701 | ;; Don't use a minibuffer frame. |
| 5708 | (frame (display-buffer-frame)) | 5702 | (frame (display-buffer-frame)) |
| 5709 | ;; `window' is the window we use for showing `buffer'. | 5703 | ;; `window' is the window we use for showing `buffer'. |
| 5710 | window specifier method) | 5704 | window specifier method other-window) |
| 5711 | ;; Reset this. | 5705 | ;; Reset this. |
| 5712 | (setq display-buffer-window nil) | 5706 | (setq display-buffer-window nil) |
| 5713 | (if display-buffer-function | 5707 | (if display-buffer-function |
| @@ -5723,7 +5717,7 @@ this list as arguments." | |||
| 5723 | (cond | 5717 | (cond |
| 5724 | ((eq method 'reuse-window) | 5718 | ((eq method 'reuse-window) |
| 5725 | (display-buffer-reuse-window | 5719 | (display-buffer-reuse-window |
| 5726 | buffer (cdr specifier) normalized)) | 5720 | buffer (cdr specifier) normalized other-window)) |
| 5727 | ((eq method 'pop-up-window) | 5721 | ((eq method 'pop-up-window) |
| 5728 | (display-buffer-pop-up-window | 5722 | (display-buffer-pop-up-window |
| 5729 | buffer (cdr specifier) normalized)) | 5723 | buffer (cdr specifier) normalized)) |
| @@ -5734,25 +5728,31 @@ this list as arguments." | |||
| 5734 | (display-buffer-in-side-window | 5728 | (display-buffer-in-side-window |
| 5735 | buffer (nth 1 specifier) (nth 2 specifier) normalized)) | 5729 | buffer (nth 1 specifier) (nth 2 specifier) normalized)) |
| 5736 | ((eq method 'function) | 5730 | ((eq method 'function) |
| 5737 | (funcall (nth 1 specifier) buffer (nth 2 specifier)))))) | 5731 | (funcall (nth 1 specifier) buffer (nth 2 specifier))) |
| 5732 | ((eq method 'other-window) | ||
| 5733 | (setq other-window t))))) | ||
| 5738 | 5734 | ||
| 5739 | ;; If we don't have a window yet, try a fallback method. All | 5735 | ;; If we don't have a window yet, try a fallback method. All |
| 5740 | ;; specifiers have been used up by now. | 5736 | ;; specifiers have been used up by now. Try reusing a window |
| 5741 | (or (and (window-live-p window) window) | 5737 | (or (and (window-live-p window) window) |
| 5742 | ;; Try reusing a window showing BUFFER on any visible or | 5738 | ;; on the selected frame, |
| 5743 | ;; iconfied frame. | 5739 | (display-buffer-reuse-window |
| 5744 | (display-buffer-reuse-window buffer `(nil ,buffer 0)) | 5740 | buffer '(nil nil nil) nil other-window) |
| 5745 | ;; Try reusing a window not showing BUFFER on any visible or | 5741 | ;; showing BUFFER on any visible frame, |
| 5746 | ;; iconified frame. | 5742 | (display-buffer-reuse-window |
| 5747 | (display-buffer-reuse-window buffer '(nil other 0)) | 5743 | buffer '(nil same visible) nil other-window) |
| 5748 | ;; Eli says it's better to never try making a new frame. | 5744 | ;; not showing BUFFER on any visible frame, |
| 5749 | ;; (display-buffer-pop-up-frame buffer) | ||
| 5750 | ;; Try using a weakly dedicated window. | ||
| 5751 | (display-buffer-reuse-window | 5745 | (display-buffer-reuse-window |
| 5752 | buffer '(nil nil t) '((reuse-window-dedicated . weak))) | 5746 | buffer '(nil other visible) nil other-window) |
| 5753 | ;; Try using a strongly dedicated window. | 5747 | ;; showing BUFFER on any visible or iconified frame, |
| 5754 | (display-buffer-reuse-window | 5748 | (display-buffer-reuse-window |
| 5755 | buffer '(nil nil t) '((reuse-window-dedicated . t))))))) | 5749 | buffer '(nil same 0) nil other-window) |
| 5750 | ;; not showing BUFFER on any visible or iconified frame. | ||
| 5751 | (display-buffer-reuse-window | ||
| 5752 | buffer '(nil other 0) nil other-window) | ||
| 5753 | ;; If everything failed so far, try popping up a new frame | ||
| 5754 | ;; regardless of graphic-only restrictions. | ||
| 5755 | (display-buffer-pop-up-frame buffer))))) | ||
| 5756 | 5756 | ||
| 5757 | (defsubst display-buffer-same-window (&optional buffer-or-name label) | 5757 | (defsubst display-buffer-same-window (&optional buffer-or-name label) |
| 5758 | "Display buffer specified by BUFFER-OR-NAME in the selected window. | 5758 | "Display buffer specified by BUFFER-OR-NAME in the selected window. |
| @@ -6395,10 +6395,9 @@ that frame." | |||
| 6395 | ;; 'display-buffer-reuse-frames | 6395 | ;; 'display-buffer-reuse-frames |
| 6396 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | 6396 | ;; "use 2nd arg of `display-buffer' instead." "24.1") |
| 6397 | 6397 | ||
| 6398 | (defcustom pop-up-windows 'unset ; t | 6398 | (defcustom pop-up-windows t |
| 6399 | "Set and non-nil means `display-buffer' should make a new window." | 6399 | "Non-nil means `display-buffer' should make a new window." |
| 6400 | :type 'boolean | 6400 | :type 'boolean |
| 6401 | :version "24.1" | ||
| 6402 | :group 'windows) | 6401 | :group 'windows) |
| 6403 | ;; (make-obsolete-variable | 6402 | ;; (make-obsolete-variable |
| 6404 | ;; 'pop-up-windows | 6403 | ;; 'pop-up-windows |
| @@ -6459,13 +6458,12 @@ is nil, `display-buffer' cannot split windows horizontally." | |||
| 6459 | ;; 'split-width-threshold | 6458 | ;; 'split-width-threshold |
| 6460 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | 6459 | ;; "use 2nd arg of `display-buffer' instead." "24.1") |
| 6461 | 6460 | ||
| 6462 | (defcustom even-window-heights 'unset ; t | 6461 | (defcustom even-window-heights t |
| 6463 | "If set and non-nil `display-buffer' will try to even window heights. | 6462 | "If non-nil `display-buffer' will try to even window heights. |
| 6464 | Otherwise `display-buffer' will leave the window configuration | 6463 | Otherwise `display-buffer' will leave the window configuration |
| 6465 | alone. Heights are evened only when `display-buffer' reuses a | 6464 | alone. Heights are evened only when `display-buffer' chooses a |
| 6466 | window that appears above or below the selected window." | 6465 | window that appears above or below the selected window." |
| 6467 | :type 'boolean | 6466 | :type 'boolean |
| 6468 | :version "24.1" | ||
| 6469 | :group 'windows) | 6467 | :group 'windows) |
| 6470 | ;; (make-obsolete-variable | 6468 | ;; (make-obsolete-variable |
| 6471 | ;; 'even-window-heights | 6469 | ;; 'even-window-heights |
| @@ -6635,7 +6633,7 @@ value of `display-buffer-alist'." | |||
| 6635 | 1.0))) | 6633 | 1.0))) |
| 6636 | (list | 6634 | (list |
| 6637 | 'pop-up-window | 6635 | 'pop-up-window |
| 6638 | (when pop-up-windows ; unset qualifies as t | 6636 | (when pop-up-windows |
| 6639 | (list | 6637 | (list |
| 6640 | 'pop-up-window | 6638 | 'pop-up-window |
| 6641 | (cons 'largest fun) | 6639 | (cons 'largest fun) |
| @@ -6789,7 +6787,7 @@ value of `display-buffer-alist'." | |||
| 6789 | ;; "0" (all visible and iconified frames) is hardcoded in | 6787 | ;; "0" (all visible and iconified frames) is hardcoded in |
| 6790 | ;; Emacs 23. | 6788 | ;; Emacs 23. |
| 6791 | 0)) | 6789 | 0)) |
| 6792 | (unless (memq even-window-heights '(nil unset)) | 6790 | (when even-window-heights |
| 6793 | (cons 'reuse-window-even-sizes t))) | 6791 | (cons 'reuse-window-even-sizes t))) |
| 6794 | no-custom) | 6792 | no-custom) |
| 6795 | 6793 | ||
| @@ -6798,7 +6796,7 @@ value of `display-buffer-alist'." | |||
| 6798 | (display-buffer-alist-add | 6796 | (display-buffer-alist-add |
| 6799 | nil | 6797 | nil |
| 6800 | (list | 6798 | (list |
| 6801 | (cons 'dedicated display-buffer-mark-dedicated)) | 6799 | (cons 'dedicate display-buffer-mark-dedicated)) |
| 6802 | no-custom))) | 6800 | no-custom))) |
| 6803 | 6801 | ||
| 6804 | display-buffer-alist) | 6802 | display-buffer-alist) |
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index dfa0f660a75..e98d8e0f4ea 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # pthread_sigmask.m4 serial 7 | 1 | # pthread_sigmask.m4 serial 7-emacs1 |
| 2 | dnl Copyright (C) 2011 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2011 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -8,55 +8,6 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], | |||
| 8 | [ | 8 | [ |
| 9 | AC_CHECK_FUNCS_ONCE([pthread_sigmask]) | 9 | AC_CHECK_FUNCS_ONCE([pthread_sigmask]) |
| 10 | LIB_PTHREAD_SIGMASK= | 10 | LIB_PTHREAD_SIGMASK= |
| 11 | m4_ifdef([gl_THREADLIB], [ | ||
| 12 | AC_REQUIRE([gl_THREADLIB]) | ||
| 13 | if test "$gl_threads_api" = posix; then | ||
| 14 | if test $ac_cv_func_pthread_sigmask = yes; then | ||
| 15 | dnl pthread_sigmask is available without -lpthread. | ||
| 16 | : | ||
| 17 | else | ||
| 18 | if test -n "$LIBMULTITHREAD"; then | ||
| 19 | AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD], | ||
| 20 | [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD], | ||
| 21 | [gl_save_LIBS="$LIBS" | ||
| 22 | LIBS="$LIBS $LIBMULTITHREAD" | ||
| 23 | AC_LINK_IFELSE( | ||
| 24 | [AC_LANG_PROGRAM( | ||
| 25 | [[#include <pthread.h> | ||
| 26 | #include <signal.h> | ||
| 27 | ]], | ||
| 28 | [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]]) | ||
| 29 | ], | ||
| 30 | [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes], | ||
| 31 | [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no]) | ||
| 32 | LIBS="$gl_save_LIBS" | ||
| 33 | ]) | ||
| 34 | if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then | ||
| 35 | dnl pthread_sigmask is available with -lpthread. | ||
| 36 | LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" | ||
| 37 | else | ||
| 38 | dnl pthread_sigmask is not available at all. | ||
| 39 | HAVE_PTHREAD_SIGMASK=0 | ||
| 40 | fi | ||
| 41 | else | ||
| 42 | dnl pthread_sigmask is not available at all. | ||
| 43 | HAVE_PTHREAD_SIGMASK=0 | ||
| 44 | fi | ||
| 45 | fi | ||
| 46 | else | ||
| 47 | dnl pthread_sigmask may exist but does not interoperate with the chosen | ||
| 48 | dnl multithreading facility. | ||
| 49 | dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask, | ||
| 50 | dnl but it is equivalent to sigprocmask, so we choose to emulate | ||
| 51 | dnl pthread_sigmask with sigprocmask also in this case. This yields fewer | ||
| 52 | dnl link dependencies. | ||
| 53 | if test $ac_cv_func_pthread_sigmask = yes; then | ||
| 54 | REPLACE_PTHREAD_SIGMASK=1 | ||
| 55 | else | ||
| 56 | HAVE_PTHREAD_SIGMASK=0 | ||
| 57 | fi | ||
| 58 | fi | ||
| 59 | ] ,[ | ||
| 60 | dnl gl_THREADLIB is not in use. Assume the application wants | 11 | dnl gl_THREADLIB is not in use. Assume the application wants |
| 61 | dnl POSIX semantics. | 12 | dnl POSIX semantics. |
| 62 | if test $ac_cv_func_pthread_sigmask != yes; then | 13 | if test $ac_cv_func_pthread_sigmask != yes; then |
| @@ -69,7 +20,6 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], | |||
| 69 | LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask | 20 | LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask |
| 70 | fi | 21 | fi |
| 71 | fi | 22 | fi |
| 72 | ]) | ||
| 73 | AC_SUBST([LIB_PTHREAD_SIGMASK]) | 23 | AC_SUBST([LIB_PTHREAD_SIGMASK]) |
| 74 | dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when | 24 | dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when |
| 75 | dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the | 25 | dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the |
diff --git a/src/ChangeLog b/src/ChangeLog index e4f3401eb4d..4e69399154d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-07-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * image.c: Integer signedness and overflow and related fixes. | 3 | * image.c: Integer signedness and overflow and related fixes. |
| 4 | This is not an exhaustive set of fixes, but it's time to | 4 | This is not an exhaustive set of fixes, but it's time to |
| @@ -151,6 +151,72 @@ | |||
| 151 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally | 151 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally |
| 152 | well either way, and we prefer signed to unsigned. | 152 | well either way, and we prefer signed to unsigned. |
| 153 | 153 | ||
| 154 | 2011-07-10 Johan Bockgård <bojohan@gnu.org> | ||
| 155 | |||
| 156 | * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check. | ||
| 157 | |||
| 158 | 2011-07-10 Jan Djärv <jan.h.d@swipnet.se> | ||
| 159 | |||
| 160 | * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event | ||
| 161 | for non-popups (Bug#3642). | ||
| 162 | |||
| 163 | 2011-07-10 Andreas Schwab <schwab@linux-m68k.org> | ||
| 164 | |||
| 165 | * alloc.c (reset_malloc_hooks): Protoize. | ||
| 166 | * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge) | ||
| 167 | (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise. | ||
| 168 | * cm.c (losecursor): Likewise. | ||
| 169 | * data.c (fmod): Likewise. | ||
| 170 | * dispnew.c (swap_glyphs_in_rows): Likewise. | ||
| 171 | * emacs.c (memory_warning_signal): Likewise. | ||
| 172 | * floatfns.c (float_error): Likewise. | ||
| 173 | * font.c (check_gstring, check_otf_features, otf_tag_symbol) | ||
| 174 | (otf_open, font_otf_capability, generate_otf_features) | ||
| 175 | (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): | ||
| 176 | Likewise. | ||
| 177 | * image.c (pbm_read_file): Likewise. | ||
| 178 | * indent.c (string_display_width): Likewise. | ||
| 179 | * intervals.c (check_for_interval, search_for_interval) | ||
| 180 | (inc_interval_count, count_intervals, root_interval) | ||
| 181 | (adjust_intervals_for_insertion, make_new_interval): Likewise. | ||
| 182 | * lread.c (defalias): Likewise. | ||
| 183 | * ralloc.c (r_alloc_check): Likewise. | ||
| 184 | * regex.c (set_image_of_range_1, set_image_of_range) | ||
| 185 | (regex_grow_registers): Likewise. | ||
| 186 | * sysdep.c (strerror): Likewise. | ||
| 187 | * termcap.c (valid_filename_p, tprint, main): Likewise. | ||
| 188 | * tparam.c (main): Likewise. | ||
| 189 | * unexhp9k800.c (run_time_remap, save_data_space) | ||
| 190 | (update_file_ptrs, read_header, write_header, calculate_checksum) | ||
| 191 | (copy_file, copy_rest, display_header): Likewise. | ||
| 192 | * widget.c (mark_shell_size_user_specified, create_frame_gcs): | ||
| 193 | Likewise. | ||
| 194 | * xdisp.c (check_it): Likewise. | ||
| 195 | * xfaces.c (register_color, unregister_color, unregister_colors): | ||
| 196 | Likewise. | ||
| 197 | * xfns.c (print_fontset_result): Likewise. | ||
| 198 | * xrdb.c (member, fatal, main): Likewise. | ||
| 199 | |||
| 200 | 2011-07-10 Paul Eggert <eggert@cs.ucla.edu> | ||
| 201 | |||
| 202 | Fix minor problems found by static checking (Bug#9031). | ||
| 203 | * chartab.c (char_table_set_range, map_sub_char_table): | ||
| 204 | Remove unused locals. | ||
| 205 | (uniprop_table): Now static. | ||
| 206 | * composite.c (_work_char): Remove unused static var. | ||
| 207 | |||
| 208 | 2011-07-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 209 | |||
| 210 | * chartab.c (uniprop_table_uncompress): Remove unused local variable. | ||
| 211 | |||
| 212 | 2011-07-09 Jan Djärv <jan.h.d@swipnet.se> | ||
| 213 | |||
| 214 | * gtkutil.c (qttip_cb): Remove code without function. | ||
| 215 | |||
| 216 | 2011-07-09 Eli Zaretskii <eliz@gnu.org> | ||
| 217 | |||
| 218 | * w32.c (pthread_sigmask): New stub. | ||
| 219 | |||
| 154 | 2011-07-08 Paul Eggert <eggert@cs.ucla.edu> | 220 | 2011-07-08 Paul Eggert <eggert@cs.ucla.edu> |
| 155 | 221 | ||
| 156 | Use pthread_sigmask, not sigprocmask (Bug#9010). | 222 | Use pthread_sigmask, not sigprocmask (Bug#9010). |
diff --git a/src/alloc.c b/src/alloc.c index 5cdd5af9ecf..f325b6ed449 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1277,7 +1277,7 @@ emacs_blocked_realloc (void *ptr, size_t size, const void *ptr2) | |||
| 1277 | calls malloc because it is the first call, and we have an endless loop. */ | 1277 | calls malloc because it is the first call, and we have an endless loop. */ |
| 1278 | 1278 | ||
| 1279 | void | 1279 | void |
| 1280 | reset_malloc_hooks () | 1280 | reset_malloc_hooks (void) |
| 1281 | { | 1281 | { |
| 1282 | __free_hook = old_free_hook; | 1282 | __free_hook = old_free_hook; |
| 1283 | __malloc_hook = old_malloc_hook; | 1283 | __malloc_hook = old_malloc_hook; |
diff --git a/src/buffer.c b/src/buffer.c index 48dde18b02c..05e96e85112 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -4466,24 +4466,40 @@ static int mmap_initialized_p; | |||
| 4466 | #define MMAP_ALLOCATED_P(start, end) 1 | 4466 | #define MMAP_ALLOCATED_P(start, end) 1 |
| 4467 | #endif | 4467 | #endif |
| 4468 | 4468 | ||
| 4469 | /* Function prototypes. */ | 4469 | /* Perform necessary intializations for the use of mmap. */ |
| 4470 | 4470 | ||
| 4471 | static int mmap_free_1 (struct mmap_region *); | 4471 | static void |
| 4472 | static int mmap_enlarge (struct mmap_region *, int); | 4472 | mmap_init (void) |
| 4473 | static struct mmap_region *mmap_find (POINTER_TYPE *, POINTER_TYPE *); | 4473 | { |
| 4474 | static POINTER_TYPE *mmap_alloc (POINTER_TYPE **, size_t); | 4474 | #if MAP_ANON == 0 |
| 4475 | static POINTER_TYPE *mmap_realloc (POINTER_TYPE **, size_t); | 4475 | /* The value of mmap_fd is initially 0 in temacs, and -1 |
| 4476 | static void mmap_free (POINTER_TYPE **ptr); | 4476 | in a dumped Emacs. */ |
| 4477 | static void mmap_init (void); | 4477 | if (mmap_fd <= 0) |
| 4478 | { | ||
| 4479 | /* No anonymous mmap -- we need the file descriptor. */ | ||
| 4480 | mmap_fd = open ("/dev/zero", O_RDONLY); | ||
| 4481 | if (mmap_fd == -1) | ||
| 4482 | fatal ("Cannot open /dev/zero: %s", emacs_strerror (errno)); | ||
| 4483 | } | ||
| 4484 | #endif /* MAP_ANON == 0 */ | ||
| 4485 | |||
| 4486 | if (mmap_initialized_p) | ||
| 4487 | return; | ||
| 4488 | mmap_initialized_p = 1; | ||
| 4478 | 4489 | ||
| 4490 | #if MAP_ANON != 0 | ||
| 4491 | mmap_fd = -1; | ||
| 4492 | #endif | ||
| 4493 | |||
| 4494 | mmap_page_size = getpagesize (); | ||
| 4495 | } | ||
| 4479 | 4496 | ||
| 4480 | /* Return a region overlapping address range START...END, or null if | 4497 | /* Return a region overlapping address range START...END, or null if |
| 4481 | none. END is not including, i.e. the last byte in the range | 4498 | none. END is not including, i.e. the last byte in the range |
| 4482 | is at END - 1. */ | 4499 | is at END - 1. */ |
| 4483 | 4500 | ||
| 4484 | static struct mmap_region * | 4501 | static struct mmap_region * |
| 4485 | mmap_find (start, end) | 4502 | mmap_find (POINTER_TYPE *start, POINTER_TYPE *end); |
| 4486 | POINTER_TYPE *start, *end; | ||
| 4487 | { | 4503 | { |
| 4488 | struct mmap_region *r; | 4504 | struct mmap_region *r; |
| 4489 | char *s = (char *) start, *e = (char *) end; | 4505 | char *s = (char *) start, *e = (char *) end; |
| @@ -4512,8 +4528,7 @@ mmap_find (start, end) | |||
| 4512 | the region. Value is non-zero if successful. */ | 4528 | the region. Value is non-zero if successful. */ |
| 4513 | 4529 | ||
| 4514 | static int | 4530 | static int |
| 4515 | mmap_free_1 (r) | 4531 | mmap_free_1 (struct mmap_region *r) |
| 4516 | struct mmap_region *r; | ||
| 4517 | { | 4532 | { |
| 4518 | if (r->next) | 4533 | if (r->next) |
| 4519 | r->next->prev = r->prev; | 4534 | r->next->prev = r->prev; |
| @@ -4536,9 +4551,7 @@ mmap_free_1 (r) | |||
| 4536 | Value is non-zero if successful. */ | 4551 | Value is non-zero if successful. */ |
| 4537 | 4552 | ||
| 4538 | static int | 4553 | static int |
| 4539 | mmap_enlarge (r, npages) | 4554 | mmap_enlarge (struct mmap_region *r, int npages) |
| 4540 | struct mmap_region *r; | ||
| 4541 | int npages; | ||
| 4542 | { | 4555 | { |
| 4543 | char *region_end = (char *) r + r->nbytes_mapped; | 4556 | char *region_end = (char *) r + r->nbytes_mapped; |
| 4544 | size_t nbytes; | 4557 | size_t nbytes; |
| @@ -4602,8 +4615,7 @@ mmap_enlarge (r, npages) | |||
| 4602 | when Emacs starts. */ | 4615 | when Emacs starts. */ |
| 4603 | 4616 | ||
| 4604 | void | 4617 | void |
| 4605 | mmap_set_vars (restore_p) | 4618 | mmap_set_vars (int restore_p) |
| 4606 | int restore_p; | ||
| 4607 | { | 4619 | { |
| 4608 | struct mmap_region *r; | 4620 | struct mmap_region *r; |
| 4609 | 4621 | ||
| @@ -4636,9 +4648,7 @@ mmap_set_vars (restore_p) | |||
| 4636 | return null. */ | 4648 | return null. */ |
| 4637 | 4649 | ||
| 4638 | static POINTER_TYPE * | 4650 | static POINTER_TYPE * |
| 4639 | mmap_alloc (var, nbytes) | 4651 | mmap_alloc (POINTER_TYPE **var, size_t nbytes) |
| 4640 | POINTER_TYPE **var; | ||
| 4641 | size_t nbytes; | ||
| 4642 | { | 4652 | { |
| 4643 | void *p; | 4653 | void *p; |
| 4644 | size_t map; | 4654 | size_t map; |
| @@ -4675,15 +4685,29 @@ mmap_alloc (var, nbytes) | |||
| 4675 | } | 4685 | } |
| 4676 | 4686 | ||
| 4677 | 4687 | ||
| 4688 | /* Free a block of relocatable storage whose data is pointed to by | ||
| 4689 | PTR. Store 0 in *PTR to show there's no block allocated. */ | ||
| 4690 | |||
| 4691 | static void | ||
| 4692 | mmap_free (POINTER_TYPE **var) | ||
| 4693 | { | ||
| 4694 | mmap_init (); | ||
| 4695 | |||
| 4696 | if (*var) | ||
| 4697 | { | ||
| 4698 | mmap_free_1 (MMAP_REGION (*var)); | ||
| 4699 | *var = NULL; | ||
| 4700 | } | ||
| 4701 | } | ||
| 4702 | |||
| 4703 | |||
| 4678 | /* Given a pointer at address VAR to data allocated with mmap_alloc, | 4704 | /* Given a pointer at address VAR to data allocated with mmap_alloc, |
| 4679 | resize it to size NBYTES. Change *VAR to reflect the new block, | 4705 | resize it to size NBYTES. Change *VAR to reflect the new block, |
| 4680 | and return this value. If more memory cannot be allocated, then | 4706 | and return this value. If more memory cannot be allocated, then |
| 4681 | leave *VAR unchanged, and return null. */ | 4707 | leave *VAR unchanged, and return null. */ |
| 4682 | 4708 | ||
| 4683 | static POINTER_TYPE * | 4709 | static POINTER_TYPE * |
| 4684 | mmap_realloc (var, nbytes) | 4710 | mmap_realloc (POINTER_TYPE **var, size_t nbytes) |
| 4685 | POINTER_TYPE **var; | ||
| 4686 | size_t nbytes; | ||
| 4687 | { | 4711 | { |
| 4688 | POINTER_TYPE *result; | 4712 | POINTER_TYPE *result; |
| 4689 | 4713 | ||
| @@ -4753,51 +4777,6 @@ mmap_realloc (var, nbytes) | |||
| 4753 | } | 4777 | } |
| 4754 | 4778 | ||
| 4755 | 4779 | ||
| 4756 | /* Free a block of relocatable storage whose data is pointed to by | ||
| 4757 | PTR. Store 0 in *PTR to show there's no block allocated. */ | ||
| 4758 | |||
| 4759 | static void | ||
| 4760 | mmap_free (var) | ||
| 4761 | POINTER_TYPE **var; | ||
| 4762 | { | ||
| 4763 | mmap_init (); | ||
| 4764 | |||
| 4765 | if (*var) | ||
| 4766 | { | ||
| 4767 | mmap_free_1 (MMAP_REGION (*var)); | ||
| 4768 | *var = NULL; | ||
| 4769 | } | ||
| 4770 | } | ||
| 4771 | |||
| 4772 | |||
| 4773 | /* Perform necessary intializations for the use of mmap. */ | ||
| 4774 | |||
| 4775 | static void | ||
| 4776 | mmap_init () | ||
| 4777 | { | ||
| 4778 | #if MAP_ANON == 0 | ||
| 4779 | /* The value of mmap_fd is initially 0 in temacs, and -1 | ||
| 4780 | in a dumped Emacs. */ | ||
| 4781 | if (mmap_fd <= 0) | ||
| 4782 | { | ||
| 4783 | /* No anonymous mmap -- we need the file descriptor. */ | ||
| 4784 | mmap_fd = open ("/dev/zero", O_RDONLY); | ||
| 4785 | if (mmap_fd == -1) | ||
| 4786 | fatal ("Cannot open /dev/zero: %s", emacs_strerror (errno)); | ||
| 4787 | } | ||
| 4788 | #endif /* MAP_ANON == 0 */ | ||
| 4789 | |||
| 4790 | if (mmap_initialized_p) | ||
| 4791 | return; | ||
| 4792 | mmap_initialized_p = 1; | ||
| 4793 | |||
| 4794 | #if MAP_ANON != 0 | ||
| 4795 | mmap_fd = -1; | ||
| 4796 | #endif | ||
| 4797 | |||
| 4798 | mmap_page_size = getpagesize (); | ||
| 4799 | } | ||
| 4800 | |||
| 4801 | #endif /* USE_MMAP_FOR_BUFFERS */ | 4780 | #endif /* USE_MMAP_FOR_BUFFERS */ |
| 4802 | 4781 | ||
| 4803 | 4782 | ||
diff --git a/src/chartab.c b/src/chartab.c index e900a3ae71f..efe23eca83f 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -485,7 +485,6 @@ Lisp_Object | |||
| 485 | char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) | 485 | char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) |
| 486 | { | 486 | { |
| 487 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); | 487 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); |
| 488 | Lisp_Object *contents = tbl->contents; | ||
| 489 | 488 | ||
| 490 | if (from == to) | 489 | if (from == to) |
| 491 | char_table_set (table, from, val); | 490 | char_table_set (table, from, val); |
| @@ -759,8 +758,6 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), | |||
| 759 | Lisp_Object function, Lisp_Object table, Lisp_Object arg, Lisp_Object val, | 758 | Lisp_Object function, Lisp_Object table, Lisp_Object arg, Lisp_Object val, |
| 760 | Lisp_Object range, Lisp_Object top) | 759 | Lisp_Object range, Lisp_Object top) |
| 761 | { | 760 | { |
| 762 | /* Pointer to the elements of TABLE. */ | ||
| 763 | Lisp_Object *contents; | ||
| 764 | /* Depth of TABLE. */ | 761 | /* Depth of TABLE. */ |
| 765 | int depth; | 762 | int depth; |
| 766 | /* Minimum and maxinum characters covered by TABLE. */ | 763 | /* Minimum and maxinum characters covered by TABLE. */ |
| @@ -777,14 +774,12 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), | |||
| 777 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 774 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 778 | 775 | ||
| 779 | depth = XINT (tbl->depth); | 776 | depth = XINT (tbl->depth); |
| 780 | contents = tbl->contents; | ||
| 781 | min_char = XINT (tbl->min_char); | 777 | min_char = XINT (tbl->min_char); |
| 782 | max_char = min_char + chartab_chars[depth - 1] - 1; | 778 | max_char = min_char + chartab_chars[depth - 1] - 1; |
| 783 | } | 779 | } |
| 784 | else | 780 | else |
| 785 | { | 781 | { |
| 786 | depth = 0; | 782 | depth = 0; |
| 787 | contents = XCHAR_TABLE (table)->contents; | ||
| 788 | min_char = 0; | 783 | min_char = 0; |
| 789 | max_char = MAX_CHAR; | 784 | max_char = MAX_CHAR; |
| 790 | } | 785 | } |
| @@ -1143,7 +1138,6 @@ uniprop_table_uncompress (Lisp_Object table, int idx) | |||
| 1143 | Lisp_Object sub = make_sub_char_table (3, min_char, Qnil); | 1138 | Lisp_Object sub = make_sub_char_table (3, min_char, Qnil); |
| 1144 | struct Lisp_Sub_Char_Table *subtbl = XSUB_CHAR_TABLE (sub); | 1139 | struct Lisp_Sub_Char_Table *subtbl = XSUB_CHAR_TABLE (sub); |
| 1145 | const unsigned char *p, *pend; | 1140 | const unsigned char *p, *pend; |
| 1146 | int i; | ||
| 1147 | 1141 | ||
| 1148 | XSUB_CHAR_TABLE (table)->contents[idx] = sub; | 1142 | XSUB_CHAR_TABLE (table)->contents[idx] = sub; |
| 1149 | p = SDATA (val), pend = p + SBYTES (val); | 1143 | p = SDATA (val), pend = p + SBYTES (val); |
| @@ -1316,7 +1310,7 @@ uniprop_get_encoder (Lisp_Object table) | |||
| 1316 | function may load a Lisp file and thus may cause | 1310 | function may load a Lisp file and thus may cause |
| 1317 | garbage-collection. */ | 1311 | garbage-collection. */ |
| 1318 | 1312 | ||
| 1319 | Lisp_Object | 1313 | static Lisp_Object |
| 1320 | uniprop_table (Lisp_Object prop) | 1314 | uniprop_table (Lisp_Object prop) |
| 1321 | { | 1315 | { |
| 1322 | Lisp_Object val, table, result; | 1316 | Lisp_Object val, table, result; |
| @@ -305,7 +305,8 @@ done: | |||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | #if 0 | 307 | #if 0 |
| 308 | losecursor () | 308 | void |
| 309 | losecursor (void) | ||
| 309 | { | 310 | { |
| 310 | curY = -1; | 311 | curY = -1; |
| 311 | } | 312 | } |
diff --git a/src/composite.c b/src/composite.c index cf1e053f027..d402d5ad0c4 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 | |||
| 967 | } | 967 | } |
| 968 | 968 | ||
| 969 | static Lisp_Object _work_val; | 969 | static Lisp_Object _work_val; |
| 970 | static int _work_char; | ||
| 971 | 970 | ||
| 972 | /* 1 iff the character C is composable. Characters of general | 971 | /* 1 iff the character C is composable. Characters of general |
| 973 | category Z? or C? are not composable except for ZWNJ and ZWJ. */ | 972 | category Z? or C? are not composable except for ZWNJ and ZWJ. */ |
diff --git a/src/data.c b/src/data.c index eb3f870b97c..76a54547a5d 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2733,8 +2733,7 @@ Both must be integers or markers. */) | |||
| 2733 | 2733 | ||
| 2734 | #ifndef HAVE_FMOD | 2734 | #ifndef HAVE_FMOD |
| 2735 | double | 2735 | double |
| 2736 | fmod (f1, f2) | 2736 | fmod (double f1, double f2) |
| 2737 | double f1, f2; | ||
| 2738 | { | 2737 | { |
| 2739 | double r = f1; | 2738 | double r = f1; |
| 2740 | 2739 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index c95404b5c52..15d80367701 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1029,8 +1029,7 @@ increment_row_positions (struct glyph_row *row, | |||
| 1029 | B without changing glyph pointers in A and B. */ | 1029 | B without changing glyph pointers in A and B. */ |
| 1030 | 1030 | ||
| 1031 | static void | 1031 | static void |
| 1032 | swap_glyphs_in_rows (a, b) | 1032 | swap_glyphs_in_rows (struct glyph_row *a, struct glyph_row *b) |
| 1033 | struct glyph_row *a, *b; | ||
| 1034 | { | 1033 | { |
| 1035 | int area; | 1034 | int area; |
| 1036 | 1035 | ||
diff --git a/src/emacs.c b/src/emacs.c index a055d89d35f..39870ec0079 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -356,8 +356,7 @@ fatal_error_signal (int sig) | |||
| 356 | 356 | ||
| 357 | /* Handler for SIGDANGER. */ | 357 | /* Handler for SIGDANGER. */ |
| 358 | void | 358 | void |
| 359 | memory_warning_signal (sig) | 359 | memory_warning_signal (int sig) |
| 360 | int sig; | ||
| 361 | { | 360 | { |
| 362 | signal (sig, memory_warning_signal); | 361 | signal (sig, memory_warning_signal); |
| 363 | SIGNAL_THREAD_CHECK (sig); | 362 | SIGNAL_THREAD_CHECK (sig); |
diff --git a/src/floatfns.c b/src/floatfns.c index 850eb9f1bcc..89aa052e8b1 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -958,8 +958,7 @@ Rounds the value toward zero. */) | |||
| 958 | 958 | ||
| 959 | #ifdef FLOAT_CATCH_SIGILL | 959 | #ifdef FLOAT_CATCH_SIGILL |
| 960 | static void | 960 | static void |
| 961 | float_error (signo) | 961 | float_error (int signo) |
| 962 | int signo; | ||
| 963 | { | 962 | { |
| 964 | if (! in_float) | 963 | if (! in_float) |
| 965 | fatal_error_signal (signo); | 964 | fatal_error_signal (signo); |
diff --git a/src/font.c b/src/font.c index 5aff20b1346..5f8d22157d6 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 | |||
| 1738 | #define LGSTRING_GLYPH_SIZE 8 | 1738 | #define LGSTRING_GLYPH_SIZE 8 |
| 1739 | 1739 | ||
| 1740 | static int | 1740 | static int |
| 1741 | check_gstring (gstring) | 1741 | check_gstring (Lisp_Object gstring) |
| 1742 | Lisp_Object gstring; | ||
| 1743 | { | 1742 | { |
| 1744 | Lisp_Object val; | 1743 | Lisp_Object val; |
| 1745 | int i, j; | 1744 | int i, j; |
| @@ -1793,8 +1792,7 @@ check_gstring (gstring) | |||
| 1793 | } | 1792 | } |
| 1794 | 1793 | ||
| 1795 | static void | 1794 | static void |
| 1796 | check_otf_features (otf_features) | 1795 | check_otf_features (Lisp_Object otf_features) |
| 1797 | Lisp_Object otf_features; | ||
| 1798 | { | 1796 | { |
| 1799 | Lisp_Object val; | 1797 | Lisp_Object val; |
| 1800 | 1798 | ||
| @@ -1827,8 +1825,7 @@ check_otf_features (otf_features) | |||
| 1827 | Lisp_Object otf_list; | 1825 | Lisp_Object otf_list; |
| 1828 | 1826 | ||
| 1829 | static Lisp_Object | 1827 | static Lisp_Object |
| 1830 | otf_tag_symbol (tag) | 1828 | otf_tag_symbol (OTF_Tag tag) |
| 1831 | OTF_Tag tag; | ||
| 1832 | { | 1829 | { |
| 1833 | char name[5]; | 1830 | char name[5]; |
| 1834 | 1831 | ||
| @@ -1837,8 +1834,7 @@ otf_tag_symbol (tag) | |||
| 1837 | } | 1834 | } |
| 1838 | 1835 | ||
| 1839 | static OTF * | 1836 | static OTF * |
| 1840 | otf_open (file) | 1837 | otf_open (Lisp_Object file) |
| 1841 | Lisp_Object file; | ||
| 1842 | { | 1838 | { |
| 1843 | Lisp_Object val = Fassoc (file, otf_list); | 1839 | Lisp_Object val = Fassoc (file, otf_list); |
| 1844 | OTF *otf; | 1840 | OTF *otf; |
| @@ -1860,8 +1856,7 @@ otf_open (file) | |||
| 1860 | (struct font_driver).otf_capability. */ | 1856 | (struct font_driver).otf_capability. */ |
| 1861 | 1857 | ||
| 1862 | Lisp_Object | 1858 | Lisp_Object |
| 1863 | font_otf_capability (font) | 1859 | font_otf_capability (struct font *font) |
| 1864 | struct font *font; | ||
| 1865 | { | 1860 | { |
| 1866 | OTF *otf; | 1861 | OTF *otf; |
| 1867 | Lisp_Object capability = Fcons (Qnil, Qnil); | 1862 | Lisp_Object capability = Fcons (Qnil, Qnil); |
| @@ -1935,9 +1930,7 @@ font_otf_capability (font) | |||
| 1935 | FEATURES. */ | 1930 | FEATURES. */ |
| 1936 | 1931 | ||
| 1937 | static void | 1932 | static void |
| 1938 | generate_otf_features (spec, features) | 1933 | generate_otf_features (Lisp_Object spec, char *features) |
| 1939 | Lisp_Object spec; | ||
| 1940 | char *features; | ||
| 1941 | { | 1934 | { |
| 1942 | Lisp_Object val; | 1935 | Lisp_Object val; |
| 1943 | char *p; | 1936 | char *p; |
| @@ -1972,8 +1965,7 @@ generate_otf_features (spec, features) | |||
| 1972 | } | 1965 | } |
| 1973 | 1966 | ||
| 1974 | Lisp_Object | 1967 | Lisp_Object |
| 1975 | font_otf_DeviceTable (device_table) | 1968 | font_otf_DeviceTable (OTF_DeviceTable *device_table) |
| 1976 | OTF_DeviceTable *device_table; | ||
| 1977 | { | 1969 | { |
| 1978 | int len = device_table->StartSize - device_table->EndSize + 1; | 1970 | int len = device_table->StartSize - device_table->EndSize + 1; |
| 1979 | 1971 | ||
| @@ -1982,9 +1974,7 @@ font_otf_DeviceTable (device_table) | |||
| 1982 | } | 1974 | } |
| 1983 | 1975 | ||
| 1984 | Lisp_Object | 1976 | Lisp_Object |
| 1985 | font_otf_ValueRecord (value_format, value_record) | 1977 | font_otf_ValueRecord (int value_format, OTF_ValueRecord *value_record) |
| 1986 | int value_format; | ||
| 1987 | OTF_ValueRecord *value_record; | ||
| 1988 | { | 1978 | { |
| 1989 | Lisp_Object val = Fmake_vector (make_number (8), Qnil); | 1979 | Lisp_Object val = Fmake_vector (make_number (8), Qnil); |
| 1990 | 1980 | ||
| @@ -2008,8 +1998,7 @@ font_otf_ValueRecord (value_format, value_record) | |||
| 2008 | } | 1998 | } |
| 2009 | 1999 | ||
| 2010 | Lisp_Object | 2000 | Lisp_Object |
| 2011 | font_otf_Anchor (anchor) | 2001 | font_otf_Anchor (OTF_Anchor *anchor) |
| 2012 | OTF_Anchor *anchor; | ||
| 2013 | { | 2002 | { |
| 2014 | Lisp_Object val; | 2003 | Lisp_Object val; |
| 2015 | 2004 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index dfc5b63f375..35b366222de 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -647,7 +647,6 @@ qttip_cb (GtkWidget *widget, | |||
| 647 | /* Change stupid Gtk+ default line wrapping. */ | 647 | /* Change stupid Gtk+ default line wrapping. */ |
| 648 | p = gtk_widget_get_parent (x->ttip_lbl); | 648 | p = gtk_widget_get_parent (x->ttip_lbl); |
| 649 | list = gtk_container_get_children (GTK_CONTAINER (p)); | 649 | list = gtk_container_get_children (GTK_CONTAINER (p)); |
| 650 | iter; | ||
| 651 | for (iter = list; iter; iter = g_list_next (iter)) | 650 | for (iter = list; iter; iter = g_list_next (iter)) |
| 652 | { | 651 | { |
| 653 | GtkWidget *w = GTK_WIDGET (iter->data); | 652 | GtkWidget *w = GTK_WIDGET (iter->data); |
diff --git a/src/image.c b/src/image.c index a09fc7a8979..f6626f61c83 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -5002,9 +5002,7 @@ pbm_scan_number (unsigned char **s, unsigned char *end) | |||
| 5002 | occurred. *SIZE is set to the size of the file. */ | 5002 | occurred. *SIZE is set to the size of the file. */ |
| 5003 | 5003 | ||
| 5004 | static char * | 5004 | static char * |
| 5005 | pbm_read_file (file, size) | 5005 | pbm_read_file (Lisp_Object file, int *size) |
| 5006 | Lisp_Object file; | ||
| 5007 | int *size; | ||
| 5008 | { | 5006 | { |
| 5009 | FILE *fp = NULL; | 5007 | FILE *fp = NULL; |
| 5010 | char *buf = NULL; | 5008 | char *buf = NULL; |
diff --git a/src/indent.c b/src/indent.c index 02d99d14ded..5c5966175aa 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -725,8 +725,7 @@ current_column_1 (void) | |||
| 725 | If END is nil, that stands for the end of STRING. */ | 725 | If END is nil, that stands for the end of STRING. */ |
| 726 | 726 | ||
| 727 | static double | 727 | static double |
| 728 | string_display_width (string, beg, end) | 728 | string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end) |
| 729 | Lisp_Object string, beg, end; | ||
| 730 | { | 729 | { |
| 731 | register int col; | 730 | register int col; |
| 732 | register unsigned char *ptr, *stop; | 731 | register unsigned char *ptr, *stop; |
diff --git a/src/intervals.c b/src/intervals.c index 4de001f2ffc..2063655cdb9 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -247,8 +247,7 @@ static int zero_length; | |||
| 247 | INTERVAL search_interval, found_interval; | 247 | INTERVAL search_interval, found_interval; |
| 248 | 248 | ||
| 249 | void | 249 | void |
| 250 | check_for_interval (i) | 250 | check_for_interval (INTERVAL i) |
| 251 | register INTERVAL i; | ||
| 252 | { | 251 | { |
| 253 | if (i == search_interval) | 252 | if (i == search_interval) |
| 254 | { | 253 | { |
| @@ -258,8 +257,7 @@ check_for_interval (i) | |||
| 258 | } | 257 | } |
| 259 | 258 | ||
| 260 | INTERVAL | 259 | INTERVAL |
| 261 | search_for_interval (i, tree) | 260 | search_for_interval (INTERVAL i, INTERVAL tree) |
| 262 | register INTERVAL i, tree; | ||
| 263 | { | 261 | { |
| 264 | icount = 0; | 262 | icount = 0; |
| 265 | search_interval = i; | 263 | search_interval = i; |
| @@ -269,8 +267,7 @@ search_for_interval (i, tree) | |||
| 269 | } | 267 | } |
| 270 | 268 | ||
| 271 | static void | 269 | static void |
| 272 | inc_interval_count (i) | 270 | inc_interval_count (INTERVAL i) |
| 273 | INTERVAL i; | ||
| 274 | { | 271 | { |
| 275 | icount++; | 272 | icount++; |
| 276 | if (LENGTH (i) == 0) | 273 | if (LENGTH (i) == 0) |
| @@ -280,8 +277,7 @@ inc_interval_count (i) | |||
| 280 | } | 277 | } |
| 281 | 278 | ||
| 282 | int | 279 | int |
| 283 | count_intervals (i) | 280 | count_intervals (INTERVAL i) |
| 284 | register INTERVAL i; | ||
| 285 | { | 281 | { |
| 286 | icount = 0; | 282 | icount = 0; |
| 287 | idepth = 0; | 283 | idepth = 0; |
| @@ -292,8 +288,7 @@ count_intervals (i) | |||
| 292 | } | 288 | } |
| 293 | 289 | ||
| 294 | static INTERVAL | 290 | static INTERVAL |
| 295 | root_interval (interval) | 291 | root_interval (INTERVAL interval) |
| 296 | INTERVAL interval; | ||
| 297 | { | 292 | { |
| 298 | register INTERVAL i = interval; | 293 | register INTERVAL i = interval; |
| 299 | 294 | ||
| @@ -804,9 +799,8 @@ update_interval (register INTERVAL i, EMACS_INT pos) | |||
| 804 | to the root. */ | 799 | to the root. */ |
| 805 | 800 | ||
| 806 | static INTERVAL | 801 | static INTERVAL |
| 807 | adjust_intervals_for_insertion (tree, position, length) | 802 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, |
| 808 | INTERVAL tree; | 803 | EMACS_INT length) |
| 809 | EMACS_INT position, length; | ||
| 810 | { | 804 | { |
| 811 | register EMACS_INT relative_position; | 805 | register EMACS_INT relative_position; |
| 812 | register INTERVAL this; | 806 | register INTERVAL this; |
| @@ -1615,9 +1609,7 @@ reproduce_tree_obj (INTERVAL source, Lisp_Object parent) | |||
| 1615 | interval. */ | 1609 | interval. */ |
| 1616 | 1610 | ||
| 1617 | static INTERVAL | 1611 | static INTERVAL |
| 1618 | make_new_interval (intervals, start, length) | 1612 | make_new_interval (INTERVAL intervals, EMACS_INT start, EMACS_INT length) |
| 1619 | INTERVAL intervals; | ||
| 1620 | EMACS_INT start, length; | ||
| 1621 | { | 1613 | { |
| 1622 | INTERVAL slot; | 1614 | INTERVAL slot; |
| 1623 | 1615 | ||
diff --git a/src/lread.c b/src/lread.c index 6a97be2be42..bef1cc8e591 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -3981,9 +3981,7 @@ defsubr (struct Lisp_Subr *sname) | |||
| 3981 | 3981 | ||
| 3982 | #ifdef NOTDEF /* use fset in subr.el now */ | 3982 | #ifdef NOTDEF /* use fset in subr.el now */ |
| 3983 | void | 3983 | void |
| 3984 | defalias (sname, string) | 3984 | defalias (struct Lisp_Subr *sname, char *string) |
| 3985 | struct Lisp_Subr *sname; | ||
| 3986 | char *string; | ||
| 3987 | { | 3985 | { |
| 3988 | Lisp_Object sym; | 3986 | Lisp_Object sym; |
| 3989 | sym = intern (string); | 3987 | sym = intern (string); |
diff --git a/src/ralloc.c b/src/ralloc.c index 9c601a0ac24..64a47416202 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -1079,7 +1079,7 @@ r_alloc_reinit (void) | |||
| 1079 | #include <assert.h> | 1079 | #include <assert.h> |
| 1080 | 1080 | ||
| 1081 | void | 1081 | void |
| 1082 | r_alloc_check () | 1082 | r_alloc_check (void) |
| 1083 | { | 1083 | { |
| 1084 | int found = 0; | 1084 | int found = 0; |
| 1085 | heap_ptr h, ph = 0; | 1085 | heap_ptr h, ph = 0; |
diff --git a/src/regex.c b/src/regex.c index d347d274819..190d1d0fe21 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) | |||
| 2169 | Returns -1 if successful, REG_ESPACE if ran out of space. */ | 2169 | Returns -1 if successful, REG_ESPACE if ran out of space. */ |
| 2170 | 2170 | ||
| 2171 | static int | 2171 | static int |
| 2172 | set_image_of_range_1 (work_area, start, end, translate) | 2172 | set_image_of_range_1 (struct range_table_work_area *work_area, |
| 2173 | RE_TRANSLATE_TYPE translate; | 2173 | re_wchar_t start, re_wchar_t end, |
| 2174 | struct range_table_work_area *work_area; | 2174 | RE_TRANSLATE_TYPE translate) |
| 2175 | re_wchar_t start, end; | ||
| 2176 | { | 2175 | { |
| 2177 | /* `one_case' indicates a character, or a run of characters, | 2176 | /* `one_case' indicates a character, or a run of characters, |
| 2178 | each of which is an isolate (no case-equivalents). | 2177 | each of which is an isolate (no case-equivalents). |
| @@ -2322,10 +2321,9 @@ set_image_of_range_1 (work_area, start, end, translate) | |||
| 2322 | Returns -1 if successful, REG_ESPACE if ran out of space. */ | 2321 | Returns -1 if successful, REG_ESPACE if ran out of space. */ |
| 2323 | 2322 | ||
| 2324 | static int | 2323 | static int |
| 2325 | set_image_of_range (work_area, start, end, translate) | 2324 | set_image_of_range (struct range_table_work_area *work_area, |
| 2326 | RE_TRANSLATE_TYPE translate; | 2325 | re_wchar_t start, re_wchar_t end, |
| 2327 | struct range_table_work_area *work_area; | 2326 | RE_TRANSLATE_TYPE translate) |
| 2328 | re_wchar_t start, end; | ||
| 2329 | { | 2327 | { |
| 2330 | re_wchar_t cmin, cmax; | 2328 | re_wchar_t cmin, cmax; |
| 2331 | 2329 | ||
| @@ -2412,8 +2410,7 @@ static re_char **best_regstart, **best_regend; | |||
| 2412 | but don't make them smaller. */ | 2410 | but don't make them smaller. */ |
| 2413 | 2411 | ||
| 2414 | static | 2412 | static |
| 2415 | regex_grow_registers (num_regs) | 2413 | regex_grow_registers (int num_regs) |
| 2416 | int num_regs; | ||
| 2417 | { | 2414 | { |
| 2418 | if (num_regs > regs_allocated_size) | 2415 | if (num_regs > regs_allocated_size) |
| 2419 | { | 2416 | { |
diff --git a/src/sysdep.c b/src/sysdep.c index 077d4405593..4bd1f54b9e6 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1800,8 +1800,7 @@ get_random (void) | |||
| 1800 | #ifndef HAVE_STRERROR | 1800 | #ifndef HAVE_STRERROR |
| 1801 | #ifndef WINDOWSNT | 1801 | #ifndef WINDOWSNT |
| 1802 | char * | 1802 | char * |
| 1803 | strerror (errnum) | 1803 | strerror (int errnum) |
| 1804 | int errnum; | ||
| 1805 | { | 1804 | { |
| 1806 | extern char *sys_errlist[]; | 1805 | extern char *sys_errlist[]; |
| 1807 | extern int sys_nerr; | 1806 | extern int sys_nerr; |
diff --git a/src/termcap.c b/src/termcap.c index e191f6b3af3..96b9303d62d 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -338,8 +338,7 @@ static int name_match (char *line, char *name); | |||
| 338 | 338 | ||
| 339 | #ifdef MSDOS /* MW, May 1993 */ | 339 | #ifdef MSDOS /* MW, May 1993 */ |
| 340 | static int | 340 | static int |
| 341 | valid_filename_p (fn) | 341 | valid_filename_p (char *fn) |
| 342 | char *fn; | ||
| 343 | { | 342 | { |
| 344 | return *fn == '/' || fn[1] == ':'; | 343 | return *fn == '/' || fn[1] == ':'; |
| 345 | } | 344 | } |
| @@ -669,9 +668,29 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end) | |||
| 669 | 668 | ||
| 670 | #include <stdio.h> | 669 | #include <stdio.h> |
| 671 | 670 | ||
| 672 | main (argc, argv) | 671 | static void |
| 673 | int argc; | 672 | tprint (char *cap) |
| 674 | char **argv; | 673 | { |
| 674 | char *x = tgetstr (cap, 0); | ||
| 675 | register char *y; | ||
| 676 | |||
| 677 | printf ("%s: ", cap); | ||
| 678 | if (x) | ||
| 679 | { | ||
| 680 | for (y = x; *y; y++) | ||
| 681 | if (*y <= ' ' || *y == 0177) | ||
| 682 | printf ("\\%0o", *y); | ||
| 683 | else | ||
| 684 | putchar (*y); | ||
| 685 | free (x); | ||
| 686 | } | ||
| 687 | else | ||
| 688 | printf ("none"); | ||
| 689 | putchar ('\n'); | ||
| 690 | } | ||
| 691 | |||
| 692 | int | ||
| 693 | main (int argc, char **argv) | ||
| 675 | { | 694 | { |
| 676 | char *term; | 695 | char *term; |
| 677 | char *buf; | 696 | char *buf; |
| @@ -693,27 +712,8 @@ main (argc, argv) | |||
| 693 | 712 | ||
| 694 | printf ("co: %d\n", tgetnum ("co")); | 713 | printf ("co: %d\n", tgetnum ("co")); |
| 695 | printf ("am: %d\n", tgetflag ("am")); | 714 | printf ("am: %d\n", tgetflag ("am")); |
| 696 | } | ||
| 697 | |||
| 698 | tprint (cap) | ||
| 699 | char *cap; | ||
| 700 | { | ||
| 701 | char *x = tgetstr (cap, 0); | ||
| 702 | register char *y; | ||
| 703 | 715 | ||
| 704 | printf ("%s: ", cap); | 716 | return 0; |
| 705 | if (x) | ||
| 706 | { | ||
| 707 | for (y = x; *y; y++) | ||
| 708 | if (*y <= ' ' || *y == 0177) | ||
| 709 | printf ("\\%0o", *y); | ||
| 710 | else | ||
| 711 | putchar (*y); | ||
| 712 | free (x); | ||
| 713 | } | ||
| 714 | else | ||
| 715 | printf ("none"); | ||
| 716 | putchar ('\n'); | ||
| 717 | } | 717 | } |
| 718 | 718 | ||
| 719 | #endif /* TEST */ | 719 | #endif /* TEST */ |
diff --git a/src/tparam.c b/src/tparam.c index 6aae0b97db9..ed28cd7397f 100644 --- a/src/tparam.c +++ b/src/tparam.c | |||
| @@ -265,9 +265,8 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 265 | 265 | ||
| 266 | #ifdef DEBUG | 266 | #ifdef DEBUG |
| 267 | 267 | ||
| 268 | main (argc, argv) | 268 | int |
| 269 | int argc; | 269 | main (int argc, char **argv) |
| 270 | char **argv; | ||
| 271 | { | 270 | { |
| 272 | char buf[50]; | 271 | char buf[50]; |
| 273 | int args[3]; | 272 | int args[3]; |
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index f27415a252c..ce65faffd4e 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c | |||
| @@ -64,8 +64,7 @@ static long brk_on_dump = 0; | |||
| 64 | 64 | ||
| 65 | /* Called from main, if we use shared libraries. */ | 65 | /* Called from main, if we use shared libraries. */ |
| 66 | int | 66 | int |
| 67 | run_time_remap (ignored) | 67 | run_time_remap (char *ignored) |
| 68 | char *ignored; | ||
| 69 | { | 68 | { |
| 70 | brk ((char *) brk_on_dump); | 69 | brk ((char *) brk_on_dump); |
| 71 | } | 70 | } |
| @@ -74,74 +73,11 @@ run_time_remap (ignored) | |||
| 74 | #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ | 73 | #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ |
| 75 | #define min(x,y) (((x) < (y)) ? (x) : (y)) | 74 | #define min(x,y) (((x) < (y)) ? (x) : (y)) |
| 76 | 75 | ||
| 77 | |||
| 78 | /* Create a new a.out file, same as old but with current data space */ | ||
| 79 | void | ||
| 80 | unexec (const char *new_name, /* name of the new a.out file to be created */ | ||
| 81 | const char *old_name) /* name of the old a.out file */ | ||
| 82 | { | ||
| 83 | int old, new; | ||
| 84 | int old_size, new_size; | ||
| 85 | struct header hdr; | ||
| 86 | struct som_exec_auxhdr auxhdr; | ||
| 87 | long i; | ||
| 88 | |||
| 89 | /* For the greatest flexibility, should create a temporary file in | ||
| 90 | the same directory as the new file. When everything is complete, | ||
| 91 | rename the temp file to the new name. | ||
| 92 | This way, a program could update its own a.out file even while | ||
| 93 | it is still executing. If problems occur, everything is still | ||
| 94 | intact. NOT implemented. */ | ||
| 95 | |||
| 96 | /* Open the input and output a.out files */ | ||
| 97 | old = open (old_name, O_RDONLY); | ||
| 98 | if (old < 0) | ||
| 99 | { perror (old_name); exit (1); } | ||
| 100 | new = open (new_name, O_CREAT|O_RDWR|O_TRUNC, 0777); | ||
| 101 | if (new < 0) | ||
| 102 | { perror (new_name); exit (1); } | ||
| 103 | |||
| 104 | /* Read the old headers */ | ||
| 105 | read_header (old, &hdr, &auxhdr); | ||
| 106 | |||
| 107 | brk_on_dump = (long) sbrk (0); | ||
| 108 | |||
| 109 | /* Decide how large the new and old data areas are */ | ||
| 110 | old_size = auxhdr.exec_dsize; | ||
| 111 | /* I suspect these two statements are separate | ||
| 112 | to avoid a compiler bug in hpux version 8. */ | ||
| 113 | i = (long) sbrk (0); | ||
| 114 | new_size = i - auxhdr.exec_dmem; | ||
| 115 | |||
| 116 | /* Copy the old file to the new, up to the data space */ | ||
| 117 | lseek (old, 0, 0); | ||
| 118 | copy_file (old, new, auxhdr.exec_dfile); | ||
| 119 | |||
| 120 | /* Skip the old data segment and write a new one */ | ||
| 121 | lseek (old, old_size, 1); | ||
| 122 | save_data_space (new, &hdr, &auxhdr, new_size); | ||
| 123 | |||
| 124 | /* Copy the rest of the file */ | ||
| 125 | copy_rest (old, new); | ||
| 126 | |||
| 127 | /* Update file pointers since we probably changed size of data area */ | ||
| 128 | update_file_ptrs (new, &hdr, &auxhdr, auxhdr.exec_dfile, new_size-old_size); | ||
| 129 | |||
| 130 | /* Save the modified header */ | ||
| 131 | write_header (new, &hdr, &auxhdr); | ||
| 132 | |||
| 133 | /* Close the binary file */ | ||
| 134 | close (old); | ||
| 135 | close (new); | ||
| 136 | } | ||
| 137 | |||
| 138 | /* Save current data space in the file, update header. */ | 76 | /* Save current data space in the file, update header. */ |
| 139 | 77 | ||
| 140 | save_data_space (file, hdr, auxhdr, size) | 78 | static void |
| 141 | int file; | 79 | save_data_space (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr, |
| 142 | struct header *hdr; | 80 | int size) |
| 143 | struct som_exec_auxhdr *auxhdr; | ||
| 144 | int size; | ||
| 145 | { | 81 | { |
| 146 | /* Write the entire data space out to the file */ | 82 | /* Write the entire data space out to the file */ |
| 147 | if (write (file, auxhdr->exec_dmem, size) != size) | 83 | if (write (file, auxhdr->exec_dmem, size) != size) |
| @@ -154,12 +90,9 @@ save_data_space (file, hdr, auxhdr, size) | |||
| 154 | 90 | ||
| 155 | /* Update the values of file pointers when something is inserted. */ | 91 | /* Update the values of file pointers when something is inserted. */ |
| 156 | 92 | ||
| 157 | update_file_ptrs (file, hdr, auxhdr, location, offset) | 93 | static void |
| 158 | int file; | 94 | update_file_ptrs (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr, |
| 159 | struct header *hdr; | 95 | unsigned int location, int offset) |
| 160 | struct som_exec_auxhdr *auxhdr; | ||
| 161 | unsigned int location; | ||
| 162 | int offset; | ||
| 163 | { | 96 | { |
| 164 | struct subspace_dictionary_record subspace; | 97 | struct subspace_dictionary_record subspace; |
| 165 | int i; | 98 | int i; |
| @@ -205,10 +138,8 @@ update_file_ptrs (file, hdr, auxhdr, location, offset) | |||
| 205 | 138 | ||
| 206 | /* Read in the header records from an a.out file. */ | 139 | /* Read in the header records from an a.out file. */ |
| 207 | 140 | ||
| 208 | read_header (file, hdr, auxhdr) | 141 | static void |
| 209 | int file; | 142 | read_header (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr) |
| 210 | struct header *hdr; | ||
| 211 | struct som_exec_auxhdr *auxhdr; | ||
| 212 | { | 143 | { |
| 213 | 144 | ||
| 214 | /* Read the header in */ | 145 | /* Read the header in */ |
| @@ -233,10 +164,8 @@ read_header (file, hdr, auxhdr) | |||
| 233 | 164 | ||
| 234 | /* Write out the header records into an a.out file. */ | 165 | /* Write out the header records into an a.out file. */ |
| 235 | 166 | ||
| 236 | write_header (file, hdr, auxhdr) | 167 | static void |
| 237 | int file; | 168 | write_header (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr) |
| 238 | struct header *hdr; | ||
| 239 | struct som_exec_auxhdr *auxhdr; | ||
| 240 | { | 169 | { |
| 241 | /* Update the checksum */ | 170 | /* Update the checksum */ |
| 242 | hdr->checksum = calculate_checksum (hdr); | 171 | hdr->checksum = calculate_checksum (hdr); |
| @@ -252,8 +181,8 @@ write_header (file, hdr, auxhdr) | |||
| 252 | 181 | ||
| 253 | /* Calculate the checksum of a SOM header record. */ | 182 | /* Calculate the checksum of a SOM header record. */ |
| 254 | 183 | ||
| 255 | calculate_checksum (hdr) | 184 | static int |
| 256 | struct header *hdr; | 185 | calculate_checksum (struct header *hdr) |
| 257 | { | 186 | { |
| 258 | int checksum, i, *ptr; | 187 | int checksum, i, *ptr; |
| 259 | 188 | ||
| @@ -267,9 +196,8 @@ calculate_checksum (hdr) | |||
| 267 | 196 | ||
| 268 | /* Copy size bytes from the old file to the new one. */ | 197 | /* Copy size bytes from the old file to the new one. */ |
| 269 | 198 | ||
| 270 | copy_file (old, new, size) | 199 | static void |
| 271 | int new, old; | 200 | copy_file (int old, int new, int size) |
| 272 | int size; | ||
| 273 | { | 201 | { |
| 274 | int len; | 202 | int len; |
| 275 | int buffer[8192]; /* word aligned will be faster */ | 203 | int buffer[8192]; /* word aligned will be faster */ |
| @@ -286,8 +214,8 @@ copy_file (old, new, size) | |||
| 286 | 214 | ||
| 287 | /* Copy the rest of the file, up to EOF. */ | 215 | /* Copy the rest of the file, up to EOF. */ |
| 288 | 216 | ||
| 289 | copy_rest (old, new) | 217 | static void |
| 290 | int new, old; | 218 | copy_rest (int old, int new) |
| 291 | { | 219 | { |
| 292 | int buffer[4096]; | 220 | int buffer[4096]; |
| 293 | int len; | 221 | int len; |
| @@ -301,9 +229,8 @@ copy_rest (old, new) | |||
| 301 | } | 229 | } |
| 302 | 230 | ||
| 303 | #ifdef DEBUG | 231 | #ifdef DEBUG |
| 304 | display_header (hdr, auxhdr) | 232 | static void |
| 305 | struct header *hdr; | 233 | display_header (struct header *hdr, struct som_exec_auxhdr *auxhdr) |
| 306 | struct som_exec_auxhdr *auxhdr; | ||
| 307 | { | 234 | { |
| 308 | /* Display the header information (debug) */ | 235 | /* Display the header information (debug) */ |
| 309 | printf ("\n\nFILE HEADER\n"); | 236 | printf ("\n\nFILE HEADER\n"); |
| @@ -320,3 +247,64 @@ display_header (hdr, auxhdr) | |||
| 320 | hdr->unloadable_sp_location, hdr->unloadable_sp_size); | 247 | hdr->unloadable_sp_location, hdr->unloadable_sp_size); |
| 321 | } | 248 | } |
| 322 | #endif /* DEBUG */ | 249 | #endif /* DEBUG */ |
| 250 | |||
| 251 | |||
| 252 | /* Create a new a.out file, same as old but with current data space */ | ||
| 253 | void | ||
| 254 | unexec (const char *new_name, /* name of the new a.out file to be created */ | ||
| 255 | const char *old_name) /* name of the old a.out file */ | ||
| 256 | { | ||
| 257 | int old, new; | ||
| 258 | int old_size, new_size; | ||
| 259 | struct header hdr; | ||
| 260 | struct som_exec_auxhdr auxhdr; | ||
| 261 | long i; | ||
| 262 | |||
| 263 | /* For the greatest flexibility, should create a temporary file in | ||
| 264 | the same directory as the new file. When everything is complete, | ||
| 265 | rename the temp file to the new name. | ||
| 266 | This way, a program could update its own a.out file even while | ||
| 267 | it is still executing. If problems occur, everything is still | ||
| 268 | intact. NOT implemented. */ | ||
| 269 | |||
| 270 | /* Open the input and output a.out files */ | ||
| 271 | old = open (old_name, O_RDONLY); | ||
| 272 | if (old < 0) | ||
| 273 | { perror (old_name); exit (1); } | ||
| 274 | new = open (new_name, O_CREAT|O_RDWR|O_TRUNC, 0777); | ||
| 275 | if (new < 0) | ||
| 276 | { perror (new_name); exit (1); } | ||
| 277 | |||
| 278 | /* Read the old headers */ | ||
| 279 | read_header (old, &hdr, &auxhdr); | ||
| 280 | |||
| 281 | brk_on_dump = (long) sbrk (0); | ||
| 282 | |||
| 283 | /* Decide how large the new and old data areas are */ | ||
| 284 | old_size = auxhdr.exec_dsize; | ||
| 285 | /* I suspect these two statements are separate | ||
| 286 | to avoid a compiler bug in hpux version 8. */ | ||
| 287 | i = (long) sbrk (0); | ||
| 288 | new_size = i - auxhdr.exec_dmem; | ||
| 289 | |||
| 290 | /* Copy the old file to the new, up to the data space */ | ||
| 291 | lseek (old, 0, 0); | ||
| 292 | copy_file (old, new, auxhdr.exec_dfile); | ||
| 293 | |||
| 294 | /* Skip the old data segment and write a new one */ | ||
| 295 | lseek (old, old_size, 1); | ||
| 296 | save_data_space (new, &hdr, &auxhdr, new_size); | ||
| 297 | |||
| 298 | /* Copy the rest of the file */ | ||
| 299 | copy_rest (old, new); | ||
| 300 | |||
| 301 | /* Update file pointers since we probably changed size of data area */ | ||
| 302 | update_file_ptrs (new, &hdr, &auxhdr, auxhdr.exec_dfile, new_size-old_size); | ||
| 303 | |||
| 304 | /* Save the modified header */ | ||
| 305 | write_header (new, &hdr, &auxhdr); | ||
| 306 | |||
| 307 | /* Close the binary file */ | ||
| 308 | close (old); | ||
| 309 | close (new); | ||
| 310 | } | ||
| @@ -1452,6 +1452,14 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oset) | |||
| 1452 | } | 1452 | } |
| 1453 | 1453 | ||
| 1454 | int | 1454 | int |
| 1455 | pthread_sigmask (int how, const sigset_t *set, sigset_t *oset) | ||
| 1456 | { | ||
| 1457 | if (sigprocmask (how, set, oset) == -1) | ||
| 1458 | return EINVAL; | ||
| 1459 | return 0; | ||
| 1460 | } | ||
| 1461 | |||
| 1462 | int | ||
| 1455 | setpgrp (int pid, int gid) | 1463 | setpgrp (int pid, int gid) |
| 1456 | { | 1464 | { |
| 1457 | return 0; | 1465 | return 0; |
diff --git a/src/widget.c b/src/widget.c index 6d871ad7cb2..a09ec2631ad 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -224,8 +224,7 @@ get_wm_shell (Widget w) | |||
| 224 | #if 0 /* Currently not used. */ | 224 | #if 0 /* Currently not used. */ |
| 225 | 225 | ||
| 226 | static void | 226 | static void |
| 227 | mark_shell_size_user_specified (wmshell) | 227 | mark_shell_size_user_specified (Widget wmshell) |
| 228 | Widget wmshell; | ||
| 229 | { | 228 | { |
| 230 | if (! XtIsWMShell (wmshell)) abort (); | 229 | if (! XtIsWMShell (wmshell)) abort (); |
| 231 | /* This is kind of sleazy, but I can't see how else to tell it to make it | 230 | /* 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) | |||
| 510 | #if 0 | 509 | #if 0 |
| 511 | 510 | ||
| 512 | static void | 511 | static void |
| 513 | create_frame_gcs (ew) | 512 | create_frame_gcs (EmacsFrame ew) |
| 514 | EmacsFrame ew; | ||
| 515 | { | 513 | { |
| 516 | struct frame *s = ew->emacs_frame.frame; | 514 | struct frame *s = ew->emacs_frame.frame; |
| 517 | 515 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index dfaa9cdeac3..a4a9e236a9e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2209,8 +2209,7 @@ safe_call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) | |||
| 2209 | This is for debugging. It is too slow to do unconditionally. */ | 2209 | This is for debugging. It is too slow to do unconditionally. */ |
| 2210 | 2210 | ||
| 2211 | static void | 2211 | static void |
| 2212 | check_it (it) | 2212 | check_it (struct it *it) |
| 2213 | struct it *it; | ||
| 2214 | { | 2213 | { |
| 2215 | if (it->method == GET_FROM_STRING) | 2214 | if (it->method == GET_FROM_STRING) |
| 2216 | { | 2215 | { |
| @@ -10510,7 +10509,7 @@ DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed, | |||
| 10510 | f = XFRAME (frame); | 10509 | f = XFRAME (frame); |
| 10511 | 10510 | ||
| 10512 | if (WINDOWP (f->tool_bar_window) | 10511 | if (WINDOWP (f->tool_bar_window) |
| 10513 | || (w = XWINDOW (f->tool_bar_window), | 10512 | && (w = XWINDOW (f->tool_bar_window), |
| 10514 | WINDOW_TOTAL_LINES (w) > 0)) | 10513 | WINDOW_TOTAL_LINES (w) > 0)) |
| 10515 | { | 10514 | { |
| 10516 | update_tool_bar (f, 1); | 10515 | update_tool_bar (f, 1); |
diff --git a/src/xfaces.c b/src/xfaces.c index 91f4b133466..c1e75ab3e59 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -536,8 +536,7 @@ int color_count[256]; | |||
| 536 | /* Register color PIXEL as allocated. */ | 536 | /* Register color PIXEL as allocated. */ |
| 537 | 537 | ||
| 538 | void | 538 | void |
| 539 | register_color (pixel) | 539 | register_color (unsigned long pixel) |
| 540 | unsigned long pixel; | ||
| 541 | { | 540 | { |
| 542 | xassert (pixel < 256); | 541 | xassert (pixel < 256); |
| 543 | ++color_count[pixel]; | 542 | ++color_count[pixel]; |
| @@ -547,8 +546,7 @@ register_color (pixel) | |||
| 547 | /* Register color PIXEL as deallocated. */ | 546 | /* Register color PIXEL as deallocated. */ |
| 548 | 547 | ||
| 549 | void | 548 | void |
| 550 | unregister_color (pixel) | 549 | unregister_color (unsigned long pixel) |
| 551 | unsigned long pixel; | ||
| 552 | { | 550 | { |
| 553 | xassert (pixel < 256); | 551 | xassert (pixel < 256); |
| 554 | if (color_count[pixel] > 0) | 552 | if (color_count[pixel] > 0) |
| @@ -561,9 +559,7 @@ unregister_color (pixel) | |||
| 561 | /* Register N colors from PIXELS as deallocated. */ | 559 | /* Register N colors from PIXELS as deallocated. */ |
| 562 | 560 | ||
| 563 | void | 561 | void |
| 564 | unregister_colors (pixels, n) | 562 | unregister_colors (unsigned long *pixels, int n) |
| 565 | unsigned long *pixels; | ||
| 566 | int n; | ||
| 567 | { | 563 | { |
| 568 | int i; | 564 | int i; |
| 569 | for (i = 0; i < n; ++i) | 565 | for (i = 0; i < n; ++i) |
diff --git a/src/xfns.c b/src/xfns.c index c70f4bb9a82..0d1e4a1bb5e 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2001,11 +2001,8 @@ xic_create_fontsetname (const char *base_fontname, int motif) | |||
| 2001 | 2001 | ||
| 2002 | #ifdef DEBUG_XIC_FONTSET | 2002 | #ifdef DEBUG_XIC_FONTSET |
| 2003 | static void | 2003 | static void |
| 2004 | print_fontset_result (xfs, name, missing_list, missing_count) | 2004 | print_fontset_result (XFontSet xfs, char *name, char **missing_list, |
| 2005 | XFontSet xfs; | 2005 | int missing_count) |
| 2006 | char *name; | ||
| 2007 | char **missing_list; | ||
| 2008 | int missing_count; | ||
| 2009 | { | 2006 | { |
| 2010 | if (xfs) | 2007 | if (xfs) |
| 2011 | fprintf (stderr, "XIC Fontset created: %s\n", name); | 2008 | fprintf (stderr, "XIC Fontset created: %s\n", name); |
diff --git a/src/xmenu.c b/src/xmenu.c index fc629b35104..b4338c1d653 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -740,10 +740,13 @@ menu_highlight_callback (GtkWidget *widget, gpointer call_data) | |||
| 740 | help = call_data ? cb_data->help : Qnil; | 740 | help = call_data ? cb_data->help : Qnil; |
| 741 | 741 | ||
| 742 | /* If popup_activated_flag is greater than 1 we are in a popup menu. | 742 | /* If popup_activated_flag is greater than 1 we are in a popup menu. |
| 743 | Don't show help for them, they won't appear before the | 743 | Don't pass the frame to show_help_event for those. |
| 744 | popup is popped down. */ | 744 | Passing frame creates an Emacs event. As we are looping in |
| 745 | if (popup_activated_flag <= 1) | 745 | popup_widget_loop, it won't be handeled. Passing NULL shows the tip |
| 746 | show_help_event (cb_data->cl_data->f, widget, help); | 746 | directly without using an Emacs event. This is what the Lucid code |
| 747 | does below. */ | ||
| 748 | show_help_event (popup_activated_flag <= 1 ? cb_data->cl_data->f : NULL, | ||
| 749 | widget, help); | ||
| 747 | } | 750 | } |
| 748 | #else | 751 | #else |
| 749 | static void | 752 | static void |
diff --git a/src/xrdb.c b/src/xrdb.c index e18ff65f799..6a16e3260bd 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -651,9 +651,7 @@ typedef char **List; | |||
| 651 | #define free_arglist(list) | 651 | #define free_arglist(list) |
| 652 | 652 | ||
| 653 | static List | 653 | static List |
| 654 | member (elt, list) | 654 | member (char *elt, List list) |
| 655 | char *elt; | ||
| 656 | List list; | ||
| 657 | { | 655 | { |
| 658 | List p; | 656 | List p; |
| 659 | 657 | ||
| @@ -665,20 +663,17 @@ member (elt, list) | |||
| 665 | } | 663 | } |
| 666 | 664 | ||
| 667 | static void | 665 | static void |
| 668 | fatal (msg, prog, x1, x2, x3, x4, x5) | 666 | fatal (char *msg, char *prog) |
| 669 | char *msg, *prog; | ||
| 670 | int x1, x2, x3, x4, x5; | ||
| 671 | { | 667 | { |
| 672 | if (errno) | 668 | if (errno) |
| 673 | perror (prog); | 669 | perror (prog); |
| 674 | 670 | ||
| 675 | (void) fprintf (stderr, msg, prog, x1, x2, x3, x4, x5); | 671 | (void) fprintf (stderr, msg, prog); |
| 676 | exit (1); | 672 | exit (1); |
| 677 | } | 673 | } |
| 678 | 674 | ||
| 679 | main (argc, argv) | 675 | int |
| 680 | int argc; | 676 | main (int argc, char **argv) |
| 681 | char **argv; | ||
| 682 | { | 677 | { |
| 683 | Display *display; | 678 | Display *display; |
| 684 | char *displayname, *resource_string, *class, *name; | 679 | char *displayname, *resource_string, *class, *name; |
| @@ -749,5 +744,7 @@ main (argc, argv) | |||
| 749 | printf ("\tExit.\n\n"); | 744 | printf ("\tExit.\n\n"); |
| 750 | 745 | ||
| 751 | XCloseDisplay (display); | 746 | XCloseDisplay (display); |
| 747 | |||
| 748 | return 0; | ||
| 752 | } | 749 | } |
| 753 | #endif /* TESTRM */ | 750 | #endif /* TESTRM */ |