diff options
307 files changed, 2426 insertions, 2384 deletions
| @@ -1,3 +1,108 @@ | |||
| 1 | 2012-09-17 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * Makefile.in (bootstrap): Revert last change. Run config.status | ||
| 4 | after config.status --recheck, run configure from $(srcdir). | ||
| 5 | (config.status): Run configure from $(srcdir). | ||
| 6 | |||
| 7 | 2012-09-17 Paul Eggert <eggert@cs.ucla.edu> | ||
| 8 | |||
| 9 | * Makefile.in: Fix build error on FreeBSD. | ||
| 10 | ($(MAKEFILE_NAME)): Pass MAKE='$(MAKE)' to config.status's env. | ||
| 11 | Suggested by Wolfgang Jenker in | ||
| 12 | <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00430.html>. | ||
| 13 | (MAKE_CONFIG_STATUS): Remove. Remaining use expanded. | ||
| 14 | This undoes part of the 2012-09-10 patch. | ||
| 15 | (bootstrap): Run ./configure, rather than trying to run config.status | ||
| 16 | if it exists. That builds src/epaths.h more reliably. | ||
| 17 | Run autogen/copy_autogen if autogen.sh fails, | ||
| 18 | to create 'configure'; problem reported by Andreas Schwab in | ||
| 19 | <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00438.html>. | ||
| 20 | * autogen.sh: Exit with status 1 when failing due to missing tools, | ||
| 21 | reverting the 2012-09-10 change to this file. | ||
| 22 | * autogen/copy_autogen: Fail if one of the subsidiary actions fail. | ||
| 23 | Use 'cp -f' for the build-aux files, since the destinations are | ||
| 24 | typically read-only. | ||
| 25 | |||
| 26 | Remove no-longer-needed Solaris 2.4 vfork bug workaround. | ||
| 27 | * configure.ac (ac_cv_func_vfork_works): Default to 'no' on | ||
| 28 | Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works. | ||
| 29 | |||
| 30 | 2012-09-17 Glenn Morris <rgm@gnu.org> | ||
| 31 | |||
| 32 | * configure.ac (copyright): New output variable. | ||
| 33 | (COPYRIGHT): New AC_DEFINE. | ||
| 34 | |||
| 35 | 2012-09-16 Paul Eggert <eggert@cs.ucla.edu> | ||
| 36 | |||
| 37 | Remove configure's --without-sync-input option (Bug#12450). | ||
| 38 | * configure.ac (SYNC_INPUT, BROKEN_SA_RESTART): Remove. | ||
| 39 | |||
| 40 | 2012-09-16 Glenn Morris <rgm@gnu.org> | ||
| 41 | |||
| 42 | Increase compartmentalization of Nextstep builds rules, | ||
| 43 | and store Emacs version number in fewer versioned files. | ||
| 44 | * configure.ac (ns_appsrc): Use relative names. | ||
| 45 | (ns_frag): Remove. | ||
| 46 | (Info-gnustep.plist, Emacs.desktop, Info.plist, InfoPlist.strings) | ||
| 47 | (nextstep/Makefile): Generate these nextstep files. | ||
| 48 | (SUBDIR_MAKEFILES): Add nextstep. | ||
| 49 | * Makefile.in (clean, distclean, bootstrap-clean): Add nextstep. | ||
| 50 | * make-dist (nextstep/templates): Add directory. | ||
| 51 | (nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj): Remove. | ||
| 52 | (nextstep/Cocoa/Emacs.base/Contents) | ||
| 53 | (nextstep, nextstep/GNUstep/Emacs.base/Resources): Update contents. | ||
| 54 | |||
| 55 | 2012-09-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 56 | |||
| 57 | Port better to POSIX hosts lacking _setjmp (Bug#12446). | ||
| 58 | * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols. | ||
| 59 | (_setjmp, _longjmp): Remove. | ||
| 60 | |||
| 61 | 2012-09-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 62 | |||
| 63 | * configure.ac (--without-sync-input): Fix typo in usage message. | ||
| 64 | |||
| 65 | * configure.ac: Port to hosts lacking gtk. | ||
| 66 | (PKG_CHECK_MODULES): Capture pkg-config diagnostics | ||
| 67 | better, in particular, problems in invoking pkg-config itself. | ||
| 68 | This is useful on hosts that don't have pkg-config. | ||
| 69 | (GTK_MODULES): Do not exit 'configure' simply because gtk3 | ||
| 70 | and gtk2 are both missing. Problem found on Solaris 8. | ||
| 71 | |||
| 72 | 2012-09-13 Jan Djärv <jan.h.d@swipnet.se> | ||
| 73 | |||
| 74 | * configure.ac: Reorder Xaw3d messages. | ||
| 75 | Report Gtk+ 3 as GTK. | ||
| 76 | |||
| 77 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 78 | |||
| 79 | Simplify SIGIO usage (Bug#12408). | ||
| 80 | * configure.ac (NO_TERMIO, BROKEN_FIONREAD, BROKEN_SIGAIO) | ||
| 81 | (BROKEN_SIGPOLL, BROKEN_SIGPTY): Remove. | ||
| 82 | (USABLE_FIONREAD, USABLE_SIGIO): New symbols. All uses of | ||
| 83 | 'defined SIGIO' replaced with 'defined USABLE_SIGIO', with no need | ||
| 84 | to #undef SIGIO now (which was error-prone). Likewise, all uses | ||
| 85 | of 'defined FIONREAD' replaced with 'defined USABLE_FIONREAD'. | ||
| 86 | |||
| 87 | 2012-09-12 Jan Djärv <jan.h.d@swipnet.se> | ||
| 88 | |||
| 89 | * configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first | ||
| 90 | and then gtk2 if not found. | ||
| 91 | --with-x-toolkit=gtk|yes: As above, but fail if gtk2 or gt3 not found. | ||
| 92 | --with-x-toolkit=gtk2: Only try gtk2, fail if not found. | ||
| 93 | --with-x-toolkit=gtk3: Only try gtk3, fail if not found. | ||
| 94 | |||
| 95 | 2012-09-11 Glenn Morris <rgm@gnu.org> | ||
| 96 | |||
| 97 | * Makefile.in (install-arch-dep, install-arch-indep, install-doc): | ||
| 98 | Be more explicit about dependencies, for parallel `make install'. | ||
| 99 | |||
| 100 | 2012-09-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 101 | |||
| 102 | Simplify, document, and port floating-point (Bug#12381). | ||
| 103 | * configure.ac (logb, cbrt): Do not check for these functions, | ||
| 104 | as they are not being used. | ||
| 105 | |||
| 1 | 2012-09-10 Paul Eggert <eggert@cs.ucla.edu> | 106 | 2012-09-10 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 107 | ||
| 3 | Improve robustness of 'make bootstrap' (Bug#12376). | 108 | Improve robustness of 'make bootstrap' (Bug#12376). |
diff --git a/Makefile.in b/Makefile.in index 6ed32491a66..7a38abeca1c 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -358,19 +358,17 @@ blessmail: Makefile src FRC | |||
| 358 | MAKEFILE_NAME = Makefile | 358 | MAKEFILE_NAME = Makefile |
| 359 | $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ | 359 | $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ |
| 360 | $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) | 360 | $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) |
| 361 | ./config.status | 361 | MAKE='$(MAKE)' ./config.status |
| 362 | 362 | ||
| 363 | # Don't erase these files if make is interrupted while refreshing them. | 363 | # Don't erase these files if make is interrupted while refreshing them. |
| 364 | .PRECIOUS: Makefile config.status | 364 | .PRECIOUS: Makefile config.status |
| 365 | 365 | ||
| 366 | MAKE_CONFIG_STATUS = \ | 366 | config.status: ${srcdir}/configure ${srcdir}/lisp/version.el |
| 367 | if [ -x ./config.status ]; then \ | 367 | if [ -x ./config.status ]; then \ |
| 368 | ./config.status --recheck; \ | 368 | ./config.status --recheck; \ |
| 369 | else \ | 369 | else \ |
| 370 | ./configure $(CONFIGURE_FLAGS); \ | 370 | $(srcdir)/configure $(CONFIGURE_FLAGS); \ |
| 371 | fi | 371 | fi |
| 372 | config.status: ${srcdir}/configure ${srcdir}/lisp/version.el | ||
| 373 | $(MAKE_CONFIG_STATUS) | ||
| 374 | 372 | ||
| 375 | AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4 | 373 | AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4 |
| 376 | 374 | ||
| @@ -737,6 +735,7 @@ clean: FRC | |||
| 737 | -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) | 735 | -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) |
| 738 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) | 736 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) |
| 739 | (cd leim; $(MAKE) $(MFLAGS) clean) | 737 | (cd leim; $(MAKE) $(MFLAGS) clean) |
| 738 | (cd nextstep && $(MAKE) $(MFLAGS) clean) | ||
| 740 | 739 | ||
| 741 | ### `bootclean' | 740 | ### `bootclean' |
| 742 | ### Delete all files that need to be remade for a clean bootstrap. | 741 | ### Delete all files that need to be remade for a clean bootstrap. |
| @@ -763,6 +762,7 @@ distclean: FRC | |||
| 763 | (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean) | 762 | (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean) |
| 764 | (cd leim; $(MAKE) $(MFLAGS) distclean) | 763 | (cd leim; $(MAKE) $(MFLAGS) distclean) |
| 765 | (cd lisp; $(MAKE) $(MFLAGS) distclean) | 764 | (cd lisp; $(MAKE) $(MFLAGS) distclean) |
| 765 | (cd nextstep && $(MAKE) $(MFLAGS) distclean) | ||
| 766 | ${top_distclean} | 766 | ${top_distclean} |
| 767 | 767 | ||
| 768 | ### `bootstrap-clean' | 768 | ### `bootstrap-clean' |
| @@ -780,6 +780,7 @@ bootstrap-clean: FRC | |||
| 780 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) | 780 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) |
| 781 | (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) | 781 | (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) |
| 782 | (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) | 782 | (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) |
| 783 | (cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean) | ||
| 783 | [ ! -f config.log ] || mv -f config.log config.log~ | 784 | [ ! -f config.log ] || mv -f config.log config.log~ |
| 784 | ${top_bootclean} | 785 | ${top_bootclean} |
| 785 | 786 | ||
| @@ -889,12 +890,17 @@ dvi: | |||
| 889 | 890 | ||
| 890 | # Bootstrapping does the following: | 891 | # Bootstrapping does the following: |
| 891 | # * Remove files to start from a clean slate. | 892 | # * Remove files to start from a clean slate. |
| 892 | # * Run autogen.sh, but don't worry about exit status 101 (missing tools). | 893 | # * Run autogen.sh, falling back on copy_autogen if autogen.sh fails. |
| 893 | # * Build Makefile, to build the build procedure itself. | 894 | # * Build Makefile, to build the build procedure itself. |
| 894 | # * Do the actual build. | 895 | # * Do the actual build. |
| 895 | bootstrap: bootstrap-clean FRC | 896 | bootstrap: bootstrap-clean FRC |
| 896 | cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; } | 897 | cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; } |
| 897 | $(MAKE_CONFIG_STATUS) | 898 | if [ -x config.status ]; then \ |
| 899 | ./config.status --recheck && \ | ||
| 900 | ./config.status; \ | ||
| 901 | else \ | ||
| 902 | $(srcdir)/configure $(CONFIGURE_FLAGS); \ | ||
| 903 | fi | ||
| 898 | $(MAKE) $(MFLAGS) info all | 904 | $(MAKE) $(MFLAGS) info all |
| 899 | 905 | ||
| 900 | .PHONY: check-declare | 906 | .PHONY: check-declare |
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index cf6ffee2c63..661cde9c43e 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES | |||
| @@ -90,11 +90,6 @@ BROKEN_GETWD | |||
| 90 | BROKEN_GET_CURRENT_DIR_NAME | 90 | BROKEN_GET_CURRENT_DIR_NAME |
| 91 | BROKEN_NON_BLOCKING_CONNECT | 91 | BROKEN_NON_BLOCKING_CONNECT |
| 92 | BROKEN_PTY_READ_AFTER_EAGAIN | 92 | BROKEN_PTY_READ_AFTER_EAGAIN |
| 93 | BROKEN_SA_RESTART | ||
| 94 | BROKEN_SIGAIO | ||
| 95 | BROKEN_SIGIO | ||
| 96 | BROKEN_SIGPOLL | ||
| 97 | BROKEN_SIGPTY | ||
| 98 | CLASH_DETECTION | 93 | CLASH_DETECTION |
| 99 | DATA_SEG_BITS | 94 | DATA_SEG_BITS |
| 100 | DATA_START | 95 | DATA_START |
| @@ -423,7 +418,6 @@ MAIL_USE_SYSTEM_LOCK | |||
| 423 | MAXPATHLEN | 418 | MAXPATHLEN |
| 424 | NLIST_STRUCT | 419 | NLIST_STRUCT |
| 425 | NO_EDITRES | 420 | NO_EDITRES |
| 426 | NO_TERMIO | ||
| 427 | NSIG | 421 | NSIG |
| 428 | NSIG_MINIMUM | 422 | NSIG_MINIMUM |
| 429 | NULL_DEVICE | 423 | NULL_DEVICE |
| @@ -439,7 +433,6 @@ PTY_OPEN | |||
| 439 | PTY_TTY_NAME_SPRINTF | 433 | PTY_TTY_NAME_SPRINTF |
| 440 | PURESIZE | 434 | PURESIZE |
| 441 | RUN_TIME_REMAP | 435 | RUN_TIME_REMAP |
| 442 | SA_RESTART | ||
| 443 | SETPGRP_RELEASES_CTTY | 436 | SETPGRP_RELEASES_CTTY |
| 444 | SETUP_SLAVE_PTY | 437 | SETUP_SLAVE_PTY |
| 445 | SIGALRM | 438 | SIGALRM |
diff --git a/admin/ChangeLog b/admin/ChangeLog index 2c61f437981..7f30fe8fc0f 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,38 @@ | |||
| 1 | 2012-09-17 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * admin.el (add-log-time-format): Declare. | ||
| 4 | |||
| 5 | * admin.el (cusver-scan, cusver-check): Bind local variables. | ||
| 6 | |||
| 7 | * admin.el (set-version): Set major version in | ||
| 8 | etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex. | ||
| 9 | (set-copyright): In etc/refcards, only change ru-refcard.tex | ||
| 10 | and emacsver.tex. | ||
| 11 | |||
| 12 | * admin.el (set-copyright): No more need to set copyrights for | ||
| 13 | nextstep, or .c files. Add configure.ac and config.nt. | ||
| 14 | |||
| 15 | 2012-09-16 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Remove configure's --without-sync-input option (Bug#12450). | ||
| 18 | * CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove. | ||
| 19 | |||
| 20 | 2012-09-16 Glenn Morris <rgm@gnu.org> | ||
| 21 | |||
| 22 | * admin.el (set-version): No more need to set nextstep versions. | ||
| 23 | (set-copyright): Update for moved nextstep files. | ||
| 24 | |||
| 25 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 26 | |||
| 27 | Simplify SIGIO usage (Bug#12408). | ||
| 28 | * CPP_DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL) | ||
| 29 | (BROKEN_SIGPTY, NO_TERMIO): Remove. | ||
| 30 | |||
| 31 | 2012-09-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 32 | |||
| 33 | Simplify, document, and port floating-point (Bug#12381). | ||
| 34 | * CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove. | ||
| 35 | |||
| 1 | 2012-09-09 Paul Eggert <eggert@cs.ucla.edu> | 36 | 2012-09-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 37 | ||
| 3 | Assume C89 or later for math functions (Bug#12381). | 38 | Assume C89 or later for math functions (Bug#12381). |
diff --git a/admin/admin.el b/admin/admin.el index 6d729214bd0..862e5aed6c1 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (defvar add-log-time-format) ; in add-log | ||
| 30 | |||
| 29 | (defun add-release-logs (root version) | 31 | (defun add-release-logs (root version) |
| 30 | "Add \"Version VERSION released.\" change log entries in ROOT. | 32 | "Add \"Version VERSION released.\" change log entries in ROOT. |
| 31 | Root must be the root of an Emacs source tree." | 33 | Root must be the root of an Emacs source tree." |
| @@ -126,39 +128,16 @@ Root must be the root of an Emacs source tree." | |||
| 126 | (set-version-in-file root "nt/emacsclient.rc" comma-space-version | 128 | (set-version-in-file root "nt/emacsclient.rc" comma-space-version |
| 127 | (rx (and "\"ProductVersion\"" (0+ space) ?, | 129 | (rx (and "\"ProductVersion\"" (0+ space) ?, |
| 128 | (0+ space) ?\" (submatch (1+ (in "0-9, "))) | 130 | (0+ space) ?\" (submatch (1+ (in "0-9, "))) |
| 129 | "\\0\"")))) | 131 | "\\0\""))) |
| 130 | ;; nextstep. | 132 | (when (string-match "\\([0-9]\\{2,\\}\\)" version) |
| 131 | (set-version-in-file | 133 | (setq version (match-string 1 version)) |
| 132 | root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" | 134 | (set-version-in-file root "etc/refcards/ru-refcard.tex" version |
| 133 | version (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) | 135 | "\\\\newcommand{\\\\versionemacs}\\[0\\]\ |
| 134 | (submatch (1+ (in "0-9.")))))) | 136 | {\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs") |
| 135 | (set-version-in-file | 137 | (set-version-in-file root "etc/refcards/emacsver.tex" version |
| 136 | root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" | 138 | "\\\\def\\\\versionemacs\ |
| 137 | version (rx (and "CFBundleShortVersionString" (1+ not-newline) ?\n | 139 | {\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs")))) |
| 138 | (0+ not-newline) "<string>" (0+ space) | 140 | |
| 139 | (submatch (1+ (in "0-9.")))))) | ||
| 140 | (set-version-in-file | ||
| 141 | root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" | ||
| 142 | version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) | ||
| 143 | ?\" (0+ space) "Version" (1+ space) | ||
| 144 | (submatch (1+ (in "0-9.")))))) | ||
| 145 | (set-version-in-file | ||
| 146 | root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" | ||
| 147 | version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) | ||
| 148 | ?\" (0+ space) "Emacs version" (1+ space) | ||
| 149 | (submatch (1+ (in "0-9.")))))) | ||
| 150 | (set-version-in-file | ||
| 151 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | ||
| 152 | version (rx (and "ApplicationRelease" (0+ space) ?= (0+ space) | ||
| 153 | ?\" (0+ space) (submatch (1+ (in "0-9.")))))) | ||
| 154 | (set-version-in-file | ||
| 155 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | ||
| 156 | version (rx (and "FullVersionID" (0+ space) ?= (0+ space) | ||
| 157 | ?\" (0+ space) "Emacs" (1+ space) | ||
| 158 | (submatch (1+ (in "0-9.")))))) | ||
| 159 | (set-version-in-file | ||
| 160 | root "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop" | ||
| 161 | version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) | ||
| 162 | 141 | ||
| 163 | ;; Note this makes some assumptions about form of short copyright. | 142 | ;; Note this makes some assumptions about form of short copyright. |
| 164 | (defun set-copyright (root copyright) | 143 | (defun set-copyright (root copyright) |
| @@ -172,45 +151,24 @@ Root must be the root of an Emacs source tree." | |||
| 172 | (format-time-string "%Y"))))) | 151 | (format-time-string "%Y"))))) |
| 173 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 152 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
| 174 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) | 153 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) |
| 175 | (set-version-in-file root "src/emacs.c" copyright | 154 | (set-version-in-file root "configure.ac" copyright |
| 176 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | 155 | (rx (and bol "copyright" (0+ (not (in ?\"))) |
| 177 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | ||
| 178 | (set-version-in-file root "lib-src/ebrowse.c" copyright | ||
| 179 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | ||
| 180 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | ||
| 181 | (set-version-in-file root "lib-src/etags.c" copyright | ||
| 182 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | ||
| 183 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 156 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 157 | (set-version-in-file root "nt/config.nt" copyright | ||
| 158 | (rx (and bol "#" (0+ blank) "define" (1+ blank) | ||
| 159 | "COPYRIGHT" (1+ blank) | ||
| 160 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | ||
| 184 | (set-version-in-file root "lib-src/rcs2log" copyright | 161 | (set-version-in-file root "lib-src/rcs2log" copyright |
| 185 | (rx (and "Copyright" (0+ space) ?= (0+ space) | 162 | (rx (and "Copyright" (0+ space) ?= (0+ space) |
| 186 | ?\' (submatch (1+ nonl))))) | 163 | ?\' (submatch (1+ nonl))))) |
| 187 | ;; This one is a nuisance, as it needs to be split over two lines. | ||
| 188 | (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) | ||
| 189 | ;; nextstep. | ||
| 190 | (set-version-in-file | ||
| 191 | root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" | ||
| 192 | copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) | ||
| 193 | (1+ (in "0-9.")) (1+ space) | ||
| 194 | (submatch (1+ (not (in ?\<))))))) | ||
| 195 | (set-version-in-file | ||
| 196 | root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" | ||
| 197 | copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space) | ||
| 198 | ?\" (submatch (1+ (not (in ?\"))))))) | ||
| 199 | (set-version-in-file | ||
| 200 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | ||
| 201 | copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) | ||
| 202 | ?\" (submatch (1+ (not (in ?\"))))))) | ||
| 203 | (when (string-match "\\([0-9]\\{4\\}\\)" copyright) | 164 | (when (string-match "\\([0-9]\\{4\\}\\)" copyright) |
| 204 | (setq copyright (match-string 1 copyright)) | 165 | (setq copyright (match-string 1 copyright)) |
| 205 | (dolist (file (directory-files (expand-file-name "etc/refcards" root) | 166 | (set-version-in-file root "etc/refcards/ru-refcard.tex" copyright |
| 206 | t "\\.tex\\'")) | 167 | "\\\\newcommand{\\\\cyear}\\[0\\]\ |
| 207 | (unless (string-match "gnus-refcard\\.tex" file) | 168 | {\\([0-9]\\{4\\}\\)}.+%.+copyright year") |
| 208 | (set-version-in-file | 169 | (set-version-in-file root "etc/refcards/emacsver.tex" copyright |
| 209 | root file copyright | 170 | "\\\\def\\\\year\ |
| 210 | (concat (if (string-match "ru-refcard\\.tex" file) | 171 | {\\([0-9]\\{4\\}\\)}.+%.+copyright year"))) |
| 211 | "\\\\newcommand{\\\\cyear}\\[0\\]{" | ||
| 212 | "\\\\def\\\\year{") | ||
| 213 | "\\([0-9]\\{4\\}\\)}.+%.+copyright year")))))) | ||
| 214 | 172 | ||
| 215 | ;;; Various bits of magic for generating the web manuals | 173 | ;;; Various bits of magic for generating the web manuals |
| 216 | 174 | ||
| @@ -459,7 +417,7 @@ Also generate PostScript output in PS-DEST." | |||
| 459 | (setq done t)) | 417 | (setq done t)) |
| 460 | (t | 418 | (t |
| 461 | (if (eobp) | 419 | (if (eobp) |
| 462 | (error "Parse error in %s" f)) | 420 | (error "Parse error in %s" f)) ; f is bound in manual-html-node |
| 463 | (unless open-td | 421 | (unless open-td |
| 464 | (setq done t)))) | 422 | (setq done t)))) |
| 465 | (forward-line 1)))) | 423 | (forward-line 1)))) |
| @@ -491,7 +449,7 @@ If optional argument OLD is non-nil, also scan for defvars." | |||
| 491 | (let ((m (format "Scanning %s..." file)) | 449 | (let ((m (format "Scanning %s..." file)) |
| 492 | (re (format "^[ \t]*\\((def%s\\)[ \t\n]" | 450 | (re (format "^[ \t]*\\((def%s\\)[ \t\n]" |
| 493 | (if old "\\(?:custom\\|var\\)" "custom"))) | 451 | (if old "\\(?:custom\\|var\\)" "custom"))) |
| 494 | alist var ver) | 452 | alist var ver form) |
| 495 | (message "%s" m) | 453 | (message "%s" m) |
| 496 | (with-temp-buffer | 454 | (with-temp-buffer |
| 497 | (insert-file-contents file) | 455 | (insert-file-contents file) |
| @@ -550,7 +508,7 @@ changes (in a non-trivial way). This function does not check for that." | |||
| 550 | (mapcar | 508 | (mapcar |
| 551 | (lambda (file) | 509 | (lambda (file) |
| 552 | (cons file (cusver-scan file))) newfiles))) | 510 | (cons file (cusver-scan file))) newfiles))) |
| 553 | oldcus result thisfile) | 511 | oldcus result thisfile file) |
| 554 | (message "Reading old defcustoms...") | 512 | (message "Reading old defcustoms...") |
| 555 | (dolist (file oldfiles) | 513 | (dolist (file oldfiles) |
| 556 | (setq oldcus (append oldcus (cusver-scan file t)))) | 514 | (setq oldcus (append oldcus (cusver-scan file t)))) |
diff --git a/autogen.sh b/autogen.sh index dc8d53eec97..9cfaa40eee5 100755 --- a/autogen.sh +++ b/autogen.sh | |||
| @@ -201,7 +201,7 @@ This is not recommended - see the comments in \`copy_autogen'. | |||
| 201 | Please report any problems with this script to bug-gnu-emacs@gnu.org . | 201 | Please report any problems with this script to bug-gnu-emacs@gnu.org . |
| 202 | EOF | 202 | EOF |
| 203 | 203 | ||
| 204 | exit 101 # Exit status 101 means tools were missing. | 204 | exit 1 |
| 205 | fi | 205 | fi |
| 206 | 206 | ||
| 207 | echo "Your system has the required tools, running autoreconf..." | 207 | echo "Your system has the required tools, running autoreconf..." |
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index dbedb5d12e5..103a2e94ef3 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -787,6 +787,7 @@ builddir = @builddir@ | |||
| 787 | cache_file = @cache_file@ | 787 | cache_file = @cache_file@ |
| 788 | canonical = @canonical@ | 788 | canonical = @canonical@ |
| 789 | configuration = @configuration@ | 789 | configuration = @configuration@ |
| 790 | copyright = @copyright@ | ||
| 790 | datadir = @datadir@ | 791 | datadir = @datadir@ |
| 791 | datarootdir = @datarootdir@ | 792 | datarootdir = @datarootdir@ |
| 792 | docdir = @docdir@ | 793 | docdir = @docdir@ |
diff --git a/autogen/config.in b/autogen/config.in index 99074bd1bc5..2f2555c75c9 100644 --- a/autogen/config.in +++ b/autogen/config.in | |||
| @@ -50,9 +50,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 50 | /* Define to the number of bits in type 'wint_t'. */ | 50 | /* Define to the number of bits in type 'wint_t'. */ |
| 51 | #undef BITSIZEOF_WINT_T | 51 | #undef BITSIZEOF_WINT_T |
| 52 | 52 | ||
| 53 | /* Define if FIONREAD should not be used. */ | ||
| 54 | #undef BROKEN_FIONREAD | ||
| 55 | |||
| 56 | /* Define if getwd should not be used. */ | 53 | /* Define if getwd should not be used. */ |
| 57 | #undef BROKEN_GETWD | 54 | #undef BROKEN_GETWD |
| 58 | 55 | ||
| @@ -62,21 +59,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 62 | /* Define on FreeBSD to work around an issue when reading from a PTY. */ | 59 | /* Define on FreeBSD to work around an issue when reading from a PTY. */ |
| 63 | #undef BROKEN_PTY_READ_AFTER_EAGAIN | 60 | #undef BROKEN_PTY_READ_AFTER_EAGAIN |
| 64 | 61 | ||
| 65 | /* Define if SA_RESTART should only be used in batch mode. */ | ||
| 66 | #undef BROKEN_SA_RESTART | ||
| 67 | |||
| 68 | /* Define if SIGAIO should not be used. */ | ||
| 69 | #undef BROKEN_SIGAIO | ||
| 70 | |||
| 71 | /* Define if SIGIO should not be used. */ | ||
| 72 | #undef BROKEN_SIGIO | ||
| 73 | |||
| 74 | /* Define if SIGPOLL should not be used. */ | ||
| 75 | #undef BROKEN_SIGPOLL | ||
| 76 | |||
| 77 | /* Define if SIGPTY should not be used. */ | ||
| 78 | #undef BROKEN_SIGPTY | ||
| 79 | |||
| 80 | /* Define if the system is compatible with BSD 4.2. */ | 62 | /* Define if the system is compatible with BSD 4.2. */ |
| 81 | #undef BSD4_2 | 63 | #undef BSD4_2 |
| 82 | 64 | ||
| @@ -97,6 +79,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 97 | his/her Emacs. */ | 79 | his/her Emacs. */ |
| 98 | #undef CLASH_DETECTION | 80 | #undef CLASH_DETECTION |
| 99 | 81 | ||
| 82 | /* Short copyright string for this version of Emacs. */ | ||
| 83 | #undef COPYRIGHT | ||
| 84 | |||
| 100 | /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP | 85 | /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP |
| 101 | systems. This function is required for 'alloca.c' support on those systems. | 86 | systems. This function is required for 'alloca.c' support on those systems. |
| 102 | */ | 87 | */ |
| @@ -806,6 +791,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 806 | /* Define to 1 if 'wint_t' is a signed integer type. */ | 791 | /* Define to 1 if 'wint_t' is a signed integer type. */ |
| 807 | #undef HAVE_SIGNED_WINT_T | 792 | #undef HAVE_SIGNED_WINT_T |
| 808 | 793 | ||
| 794 | /* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is | ||
| 795 | irrelevant if HAVE__SETJMP is defined. */ | ||
| 796 | #undef HAVE_SIGSETJMP | ||
| 797 | |||
| 809 | /* Define to 1 if the system has the type `sigset_t'. */ | 798 | /* Define to 1 if the system has the type `sigset_t'. */ |
| 810 | #undef HAVE_SIGSET_T | 799 | #undef HAVE_SIGSET_T |
| 811 | 800 | ||
| @@ -1089,6 +1078,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1089 | /* Define to 1 if you have the `_ftime' function. */ | 1078 | /* Define to 1 if you have the `_ftime' function. */ |
| 1090 | #undef HAVE__FTIME | 1079 | #undef HAVE__FTIME |
| 1091 | 1080 | ||
| 1081 | /* Define to 1 if _setjmp and _longjmp work. */ | ||
| 1082 | #undef HAVE__SETJMP | ||
| 1083 | |||
| 1092 | /* Define to 1 if you have the `__builtin_unwind_init' function. */ | 1084 | /* Define to 1 if you have the `__builtin_unwind_init' function. */ |
| 1093 | #undef HAVE___BUILTIN_UNWIND_INIT | 1085 | #undef HAVE___BUILTIN_UNWIND_INIT |
| 1094 | 1086 | ||
| @@ -1166,9 +1158,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1166 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ | 1158 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ |
| 1167 | #undef NO_MINUS_C_MINUS_O | 1159 | #undef NO_MINUS_C_MINUS_O |
| 1168 | 1160 | ||
| 1169 | /* Define if termio.h should not be included. */ | ||
| 1170 | #undef NO_TERMIO | ||
| 1171 | |||
| 1172 | /* Minimum value of NSIG. */ | 1161 | /* Minimum value of NSIG. */ |
| 1173 | #undef NSIG_MINIMUM | 1162 | #undef NSIG_MINIMUM |
| 1174 | 1163 | ||
| @@ -1306,9 +1295,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1306 | /* Define to 1 on System V Release 4. */ | 1295 | /* Define to 1 on System V Release 4. */ |
| 1307 | #undef SVR4 | 1296 | #undef SVR4 |
| 1308 | 1297 | ||
| 1309 | /* Process async input synchronously. */ | ||
| 1310 | #undef SYNC_INPUT | ||
| 1311 | |||
| 1312 | /* Define to use system malloc. */ | 1298 | /* Define to use system malloc. */ |
| 1313 | #undef SYSTEM_MALLOC | 1299 | #undef SYSTEM_MALLOC |
| 1314 | 1300 | ||
| @@ -1353,6 +1339,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1353 | /* Define if the system has Unix98 PTYs. */ | 1339 | /* Define if the system has Unix98 PTYs. */ |
| 1354 | #undef UNIX98_PTYS | 1340 | #undef UNIX98_PTYS |
| 1355 | 1341 | ||
| 1342 | /* Define to 1 if FIONREAD is usable. */ | ||
| 1343 | #undef USABLE_FIONREAD | ||
| 1344 | |||
| 1345 | /* Define to 1 if SIGIO is usable. */ | ||
| 1346 | #undef USABLE_SIGIO | ||
| 1347 | |||
| 1356 | /* How to get a user's full name. */ | 1348 | /* How to get a user's full name. */ |
| 1357 | #undef USER_FULL_NAME | 1349 | #undef USER_FULL_NAME |
| 1358 | 1350 | ||
| @@ -1514,14 +1506,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1514 | declarations. Define as empty for no equivalent. */ | 1506 | declarations. Define as empty for no equivalent. */ |
| 1515 | #undef __restrict_arr | 1507 | #undef __restrict_arr |
| 1516 | 1508 | ||
| 1517 | /* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may | ||
| 1518 | alter signal masks, callers of _longjmp should not assume that it leaves | ||
| 1519 | signal masks alone. */ | ||
| 1520 | #undef _longjmp | ||
| 1521 | |||
| 1522 | /* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ | ||
| 1523 | #undef _setjmp | ||
| 1524 | |||
| 1525 | /* Some platforms that do not use configure define this to include extra | 1509 | /* Some platforms that do not use configure define this to include extra |
| 1526 | configuration information. */ | 1510 | configuration information. */ |
| 1527 | #undef config_opsysfile | 1511 | #undef config_opsysfile |
diff --git a/autogen/configure b/autogen/configure index 3621eee77c6..4c6fa8b5cf7 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -1143,6 +1143,7 @@ srcdir | |||
| 1143 | canonical | 1143 | canonical |
| 1144 | configuration | 1144 | configuration |
| 1145 | version | 1145 | version |
| 1146 | copyright | ||
| 1146 | KRB4LIB | 1147 | KRB4LIB |
| 1147 | DESLIB | 1148 | DESLIB |
| 1148 | KRB5LIB | 1149 | KRB5LIB |
| @@ -1330,8 +1331,7 @@ PACKAGE_NAME | |||
| 1330 | PATH_SEPARATOR | 1331 | PATH_SEPARATOR |
| 1331 | SHELL' | 1332 | SHELL' |
| 1332 | ac_subst_files='deps_frag | 1333 | ac_subst_files='deps_frag |
| 1333 | lisp_frag | 1334 | lisp_frag' |
| 1334 | ns_frag' | ||
| 1335 | ac_user_opts=' | 1335 | ac_user_opts=' |
| 1336 | enable_option_checking | 1336 | enable_option_checking |
| 1337 | with_all | 1337 | with_all |
| @@ -1343,7 +1343,6 @@ with_mmdf | |||
| 1343 | with_mail_unlink | 1343 | with_mail_unlink |
| 1344 | with_mailhost | 1344 | with_mailhost |
| 1345 | with_sound | 1345 | with_sound |
| 1346 | with_sync_input | ||
| 1347 | with_x_toolkit | 1346 | with_x_toolkit |
| 1348 | with_wide_int | 1347 | with_wide_int |
| 1349 | with_xpm | 1348 | with_xpm |
| @@ -2061,9 +2060,8 @@ Optional Packages: | |||
| 2061 | --with-mailhost=HOSTNAME | 2060 | --with-mailhost=HOSTNAME |
| 2062 | string giving default POP mail host | 2061 | string giving default POP mail host |
| 2063 | --without-sound don't compile with sound support | 2062 | --without-sound don't compile with sound support |
| 2064 | --without-sync-input process async input synchronously | 2063 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, |
| 2065 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, | 2064 | gtk3, lucid or athena, motif, no) |
| 2066 | lucid or athena, motif, no) | ||
| 2067 | --with-wide-int prefer wide Emacs integers (typically 62-bit) | 2065 | --with-wide-int prefer wide Emacs integers (typically 62-bit) |
| 2068 | --without-xpm don't compile with XPM image support | 2066 | --without-xpm don't compile with XPM image support |
| 2069 | --without-jpeg don't compile with JPEG image support | 2067 | --without-jpeg don't compile with JPEG image support |
| @@ -3933,20 +3931,6 @@ fi | |||
| 3933 | 3931 | ||
| 3934 | 3932 | ||
| 3935 | 3933 | ||
| 3936 | # Check whether --with-sync-input was given. | ||
| 3937 | if test "${with_sync_input+set}" = set; then : | ||
| 3938 | withval=$with_sync_input; | ||
| 3939 | else | ||
| 3940 | with_sync_input=$with_features | ||
| 3941 | fi | ||
| 3942 | |||
| 3943 | if test "$with_sync_input" = yes; then | ||
| 3944 | |||
| 3945 | $as_echo "#define SYNC_INPUT 1" >>confdefs.h | ||
| 3946 | |||
| 3947 | fi | ||
| 3948 | |||
| 3949 | |||
| 3950 | # Check whether --with-x-toolkit was given. | 3934 | # Check whether --with-x-toolkit was given. |
| 3951 | if test "${with_x_toolkit+set}" = set; then : | 3935 | if test "${with_x_toolkit+set}" = set; then : |
| 3952 | withval=$with_x_toolkit; case "${withval}" in | 3936 | withval=$with_x_toolkit; case "${withval}" in |
| @@ -3956,11 +3940,13 @@ if test "${with_x_toolkit+set}" = set; then : | |||
| 3956 | a | at | ath | athe | athen | athena ) val=athena ;; | 3940 | a | at | ath | athe | athen | athena ) val=athena ;; |
| 3957 | m | mo | mot | moti | motif ) val=motif ;; | 3941 | m | mo | mot | moti | motif ) val=motif ;; |
| 3958 | g | gt | gtk ) val=gtk ;; | 3942 | g | gt | gtk ) val=gtk ;; |
| 3943 | gtk2 ) val=gtk2 ;; | ||
| 3959 | gtk3 ) val=gtk3 ;; | 3944 | gtk3 ) val=gtk3 ;; |
| 3960 | * ) | 3945 | * ) |
| 3961 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; | 3946 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
| 3962 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or | 3947 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk', |
| 3963 | \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 | 3948 | \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms. |
| 3949 | \`athena' and \`lucid' are synonyms." "$LINENO" 5 | ||
| 3964 | ;; | 3950 | ;; |
| 3965 | esac | 3951 | esac |
| 3966 | with_x_toolkit=$val | 3952 | with_x_toolkit=$val |
| @@ -8576,8 +8562,9 @@ $as_echo "no" >&6; } | |||
| 8576 | ALSA_CFLAGS="" | 8562 | ALSA_CFLAGS="" |
| 8577 | ALSA_LIBS="" | 8563 | ALSA_LIBS="" |
| 8578 | ## If we have a custom action on failure, don't print errors, but | 8564 | ## If we have a custom action on failure, don't print errors, but |
| 8579 | ## do set a variable so people can do so. | 8565 | ## do set a variable so people can do so. Do it in a subshell |
| 8580 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | 8566 | ## to capture any diagnostics in invoking pkg-config. |
| 8567 | ALSA_PKG_ERRORS=`($PKG_CONFIG --print-errors "$ALSA_MODULES") 2>&1` | ||
| 8581 | 8568 | ||
| 8582 | fi | 8569 | fi |
| 8583 | 8570 | ||
| @@ -9411,13 +9398,13 @@ if test "${with_ns}" != no; then | |||
| 9411 | ns_appdir=`pwd`/nextstep/Emacs.app | 9398 | ns_appdir=`pwd`/nextstep/Emacs.app |
| 9412 | ns_appbindir=${ns_appdir}/Contents/MacOS | 9399 | ns_appbindir=${ns_appdir}/Contents/MacOS |
| 9413 | ns_appresdir=${ns_appdir}/Contents/Resources | 9400 | ns_appresdir=${ns_appdir}/Contents/Resources |
| 9414 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | 9401 | ns_appsrc=Cocoa/Emacs.base |
| 9415 | elif test -f $GNUSTEP_CONFIG_FILE; then | 9402 | elif test -f $GNUSTEP_CONFIG_FILE; then |
| 9416 | NS_IMPL_GNUSTEP=yes | 9403 | NS_IMPL_GNUSTEP=yes |
| 9417 | ns_appdir=`pwd`/nextstep/Emacs.app | 9404 | ns_appdir=`pwd`/nextstep/Emacs.app |
| 9418 | ns_appbindir=${ns_appdir} | 9405 | ns_appbindir=${ns_appdir} |
| 9419 | ns_appresdir=${ns_appdir}/Resources | 9406 | ns_appresdir=${ns_appdir}/Resources |
| 9420 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | 9407 | ns_appsrc=GNUstep/Emacs.base |
| 9421 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | 9408 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" |
| 9422 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | 9409 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" |
| 9423 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | 9410 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" |
| @@ -9507,7 +9494,6 @@ fi | |||
| 9507 | 9494 | ||
| 9508 | INSTALL_ARCH_INDEP_EXTRA=install-etc | 9495 | INSTALL_ARCH_INDEP_EXTRA=install-etc |
| 9509 | ns_self_contained=no | 9496 | ns_self_contained=no |
| 9510 | ns_frag=/dev/null | ||
| 9511 | NS_OBJ= | 9497 | NS_OBJ= |
| 9512 | NS_OBJC_OBJ= | 9498 | NS_OBJC_OBJ= |
| 9513 | if test "${HAVE_NS}" = yes; then | 9499 | if test "${HAVE_NS}" = yes; then |
| @@ -9531,7 +9517,6 @@ if test "${HAVE_NS}" = yes; then | |||
| 9531 | leimdir="\${ns_appresdir}/leim" | 9517 | leimdir="\${ns_appresdir}/leim" |
| 9532 | INSTALL_ARCH_INDEP_EXTRA= | 9518 | INSTALL_ARCH_INDEP_EXTRA= |
| 9533 | fi | 9519 | fi |
| 9534 | ns_frag=$srcdir/src/ns.mk | ||
| 9535 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | 9520 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
| 9536 | fi | 9521 | fi |
| 9537 | CFLAGS="$tmp_CFLAGS" | 9522 | CFLAGS="$tmp_CFLAGS" |
| @@ -9542,7 +9527,6 @@ CPPFLAGS="$tmp_CPPFLAGS" | |||
| 9542 | 9527 | ||
| 9543 | 9528 | ||
| 9544 | 9529 | ||
| 9545 | |||
| 9546 | ## $window_system is now set to the window system we will | 9530 | ## $window_system is now set to the window system we will |
| 9547 | ## ultimately use. | 9531 | ## ultimately use. |
| 9548 | 9532 | ||
| @@ -9562,6 +9546,9 @@ case "${window_system}" in | |||
| 9562 | gtk ) with_gtk=yes | 9546 | gtk ) with_gtk=yes |
| 9563 | term_header=gtkutil.h | 9547 | term_header=gtkutil.h |
| 9564 | USE_X_TOOLKIT=none ;; | 9548 | USE_X_TOOLKIT=none ;; |
| 9549 | gtk2 ) with_gtk2=yes | ||
| 9550 | term_header=gtkutil.h | ||
| 9551 | USE_X_TOOLKIT=none ;; | ||
| 9565 | gtk3 ) with_gtk3=yes | 9552 | gtk3 ) with_gtk3=yes |
| 9566 | term_header=gtkutil.h | 9553 | term_header=gtkutil.h |
| 9567 | USE_X_TOOLKIT=none ;; | 9554 | USE_X_TOOLKIT=none ;; |
| @@ -10393,8 +10380,9 @@ $as_echo "no" >&6; } | |||
| 10393 | RSVG_CFLAGS="" | 10380 | RSVG_CFLAGS="" |
| 10394 | RSVG_LIBS="" | 10381 | RSVG_LIBS="" |
| 10395 | ## If we have a custom action on failure, don't print errors, but | 10382 | ## If we have a custom action on failure, don't print errors, but |
| 10396 | ## do set a variable so people can do so. | 10383 | ## do set a variable so people can do so. Do it in a subshell |
| 10397 | RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` | 10384 | ## to capture any diagnostics in invoking pkg-config. |
| 10385 | RSVG_PKG_ERRORS=`($PKG_CONFIG --print-errors "$RSVG_MODULE") 2>&1` | ||
| 10398 | 10386 | ||
| 10399 | fi | 10387 | fi |
| 10400 | 10388 | ||
| @@ -10463,8 +10451,9 @@ $as_echo "no" >&6; } | |||
| 10463 | IMAGEMAGICK_CFLAGS="" | 10451 | IMAGEMAGICK_CFLAGS="" |
| 10464 | IMAGEMAGICK_LIBS="" | 10452 | IMAGEMAGICK_LIBS="" |
| 10465 | ## If we have a custom action on failure, don't print errors, but | 10453 | ## If we have a custom action on failure, don't print errors, but |
| 10466 | ## do set a variable so people can do so. | 10454 | ## do set a variable so people can do so. Do it in a subshell |
| 10467 | IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` | 10455 | ## to capture any diagnostics in invoking pkg-config. |
| 10456 | IMAGEMAGICK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$IMAGEMAGICK_MODULE") 2>&1` | ||
| 10468 | 10457 | ||
| 10469 | fi | 10458 | fi |
| 10470 | 10459 | ||
| @@ -10511,7 +10500,9 @@ fi | |||
| 10511 | 10500 | ||
| 10512 | HAVE_GTK=no | 10501 | HAVE_GTK=no |
| 10513 | GTK_OBJ= | 10502 | GTK_OBJ= |
| 10514 | if test "${with_gtk3}" = "yes"; then | 10503 | check_gtk2=no |
| 10504 | gtk3_pkg_errors= | ||
| 10505 | if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | ||
| 10515 | GLIB_REQUIRED=2.28 | 10506 | GLIB_REQUIRED=2.28 |
| 10516 | GTK_REQUIRED=3.0 | 10507 | GTK_REQUIRED=3.0 |
| 10517 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | 10508 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
| @@ -10547,8 +10538,9 @@ $as_echo "no" >&6; } | |||
| 10547 | GTK_CFLAGS="" | 10538 | GTK_CFLAGS="" |
| 10548 | GTK_LIBS="" | 10539 | GTK_LIBS="" |
| 10549 | ## If we have a custom action on failure, don't print errors, but | 10540 | ## If we have a custom action on failure, don't print errors, but |
| 10550 | ## do set a variable so people can do so. | 10541 | ## do set a variable so people can do so. Do it in a subshell |
| 10551 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | 10542 | ## to capture any diagnostics in invoking pkg-config. |
| 10543 | GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1` | ||
| 10552 | 10544 | ||
| 10553 | fi | 10545 | fi |
| 10554 | 10546 | ||
| @@ -10566,19 +10558,22 @@ $as_echo "no" >&6; } | |||
| 10566 | pkg_check_gtk=no | 10558 | pkg_check_gtk=no |
| 10567 | fi | 10559 | fi |
| 10568 | 10560 | ||
| 10569 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | 10561 | if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then |
| 10570 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 | 10562 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
| 10571 | fi | 10563 | fi |
| 10564 | if test "$pkg_check_gtk" = "yes"; then | ||
| 10572 | 10565 | ||
| 10573 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h | 10566 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h |
| 10574 | 10567 | ||
| 10575 | GTK_OBJ=emacsgtkfixed.o | 10568 | GTK_OBJ=emacsgtkfixed.o |
| 10576 | term_header=gtkutil.h | 10569 | term_header=gtkutil.h |
| 10570 | else | ||
| 10571 | check_gtk2=yes | ||
| 10572 | gtk3_pkg_errors="$GTK_PKG_ERRORS " | ||
| 10573 | fi | ||
| 10577 | fi | 10574 | fi |
| 10578 | 10575 | ||
| 10579 | if test "$pkg_check_gtk" != "yes"; then | 10576 | if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then |
| 10580 | HAVE_GTK=no | ||
| 10581 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | ||
| 10582 | GLIB_REQUIRED=2.10 | 10577 | GLIB_REQUIRED=2.10 |
| 10583 | GTK_REQUIRED=2.10 | 10578 | GTK_REQUIRED=2.10 |
| 10584 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | 10579 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
| @@ -10614,8 +10609,9 @@ $as_echo "no" >&6; } | |||
| 10614 | GTK_CFLAGS="" | 10609 | GTK_CFLAGS="" |
| 10615 | GTK_LIBS="" | 10610 | GTK_LIBS="" |
| 10616 | ## If we have a custom action on failure, don't print errors, but | 10611 | ## If we have a custom action on failure, don't print errors, but |
| 10617 | ## do set a variable so people can do so. | 10612 | ## do set a variable so people can do so. Do it in a subshell |
| 10618 | GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` | 10613 | ## to capture any diagnostics in invoking pkg-config. |
| 10614 | GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1` | ||
| 10619 | 10615 | ||
| 10620 | fi | 10616 | fi |
| 10621 | 10617 | ||
| @@ -10633,11 +10629,12 @@ $as_echo "no" >&6; } | |||
| 10633 | pkg_check_gtk=no | 10629 | pkg_check_gtk=no |
| 10634 | fi | 10630 | fi |
| 10635 | 10631 | ||
| 10636 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | 10632 | if test "$pkg_check_gtk" = "no" && |
| 10637 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 | 10633 | { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } |
| 10634 | then | ||
| 10635 | as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 | ||
| 10638 | fi | 10636 | fi |
| 10639 | fi | 10637 | fi |
| 10640 | fi | ||
| 10641 | 10638 | ||
| 10642 | if test x"$pkg_check_gtk" = xyes; then | 10639 | if test x"$pkg_check_gtk" = xyes; then |
| 10643 | 10640 | ||
| @@ -10774,8 +10771,9 @@ $as_echo "no" >&6; } | |||
| 10774 | DBUS_CFLAGS="" | 10771 | DBUS_CFLAGS="" |
| 10775 | DBUS_LIBS="" | 10772 | DBUS_LIBS="" |
| 10776 | ## If we have a custom action on failure, don't print errors, but | 10773 | ## If we have a custom action on failure, don't print errors, but |
| 10777 | ## do set a variable so people can do so. | 10774 | ## do set a variable so people can do so. Do it in a subshell |
| 10778 | DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` | 10775 | ## to capture any diagnostics in invoking pkg-config. |
| 10776 | DBUS_PKG_ERRORS=`($PKG_CONFIG --print-errors "dbus-1 >= 1.0") 2>&1` | ||
| 10779 | 10777 | ||
| 10780 | fi | 10778 | fi |
| 10781 | 10779 | ||
| @@ -10854,8 +10852,9 @@ $as_echo "no" >&6; } | |||
| 10854 | GSETTINGS_CFLAGS="" | 10852 | GSETTINGS_CFLAGS="" |
| 10855 | GSETTINGS_LIBS="" | 10853 | GSETTINGS_LIBS="" |
| 10856 | ## If we have a custom action on failure, don't print errors, but | 10854 | ## If we have a custom action on failure, don't print errors, but |
| 10857 | ## do set a variable so people can do so. | 10855 | ## do set a variable so people can do so. Do it in a subshell |
| 10858 | GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` | 10856 | ## to capture any diagnostics in invoking pkg-config. |
| 10857 | GSETTINGS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gio-2.0 >= 2.26") 2>&1` | ||
| 10859 | 10858 | ||
| 10860 | fi | 10859 | fi |
| 10861 | 10860 | ||
| @@ -10915,8 +10914,9 @@ $as_echo "no" >&6; } | |||
| 10915 | GCONF_CFLAGS="" | 10914 | GCONF_CFLAGS="" |
| 10916 | GCONF_LIBS="" | 10915 | GCONF_LIBS="" |
| 10917 | ## If we have a custom action on failure, don't print errors, but | 10916 | ## If we have a custom action on failure, don't print errors, but |
| 10918 | ## do set a variable so people can do so. | 10917 | ## do set a variable so people can do so. Do it in a subshell |
| 10919 | GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` | 10918 | ## to capture any diagnostics in invoking pkg-config. |
| 10919 | GCONF_PKG_ERRORS=`($PKG_CONFIG --print-errors "gconf-2.0 >= 2.13") 2>&1` | ||
| 10920 | 10920 | ||
| 10921 | fi | 10921 | fi |
| 10922 | 10922 | ||
| @@ -10975,8 +10975,9 @@ $as_echo "no" >&6; } | |||
| 10975 | GOBJECT_CFLAGS="" | 10975 | GOBJECT_CFLAGS="" |
| 10976 | GOBJECT_LIBS="" | 10976 | GOBJECT_LIBS="" |
| 10977 | ## If we have a custom action on failure, don't print errors, but | 10977 | ## If we have a custom action on failure, don't print errors, but |
| 10978 | ## do set a variable so people can do so. | 10978 | ## do set a variable so people can do so. Do it in a subshell |
| 10979 | GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"` | 10979 | ## to capture any diagnostics in invoking pkg-config. |
| 10980 | GOBJECT_PKG_ERRORS=`($PKG_CONFIG --print-errors "gobject-2.0 >= 2.0") 2>&1` | ||
| 10980 | 10981 | ||
| 10981 | fi | 10982 | fi |
| 10982 | 10983 | ||
| @@ -11108,8 +11109,9 @@ $as_echo "no" >&6; } | |||
| 11108 | LIBGNUTLS_CFLAGS="" | 11109 | LIBGNUTLS_CFLAGS="" |
| 11109 | LIBGNUTLS_LIBS="" | 11110 | LIBGNUTLS_LIBS="" |
| 11110 | ## If we have a custom action on failure, don't print errors, but | 11111 | ## If we have a custom action on failure, don't print errors, but |
| 11111 | ## do set a variable so people can do so. | 11112 | ## do set a variable so people can do so. Do it in a subshell |
| 11112 | LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"` | 11113 | ## to capture any diagnostics in invoking pkg-config. |
| 11114 | LIBGNUTLS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gnutls >= 2.6.6") 2>&1` | ||
| 11113 | 11115 | ||
| 11114 | fi | 11116 | fi |
| 11115 | 11117 | ||
| @@ -11161,8 +11163,6 @@ HAVE_XAW3D=no | |||
| 11161 | LUCID_LIBW= | 11163 | LUCID_LIBW= |
| 11162 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | 11164 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then |
| 11163 | if test "$with_xaw3d" != no; then | 11165 | if test "$with_xaw3d" != no; then |
| 11164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | ||
| 11165 | $as_echo_n "checking for xaw3d... " >&6; } | ||
| 11166 | if test "${emacs_cv_xaw3d+set}" = set; then : | 11166 | if test "${emacs_cv_xaw3d+set}" = set; then : |
| 11167 | $as_echo_n "(cached) " >&6 | 11167 | $as_echo_n "(cached) " >&6 |
| 11168 | else | 11168 | else |
| @@ -11233,6 +11233,8 @@ fi | |||
| 11233 | emacs_cv_xaw3d=no | 11233 | emacs_cv_xaw3d=no |
| 11234 | fi | 11234 | fi |
| 11235 | if test $emacs_cv_xaw3d = yes; then | 11235 | if test $emacs_cv_xaw3d = yes; then |
| 11236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | ||
| 11237 | $as_echo_n "checking for xaw3d... " >&6; } | ||
| 11236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | 11238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 |
| 11237 | $as_echo "yes; using Lucid toolkit" >&6; } | 11239 | $as_echo "yes; using Lucid toolkit" >&6; } |
| 11238 | USE_X_TOOLKIT=LUCID | 11240 | USE_X_TOOLKIT=LUCID |
| @@ -11242,6 +11244,8 @@ $as_echo "yes; using Lucid toolkit" >&6; } | |||
| 11242 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h | 11244 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h |
| 11243 | 11245 | ||
| 11244 | else | 11246 | else |
| 11247 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 | ||
| 11248 | $as_echo_n "checking for xaw3d... " >&6; } | ||
| 11245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 11249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11246 | $as_echo "no" >&6; } | 11250 | $as_echo "no" >&6; } |
| 11247 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | 11251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 |
| @@ -11735,8 +11739,9 @@ $as_echo "no" >&6; } | |||
| 11735 | FONTCONFIG_CFLAGS="" | 11739 | FONTCONFIG_CFLAGS="" |
| 11736 | FONTCONFIG_LIBS="" | 11740 | FONTCONFIG_LIBS="" |
| 11737 | ## If we have a custom action on failure, don't print errors, but | 11741 | ## If we have a custom action on failure, don't print errors, but |
| 11738 | ## do set a variable so people can do so. | 11742 | ## do set a variable so people can do so. Do it in a subshell |
| 11739 | FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` | 11743 | ## to capture any diagnostics in invoking pkg-config. |
| 11744 | FONTCONFIG_PKG_ERRORS=`($PKG_CONFIG --print-errors "fontconfig >= 2.2.0") 2>&1` | ||
| 11740 | 11745 | ||
| 11741 | fi | 11746 | fi |
| 11742 | 11747 | ||
| @@ -11793,8 +11798,9 @@ $as_echo "no" >&6; } | |||
| 11793 | XFT_CFLAGS="" | 11798 | XFT_CFLAGS="" |
| 11794 | XFT_LIBS="" | 11799 | XFT_LIBS="" |
| 11795 | ## If we have a custom action on failure, don't print errors, but | 11800 | ## If we have a custom action on failure, don't print errors, but |
| 11796 | ## do set a variable so people can do so. | 11801 | ## do set a variable so people can do so. Do it in a subshell |
| 11797 | XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` | 11802 | ## to capture any diagnostics in invoking pkg-config. |
| 11803 | XFT_PKG_ERRORS=`($PKG_CONFIG --print-errors "xft >= 0.13.0") 2>&1` | ||
| 11798 | 11804 | ||
| 11799 | fi | 11805 | fi |
| 11800 | 11806 | ||
| @@ -11960,8 +11966,9 @@ $as_echo "no" >&6; } | |||
| 11960 | FREETYPE_CFLAGS="" | 11966 | FREETYPE_CFLAGS="" |
| 11961 | FREETYPE_LIBS="" | 11967 | FREETYPE_LIBS="" |
| 11962 | ## If we have a custom action on failure, don't print errors, but | 11968 | ## If we have a custom action on failure, don't print errors, but |
| 11963 | ## do set a variable so people can do so. | 11969 | ## do set a variable so people can do so. Do it in a subshell |
| 11964 | FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` | 11970 | ## to capture any diagnostics in invoking pkg-config. |
| 11971 | FREETYPE_PKG_ERRORS=`($PKG_CONFIG --print-errors "freetype2") 2>&1` | ||
| 11965 | 11972 | ||
| 11966 | fi | 11973 | fi |
| 11967 | 11974 | ||
| @@ -12020,8 +12027,9 @@ $as_echo "no" >&6; } | |||
| 12020 | LIBOTF_CFLAGS="" | 12027 | LIBOTF_CFLAGS="" |
| 12021 | LIBOTF_LIBS="" | 12028 | LIBOTF_LIBS="" |
| 12022 | ## If we have a custom action on failure, don't print errors, but | 12029 | ## If we have a custom action on failure, don't print errors, but |
| 12023 | ## do set a variable so people can do so. | 12030 | ## do set a variable so people can do so. Do it in a subshell |
| 12024 | LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` | 12031 | ## to capture any diagnostics in invoking pkg-config. |
| 12032 | LIBOTF_PKG_ERRORS=`($PKG_CONFIG --print-errors "libotf") 2>&1` | ||
| 12025 | 12033 | ||
| 12026 | fi | 12034 | fi |
| 12027 | 12035 | ||
| @@ -12128,8 +12136,9 @@ $as_echo "no" >&6; } | |||
| 12128 | M17N_FLT_CFLAGS="" | 12136 | M17N_FLT_CFLAGS="" |
| 12129 | M17N_FLT_LIBS="" | 12137 | M17N_FLT_LIBS="" |
| 12130 | ## If we have a custom action on failure, don't print errors, but | 12138 | ## If we have a custom action on failure, don't print errors, but |
| 12131 | ## do set a variable so people can do so. | 12139 | ## do set a variable so people can do so. Do it in a subshell |
| 12132 | M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` | 12140 | ## to capture any diagnostics in invoking pkg-config. |
| 12141 | M17N_FLT_PKG_ERRORS=`($PKG_CONFIG --print-errors "m17n-flt") 2>&1` | ||
| 12133 | 12142 | ||
| 12134 | fi | 12143 | fi |
| 12135 | 12144 | ||
| @@ -12817,8 +12826,9 @@ $as_echo "no" >&6; } | |||
| 12817 | LIBXML2_CFLAGS="" | 12826 | LIBXML2_CFLAGS="" |
| 12818 | LIBXML2_LIBS="" | 12827 | LIBXML2_LIBS="" |
| 12819 | ## If we have a custom action on failure, don't print errors, but | 12828 | ## If we have a custom action on failure, don't print errors, but |
| 12820 | ## do set a variable so people can do so. | 12829 | ## do set a variable so people can do so. Do it in a subshell |
| 12821 | LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` | 12830 | ## to capture any diagnostics in invoking pkg-config. |
| 12831 | LIBXML2_PKG_ERRORS=`($PKG_CONFIG --print-errors "libxml-2.0 > 2.6.17") 2>&1` | ||
| 12822 | 12832 | ||
| 12823 | fi | 12833 | fi |
| 12824 | 12834 | ||
| @@ -12926,8 +12936,8 @@ $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h | |||
| 12926 | 12936 | ||
| 12927 | fi | 12937 | fi |
| 12928 | 12938 | ||
| 12929 | # fmod, logb, and frexp are found in -lm on most systems. | 12939 | # sqrt and other floating-point functions such as fmod and frexp |
| 12930 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | 12940 | # are found in -lm on most systems. |
| 12931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | 12941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 |
| 12932 | $as_echo_n "checking for sqrt in -lm... " >&6; } | 12942 | $as_echo_n "checking for sqrt in -lm... " >&6; } |
| 12933 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : | 12943 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : |
| @@ -13177,7 +13187,7 @@ esac | |||
| 13177 | 13187 | ||
| 13178 | for ac_func in gethostname \ | 13188 | for ac_func in gethostname \ |
| 13179 | closedir getrusage get_current_dir_name \ | 13189 | closedir getrusage get_current_dir_name \ |
| 13180 | lrand48 logb cbrt setsid \ | 13190 | lrand48 setsid \ |
| 13181 | fpathconf select euidaccess getpagesize setlocale \ | 13191 | fpathconf select euidaccess getpagesize setlocale \ |
| 13182 | utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ | 13192 | utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ |
| 13183 | __fpending strsignal setitimer \ | 13193 | __fpending strsignal setitimer \ |
| @@ -14479,6 +14489,11 @@ else | |||
| 14479 | $as_echo "no" >&6; } | 14489 | $as_echo "no" >&6; } |
| 14480 | fi | 14490 | fi |
| 14481 | 14491 | ||
| 14492 | case $canonical in | ||
| 14493 | *-solaris2.4 | *-solaris2.4.*) | ||
| 14494 | : ${ac_cv_func_vfork_works=no};; | ||
| 14495 | esac | ||
| 14496 | |||
| 14482 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | 14497 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
| 14483 | if test "x$ac_cv_type_pid_t" = x""yes; then : | 14498 | if test "x$ac_cv_type_pid_t" = x""yes; then : |
| 14484 | 14499 | ||
| @@ -14891,12 +14906,6 @@ esac | |||
| 14891 | 14906 | ||
| 14892 | 14907 | ||
| 14893 | case $opsys in | 14908 | case $opsys in |
| 14894 | darwin | gnu | hpux* | *bsd ) | ||
| 14895 | |||
| 14896 | $as_echo "#define NO_TERMIO 1" >>confdefs.h | ||
| 14897 | |||
| 14898 | ;; | ||
| 14899 | |||
| 14900 | irix6-5 | sol2* | unixware ) | 14909 | irix6-5 | sol2* | unixware ) |
| 14901 | 14910 | ||
| 14902 | $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h | 14911 | $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h |
| @@ -14904,29 +14913,15 @@ $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h | |||
| 14904 | ;; | 14913 | ;; |
| 14905 | esac | 14914 | esac |
| 14906 | 14915 | ||
| 14916 | emacs_broken_SIGIO=no | ||
| 14907 | 14917 | ||
| 14908 | case $opsys in | 14918 | case $opsys in |
| 14909 | hpux* | irix6-5 | openbsd | sol2* | unixware ) | 14919 | hpux* | irix6-5 | openbsd | sol2* | unixware ) |
| 14910 | 14920 | emacs_broken_SIGIO=yes | |
| 14911 | $as_echo "#define BROKEN_SIGIO 1" >>confdefs.h | ||
| 14912 | |||
| 14913 | ;; | 14921 | ;; |
| 14914 | 14922 | ||
| 14915 | aix4-2) | 14923 | aix4-2) |
| 14916 | 14924 | ||
| 14917 | $as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h | ||
| 14918 | |||
| 14919 | |||
| 14920 | $as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h | ||
| 14921 | |||
| 14922 | |||
| 14923 | $as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h | ||
| 14924 | |||
| 14925 | |||
| 14926 | $as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h | ||
| 14927 | |||
| 14928 | |||
| 14929 | |||
| 14930 | $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h | 14925 | $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h |
| 14931 | 14926 | ||
| 14932 | ;; | 14927 | ;; |
| @@ -15468,13 +15463,45 @@ rm -f core conftest.err conftest.$ac_objext \ | |||
| 15468 | fi | 15463 | fi |
| 15469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 | 15464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 |
| 15470 | $as_echo "$emacs_cv_func__setjmp" >&6; } | 15465 | $as_echo "$emacs_cv_func__setjmp" >&6; } |
| 15471 | if test $emacs_cv_func__setjmp = no; then | 15466 | if test $emacs_cv_func__setjmp = yes; then |
| 15467 | |||
| 15468 | $as_echo "#define HAVE__SETJMP 1" >>confdefs.h | ||
| 15472 | 15469 | ||
| 15473 | $as_echo "#define _setjmp setjmp" >>confdefs.h | 15470 | else |
| 15471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | ||
| 15472 | $as_echo_n "checking for sigsetjmp... " >&6; } | ||
| 15473 | if test "${emacs_cv_func_sigsetjmp+set}" = set; then : | ||
| 15474 | $as_echo_n "(cached) " >&6 | ||
| 15475 | else | ||
| 15476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15477 | /* end confdefs.h. */ | ||
| 15478 | #include <setjmp.h> | ||
| 15474 | 15479 | ||
| 15480 | int | ||
| 15481 | main () | ||
| 15482 | { | ||
| 15483 | sigjmp_buf j; | ||
| 15484 | if (! sigsetjmp (j, 1)) | ||
| 15485 | siglongjmp (j, 1); | ||
| 15486 | ; | ||
| 15487 | return 0; | ||
| 15488 | } | ||
| 15489 | _ACEOF | ||
| 15490 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 15491 | emacs_cv_func_sigsetjmp=yes | ||
| 15492 | else | ||
| 15493 | emacs_cv_func_sigsetjmp=no | ||
| 15494 | fi | ||
| 15495 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 15496 | conftest$ac_exeext conftest.$ac_ext | ||
| 15497 | fi | ||
| 15498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5 | ||
| 15499 | $as_echo "$emacs_cv_func_sigsetjmp" >&6; } | ||
| 15500 | if test $emacs_cv_func_sigsetjmp = yes; then | ||
| 15475 | 15501 | ||
| 15476 | $as_echo "#define _longjmp longjmp" >>confdefs.h | 15502 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
| 15477 | 15503 | ||
| 15504 | fi | ||
| 15478 | fi | 15505 | fi |
| 15479 | 15506 | ||
| 15480 | case $opsys in | 15507 | case $opsys in |
| @@ -15637,6 +15664,85 @@ $as_echo "#define SOLARIS2 /**/" >>confdefs.h | |||
| 15637 | ;; | 15664 | ;; |
| 15638 | esac | 15665 | esac |
| 15639 | 15666 | ||
| 15667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5 | ||
| 15668 | $as_echo_n "checking for usable FIONREAD... " >&6; } | ||
| 15669 | if test "${emacs_cv_usable_FIONREAD+set}" = set; then : | ||
| 15670 | $as_echo_n "(cached) " >&6 | ||
| 15671 | else | ||
| 15672 | case $opsys in | ||
| 15673 | aix4-2) | ||
| 15674 | emacs_cv_usable_FIONREAD=no | ||
| 15675 | ;; | ||
| 15676 | |||
| 15677 | *) | ||
| 15678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15679 | /* end confdefs.h. */ | ||
| 15680 | #include <sys/types.h> | ||
| 15681 | #include <sys/ioctl.h> | ||
| 15682 | #ifdef USG5_4 | ||
| 15683 | # include <sys/filio.h> | ||
| 15684 | #endif | ||
| 15685 | |||
| 15686 | int | ||
| 15687 | main () | ||
| 15688 | { | ||
| 15689 | int foo = ioctl (0, FIONREAD, &foo); | ||
| 15690 | ; | ||
| 15691 | return 0; | ||
| 15692 | } | ||
| 15693 | _ACEOF | ||
| 15694 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 15695 | emacs_cv_usable_FIONREAD=yes | ||
| 15696 | else | ||
| 15697 | emacs_cv_usable_FIONREAD=no | ||
| 15698 | fi | ||
| 15699 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 15700 | ;; | ||
| 15701 | esac | ||
| 15702 | fi | ||
| 15703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5 | ||
| 15704 | $as_echo "$emacs_cv_usable_FIONREAD" >&6; } | ||
| 15705 | if test $emacs_cv_usable_FIONREAD = yes; then | ||
| 15706 | |||
| 15707 | $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h | ||
| 15708 | |||
| 15709 | |||
| 15710 | if test $emacs_broken_SIGIO = no; then | ||
| 15711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5 | ||
| 15712 | $as_echo_n "checking for usable SIGIO... " >&6; } | ||
| 15713 | if test "${emacs_cv_usable_SIGIO+set}" = set; then : | ||
| 15714 | $as_echo_n "(cached) " >&6 | ||
| 15715 | else | ||
| 15716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15717 | /* end confdefs.h. */ | ||
| 15718 | #include <fcntl.h> | ||
| 15719 | #include <signal.h> | ||
| 15720 | |||
| 15721 | int | ||
| 15722 | main () | ||
| 15723 | { | ||
| 15724 | int foo = SIGIO | F_SETFL | FASYNC; | ||
| 15725 | ; | ||
| 15726 | return 0; | ||
| 15727 | } | ||
| 15728 | _ACEOF | ||
| 15729 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 15730 | emacs_cv_usable_SIGIO=yes | ||
| 15731 | else | ||
| 15732 | emacs_cv_usable_SIGIO=no | ||
| 15733 | fi | ||
| 15734 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 15735 | fi | ||
| 15736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5 | ||
| 15737 | $as_echo "$emacs_cv_usable_SIGIO" >&6; } | ||
| 15738 | if test $emacs_cv_usable_SIGIO = yes; then | ||
| 15739 | |||
| 15740 | $as_echo "#define USABLE_SIGIO 1" >>confdefs.h | ||
| 15741 | |||
| 15742 | fi | ||
| 15743 | fi | ||
| 15744 | fi | ||
| 15745 | |||
| 15640 | 15746 | ||
| 15641 | case $opsys in | 15747 | case $opsys in |
| 15642 | cygwin) | 15748 | cygwin) |
| @@ -15647,9 +15753,6 @@ $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h | |||
| 15647 | 15753 | ||
| 15648 | hpux11) | 15754 | hpux11) |
| 15649 | 15755 | ||
| 15650 | $as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h | ||
| 15651 | |||
| 15652 | |||
| 15653 | $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h | 15756 | $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h |
| 15654 | 15757 | ||
| 15655 | ;; | 15758 | ;; |
| @@ -15684,6 +15787,14 @@ fi | |||
| 15684 | 15787 | ||
| 15685 | version=$PACKAGE_VERSION | 15788 | version=$PACKAGE_VERSION |
| 15686 | 15789 | ||
| 15790 | copyright="Copyright (C) 2012 Free Software Foundation, Inc." | ||
| 15791 | |||
| 15792 | cat >>confdefs.h <<_ACEOF | ||
| 15793 | #define COPYRIGHT "$copyright" | ||
| 15794 | _ACEOF | ||
| 15795 | |||
| 15796 | |||
| 15797 | |||
| 15687 | ### Specify what sort of things we'll be editing into Makefile and config.h. | 15798 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
| 15688 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | 15799 | ### Use configuration here uncanonicalized to avoid exceeding size limits. |
| 15689 | 15800 | ||
| @@ -24182,11 +24293,7 @@ fi | |||
| 24182 | #### It makes printing result more understandable as using GTK sets | 24293 | #### It makes printing result more understandable as using GTK sets |
| 24183 | #### toolkit_scroll_bars to yes by default. | 24294 | #### toolkit_scroll_bars to yes by default. |
| 24184 | if test "${HAVE_GTK}" = "yes"; then | 24295 | if test "${HAVE_GTK}" = "yes"; then |
| 24185 | if test "${with_gtk3}" = "yes"; then | 24296 | USE_X_TOOLKIT=GTK |
| 24186 | USE_X_TOOLKIT=GTK3 | ||
| 24187 | else | ||
| 24188 | USE_X_TOOLKIT=GTK | ||
| 24189 | fi | ||
| 24190 | fi | 24297 | fi |
| 24191 | 24298 | ||
| 24192 | echo " | 24299 | echo " |
| @@ -24275,9 +24382,19 @@ test "${prefix}" != NONE && | |||
| 24275 | test "${exec_prefix}" != NONE && | 24382 | test "${exec_prefix}" != NONE && |
| 24276 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | 24383 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` |
| 24277 | 24384 | ||
| 24278 | SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" | 24385 | if test "$HAVE_NS" = "yes"; then |
| 24386 | if test "$NS_IMPL_GNUSTEP" = yes; then | ||
| 24387 | ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" | ||
| 24388 | |||
| 24389 | else | ||
| 24390 | ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" | ||
| 24391 | |||
| 24392 | fi | ||
| 24393 | fi | ||
| 24394 | |||
| 24395 | SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile" | ||
| 24279 | 24396 | ||
| 24280 | ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" | 24397 | ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile" |
| 24281 | 24398 | ||
| 24282 | 24399 | ||
| 24283 | opt_makefile=test/automated/Makefile | 24400 | opt_makefile=test/automated/Makefile |
| @@ -25117,6 +25234,10 @@ do | |||
| 25117 | case $ac_config_target in | 25234 | case $ac_config_target in |
| 25118 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | 25235 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; |
| 25119 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | 25236 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
| 25237 | "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in" ;; | ||
| 25238 | "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;; | ||
| 25239 | "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;; | ||
| 25240 | "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" ;; | ||
| 25120 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | 25241 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
| 25121 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; | 25242 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
| 25122 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; | 25243 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
| @@ -25129,6 +25250,7 @@ do | |||
| 25129 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | 25250 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; |
| 25130 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | 25251 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; |
| 25131 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | 25252 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; |
| 25253 | "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;; | ||
| 25132 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; | 25254 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; |
| 25133 | "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; | 25255 | "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; |
| 25134 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; | 25256 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; |
diff --git a/autogen/copy_autogen b/autogen/copy_autogen index b6af9b6eb35..8aacd4d399a 100755 --- a/autogen/copy_autogen +++ b/autogen/copy_autogen | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | ## regenerate configure and will fail if you do not have the required | 8 | ## regenerate configure and will fail if you do not have the required |
| 9 | ## tools. You will have to run this script again. | 9 | ## tools. You will have to run this script again. |
| 10 | 10 | ||
| 11 | test -d autogen && cd autogen | 11 | test ! -d autogen || cd autogen || exit |
| 12 | 12 | ||
| 13 | if test ! -e config.in; then | 13 | if test ! -e config.in; then |
| 14 | echo "Cannot find autogen/ directory." | 14 | echo "Cannot find autogen/ directory." |
| @@ -16,11 +16,12 @@ if test ! -e config.in; then | |||
| 16 | fi | 16 | fi |
| 17 | 17 | ||
| 18 | ## Order implied by top-level Makefile's rules, for time-stamps. | 18 | ## Order implied by top-level Makefile's rules, for time-stamps. |
| 19 | cp compile config.guess config.sub depcomp install-sh missing ../build-aux | 19 | cp -f compile config.guess config.sub depcomp install-sh missing \ |
| 20 | cp aclocal.m4 ../ | 20 | ../build-aux && |
| 21 | cp configure ../ | 21 | cp aclocal.m4 ../ && |
| 22 | touch ../src/stamp-h.in | 22 | cp configure ../ && |
| 23 | cp config.in ../src/ | 23 | touch ../src/stamp-h.in && |
| 24 | cp Makefile.in ../lib/ | 24 | cp config.in ../src/ && |
| 25 | cp Makefile.in ../lib/ && | ||
| 25 | 26 | ||
| 26 | echo "You can now run configure" | 27 | echo "You can now run configure" |
diff --git a/configure.ac b/configure.ac index ad47a381133..0b4aece4daf 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -128,17 +128,12 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME], | |||
| 128 | 128 | ||
| 129 | OPTION_DEFAULT_ON([sound],[don't compile with sound support]) | 129 | OPTION_DEFAULT_ON([sound],[don't compile with sound support]) |
| 130 | 130 | ||
| 131 | OPTION_DEFAULT_ON([sync-input],[process async input synchronously]) | ||
| 132 | if test "$with_sync_input" = yes; then | ||
| 133 | AC_DEFINE(SYNC_INPUT, 1, [Process async input synchronously.]) | ||
| 134 | fi | ||
| 135 | |||
| 136 | dnl FIXME currently it is not the last. | 131 | dnl FIXME currently it is not the last. |
| 137 | dnl This should be the last --with option, because --with-x is | 132 | dnl This should be the last --with option, because --with-x is |
| 138 | dnl added later on when we find the path of X, and it's best to | 133 | dnl added later on when we find the path of X, and it's best to |
| 139 | dnl keep them together visually. | 134 | dnl keep them together visually. |
| 140 | AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], | 135 | AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], |
| 141 | [use an X toolkit (KIT one of: yes or gtk, gtk3, lucid or athena, motif, no)])], | 136 | [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])], |
| 142 | [ case "${withval}" in | 137 | [ case "${withval}" in |
| 143 | y | ye | yes ) val=gtk ;; | 138 | y | ye | yes ) val=gtk ;; |
| 144 | n | no ) val=no ;; | 139 | n | no ) val=no ;; |
| @@ -146,11 +141,13 @@ AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], | |||
| 146 | a | at | ath | athe | athen | athena ) val=athena ;; | 141 | a | at | ath | athe | athen | athena ) val=athena ;; |
| 147 | m | mo | mot | moti | motif ) val=motif ;; | 142 | m | mo | mot | moti | motif ) val=motif ;; |
| 148 | g | gt | gtk ) val=gtk ;; | 143 | g | gt | gtk ) val=gtk ;; |
| 144 | gtk2 ) val=gtk2 ;; | ||
| 149 | gtk3 ) val=gtk3 ;; | 145 | gtk3 ) val=gtk3 ;; |
| 150 | * ) | 146 | * ) |
| 151 | AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; | 147 | AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; |
| 152 | this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk' or | 148 | this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk', |
| 153 | `gtk3'. `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.]) | 149 | `gtk2' or `gtk3'. `yes' and `gtk' are synonyms. |
| 150 | `athena' and `lucid' are synonyms.]) | ||
| 154 | ;; | 151 | ;; |
| 155 | esac | 152 | esac |
| 156 | with_x_toolkit=$val | 153 | with_x_toolkit=$val |
| @@ -1189,9 +1186,10 @@ AC_DEFUN([PKG_CHECK_MODULES], [ | |||
| 1189 | $1_CFLAGS="" | 1186 | $1_CFLAGS="" |
| 1190 | $1_LIBS="" | 1187 | $1_LIBS="" |
| 1191 | ## If we have a custom action on failure, don't print errors, but | 1188 | ## If we have a custom action on failure, don't print errors, but |
| 1192 | ## do set a variable so people can do so. | 1189 | ## do set a variable so people can do so. Do it in a subshell |
| 1193 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | 1190 | ## to capture any diagnostics in invoking pkg-config. |
| 1194 | ifelse([$4], ,echo $$1_PKG_ERRORS,) | 1191 | $1_PKG_ERRORS=`($PKG_CONFIG --print-errors "$2") 2>&1` |
| 1192 | ifelse([$4], ,echo "$$1_PKG_ERRORS",) | ||
| 1195 | fi | 1193 | fi |
| 1196 | 1194 | ||
| 1197 | AC_SUBST($1_CFLAGS) | 1195 | AC_SUBST($1_CFLAGS) |
| @@ -1460,13 +1458,13 @@ if test "${with_ns}" != no; then | |||
| 1460 | ns_appdir=`pwd`/nextstep/Emacs.app | 1458 | ns_appdir=`pwd`/nextstep/Emacs.app |
| 1461 | ns_appbindir=${ns_appdir}/Contents/MacOS | 1459 | ns_appbindir=${ns_appdir}/Contents/MacOS |
| 1462 | ns_appresdir=${ns_appdir}/Contents/Resources | 1460 | ns_appresdir=${ns_appdir}/Contents/Resources |
| 1463 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | 1461 | ns_appsrc=Cocoa/Emacs.base |
| 1464 | elif test -f $GNUSTEP_CONFIG_FILE; then | 1462 | elif test -f $GNUSTEP_CONFIG_FILE; then |
| 1465 | NS_IMPL_GNUSTEP=yes | 1463 | NS_IMPL_GNUSTEP=yes |
| 1466 | ns_appdir=`pwd`/nextstep/Emacs.app | 1464 | ns_appdir=`pwd`/nextstep/Emacs.app |
| 1467 | ns_appbindir=${ns_appdir} | 1465 | ns_appbindir=${ns_appdir} |
| 1468 | ns_appresdir=${ns_appdir}/Resources | 1466 | ns_appresdir=${ns_appdir}/Resources |
| 1469 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | 1467 | ns_appsrc=GNUstep/Emacs.base |
| 1470 | dnl FIXME sourcing this several times in subshells seems inefficient. | 1468 | dnl FIXME sourcing this several times in subshells seems inefficient. |
| 1471 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | 1469 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" |
| 1472 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | 1470 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" |
| @@ -1520,7 +1518,6 @@ AC_SUBST(TEMACS_LDFLAGS2) | |||
| 1520 | 1518 | ||
| 1521 | INSTALL_ARCH_INDEP_EXTRA=install-etc | 1519 | INSTALL_ARCH_INDEP_EXTRA=install-etc |
| 1522 | ns_self_contained=no | 1520 | ns_self_contained=no |
| 1523 | ns_frag=/dev/null | ||
| 1524 | NS_OBJ= | 1521 | NS_OBJ= |
| 1525 | NS_OBJC_OBJ= | 1522 | NS_OBJC_OBJ= |
| 1526 | if test "${HAVE_NS}" = yes; then | 1523 | if test "${HAVE_NS}" = yes; then |
| @@ -1547,7 +1544,6 @@ if test "${HAVE_NS}" = yes; then | |||
| 1547 | leimdir="\${ns_appresdir}/leim" | 1544 | leimdir="\${ns_appresdir}/leim" |
| 1548 | INSTALL_ARCH_INDEP_EXTRA= | 1545 | INSTALL_ARCH_INDEP_EXTRA= |
| 1549 | fi | 1546 | fi |
| 1550 | ns_frag=$srcdir/src/ns.mk | ||
| 1551 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | 1547 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
| 1552 | fi | 1548 | fi |
| 1553 | CFLAGS="$tmp_CFLAGS" | 1549 | CFLAGS="$tmp_CFLAGS" |
| @@ -1557,7 +1553,6 @@ AC_SUBST(ns_self_contained) | |||
| 1557 | AC_SUBST(NS_OBJ) | 1553 | AC_SUBST(NS_OBJ) |
| 1558 | AC_SUBST(NS_OBJC_OBJ) | 1554 | AC_SUBST(NS_OBJC_OBJ) |
| 1559 | AC_SUBST(LIB_STANDARD) | 1555 | AC_SUBST(LIB_STANDARD) |
| 1560 | AC_SUBST_FILE(ns_frag) | ||
| 1561 | 1556 | ||
| 1562 | ## $window_system is now set to the window system we will | 1557 | ## $window_system is now set to the window system we will |
| 1563 | ## ultimately use. | 1558 | ## ultimately use. |
| @@ -1580,6 +1575,9 @@ case "${window_system}" in | |||
| 1580 | dnl Don't set this for GTK. A lot of tests below assumes Xt when | 1575 | dnl Don't set this for GTK. A lot of tests below assumes Xt when |
| 1581 | dnl USE_X_TOOLKIT is set. | 1576 | dnl USE_X_TOOLKIT is set. |
| 1582 | USE_X_TOOLKIT=none ;; | 1577 | USE_X_TOOLKIT=none ;; |
| 1578 | gtk2 ) with_gtk2=yes | ||
| 1579 | term_header=gtkutil.h | ||
| 1580 | USE_X_TOOLKIT=none ;; | ||
| 1583 | gtk3 ) with_gtk3=yes | 1581 | gtk3 ) with_gtk3=yes |
| 1584 | term_header=gtkutil.h | 1582 | term_header=gtkutil.h |
| 1585 | USE_X_TOOLKIT=none ;; | 1583 | USE_X_TOOLKIT=none ;; |
| @@ -1902,35 +1900,41 @@ fi | |||
| 1902 | 1900 | ||
| 1903 | HAVE_GTK=no | 1901 | HAVE_GTK=no |
| 1904 | GTK_OBJ= | 1902 | GTK_OBJ= |
| 1905 | if test "${with_gtk3}" = "yes"; then | 1903 | check_gtk2=no |
| 1904 | gtk3_pkg_errors= | ||
| 1905 | if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | ||
| 1906 | GLIB_REQUIRED=2.28 | 1906 | GLIB_REQUIRED=2.28 |
| 1907 | GTK_REQUIRED=3.0 | 1907 | GTK_REQUIRED=3.0 |
| 1908 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | 1908 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
| 1909 | 1909 | ||
| 1910 | dnl Checks for libraries. | 1910 | dnl Checks for libraries. |
| 1911 | PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) | 1911 | PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) |
| 1912 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | 1912 | if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then |
| 1913 | AC_MSG_ERROR($GTK_PKG_ERRORS) | 1913 | AC_MSG_ERROR($GTK_PKG_ERRORS) |
| 1914 | fi | 1914 | fi |
| 1915 | AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) | 1915 | if test "$pkg_check_gtk" = "yes"; then |
| 1916 | GTK_OBJ=emacsgtkfixed.o | 1916 | AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) |
| 1917 | term_header=gtkutil.h | 1917 | GTK_OBJ=emacsgtkfixed.o |
| 1918 | term_header=gtkutil.h | ||
| 1919 | else | ||
| 1920 | check_gtk2=yes | ||
| 1921 | gtk3_pkg_errors="$GTK_PKG_ERRORS " | ||
| 1922 | fi | ||
| 1918 | fi | 1923 | fi |
| 1919 | 1924 | ||
| 1920 | if test "$pkg_check_gtk" != "yes"; then | 1925 | if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then |
| 1921 | HAVE_GTK=no | ||
| 1922 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | ||
| 1923 | GLIB_REQUIRED=2.10 | 1926 | GLIB_REQUIRED=2.10 |
| 1924 | GTK_REQUIRED=2.10 | 1927 | GTK_REQUIRED=2.10 |
| 1925 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | 1928 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
| 1926 | 1929 | ||
| 1927 | dnl Checks for libraries. | 1930 | dnl Checks for libraries. |
| 1928 | PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) | 1931 | PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) |
| 1929 | if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | 1932 | if test "$pkg_check_gtk" = "no" && |
| 1930 | AC_MSG_ERROR($GTK_PKG_ERRORS) | 1933 | { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } |
| 1934 | then | ||
| 1935 | AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS) | ||
| 1931 | fi | 1936 | fi |
| 1932 | fi | 1937 | fi |
| 1933 | fi | ||
| 1934 | 1938 | ||
| 1935 | if test x"$pkg_check_gtk" = xyes; then | 1939 | if test x"$pkg_check_gtk" = xyes; then |
| 1936 | 1940 | ||
| @@ -2159,7 +2163,6 @@ HAVE_XAW3D=no | |||
| 2159 | LUCID_LIBW= | 2163 | LUCID_LIBW= |
| 2160 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | 2164 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then |
| 2161 | if test "$with_xaw3d" != no; then | 2165 | if test "$with_xaw3d" != no; then |
| 2162 | AC_MSG_CHECKING(for xaw3d) | ||
| 2163 | AC_CACHE_VAL(emacs_cv_xaw3d, | 2166 | AC_CACHE_VAL(emacs_cv_xaw3d, |
| 2164 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | 2167 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
| 2165 | #include <X11/Intrinsic.h> | 2168 | #include <X11/Intrinsic.h> |
| @@ -2172,6 +2175,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |||
| 2172 | emacs_cv_xaw3d=no | 2175 | emacs_cv_xaw3d=no |
| 2173 | fi | 2176 | fi |
| 2174 | if test $emacs_cv_xaw3d = yes; then | 2177 | if test $emacs_cv_xaw3d = yes; then |
| 2178 | AC_MSG_CHECKING(for xaw3d) | ||
| 2175 | AC_MSG_RESULT([yes; using Lucid toolkit]) | 2179 | AC_MSG_RESULT([yes; using Lucid toolkit]) |
| 2176 | USE_X_TOOLKIT=LUCID | 2180 | USE_X_TOOLKIT=LUCID |
| 2177 | HAVE_XAW3D=yes | 2181 | HAVE_XAW3D=yes |
| @@ -2179,6 +2183,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |||
| 2179 | AC_DEFINE(HAVE_XAW3D, 1, | 2183 | AC_DEFINE(HAVE_XAW3D, 1, |
| 2180 | [Define to 1 if you have the Xaw3d library (-lXaw3d).]) | 2184 | [Define to 1 if you have the Xaw3d library (-lXaw3d).]) |
| 2181 | else | 2185 | else |
| 2186 | AC_MSG_CHECKING(for xaw3d) | ||
| 2182 | AC_MSG_RESULT(no) | 2187 | AC_MSG_RESULT(no) |
| 2183 | AC_MSG_CHECKING(for libXaw) | 2188 | AC_MSG_CHECKING(for libXaw) |
| 2184 | AC_CACHE_VAL(emacs_cv_xaw, | 2189 | AC_CACHE_VAL(emacs_cv_xaw, |
| @@ -2750,8 +2755,8 @@ if test $emacs_cv_netdb_declares_h_errno = yes; then | |||
| 2750 | AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) | 2755 | AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) |
| 2751 | fi | 2756 | fi |
| 2752 | 2757 | ||
| 2753 | # fmod, logb, and frexp are found in -lm on most systems. | 2758 | # sqrt and other floating-point functions such as fmod and frexp |
| 2754 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | 2759 | # are found in -lm on most systems. |
| 2755 | AC_CHECK_LIB(m, sqrt) | 2760 | AC_CHECK_LIB(m, sqrt) |
| 2756 | 2761 | ||
| 2757 | # Check for mail-locking functions in a "mail" library. Probably this should | 2762 | # Check for mail-locking functions in a "mail" library. Probably this should |
| @@ -2831,7 +2836,7 @@ AC_SUBST(BLESSMAIL_TARGET) | |||
| 2831 | 2836 | ||
| 2832 | AC_CHECK_FUNCS(gethostname \ | 2837 | AC_CHECK_FUNCS(gethostname \ |
| 2833 | closedir getrusage get_current_dir_name \ | 2838 | closedir getrusage get_current_dir_name \ |
| 2834 | lrand48 logb cbrt setsid \ | 2839 | lrand48 setsid \ |
| 2835 | fpathconf select euidaccess getpagesize setlocale \ | 2840 | fpathconf select euidaccess getpagesize setlocale \ |
| 2836 | utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ | 2841 | utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ |
| 2837 | __fpending strsignal setitimer \ | 2842 | __fpending strsignal setitimer \ |
| @@ -3211,6 +3216,14 @@ else | |||
| 3211 | AC_MSG_RESULT(no) | 3216 | AC_MSG_RESULT(no) |
| 3212 | fi | 3217 | fi |
| 3213 | 3218 | ||
| 3219 | dnl Check for a Solaris 2.4 vfork bug that Autoconf misses (through 2.69). | ||
| 3220 | dnl This can be removed once we assume Autoconf 2.70. | ||
| 3221 | case $canonical in | ||
| 3222 | *-solaris2.4 | *-solaris2.4.*) | ||
| 3223 | dnl Disable the Autoconf-generated vfork test. | ||
| 3224 | : ${ac_cv_func_vfork_works=no};; | ||
| 3225 | esac | ||
| 3226 | |||
| 3214 | AC_FUNC_FORK | 3227 | AC_FUNC_FORK |
| 3215 | 3228 | ||
| 3216 | AC_CHECK_FUNCS(snprintf) | 3229 | AC_CHECK_FUNCS(snprintf) |
| @@ -3321,10 +3334,6 @@ esac | |||
| 3321 | 3334 | ||
| 3322 | 3335 | ||
| 3323 | case $opsys in | 3336 | case $opsys in |
| 3324 | darwin | gnu | hpux* | *bsd ) | ||
| 3325 | AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.]) | ||
| 3326 | ;; | ||
| 3327 | |||
| 3328 | irix6-5 | sol2* | unixware ) | 3337 | irix6-5 | sol2* | unixware ) |
| 3329 | dnl Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; | 3338 | dnl Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; |
| 3330 | dnl instead, there's a system variable _sys_nsig. Unfortunately, we | 3339 | dnl instead, there's a system variable _sys_nsig. Unfortunately, we |
| @@ -3334,26 +3343,16 @@ case $opsys in | |||
| 3334 | ;; | 3343 | ;; |
| 3335 | esac | 3344 | esac |
| 3336 | 3345 | ||
| 3346 | emacs_broken_SIGIO=no | ||
| 3337 | 3347 | ||
| 3338 | case $opsys in | 3348 | case $opsys in |
| 3339 | dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. | 3349 | dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. |
| 3340 | dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>. | 3350 | dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>. |
| 3341 | hpux* | irix6-5 | openbsd | sol2* | unixware ) | 3351 | hpux* | irix6-5 | openbsd | sol2* | unixware ) |
| 3342 | AC_DEFINE(BROKEN_SIGIO, 1, [Define if SIGIO should not be used.]) | 3352 | emacs_broken_SIGIO=yes |
| 3343 | ;; | 3353 | ;; |
| 3344 | 3354 | ||
| 3345 | aix4-2) | 3355 | aix4-2) |
| 3346 | dnl BUILD 9008 - FIONREAD problem still exists in X-Windows. | ||
| 3347 | AC_DEFINE(BROKEN_FIONREAD, 1, [Define if FIONREAD should not be used.]) | ||
| 3348 | dnl As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h. | ||
| 3349 | dnl But, on AIX, SIGAIO, SIGPTY, and SIGPOLL are defined as SIGIO, | ||
| 3350 | dnl which causes compilation error at init_signals in sysdep.c. | ||
| 3351 | dnl So, we define these macros so that syssignal.h detects them | ||
| 3352 | dnl and undefine SIGAIO, SIGPTY and SIGPOLL. | ||
| 3353 | AC_DEFINE(BROKEN_SIGAIO, 1, [Define if SIGAIO should not be used.]) | ||
| 3354 | AC_DEFINE(BROKEN_SIGPOLL,1, [Define if SIGPOLL should not be used.]) | ||
| 3355 | AC_DEFINE(BROKEN_SIGPTY, 1, [Define if SIGPTY should not be used.]) | ||
| 3356 | |||
| 3357 | dnl On AIX Emacs uses the gmalloc.c malloc implementation. But given | 3356 | dnl On AIX Emacs uses the gmalloc.c malloc implementation. But given |
| 3358 | dnl the way this system works, libc functions that return malloced | 3357 | dnl the way this system works, libc functions that return malloced |
| 3359 | dnl memory use the libc malloc implementation. Calling xfree or | 3358 | dnl memory use the libc malloc implementation. Calling xfree or |
| @@ -3429,7 +3428,7 @@ dnl The choice is controlled by the variable interrupt_input. | |||
| 3429 | dnl | 3428 | dnl |
| 3430 | dnl Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | 3429 | dnl Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) |
| 3431 | dnl | 3430 | dnl |
| 3432 | dnl Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros | 3431 | dnl Emacs uses the presence of the USABLE_SIGIO macro |
| 3433 | dnl to indicate whether or not signal-driven I/O is possible. It uses | 3432 | dnl to indicate whether or not signal-driven I/O is possible. It uses |
| 3434 | dnl INTERRUPT_INPUT to decide whether to use it by default. | 3433 | dnl INTERRUPT_INPUT to decide whether to use it by default. |
| 3435 | dnl | 3434 | dnl |
| @@ -3836,13 +3835,24 @@ AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp], | |||
| 3836 | _longjmp (j, 1);]])], | 3835 | _longjmp (j, 1);]])], |
| 3837 | [emacs_cv_func__setjmp=yes], | 3836 | [emacs_cv_func__setjmp=yes], |
| 3838 | [emacs_cv_func__setjmp=no])]) | 3837 | [emacs_cv_func__setjmp=no])]) |
| 3839 | if test $emacs_cv_func__setjmp = no; then | 3838 | if test $emacs_cv_func__setjmp = yes; then |
| 3840 | AC_DEFINE([_setjmp], [setjmp], | 3839 | AC_DEFINE([HAVE__SETJMP], 1, [Define to 1 if _setjmp and _longjmp work.]) |
| 3841 | [Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.]) | 3840 | else |
| 3842 | AC_DEFINE([_longjmp], [longjmp], | 3841 | AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp], |
| 3843 | [Define to longjmp if _setjmp and _longjmp do not work. | 3842 | [AC_LINK_IFELSE( |
| 3844 | Because longjmp may alter signal masks, callers of _longjmp | 3843 | [AC_LANG_PROGRAM( |
| 3845 | should not assume that it leaves signal masks alone.]) | 3844 | [[#include <setjmp.h> |
| 3845 | ]], | ||
| 3846 | [[sigjmp_buf j; | ||
| 3847 | if (! sigsetjmp (j, 1)) | ||
| 3848 | siglongjmp (j, 1);]])], | ||
| 3849 | [emacs_cv_func_sigsetjmp=yes], | ||
| 3850 | [emacs_cv_func_sigsetjmp=no])]) | ||
| 3851 | if test $emacs_cv_func_sigsetjmp = yes; then | ||
| 3852 | AC_DEFINE([HAVE_SIGSETJMP], 1, | ||
| 3853 | [Define to 1 if sigsetjmp and siglongjmp work. | ||
| 3854 | The value of this symbol is irrelevant if HAVE__SETJMP is defined.]) | ||
| 3855 | fi | ||
| 3846 | fi | 3856 | fi |
| 3847 | 3857 | ||
| 3848 | case $opsys in | 3858 | case $opsys in |
| @@ -3950,6 +3960,46 @@ case $opsys in | |||
| 3950 | ;; | 3960 | ;; |
| 3951 | esac | 3961 | esac |
| 3952 | 3962 | ||
| 3963 | AC_CACHE_CHECK([for usable FIONREAD], [emacs_cv_usable_FIONREAD], | ||
| 3964 | [case $opsys in | ||
| 3965 | aix4-2) | ||
| 3966 | dnl BUILD 9008 - FIONREAD problem still exists in X-Windows. | ||
| 3967 | emacs_cv_usable_FIONREAD=no | ||
| 3968 | ;; | ||
| 3969 | |||
| 3970 | *) | ||
| 3971 | AC_COMPILE_IFELSE( | ||
| 3972 | [AC_LANG_PROGRAM([[#include <sys/types.h> | ||
| 3973 | #include <sys/ioctl.h> | ||
| 3974 | #ifdef USG5_4 | ||
| 3975 | # include <sys/filio.h> | ||
| 3976 | #endif | ||
| 3977 | ]], | ||
| 3978 | [[int foo = ioctl (0, FIONREAD, &foo);]])], | ||
| 3979 | [emacs_cv_usable_FIONREAD=yes], | ||
| 3980 | [emacs_cv_usable_FIONREAD=no]) | ||
| 3981 | ;; | ||
| 3982 | esac]) | ||
| 3983 | if test $emacs_cv_usable_FIONREAD = yes; then | ||
| 3984 | AC_DEFINE([USABLE_FIONREAD], [1], [Define to 1 if FIONREAD is usable.]) | ||
| 3985 | |||
| 3986 | if test $emacs_broken_SIGIO = no; then | ||
| 3987 | AC_CACHE_CHECK([for usable SIGIO], [emacs_cv_usable_SIGIO], | ||
| 3988 | [AC_COMPILE_IFELSE( | ||
| 3989 | [AC_LANG_PROGRAM([[#include <fcntl.h> | ||
| 3990 | #include <signal.h> | ||
| 3991 | ]], | ||
| 3992 | [[int foo = SIGIO | F_SETFL | FASYNC;]])], | ||
| 3993 | [emacs_cv_usable_SIGIO=yes], | ||
| 3994 | [emacs_cv_usable_SIGIO=no])], | ||
| 3995 | [emacs_cv_usable_SIGIO=yes], | ||
| 3996 | [emacs_cv_usable_SIGIO=no]) | ||
| 3997 | if test $emacs_cv_usable_SIGIO = yes; then | ||
| 3998 | AC_DEFINE([USABLE_SIGIO], [1], [Define to 1 if SIGIO is usable.]) | ||
| 3999 | fi | ||
| 4000 | fi | ||
| 4001 | fi | ||
| 4002 | |||
| 3953 | 4003 | ||
| 3954 | case $opsys in | 4004 | case $opsys in |
| 3955 | dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls | 4005 | dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls |
| @@ -3963,11 +4013,6 @@ case $opsys in | |||
| 3963 | ;; | 4013 | ;; |
| 3964 | 4014 | ||
| 3965 | hpux11) | 4015 | hpux11) |
| 3966 | dnl See comments in sysdep.c:sys_signal. | ||
| 3967 | dnl SA_RESTART resets the timeout of `select' on hpux11. | ||
| 3968 | dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART. | ||
| 3969 | AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only | ||
| 3970 | be used in batch mode.]) | ||
| 3971 | dnl It works to open the pty's tty in the parent (Emacs), then | 4016 | dnl It works to open the pty's tty in the parent (Emacs), then |
| 3972 | dnl close and reopen it in the child. | 4017 | dnl close and reopen it in the child. |
| 3973 | AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it | 4018 | AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it |
| @@ -4002,6 +4047,11 @@ fi | |||
| 4002 | 4047 | ||
| 4003 | version=$PACKAGE_VERSION | 4048 | version=$PACKAGE_VERSION |
| 4004 | 4049 | ||
| 4050 | copyright="Copyright (C) 2012 Free Software Foundation, Inc." | ||
| 4051 | AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"], | ||
| 4052 | [Short copyright string for this version of Emacs.]) | ||
| 4053 | AC_SUBST(copyright) | ||
| 4054 | |||
| 4005 | ### Specify what sort of things we'll be editing into Makefile and config.h. | 4055 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
| 4006 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | 4056 | ### Use configuration here uncanonicalized to avoid exceeding size limits. |
| 4007 | AC_SUBST(version) | 4057 | AC_SUBST(version) |
| @@ -4407,11 +4457,7 @@ End: | |||
| 4407 | #### It makes printing result more understandable as using GTK sets | 4457 | #### It makes printing result more understandable as using GTK sets |
| 4408 | #### toolkit_scroll_bars to yes by default. | 4458 | #### toolkit_scroll_bars to yes by default. |
| 4409 | if test "${HAVE_GTK}" = "yes"; then | 4459 | if test "${HAVE_GTK}" = "yes"; then |
| 4410 | if test "${with_gtk3}" = "yes"; then | 4460 | USE_X_TOOLKIT=GTK |
| 4411 | USE_X_TOOLKIT=GTK3 | ||
| 4412 | else | ||
| 4413 | USE_X_TOOLKIT=GTK | ||
| 4414 | fi | ||
| 4415 | fi | 4461 | fi |
| 4416 | 4462 | ||
| 4417 | echo " | 4463 | echo " |
| @@ -4505,6 +4551,16 @@ fi | |||
| 4505 | test "${exec_prefix}" != NONE && | 4551 | test "${exec_prefix}" != NONE && |
| 4506 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] | 4552 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] |
| 4507 | 4553 | ||
| 4554 | if test "$HAVE_NS" = "yes"; then | ||
| 4555 | if test "$NS_IMPL_GNUSTEP" = yes; then | ||
| 4556 | AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \ | ||
| 4557 | nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in]) | ||
| 4558 | else | ||
| 4559 | AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \ | ||
| 4560 | nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in]) | ||
| 4561 | fi | ||
| 4562 | fi | ||
| 4563 | |||
| 4508 | dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES. | 4564 | dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES. |
| 4509 | dnl You _can_ use that variable in AC_CONFIG_FILES, so long as any directory | 4565 | dnl You _can_ use that variable in AC_CONFIG_FILES, so long as any directory |
| 4510 | dnl using automake (ie lib/) is explicitly listed and not "hidden" in a variable | 4566 | dnl using automake (ie lib/) is explicitly listed and not "hidden" in a variable |
| @@ -4513,12 +4569,12 @@ dnl This will work, but you get a config.status that is not quite right | |||
| 4513 | dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html). | 4569 | dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html). |
| 4514 | dnl That doesn't have any obvious consequences for Emacs, but on the whole | 4570 | dnl That doesn't have any obvious consequences for Emacs, but on the whole |
| 4515 | dnl it seems better to just live with the duplication. | 4571 | dnl it seems better to just live with the duplication. |
| 4516 | SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" | 4572 | SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile" |
| 4517 | 4573 | ||
| 4518 | AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ | 4574 | AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ |
| 4519 | doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ | 4575 | doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ |
| 4520 | doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \ | 4576 | doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \ |
| 4521 | leim/Makefile]) | 4577 | leim/Makefile nextstep/Makefile]) |
| 4522 | 4578 | ||
| 4523 | dnl test/ is not present in release tarfiles. | 4579 | dnl test/ is not present in release tarfiles. |
| 4524 | opt_makefile=test/automated/Makefile | 4580 | opt_makefile=test/automated/Makefile |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 508dbbf8021..35e635eec28 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-09-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * building.texi (GDB User Interface Layout): Remove reference to | ||
| 4 | removed variable gdb-use-separate-io-buffer (Bug#12454). | ||
| 5 | |||
| 1 | 2012-09-08 Jambunathan K <kjambunathan@gmail.com> | 6 | 2012-09-08 Jambunathan K <kjambunathan@gmail.com> |
| 2 | 7 | ||
| 3 | * regs.texi (Text Registers): `C-x r +' can now be used instead of | 8 | * regs.texi (Text Registers): `C-x r +' can now be used instead of |
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 05ea667e5f7..21948f181fb 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi | |||
| @@ -888,10 +888,6 @@ displays the following frame layout: | |||
| 888 | @end group | 888 | @end group |
| 889 | @end smallexample | 889 | @end smallexample |
| 890 | 890 | ||
| 891 | However, if @code{gdb-use-separate-io-buffer} is @code{nil}, the I/O | ||
| 892 | buffer does not appear and the primary source buffer occupies the full | ||
| 893 | width of the frame. | ||
| 894 | |||
| 895 | @findex gdb-restore-windows | 891 | @findex gdb-restore-windows |
| 896 | @findex gdb-many-windows | 892 | @findex gdb-many-windows |
| 897 | If you ever change the window layout, you can restore the ``many | 893 | If you ever change the window layout, you can restore the ``many |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ceb199dae88..329c194f45a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,30 @@ | |||
| 1 | 2012-09-18 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (Faces): Discuss anonymous faces. | ||
| 4 | (Face Attributes): Tweak intro. | ||
| 5 | (Defining Faces): Move after the Face Attributes node. Copyedits. | ||
| 6 | (Displaying Faces): Describe role of inheritance. | ||
| 7 | |||
| 8 | * customize.texi (Customization): Define customization more | ||
| 9 | carefully (Bug#11440). | ||
| 10 | (Common Keywords): Add xref to Constant Variables. | ||
| 11 | |||
| 12 | * variables.texi (Defining Variables): Link to defcustom's node | ||
| 13 | instead of the higher-level Customization chapter. | ||
| 14 | |||
| 15 | 2012-09-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Simplify, document, and port floating-point (Bug#12381). | ||
| 18 | * numbers.texi (Float Basics, Arithmetic Operations, Math Functions): | ||
| 19 | Document that / and mod (with floating point arguments), along | ||
| 20 | with asin, acos, log, log10, expt and sqrt, return special values | ||
| 21 | instead of signaling exceptions. | ||
| 22 | (Float Basics): Document that logb operates on the absolute value | ||
| 23 | of its argument. | ||
| 24 | (Math Functions): Document that (log ARG BASE) also returns NaN if | ||
| 25 | BASE is negative. Document that (expt X Y) returns NaN if X is a | ||
| 26 | finite negative number and Y a finite non-integer. | ||
| 27 | |||
| 1 | 2012-09-09 Chong Yidong <cyd@gnu.org> | 28 | 2012-09-09 Chong Yidong <cyd@gnu.org> |
| 2 | 29 | ||
| 3 | * lists.texi (Sets And Lists): Explain that the return value for | 30 | * lists.texi (Sets And Lists): Explain that the return value for |
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 38dfc949264..c9d22851ed2 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi | |||
| @@ -6,13 +6,30 @@ | |||
| 6 | @chapter Customization Settings | 6 | @chapter Customization Settings |
| 7 | 7 | ||
| 8 | @cindex customization item | 8 | @cindex customization item |
| 9 | This chapter describes how to declare customizable variables and | 9 | Users of Emacs can customize variables and faces without writing |
| 10 | customization groups for classifying them. We use the term | 10 | Lisp code, by using the Customize interface. @xref{Easy |
| 11 | @dfn{customization item} to include customizable variables, | 11 | Customization,,, emacs, The GNU Emacs Manual}. This chapter describes |
| 12 | customization groups, as well as faces. | 12 | how to define @dfn{customization items} that users can interact with |
| 13 | 13 | through the Customize interface. | |
| 14 | @xref{Defining Faces}, for the @code{defface} macro, which is used | 14 | |
| 15 | for declaring customizable faces. | 15 | Customization items include customizable variables, which are |
| 16 | defined with the | ||
| 17 | @ifinfo | ||
| 18 | @code{defcustom} macro (@pxref{Variable Definitions}); | ||
| 19 | @end ifinfo | ||
| 20 | @ifnotinfo | ||
| 21 | @code{defcustom} macro; | ||
| 22 | @end ifnotinfo | ||
| 23 | customizable faces, which are defined with @code{defface} (described | ||
| 24 | separately in @ref{Defining Faces}); and @dfn{customization groups}, | ||
| 25 | defined with | ||
| 26 | @ifinfo | ||
| 27 | @code{defgroup} (@pxref{Group Definitions}), | ||
| 28 | @end ifinfo | ||
| 29 | @ifnotinfo | ||
| 30 | @code{defgroup}, | ||
| 31 | @end ifnotinfo | ||
| 32 | which act as containers for groups of related customization items. | ||
| 16 | 33 | ||
| 17 | @menu | 34 | @menu |
| 18 | * Common Keywords:: Common keyword arguments for all kinds of | 35 | * Common Keywords:: Common keyword arguments for all kinds of |
| @@ -29,9 +46,10 @@ for declaring customizable faces. | |||
| 29 | 46 | ||
| 30 | @cindex customization keywords | 47 | @cindex customization keywords |
| 31 | The customization declarations that we will describe in the next few | 48 | The customization declarations that we will describe in the next few |
| 32 | sections (@code{defcustom}, @code{defgroup}, etc.) all accept keyword | 49 | sections---@code{defcustom}, @code{defgroup}, etc.---all accept |
| 33 | arguments for specifying various information. This section describes | 50 | keyword arguments (@pxref{Constant Variables}) for specifying various |
| 34 | keywords that apply to all types of customization declarations. | 51 | information. This section describes keywords that apply to all types |
| 52 | of customization declarations. | ||
| 35 | 53 | ||
| 36 | All of these keywords, except @code{:tag}, can be used more than once | 54 | All of these keywords, except @code{:tag}, can be used more than once |
| 37 | in a given item. Each use of the keyword has an independent effect. | 55 | in a given item. Each use of the keyword has an independent effect. |
| @@ -188,14 +206,14 @@ choice is the official name of the package, such as MH-E or Gnus. | |||
| 188 | @cindex define customization group | 206 | @cindex define customization group |
| 189 | @cindex customization groups, defining | 207 | @cindex customization groups, defining |
| 190 | 208 | ||
| 191 | Each Emacs Lisp package should have one main customization group which | 209 | Each Emacs Lisp package should have one main customization group |
| 192 | contains all the options, faces and other groups in the package. If the | 210 | which contains all the options, faces and other groups in the package. |
| 193 | package has a small number of options and faces, use just one group and | 211 | If the package has a small number of options and faces, use just one |
| 194 | put everything in it. When there are more than twelve or so options and | 212 | group and put everything in it. When there are more than twenty or so |
| 195 | faces, then you should structure them into subgroups, and put the | 213 | options and faces, then you should structure them into subgroups, and |
| 196 | subgroups under the package's main customization group. It is OK to | 214 | put the subgroups under the package's main customization group. It is |
| 197 | put some of the options and faces in the package's main group alongside | 215 | OK to put some of the options and faces in the package's main group |
| 198 | the subgroups. | 216 | alongside the subgroups. |
| 199 | 217 | ||
| 200 | The package's main or only group should be a member of one or more of | 218 | The package's main or only group should be a member of one or more of |
| 201 | the standard customization groups. (To display the full list of them, | 219 | the standard customization groups. (To display the full list of them, |
| @@ -251,7 +269,17 @@ confusing names for options and faces. | |||
| 251 | @node Variable Definitions | 269 | @node Variable Definitions |
| 252 | @section Defining Customization Variables | 270 | @section Defining Customization Variables |
| 253 | @cindex define customization options | 271 | @cindex define customization options |
| 254 | @cindex customization variables, how to define | 272 | @cindex customizable variables, how to define |
| 273 | @cindex user options, how to define | ||
| 274 | |||
| 275 | @dfn{Customizable variables}, also called @dfn{user options}, are | ||
| 276 | global Lisp variables whose values can be set through the Customize | ||
| 277 | interface. Unlike other global variables, which are defined with | ||
| 278 | @code{defvar} (@pxref{Defining Variables}), customizable variables are | ||
| 279 | defined using the @code{defcustom} macro. In addition to calling | ||
| 280 | @code{defvar} as a subroutine, @code{defcustom} states how the | ||
| 281 | variable should be displayed in the Customize interface, the values it | ||
| 282 | is allowed to take, etc. | ||
| 255 | 283 | ||
| 256 | @defmac defcustom option standard doc [keyword value]@dots{} | 284 | @defmac defcustom option standard doc [keyword value]@dots{} |
| 257 | This macro declares @var{option} as a user option (i.e.@: a | 285 | This macro declares @var{option} as a user option (i.e.@: a |
| @@ -291,13 +319,14 @@ has not been assigned the right value yet. In that case, use | |||
| 291 | standard value after Emacs starts up. | 319 | standard value after Emacs starts up. |
| 292 | @end defmac | 320 | @end defmac |
| 293 | 321 | ||
| 294 | @code{defcustom} accepts the following additional keywords: | 322 | In addition to the keywords listed in @ref{Common Keywords}, this |
| 323 | macro accepts the following keywords: | ||
| 295 | 324 | ||
| 296 | @table @code | 325 | @table @code |
| 297 | @item :type @var{type} | 326 | @item :type @var{type} |
| 298 | Use @var{type} as the data type for this option. It specifies which | 327 | Use @var{type} as the data type for this option. It specifies which |
| 299 | values are legitimate, and how to display the value. | 328 | values are legitimate, and how to display the value |
| 300 | @xref{Customization Types}, for more information. | 329 | (@pxref{Customization Types}). |
| 301 | 330 | ||
| 302 | @item :options @var{value-list} | 331 | @item :options @var{value-list} |
| 303 | @kindex options@r{, @code{defcustom} keyword} | 332 | @kindex options@r{, @code{defcustom} keyword} |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 64aa891e56b..11a86f3c1c5 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1863,20 +1863,36 @@ height. | |||
| 1863 | 1863 | ||
| 1864 | A @dfn{face} is a collection of graphical @dfn{attributes} for | 1864 | A @dfn{face} is a collection of graphical @dfn{attributes} for |
| 1865 | displaying text: font, foreground color, background color, optional | 1865 | displaying text: font, foreground color, background color, optional |
| 1866 | underlining, and so on. Faces control how Emacs displays text in | 1866 | underlining, etc. Faces control how Emacs displays text in buffers, |
| 1867 | buffers, as well as other parts of the frame such as the mode line. | 1867 | as well as other parts of the frame such as the mode line. |
| 1868 | @xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of | 1868 | |
| 1869 | faces Emacs normally comes with. | 1869 | @cindex anonymous face |
| 1870 | 1870 | One way to represent a face is as a property list of attributes, | |
| 1871 | @cindex face id | 1871 | like @code{(:foreground "red" :weight bold)}. For example, you can |
| 1872 | For most purposes, you refer to a face in Lisp programs using its | 1872 | assign such an @dfn{anonymous face} as the value of the @code{face} |
| 1873 | @dfn{face name}, which is usually a Lisp symbol. For backward | 1873 | text property; this causes Emacs to display the underlying text with |
| 1874 | compatibility, a face name can also be a string, which is equivalent | 1874 | the specified attributes. @xref{Special Properties}. |
| 1875 | to a Lisp symbol of the same name. | 1875 | |
| 1876 | @cindex face name | ||
| 1877 | More commonly, a face is referred to via a @dfn{face name}: a Lisp | ||
| 1878 | symbol which is associated with a set of face attributes. Named faces | ||
| 1879 | are defined using the @code{defface} macro (@pxref{Defining Faces}). | ||
| 1880 | Emacs defines several standard named faces; @xref{Standard Faces,,, | ||
| 1881 | emacs, The GNU Emacs Manual}. | ||
| 1882 | |||
| 1883 | Many parts of Emacs require named faces, and do not accept anonymous | ||
| 1884 | faces. These include the functions documented in @ref{Attribute | ||
| 1885 | Functions}, and the variable @code{font-lock-keywords} | ||
| 1886 | (@pxref{Search-based Fontification}). Unless otherwise stated, we | ||
| 1887 | will use the term @dfn{face} to refer only to named faces. | ||
| 1888 | |||
| 1889 | For backward compatibility, you can also use a string to specify a | ||
| 1890 | face name; that is equivalent to a Lisp symbol with the same name. | ||
| 1876 | 1891 | ||
| 1877 | @defun facep object | 1892 | @defun facep object |
| 1878 | This function returns a non-@code{nil} value if @var{object} is a Lisp | 1893 | This function returns a non-@code{nil} value if @var{object} is a |
| 1879 | symbol or string that names a face. Otherwise, it returns @code{nil}. | 1894 | named face: a Lisp symbol or string which serves as a face name. |
| 1895 | Otherwise, it returns @code{nil}. | ||
| 1880 | @end defun | 1896 | @end defun |
| 1881 | 1897 | ||
| 1882 | By default, each face name corresponds to the same set of attributes | 1898 | By default, each face name corresponds to the same set of attributes |
| @@ -1884,8 +1900,8 @@ in all frames. But you can also assign a face name a special set of | |||
| 1884 | attributes in one frame (@pxref{Attribute Functions}). | 1900 | attributes in one frame (@pxref{Attribute Functions}). |
| 1885 | 1901 | ||
| 1886 | @menu | 1902 | @menu |
| 1887 | * Defining Faces:: How to define a face. | ||
| 1888 | * Face Attributes:: What is in a face? | 1903 | * Face Attributes:: What is in a face? |
| 1904 | * Defining Faces:: How to define a face. | ||
| 1889 | * Attribute Functions:: Functions to examine and set face attributes. | 1905 | * Attribute Functions:: Functions to examine and set face attributes. |
| 1890 | * Displaying Faces:: How Emacs combines the faces specified for a character. | 1906 | * Displaying Faces:: How Emacs combines the faces specified for a character. |
| 1891 | * Face Remapping:: Remapping faces to alternative definitions. | 1907 | * Face Remapping:: Remapping faces to alternative definitions. |
| @@ -1900,161 +1916,21 @@ attributes in one frame (@pxref{Attribute Functions}). | |||
| 1900 | * Low-Level Font:: Lisp representation for character display fonts. | 1916 | * Low-Level Font:: Lisp representation for character display fonts. |
| 1901 | @end menu | 1917 | @end menu |
| 1902 | 1918 | ||
| 1903 | @node Defining Faces | ||
| 1904 | @subsection Defining Faces | ||
| 1905 | |||
| 1906 | The @code{defface} macro defines a face and specifies its default | ||
| 1907 | appearance. The user can subsequently customize the face using the | ||
| 1908 | Customize interface (@pxref{Customization}). | ||
| 1909 | |||
| 1910 | @defmac defface face spec doc [keyword value]@dots{} | ||
| 1911 | This macro declares @var{face} as a customizable face whose default | ||
| 1912 | attributes are given by @var{spec}. You should not quote the symbol | ||
| 1913 | @var{face}, and it should not end in @samp{-face} (that would be | ||
| 1914 | redundant). The argument @var{doc} is a documentation string for the | ||
| 1915 | face. The additional @var{keyword} arguments have the same meanings | ||
| 1916 | as in @code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). | ||
| 1917 | |||
| 1918 | When @code{defface} executes, it defines the face according to | ||
| 1919 | @var{spec}, then uses any customizations that were read from the | ||
| 1920 | init file (@pxref{Init File}) to override that specification. | ||
| 1921 | |||
| 1922 | When you evaluate a @code{defface} form with @kbd{C-M-x} in Emacs | ||
| 1923 | Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun} | ||
| 1924 | overrides any customizations of the face. This way, the face reflects | ||
| 1925 | exactly what the @code{defface} says. | ||
| 1926 | |||
| 1927 | @cindex face specification | ||
| 1928 | The @var{spec} argument is a @dfn{face specification}, which states | ||
| 1929 | how the face should appear on different kinds of terminals. It should | ||
| 1930 | be an alist whose elements each have the form | ||
| 1931 | |||
| 1932 | @example | ||
| 1933 | (@var{display} . @var{plist}) | ||
| 1934 | @end example | ||
| 1935 | |||
| 1936 | @noindent | ||
| 1937 | @var{display} specifies a class of terminals (see below), while | ||
| 1938 | @var{plist} is a property list of face attributes and their values, | ||
| 1939 | specifying how the face appears on such terminals | ||
| 1940 | @iftex | ||
| 1941 | (see the next section for details about face attributes). | ||
| 1942 | @end iftex | ||
| 1943 | @ifnottex | ||
| 1944 | (@pxref{Face Attributes}, for details about face attributes). | ||
| 1945 | @end ifnottex | ||
| 1946 | |||
| 1947 | The @var{display} part of an element of @var{spec} determines which | ||
| 1948 | frames the element matches. If more than one element of @var{spec} | ||
| 1949 | matches a given frame, the first element that matches is the one used | ||
| 1950 | for that frame. There are three possibilities for @var{display}: | ||
| 1951 | |||
| 1952 | @table @asis | ||
| 1953 | @item @code{default} | ||
| 1954 | This element of @var{spec} doesn't match any frames; instead, it | ||
| 1955 | specifies defaults that apply to all frames. This element, if used, | ||
| 1956 | must be the first element of @var{spec}. Each of the following | ||
| 1957 | elements can override any or all of these defaults. | ||
| 1958 | |||
| 1959 | @item @code{t} | ||
| 1960 | This element of @var{spec} matches all frames. Therefore, any | ||
| 1961 | subsequent elements of @var{spec} are never used. Normally | ||
| 1962 | @code{t} is used in the last (or only) element of @var{spec}. | ||
| 1963 | |||
| 1964 | @item a list | ||
| 1965 | If @var{display} is a list, each element should have the form | ||
| 1966 | @code{(@var{characteristic} @var{value}@dots{})}. Here | ||
| 1967 | @var{characteristic} specifies a way of classifying frames, and the | ||
| 1968 | @var{value}s are possible classifications which @var{display} should | ||
| 1969 | apply to. Here are the possible values of @var{characteristic}: | ||
| 1970 | |||
| 1971 | @table @code | ||
| 1972 | @item type | ||
| 1973 | The kind of window system the frame uses---either @code{graphic} (any | ||
| 1974 | graphics-capable display), @code{x}, @code{pc} (for the MS-DOS console), | ||
| 1975 | @code{w32} (for MS Windows 9X/NT/2K/XP), or @code{tty} | ||
| 1976 | (a non-graphics-capable display). | ||
| 1977 | @xref{Window Systems, window-system}. | ||
| 1978 | |||
| 1979 | @item class | ||
| 1980 | What kinds of colors the frame supports---either @code{color}, | ||
| 1981 | @code{grayscale}, or @code{mono}. | ||
| 1982 | |||
| 1983 | @item background | ||
| 1984 | The kind of background---either @code{light} or @code{dark}. | ||
| 1985 | |||
| 1986 | @item min-colors | ||
| 1987 | An integer that represents the minimum number of colors the frame | ||
| 1988 | should support. This matches a frame if its | ||
| 1989 | @code{display-color-cells} value is at least the specified integer. | ||
| 1990 | |||
| 1991 | @item supports | ||
| 1992 | Whether or not the frame can display the face attributes given in | ||
| 1993 | @var{value}@dots{} (@pxref{Face Attributes}). @xref{Display Face | ||
| 1994 | Attribute Testing}, for more information on exactly how this testing | ||
| 1995 | is done. | ||
| 1996 | @end table | ||
| 1997 | |||
| 1998 | If an element of @var{display} specifies more than one @var{value} for a | ||
| 1999 | given @var{characteristic}, any of those values is acceptable. If | ||
| 2000 | @var{display} has more than one element, each element should specify a | ||
| 2001 | different @var{characteristic}; then @emph{each} characteristic of the | ||
| 2002 | frame must match one of the @var{value}s specified for it in | ||
| 2003 | @var{display}. | ||
| 2004 | @end table | ||
| 2005 | @end defmac | ||
| 2006 | |||
| 2007 | Here's how the standard face @code{highlight} is defined: | ||
| 2008 | |||
| 2009 | @example | ||
| 2010 | (defface highlight | ||
| 2011 | '((((class color) (min-colors 88) (background light)) | ||
| 2012 | :background "darkseagreen2") | ||
| 2013 | (((class color) (min-colors 88) (background dark)) | ||
| 2014 | :background "darkolivegreen") | ||
| 2015 | (((class color) (min-colors 16) (background light)) | ||
| 2016 | :background "darkseagreen2") | ||
| 2017 | (((class color) (min-colors 16) (background dark)) | ||
| 2018 | :background "darkolivegreen") | ||
| 2019 | (((class color) (min-colors 8)) | ||
| 2020 | :background "green" :foreground "black") | ||
| 2021 | (t :inverse-video t)) | ||
| 2022 | "Basic face for highlighting." | ||
| 2023 | :group 'basic-faces) | ||
| 2024 | @end example | ||
| 2025 | |||
| 2026 | Internally, Emacs stores the face's default specification in its | ||
| 2027 | @code{face-defface-spec} symbol property (@pxref{Property Lists}). | ||
| 2028 | The @code{saved-face} property stores the face specification saved by | ||
| 2029 | the user, using the customization buffer; the @code{customized-face} | ||
| 2030 | property stores the face specification customized for the current | ||
| 2031 | session, but not saved; and the @code{theme-face} property stores an | ||
| 2032 | alist associating the active customization settings and Custom themes | ||
| 2033 | with their specifications for that face. The face's documentation | ||
| 2034 | string is stored in the @code{face-documentation} property. But | ||
| 2035 | normally you should not try to set any of these properties directly. | ||
| 2036 | @xref{Applying Customizations}, for the @code{custom-set-faces} | ||
| 2037 | function, which is used to apply customized face settings. | ||
| 2038 | |||
| 2039 | People are sometimes tempted to create variables whose values | ||
| 2040 | specify a face to use. In the vast majority of cases, this is not | ||
| 2041 | necessary; it is preferable to simply use faces directly. | ||
| 2042 | |||
| 2043 | @node Face Attributes | 1919 | @node Face Attributes |
| 2044 | @subsection Face Attributes | 1920 | @subsection Face Attributes |
| 2045 | @cindex face attributes | 1921 | @cindex face attributes |
| 2046 | 1922 | ||
| 2047 | The effect of using a face is determined by a fixed set of @dfn{face | 1923 | @dfn{Face attributes} determine the visual appearance of a face. |
| 2048 | attributes}. This table lists all the face attributes, their possible | 1924 | The following table lists all the face attributes, their possible |
| 2049 | values, and their effects. You can specify more than one face for a | 1925 | values, and their effects. |
| 2050 | given piece of text; Emacs merges the attributes of all the faces to | ||
| 2051 | determine how to display the text. @xref{Displaying Faces}. | ||
| 2052 | 1926 | ||
| 2053 | In addition to the values given below, each face attribute can also | 1927 | Apart from the values given below, each face attribute can have the |
| 2054 | have the value @code{unspecified}. This special value means the face | 1928 | value @code{unspecified}. This special value means that the face |
| 2055 | doesn't specify that attribute. In face merging, when the first face | 1929 | doesn't specify that attribute directly. An @code{unspecified} |
| 2056 | fails to specify a particular attribute, the next face gets a chance. | 1930 | attribute tells Emacs to refer instead to a parent face (see the |
| 2057 | However, the @code{default} face must specify all attributes. | 1931 | description @code{:inherit} attribute below); or, failing that, to an |
| 1932 | underlying face (@pxref{Displaying Faces}). The @code{default} face | ||
| 1933 | must specify all attributes. | ||
| 2058 | 1934 | ||
| 2059 | Some of these attributes are meaningful only on certain kinds of | 1935 | Some of these attributes are meaningful only on certain kinds of |
| 2060 | displays. If your display cannot handle a certain attribute, the | 1936 | displays. If your display cannot handle a certain attribute, the |
| @@ -2063,7 +1939,7 @@ attribute is ignored. | |||
| 2063 | @table @code | 1939 | @table @code |
| 2064 | @item :family | 1940 | @item :family |
| 2065 | Font family or fontset (a string). @xref{Fonts,,, emacs, The GNU | 1941 | Font family or fontset (a string). @xref{Fonts,,, emacs, The GNU |
| 2066 | Emacs Manual}, for more information about font families; the function | 1942 | Emacs Manual}, for more information about font families. The function |
| 2067 | @code{font-family-list} (see below) returns a list of available family | 1943 | @code{font-family-list} (see below) returns a list of available family |
| 2068 | names. @xref{Fontsets}, for information about fontsets. | 1944 | names. @xref{Fontsets}, for information about fontsets. |
| 2069 | 1945 | ||
| @@ -2083,9 +1959,8 @@ The height of the font. In the simplest case, this is an integer in | |||
| 2083 | units of 1/10 point. | 1959 | units of 1/10 point. |
| 2084 | 1960 | ||
| 2085 | The value can also be a floating point number or a function, which | 1961 | The value can also be a floating point number or a function, which |
| 2086 | specifies the height relative to an @dfn{underlying face} (i.e., a | 1962 | specifies the height relative to an @dfn{underlying face} |
| 2087 | face that has a lower priority in the list described in | 1963 | (@pxref{Displaying Faces}). If the value is a floating point number, |
| 2088 | @ref{Displaying Faces}). If the value is a floating point number, | ||
| 2089 | that specifies the amount by which to scale the height of the | 1964 | that specifies the amount by which to scale the height of the |
| 2090 | underlying face. If the value is a function, that function is called | 1965 | underlying face. If the value is a function, that function is called |
| 2091 | with one argument, the height of the underlying face, and returns the | 1966 | with one argument, the height of the underlying face, and returns the |
| @@ -2261,11 +2136,147 @@ suitable for use with @code{:stipple} (see above). It returns | |||
| 2261 | @code{nil} otherwise. | 2136 | @code{nil} otherwise. |
| 2262 | @end defun | 2137 | @end defun |
| 2263 | 2138 | ||
| 2139 | @node Defining Faces | ||
| 2140 | @subsection Defining Faces | ||
| 2141 | |||
| 2142 | The usual way to define a face is through the @code{defface} macro. | ||
| 2143 | This macro defines a face name, and associates that name with a set of | ||
| 2144 | face attributes. It also sets up the face so that the user can | ||
| 2145 | customize it via the Customize interface (@pxref{Customization}). | ||
| 2146 | |||
| 2147 | @defmac defface face spec doc [keyword value]@dots{} | ||
| 2148 | This macro declares @var{face} as a customizable face whose default | ||
| 2149 | attributes are given by @var{spec}. You should not quote the symbol | ||
| 2150 | @var{face}, and it should not end in @samp{-face} (that would be | ||
| 2151 | redundant). The argument @var{doc} is a documentation string for the | ||
| 2152 | face. The additional @var{keyword} arguments have the same meanings | ||
| 2153 | as in @code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). | ||
| 2154 | |||
| 2155 | When @code{defface} executes, it defines the face according to | ||
| 2156 | @var{spec}, then uses any customizations that were read from the | ||
| 2157 | init file (@pxref{Init File}) to override that specification. | ||
| 2158 | |||
| 2159 | When you evaluate a @code{defface} form with @kbd{C-M-x} in Emacs | ||
| 2160 | Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun} | ||
| 2161 | overrides any customizations of the face. This way, the face reflects | ||
| 2162 | exactly what the @code{defface} says. | ||
| 2163 | |||
| 2164 | @cindex face specification | ||
| 2165 | The @var{spec} argument is a @dfn{face specification}, which states | ||
| 2166 | how the face should appear on different kinds of terminals. It should | ||
| 2167 | be an alist whose elements each have the form | ||
| 2168 | |||
| 2169 | @example | ||
| 2170 | (@var{display} . @var{plist}) | ||
| 2171 | @end example | ||
| 2172 | |||
| 2173 | @noindent | ||
| 2174 | @var{display} specifies a class of terminals (see below). @var{plist} | ||
| 2175 | is a property list of face attributes and their values, specifying how | ||
| 2176 | the face appears on such terminals. For backward compatibility, you | ||
| 2177 | can also write an element as @code{(@var{display} @var{plist})}. | ||
| 2178 | |||
| 2179 | The @var{display} part of an element of @var{spec} determines which | ||
| 2180 | terminals the element matches. If more than one element of @var{spec} | ||
| 2181 | matches a given terminal, the first element that matches is the one | ||
| 2182 | used for that terminal. There are three possibilities for | ||
| 2183 | @var{display}: | ||
| 2184 | |||
| 2185 | @table @asis | ||
| 2186 | @item @code{default} | ||
| 2187 | This element of @var{spec} doesn't match any terminal; instead, it | ||
| 2188 | specifies defaults that apply to all terminals. This element, if | ||
| 2189 | used, must be the first element of @var{spec}. Each of the following | ||
| 2190 | elements can override any or all of these defaults. | ||
| 2191 | |||
| 2192 | @item @code{t} | ||
| 2193 | This element of @var{spec} matches all terminals. Therefore, any | ||
| 2194 | subsequent elements of @var{spec} are never used. Normally @code{t} | ||
| 2195 | is used in the last (or only) element of @var{spec}. | ||
| 2196 | |||
| 2197 | @item a list | ||
| 2198 | If @var{display} is a list, each element should have the form | ||
| 2199 | @code{(@var{characteristic} @var{value}@dots{})}. Here | ||
| 2200 | @var{characteristic} specifies a way of classifying terminals, and the | ||
| 2201 | @var{value}s are possible classifications which @var{display} should | ||
| 2202 | apply to. Here are the possible values of @var{characteristic}: | ||
| 2203 | |||
| 2204 | @table @code | ||
| 2205 | @item type | ||
| 2206 | The kind of window system the terminal uses---either @code{graphic} | ||
| 2207 | (any graphics-capable display), @code{x}, @code{pc} (for the MS-DOS | ||
| 2208 | console), @code{w32} (for MS Windows 9X/NT/2K/XP), or @code{tty} (a | ||
| 2209 | non-graphics-capable display). @xref{Window Systems, window-system}. | ||
| 2210 | |||
| 2211 | @item class | ||
| 2212 | What kinds of colors the terminal supports---either @code{color}, | ||
| 2213 | @code{grayscale}, or @code{mono}. | ||
| 2214 | |||
| 2215 | @item background | ||
| 2216 | The kind of background---either @code{light} or @code{dark}. | ||
| 2217 | |||
| 2218 | @item min-colors | ||
| 2219 | An integer that represents the minimum number of colors the terminal | ||
| 2220 | should support. This matches a terminal if its | ||
| 2221 | @code{display-color-cells} value is at least the specified integer. | ||
| 2222 | |||
| 2223 | @item supports | ||
| 2224 | Whether or not the terminal can display the face attributes given in | ||
| 2225 | @var{value}@dots{} (@pxref{Face Attributes}). @xref{Display Face | ||
| 2226 | Attribute Testing}, for more information on exactly how this testing | ||
| 2227 | is done. | ||
| 2228 | @end table | ||
| 2229 | |||
| 2230 | If an element of @var{display} specifies more than one @var{value} for | ||
| 2231 | a given @var{characteristic}, any of those values is acceptable. If | ||
| 2232 | @var{display} has more than one element, each element should specify a | ||
| 2233 | different @var{characteristic}; then @emph{each} characteristic of the | ||
| 2234 | terminal must match one of the @var{value}s specified for it in | ||
| 2235 | @var{display}. | ||
| 2236 | @end table | ||
| 2237 | @end defmac | ||
| 2238 | |||
| 2239 | Here's how the standard face @code{highlight} is defined: | ||
| 2240 | |||
| 2241 | @example | ||
| 2242 | (defface highlight | ||
| 2243 | '((((class color) (min-colors 88) (background light)) | ||
| 2244 | :background "darkseagreen2") | ||
| 2245 | (((class color) (min-colors 88) (background dark)) | ||
| 2246 | :background "darkolivegreen") | ||
| 2247 | (((class color) (min-colors 16) (background light)) | ||
| 2248 | :background "darkseagreen2") | ||
| 2249 | (((class color) (min-colors 16) (background dark)) | ||
| 2250 | :background "darkolivegreen") | ||
| 2251 | (((class color) (min-colors 8)) | ||
| 2252 | :background "green" :foreground "black") | ||
| 2253 | (t :inverse-video t)) | ||
| 2254 | "Basic face for highlighting." | ||
| 2255 | :group 'basic-faces) | ||
| 2256 | @end example | ||
| 2257 | |||
| 2258 | Internally, Emacs stores the face's default specification in its | ||
| 2259 | @code{face-defface-spec} symbol property (@pxref{Property Lists}). | ||
| 2260 | The @code{saved-face} property stores the face specification saved by | ||
| 2261 | the user, using the customization buffer; the @code{customized-face} | ||
| 2262 | property stores the face specification customized for the current | ||
| 2263 | session, but not saved; and the @code{theme-face} property stores an | ||
| 2264 | alist associating the active customization settings and Custom themes | ||
| 2265 | with their specifications for that face. The face's documentation | ||
| 2266 | string is stored in the @code{face-documentation} property. But | ||
| 2267 | normally you should not try to set any of these properties directly. | ||
| 2268 | @xref{Applying Customizations}, for the @code{custom-set-faces} | ||
| 2269 | function, which is used to apply customized face settings. | ||
| 2270 | |||
| 2271 | People are sometimes tempted to create variables whose values | ||
| 2272 | specify a face to use. In the vast majority of cases, this is not | ||
| 2273 | necessary; it is preferable to simply use faces directly. | ||
| 2274 | |||
| 2264 | @node Attribute Functions | 2275 | @node Attribute Functions |
| 2265 | @subsection Face Attribute Functions | 2276 | @subsection Face Attribute Functions |
| 2266 | 2277 | ||
| 2267 | This section describes the functions for accessing and modifying the | 2278 | This section describes the functions for accessing and modifying the |
| 2268 | attributes of an existing face. | 2279 | attributes of an existing named face. |
| 2269 | 2280 | ||
| 2270 | @defun set-face-attribute face frame &rest arguments | 2281 | @defun set-face-attribute face frame &rest arguments |
| 2271 | This function sets one or more attributes of @var{face} for | 2282 | This function sets one or more attributes of @var{face} for |
| @@ -2467,8 +2478,12 @@ This function returns the @code{:inverse-video} attribute of face @var{face}. | |||
| 2467 | @node Displaying Faces | 2478 | @node Displaying Faces |
| 2468 | @subsection Displaying Faces | 2479 | @subsection Displaying Faces |
| 2469 | 2480 | ||
| 2470 | Here is how Emacs determines the face to use for displaying any | 2481 | When Emacs displays a given piece of text, the visual appearance of |
| 2471 | given piece of text: | 2482 | the text may be determined by faces drawn from different sources. If |
| 2483 | these various sources together specify more than one face for a | ||
| 2484 | particular character, Emacs merges the attributes of the various | ||
| 2485 | faces. Here is the order in which Emacs merges the faces, from | ||
| 2486 | highest to lowest priority: | ||
| 2472 | 2487 | ||
| 2473 | @itemize @bullet | 2488 | @itemize @bullet |
| 2474 | @item | 2489 | @item |
| @@ -2482,11 +2497,11 @@ Manual}. | |||
| 2482 | 2497 | ||
| 2483 | @item | 2498 | @item |
| 2484 | If the text lies within an overlay with a non-@code{nil} @code{face} | 2499 | If the text lies within an overlay with a non-@code{nil} @code{face} |
| 2485 | property, Emacs applies the face or face attributes specified by that | 2500 | property, Emacs applies the face(s) specified by that property. If |
| 2486 | property. If the overlay has a @code{mouse-face} property and the | 2501 | the overlay has a @code{mouse-face} property and the mouse is ``near |
| 2487 | mouse is ``near enough'' to the overlay, Emacs applies the face or | 2502 | enough'' to the overlay, Emacs applies the face or face attributes |
| 2488 | face attributes specified by the @code{mouse-face} property instead. | 2503 | specified by the @code{mouse-face} property instead. @xref{Overlay |
| 2489 | @xref{Overlay Properties}. | 2504 | Properties}. |
| 2490 | 2505 | ||
| 2491 | When multiple overlays cover one character, an overlay with higher | 2506 | When multiple overlays cover one character, an overlay with higher |
| 2492 | priority overrides those with lower priority. @xref{Overlays}. | 2507 | priority overrides those with lower priority. @xref{Overlays}. |
| @@ -2508,11 +2523,12 @@ If any given attribute has not been specified during the preceding | |||
| 2508 | steps, Emacs applies the attribute of the @code{default} face. | 2523 | steps, Emacs applies the attribute of the @code{default} face. |
| 2509 | @end itemize | 2524 | @end itemize |
| 2510 | 2525 | ||
| 2511 | If these various sources together specify more than one face for a | 2526 | At each stage, if a face has a valid @code{:inherit} attribute, |
| 2512 | particular character, Emacs merges the attributes of the various faces | 2527 | Emacs treats any attribute with an @code{unspecified} value as having |
| 2513 | specified. For each attribute, Emacs tries using the above order | 2528 | the corresponding value drawn from the parent face(s). @pxref{Face |
| 2514 | (i.e.@: first the face of any special glyph; then the face for region | 2529 | Attributes}. Note that the parent face(s) may also leave the |
| 2515 | highlighting, if appropriate; and so on). | 2530 | attribute unspecified; in that case, the attribute remains unspecified |
| 2531 | at the next level of face merging. | ||
| 2516 | 2532 | ||
| 2517 | @node Face Remapping | 2533 | @node Face Remapping |
| 2518 | @subsection Face Remapping | 2534 | @subsection Face Remapping |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index caa5185dec3..db770616820 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1366,8 +1366,8 @@ Overlays | |||
| 1366 | 1366 | ||
| 1367 | Faces | 1367 | Faces |
| 1368 | 1368 | ||
| 1369 | * Defining Faces:: How to define a face. | ||
| 1370 | * Face Attributes:: What is in a face? | 1369 | * Face Attributes:: What is in a face? |
| 1370 | * Defining Faces:: How to define a face. | ||
| 1371 | * Attribute Functions:: Functions to examine and set face attributes. | 1371 | * Attribute Functions:: Functions to examine and set face attributes. |
| 1372 | * Displaying Faces:: How Emacs combines the faces specified for | 1372 | * Displaying Faces:: How Emacs combines the faces specified for |
| 1373 | a character. | 1373 | a character. |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index fe7f24e42cd..a5910ea921b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -2999,12 +2999,11 @@ can be the following: | |||
| 2999 | A face name (a symbol or string). | 2999 | A face name (a symbol or string). |
| 3000 | 3000 | ||
| 3001 | @item | 3001 | @item |
| 3002 | A property list of face attributes. This has the | 3002 | A property list of face attributes. This has the form (@var{keyword} |
| 3003 | form (@var{keyword} @var{value} @dots{}), where each @var{keyword} is a | 3003 | @var{value} @dots{}), where each @var{keyword} is a face attribute |
| 3004 | face attribute name and @var{value} is a meaningful value for that | 3004 | name and @var{value} is a meaningful value for that attribute. With |
| 3005 | attribute. With this feature, you do not need to create a face each | 3005 | this feature, you do not need to create a face each time you want to |
| 3006 | time you want to specify a particular attribute for certain text. | 3006 | specify a particular attribute for certain text. |
| 3007 | @xref{Face Attributes}. | ||
| 3008 | 3007 | ||
| 3009 | @item | 3008 | @item |
| 3010 | A list of faces. This specifies a face which is an aggregate of the | 3009 | A list of faces. This specifies a face which is an aggregate of the |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index c5b66757ace..1c0abcb8e66 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -403,7 +403,8 @@ unconditionally initializes the variable, whereas @code{defvar} | |||
| 403 | initializes it only if it is originally void. | 403 | initializes it only if it is originally void. |
| 404 | 404 | ||
| 405 | To define a customizable variable, you should use @code{defcustom} | 405 | To define a customizable variable, you should use @code{defcustom} |
| 406 | (which calls @code{defvar} as a subroutine). @xref{Customization}. | 406 | (which calls @code{defvar} as a subroutine). @xref{Variable |
| 407 | Definitions}. | ||
| 407 | 408 | ||
| 408 | @defspec defvar symbol [value [doc-string]] | 409 | @defspec defvar symbol [value [doc-string]] |
| 409 | This special form defines @var{symbol} as a variable. Note that | 410 | This special form defines @var{symbol} as a variable. Note that |
diff --git a/etc/ChangeLog b/etc/ChangeLog index aa788275256..6f2b178fcd7 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,47 @@ | |||
| 1 | 2012-09-17 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * refcards/emacsver.tex: New file. | ||
| 4 | * refcards/calccard.tex, refcards/cs-dired-ref.tex: | ||
| 5 | * refcards/cs-refcard.tex, refcards/cs-survival.tex: | ||
| 6 | * refcards/de-refcard.tex, refcards/dired-ref.tex: | ||
| 7 | * refcards/emacsver.tex, refcards/fr-dired-ref.tex: | ||
| 8 | * refcards/fr-refcard.tex, refcards/fr-survival.tex: | ||
| 9 | * refcards/orgcard.tex, refcards/pl-refcard.tex: | ||
| 10 | * refcards/pt-br-refcard.tex, refcards/refcard.tex: | ||
| 11 | * refcards/sk-dired-ref.tex, refcards/sk-refcard.tex: | ||
| 12 | * refcards/sk-survival.tex, refcards/survival.tex: | ||
| 13 | * refcards/vipcard.tex, refcards/viperCard.tex: Include emacsver.tex. | ||
| 14 | * refcards/calccard.tex (\emacsversionnumber): | ||
| 15 | Rename to \versionemacs, same as all the other refcards. | ||
| 16 | * refcards/Makefile (ENVADD): New variable. | ||
| 17 | (sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf) | ||
| 18 | (%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi): | ||
| 19 | Depend on emacsver.tex. Add "." to TEXINPUTS for TeX commands. | ||
| 20 | |||
| 21 | 2012-09-16 Paul Eggert <eggert@cs.ucla.edu> | ||
| 22 | |||
| 23 | Remove configure's --without-sync-input option (Bug#12450). | ||
| 24 | * TODO (Make SYNC_INPUT the default): Remove, as the code now | ||
| 25 | behaves as if SYNC_INPUT is always true. | ||
| 26 | |||
| 27 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 28 | |||
| 29 | Use a more backwards-compatible timer format (Bug#12430). | ||
| 30 | * NEWS: Document it, plus fix a typo. | ||
| 31 | |||
| 32 | 2012-09-13 Jan Djärv <jan.h.d@swipnet.se> | ||
| 33 | |||
| 34 | * NEWS (--with-x-toolkit): Mention that Gtk+ 3 is now default. | ||
| 35 | |||
| 36 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 37 | |||
| 38 | * NEWS: Document timer format change (Bug#12430). | ||
| 39 | |||
| 40 | 2012-09-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 41 | |||
| 42 | Simplify, document, and port floating-point (Bug#12381). | ||
| 43 | * NEWS: Document NaNs versus signaling-error change. | ||
| 44 | |||
| 1 | 2012-09-04 Paul Eggert <eggert@cs.ucla.edu> | 45 | 2012-09-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 46 | ||
| 3 | Give more-useful info on a fatal error (Bug#12328). | 47 | Give more-useful info on a fatal error (Bug#12328). |
| @@ -65,6 +65,14 @@ renamed to '--enable-check-lisp-object-type', as the resulting | |||
| 65 | Lisp_Object type no longer uses a union to implement the compile time | 65 | Lisp_Object type no longer uses a union to implement the compile time |
| 66 | check that this option enables. | 66 | check that this option enables. |
| 67 | 67 | ||
| 68 | --- | ||
| 69 | ** The default toolkit has been changed to Gtk+ version 3. | ||
| 70 | If you don't pass --with-x-toolkit to configure or if you pass | ||
| 71 | --with-x-toolkit=gtk or --with-x-toolkit=yes, configure will try to build | ||
| 72 | with Gtk+ version 3, and if that fails, try Gtk+ version 2. | ||
| 73 | You can explicitly require a specific version by passing | ||
| 74 | --with-x-toolkit=gtk2 or --with-x-toolkit=gtk3 to configure. | ||
| 75 | |||
| 68 | 76 | ||
| 69 | * Startup Changes in Emacs 24.3 | 77 | * Startup Changes in Emacs 24.3 |
| 70 | 78 | ||
| @@ -101,6 +109,11 @@ machines. Other functions that use this format, such as | |||
| 101 | file-attributes and format-time-string, have been changed accordingly. | 109 | file-attributes and format-time-string, have been changed accordingly. |
| 102 | Old-format time stamps are still accepted. | 110 | Old-format time stamps are still accepted. |
| 103 | 111 | ||
| 112 | ** The format of timers in timer-list and timer-idle-list is now | ||
| 113 | [TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. | ||
| 114 | The PSECS slot is new, and uses picosecond resolution. It can be | ||
| 115 | accessed via the new timer--psecs accessor. | ||
| 116 | |||
| 104 | ** Emacs now generates backtraces on fatal errors. | 117 | ** Emacs now generates backtraces on fatal errors. |
| 105 | On encountering a fatal error, Emacs now outputs a textual description | 118 | On encountering a fatal error, Emacs now outputs a textual description |
| 106 | of the fatal signal, and a short backtrace on platforms like glibc | 119 | of the fatal signal, and a short backtrace on platforms like glibc |
| @@ -722,6 +735,7 @@ in Emacs 24.1: | |||
| 722 | **** `special-display-frame-alist' | 735 | **** `special-display-frame-alist' |
| 723 | **** `special-display-buffer-names' | 736 | **** `special-display-buffer-names' |
| 724 | **** `special-display-function' | 737 | **** `special-display-function' |
| 738 | **** `display-buffer-function' | ||
| 725 | 739 | ||
| 726 | ** Completion | 740 | ** Completion |
| 727 | 741 | ||
| @@ -1229,13 +1229,6 @@ systems for HTML/XML files automatically." | |||
| 1229 | For use by sml-mode, python-mode, tex-mode, scheme-mode, lisp-mode, | 1229 | For use by sml-mode, python-mode, tex-mode, scheme-mode, lisp-mode, |
| 1230 | haskell-mode, tuareg-mode, ... | 1230 | haskell-mode, tuareg-mode, ... |
| 1231 | 1231 | ||
| 1232 | ** Make SYNC_INPUT the default. [true since 2008-03-11] | ||
| 1233 | All loops using immediate_quit need to be checked to ensure that | ||
| 1234 | C-g can interrupt them, in case of an infinite loop. Once we | ||
| 1235 | switch to using SYNC_INPUT, we can remove the BLOCK_INPUTs in the | ||
| 1236 | allocation functions (allocate_string etc.) without worrying about | ||
| 1237 | data munging. | ||
| 1238 | |||
| 1239 | ** Add "link" button class | 1232 | ** Add "link" button class |
| 1240 | Add a standard button-class named "link", and make all other link-like | 1233 | Add a standard button-class named "link", and make all other link-like |
| 1241 | button classes inherit from it. Set the default face of the "link" button | 1234 | button classes inherit from it. Set the default face of the "link" button |
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile index 64e2d8638f8..ef810da6022 100644 --- a/etc/refcards/Makefile +++ b/etc/refcards/Makefile | |||
| @@ -47,26 +47,27 @@ VIPER_CARDS_PDF = vipcard.pdf viperCard.pdf | |||
| 47 | viper-cards_pdf: ${VIPER_CARDS_PDF} | 47 | viper-cards_pdf: ${VIPER_CARDS_PDF} |
| 48 | viper-cards_ps: ${VIPER_CARDS_PDF:.pdf=.ps} | 48 | viper-cards_ps: ${VIPER_CARDS_PDF:.pdf=.ps} |
| 49 | 49 | ||
| 50 | ENVADD = TEXINPUTS=".:" | ||
| 50 | 51 | ||
| 51 | ## PDF files. | 52 | ## PDF files. |
| 52 | 53 | ||
| 53 | ## The page layouts (a4/letter) are written directly in the .tex files. | 54 | ## The page layouts (a4/letter) are written directly in the .tex files. |
| 54 | 55 | ||
| 55 | cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \ | 56 | cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \ |
| 56 | sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex | 57 | sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex emacsver.tex |
| 57 | if pdfcsplain --version > /dev/null 2> /dev/null; then \ | 58 | if pdfcsplain --version > /dev/null 2> /dev/null; then \ |
| 58 | pdfcsplain $<; \ | 59 | ${ENVADD} pdfcsplain $<; \ |
| 59 | else \ | 60 | else \ |
| 60 | csplain "\pdfoutput=1\input $<"; \ | 61 | ${ENVADD} csplain "\pdfoutput=1\input $<"; \ |
| 61 | fi | 62 | fi |
| 62 | 63 | ||
| 63 | ## Some versions of pdfmex seem to create dvi by default, hence output-format. | 64 | ## Some versions of pdfmex seem to create dvi by default, hence output-format. |
| 64 | pl-refcard.pdf: %.pdf: %.tex | 65 | pl-refcard.pdf: %.pdf: %.tex emacsver.tex |
| 65 | if ! kpsewhich -format=fmt mex > /dev/null && \ | 66 | if ! kpsewhich -format=fmt mex > /dev/null && \ |
| 66 | ! pdfmex --version > /dev/null 2> /dev/null; then \ | 67 | ! pdfmex --version > /dev/null 2> /dev/null; then \ |
| 67 | echo "No mex format found."; false; \ | 68 | echo "No mex format found."; false; \ |
| 68 | fi | 69 | fi |
| 69 | pdftex -output-format=pdf $< | 70 | ${ENVADD} pdftex -output-format=pdf $< |
| 70 | 71 | ||
| 71 | ru-refcard.pdf: %.pdf: %.tex | 72 | ru-refcard.pdf: %.pdf: %.tex |
| 72 | pdflatex $< | 73 | pdflatex $< |
| @@ -81,21 +82,21 @@ gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf | |||
| 81 | pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' | 82 | pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' |
| 82 | 83 | ||
| 83 | ## Everything not explicitly listed above. | 84 | ## Everything not explicitly listed above. |
| 84 | %.pdf: %.tex | 85 | %.pdf: %.tex emacsver.tex |
| 85 | pdftex $< | 86 | ${ENVADD} pdftex $< |
| 86 | 87 | ||
| 87 | 88 | ||
| 88 | ## dvi files. | 89 | ## dvi files. |
| 89 | 90 | ||
| 90 | cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \ | 91 | cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \ |
| 91 | sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex | 92 | sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex emacsver.tex |
| 92 | csplain $< | 93 | ${ENVADD} csplain $< |
| 93 | 94 | ||
| 94 | pl-refcard.dvi: %.dvi: %.tex | 95 | pl-refcard.dvi: %.dvi: %.tex emacsver.tex |
| 95 | if ! kpsewhich -format=fmt mex > /dev/null; then \ | 96 | if ! kpsewhich -format=fmt mex > /dev/null; then \ |
| 96 | echo "No mex format found."; false; \ | 97 | echo "No mex format found."; false; \ |
| 97 | fi | 98 | fi |
| 98 | tex $< | 99 | ${ENVADD} tex $< |
| 99 | 100 | ||
| 100 | ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex | 101 | ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex |
| 101 | latex $< | 102 | latex $< |
| @@ -105,8 +106,8 @@ gnus-booklet.dvi: gnus-refcard.tex | |||
| 105 | mv gnus-refcard.dvi $@ | 106 | mv gnus-refcard.dvi $@ |
| 106 | 107 | ||
| 107 | ## Everything not explicitly listed above. | 108 | ## Everything not explicitly listed above. |
| 108 | %.dvi: %.tex | 109 | %.dvi: %.tex emacsver.tex |
| 109 | tex $< | 110 | ${ENVADD} tex $< |
| 110 | 111 | ||
| 111 | 112 | ||
| 112 | ## PostScript files. | 113 | ## PostScript files. |
diff --git a/etc/refcards/calccard.tex b/etc/refcards/calccard.tex index fd3d45b8da4..04c88befeea 100644 --- a/etc/refcards/calccard.tex +++ b/etc/refcards/calccard.tex | |||
| @@ -63,8 +63,7 @@ | |||
| 63 | % UUCP: mit-erl!gildea | 63 | % UUCP: mit-erl!gildea |
| 64 | % Internet: gildea@stop.mail-abuse.org | 64 | % Internet: gildea@stop.mail-abuse.org |
| 65 | 65 | ||
| 66 | \def\emacsversionnumber{24} | 66 | \input emacsver.tex |
| 67 | \def\year{2012} % latest copyright year | ||
| 68 | 67 | ||
| 69 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill | 68 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill |
| 70 | \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. | 69 | \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. |
| @@ -276,7 +275,7 @@ are preserved on all copies. | |||
| 276 | 275 | ||
| 277 | \title{GNU Calc Reference Card} | 276 | \title{GNU Calc Reference Card} |
| 278 | 277 | ||
| 279 | \centerline{(for GNU Emacs version \emacsversionnumber)} | 278 | \centerline{(for GNU Emacs version \versionemacs)} |
| 280 | 279 | ||
| 281 | \section{Starting and Stopping} | 280 | \section{Starting and Stopping} |
| 282 | 281 | ||
diff --git a/etc/refcards/cs-dired-ref.tex b/etc/refcards/cs-dired-ref.tex index ee7acaf416d..45867e11d44 100644 --- a/etc/refcards/cs-dired-ref.tex +++ b/etc/refcards/cs-dired-ref.tex | |||
| @@ -41,8 +41,7 @@ | |||
| 41 | \input pdflayout.sty | 41 | \input pdflayout.sty |
| 42 | \pdflayout=(0) | 42 | \pdflayout=(0) |
| 43 | 43 | ||
| 44 | \def\versionemacs{24} % version of Emacs this is for | 44 | \input emacsver.tex |
| 45 | \def\year{2012} % latest copyright year | ||
| 46 | 45 | ||
| 47 | % Nothing else needs to be changed. | 46 | % Nothing else needs to be changed. |
| 48 | 47 | ||
diff --git a/etc/refcards/cs-refcard.tex b/etc/refcards/cs-refcard.tex index d17e5c6ddeb..98842dd08e0 100644 --- a/etc/refcards/cs-refcard.tex +++ b/etc/refcards/cs-refcard.tex | |||
| @@ -59,8 +59,7 @@ | |||
| 59 | \input pdflayout.sty | 59 | \input pdflayout.sty |
| 60 | \pdflayout=(0) | 60 | \pdflayout=(0) |
| 61 | 61 | ||
| 62 | \def\versionemacs{24} % version of Emacs this is for | 62 | \input emacsver.tex |
| 63 | \def\year{2012} % latest copyright year | ||
| 64 | 63 | ||
| 65 | % Nothing else needs to be changed. | 64 | % Nothing else needs to be changed. |
| 66 | 65 | ||
diff --git a/etc/refcards/cs-survival.tex b/etc/refcards/cs-survival.tex index 5aa111c0297..4050cf0a1ab 100644 --- a/etc/refcards/cs-survival.tex +++ b/etc/refcards/cs-survival.tex | |||
| @@ -54,8 +54,7 @@ | |||
| 54 | % Czech hyphenation rules applied | 54 | % Czech hyphenation rules applied |
| 55 | \chyph | 55 | \chyph |
| 56 | 56 | ||
| 57 | \def\versionemacs{24} % version of Emacs this is for | 57 | \input emacsver.tex |
| 58 | \def\year{2012} % latest copyright year | ||
| 59 | 58 | ||
| 60 | \def\copyrightnotice{\penalty-1\vfill | 59 | \def\copyrightnotice{\penalty-1\vfill |
| 61 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter | 60 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter |
diff --git a/etc/refcards/de-refcard.tex b/etc/refcards/de-refcard.tex index ca3141b8390..906895b358a 100644 --- a/etc/refcards/de-refcard.tex +++ b/etc/refcards/de-refcard.tex | |||
| @@ -60,8 +60,7 @@ | |||
| 60 | \input german.sty | 60 | \input german.sty |
| 61 | \mdqoff % deactivates the "-char | 61 | \mdqoff % deactivates the "-char |
| 62 | 62 | ||
| 63 | \def\versionemacs{24} % version of Emacs this is for | 63 | \input emacsver.tex |
| 64 | \def\year{2012} % latest copyright year | ||
| 65 | 64 | ||
| 66 | % Nothing else needs to be changed below this line. | 65 | % Nothing else needs to be changed below this line. |
| 67 | 66 | ||
diff --git a/etc/refcards/dired-ref.tex b/etc/refcards/dired-ref.tex index 9ccf57682ff..b85bef1ce0b 100644 --- a/etc/refcards/dired-ref.tex +++ b/etc/refcards/dired-ref.tex | |||
| @@ -43,8 +43,7 @@ | |||
| 43 | \input pdflayout.sty | 43 | \input pdflayout.sty |
| 44 | \pdflayout=(1) | 44 | \pdflayout=(1) |
| 45 | 45 | ||
| 46 | \def\versionemacs{24} % version of Emacs this is for | 46 | \input emacsver.tex |
| 47 | \def\year{2012} % latest copyright year | ||
| 48 | 47 | ||
| 49 | % Nothing else needs to be changed. | 48 | % Nothing else needs to be changed. |
| 50 | 49 | ||
diff --git a/etc/refcards/emacsver.tex b/etc/refcards/emacsver.tex new file mode 100644 index 00000000000..620ee8ef9e0 --- /dev/null +++ b/etc/refcards/emacsver.tex | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | %% This file is not generated by configure, because then the provided | ||
| 2 | %% pdf files would always appear out-of-date. | ||
| 3 | \def\versionemacs{24} % major version of emacs | ||
| 4 | \def\year{2012} % latest copyright year | ||
diff --git a/etc/refcards/fr-dired-ref.tex b/etc/refcards/fr-dired-ref.tex index 2819bbaa25b..457ee2db472 100644 --- a/etc/refcards/fr-dired-ref.tex +++ b/etc/refcards/fr-dired-ref.tex | |||
| @@ -35,8 +35,7 @@ | |||
| 35 | \input pdflayout.sty | 35 | \input pdflayout.sty |
| 36 | \pdflayout=(0) | 36 | \pdflayout=(0) |
| 37 | 37 | ||
| 38 | \def\versionemacs{24} % version of Emacs this is for | 38 | \input emacsver.tex |
| 39 | \def\year{2012} % latest copyright year | ||
| 40 | 39 | ||
| 41 | % Nothing else needs to be changed. | 40 | % Nothing else needs to be changed. |
| 42 | 41 | ||
diff --git a/etc/refcards/fr-refcard.tex b/etc/refcards/fr-refcard.tex index ed82f00a85d..4fe94d79075 100644 --- a/etc/refcards/fr-refcard.tex +++ b/etc/refcards/fr-refcard.tex | |||
| @@ -56,8 +56,7 @@ | |||
| 56 | \input pdflayout.sty | 56 | \input pdflayout.sty |
| 57 | \pdflayout=(0l) | 57 | \pdflayout=(0l) |
| 58 | 58 | ||
| 59 | \def\versionemacs{24} % version of Emacs this is for | 59 | \input emacsver.tex |
| 60 | \def\year{2012} % latest copyright year | ||
| 61 | 60 | ||
| 62 | % Nothing else needs to be changed below this line. | 61 | % Nothing else needs to be changed below this line. |
| 63 | 62 | ||
diff --git a/etc/refcards/fr-survival.tex b/etc/refcards/fr-survival.tex index 1cd9cc4cf05..16d67f6b1cd 100644 --- a/etc/refcards/fr-survival.tex +++ b/etc/refcards/fr-survival.tex | |||
| @@ -49,8 +49,7 @@ | |||
| 49 | \input pdflayout.sty | 49 | \input pdflayout.sty |
| 50 | \pdflayout=(0) | 50 | \pdflayout=(0) |
| 51 | 51 | ||
| 52 | \def\versionemacs{24} % version of Emacs this is for | 52 | \input emacsver.tex |
| 53 | \def\year{2012} % latest copyright year | ||
| 54 | 53 | ||
| 55 | \def\copyrightnotice{\penalty-1\vfill | 54 | \def\copyrightnotice{\penalty-1\vfill |
| 56 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter | 55 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter |
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 3c0584d6db4..60e81f36d3e 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{7.8.11} | 2 | \def\orgversionnumber{7.8.11} |
| 3 | \def\versionyear{2012} % latest update | 3 | \def\versionyear{2012} % latest update |
| 4 | \def\year{2012} % latest copyright year | 4 | \input emacsver.tex |
| 5 | 5 | ||
| 6 | %**start of header | 6 | %**start of header |
| 7 | \newcount\columnsperpage | 7 | \newcount\columnsperpage |
diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex index 9cc6fc6a6cd..db814cfa8c2 100644 --- a/etc/refcards/pl-refcard.tex +++ b/etc/refcards/pl-refcard.tex | |||
| @@ -69,8 +69,7 @@ | |||
| 69 | \input pdflayout.sty | 69 | \input pdflayout.sty |
| 70 | \pdflayout=(0) | 70 | \pdflayout=(0) |
| 71 | 71 | ||
| 72 | \def\versionemacs{24} % version of Emacs this is for | 72 | \input emacsver.tex |
| 73 | \def\year{2012} % latest copyright year | ||
| 74 | 73 | ||
| 75 | % Nothing else needs to be changed. | 74 | % Nothing else needs to be changed. |
| 76 | 75 | ||
diff --git a/etc/refcards/pt-br-refcard.tex b/etc/refcards/pt-br-refcard.tex index c16d5096f30..d3fbe54ce87 100644 --- a/etc/refcards/pt-br-refcard.tex +++ b/etc/refcards/pt-br-refcard.tex | |||
| @@ -62,8 +62,7 @@ | |||
| 62 | \input pdflayout.sty | 62 | \input pdflayout.sty |
| 63 | \pdflayout=(0l) | 63 | \pdflayout=(0l) |
| 64 | 64 | ||
| 65 | \def\versionemacs{24} % version of Emacs this is for | 65 | \input emacsver.tex |
| 66 | \def\year{2012} % latest copyright year | ||
| 67 | 66 | ||
| 68 | % Nothing else needs to be changed below this line. | 67 | % Nothing else needs to be changed below this line. |
| 69 | 68 | ||
diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex index 70788e8c67b..6ca9856085d 100644 --- a/etc/refcards/refcard.tex +++ b/etc/refcards/refcard.tex | |||
| @@ -63,8 +63,7 @@ | |||
| 63 | 63 | ||
| 64 | % Nothing else needs to be changed below this line. | 64 | % Nothing else needs to be changed below this line. |
| 65 | 65 | ||
| 66 | \def\versionemacs{24} % version of Emacs this is for | 66 | \input emacsver.tex |
| 67 | \def\year{2012} % copyright year | ||
| 68 | 67 | ||
| 69 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill | 68 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill |
| 70 | \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. | 69 | \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. |
diff --git a/etc/refcards/sk-dired-ref.tex b/etc/refcards/sk-dired-ref.tex index 4b12b0b42eb..50d17409072 100644 --- a/etc/refcards/sk-dired-ref.tex +++ b/etc/refcards/sk-dired-ref.tex | |||
| @@ -42,8 +42,7 @@ | |||
| 42 | \input pdflayout.sty | 42 | \input pdflayout.sty |
| 43 | \pdflayout=(0) | 43 | \pdflayout=(0) |
| 44 | 44 | ||
| 45 | \def\versionemacs{24} % version of Emacs this is for | 45 | \input emacsver.tex |
| 46 | \def\year{2012} % latest copyright year | ||
| 47 | 46 | ||
| 48 | % Nothing else needs to be changed. | 47 | % Nothing else needs to be changed. |
| 49 | 48 | ||
diff --git a/etc/refcards/sk-refcard.tex b/etc/refcards/sk-refcard.tex index 5105e8ca986..e617387fad1 100644 --- a/etc/refcards/sk-refcard.tex +++ b/etc/refcards/sk-refcard.tex | |||
| @@ -60,8 +60,7 @@ | |||
| 60 | \input pdflayout.sty | 60 | \input pdflayout.sty |
| 61 | \pdflayout=(0) | 61 | \pdflayout=(0) |
| 62 | 62 | ||
| 63 | \def\versionemacs{24} % version of Emacs this is for | 63 | \input emacsver.tex |
| 64 | \def\year{2012} % latest copyright year | ||
| 65 | 64 | ||
| 66 | % Nothing else needs to be changed. | 65 | % Nothing else needs to be changed. |
| 67 | 66 | ||
diff --git a/etc/refcards/sk-survival.tex b/etc/refcards/sk-survival.tex index 7597c63f5c7..2e7ac9b9298 100644 --- a/etc/refcards/sk-survival.tex +++ b/etc/refcards/sk-survival.tex | |||
| @@ -55,8 +55,7 @@ | |||
| 55 | % Slovak hyphenation rules applied | 55 | % Slovak hyphenation rules applied |
| 56 | \shyph | 56 | \shyph |
| 57 | 57 | ||
| 58 | \def\versionemacs{24} % version of Emacs this is for | 58 | \input emacsver.tex |
| 59 | \def\year{2012} % latest copyright year | ||
| 60 | 59 | ||
| 61 | \def\copyrightnotice{\penalty-1\vfill | 60 | \def\copyrightnotice{\penalty-1\vfill |
| 62 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter | 61 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter |
diff --git a/etc/refcards/survival.tex b/etc/refcards/survival.tex index 92d178a130a..09151e9801c 100644 --- a/etc/refcards/survival.tex +++ b/etc/refcards/survival.tex | |||
| @@ -44,8 +44,7 @@ | |||
| 44 | \input pdflayout.sty | 44 | \input pdflayout.sty |
| 45 | \pdflayout=(1) | 45 | \pdflayout=(1) |
| 46 | 46 | ||
| 47 | \def\versionemacs{24} % version of Emacs this is for | 47 | \input emacsver.tex |
| 48 | \def\year{2012} % latest copyright year | ||
| 49 | 48 | ||
| 50 | \def\copyrightnotice{\penalty-1\vfill | 49 | \def\copyrightnotice{\penalty-1\vfill |
| 51 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter | 50 | \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter |
diff --git a/etc/refcards/vipcard.tex b/etc/refcards/vipcard.tex index 13b43dbab73..2a709dc79f2 100644 --- a/etc/refcards/vipcard.tex +++ b/etc/refcards/vipcard.tex | |||
| @@ -49,8 +49,8 @@ | |||
| 49 | \input pdflayout.sty | 49 | \input pdflayout.sty |
| 50 | \pdflayout=(1) | 50 | \pdflayout=(1) |
| 51 | 51 | ||
| 52 | \input emacsver.tex | ||
| 52 | \def\versionemacs{18} % version of Emacs this is for | 53 | \def\versionemacs{18} % version of Emacs this is for |
| 53 | \def\year{2012} % latest copyright year | ||
| 54 | \def\versionvip{3.5} | 54 | \def\versionvip{3.5} |
| 55 | 55 | ||
| 56 | % Nothing else needs to be changed. | 56 | % Nothing else needs to be changed. |
diff --git a/etc/refcards/viperCard.tex b/etc/refcards/viperCard.tex index a8694dd3bed..c6ab31cdb83 100644 --- a/etc/refcards/viperCard.tex +++ b/etc/refcards/viperCard.tex | |||
| @@ -52,8 +52,8 @@ | |||
| 52 | \input pdflayout.sty | 52 | \input pdflayout.sty |
| 53 | \pdflayout=(1) | 53 | \pdflayout=(1) |
| 54 | 54 | ||
| 55 | \input emacsver.tex | ||
| 55 | \def\versionemacs{21} % version of Emacs this is for | 56 | \def\versionemacs{21} % version of Emacs this is for |
| 56 | \def\year{2012} % latest copyright year | ||
| 57 | \def\versionxemacs{20} % version of XEmacs this is for | 57 | \def\versionxemacs{20} % version of XEmacs this is for |
| 58 | \def\versionviper{3.0} % version of Viper this is for | 58 | \def\versionviper{3.0} % version of Viper this is for |
| 59 | 59 | ||
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index f8569fe3747..056ed471fde 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -3516,8 +3516,7 @@ usage (int error) | |||
| 3516 | static _Noreturn void | 3516 | static _Noreturn void |
| 3517 | version (void) | 3517 | version (void) |
| 3518 | { | 3518 | { |
| 3519 | /* Makes it easier to update automatically. */ | 3519 | char emacs_copyright[] = COPYRIGHT; |
| 3520 | char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; | ||
| 3521 | 3520 | ||
| 3522 | printf ("ebrowse %s\n", VERSION); | 3521 | printf ("ebrowse %s\n", VERSION); |
| 3523 | puts (emacs_copyright); | 3522 | puts (emacs_copyright); |
diff --git a/lib-src/etags.c b/lib-src/etags.c index e65082de534..ec415e9905f 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -836,8 +836,7 @@ etags --help --lang=ada."); | |||
| 836 | static void | 836 | static void |
| 837 | print_version (void) | 837 | print_version (void) |
| 838 | { | 838 | { |
| 839 | /* Makes it easier to update automatically. */ | 839 | char emacs_copyright[] = COPYRIGHT; |
| 840 | char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; | ||
| 841 | 840 | ||
| 842 | printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION); | 841 | printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION); |
| 843 | puts (emacs_copyright); | 842 | puts (emacs_copyright); |
diff --git a/lisp/align.el b/lisp/align.el index 4c82d7bea81..0af5e56c668 100644 --- a/lisp/align.el +++ b/lisp/align.el | |||
| @@ -74,7 +74,7 @@ | |||
| 74 | ;; align-?-modes variables (for example, `align-dq-string-modes'), use | 74 | ;; align-?-modes variables (for example, `align-dq-string-modes'), use |
| 75 | ;; `add-to-list', or some similar function which checks first to see | 75 | ;; `add-to-list', or some similar function which checks first to see |
| 76 | ;; if the value is already there. Since the user may customize that | 76 | ;; if the value is already there. Since the user may customize that |
| 77 | ;; mode list, and then write your mode name into their .emacs file, | 77 | ;; mode list, and then write your mode name into their init file, |
| 78 | ;; causing the symbol already to be present the next time they load | 78 | ;; causing the symbol already to be present the next time they load |
| 79 | ;; your package. | 79 | ;; your package. |
| 80 | 80 | ||
| @@ -1201,7 +1201,10 @@ have been aligned. No changes will be made to the buffer." | |||
| 1201 | (gocol col) cur) | 1201 | (gocol col) cur) |
| 1202 | (when area | 1202 | (when area |
| 1203 | (if func | 1203 | (if func |
| 1204 | (funcall func (car area) (cdr area) change) | 1204 | (funcall func |
| 1205 | (marker-position (car area)) | ||
| 1206 | (marker-position (cdr area)) | ||
| 1207 | change) | ||
| 1205 | (if (not (and justify | 1208 | (if (not (and justify |
| 1206 | (consp (cdr area)))) | 1209 | (consp (cdr area)))) |
| 1207 | (goto-char (cdr area)) | 1210 | (goto-char (cdr area)) |
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index fbf8c466585..21c35811ac3 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | ;; setq auto-insert-directory to an appropriate slash-terminated value | 36 | ;; setq auto-insert-directory to an appropriate slash-terminated value |
| 37 | ;; | 37 | ;; |
| 38 | ;; You can also customize the variable `auto-insert-mode' to load the | 38 | ;; You can also customize the variable `auto-insert-mode' to load the |
| 39 | ;; package. Alternatively, add the following to your .emacs file: | 39 | ;; package. Alternatively, add the following to your init file: |
| 40 | ;; (auto-insert-mode 1) | 40 | ;; (auto-insert-mode 1) |
| 41 | ;; | 41 | ;; |
| 42 | ;; Author: Charlie Martin | 42 | ;; Author: Charlie Martin |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 75a8d9f59dc..31bbc13acf9 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -144,10 +144,7 @@ You can toggle whether files are shown with \\<bookmark-bmenu-mode-map>\\[bookma | |||
| 144 | 144 | ||
| 145 | (defcustom bookmark-bmenu-toggle-filenames t | 145 | (defcustom bookmark-bmenu-toggle-filenames t |
| 146 | "Non-nil means show filenames when listing bookmarks. | 146 | "Non-nil means show filenames when listing bookmarks. |
| 147 | This may result in truncated bookmark names. To disable this, put the | 147 | A non-nil value may result in truncated bookmark names." |
| 148 | following in your `.emacs' file: | ||
| 149 | |||
| 150 | \(setq bookmark-bmenu-toggle-filenames nil)" | ||
| 151 | :type 'boolean | 148 | :type 'boolean |
| 152 | :group 'bookmark) | 149 | :group 'bookmark) |
| 153 | 150 | ||
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 7089070df59..c7d93530fd7 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | (declare-function math-vector-is-string "calccomp" (a)) | 61 | (declare-function math-vector-is-string "calccomp" (a)) |
| 62 | (declare-function math-vector-to-string "calccomp" (a &optional quoted)) | 62 | (declare-function math-vector-to-string "calccomp" (a &optional quoted)) |
| 63 | (declare-function math-format-radix-float "calc-bin" (a prec)) | 63 | (declare-function math-format-radix-float "calc-bin" (a prec)) |
| 64 | (declare-function math-compose-expr "calccomp" (a prec)) | 64 | (declare-function math-compose-expr "calccomp" (a prec &optional div)) |
| 65 | (declare-function math-abs "calc-arith" (a)) | 65 | (declare-function math-abs "calc-arith" (a)) |
| 66 | (declare-function math-format-bignum-binary "calc-bin" (a)) | 66 | (declare-function math-format-bignum-binary "calc-bin" (a)) |
| 67 | (declare-function math-format-bignum-octal "calc-bin" (a)) | 67 | (declare-function math-format-bignum-octal "calc-bin" (a)) |
| @@ -3483,7 +3483,7 @@ If X is not an error form, return 1." | |||
| 3483 | (substring str i)))) | 3483 | (substring str i)))) |
| 3484 | str)) | 3484 | str)) |
| 3485 | 3485 | ||
| 3486 | ;;; Users can redefine this in their .emacs files. | 3486 | ;;; Users can redefine this in their init files. |
| 3487 | (defvar calc-keypad-user-menu nil | 3487 | (defvar calc-keypad-user-menu nil |
| 3488 | "If non-nil, this describes an additional menu for calc-keypad. | 3488 | "If non-nil, this describes an additional menu for calc-keypad. |
| 3489 | It should contain a list of three rows. | 3489 | It should contain a list of three rows. |
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index dfc5dfc6588..bd748158d66 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el | |||
| @@ -494,7 +494,7 @@ | |||
| 494 | (car res)))))))) | 494 | (car res)))))))) |
| 495 | 495 | ||
| 496 | 496 | ||
| 497 | ;;; It is safe to redefine these in your .emacs file to use a different | 497 | ;;; It is safe to redefine these in your init file to use a different |
| 498 | ;;; language. | 498 | ;;; language. |
| 499 | 499 | ||
| 500 | (defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday" | 500 | (defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday" |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 3e6ae1c7404..17f0998d30b 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -199,7 +199,7 @@ | |||
| 199 | (declare-function calc-div-fractions "calc-frac" (a b)) | 199 | (declare-function calc-div-fractions "calc-frac" (a b)) |
| 200 | (declare-function math-div-objects-fancy "calc-arith" (a b)) | 200 | (declare-function math-div-objects-fancy "calc-arith" (a b)) |
| 201 | (declare-function math-div-symb-fancy "calc-arith" (a b)) | 201 | (declare-function math-div-symb-fancy "calc-arith" (a b)) |
| 202 | (declare-function math-compose-expr "calccomp" (a prec)) | 202 | (declare-function math-compose-expr "calccomp" (a prec &optional div)) |
| 203 | (declare-function math-comp-width "calccomp" (c)) | 203 | (declare-function math-comp-width "calccomp" (c)) |
| 204 | (declare-function math-composition-to-string "calccomp" (c &optional width)) | 204 | (declare-function math-composition-to-string "calccomp" (c &optional width)) |
| 205 | (declare-function math-stack-value-offset-fancy "calccomp" ()) | 205 | (declare-function math-stack-value-offset-fancy "calccomp" ()) |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index d5514d14a32..cdbf8d7aa86 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -593,7 +593,7 @@ You can customize `diary-date-forms' to your preferred format. | |||
| 593 | Three default styles are provided: `diary-american-date-forms', | 593 | Three default styles are provided: `diary-american-date-forms', |
| 594 | `diary-european-date-forms', and `diary-iso-date-forms'. | 594 | `diary-european-date-forms', and `diary-iso-date-forms'. |
| 595 | You can choose between these by setting `calendar-date-style' in your | 595 | You can choose between these by setting `calendar-date-style' in your |
| 596 | .emacs file, or by using `calendar-set-date-style' when in the calendar. | 596 | init file, or by using `calendar-set-date-style' when in the calendar. |
| 597 | 597 | ||
| 598 | A diary entry can be preceded by the character `diary-nonmarking-symbol' | 598 | A diary entry can be preceded by the character `diary-nonmarking-symbol' |
| 599 | \(ordinarily `&') to make that entry nonmarking--that is, it will not be | 599 | \(ordinarily `&') to make that entry nonmarking--that is, it will not be |
| @@ -1276,7 +1276,7 @@ Runs the following hooks: | |||
| 1276 | generating a calendar, if today's date is visible or not, respectively | 1276 | generating a calendar, if today's date is visible or not, respectively |
| 1277 | `calendar-initial-window-hook' - after first creating a calendar | 1277 | `calendar-initial-window-hook' - after first creating a calendar |
| 1278 | 1278 | ||
| 1279 | This function is suitable for execution in a .emacs file." | 1279 | This function is suitable for execution in an init file." |
| 1280 | (interactive "P") | 1280 | (interactive "P") |
| 1281 | ;; Avoid loading cal-x unless it will be used. | 1281 | ;; Avoid loading cal-x unless it will be used. |
| 1282 | (if (and (memq calendar-setup '(one-frame two-frames calendar-only)) | 1282 | (if (and (memq calendar-setup '(one-frame two-frames calendar-only)) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 8fa5b0ddb07..4bce8ec0927 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -200,19 +200,21 @@ holidays), or hard copy output." | |||
| 200 | 'diary-list-entries-hook "23.1") | 200 | 'diary-list-entries-hook "23.1") |
| 201 | 201 | ||
| 202 | (defcustom diary-list-entries-hook nil | 202 | (defcustom diary-list-entries-hook nil |
| 203 | "List of functions called after diary file is culled for relevant entries. | 203 | "Hook run after diary file is culled for relevant entries. |
| 204 | You might wish to add `diary-include-other-diary-files', in which case | 204 | |
| 205 | you will probably also want to add `diary-mark-included-diary-files' to | 205 | If you add `diary-include-other-diary-files' to this hook, you |
| 206 | `diary-mark-entries-hook'. For example, you could use | 206 | will probably also want to add `diary-mark-included-diary-files' |
| 207 | to `diary-mark-entries-hook'. For example, to cause the fancy | ||
| 208 | diary buffer to be displayed with diary entries from various | ||
| 209 | included files, each day's entries sorted into lexicographic | ||
| 210 | order, add the following to your init file: | ||
| 207 | 211 | ||
| 208 | (setq diary-display-function 'diary-fancy-display) | 212 | (setq diary-display-function 'diary-fancy-display) |
| 209 | (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) | 213 | (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) |
| 210 | (add-hook 'diary-list-entries-hook 'diary-sort-entries t) | 214 | (add-hook 'diary-list-entries-hook 'diary-sort-entries t) |
| 211 | 215 | ||
| 212 | in your `.emacs' file to cause the fancy diary buffer to be displayed with | 216 | Note how the sort function is placed last, so that it can sort |
| 213 | diary entries from various included files, each day's entries sorted into | 217 | the entries included from other files. |
| 214 | lexicographic order. Note how the sort function is placed last, | ||
| 215 | so that it can sort the entries included from other files. | ||
| 216 | 218 | ||
| 217 | This hook runs after `diary-nongregorian-listing-hook'. These two hooks | 219 | This hook runs after `diary-nongregorian-listing-hook'. These two hooks |
| 218 | differ only if you are using included diary files. In that case, | 220 | differ only if you are using included diary files. In that case, |
| @@ -532,7 +534,7 @@ If so, return the expanded file name, otherwise signal an error." | |||
| 532 | "Generate the diary window for ARG days starting with the current date. | 534 | "Generate the diary window for ARG days starting with the current date. |
| 533 | If no argument is provided, the number of days of diary entries is governed | 535 | If no argument is provided, the number of days of diary entries is governed |
| 534 | by the variable `diary-number-of-entries'. A value of ARG less than 1 | 536 | by the variable `diary-number-of-entries'. A value of ARG less than 1 |
| 535 | does nothing. This function is suitable for execution in a `.emacs' file." | 537 | does nothing. This function is suitable for execution in an init file." |
| 536 | (interactive "P") | 538 | (interactive "P") |
| 537 | (diary-check-diary-file) | 539 | (diary-check-diary-file) |
| 538 | (diary-list-entries (calendar-current-date) | 540 | (diary-list-entries (calendar-current-date) |
| @@ -1230,8 +1232,8 @@ Mail is sent to the address specified by `diary-mail-addr'. | |||
| 1230 | 1232 | ||
| 1231 | Here is an example of a script to call `diary-mail-entries', | 1233 | Here is an example of a script to call `diary-mail-entries', |
| 1232 | suitable for regular scheduling using cron (or at). Note that | 1234 | suitable for regular scheduling using cron (or at). Note that |
| 1233 | since `emacs -script' does not load your `.emacs' file, you | 1235 | since `emacs -script' does not load your init file, you should |
| 1234 | should ensure that all relevant variables are set. | 1236 | ensure that all relevant variables are set. |
| 1235 | 1237 | ||
| 1236 | #!/usr/bin/emacs -script | 1238 | #!/usr/bin/emacs -script |
| 1237 | ;; diary-rem.el - run the Emacs diary-reminder | 1239 | ;; diary-rem.el - run the Emacs diary-reminder |
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 9643a1e2905..b94815f98ea 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el | |||
| @@ -343,12 +343,12 @@ See the documentation for `calendar-holidays' for details." | |||
| 343 | "List of notable days for the command \\[holidays]. | 343 | "List of notable days for the command \\[holidays]. |
| 344 | 344 | ||
| 345 | Additional holidays are easy to add to the list, just put them in the | 345 | Additional holidays are easy to add to the list, just put them in the |
| 346 | list `holiday-other-holidays' in your .emacs file. Similarly, by setting | 346 | list `holiday-other-holidays' in your init file. Similarly, by setting |
| 347 | any of `holiday-general-holidays', `holiday-local-holidays', | 347 | any of `holiday-general-holidays', `holiday-local-holidays', |
| 348 | `holiday-christian-holidays', `holiday-hebrew-holidays', | 348 | `holiday-christian-holidays', `holiday-hebrew-holidays', |
| 349 | `holiday-islamic-holidays', `holiday-bahai-holidays', | 349 | `holiday-islamic-holidays', `holiday-bahai-holidays', |
| 350 | `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your | 350 | `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your |
| 351 | .emacs file, you can eliminate unwanted categories of holidays. | 351 | init file, you can eliminate unwanted categories of holidays. |
| 352 | 352 | ||
| 353 | The aforementioned variables control the holiday choices offered | 353 | The aforementioned variables control the holiday choices offered |
| 354 | by the function `holiday-list' when it is called interactively. | 354 | by the function `holiday-list' when it is called interactively. |
| @@ -523,7 +523,7 @@ use instead of point." | |||
| 523 | (defun holidays (&optional arg) | 523 | (defun holidays (&optional arg) |
| 524 | "Display the holidays for last month, this month, and next month. | 524 | "Display the holidays for last month, this month, and next month. |
| 525 | If called with an optional prefix argument ARG, prompts for month and year. | 525 | If called with an optional prefix argument ARG, prompts for month and year. |
| 526 | This function is suitable for execution in a .emacs file." | 526 | This function is suitable for execution in a init file." |
| 527 | (interactive "P") | 527 | (interactive "P") |
| 528 | (save-excursion | 528 | (save-excursion |
| 529 | (let* ((completion-ignore-case t) | 529 | (let* ((completion-ignore-case t) |
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 8f09d20f50e..2761df0bdb1 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el | |||
| @@ -236,7 +236,7 @@ use instead of point." | |||
| 236 | (defun lunar-phases (&optional arg) | 236 | (defun lunar-phases (&optional arg) |
| 237 | "Display the quarters of the moon for last month, this month, and next month. | 237 | "Display the quarters of the moon for last month, this month, and next month. |
| 238 | If called with an optional prefix argument ARG, prompts for month and year. | 238 | If called with an optional prefix argument ARG, prompts for month and year. |
| 239 | This function is suitable for execution in a .emacs file." | 239 | This function is suitable for execution in an init file." |
| 240 | (interactive "P") | 240 | (interactive "P") |
| 241 | (save-excursion | 241 | (save-excursion |
| 242 | (let* ((date (if arg (calendar-read-date t) | 242 | (let* ((date (if arg (calendar-read-date t) |
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index a8d7d44af3b..3ccdf135fb6 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el | |||
| @@ -797,7 +797,7 @@ If called with an optional prefix argument ARG, prompt for date. | |||
| 797 | If called with an optional double prefix argument, prompt for | 797 | If called with an optional double prefix argument, prompt for |
| 798 | longitude, latitude, time zone, and date, and always use standard time. | 798 | longitude, latitude, time zone, and date, and always use standard time. |
| 799 | 799 | ||
| 800 | This function is suitable for execution in a .emacs file." | 800 | This function is suitable for execution in an init file." |
| 801 | (interactive "p") | 801 | (interactive "p") |
| 802 | (or arg (setq arg 1)) | 802 | (or arg (setq arg 1)) |
| 803 | (if (and (< arg 16) | 803 | (if (and (< arg 16) |
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index 2ebb8c7c3ae..3151ce145de 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | ;; If you want Emacs to display the amount of time "left" to your | 49 | ;; If you want Emacs to display the amount of time "left" to your |
| 50 | ;; workday in the mode-line, you can either set the value of | 50 | ;; workday in the mode-line, you can either set the value of |
| 51 | ;; `timeclock-mode-line-display' to t using M-x customize, or you can | 51 | ;; `timeclock-mode-line-display' to t using M-x customize, or you can |
| 52 | ;; add this code to your .emacs file: | 52 | ;; add this code to your init file: |
| 53 | ;; | 53 | ;; |
| 54 | ;; (require 'timeclock) | 54 | ;; (require 'timeclock) |
| 55 | ;; (timeclock-mode-line-display) | 55 | ;; (timeclock-mode-line-display) |
| @@ -60,7 +60,7 @@ | |||
| 60 | ;; You may also want Emacs to ask you before exiting, if you are | 60 | ;; You may also want Emacs to ask you before exiting, if you are |
| 61 | ;; currently working on a project. This can be done either by setting | 61 | ;; currently working on a project. This can be done either by setting |
| 62 | ;; `timeclock-ask-before-exiting' to t using M-x customize (this is | 62 | ;; `timeclock-ask-before-exiting' to t using M-x customize (this is |
| 63 | ;; the default), or by adding the following to your .emacs file: | 63 | ;; the default), or by adding the following to your init file: |
| 64 | ;; | 64 | ;; |
| 65 | ;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out) | 65 | ;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out) |
| 66 | 66 | ||
diff --git a/lisp/comint.el b/lisp/comint.el index 5b0eb3027e6..994d81a375a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -181,7 +181,7 @@ override the read-only-ness of comint prompts is to call | |||
| 181 | `comint-kill-whole-line' or `comint-kill-region' with no | 181 | `comint-kill-whole-line' or `comint-kill-region' with no |
| 182 | narrowing in effect. This way you will be certain that none of | 182 | narrowing in effect. This way you will be certain that none of |
| 183 | the remaining prompts will be accidentally messed up. You may | 183 | the remaining prompts will be accidentally messed up. You may |
| 184 | wish to put something like the following in your `.emacs' file: | 184 | wish to put something like the following in your init file: |
| 185 | 185 | ||
| 186 | \(add-hook 'comint-mode-hook | 186 | \(add-hook 'comint-mode-hook |
| 187 | (lambda () | 187 | (lambda () |
| @@ -3161,8 +3161,8 @@ See `completion-table-with-quoting' and `comint-unquote-function'.") | |||
| 3161 | (complete-with-action action table string pred)))) | 3161 | (complete-with-action action table string pred)))) |
| 3162 | (unless (zerop (length filesuffix)) | 3162 | (unless (zerop (length filesuffix)) |
| 3163 | (list :exit-function | 3163 | (list :exit-function |
| 3164 | (lambda (_s finished) | 3164 | (lambda (_s status) |
| 3165 | (when (memq finished '(sole finished)) | 3165 | (when (eq status 'finished) |
| 3166 | (if (looking-at (regexp-quote filesuffix)) | 3166 | (if (looking-at (regexp-quote filesuffix)) |
| 3167 | (goto-char (match-end 0)) | 3167 | (goto-char (match-end 0)) |
| 3168 | (insert filesuffix))))))))) | 3168 | (insert filesuffix))))))))) |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 86a19131569..2e6f2b14625 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -526,7 +526,10 @@ WIDGET is the widget to apply the filter entries of MENU on." | |||
| 526 | :type 'boolean) | 526 | :type 'boolean) |
| 527 | 527 | ||
| 528 | (defcustom custom-unlispify-remove-prefixes nil | 528 | (defcustom custom-unlispify-remove-prefixes nil |
| 529 | "Non-nil means remove group prefixes from option names in buffer." | 529 | "Non-nil means remove group prefixes from option names in buffer. |
| 530 | Discarding prefixes often leads to confusing names for options | ||
| 531 | and faces in Customize buffers, so do not set this to a non-nil | ||
| 532 | value unless you are sure you know what it does." | ||
| 530 | :group 'custom-menu | 533 | :group 'custom-menu |
| 531 | :group 'custom-buffer | 534 | :group 'custom-buffer |
| 532 | :type 'boolean) | 535 | :type 'boolean) |
diff --git a/lisp/custom.el b/lisp/custom.el index 3eb2895888d..dfc8e631152 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -237,7 +237,7 @@ The following keywords are meaningful: | |||
| 237 | is `default-value'. | 237 | is `default-value'. |
| 238 | :require | 238 | :require |
| 239 | VALUE should be a feature symbol. If you save a value | 239 | VALUE should be a feature symbol. If you save a value |
| 240 | for this option, then when your `.emacs' file loads the value, | 240 | for this option, then when your init file loads the value, |
| 241 | it does (require VALUE) first. | 241 | it does (require VALUE) first. |
| 242 | :set-after VARIABLES | 242 | :set-after VARIABLES |
| 243 | Specifies that SYMBOL should be set after the list of variables | 243 | Specifies that SYMBOL should be set after the list of variables |
| @@ -350,68 +350,62 @@ FACE does not need to be quoted. | |||
| 350 | 350 | ||
| 351 | Third argument DOC is the face documentation. | 351 | Third argument DOC is the face documentation. |
| 352 | 352 | ||
| 353 | If FACE has been set with `custom-set-faces', set the face attributes | 353 | If FACE has been set with `custom-set-faces', set the face |
| 354 | as specified by that function, otherwise set the face attributes | 354 | attributes as specified by that function, otherwise set the face |
| 355 | according to SPEC. | 355 | attributes according to SPEC. |
| 356 | |||
| 357 | The remaining arguments should have the form | ||
| 358 | |||
| 359 | [KEYWORD VALUE]... | ||
| 360 | 356 | ||
| 357 | The remaining arguments should have the form [KEYWORD VALUE]... | ||
| 361 | For a list of valid keywords, see the common keywords listed in | 358 | For a list of valid keywords, see the common keywords listed in |
| 362 | `defcustom'. | 359 | `defcustom'. |
| 363 | 360 | ||
| 364 | SPEC should be an alist of the form ((DISPLAY ATTS)...). | 361 | SPEC should be an alist of the form |
| 365 | 362 | ||
| 366 | In the first element, DISPLAY can be `default'. The ATTS in that | 363 | ((DISPLAY . ATTS)...) |
| 367 | element then act as defaults for all the following elements. | 364 | |
| 368 | 365 | where DISPLAY is a form specifying conditions to match certain | |
| 369 | Aside from that, DISPLAY specifies conditions to match some or | 366 | terminals and ATTS is a property list (ATTR VALUE ATTR VALUE...) |
| 370 | all frames. For each frame, the first element of SPEC where the | 367 | specifying face attributes and values for frames on those |
| 371 | DISPLAY conditions are satisfied is the one that applies to that | 368 | terminals. On each terminal, the first element with a matching |
| 372 | frame. The ATTRs in this element take effect, and the following | 369 | DISPLAY specification takes effect, and the remaining elements in |
| 373 | elements are ignored, on that frame. | 370 | SPEC are disregarded. |
| 374 | 371 | ||
| 375 | In the last element, DISPLAY can be t. That element applies to a | 372 | As a special exception, in the first element of SPEC, DISPLAY can |
| 376 | frame if none of the previous elements (except the `default' if | 373 | be the special value `default'. Then the ATTS in that element |
| 377 | any) did. | 374 | act as defaults for all the following elements. |
| 378 | 375 | ||
| 379 | ATTS is a list of face attributes followed by their values: | 376 | For backward compatibility, elements of SPEC can be written |
| 380 | (ATTR VALUE ATTR VALUE...) | 377 | as (DISPLAY ATTS) instead of (DISPLAY . ATTS). |
| 381 | 378 | ||
| 382 | The possible attributes are `:family', `:width', `:height', `:weight', | 379 | Each DISPLAY can have the following values: |
| 383 | `:slant', `:underline', `:overline', `:strike-through', `:box', | 380 | - `default' (only in the first element). |
| 384 | `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. | 381 | - The symbol t, which matches all terminals. |
| 385 | 382 | - An alist of conditions. Each alist element must have the form | |
| 386 | DISPLAY can be `default' (only in the first element), the symbol | 383 | (REQ ITEM...). A matching terminal must satisfy each |
| 387 | t (only in the last element) to match all frames, or an alist of | 384 | specified condition by matching one of its ITEMs. Each REQ |
| 388 | conditions of the form \(REQ ITEM...). For such an alist to | 385 | must be one of the following: |
| 389 | match a frame, each of the conditions must be satisfied, meaning | 386 | - `type' (the terminal type). |
| 390 | that the REQ property of the frame must match one of the | 387 | Each ITEM must be one of the values returned by |
| 391 | corresponding ITEMs. These are the defined REQ values: | 388 | `window-system'. Under X, additional allowed values are |
| 392 | 389 | `motif', `lucid', `gtk' and `x-toolkit'. | |
| 393 | `type' (the value of `window-system') | 390 | - `class' (the terminal's color support). |
| 394 | Under X, in addition to the values `window-system' can take, | 391 | Each ITEM should be one of `color', `grayscale', or `mono'. |
| 395 | `motif', `lucid', `gtk' and `x-toolkit' are allowed, and match when | 392 | - `background' (what color is used for the background text) |
| 396 | the Motif toolkit, Lucid toolkit, GTK toolkit or any X toolkit is in use. | 393 | Each ITEM should be one of `light' or `dark'. |
| 397 | 394 | - `min-colors' (the minimum number of supported colors) | |
| 398 | `class' (the frame's color support) | 395 | Each ITEM should be an integer, which is compared with the |
| 399 | Should be one of `color', `grayscale', or `mono'. | 396 | result of `display-color-cells'. |
| 400 | 397 | - `supports' (match terminals supporting certain attributes). | |
| 401 | `background' (what color is used for the background text) | 398 | Each ITEM should be a list of face attributes. See |
| 402 | Should be one of `light' or `dark'. | 399 | `display-supports-face-attributes-p' for more information on |
| 403 | 400 | exactly how testing is done. | |
| 404 | `min-colors' (the minimum number of colors the frame should support) | 401 | |
| 405 | Should be an integer, it is compared with the result of | 402 | In the ATTS property list, possible attributes are `:family', |
| 406 | `display-color-cells'. | 403 | `:width', `:height', `:weight', `:slant', `:underline', |
| 407 | 404 | `:overline', `:strike-through', `:box', `:foreground', | |
| 408 | `supports' (only match frames that support the specified face attributes) | 405 | `:background', `:stipple', `:inverse-video', and `:inherit'. |
| 409 | Should be a list of face attributes. See the documentation for | 406 | |
| 410 | the function `display-supports-face-attributes-p' for more | 407 | See Info node `(elisp) Faces' in the Emacs Lisp manual for more |
| 411 | information on exactly how testing is done. | 408 | information." |
| 412 | |||
| 413 | See Info node `(elisp) Customization' in the Emacs Lisp manual | ||
| 414 | for more information." | ||
| 415 | (declare (doc-string 3)) | 409 | (declare (doc-string 3)) |
| 416 | ;; It is better not to use backquote in this file, | 410 | ;; It is better not to use backquote in this file, |
| 417 | ;; because that makes a bootstrapping problem | 411 | ;; because that makes a bootstrapping problem |
| @@ -1227,7 +1221,7 @@ query also about adding HASH to `custom-safe-themes'." | |||
| 1227 | (save-window-excursion | 1221 | (save-window-excursion |
| 1228 | (rename-buffer "*Custom Theme*" t) | 1222 | (rename-buffer "*Custom Theme*" t) |
| 1229 | (emacs-lisp-mode) | 1223 | (emacs-lisp-mode) |
| 1230 | (setq window (pop-to-buffer (current-buffer))) | 1224 | (pop-to-buffer (current-buffer)) |
| 1231 | (goto-char (point-min)) | 1225 | (goto-char (point-min)) |
| 1232 | (prog1 (when (y-or-n-p "Loading a theme can run Lisp code. Really load? ") | 1226 | (prog1 (when (y-or-n-p "Loading a theme can run Lisp code. Really load? ") |
| 1233 | ;; Offer to save to `custom-safe-themes'. | 1227 | ;; Offer to save to `custom-safe-themes'. |
diff --git a/lisp/desktop.el b/lisp/desktop.el index a873a6b63bf..75deb58b4d8 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; - some local variables | 34 | ;; - some local variables |
| 35 | 35 | ||
| 36 | ;; To use this, use customize to turn on desktop-save-mode or add the | 36 | ;; To use this, use customize to turn on desktop-save-mode or add the |
| 37 | ;; following line somewhere in your .emacs file: | 37 | ;; following line somewhere in your init file: |
| 38 | ;; | 38 | ;; |
| 39 | ;; (desktop-save-mode 1) | 39 | ;; (desktop-save-mode 1) |
| 40 | ;; | 40 | ;; |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 1f8e8068de3..e5ca463e8d4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -244,7 +244,10 @@ List has a form of (file-name full-file-name (attribute-list))." | |||
| 244 | (function dired-check-process) | 244 | (function dired-check-process) |
| 245 | (append | 245 | (append |
| 246 | (list operation program) | 246 | (list operation program) |
| 247 | (unless (string-equal new-attribute "") | 247 | (unless (or (string-equal new-attribute "") |
| 248 | ;; Use `eq' instead of `equal' | ||
| 249 | ;; to detect empty input (bug#12399). | ||
| 250 | (eq new-attribute default)) | ||
| 248 | (if (eq op-symbol 'touch) | 251 | (if (eq op-symbol 'touch) |
| 249 | (list "-t" new-attribute) | 252 | (list "-t" new-attribute) |
| 250 | (list new-attribute))) | 253 | (list new-attribute))) |
| @@ -278,7 +281,10 @@ Symbolic modes like `g+w' are allowed." | |||
| 278 | "Change mode of %s to: " | 281 | "Change mode of %s to: " |
| 279 | nil 'chmod arg files default)) | 282 | nil 'chmod arg files default)) |
| 280 | num-modes) | 283 | num-modes) |
| 281 | (cond ((equal modes "") | 284 | (cond ((or (equal modes "") |
| 285 | ;; Use `eq' instead of `equal' | ||
| 286 | ;; to detect empty input (bug#12399). | ||
| 287 | (eq modes default)) | ||
| 282 | ;; We used to treat empty input as DEFAULT, but that is not | 288 | ;; We used to treat empty input as DEFAULT, but that is not |
| 283 | ;; such a good idea (Bug#9361). | 289 | ;; such a good idea (Bug#9361). |
| 284 | (error "No file mode specified")) | 290 | (error "No file mode specified")) |
diff --git a/lisp/dired.el b/lisp/dired.el index f4ae027181a..54921a4ea66 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3744,7 +3744,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3744 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3744 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3745 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3745 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3746 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3746 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3747 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "4b260eda371d319a6c8e8e5ec917e287") | 3747 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "3c768e470d5d053d0049e0286ce38da7") |
| 3748 | ;;; Generated autoloads from dired-aux.el | 3748 | ;;; Generated autoloads from dired-aux.el |
| 3749 | 3749 | ||
| 3750 | (autoload 'dired-diff "dired-aux" "\ | 3750 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index cac76d2bce1..d96076d17a6 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; advice.el --- an overloading mechanism for Emacs Lisp functions | 1 | ;;; advice.el --- An overloading mechanism for Emacs Lisp functions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1994, 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-1994, 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1746,7 +1746,8 @@ | |||
| 1746 | (provide 'advice-preload) | 1746 | (provide 'advice-preload) |
| 1747 | ;; During a normal load this is a noop: | 1747 | ;; During a normal load this is a noop: |
| 1748 | (require 'advice-preload "advice.el") | 1748 | (require 'advice-preload "advice.el") |
| 1749 | 1749 | (require 'macroexp) | |
| 1750 | (eval-when-compile (require 'cl-lib)) | ||
| 1750 | 1751 | ||
| 1751 | ;; @@ Variable definitions: | 1752 | ;; @@ Variable definitions: |
| 1752 | ;; ======================== | 1753 | ;; ======================== |
| @@ -1812,54 +1813,6 @@ generates a copy of TREE." | |||
| 1812 | (funcall fUnCtIoN tReE)) | 1813 | (funcall fUnCtIoN tReE)) |
| 1813 | (t tReE))) | 1814 | (t tReE))) |
| 1814 | 1815 | ||
| 1815 | ;; this is just faster than `ad-substitute-tree': | ||
| 1816 | (defun ad-copy-tree (tree) | ||
| 1817 | "Return a copy of the list structure of TREE." | ||
| 1818 | (cond ((consp tree) | ||
| 1819 | (cons (ad-copy-tree (car tree)) | ||
| 1820 | (ad-copy-tree (cdr tree)))) | ||
| 1821 | (t tree))) | ||
| 1822 | |||
| 1823 | (defmacro ad-dolist (varform &rest body) | ||
| 1824 | "A Common-Lisp-style dolist iterator with the following syntax: | ||
| 1825 | |||
| 1826 | (ad-dolist (VAR INIT-FORM [RESULT-FORM]) | ||
| 1827 | BODY-FORM...) | ||
| 1828 | |||
| 1829 | which will iterate over the list yielded by INIT-FORM binding VAR to the | ||
| 1830 | current head at every iteration. If RESULT-FORM is supplied its value will | ||
| 1831 | be returned at the end of the iteration, nil otherwise. The iteration can be | ||
| 1832 | exited prematurely with `(ad-do-return [VALUE])'." | ||
| 1833 | (let ((expansion | ||
| 1834 | `(let ((ad-dO-vAr ,(car (cdr varform))) | ||
| 1835 | ,(car varform)) | ||
| 1836 | (while ad-dO-vAr | ||
| 1837 | (setq ,(car varform) (car ad-dO-vAr)) | ||
| 1838 | ,@body | ||
| 1839 | ;;work around a backquote bug: | ||
| 1840 | ;;(` ((,@ '(foo)) (bar))) => (append '(foo) '(((bar)))) wrong | ||
| 1841 | ;;(` ((,@ '(foo)) (, '(bar)))) => (append '(foo) (list '(bar))) | ||
| 1842 | ,'(setq ad-dO-vAr (cdr ad-dO-vAr))) | ||
| 1843 | ,(car (cdr (cdr varform)))))) | ||
| 1844 | ;;ok, this wastes some cons cells but only during compilation: | ||
| 1845 | (if (catch 'contains-return | ||
| 1846 | (ad-substitute-tree | ||
| 1847 | (function (lambda (subtree) | ||
| 1848 | (cond ((eq (car-safe subtree) 'ad-dolist)) | ||
| 1849 | ((eq (car-safe subtree) 'ad-do-return) | ||
| 1850 | (throw 'contains-return t))))) | ||
| 1851 | 'identity body) | ||
| 1852 | nil) | ||
| 1853 | `(catch 'ad-dO-eXiT ,expansion) | ||
| 1854 | expansion))) | ||
| 1855 | |||
| 1856 | (defmacro ad-do-return (value) | ||
| 1857 | `(throw 'ad-dO-eXiT ,value)) | ||
| 1858 | |||
| 1859 | (if (not (get 'ad-dolist 'lisp-indent-hook)) | ||
| 1860 | (put 'ad-dolist 'lisp-indent-hook 1)) | ||
| 1861 | |||
| 1862 | |||
| 1863 | ;; @@ Save real definitions of subrs used by Advice: | 1816 | ;; @@ Save real definitions of subrs used by Advice: |
| 1864 | ;; ================================================= | 1817 | ;; ================================================= |
| 1865 | ;; Advice depends on the real, unmodified functionality of various subrs, | 1818 | ;; Advice depends on the real, unmodified functionality of various subrs, |
| @@ -1924,16 +1877,16 @@ exited prematurely with `(ad-do-return [VALUE])'." | |||
| 1924 | ad-advised-functions))) | 1877 | ad-advised-functions))) |
| 1925 | 1878 | ||
| 1926 | (defmacro ad-do-advised-functions (varform &rest body) | 1879 | (defmacro ad-do-advised-functions (varform &rest body) |
| 1927 | "`ad-dolist'-style iterator that maps over `ad-advised-functions'. | 1880 | "`dolist'-style iterator that maps over `ad-advised-functions'. |
| 1928 | \(ad-do-advised-functions (VAR [RESULT-FORM]) | 1881 | \(ad-do-advised-functions (VAR [RESULT-FORM]) |
| 1929 | BODY-FORM...) | 1882 | BODY-FORM...) |
| 1930 | On each iteration VAR will be bound to the name of an advised function | 1883 | On each iteration VAR will be bound to the name of an advised function |
| 1931 | \(a symbol)." | 1884 | \(a symbol)." |
| 1932 | `(ad-dolist (,(car varform) | 1885 | `(cl-dolist (,(car varform) |
| 1933 | ad-advised-functions | 1886 | ad-advised-functions |
| 1934 | ,(car (cdr varform))) | 1887 | ,(car (cdr varform))) |
| 1935 | (setq ,(car varform) (intern (car ,(car varform)))) | 1888 | (setq ,(car varform) (intern (car ,(car varform)))) |
| 1936 | ,@body)) | 1889 | ,@body)) |
| 1937 | 1890 | ||
| 1938 | (if (not (get 'ad-do-advised-functions 'lisp-indent-hook)) | 1891 | (if (not (get 'ad-do-advised-functions 'lisp-indent-hook)) |
| 1939 | (put 'ad-do-advised-functions 'lisp-indent-hook 1)) | 1892 | (put 'ad-do-advised-functions 'lisp-indent-hook 1)) |
| @@ -1948,7 +1901,7 @@ On each iteration VAR will be bound to the name of an advised function | |||
| 1948 | `(put ,function 'ad-advice-info ,advice-info)) | 1901 | `(put ,function 'ad-advice-info ,advice-info)) |
| 1949 | 1902 | ||
| 1950 | (defmacro ad-copy-advice-info (function) | 1903 | (defmacro ad-copy-advice-info (function) |
| 1951 | `(ad-copy-tree (get ,function 'ad-advice-info))) | 1904 | `(copy-tree (get ,function 'ad-advice-info))) |
| 1952 | 1905 | ||
| 1953 | (defmacro ad-is-advised (function) | 1906 | (defmacro ad-is-advised (function) |
| 1954 | "Return non-nil if FUNCTION has any advice info associated with it. | 1907 | "Return non-nil if FUNCTION has any advice info associated with it. |
| @@ -2022,8 +1975,8 @@ either t or nil, and DEFINITION should be a list of the form | |||
| 2022 | 1975 | ||
| 2023 | (defun ad-has-enabled-advice (function class) | 1976 | (defun ad-has-enabled-advice (function class) |
| 2024 | "True if at least one of FUNCTION's advices in CLASS is enabled." | 1977 | "True if at least one of FUNCTION's advices in CLASS is enabled." |
| 2025 | (ad-dolist (advice (ad-get-advice-info-field function class)) | 1978 | (cl-dolist (advice (ad-get-advice-info-field function class)) |
| 2026 | (if (ad-advice-enabled advice) (ad-do-return t)))) | 1979 | (if (ad-advice-enabled advice) (cl-return t)))) |
| 2027 | 1980 | ||
| 2028 | (defun ad-has-redefining-advice (function) | 1981 | (defun ad-has-redefining-advice (function) |
| 2029 | "True if FUNCTION's advice info defines at least 1 redefining advice. | 1982 | "True if FUNCTION's advice info defines at least 1 redefining advice. |
| @@ -2036,14 +1989,14 @@ Redefining advices affect the construction of an advised definition." | |||
| 2036 | (defun ad-has-any-advice (function) | 1989 | (defun ad-has-any-advice (function) |
| 2037 | "True if the advice info of FUNCTION defines at least one advice." | 1990 | "True if the advice info of FUNCTION defines at least one advice." |
| 2038 | (and (ad-is-advised function) | 1991 | (and (ad-is-advised function) |
| 2039 | (ad-dolist (class ad-advice-classes nil) | 1992 | (cl-dolist (class ad-advice-classes nil) |
| 2040 | (if (ad-get-advice-info-field function class) | 1993 | (if (ad-get-advice-info-field function class) |
| 2041 | (ad-do-return t))))) | 1994 | (cl-return t))))) |
| 2042 | 1995 | ||
| 2043 | (defun ad-get-enabled-advices (function class) | 1996 | (defun ad-get-enabled-advices (function class) |
| 2044 | "Return the list of enabled advices of FUNCTION in CLASS." | 1997 | "Return the list of enabled advices of FUNCTION in CLASS." |
| 2045 | (let (enabled-advices) | 1998 | (let (enabled-advices) |
| 2046 | (ad-dolist (advice (ad-get-advice-info-field function class)) | 1999 | (dolist (advice (ad-get-advice-info-field function class)) |
| 2047 | (if (ad-advice-enabled advice) | 2000 | (if (ad-advice-enabled advice) |
| 2048 | (push advice enabled-advices))) | 2001 | (push advice enabled-advices))) |
| 2049 | (reverse enabled-advices))) | 2002 | (reverse enabled-advices))) |
| @@ -2151,7 +2104,7 @@ function at point for which PREDICATE returns non-nil)." | |||
| 2151 | (ad-do-advised-functions (function) | 2104 | (ad-do-advised-functions (function) |
| 2152 | (if (or (null predicate) | 2105 | (if (or (null predicate) |
| 2153 | (funcall predicate function)) | 2106 | (funcall predicate function)) |
| 2154 | (ad-do-return function))) | 2107 | (cl-return function))) |
| 2155 | (error "ad-read-advised-function: %s" | 2108 | (error "ad-read-advised-function: %s" |
| 2156 | "There are no qualifying advised functions"))) | 2109 | "There are no qualifying advised functions"))) |
| 2157 | (let* ((ad-pReDiCaTe predicate) | 2110 | (let* ((ad-pReDiCaTe predicate) |
| @@ -2184,9 +2137,9 @@ be returned on empty input (defaults to the first non-empty advice | |||
| 2184 | class of FUNCTION)." | 2137 | class of FUNCTION)." |
| 2185 | (setq default | 2138 | (setq default |
| 2186 | (or default | 2139 | (or default |
| 2187 | (ad-dolist (class ad-advice-classes) | 2140 | (cl-dolist (class ad-advice-classes) |
| 2188 | (if (ad-get-advice-info-field function class) | 2141 | (if (ad-get-advice-info-field function class) |
| 2189 | (ad-do-return class))) | 2142 | (cl-return class))) |
| 2190 | (error "ad-read-advice-class: `%s' has no advices" function))) | 2143 | (error "ad-read-advice-class: `%s' has no advices" function))) |
| 2191 | (let ((class (completing-read | 2144 | (let ((class (completing-read |
| 2192 | (format "%s (default %s): " (or prompt "Class") default) | 2145 | (format "%s (default %s): " (or prompt "Class") default) |
| @@ -2255,18 +2208,18 @@ NAME can be a symbol or a regular expression matching part of an advice name. | |||
| 2255 | If CLASS is `any' all valid advice classes will be checked." | 2208 | If CLASS is `any' all valid advice classes will be checked." |
| 2256 | (if (ad-is-advised function) | 2209 | (if (ad-is-advised function) |
| 2257 | (let (found-advice) | 2210 | (let (found-advice) |
| 2258 | (ad-dolist (advice-class ad-advice-classes) | 2211 | (cl-dolist (advice-class ad-advice-classes) |
| 2259 | (if (or (eq class 'any) (eq advice-class class)) | 2212 | (if (or (eq class 'any) (eq advice-class class)) |
| 2260 | (setq found-advice | 2213 | (setq found-advice |
| 2261 | (ad-dolist (advice (ad-get-advice-info-field | 2214 | (cl-dolist (advice (ad-get-advice-info-field |
| 2262 | function advice-class)) | 2215 | function advice-class)) |
| 2263 | (if (or (and (stringp name) | 2216 | (if (or (and (stringp name) |
| 2264 | (string-match | 2217 | (string-match |
| 2265 | name (symbol-name | 2218 | name (symbol-name |
| 2266 | (ad-advice-name advice)))) | 2219 | (ad-advice-name advice)))) |
| 2267 | (eq name (ad-advice-name advice))) | 2220 | (eq name (ad-advice-name advice))) |
| 2268 | (ad-do-return advice))))) | 2221 | (cl-return advice))))) |
| 2269 | (if found-advice (ad-do-return found-advice)))))) | 2222 | (if found-advice (cl-return found-advice)))))) |
| 2270 | 2223 | ||
| 2271 | (defun ad-enable-advice-internal (function class name flag) | 2224 | (defun ad-enable-advice-internal (function class name flag) |
| 2272 | "Set enable FLAG of FUNCTION's advices in CLASS matching NAME. | 2225 | "Set enable FLAG of FUNCTION's advices in CLASS matching NAME. |
| @@ -2277,10 +2230,10 @@ considered. The number of changed advices will be returned (or nil if | |||
| 2277 | FUNCTION was not advised)." | 2230 | FUNCTION was not advised)." |
| 2278 | (if (ad-is-advised function) | 2231 | (if (ad-is-advised function) |
| 2279 | (let ((matched-advices 0)) | 2232 | (let ((matched-advices 0)) |
| 2280 | (ad-dolist (advice-class ad-advice-classes) | 2233 | (dolist (advice-class ad-advice-classes) |
| 2281 | (if (or (eq class 'any) (eq advice-class class)) | 2234 | (if (or (eq class 'any) (eq advice-class class)) |
| 2282 | (ad-dolist (advice (ad-get-advice-info-field | 2235 | (dolist (advice (ad-get-advice-info-field |
| 2283 | function advice-class)) | 2236 | function advice-class)) |
| 2284 | (cond ((or (and (stringp name) | 2237 | (cond ((or (and (stringp name) |
| 2285 | (string-match | 2238 | (string-match |
| 2286 | name (symbol-name (ad-advice-name advice)))) | 2239 | name (symbol-name (ad-advice-name advice)))) |
| @@ -2586,11 +2539,6 @@ For that it has to be fbound with a non-autoload definition." | |||
| 2586 | (byte-compile symbol) | 2539 | (byte-compile symbol) |
| 2587 | (fset function (symbol-function symbol)))))) | 2540 | (fset function (symbol-function symbol)))))) |
| 2588 | 2541 | ||
| 2589 | (defun ad-prognify (forms) | ||
| 2590 | (cond ((<= (length forms) 1) | ||
| 2591 | (car forms)) | ||
| 2592 | (t (cons 'progn forms)))) | ||
| 2593 | |||
| 2594 | ;; @@@ Accessing argument lists: | 2542 | ;; @@@ Accessing argument lists: |
| 2595 | ;; ============================= | 2543 | ;; ============================= |
| 2596 | 2544 | ||
| @@ -2868,8 +2816,8 @@ in any of these classes." | |||
| 2868 | (if origdoc (setq paragraphs (list origdoc))) | 2816 | (if origdoc (setq paragraphs (list origdoc))) |
| 2869 | (unless (eq style 'plain) | 2817 | (unless (eq style 'plain) |
| 2870 | (push (concat "This " origtype " is advised.") paragraphs)) | 2818 | (push (concat "This " origtype " is advised.") paragraphs)) |
| 2871 | (ad-dolist (class ad-advice-classes) | 2819 | (dolist (class ad-advice-classes) |
| 2872 | (ad-dolist (advice (ad-get-enabled-advices function class)) | 2820 | (dolist (advice (ad-get-enabled-advices function class)) |
| 2873 | (setq advice-docstring | 2821 | (setq advice-docstring |
| 2874 | (ad-make-single-advice-docstring advice class style)) | 2822 | (ad-make-single-advice-docstring advice class style)) |
| 2875 | (if advice-docstring | 2823 | (if advice-docstring |
| @@ -2891,24 +2839,24 @@ in any of these classes." | |||
| 2891 | 2839 | ||
| 2892 | (defun ad-advised-arglist (function) | 2840 | (defun ad-advised-arglist (function) |
| 2893 | "Find first defined arglist in FUNCTION's redefining advices." | 2841 | "Find first defined arglist in FUNCTION's redefining advices." |
| 2894 | (ad-dolist (advice (append (ad-get-enabled-advices function 'before) | 2842 | (cl-dolist (advice (append (ad-get-enabled-advices function 'before) |
| 2895 | (ad-get-enabled-advices function 'around) | 2843 | (ad-get-enabled-advices function 'around) |
| 2896 | (ad-get-enabled-advices function 'after))) | 2844 | (ad-get-enabled-advices function 'after))) |
| 2897 | (let ((arglist (ad-arglist (ad-advice-definition advice)))) | 2845 | (let ((arglist (ad-arglist (ad-advice-definition advice)))) |
| 2898 | (if arglist | 2846 | (if arglist |
| 2899 | ;; We found the first one, use it: | 2847 | ;; We found the first one, use it: |
| 2900 | (ad-do-return arglist))))) | 2848 | (cl-return arglist))))) |
| 2901 | 2849 | ||
| 2902 | (defun ad-advised-interactive-form (function) | 2850 | (defun ad-advised-interactive-form (function) |
| 2903 | "Find first interactive form in FUNCTION's redefining advices." | 2851 | "Find first interactive form in FUNCTION's redefining advices." |
| 2904 | (ad-dolist (advice (append (ad-get-enabled-advices function 'before) | 2852 | (cl-dolist (advice (append (ad-get-enabled-advices function 'before) |
| 2905 | (ad-get-enabled-advices function 'around) | 2853 | (ad-get-enabled-advices function 'around) |
| 2906 | (ad-get-enabled-advices function 'after))) | 2854 | (ad-get-enabled-advices function 'after))) |
| 2907 | (let ((interactive-form | 2855 | (let ((interactive-form |
| 2908 | (ad-interactive-form (ad-advice-definition advice)))) | 2856 | (ad-interactive-form (ad-advice-definition advice)))) |
| 2909 | (if interactive-form | 2857 | (if interactive-form |
| 2910 | ;; We found the first one, use it: | 2858 | ;; We found the first one, use it: |
| 2911 | (ad-do-return interactive-form))))) | 2859 | (cl-return interactive-form))))) |
| 2912 | 2860 | ||
| 2913 | ;; @@@ Putting it all together: | 2861 | ;; @@@ Putting it all together: |
| 2914 | ;; ============================ | 2862 | ;; ============================ |
| @@ -2997,47 +2945,47 @@ and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG | |||
| 2997 | should be modified. The assembled function will be returned." | 2945 | should be modified. The assembled function will be returned." |
| 2998 | 2946 | ||
| 2999 | (let (before-forms around-form around-form-protected after-forms definition) | 2947 | (let (before-forms around-form around-form-protected after-forms definition) |
| 3000 | (ad-dolist (advice befores) | 2948 | (dolist (advice befores) |
| 3001 | (cond ((and (ad-advice-protected advice) | 2949 | (cond ((and (ad-advice-protected advice) |
| 3002 | before-forms) | 2950 | before-forms) |
| 3003 | (setq before-forms | 2951 | (setq before-forms |
| 3004 | `((unwind-protect | 2952 | `((unwind-protect |
| 3005 | ,(ad-prognify before-forms) | 2953 | ,(macroexp-progn before-forms) |
| 3006 | ,@(ad-body-forms | 2954 | ,@(ad-body-forms |
| 3007 | (ad-advice-definition advice)))))) | 2955 | (ad-advice-definition advice)))))) |
| 3008 | (t (setq before-forms | 2956 | (t (setq before-forms |
| 3009 | (append before-forms | 2957 | (append before-forms |
| 3010 | (ad-body-forms (ad-advice-definition advice))))))) | 2958 | (ad-body-forms (ad-advice-definition advice))))))) |
| 3011 | 2959 | ||
| 3012 | (setq around-form `(setq ad-return-value ,orig)) | 2960 | (setq around-form `(setq ad-return-value ,orig)) |
| 3013 | (ad-dolist (advice (reverse arounds)) | 2961 | (dolist (advice (reverse arounds)) |
| 3014 | ;; If any of the around advices is protected then we | 2962 | ;; If any of the around advices is protected then we |
| 3015 | ;; protect the complete around advice onion: | 2963 | ;; protect the complete around advice onion: |
| 3016 | (if (ad-advice-protected advice) | 2964 | (if (ad-advice-protected advice) |
| 3017 | (setq around-form-protected t)) | 2965 | (setq around-form-protected t)) |
| 3018 | (setq around-form | 2966 | (setq around-form |
| 3019 | (ad-substitute-tree | 2967 | (ad-substitute-tree |
| 3020 | (function (lambda (form) (eq form 'ad-do-it))) | 2968 | (function (lambda (form) (eq form 'ad-do-it))) |
| 3021 | (function (lambda (form) around-form)) | 2969 | (function (lambda (form) around-form)) |
| 3022 | (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) | 2970 | (macroexp-progn (ad-body-forms (ad-advice-definition advice)))))) |
| 3023 | 2971 | ||
| 3024 | (setq after-forms | 2972 | (setq after-forms |
| 3025 | (if (and around-form-protected before-forms) | 2973 | (if (and around-form-protected before-forms) |
| 3026 | `((unwind-protect | 2974 | `((unwind-protect |
| 3027 | ,(ad-prognify before-forms) | 2975 | ,(macroexp-progn before-forms) |
| 3028 | ,around-form)) | 2976 | ,around-form)) |
| 3029 | (append before-forms (list around-form)))) | 2977 | (append before-forms (list around-form)))) |
| 3030 | (ad-dolist (advice afters) | 2978 | (dolist (advice afters) |
| 3031 | (cond ((and (ad-advice-protected advice) | 2979 | (cond ((and (ad-advice-protected advice) |
| 3032 | after-forms) | 2980 | after-forms) |
| 3033 | (setq after-forms | 2981 | (setq after-forms |
| 3034 | `((unwind-protect | 2982 | `((unwind-protect |
| 3035 | ,(ad-prognify after-forms) | 2983 | ,(macroexp-progn after-forms) |
| 3036 | ,@(ad-body-forms | 2984 | ,@(ad-body-forms |
| 3037 | (ad-advice-definition advice)))))) | 2985 | (ad-advice-definition advice)))))) |
| 3038 | (t (setq after-forms | 2986 | (t (setq after-forms |
| 3039 | (append after-forms | 2987 | (append after-forms |
| 3040 | (ad-body-forms (ad-advice-definition advice))))))) | 2988 | (ad-body-forms (ad-advice-definition advice))))))) |
| 3041 | 2989 | ||
| 3042 | (setq definition | 2990 | (setq definition |
| 3043 | `(,@(if (memq type '(macro special-form)) '(macro)) | 2991 | `(,@(if (memq type '(macro special-form)) '(macro)) |
| @@ -3061,7 +3009,7 @@ should be modified. The assembled function will be returned." | |||
| 3061 | (ad-body-forms (ad-advice-definition advice)))) | 3009 | (ad-body-forms (ad-advice-definition advice)))) |
| 3062 | (ad-get-enabled-advices function hook-name)))) | 3010 | (ad-get-enabled-advices function hook-name)))) |
| 3063 | (if hook-forms | 3011 | (if hook-forms |
| 3064 | (ad-prognify (apply 'append hook-forms))))) | 3012 | (macroexp-progn (apply 'append hook-forms))))) |
| 3065 | 3013 | ||
| 3066 | 3014 | ||
| 3067 | ;; @@ Caching: | 3015 | ;; @@ Caching: |
| @@ -3171,11 +3119,11 @@ advised definition from scratch." | |||
| 3171 | (nth 2 cache-id))))) | 3119 | (nth 2 cache-id))))) |
| 3172 | 3120 | ||
| 3173 | (defun ad-verify-cache-class-id (cache-class-id advices) | 3121 | (defun ad-verify-cache-class-id (cache-class-id advices) |
| 3174 | (ad-dolist (advice advices (null cache-class-id)) | 3122 | (cl-dolist (advice advices (null cache-class-id)) |
| 3175 | (if (ad-advice-enabled advice) | 3123 | (if (ad-advice-enabled advice) |
| 3176 | (if (eq (car cache-class-id) (ad-advice-name advice)) | 3124 | (if (eq (car cache-class-id) (ad-advice-name advice)) |
| 3177 | (setq cache-class-id (cdr cache-class-id)) | 3125 | (setq cache-class-id (cdr cache-class-id)) |
| 3178 | (ad-do-return nil))))) | 3126 | (cl-return nil))))) |
| 3179 | 3127 | ||
| 3180 | ;; There should be a way to monitor if and why a cache verification failed | 3128 | ;; There should be a way to monitor if and why a cache verification failed |
| 3181 | ;; in order to determine whether a certain preactivation could be used or | 3129 | ;; in order to determine whether a certain preactivation could be used or |
| @@ -3670,7 +3618,16 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation. | |||
| 3670 | usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) | 3618 | usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) |
| 3671 | [DOCSTRING] [INTERACTIVE-FORM] | 3619 | [DOCSTRING] [INTERACTIVE-FORM] |
| 3672 | BODY...)" | 3620 | BODY...)" |
| 3673 | (declare (doc-string 3)) | 3621 | (declare (doc-string 3) |
| 3622 | (debug (&define name ;; thing being advised. | ||
| 3623 | (name ;; class is [&or "before" "around" "after" | ||
| 3624 | ;; "activation" "deactivation"] | ||
| 3625 | name ;; name of advice | ||
| 3626 | &rest sexp ;; optional position and flags | ||
| 3627 | ) | ||
| 3628 | [&optional stringp] | ||
| 3629 | [&optional ("interactive" interactive)] | ||
| 3630 | def-body))) | ||
| 3674 | (if (not (ad-name-p function)) | 3631 | (if (not (ad-name-p function)) |
| 3675 | (error "defadvice: Invalid function name: %s" function)) | 3632 | (error "defadvice: Invalid function name: %s" function)) |
| 3676 | (let* ((class (car args)) | 3633 | (let* ((class (car args)) |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index d1382f42b19..93e890a20c9 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -312,7 +312,7 @@ This uses `defvaralias' and `make-obsolete-variable' (which see). | |||
| 312 | See the Info node `(elisp)Variable Aliases' for more details. | 312 | See the Info node `(elisp)Variable Aliases' for more details. |
| 313 | 313 | ||
| 314 | If CURRENT-NAME is a defcustom (more generally, any variable | 314 | If CURRENT-NAME is a defcustom (more generally, any variable |
| 315 | where OBSOLETE-NAME may be set, e.g. in a .emacs file, before the | 315 | where OBSOLETE-NAME may be set, e.g. in an init file, before the |
| 316 | alias is defined), then the define-obsolete-variable-alias | 316 | alias is defined), then the define-obsolete-variable-alias |
| 317 | statement should be evaluated before the defcustom, if user | 317 | statement should be evaluated before the defcustom, if user |
| 318 | customizations are to be respected. The simplest way to achieve | 318 | customizations are to be respected. The simplest way to achieve |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 10bc37c6dcd..c42ae21aae5 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1016,6 +1016,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." | |||
| 1016 | ((bufferp byte-compile-current-file) | 1016 | ((bufferp byte-compile-current-file) |
| 1017 | (format "Buffer %s:" | 1017 | (format "Buffer %s:" |
| 1018 | (buffer-name byte-compile-current-file))) | 1018 | (buffer-name byte-compile-current-file))) |
| 1019 | ;; We might be simply loading a file that | ||
| 1020 | ;; contains explicit calls to byte-compile functions. | ||
| 1021 | ((stringp load-file-name) | ||
| 1022 | (format "%s:" (file-relative-name load-file-name dir))) | ||
| 1019 | (t ""))) | 1023 | (t ""))) |
| 1020 | (pos (if (and byte-compile-current-file | 1024 | (pos (if (and byte-compile-current-file |
| 1021 | (integerp byte-compile-read-position)) | 1025 | (integerp byte-compile-read-position)) |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 532c81c502c..5749ff91b40 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -121,7 +121,7 @@ a future Emacs interpreter will be able to use it.") | |||
| 121 | 121 | ||
| 122 | ;;; Generalized variables. | 122 | ;;; Generalized variables. |
| 123 | ;; These macros are defined here so that they | 123 | ;; These macros are defined here so that they |
| 124 | ;; can safely be used in .emacs files. | 124 | ;; can safely be used in init files. |
| 125 | 125 | ||
| 126 | (defmacro cl-incf (place &optional x) | 126 | (defmacro cl-incf (place &optional x) |
| 127 | "Increment PLACE by X (1 by default). | 127 | "Increment PLACE by X (1 by default). |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 774b4d3d600..e002dbabe49 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -75,9 +75,9 @@ window previously showing the debugger buffer. | |||
| 75 | The value used here is passed to `quit-restore-window'." | 75 | The value used here is passed to `quit-restore-window'." |
| 76 | :type '(choice | 76 | :type '(choice |
| 77 | (const :tag "Keep alive" nil) | 77 | (const :tag "Keep alive" nil) |
| 78 | (const :tag "Append" 'append) | 78 | (const :tag "Append" append) |
| 79 | (const :tag "Bury" 'bury) | 79 | (const :tag "Bury" bury) |
| 80 | (const :tag "Kill" 'kill)) | 80 | (const :tag "Kill" kill)) |
| 81 | :group 'debugger | 81 | :group 'debugger |
| 82 | :version "24.2") | 82 | :version "24.2") |
| 83 | 83 | ||
| @@ -265,7 +265,8 @@ first will be printed into the backtrace buffer." | |||
| 265 | ;; Make sure we unbind buffer-read-only in the right buffer. | 265 | ;; Make sure we unbind buffer-read-only in the right buffer. |
| 266 | (save-excursion | 266 | (save-excursion |
| 267 | (recursive-edit)))) | 267 | (recursive-edit)))) |
| 268 | (when (and (window-live-p debugger-window) | 268 | (when (and (not debugger-will-be-back) |
| 269 | (window-live-p debugger-window) | ||
| 269 | (eq (window-buffer debugger-window) debugger-buffer)) | 270 | (eq (window-buffer debugger-window) debugger-buffer)) |
| 270 | ;; Record height of debugger window. | 271 | ;; Record height of debugger window. |
| 271 | (setq debugger-previous-window-height | 272 | (setq debugger-previous-window-height |
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 7f9f8a33634..939fab78942 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -148,7 +148,7 @@ unselectable text. A string consisting solely of hyphens is displayed | |||
| 148 | as a solid horizontal line. | 148 | as a solid horizontal line. |
| 149 | 149 | ||
| 150 | A menu item can be a list with the same format as MENU. This is a submenu." | 150 | A menu item can be a list with the same format as MENU. This is a submenu." |
| 151 | (declare (indent defun)) | 151 | (declare (indent defun) (debug (symbolp body))) |
| 152 | `(progn | 152 | `(progn |
| 153 | ,(if symbol `(defvar ,symbol nil ,doc)) | 153 | ,(if symbol `(defvar ,symbol nil ,doc)) |
| 154 | (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu))) | 154 | (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu))) |
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index a66d5972d82..2248dde8c03 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -28,8 +28,8 @@ | |||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | ;; Layout of a timer vector: | 30 | ;; Layout of a timer vector: |
| 31 | ;; [triggered-p high-seconds low-seconds usecs psecs repeat-delay | 31 | ;; [triggered-p high-seconds low-seconds usecs repeat-delay |
| 32 | ;; function args idle-delay] | 32 | ;; function args idle-delay psecs] |
| 33 | ;; triggered-p is nil if the timer is active (waiting to be triggered), | 33 | ;; triggered-p is nil if the timer is active (waiting to be triggered), |
| 34 | ;; t if it is inactive ("already triggered", in theory) | 34 | ;; t if it is inactive ("already triggered", in theory) |
| 35 | 35 | ||
| @@ -42,7 +42,7 @@ | |||
| 42 | (:type vector) | 42 | (:type vector) |
| 43 | (:conc-name timer--)) | 43 | (:conc-name timer--)) |
| 44 | (triggered t) | 44 | (triggered t) |
| 45 | high-seconds low-seconds usecs psecs repeat-delay function args idle-delay) | 45 | high-seconds low-seconds usecs repeat-delay function args idle-delay psecs) |
| 46 | 46 | ||
| 47 | (defun timerp (object) | 47 | (defun timerp (object) |
| 48 | "Return t if OBJECT is a timer." | 48 | "Return t if OBJECT is a timer." |
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 7fc24773b9e..87b6bcf0aa9 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | ;; emacs -q -l edt-mapper.el | 62 | ;; emacs -q -l edt-mapper.el |
| 63 | 63 | ||
| 64 | ;; The "-q" option prevents loading of your .emacs file (commands | 64 | ;; The "-q" option prevents loading of your init file (commands |
| 65 | ;; therein might confuse this program). | 65 | ;; therein might confuse this program). |
| 66 | 66 | ||
| 67 | ;; An instruction screen showing the typical LK-201 terminal | 67 | ;; An instruction screen showing the typical LK-201 terminal |
| @@ -74,7 +74,7 @@ | |||
| 74 | ;; and loaded automatically when the EDT emulation is started. If | 74 | ;; and loaded automatically when the EDT emulation is started. If |
| 75 | ;; you specify a different file name, you will need to set the | 75 | ;; you specify a different file name, you will need to set the |
| 76 | ;; variable "edt-keys-file" before starting the EDT emulation. | 76 | ;; variable "edt-keys-file" before starting the EDT emulation. |
| 77 | ;; Here's how you might go about doing that in your .emacs file. | 77 | ;; Here's how you might go about doing that in your init file: |
| 78 | 78 | ||
| 79 | ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) | 79 | ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) |
| 80 | 80 | ||
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index dbd13a01a8b..3810dcccbb3 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | ;; You can have the EDT Emulation start up automatically, each time | 49 | ;; You can have the EDT Emulation start up automatically, each time |
| 50 | ;; you initiate a GNU Emacs session, by adding the following line to | 50 | ;; you initiate a GNU Emacs session, by adding the following line to |
| 51 | ;; your .emacs file: | 51 | ;; your init file: |
| 52 | ;; | 52 | ;; |
| 53 | ;; (add-hook term-setup-hook 'edt-emulation-on) | 53 | ;; (add-hook term-setup-hook 'edt-emulation-on) |
| 54 | 54 | ||
| @@ -75,7 +75,7 @@ | |||
| 75 | ;; default, this feature is enabled, with the top margin set to | 75 | ;; default, this feature is enabled, with the top margin set to |
| 76 | ;; 10% of the window and the bottom margin set to 15% of the | 76 | ;; 10% of the window and the bottom margin set to 15% of the |
| 77 | ;; window. To change these settings, you can invoke the function | 77 | ;; window. To change these settings, you can invoke the function |
| 78 | ;; edt-set-scroll-margins in your .emacs file. For example, the | 78 | ;; edt-set-scroll-margins in your init file. For example, the |
| 79 | ;; following line | 79 | ;; following line |
| 80 | ;; | 80 | ;; |
| 81 | ;; (edt-set-scroll-margins "20%" "25%") | 81 | ;; (edt-set-scroll-margins "20%" "25%") |
| @@ -363,7 +363,7 @@ This means that an edt-user.el file was found in the user's `load-path'.") | |||
| 363 | ;;; | 363 | ;;; |
| 364 | ;;; (setq edt-keep-current-page-delimiter t) | 364 | ;;; (setq edt-keep-current-page-delimiter t) |
| 365 | ;;; | 365 | ;;; |
| 366 | ;;; in your .emacs file. | 366 | ;;; in your init file. |
| 367 | 367 | ||
| 368 | (defun edt-page-forward (num) | 368 | (defun edt-page-forward (num) |
| 369 | "Move forward to just after next page delimiter. | 369 | "Move forward to just after next page delimiter. |
| @@ -1961,14 +1961,14 @@ created." | |||
| 1961 | Ack!! You're running the Enhanced EDT Emulation without loading an | 1961 | Ack!! You're running the Enhanced EDT Emulation without loading an |
| 1962 | EDT key mapping file. To create an EDT key mapping file, run the | 1962 | EDT key mapping file. To create an EDT key mapping file, run the |
| 1963 | edt-mapper program. It is safest to run it from an Emacs loaded | 1963 | edt-mapper program. It is safest to run it from an Emacs loaded |
| 1964 | without any of your own customizations found in your .emacs file, etc. | 1964 | without any of your own customizations found in your init file, etc. |
| 1965 | The reason for this is that some user customizations confuse edt-mapper. | 1965 | The reason for this is that some user customizations confuse edt-mapper. |
| 1966 | You can do this by quitting Emacs and then invoking Emacs again as | 1966 | You can do this by quitting Emacs and then invoking Emacs again as |
| 1967 | follows: | 1967 | follows: |
| 1968 | 1968 | ||
| 1969 | emacs -q -l edt-mapper | 1969 | emacs -q -l edt-mapper |
| 1970 | 1970 | ||
| 1971 | [NOTE: If you do nothing out of the ordinary in your .emacs file, and | 1971 | [NOTE: If you do nothing out of the ordinary in your init file, and |
| 1972 | the search for edt-mapper is successful, you can try running it now.] | 1972 | the search for edt-mapper is successful, you can try running it now.] |
| 1973 | 1973 | ||
| 1974 | The library edt-mapper includes these same directions on how to | 1974 | The library edt-mapper includes these same directions on how to |
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index b8d07e8b744..d375725af56 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el | |||
| @@ -163,8 +163,8 @@ | |||
| 163 | ;; and type `tpu-edt' followed by a carriage return. | 163 | ;; and type `tpu-edt' followed by a carriage return. |
| 164 | 164 | ||
| 165 | ;; If you like TPU-edt and want to use it all the time, you can start | 165 | ;; If you like TPU-edt and want to use it all the time, you can start |
| 166 | ;; TPU-edt using the Emacs initialization file, .emacs. Simply create | 166 | ;; TPU-edt using the Emacs initialization file, .emacs. Simply add |
| 167 | ;; a .emacs file in your home directory containing the line: | 167 | ;; the following line to your init file: |
| 168 | 168 | ||
| 169 | ;; (tpu-edt) | 169 | ;; (tpu-edt) |
| 170 | 170 | ||
| @@ -2440,7 +2440,7 @@ If FILE is nil, try to load a default file. The default file names are | |||
| 2440 | 2440 | ||
| 2441 | 2441 | ||
| 2442 | ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins | 2442 | ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins |
| 2443 | ;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "76f06905db4c5bfb3b86491a51512a0e") | 2443 | ;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "bf5e7322f9a2c324a3bb306415813374") |
| 2444 | ;;; Generated autoloads from tpu-extras.el | 2444 | ;;; Generated autoloads from tpu-extras.el |
| 2445 | 2445 | ||
| 2446 | (autoload 'tpu-cursor-free-mode "tpu-extras" "\ | 2446 | (autoload 'tpu-cursor-free-mode "tpu-extras" "\ |
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 521b189e3bc..4cf9eee037b 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | ;; Use the functions defined here to customize TPU-edt to your tastes by | 27 | ;; Use the functions defined here to customize TPU-edt to your tastes by |
| 28 | ;; setting scroll margins and/or turning on free cursor mode. Here's an | 28 | ;; setting scroll margins and/or turning on free cursor mode. Here's an |
| 29 | ;; example for your .emacs file. | 29 | ;; example for your init file. |
| 30 | 30 | ||
| 31 | ;; (tpu-set-cursor-free) ; Set cursor free. | 31 | ;; (tpu-set-cursor-free) ; Set cursor free. |
| 32 | ;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins. | 32 | ;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins. |
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index ef4e9b305fc..9cced60816c 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el | |||
| @@ -81,7 +81,7 @@ Finally, you will be prompted for the name of the file to store the key | |||
| 81 | definitions. If you chose the default, TPU-edt will find it and load it | 81 | definitions. If you chose the default, TPU-edt will find it and load it |
| 82 | automatically. If you specify a different file name, you will need to | 82 | automatically. If you specify a different file name, you will need to |
| 83 | set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how | 83 | set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how |
| 84 | you might go about doing that in your .emacs file. | 84 | you might go about doing that in your init file. |
| 85 | 85 | ||
| 86 | (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\")) | 86 | (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\")) |
| 87 | (tpu-edt) | 87 | (tpu-edt) |
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 9bf108c8c38..a59dd610c21 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; (if (not (or (eq major-mode 'Info-mode) | 28 | ;; (if (not (or (eq major-mode 'Info-mode) |
| 29 | ;; (eq major-mode 'vi-mode))) | 29 | ;; (eq major-mode 'vi-mode))) |
| 30 | ;; (vi-mode)))))) | 30 | ;; (vi-mode)))))) |
| 31 | ;; 3) In your .emacs file you can define the command "vi-mode" to be "autoload" | 31 | ;; 3) In your init file you can define the command "vi-mode" to be "autoload" |
| 32 | ;; or you can execute the "load" command to load "vi" directly. | 32 | ;; or you can execute the "load" command to load "vi" directly. |
| 33 | ;; 4) Read the comments for command "vi-mode" before you start using it. | 33 | ;; 4) Read the comments for command "vi-mode" before you start using it. |
| 34 | 34 | ||
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 81fbfb0394c..8de253d19b0 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -351,7 +351,7 @@ user decide when to invoke Viper in a major mode." | |||
| 351 | If t, viperize Emacs. If nil -- don't. If `ask', ask the user. | 351 | If t, viperize Emacs. If nil -- don't. If `ask', ask the user. |
| 352 | This variable is used primarily when Viper is being loaded. | 352 | This variable is used primarily when Viper is being loaded. |
| 353 | 353 | ||
| 354 | Must be set in `~/.emacs' before Viper is loaded. | 354 | Must be set in your init file before Viper is loaded. |
| 355 | DO NOT set this variable interactively, unless you are using the customization | 355 | DO NOT set this variable interactively, unless you are using the customization |
| 356 | widget." | 356 | widget." |
| 357 | :type '(choice (const nil) (const t) (const ask)) | 357 | :type '(choice (const nil) (const t) (const ask)) |
| @@ -1173,7 +1173,7 @@ If you wish to Viperize AND make this your way of life, please put | |||
| 1173 | (setq viper-mode t) | 1173 | (setq viper-mode t) |
| 1174 | (require 'viper) | 1174 | (require 'viper) |
| 1175 | 1175 | ||
| 1176 | in your .emacs file (preferably, close to the top). | 1176 | in your init file (preferably, close to the top). |
| 1177 | These two lines must come in the order given. | 1177 | These two lines must come in the order given. |
| 1178 | 1178 | ||
| 1179 | ** Viper users: | 1179 | ** Viper users: |
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index be5b849651c..a16fa5abdd4 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el | |||
| @@ -170,24 +170,26 @@ Don't use this command in Lisp programs!" | |||
| 170 | If no one is selected, symmetric encryption will be performed. " | 170 | If no one is selected, symmetric encryption will be performed. " |
| 171 | recipients) | 171 | recipients) |
| 172 | (if recipients | 172 | (if recipients |
| 173 | (mapcar | 173 | (apply |
| 174 | (lambda (recipient) | 174 | 'nconc |
| 175 | (setq recipient-key | 175 | (mapcar |
| 176 | (epa-mail--find-usable-key | 176 | (lambda (recipient) |
| 177 | (epg-list-keys | 177 | (setq recipient-key |
| 178 | (epg-make-context epa-protocol) | 178 | (epa-mail--find-usable-key |
| 179 | (if (string-match "@" recipient) | 179 | (epg-list-keys |
| 180 | (concat "<" recipient ">") | 180 | (epg-make-context epa-protocol) |
| 181 | recipient)) | 181 | (if (string-match "@" recipient) |
| 182 | 'encrypt)) | 182 | (concat "<" recipient ">") |
| 183 | (unless (or recipient-key | 183 | recipient)) |
| 184 | (y-or-n-p | 184 | 'encrypt)) |
| 185 | (format | 185 | (unless (or recipient-key |
| 186 | "No public key for %s; skip it? " | 186 | (y-or-n-p |
| 187 | recipient))) | 187 | (format |
| 188 | (error "No public key for %s" recipient)) | 188 | "No public key for %s; skip it? " |
| 189 | recipient-key) | 189 | recipient))) |
| 190 | recipients))) | 190 | (error "No public key for %s" recipient)) |
| 191 | (if recipient-key (list recipient-key))) | ||
| 192 | recipients)))) | ||
| 191 | (setq sign (if verbose (y-or-n-p "Sign? "))) | 193 | (setq sign (if verbose (y-or-n-p "Sign? "))) |
| 192 | (if sign | 194 | (if sign |
| 193 | (epa-select-keys context | 195 | (epa-select-keys context |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 37e755e7655..674a6c97eec 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-09-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * erc-page.el (erc-page-function): | ||
| 4 | |||
| 5 | * erc-stamp.el (erc-stamp): Doc fix. | ||
| 6 | |||
| 1 | 2012-08-21 Josh Feinstein <jlf@foxtail.org> | 7 | 2012-08-21 Josh Feinstein <jlf@foxtail.org> |
| 2 | 8 | ||
| 3 | * erc-join.el (erc-autojoin-timing): Fix defcustom type. | 9 | * erc-join.el (erc-autojoin-timing): Fix defcustom type. |
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index c8a7fec32bd..a0593dcb743 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | ;; Heavily borrowed from gnus-art.el. Thanks to the original authors. | 26 | ;; Heavily borrowed from gnus-art.el. Thanks to the original authors. |
| 27 | ;; This buttonizes nicks and other stuff to make it all clickable. | 27 | ;; This buttonizes nicks and other stuff to make it all clickable. |
| 28 | ;; To enable, add to your ~/.emacs: | 28 | ;; To enable, add to your init file: |
| 29 | ;; (require 'erc-button) | 29 | ;; (require 'erc-button) |
| 30 | ;; (erc-button-mode 1) | 30 | ;; (erc-button-mode 1) |
| 31 | ;; | 31 | ;; |
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index 4f6361ee923..c7103d6dc61 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | ;;; Usage: | 49 | ;;; Usage: |
| 50 | 50 | ||
| 51 | ;; Put the following in your ~/.emacs file. | 51 | ;; Put the following in your init file. |
| 52 | 52 | ||
| 53 | ;; (require 'erc-capab) | 53 | ;; (require 'erc-capab) |
| 54 | ;; (erc-capab-identify-mode 1) | 54 | ;; (erc-capab-identify-mode 1) |
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index cac042c0298..de7f2137197 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;; customizable variables. | 29 | ;; customizable variables. |
| 30 | 30 | ||
| 31 | ;; Usage: | 31 | ;; Usage: |
| 32 | ;; Put (erc-match-mode 1) into your ~/.emacs file. | 32 | ;; Put (erc-match-mode 1) into your init file. |
| 33 | 33 | ||
| 34 | ;;; Code: | 34 | ;;; Code: |
| 35 | 35 | ||
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index 44fbc9563d6..355b345492c 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | ;;; Commentary: | 23 | ;;; Commentary: |
| 24 | 24 | ||
| 25 | ;; This module hides quit/join messages if a netsplit occurs. | 25 | ;; This module hides quit/join messages if a netsplit occurs. |
| 26 | ;; To enable, add the following to your ~/.emacs: | 26 | ;; To enable, add the following to your init file: |
| 27 | ;; (require 'erc-netsplit) | 27 | ;; (require 'erc-netsplit) |
| 28 | ;; (erc-netsplit-mode 1) | 28 | ;; (erc-netsplit-mode 1) |
| 29 | 29 | ||
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el index e6b670c91ba..51ddc33e1c0 100644 --- a/lisp/erc/erc-page.el +++ b/lisp/erc/erc-page.el | |||
| @@ -45,7 +45,7 @@ If nil, this prints the page message in the minibuffer and calls | |||
| 45 | `beep'. If non-nil, it must be a function that takes two arguments: | 45 | `beep'. If non-nil, it must be a function that takes two arguments: |
| 46 | SENDER and MSG, both strings. | 46 | SENDER and MSG, both strings. |
| 47 | 47 | ||
| 48 | Example for your ~/.emacs file: | 48 | Example for your init file: |
| 49 | 49 | ||
| 50 | \(setq erc-page-function | 50 | \(setq erc-page-function |
| 51 | (lambda (sender msg) | 51 | (lambda (sender msg) |
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el index 04c5885bc3e..6c5804c62a4 100644 --- a/lisp/erc/erc-replace.el +++ b/lisp/erc/erc-replace.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | ;; This module allows you to systematically replace text in incoming | 26 | ;; This module allows you to systematically replace text in incoming |
| 27 | ;; messages. Load erc-replace, and customize `erc-replace-alist'. | 27 | ;; messages. Load erc-replace, and customize `erc-replace-alist'. |
| 28 | ;; Then add to your ~/.emacs: | 28 | ;; Then add to your init file: |
| 29 | 29 | ||
| 30 | ;; (require 'erc-replace) | 30 | ;; (require 'erc-replace) |
| 31 | ;; (erc-replace-mode 1) | 31 | ;; (erc-replace-mode 1) |
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index 5831233affe..4ce2f18e041 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el | |||
| @@ -43,7 +43,7 @@ group provides settings related to the format and display | |||
| 43 | of timestamp information in `erc-mode' buffer. | 43 | of timestamp information in `erc-mode' buffer. |
| 44 | 44 | ||
| 45 | For timestamping to be activated, you just need to load `erc-stamp' | 45 | For timestamping to be activated, you just need to load `erc-stamp' |
| 46 | in your .emacs file or interactively using `load-library'." | 46 | in your init file or interactively using `load-library'." |
| 47 | :group 'erc) | 47 | :group 'erc) |
| 48 | 48 | ||
| 49 | (defcustom erc-timestamp-format "[%H:%M]" | 49 | (defcustom erc-timestamp-format "[%H:%M]" |
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 9c56c724224..88a3285730d 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; Highlights keywords and pals (friends), and hides or highlights fools | 26 | ;; Highlights keywords and pals (friends), and hides or highlights fools |
| 27 | ;; (using a dark color). Add to your ~/.emacs: | 27 | ;; (using a dark color). Add to your init file: |
| 28 | 28 | ||
| 29 | ;; (require 'erc-track) | 29 | ;; (require 'erc-track) |
| 30 | ;; (erc-track-mode 1) | 30 | ;; (erc-track-mode 1) |
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 4b62fec95e6..940056b6438 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el | |||
| @@ -133,10 +133,10 @@ Each element of this alias is a list of the form: | |||
| 133 | Where NAME is the textual name of the alias, and DEFINITION is the | 133 | Where NAME is the textual name of the alias, and DEFINITION is the |
| 134 | command string to replace that command with. | 134 | command string to replace that command with. |
| 135 | 135 | ||
| 136 | Note: this list should not be modified in your '.emacs' file. Rather, | 136 | Note: this list should not be modified in your init file. |
| 137 | any desired alias definitions should be declared using the `alias' | 137 | Rather, any desired alias definitions should be declared using |
| 138 | command, which will automatically write them to the file named by | 138 | the `alias' command, which will automatically write them to the |
| 139 | `eshell-aliases-file'.") | 139 | file named by `eshell-aliases-file'.") |
| 140 | 140 | ||
| 141 | (put 'eshell-command-aliases-list 'risky-local-variable t) | 141 | (put 'eshell-command-aliases-list 'risky-local-variable t) |
| 142 | 142 | ||
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 8218e91ddc7..fa0336232f9 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -84,7 +84,7 @@ Numeric form is tested using the regular expression | |||
| 84 | NOTE: If you find that numeric conversions are interfering with the | 84 | NOTE: If you find that numeric conversions are interfering with the |
| 85 | specification of filenames (for example, in calling `find-file', or | 85 | specification of filenames (for example, in calling `find-file', or |
| 86 | some other Lisp function that deals with files, not numbers), add the | 86 | some other Lisp function that deals with files, not numbers), add the |
| 87 | following in your .emacs file: | 87 | following in your init file: |
| 88 | 88 | ||
| 89 | (put 'find-file 'eshell-no-numeric-conversions t) | 89 | (put 'find-file 'eshell-no-numeric-conversions t) |
| 90 | 90 | ||
diff --git a/lisp/ffap.el b/lisp/ffap.el index ebe8b6dee94..f3e8d4c194e 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; README's, MANIFEST's, and so on. Submit bugs or suggestions with | 34 | ;; README's, MANIFEST's, and so on. Submit bugs or suggestions with |
| 35 | ;; M-x ffap-bug. | 35 | ;; M-x ffap-bug. |
| 36 | ;; | 36 | ;; |
| 37 | ;; For the default installation, add this line to your .emacs file: | 37 | ;; For the default installation, add this line to your init file: |
| 38 | ;; | 38 | ;; |
| 39 | ;; (ffap-bindings) ; do default key bindings | 39 | ;; (ffap-bindings) ; do default key bindings |
| 40 | ;; | 40 | ;; |
| @@ -206,7 +206,7 @@ Sensible values are nil, \"news\", or \"mailto\"." | |||
| 206 | ;; those features interesting but not clear winners (a matter of | 206 | ;; those features interesting but not clear winners (a matter of |
| 207 | ;; personal taste) I try to leave options to enable them. Read | 207 | ;; personal taste) I try to leave options to enable them. Read |
| 208 | ;; through this section for features that you like, put an appropriate | 208 | ;; through this section for features that you like, put an appropriate |
| 209 | ;; enabler in your .emacs file. | 209 | ;; enabler in your init file. |
| 210 | 210 | ||
| 211 | (defcustom ffap-dired-wildcards "[*?][^/]*\\'" | 211 | (defcustom ffap-dired-wildcards "[*?][^/]*\\'" |
| 212 | "A regexp matching filename wildcard characters, or nil. | 212 | "A regexp matching filename wildcard characters, or nil. |
diff --git a/lisp/files.el b/lisp/files.el index 4acdb542089..289f5c6b0b6 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -658,22 +658,13 @@ Not actually set up until the first time you use it.") | |||
| 658 | 658 | ||
| 659 | (defun parse-colon-path (search-path) | 659 | (defun parse-colon-path (search-path) |
| 660 | "Explode a search path into a list of directory names. | 660 | "Explode a search path into a list of directory names. |
| 661 | Directories are separated by occurrences of `path-separator' | 661 | Directories are separated by `path-separator' (which is colon in |
| 662 | \(which is colon in GNU and GNU-like systems)." | 662 | GNU and Unix systems). Substitute environment variables into the |
| 663 | ;; We could use split-string here. | 663 | resulting list of directory names." |
| 664 | (and search-path | 664 | (when (stringp search-path) |
| 665 | (let (cd-list (cd-start 0) cd-colon) | 665 | (mapcar (lambda (f) |
| 666 | (setq search-path (concat search-path path-separator)) | 666 | (substitute-in-file-name (file-name-as-directory f))) |
| 667 | (while (setq cd-colon (string-match path-separator search-path cd-start)) | 667 | (split-string search-path path-separator t)))) |
| 668 | (setq cd-list | ||
| 669 | (nconc cd-list | ||
| 670 | (list (if (= cd-start cd-colon) | ||
| 671 | nil | ||
| 672 | (substitute-in-file-name | ||
| 673 | (file-name-as-directory | ||
| 674 | (substring search-path cd-start cd-colon))))))) | ||
| 675 | (setq cd-start (+ cd-colon 1))) | ||
| 676 | cd-list))) | ||
| 677 | 668 | ||
| 678 | (defun cd-absolute (dir) | 669 | (defun cd-absolute (dir) |
| 679 | "Change current directory to given absolute file name DIR." | 670 | "Change current directory to given absolute file name DIR." |
diff --git a/lisp/filesets.el b/lisp/filesets.el index 6c24a4f43d6..a91d8cf0fcb 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | ;; inclusion group (i.e. a base file including other files). | 35 | ;; inclusion group (i.e. a base file including other files). |
| 36 | 36 | ||
| 37 | ;; Usage: | 37 | ;; Usage: |
| 38 | ;; 1. Put (require 'filesets) and (filesets-init) in your .emacs file. | 38 | ;; 1. Put (require 'filesets) and (filesets-init) in your init file. |
| 39 | ;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu. | 39 | ;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu. |
| 40 | ;; 3. Save your customizations. | 40 | ;; 3. Save your customizations. |
| 41 | 41 | ||
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index 747a4ca018c..b301886de5b 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | ;; | 31 | ;; |
| 32 | ;; To invoke these adjustments, a user need only invoke the function | 32 | ;; To invoke these adjustments, a user need only invoke the function |
| 33 | ;; enable-flow-control-on with a list of terminal types in his/her own | 33 | ;; enable-flow-control-on with a list of terminal types in his/her own |
| 34 | ;; .emacs file. As arguments, give it the names of one or more terminal | 34 | ;; init file. As arguments, give it the names of one or more terminal |
| 35 | ;; types in use by that user which require flow control adjustments. | 35 | ;; types in use by that user which require flow control adjustments. |
| 36 | ;; Here's an example: | 36 | ;; Here's an example: |
| 37 | ;; | 37 | ;; |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 77c21d26535..6404af7703a 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | ;; When this minor mode is on, the faces of the current line are updated with | 37 | ;; When this minor mode is on, the faces of the current line are updated with |
| 38 | ;; every insertion or deletion. | 38 | ;; every insertion or deletion. |
| 39 | ;; | 39 | ;; |
| 40 | ;; To turn Font Lock mode on automatically, add this to your ~/.emacs file: | 40 | ;; To turn Font Lock mode on automatically, add this to your init file: |
| 41 | ;; | 41 | ;; |
| 42 | ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) | 42 | ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) |
| 43 | ;; | 43 | ;; |
diff --git a/lisp/frame.el b/lisp/frame.el index c182a964820..0bef358ecfb 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -301,7 +301,7 @@ there (in decreasing order of priority)." | |||
| 301 | ;; existing frame. We need to explicitly include | 301 | ;; existing frame. We need to explicitly include |
| 302 | ;; default-frame-alist in the parameters of the screen we | 302 | ;; default-frame-alist in the parameters of the screen we |
| 303 | ;; create here, so that its new value, gleaned from the user's | 303 | ;; create here, so that its new value, gleaned from the user's |
| 304 | ;; .emacs file, will be applied to the existing screen. | 304 | ;; init file, will be applied to the existing screen. |
| 305 | (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) | 305 | (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) |
| 306 | (assq 'minibuffer window-system-frame-alist) | 306 | (assq 'minibuffer window-system-frame-alist) |
| 307 | (assq 'minibuffer default-frame-alist) | 307 | (assq 'minibuffer default-frame-alist) |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index cc7963b1711..a97c5649c95 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; | 28 | ;; |
| 29 | ;; INSTALLATION: | 29 | ;; INSTALLATION: |
| 30 | ;; | 30 | ;; |
| 31 | ;; Add this line to your .emacs file: | 31 | ;; Add this line to your init file: |
| 32 | ;; | 32 | ;; |
| 33 | ;; (require 'generic-x) | 33 | ;; (require 'generic-x) |
| 34 | ;; | 34 | ;; |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5644c394f7e..45f23a6d99c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,31 @@ | |||
| 1 | 2012-09-17 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * message.el (message-in-body-p): Don't set mark or modify buffer. | ||
| 4 | |||
| 5 | * mml.el (mml-attach-file): Doc fix. | ||
| 6 | (mml-attach-external, mml-attach-buffer, mml-attach-file): | ||
| 7 | Set mail-encode-mml when in Mail mode. | ||
| 8 | Simplify code to set HEAD and move back to HEAD. | ||
| 9 | (mml-insert-multipart, mml-insert-part): | ||
| 10 | Set mail-encode-mml when in Mail mode. | ||
| 11 | |||
| 12 | 2012-09-13 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 13 | |||
| 14 | * gnus-util.el (gnus-timer--function): New function. | ||
| 15 | |||
| 16 | * gnus-art.el (gnus-article-stop-animations): Use it. | ||
| 17 | |||
| 18 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 19 | |||
| 20 | Fix glitches caused by addition of psec to timers. | ||
| 21 | * gnus-art.el (gnus-article-stop-animations): Use timer--function | ||
| 22 | rather than raw access to timer vector. | ||
| 23 | |||
| 24 | 2012-09-11 Julien Danjou <julien@danjou.info> | ||
| 25 | |||
| 26 | * gnus-notifications.el (gnus-notifications): Check for nil values in | ||
| 27 | ignored addresses check. | ||
| 28 | |||
| 1 | 2012-09-10 Stefan Monnier <monnier@iro.umontreal.ca> | 29 | 2012-09-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 30 | ||
| 3 | * qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. | 31 | * qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b9020a40b75..7dcbd61316f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4554,7 +4554,7 @@ commands: | |||
| 4554 | (defun gnus-article-stop-animations () | 4554 | (defun gnus-article-stop-animations () |
| 4555 | (dolist (timer (and (boundp 'timer-list) | 4555 | (dolist (timer (and (boundp 'timer-list) |
| 4556 | timer-list)) | 4556 | timer-list)) |
| 4557 | (when (eq (elt timer 5) 'image-animate-timeout) | 4557 | (when (eq (gnus-timer--function timer) 'image-animate-timeout) |
| 4558 | (cancel-timer timer)))) | 4558 | (cancel-timer timer)))) |
| 4559 | 4559 | ||
| 4560 | (defun gnus-stop-downloads () | 4560 | (defun gnus-stop-downloads () |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 4c5eabab723..f5e1077f8c4 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1964,6 +1964,11 @@ definitions to shadow the loaded ones for use in file byte-compilation." | |||
| 1964 | (defun gnus-bound-and-true-p (sym) | 1964 | (defun gnus-bound-and-true-p (sym) |
| 1965 | (and (boundp sym) (symbol-value sym))) | 1965 | (and (boundp sym) (symbol-value sym))) |
| 1966 | 1966 | ||
| 1967 | (if (fboundp 'timer--function) | ||
| 1968 | (defalias 'gnus-timer--function 'timer--function) | ||
| 1969 | (defun gnus-timer--function (timer) | ||
| 1970 | (elt timer 5))) | ||
| 1971 | |||
| 1967 | (provide 'gnus-util) | 1972 | (provide 'gnus-util) |
| 1968 | 1973 | ||
| 1969 | ;;; gnus-util.el ends here | 1974 | ;;; gnus-util.el ends here |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 42911ce0648..5360f008432 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -3160,8 +3160,12 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." | |||
| 3160 | 3160 | ||
| 3161 | (defun message-in-body-p () | 3161 | (defun message-in-body-p () |
| 3162 | "Return t if point is in the message body." | 3162 | "Return t if point is in the message body." |
| 3163 | (let ((body (save-excursion (message-goto-body)))) | 3163 | (>= (point) |
| 3164 | (>= (point) body))) | 3164 | (save-excursion |
| 3165 | (goto-char (point-min)) | ||
| 3166 | (or (search-forward (concat "\n" mail-header-separator "\n") nil t) | ||
| 3167 | (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t)) | ||
| 3168 | (point)))) | ||
| 3165 | 3169 | ||
| 3166 | (defun message-goto-eoh () | 3170 | (defun message-goto-eoh () |
| 3167 | "Move point to the end of the headers." | 3171 | "Move point to the end of the headers." |
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index cc1aedf1b97..a72962aae0d 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -1305,7 +1305,8 @@ to specify options." | |||
| 1305 | (defun mml-attach-file (file &optional type description disposition) | 1305 | (defun mml-attach-file (file &optional type description disposition) |
| 1306 | "Attach a file to the outgoing MIME message. | 1306 | "Attach a file to the outgoing MIME message. |
| 1307 | The file is not inserted or encoded until you send the message with | 1307 | The file is not inserted or encoded until you send the message with |
| 1308 | `\\[message-send-and-exit]' or `\\[message-send]'. | 1308 | `\\[message-send-and-exit]' or `\\[message-send]' in Message mode, |
| 1309 | or `\\[mail-send-and-exit]' or `\\[mail-send]' in Mail mode. | ||
| 1309 | 1310 | ||
| 1310 | FILE is the name of the file to attach. TYPE is its | 1311 | FILE is the name of the file to attach. TYPE is its |
| 1311 | content-type, a string of the form \"type/subtype\". DESCRIPTION | 1312 | content-type, a string of the form \"type/subtype\". DESCRIPTION |
| @@ -1319,11 +1320,9 @@ body) or \"attachment\" (separate from the body)." | |||
| 1319 | (description (mml-minibuffer-read-description)) | 1320 | (description (mml-minibuffer-read-description)) |
| 1320 | (disposition (mml-minibuffer-read-disposition type nil file))) | 1321 | (disposition (mml-minibuffer-read-disposition type nil file))) |
| 1321 | (list file type description disposition))) | 1322 | (list file type description disposition))) |
| 1322 | ;; Don't move point if this command is invoked inside the message header. | 1323 | ;; If in the message header, attach at the end and leave point unchanged. |
| 1323 | (let ((head (unless (message-in-body-p) | 1324 | (let ((head (unless (message-in-body-p) (point)))) |
| 1324 | (prog1 | 1325 | (if head (goto-char (point-max))) |
| 1325 | (point) | ||
| 1326 | (goto-char (point-max)))))) | ||
| 1327 | (mml-insert-empty-tag 'part | 1326 | (mml-insert-empty-tag 'part |
| 1328 | 'type type | 1327 | 'type type |
| 1329 | ;; icicles redefines read-file-name and returns a | 1328 | ;; icicles redefines read-file-name and returns a |
| @@ -1331,12 +1330,15 @@ body) or \"attachment\" (separate from the body)." | |||
| 1331 | 'filename (mm-substring-no-properties file) | 1330 | 'filename (mm-substring-no-properties file) |
| 1332 | 'disposition (or disposition "attachment") | 1331 | 'disposition (or disposition "attachment") |
| 1333 | 'description description) | 1332 | 'description description) |
| 1333 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1334 | ;; when you send the message. | ||
| 1335 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1336 | (setq mail-encode-mml t)) | ||
| 1334 | (when head | 1337 | (when head |
| 1335 | (unless (prog1 | 1338 | (unless (pos-visible-in-window-p) |
| 1336 | (pos-visible-in-window-p) | ||
| 1337 | (goto-char head)) | ||
| 1338 | (message "The file \"%s\" has been attached at the end of the message" | 1339 | (message "The file \"%s\" has been attached at the end of the message" |
| 1339 | (file-name-nondirectory file)))))) | 1340 | (file-name-nondirectory file))) |
| 1341 | (goto-char head)))) | ||
| 1340 | 1342 | ||
| 1341 | (defun mml-dnd-attach-file (uri action) | 1343 | (defun mml-dnd-attach-file (uri action) |
| 1342 | "Attach a drag and drop file. | 1344 | "Attach a drag and drop file. |
| @@ -1372,21 +1374,22 @@ BUFFER is the name of the buffer to attach. See | |||
| 1372 | (description (mml-minibuffer-read-description)) | 1374 | (description (mml-minibuffer-read-description)) |
| 1373 | (disposition (mml-minibuffer-read-disposition type nil))) | 1375 | (disposition (mml-minibuffer-read-disposition type nil))) |
| 1374 | (list buffer type description disposition))) | 1376 | (list buffer type description disposition))) |
| 1375 | ;; Don't move point if this command is invoked inside the message header. | 1377 | ;; If in the message header, attach at the end and leave point unchanged. |
| 1376 | (let ((head (unless (message-in-body-p) | 1378 | (let ((head (unless (message-in-body-p) (point)))) |
| 1377 | (prog1 | 1379 | (if head (goto-char (point-max))) |
| 1378 | (point) | ||
| 1379 | (goto-char (point-max)))))) | ||
| 1380 | (mml-insert-empty-tag 'part 'type type 'buffer buffer | 1380 | (mml-insert-empty-tag 'part 'type type 'buffer buffer |
| 1381 | 'disposition disposition | 1381 | 'disposition disposition |
| 1382 | 'description description) | 1382 | 'description description) |
| 1383 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1384 | ;; when you send the message. | ||
| 1385 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1386 | (setq mail-encode-mml t)) | ||
| 1383 | (when head | 1387 | (when head |
| 1384 | (unless (prog1 | 1388 | (unless (pos-visible-in-window-p) |
| 1385 | (pos-visible-in-window-p) | ||
| 1386 | (goto-char head)) | ||
| 1387 | (message | 1389 | (message |
| 1388 | "The buffer \"%s\" has been attached at the end of the message" | 1390 | "The buffer \"%s\" has been attached at the end of the message" |
| 1389 | buffer))))) | 1391 | buffer)) |
| 1392 | (goto-char head)))) | ||
| 1390 | 1393 | ||
| 1391 | (defun mml-attach-external (file &optional type description) | 1394 | (defun mml-attach-external (file &optional type description) |
| 1392 | "Attach an external file into the buffer. | 1395 | "Attach an external file into the buffer. |
| @@ -1397,19 +1400,20 @@ TYPE is the MIME type to use." | |||
| 1397 | (type (mml-minibuffer-read-type file)) | 1400 | (type (mml-minibuffer-read-type file)) |
| 1398 | (description (mml-minibuffer-read-description))) | 1401 | (description (mml-minibuffer-read-description))) |
| 1399 | (list file type description))) | 1402 | (list file type description))) |
| 1400 | ;; Don't move point if this command is invoked inside the message header. | 1403 | ;; If in the message header, attach at the end and leave point unchanged. |
| 1401 | (let ((head (unless (message-in-body-p) | 1404 | (let ((head (unless (message-in-body-p) (point)))) |
| 1402 | (prog1 | 1405 | (if head (goto-char (point-max))) |
| 1403 | (point) | ||
| 1404 | (goto-char (point-max)))))) | ||
| 1405 | (mml-insert-empty-tag 'external 'type type 'name file | 1406 | (mml-insert-empty-tag 'external 'type type 'name file |
| 1406 | 'disposition "attachment" 'description description) | 1407 | 'disposition "attachment" 'description description) |
| 1408 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1409 | ;; when you send the message. | ||
| 1410 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1411 | (setq mail-encode-mml t)) | ||
| 1407 | (when head | 1412 | (when head |
| 1408 | (unless (prog1 | 1413 | (unless (pos-visible-in-window-p) |
| 1409 | (pos-visible-in-window-p) | ||
| 1410 | (goto-char head)) | ||
| 1411 | (message "The file \"%s\" has been attached at the end of the message" | 1414 | (message "The file \"%s\" has been attached at the end of the message" |
| 1412 | (file-name-nondirectory file)))))) | 1415 | (file-name-nondirectory file))) |
| 1416 | (goto-char head)))) | ||
| 1413 | 1417 | ||
| 1414 | (defun mml-insert-multipart (&optional type) | 1418 | (defun mml-insert-multipart (&optional type) |
| 1415 | (interactive (if (message-in-body-p) | 1419 | (interactive (if (message-in-body-p) |
| @@ -1422,12 +1426,20 @@ TYPE is the MIME type to use." | |||
| 1422 | (or type | 1426 | (or type |
| 1423 | (setq type "mixed")) | 1427 | (setq type "mixed")) |
| 1424 | (mml-insert-empty-tag "multipart" 'type type) | 1428 | (mml-insert-empty-tag "multipart" 'type type) |
| 1429 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1430 | ;; when you send the message. | ||
| 1431 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1432 | (setq mail-encode-mml t)) | ||
| 1425 | (forward-line -1)) | 1433 | (forward-line -1)) |
| 1426 | 1434 | ||
| 1427 | (defun mml-insert-part (&optional type) | 1435 | (defun mml-insert-part (&optional type) |
| 1428 | (interactive (if (message-in-body-p) | 1436 | (interactive (if (message-in-body-p) |
| 1429 | (list (mml-minibuffer-read-type "")) | 1437 | (list (mml-minibuffer-read-type "")) |
| 1430 | (error "Use this command in the message body"))) | 1438 | (error "Use this command in the message body"))) |
| 1439 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1440 | ;; when you send the message. | ||
| 1441 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1442 | (setq mail-encode-mml t)) | ||
| 1431 | (mml-insert-tag 'part 'type type 'disposition "inline")) | 1443 | (mml-insert-tag 'part 'type type 'disposition "inline")) |
| 1432 | 1444 | ||
| 1433 | (declare-function message-subscribed-p "message" ()) | 1445 | (declare-function message-subscribed-p "message" ()) |
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 644024a4b86..f92e2ab0af2 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -52,14 +52,14 @@ | |||
| 52 | ;; | 52 | ;; |
| 53 | ;; Setup: | 53 | ;; Setup: |
| 54 | ;; | 54 | ;; |
| 55 | ;; Put the following code in your .emacs file. This turns on | 55 | ;; Put the following code in your init file. This turns on |
| 56 | ;; hi-lock mode and adds a "Regexp Highlighting" entry | 56 | ;; hi-lock mode and adds a "Regexp Highlighting" entry |
| 57 | ;; to the edit menu. | 57 | ;; to the edit menu. |
| 58 | ;; | 58 | ;; |
| 59 | ;; (global-hi-lock-mode 1) | 59 | ;; (global-hi-lock-mode 1) |
| 60 | ;; | 60 | ;; |
| 61 | ;; To enable the use of patterns found in files (presumably placed | 61 | ;; To enable the use of patterns found in files (presumably placed |
| 62 | ;; there by hi-lock) include the following in your .emacs file: | 62 | ;; there by hi-lock) include the following in your init file: |
| 63 | ;; | 63 | ;; |
| 64 | ;; (setq hi-lock-file-patterns-policy 'ask) | 64 | ;; (setq hi-lock-file-patterns-policy 'ask) |
| 65 | ;; | 65 | ;; |
| @@ -356,7 +356,7 @@ Hi-lock: end is found. A mode is excluded if it's in the list | |||
| 356 | "Possible archaic use of (hi-lock-mode). | 356 | "Possible archaic use of (hi-lock-mode). |
| 357 | Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, | 357 | Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, |
| 358 | use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs | 358 | use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs |
| 359 | versions before 22 use the following in your .emacs file: | 359 | versions before 22 use the following in your init file: |
| 360 | 360 | ||
| 361 | (if (functionp 'global-hi-lock-mode) | 361 | (if (functionp 'global-hi-lock-mode) |
| 362 | (global-hi-lock-mode 1) | 362 | (global-hi-lock-mode 1) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c6e799252a2..77461469044 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -123,13 +123,13 @@ own!): | |||
| 123 | no upper limit on its size. The size will also be aligned to the | 123 | no upper limit on its size. The size will also be aligned to the |
| 124 | right. | 124 | right. |
| 125 | 125 | ||
| 126 | Thus, if you wanted to use these two formats, add | 126 | Thus, if you wanted to use these two formats, the appropriate |
| 127 | value for this variable would be | ||
| 127 | 128 | ||
| 128 | (setq ibuffer-formats '((mark \" \" name) | 129 | '((mark \" \" name) |
| 129 | (mark modified read-only | 130 | (mark modified read-only |
| 130 | (name 16 16 :left) (size 6 -1 :right)))) | 131 | (name 16 16 :left) |
| 131 | 132 | (size 6 -1 :right))) | |
| 132 | to your ~/.emacs file. | ||
| 133 | 133 | ||
| 134 | Using \\[ibuffer-switch-format], you can rotate the display between | 134 | Using \\[ibuffer-switch-format], you can rotate the display between |
| 135 | the specified formats in the list." | 135 | the specified formats in the list." |
diff --git a/lisp/ielm.el b/lisp/ielm.el index c93f235d81f..ba05bbcfc0f 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el | |||
| @@ -59,7 +59,7 @@ override the read-only-ness of IELM prompts is to call | |||
| 59 | `comint-kill-whole-line' or `comint-kill-region' with no | 59 | `comint-kill-whole-line' or `comint-kill-region' with no |
| 60 | narrowing in effect. This way you will be certain that none of | 60 | narrowing in effect. This way you will be certain that none of |
| 61 | the remaining prompts will be accidentally messed up. You may | 61 | the remaining prompts will be accidentally messed up. You may |
| 62 | wish to put something like the following in your `.emacs' file: | 62 | wish to put something like the following in your init file: |
| 63 | 63 | ||
| 64 | \(add-hook 'ielm-mode-hook | 64 | \(add-hook 'ielm-mode-hook |
| 65 | (lambda () | 65 | (lambda () |
diff --git a/lisp/image.el b/lisp/image.el index 7801923c3fe..99c0a74a512 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -645,8 +645,8 @@ number, play until that number of seconds has elapsed." | |||
| 645 | (while tail | 645 | (while tail |
| 646 | (setq timer (car tail) | 646 | (setq timer (car tail) |
| 647 | tail (cdr tail)) | 647 | tail (cdr tail)) |
| 648 | (if (and (eq (aref timer 5) 'image-animate-timeout) | 648 | (if (and (eq (timer--function timer) 'image-animate-timeout) |
| 649 | (eq (car-safe (aref timer 6)) image)) | 649 | (eq (car-safe (timer--args timer)) image)) |
| 650 | (setq tail nil) | 650 | (setq tail nil) |
| 651 | (setq timer nil))) | 651 | (setq timer nil))) |
| 652 | timer)) | 652 | timer)) |
diff --git a/lisp/info.el b/lisp/info.el index fe4afd72163..5862e5e850f 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1882,9 +1882,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1882 | (while (and (not give-up) | 1882 | (while (and (not give-up) |
| 1883 | (or (null found) | 1883 | (or (null found) |
| 1884 | (not (funcall isearch-filter-predicate beg-found found)))) | 1884 | (not (funcall isearch-filter-predicate beg-found found)))) |
| 1885 | (let ((search-spaces-regexp | 1885 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1886 | (if (or (not isearch-mode) isearch-regexp) | ||
| 1887 | Info-search-whitespace-regexp))) | ||
| 1888 | (if (if backward | 1886 | (if (if backward |
| 1889 | (re-search-backward regexp bound t) | 1887 | (re-search-backward regexp bound t) |
| 1890 | (re-search-forward regexp bound t)) | 1888 | (re-search-forward regexp bound t)) |
| @@ -1904,9 +1902,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1904 | (if (null Info-current-subfile) | 1902 | (if (null Info-current-subfile) |
| 1905 | (if isearch-mode | 1903 | (if isearch-mode |
| 1906 | (signal 'search-failed (list regexp "end of manual")) | 1904 | (signal 'search-failed (list regexp "end of manual")) |
| 1907 | (let ((search-spaces-regexp | 1905 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1908 | (if (or (not isearch-mode) isearch-regexp) | ||
| 1909 | Info-search-whitespace-regexp))) | ||
| 1910 | (if backward | 1906 | (if backward |
| 1911 | (re-search-backward regexp) | 1907 | (re-search-backward regexp) |
| 1912 | (re-search-forward regexp)))) | 1908 | (re-search-forward regexp)))) |
| @@ -1964,9 +1960,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1964 | (while (and (not give-up) | 1960 | (while (and (not give-up) |
| 1965 | (or (null found) | 1961 | (or (null found) |
| 1966 | (not (funcall isearch-filter-predicate beg-found found)))) | 1962 | (not (funcall isearch-filter-predicate beg-found found)))) |
| 1967 | (let ((search-spaces-regexp | 1963 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1968 | (if (or (not isearch-mode) isearch-regexp) | ||
| 1969 | Info-search-whitespace-regexp))) | ||
| 1970 | (if (if backward | 1964 | (if (if backward |
| 1971 | (re-search-backward regexp nil t) | 1965 | (re-search-backward regexp nil t) |
| 1972 | (re-search-forward regexp nil t)) | 1966 | (re-search-forward regexp nil t)) |
| @@ -2034,21 +2028,26 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 2034 | (defun Info-isearch-search () | 2028 | (defun Info-isearch-search () |
| 2035 | (if Info-isearch-search | 2029 | (if Info-isearch-search |
| 2036 | (lambda (string &optional bound noerror count) | 2030 | (lambda (string &optional bound noerror count) |
| 2037 | (Info-search | 2031 | (let ((Info-search-whitespace-regexp |
| 2038 | (cond | 2032 | (if (if isearch-regexp |
| 2039 | (isearch-word | 2033 | isearch-regexp-lax-whitespace |
| 2040 | ;; Lax version of word search | 2034 | isearch-lax-whitespace) |
| 2041 | (let ((lax (not (or isearch-nonincremental | 2035 | search-whitespace-regexp))) |
| 2042 | (eq (length string) | 2036 | (Info-search |
| 2043 | (length (isearch--state-string | 2037 | (cond |
| 2044 | (car isearch-cmds)))))))) | 2038 | (isearch-word |
| 2045 | (if (functionp isearch-word) | 2039 | ;; Lax version of word search |
| 2046 | (funcall isearch-word string lax) | 2040 | (let ((lax (not (or isearch-nonincremental |
| 2047 | (word-search-regexp string lax)))) | 2041 | (eq (length string) |
| 2048 | (isearch-regexp string) | 2042 | (length (isearch--state-string |
| 2049 | (t (regexp-quote string))) | 2043 | (car isearch-cmds)))))))) |
| 2050 | bound noerror count | 2044 | (if (functionp isearch-word) |
| 2051 | (unless isearch-forward 'backward)) | 2045 | (funcall isearch-word string lax) |
| 2046 | (word-search-regexp string lax)))) | ||
| 2047 | (isearch-regexp string) | ||
| 2048 | (t (regexp-quote string))) | ||
| 2049 | bound noerror count | ||
| 2050 | (unless isearch-forward 'backward))) | ||
| 2052 | (point)) | 2051 | (point)) |
| 2053 | (isearch-search-fun-default))) | 2052 | (isearch-search-fun-default))) |
| 2054 | 2053 | ||
| @@ -4157,8 +4156,6 @@ Advanced commands: | |||
| 4157 | 'Info-isearch-push-state) | 4156 | 'Info-isearch-push-state) |
| 4158 | (set (make-local-variable 'isearch-filter-predicate) | 4157 | (set (make-local-variable 'isearch-filter-predicate) |
| 4159 | 'Info-isearch-filter) | 4158 | 'Info-isearch-filter) |
| 4160 | (set (make-local-variable 'search-whitespace-regexp) | ||
| 4161 | Info-search-whitespace-regexp) | ||
| 4162 | (set (make-local-variable 'revert-buffer-function) | 4159 | (set (make-local-variable 'revert-buffer-function) |
| 4163 | 'Info-revert-buffer-function) | 4160 | 'Info-revert-buffer-function) |
| 4164 | (Info-set-mode-line) | 4161 | (Info-set-mode-line) |
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 39a88001112..3c34e5d9a2a 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el | |||
| @@ -224,13 +224,14 @@ The functions come in the following groups. | |||
| 224 | ogonek-prefix-to-encoding iso8859-2 | 224 | ogonek-prefix-to-encoding iso8859-2 |
| 225 | 225 | ||
| 226 | The above default values can be changed by placing appropriate settings | 226 | The above default values can be changed by placing appropriate settings |
| 227 | in the '~/.emacs' file: | 227 | in your init file: |
| 228 | 228 | ||
| 229 | (setq ogonek-prefix-char ?/) | 229 | (setq ogonek-prefix-char ?/) |
| 230 | (setq ogonek-prefix-to-encoding \"iso8859-2\") | 230 | (setq ogonek-prefix-to-encoding \"iso8859-2\") |
| 231 | 231 | ||
| 232 | Instead of loading the whole library `ogonek' it may be better to | 232 | Instead of loading the whole library `ogonek' it may be better |
| 233 | autoload the needed functions, for example by placing in `~/.emacs': | 233 | to autoload the needed functions, for example by adding the |
| 234 | following lines to your init file: | ||
| 234 | 235 | ||
| 235 | (autoload 'ogonek-how \"ogonek\") | 236 | (autoload 'ogonek-how \"ogonek\") |
| 236 | (autoload 'ogonek-recode-region \"ogonek\") | 237 | (autoload 'ogonek-recode-region \"ogonek\") |
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index ac2afa373c4..782b5a363ad 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el | |||
| @@ -110,7 +110,8 @@ | |||
| 110 | (use-cjk-char-width-table 'zh_CN))) | 110 | (use-cjk-char-width-table 'zh_CN))) |
| 111 | (exit-function . use-default-char-width-table) | 111 | (exit-function . use-default-char-width-table) |
| 112 | (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) | 112 | (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) |
| 113 | (coding-priority chinese-iso-8bit chinese-big5 iso-2022-cn) | 113 | (coding-priority chinese-iso-8bit chinese-gbk chinese-big5 |
| 114 | iso-2022-cn) | ||
| 114 | (input-method . "chinese-py-punct") | 115 | (input-method . "chinese-py-punct") |
| 115 | (features china-util) | 116 | (features china-util) |
| 116 | (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") | 117 | (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") |
| @@ -140,7 +141,8 @@ | |||
| 140 | (use-cjk-char-width-table 'zh_HK))) | 141 | (use-cjk-char-width-table 'zh_HK))) |
| 141 | (exit-function . use-default-char-width-table) | 142 | (exit-function . use-default-char-width-table) |
| 142 | (coding-system chinese-big5 chinese-iso-7bit) | 143 | (coding-system chinese-big5 chinese-iso-7bit) |
| 143 | (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit) | 144 | (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit |
| 145 | chinese-gbk) | ||
| 144 | (input-method . "chinese-py-punct-b5") | 146 | (input-method . "chinese-py-punct-b5") |
| 145 | (ctext-non-standard-encodings "big5-0") | 147 | (ctext-non-standard-encodings "big5-0") |
| 146 | (features china-util) | 148 | (features china-util) |
| @@ -196,7 +198,7 @@ | |||
| 196 | (exit-function . use-default-char-width-table) | 198 | (exit-function . use-default-char-width-table) |
| 197 | (coding-system iso-2022-cn euc-tw) | 199 | (coding-system iso-2022-cn euc-tw) |
| 198 | (coding-priority iso-2022-cn euc-tw chinese-big5 | 200 | (coding-priority iso-2022-cn euc-tw chinese-big5 |
| 199 | chinese-iso-8bit) | 201 | chinese-iso-8bit chinese-gbk) |
| 200 | (features china-util) | 202 | (features china-util) |
| 201 | (input-method . "chinese-cns-quick") | 203 | (input-method . "chinese-cns-quick") |
| 202 | ;; Fixme: presumably it won't accept big5 now. | 204 | ;; Fixme: presumably it won't accept big5 now. |
| @@ -216,7 +218,7 @@ accepts Big5 for input also (which is then converted to CNS).")) | |||
| 216 | (exit-function . use-default-char-width-table) | 218 | (exit-function . use-default-char-width-table) |
| 217 | (coding-system euc-tw iso-2022-cn) | 219 | (coding-system euc-tw iso-2022-cn) |
| 218 | (coding-priority euc-tw chinese-big5 iso-2022-cn | 220 | (coding-priority euc-tw chinese-big5 iso-2022-cn |
| 219 | chinese-iso-8bit) | 221 | chinese-iso-8bit chinese-gbk) |
| 220 | (features china-util) | 222 | (features china-util) |
| 221 | (input-method . "chinese-cns-quick") | 223 | (input-method . "chinese-cns-quick") |
| 222 | (documentation . "\ | 224 | (documentation . "\ |
diff --git a/lisp/locate.el b/lisp/locate.el index 29d7c75cbb2..d172ce3d6c4 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; | 34 | ;; |
| 35 | ;; SHELLPROGRAM Name-to-find | 35 | ;; SHELLPROGRAM Name-to-find |
| 36 | ;; | 36 | ;; |
| 37 | ;; set the variable `locate-command' in your .emacs file. | 37 | ;; set the variable `locate-command' in your init file. |
| 38 | ;; | 38 | ;; |
| 39 | ;; To use a more complicated expression, create a function which | 39 | ;; To use a more complicated expression, create a function which |
| 40 | ;; takes a string (the name to find) as input and returns a list. | 40 | ;; takes a string (the name to find) as input and returns a list. |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 520271940f2..4305094611a 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -139,9 +139,8 @@ | |||
| 139 | ;; feedmail-send-it. Hers's the best way to use the stuff in this | 139 | ;; feedmail-send-it. Hers's the best way to use the stuff in this |
| 140 | ;; file: | 140 | ;; file: |
| 141 | ;; | 141 | ;; |
| 142 | ;; Save this file as feedmail.el somewhere on your elisp | 142 | ;; Save this file as feedmail.el somewhere on your elisp loadpath; |
| 143 | ;; loadpath; byte-compile it. Put the following lines somewhere in | 143 | ;; byte-compile it. Put the following lines in your init file: |
| 144 | ;; your ~/.emacs stuff: | ||
| 145 | ;; | 144 | ;; |
| 146 | ;; (setq send-mail-function 'feedmail-send-it) | 145 | ;; (setq send-mail-function 'feedmail-send-it) |
| 147 | ;; (autoload 'feedmail-send-it "feedmail") | 146 | ;; (autoload 'feedmail-send-it "feedmail") |
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index dd489e3c6a9..40d67b4e904 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; time. | 28 | ;; time. |
| 29 | ;; | 29 | ;; |
| 30 | ;; To use this package, put it in a directory in your load-path, and | 30 | ;; To use this package, put it in a directory in your load-path, and |
| 31 | ;; put this in your .emacs file: | 31 | ;; put this in your init file: |
| 32 | ;; | 32 | ;; |
| 33 | ;; (load "mail-hist" nil t) | 33 | ;; (load "mail-hist" nil t) |
| 34 | ;; | 34 | ;; |
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 290c57c1c55..2e4ffec1383 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el | |||
| @@ -391,35 +391,24 @@ double-quotes." | |||
| 391 | (defun mail-abbrev-expand-hook () | 391 | (defun mail-abbrev-expand-hook () |
| 392 | "For use as the fourth arg to `define-abbrev'. | 392 | "For use as the fourth arg to `define-abbrev'. |
| 393 | After expanding a mail-abbrev, if Auto Fill mode is on and we're past the | 393 | After expanding a mail-abbrev, if Auto Fill mode is on and we're past the |
| 394 | fill-column, break the line at the previous comma, and indent the next line." | 394 | fill-column, break the line at the previous comma, and indent the next line |
| 395 | ;; Disable abbrev mode to avoid recursion in indent-relative expanding | 395 | with a space." |
| 396 | ;; part of the abbrev expansion as an abbrev itself. | 396 | (when auto-fill-function |
| 397 | (let ((abbrev-mode nil)) | 397 | (let (p) |
| 398 | (save-excursion | 398 | (save-excursion |
| 399 | (let ((p (point)) | 399 | (while (>= (current-column) fill-column) |
| 400 | bol comma fp) | 400 | (while (and (search-backward "," (point-at-bol) 'move) |
| 401 | (beginning-of-line) | 401 | (>= (current-column) (1- fill-column)) |
| 402 | (setq bol (point)) | 402 | (setq p (point)))) |
| 403 | (goto-char p) | 403 | (when (or (not (bolp)) |
| 404 | (while (and auto-fill-function | 404 | (and p (goto-char p))) |
| 405 | (>= (current-column) fill-column) | 405 | (setq p nil) |
| 406 | (search-backward "," bol t)) | 406 | (forward-char 1) |
| 407 | (setq comma (point)) | 407 | (insert "\n") |
| 408 | (forward-char 1) ; Now we are just past the comma. | 408 | (when (looking-at "[\t ]+") |
| 409 | (insert "\n") | 409 | (delete-region (point) (match-end 0))) |
| 410 | (delete-horizontal-space) | 410 | (insert " ") |
| 411 | (setq p (point)) | 411 | (end-of-line))))))) |
| 412 | (indent-relative) | ||
| 413 | (setq fp (buffer-substring p (point))) | ||
| 414 | ;; Go to the end of the new line. | ||
| 415 | (end-of-line) | ||
| 416 | (if (> (current-column) fill-column) | ||
| 417 | ;; It's still too long; do normal auto-fill. | ||
| 418 | (let ((fill-prefix (or fp "\t"))) | ||
| 419 | (do-auto-fill))) | ||
| 420 | ;; Resume the search. | ||
| 421 | (goto-char comma) | ||
| 422 | ))))) | ||
| 423 | 412 | ||
| 424 | ;;; Syntax tables and abbrev-expansion | 413 | ;;; Syntax tables and abbrev-expansion |
| 425 | 414 | ||
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d88862b2d47..5606e71dea4 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4068,6 +4068,13 @@ The variable `rmail-retry-ignored-headers' is a regular expression | |||
| 4068 | specifying headers which should not be copied into the new message." | 4068 | specifying headers which should not be copied into the new message." |
| 4069 | (interactive) | 4069 | (interactive) |
| 4070 | (require 'mail-utils) | 4070 | (require 'mail-utils) |
| 4071 | (if rmail-enable-mime | ||
| 4072 | (with-current-buffer rmail-buffer | ||
| 4073 | (if (rmail-mime-message-p) | ||
| 4074 | (let ((rmail-mime-mbox-buffer rmail-view-buffer) | ||
| 4075 | (rmail-mime-view-buffer rmail-buffer)) | ||
| 4076 | (rmail-mime-toggle-raw 'raw))))) | ||
| 4077 | |||
| 4071 | (let ((rmail-this-buffer (current-buffer)) | 4078 | (let ((rmail-this-buffer (current-buffer)) |
| 4072 | (msgnum rmail-current-message) | 4079 | (msgnum rmail-current-message) |
| 4073 | bounce-start bounce-end bounce-indent resending | 4080 | bounce-start bounce-end bounce-indent resending |
| @@ -4598,7 +4605,7 @@ With prefix argument N moves forward N messages with these labels. | |||
| 4598 | 4605 | ||
| 4599 | ;;;*** | 4606 | ;;;*** |
| 4600 | 4607 | ||
| 4601 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "cd7656f82944d0b92b0d093a5f3a4c36") | 4608 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "0c18b83f914803d1216e1a9df7ea5275") |
| 4602 | ;;; Generated autoloads from rmailmm.el | 4609 | ;;; Generated autoloads from rmailmm.el |
| 4603 | 4610 | ||
| 4604 | (autoload 'rmail-mime "rmailmm" "\ | 4611 | (autoload 'rmail-mime "rmailmm" "\ |
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 0b837a43d94..e4e066bd642 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el | |||
| @@ -111,6 +111,8 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 111 | ;; Even if the message is in `raw' state, boundaries etc | 111 | ;; Even if the message is in `raw' state, boundaries etc |
| 112 | ;; are still missing. All we can do is insert the real | 112 | ;; are still missing. All we can do is insert the real |
| 113 | ;; raw message. (Bug#9840) | 113 | ;; raw message. (Bug#9840) |
| 114 | ;; FIXME? Since the 2012-09-17 changes to rmail-mime, | ||
| 115 | ;; can we just use that function now? | ||
| 114 | (when (and entity | 116 | (when (and entity |
| 115 | (not (equal "text/plain" | 117 | (not (equal "text/plain" |
| 116 | (car (rmail-mime-entity-type entity))))) | 118 | (car (rmail-mime-entity-type entity))))) |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 67b2e62275f..2cc57963ef7 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -389,13 +389,13 @@ Use `raw' for raw mode, and any other non-nil value for decoded mode." | |||
| 389 | ;; Enter the raw mode. | 389 | ;; Enter the raw mode. |
| 390 | (rmail-mime-raw-mode entity) | 390 | (rmail-mime-raw-mode entity) |
| 391 | ;; Enter the shown mode. | 391 | ;; Enter the shown mode. |
| 392 | (rmail-mime-shown-mode entity)) | 392 | (rmail-mime-shown-mode entity) |
| 393 | (let ((inhibit-read-only t) | 393 | (let ((inhibit-read-only t) |
| 394 | (modified (buffer-modified-p))) | 394 | (modified (buffer-modified-p))) |
| 395 | (save-excursion | 395 | (save-excursion |
| 396 | (goto-char (aref segment 1)) | 396 | (goto-char (aref segment 1)) |
| 397 | (rmail-mime-insert entity) | 397 | (rmail-mime-insert entity) |
| 398 | (restore-buffer-modified-p modified))))) | 398 | (restore-buffer-modified-p modified)))))) |
| 399 | 399 | ||
| 400 | (defun rmail-mime-toggle-hidden () | 400 | (defun rmail-mime-toggle-hidden () |
| 401 | "Hide or show the body of the MIME-entity at point." | 401 | "Hide or show the body of the MIME-entity at point." |
| @@ -1212,7 +1212,7 @@ available." | |||
| 1212 | (if (rmail-mime-display-header current) | 1212 | (if (rmail-mime-display-header current) |
| 1213 | (delete-char (- (aref segment 2) (aref segment 1)))) | 1213 | (delete-char (- (aref segment 2) (aref segment 1)))) |
| 1214 | (insert-buffer-substring rmail-mime-mbox-buffer | 1214 | (insert-buffer-substring rmail-mime-mbox-buffer |
| 1215 | (aref header 0) (aref header 1))) | 1215 | (aref header 0) (aref header 1))) |
| 1216 | ;; tagline | 1216 | ;; tagline |
| 1217 | (if (rmail-mime-display-tagline current) | 1217 | (if (rmail-mime-display-tagline current) |
| 1218 | (delete-char (- (aref segment 3) (aref segment 2)))) | 1218 | (delete-char (- (aref segment 3) (aref segment 2)))) |
| @@ -1261,14 +1261,17 @@ The arguments ARG and STATE have no effect in this case." | |||
| 1261 | (interactive (list current-prefix-arg nil)) | 1261 | (interactive (list current-prefix-arg nil)) |
| 1262 | (if rmail-enable-mime | 1262 | (if rmail-enable-mime |
| 1263 | (with-current-buffer rmail-buffer | 1263 | (with-current-buffer rmail-buffer |
| 1264 | (if (rmail-mime-message-p) | 1264 | (if (or (rmail-mime-message-p) |
| 1265 | (let ((rmail-mime-mbox-buffer rmail-view-buffer) | 1265 | (get-text-property (point-min) 'rmail-mime-hidden)) |
| 1266 | (rmail-mime-view-buffer rmail-buffer) | 1266 | (let* ((hidden (get-text-property (point-min) 'rmail-mime-hidden)) |
| 1267 | (entity (get-text-property | 1267 | (desired-hidden (if state (eq state 'raw) (not hidden)))) |
| 1268 | (progn | 1268 | (unless (eq hidden desired-hidden) |
| 1269 | (or arg (goto-char (point-min))) | 1269 | (if (not desired-hidden) |
| 1270 | (point)) 'rmail-mime-entity))) | 1270 | (rmail-show-message rmail-current-message) |
| 1271 | (if (or (not arg) entity) (rmail-mime-toggle-raw state))) | 1271 | (let ((rmail-enable-mime nil) |
| 1272 | (inhibit-read-only t)) | ||
| 1273 | (rmail-show-message rmail-current-message) | ||
| 1274 | (add-text-properties (point-min) (point-max) '(rmail-mime-hidden t)))))) | ||
| 1272 | (message "Not a MIME message, just toggling headers") | 1275 | (message "Not a MIME message, just toggling headers") |
| 1273 | (rmail-toggle-header))) | 1276 | (rmail-toggle-header))) |
| 1274 | (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) | 1277 | (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) |
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index fdfe17a1a07..3d7495ffd1a 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | ;; Usage: | 63 | ;; Usage: |
| 64 | 64 | ||
| 65 | ;; Place uce.el in your load-path (and optionally byte-compile it). | 65 | ;; Place uce.el in your load-path (and optionally byte-compile it). |
| 66 | ;; Add the following line to your ~/.emacs: | 66 | ;; Add the following line to your init file: |
| 67 | ;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil) | 67 | ;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil) |
| 68 | ;; If you want to use it with Gnus rather than Rmail: | 68 | ;; If you want to use it with Gnus rather than Rmail: |
| 69 | ;; (setq uce-mail-reader 'gnus) | 69 | ;; (setq uce-mail-reader 'gnus) |
diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el index 8d043b4495f..a8e32bec1ae 100644 --- a/lisp/mouse-copy.el +++ b/lisp/mouse-copy.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | ;; If you like mouse-copy, you should also check out mouse-drag | 35 | ;; If you like mouse-copy, you should also check out mouse-drag |
| 36 | ;; for ``one-click scrolling''. | 36 | ;; for ``one-click scrolling''. |
| 37 | ;; | 37 | ;; |
| 38 | ;; To use mouse-copy, place the following in your .emacs file: | 38 | ;; To use mouse-copy, place the following in your init file: |
| 39 | ;; (require 'mouse-copy) | 39 | ;; (require 'mouse-copy) |
| 40 | ;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) | 40 | ;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) |
| 41 | ;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving) | 41 | ;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving) |
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index 7fb10505355..acdad9a42cf 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | ;; If you like mouse-drag, you should also check out mouse-copy | 46 | ;; If you like mouse-drag, you should also check out mouse-copy |
| 47 | ;; for ``one-click text copy and move''. | 47 | ;; for ``one-click text copy and move''. |
| 48 | ;; | 48 | ;; |
| 49 | ;; To use mouse-drag, place the following in your .emacs file: | 49 | ;; To use mouse-drag, place the following in your init file: |
| 50 | ;; -either- | 50 | ;; -either- |
| 51 | ;; (global-set-key [down-mouse-2] 'mouse-drag-throw) | 51 | ;; (global-set-key [down-mouse-2] 'mouse-drag-throw) |
| 52 | ;; -or- | 52 | ;; -or- |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 1501fa41baa..265a855b842 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | ;; that this change will take effect for the current GNU Emacs session only. | 79 | ;; that this change will take effect for the current GNU Emacs session only. |
| 80 | ;; See below for a discussion of non-UNIX hosts. If a large number of | 80 | ;; See below for a discussion of non-UNIX hosts. If a large number of |
| 81 | ;; machines with similar hostnames have this problem then it is easier to set | 81 | ;; machines with similar hostnames have this problem then it is easier to set |
| 82 | ;; the value of ange-ftp-dumb-unix-host-regexp in your .emacs file. ange-ftp | 82 | ;; the value of ange-ftp-dumb-unix-host-regexp in your init file. ange-ftp |
| 83 | ;; is unable to automatically recognize dumb unix hosts. | 83 | ;; is unable to automatically recognize dumb unix hosts. |
| 84 | 84 | ||
| 85 | ;; File name completion: | 85 | ;; File name completion: |
| @@ -275,10 +275,10 @@ | |||
| 275 | 275 | ||
| 276 | ;; VMS support: | 276 | ;; VMS support: |
| 277 | ;; | 277 | ;; |
| 278 | ;; Ange-ftp has full support for VMS hosts. It | 278 | ;; Ange-ftp has full support for VMS hosts. It should be able to |
| 279 | ;; should be able to automatically recognize any VMS machine. However, if it | 279 | ;; automatically recognize any VMS machine. However, if it fails to do |
| 280 | ;; fails to do this, you can use the command ange-ftp-add-vms-host. As well, | 280 | ;; this, you can use the command ange-ftp-add-vms-host. Also, you can |
| 281 | ;; you can set the variable ange-ftp-vms-host-regexp in your .emacs file. We | 281 | ;; set the variable ange-ftp-vms-host-regexp in your init file. We |
| 282 | ;; would be grateful if you would report any failures to automatically | 282 | ;; would be grateful if you would report any failures to automatically |
| 283 | ;; recognize a VMS host as a bug. | 283 | ;; recognize a VMS host as a bug. |
| 284 | ;; | 284 | ;; |
| @@ -332,7 +332,7 @@ | |||
| 332 | ;; the Michigan terminal system. It should be able to automatically | 332 | ;; the Michigan terminal system. It should be able to automatically |
| 333 | ;; recognize any MTS machine. However, if it fails to do this, you can use | 333 | ;; recognize any MTS machine. However, if it fails to do this, you can use |
| 334 | ;; the command ange-ftp-add-mts-host. As well, you can set the variable | 334 | ;; the command ange-ftp-add-mts-host. As well, you can set the variable |
| 335 | ;; ange-ftp-mts-host-regexp in your .emacs file. We would be grateful if you | 335 | ;; ange-ftp-mts-host-regexp in your init file. We would be grateful if you |
| 336 | ;; would report any failures to automatically recognize a MTS host as a bug. | 336 | ;; would report any failures to automatically recognize a MTS host as a bug. |
| 337 | ;; | 337 | ;; |
| 338 | ;; Filename syntax: | 338 | ;; Filename syntax: |
| @@ -358,7 +358,7 @@ | |||
| 358 | ;; CMS. It should be able to automatically recognize any CMS machine. | 358 | ;; CMS. It should be able to automatically recognize any CMS machine. |
| 359 | ;; However, if it fails to do this, you can use the command | 359 | ;; However, if it fails to do this, you can use the command |
| 360 | ;; ange-ftp-add-cms-host. As well, you can set the variable | 360 | ;; ange-ftp-add-cms-host. As well, you can set the variable |
| 361 | ;; ange-ftp-cms-host-regexp in your .emacs file. We would be grateful if you | 361 | ;; ange-ftp-cms-host-regexp in your init file. We would be grateful if you |
| 362 | ;; would report any failures to automatically recognize a CMS host as a bug. | 362 | ;; would report any failures to automatically recognize a CMS host as a bug. |
| 363 | ;; | 363 | ;; |
| 364 | ;; Filename syntax: | 364 | ;; Filename syntax: |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8daf339d376..b46d753d225 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -122,8 +122,7 @@ | |||
| 122 | ;; the buffer, use: | 122 | ;; the buffer, use: |
| 123 | ;; M-x browse-url | 123 | ;; M-x browse-url |
| 124 | 124 | ||
| 125 | ;; To display a URL by shift-clicking on it, put this in your ~/.emacs | 125 | ;; To display a URL by shift-clicking on it, put this in your init file: |
| 126 | ;; file: | ||
| 127 | ;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) | 126 | ;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) |
| 128 | ;; (Note that using Shift-mouse-1 is not desirable because | 127 | ;; (Note that using Shift-mouse-1 is not desirable because |
| 129 | ;; that event has a standard meaning in Emacs.) | 128 | ;; that event has a standard meaning in Emacs.) |
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 6a9d80f9672..f9e31788527 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ;; INSTALLATION | 33 | ;; INSTALLATION |
| 34 | ;; | 34 | ;; |
| 35 | ;; To use goto-address in a particular mode (for example, while | 35 | ;; To use goto-address in a particular mode (for example, while |
| 36 | ;; reading mail in mh-e), add something like this in your .emacs file: | 36 | ;; reading mail in mh-e), add this to your init file: |
| 37 | ;; | 37 | ;; |
| 38 | ;; (add-hook 'mh-show-mode-hook 'goto-address) | 38 | ;; (add-hook 'mh-show-mode-hook 'goto-address) |
| 39 | ;; | 39 | ;; |
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 5d673faf0db..91eca84ce53 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el | |||
| @@ -87,7 +87,7 @@ | |||
| 87 | ;; If you are using Newsticker as part of GNU Emacs there is no need to | 87 | ;; If you are using Newsticker as part of GNU Emacs there is no need to |
| 88 | ;; perform any installation steps in order to use Newsticker. Otherwise | 88 | ;; perform any installation steps in order to use Newsticker. Otherwise |
| 89 | ;; place Newsticker in a directory where Emacs can find it. Add the | 89 | ;; place Newsticker in a directory where Emacs can find it. Add the |
| 90 | ;; following line to your Emacs startup file (`~/.emacs'). | 90 | ;; following line to your init file: |
| 91 | ;; (add-to-list 'load-path "/path/to/newsticker/") | 91 | ;; (add-to-list 'load-path "/path/to/newsticker/") |
| 92 | ;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t) | 92 | ;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t) |
| 93 | ;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t) | 93 | ;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t) |
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index f3b0e372de4..f7d41fcd97a 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el | |||
| @@ -164,7 +164,7 @@ To make use of this do something like: | |||
| 164 | 164 | ||
| 165 | (setq quickurl-postfix quickurl-reread-hook-postfix) | 165 | (setq quickurl-postfix quickurl-reread-hook-postfix) |
| 166 | 166 | ||
| 167 | in your ~/.emacs (after loading/requiring quickurl).") | 167 | in your init file (after loading/requiring quickurl).") |
| 168 | 168 | ||
| 169 | ;; Non-customize variables. | 169 | ;; Non-customize variables. |
| 170 | 170 | ||
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 06aae1f6af2..abca6b3ea01 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -204,7 +204,7 @@ useful thing to do is to put | |||
| 204 | 204 | ||
| 205 | (setq tramp-verbose 9) | 205 | (setq tramp-verbose 9) |
| 206 | 206 | ||
| 207 | in the ~/.emacs file and to repeat the bug. Then, include the | 207 | in your init file and to repeat the bug. Then, include the |
| 208 | contents of the *tramp/foo* buffer and the *debug tramp/foo* | 208 | contents of the *tramp/foo* buffer and the *debug tramp/foo* |
| 209 | buffer in your bug report. | 209 | buffer in your bug report. |
| 210 | 210 | ||
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index 232e5ca581a..d5de2f410c5 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | ;; example sites. You'll probably want to override it with your own favorite | 38 | ;; example sites. You'll probably want to override it with your own favorite |
| 39 | ;; sites. The documentation for the variable describes the syntax. | 39 | ;; sites. The documentation for the variable describes the syntax. |
| 40 | 40 | ||
| 41 | ;; You may wish to add something like the following to your `.emacs' file: | 41 | ;; You may wish to add something like the following to your init file: |
| 42 | ;; | 42 | ;; |
| 43 | ;; (require 'webjump) | 43 | ;; (require 'webjump) |
| 44 | ;; (global-set-key "\C-cj" 'webjump) | 44 | ;; (global-set-key "\C-cj" 'webjump) |
diff --git a/lisp/novice.el b/lisp/novice.el index bcc94c86c9d..c621ac4b692 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -159,8 +159,8 @@ to future sessions." | |||
| 159 | (defun disable-command (command) | 159 | (defun disable-command (command) |
| 160 | "Require special confirmation to execute COMMAND from now on. | 160 | "Require special confirmation to execute COMMAND from now on. |
| 161 | COMMAND must be a symbol. | 161 | COMMAND must be a symbol. |
| 162 | This command alters the user's .emacs file so that this will apply | 162 | This command alters your init file so that this choice applies to |
| 163 | to future sessions." | 163 | future sessions." |
| 164 | (interactive "CDisable command: ") | 164 | (interactive "CDisable command: ") |
| 165 | (en/disable-command command t)) | 165 | (en/disable-command command t)) |
| 166 | 166 | ||
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index d357da685e5..3f120961486 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; argument position. | 28 | ;; argument position. |
| 29 | ;; | 29 | ;; |
| 30 | ;; To use pcomplete with shell-mode, for example, you will need the | 30 | ;; To use pcomplete with shell-mode, for example, you will need the |
| 31 | ;; following in your .emacs file: | 31 | ;; following in your init file: |
| 32 | ;; | 32 | ;; |
| 33 | ;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup) | 33 | ;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup) |
| 34 | ;; | 34 | ;; |
| @@ -451,9 +451,12 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 451 | (list beg (point) table | 451 | (list beg (point) table |
| 452 | :predicate pred | 452 | :predicate pred |
| 453 | :exit-function | 453 | :exit-function |
| 454 | ;; If completion is finished, add a terminating space. | ||
| 455 | ;; We used to also do this if STATUS is `sole', but | ||
| 456 | ;; that does not work right when completion cycling. | ||
| 454 | (unless (zerop (length pcomplete-termination-string)) | 457 | (unless (zerop (length pcomplete-termination-string)) |
| 455 | (lambda (_s finished) | 458 | (lambda (_s status) |
| 456 | (when (memq finished '(sole finished)) | 459 | (when (eq status 'finished) |
| 457 | (if (looking-at | 460 | (if (looking-at |
| 458 | (regexp-quote pcomplete-termination-string)) | 461 | (regexp-quote pcomplete-termination-string)) |
| 459 | (goto-char (match-end 0)) | 462 | (goto-char (match-end 0)) |
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 1f04099a6ae..3b6035473fd 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ;; Installation | 33 | ;; Installation |
| 34 | ;; ------------ | 34 | ;; ------------ |
| 35 | 35 | ||
| 36 | ;; Add the following lines to your Emacs startup file (`~/.emacs'). | 36 | ;; Add the following lines to your init file: |
| 37 | ;; (add-to-list 'load-path "/path/to/bubbles/") | 37 | ;; (add-to-list 'load-path "/path/to/bubbles/") |
| 38 | ;; (autoload 'bubbles "bubbles" "Play Bubbles" t) | 38 | ;; (autoload 'bubbles "bubbles" "Play Bubbles" t) |
| 39 | 39 | ||
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index 8d9506a1614..ade0d15006a 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el | |||
| @@ -138,19 +138,7 @@ the tail of the list." | |||
| 138 | ("^)\\([A-Z ]+\\)\\([a-z ]+\\)" | 138 | ("^)\\([A-Z ]+\\)\\([a-z ]+\\)" |
| 139 | (1 font-lock-keyword-face) | 139 | (1 font-lock-keyword-face) |
| 140 | (2 font-lock-string-face))) | 140 | (2 font-lock-string-face))) |
| 141 | "Expressions to fontify in Decipher mode. | 141 | "Font Lock keywords for Decipher mode.") |
| 142 | |||
| 143 | Ciphertext uses `font-lock-keyword-face', plaintext uses | ||
| 144 | `font-lock-string-face', comments use `font-lock-comment-face', and | ||
| 145 | checkpoints use `font-lock-constant-face'. You can customize the | ||
| 146 | display by changing these variables. For best results, I recommend | ||
| 147 | that all faces use the same background color. | ||
| 148 | |||
| 149 | For example, to display ciphertext in the `bold' face, use | ||
| 150 | (add-hook 'decipher-mode-hook | ||
| 151 | (lambda () (set (make-local-variable 'font-lock-keyword-face) | ||
| 152 | 'bold))) | ||
| 153 | in your `.emacs' file.") | ||
| 154 | 142 | ||
| 155 | (defvar decipher-mode-map | 143 | (defvar decipher-mode-map |
| 156 | (let ((map (make-keymap))) | 144 | (let ((map (make-keymap))) |
diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index d2e307c0145..85c128b08e2 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | ;; Installation | 45 | ;; Installation |
| 46 | ;; | 46 | ;; |
| 47 | ;; type at your prompt "emacs -l handwrite.el" or put this file on your | 47 | ;; type at your prompt "emacs -l handwrite.el" or put this file on your |
| 48 | ;; Emacs-Lisp load path, add the following into your ~/.emacs startup file | 48 | ;; Emacs-Lisp load path, add the following into your init file: |
| 49 | ;; | 49 | ;; |
| 50 | ;; (require 'handwrite) | 50 | ;; (require 'handwrite) |
| 51 | ;; | 51 | ;; |
diff --git a/lisp/printing.el b/lisp/printing.el index 0152ed63dbb..02b2fb0139c 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -139,10 +139,9 @@ Please send all bug fixes and enhancements to | |||
| 139 | ;; | 139 | ;; |
| 140 | ;; One way to set variables is by calling `pr-customize', customize all | 140 | ;; One way to set variables is by calling `pr-customize', customize all |
| 141 | ;; variables and save the customization by future sessions (see Options | 141 | ;; variables and save the customization by future sessions (see Options |
| 142 | ;; section). Other way is by coding your settings on Emacs init file (that is, | 142 | ;; section). Other way is by adding code to your init file; see below |
| 143 | ;; ~/.emacs file), see below for a first setting template that it should be | 143 | ;; for a first setting template that it should be inserted on your |
| 144 | ;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT | 144 | ;; init file: |
| 145 | ;; or MS-DOS): | ||
| 146 | ;; | 145 | ;; |
| 147 | ;; * Example of setting for Windows system: | 146 | ;; * Example of setting for Windows system: |
| 148 | ;; | 147 | ;; |
| @@ -297,8 +296,7 @@ Please send all bug fixes and enhancements to | |||
| 297 | ;; Using `printing' | 296 | ;; Using `printing' |
| 298 | ;; ---------------- | 297 | ;; ---------------- |
| 299 | ;; | 298 | ;; |
| 300 | ;; To use `printing' insert in your ~/.emacs file (or c:/_emacs, if you're | 299 | ;; To use `printing' insert in your init file: |
| 301 | ;; using Windows 9x/NT or MS-DOS): | ||
| 302 | ;; | 300 | ;; |
| 303 | ;; (require 'printing) | 301 | ;; (require 'printing) |
| 304 | ;; ;; ...some user settings... | 302 | ;; ;; ...some user settings... |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 4062646c967..5a054af9883 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | ;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode. | 69 | ;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode. |
| 70 | 70 | ||
| 71 | ;; If antlr-mode is not part of your distribution, put this file into your | 71 | ;; If antlr-mode is not part of your distribution, put this file into your |
| 72 | ;; load-path and the following into your ~/.emacs: | 72 | ;; load-path and the following into your init file: |
| 73 | ;; (autoload 'antlr-mode "antlr-mode" nil t) | 73 | ;; (autoload 'antlr-mode "antlr-mode" nil t) |
| 74 | ;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist)) | 74 | ;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist)) |
| 75 | ;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el | 75 | ;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el |
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 8bccb44f308..0dc596a472b 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -1829,7 +1829,7 @@ itself is evaluated." | |||
| 1829 | (eval form)) | 1829 | (eval form)) |
| 1830 | 1830 | ||
| 1831 | ;; Only used at compile time - suppress "might not be defined at runtime". | 1831 | ;; Only used at compile time - suppress "might not be defined at runtime". |
| 1832 | (declare-function cl-macroexpand-all "cl-extra" (form &optional env)) | 1832 | (declare-function cl-macroexpand-all "cl" (form &optional env)) |
| 1833 | 1833 | ||
| 1834 | (defmacro c-lang-defconst (name &rest args) | 1834 | (defmacro c-lang-defconst (name &rest args) |
| 1835 | "Set the language specific values of the language constant NAME. | 1835 | "Set the language specific values of the language constant NAME. |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 78be8ac2cc4..d5a1be572ba 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -208,9 +208,10 @@ the evaluated constant value at compile time." | |||
| 208 | 208 | ||
| 209 | ;; Suppress "might not be defined at runtime" warning. | 209 | ;; Suppress "might not be defined at runtime" warning. |
| 210 | ;; This file is only used when compiling other cc files. | 210 | ;; This file is only used when compiling other cc files. |
| 211 | (declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys)) | 211 | ;; These are defined in cl as aliases to the cl- versions. |
| 212 | (declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest)) | 212 | (declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t) |
| 213 | (declare-function cl-macroexpand-all "cl-extra" (form &optional env)) | 213 | (declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t) |
| 214 | (declare-function cl-macroexpand-all "cl" (form &optional env)) | ||
| 214 | 215 | ||
| 215 | (eval-and-compile | 216 | (eval-and-compile |
| 216 | ;; Some helper functions used when building the language constants. | 217 | ;; Some helper functions used when building the language constants. |
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index cf628e44de0..20aa2bc2775 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el | |||
| @@ -352,8 +352,8 @@ might get set too. | |||
| 352 | If DONT-OVERRIDE is neither nil nor t, style variables whose default values | 352 | If DONT-OVERRIDE is neither nil nor t, style variables whose default values |
| 353 | have been set (more precisely, whose default values are not the symbol | 353 | have been set (more precisely, whose default values are not the symbol |
| 354 | `set-from-style') will not be changed. This avoids overriding global settings | 354 | `set-from-style') will not be changed. This avoids overriding global settings |
| 355 | done in ~/.emacs. It is useful to call c-set-style from a mode hook in this | 355 | done in your init file. It is useful to call c-set-style from a mode hook |
| 356 | way. | 356 | in this way. |
| 357 | 357 | ||
| 358 | If DONT-OVERRIDE is t, style variables that already have values (i.e., whose | 358 | If DONT-OVERRIDE is t, style variables that already have values (i.e., whose |
| 359 | values are not the symbol `set-from-style') will not be overridden. CC Mode | 359 | values are not the symbol `set-from-style') will not be overridden. CC Mode |
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 943b5c6a067..525b1c9671e 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | 49 | ||
| 50 | ;; INSTALLATION ====================================================== | 50 | ;; INSTALLATION ====================================================== |
| 51 | 51 | ||
| 52 | ;; Put the following in your ~/.emacs file. | 52 | ;; Put the following in your init file. |
| 53 | 53 | ||
| 54 | ;; If you want the *Macroexpansion* window to be not higher than | 54 | ;; If you want the *Macroexpansion* window to be not higher than |
| 55 | ;; necessary: | 55 | ;; necessary: |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index fbb0c9e204a..95b8758ba80 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -488,9 +488,12 @@ What matched the HYPERLINK'th subexpression has `mouse-face' and | |||
| 488 | `compilation-message-face' applied. If this is nil, the text | 488 | `compilation-message-face' applied. If this is nil, the text |
| 489 | matched by the whole REGEXP becomes the hyperlink. | 489 | matched by the whole REGEXP becomes the hyperlink. |
| 490 | 490 | ||
| 491 | Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is | 491 | Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where |
| 492 | the number of a submatch that should be highlighted when it matches, | 492 | SUBMATCH is the number of a submatch and FACE is an expression |
| 493 | and FACE is an expression returning the face to use for that submatch.." | 493 | which evaluates to a face name (a symbol or string). |
| 494 | Alternatively, FACE can evaluate to a property list of the | ||
| 495 | form (face FACE PROP1 VAL1 PROP2 VAL2 ...), in which case all the | ||
| 496 | listed text properties PROP# are given values VAL# as well." | ||
| 494 | :type '(repeat (choice (symbol :tag "Predefined symbol") | 497 | :type '(repeat (choice (symbol :tag "Predefined symbol") |
| 495 | (sexp :tag "Error specification"))) | 498 | (sexp :tag "Error specification"))) |
| 496 | :link `(file-link :tag "example file" | 499 | :link `(file-link :tag "example file" |
| @@ -1328,16 +1331,27 @@ to `compilation-error-regexp-alist' if RULES is nil." | |||
| 1328 | (compilation--put-prop | 1331 | (compilation--put-prop |
| 1329 | end-col 'font-lock-face compilation-column-face) | 1332 | end-col 'font-lock-face compilation-column-face) |
| 1330 | 1333 | ||
| 1334 | ;; Obey HIGHLIGHT. | ||
| 1331 | (dolist (extra-item (nthcdr 6 item)) | 1335 | (dolist (extra-item (nthcdr 6 item)) |
| 1332 | (let ((mn (pop extra-item))) | 1336 | (let ((mn (pop extra-item))) |
| 1333 | (when (match-beginning mn) | 1337 | (when (match-beginning mn) |
| 1334 | (let ((face (eval (car extra-item)))) | 1338 | (let ((face (eval (car extra-item)))) |
| 1335 | (cond | 1339 | (cond |
| 1336 | ((null face)) | 1340 | ((null face)) |
| 1337 | ((symbolp face) | 1341 | ((or (symbolp face) (stringp face)) |
| 1338 | (put-text-property | 1342 | (put-text-property |
| 1339 | (match-beginning mn) (match-end mn) | 1343 | (match-beginning mn) (match-end mn) |
| 1340 | 'font-lock-face face)) | 1344 | 'font-lock-face face)) |
| 1345 | ((and (listp face) | ||
| 1346 | (eq (car face) 'face) | ||
| 1347 | (or (symbolp (cadr face)) | ||
| 1348 | (stringp (cadr face)))) | ||
| 1349 | (put-text-property | ||
| 1350 | (match-beginning mn) (match-end mn) | ||
| 1351 | 'font-lock-face (cadr face)) | ||
| 1352 | (add-text-properties | ||
| 1353 | (match-beginning mn) (match-end mn) | ||
| 1354 | (nthcdr 2 face))) | ||
| 1341 | (t | 1355 | (t |
| 1342 | (error "Don't know how to handle face %S" | 1356 | (error "Don't know how to handle face %S" |
| 1343 | face))))))) | 1357 | face))))))) |
| @@ -1542,20 +1556,20 @@ Returns the compilation buffer created." | |||
| 1542 | (get-buffer-create | 1556 | (get-buffer-create |
| 1543 | (compilation-buffer-name name-of-mode mode name-function))) | 1557 | (compilation-buffer-name name-of-mode mode name-function))) |
| 1544 | (let ((comp-proc (get-buffer-process (current-buffer)))) | 1558 | (let ((comp-proc (get-buffer-process (current-buffer)))) |
| 1545 | (if comp-proc | 1559 | (if comp-proc |
| 1546 | (if (or (not (eq (process-status comp-proc) 'run)) | 1560 | (if (or (not (eq (process-status comp-proc) 'run)) |
| 1547 | compilation-always-kill | 1561 | (eq (process-query-on-exit-flag comp-proc) nil) |
| 1548 | (yes-or-no-p | 1562 | (yes-or-no-p |
| 1549 | (format "A %s process is running; kill it? " | 1563 | (format "A %s process is running; kill it? " |
| 1550 | name-of-mode))) | 1564 | name-of-mode))) |
| 1551 | (condition-case () | 1565 | (condition-case () |
| 1552 | (progn | 1566 | (progn |
| 1553 | (interrupt-process comp-proc) | 1567 | (interrupt-process comp-proc) |
| 1554 | (sit-for 1) | 1568 | (sit-for 1) |
| 1555 | (delete-process comp-proc)) | 1569 | (delete-process comp-proc)) |
| 1556 | (error nil)) | 1570 | (error nil)) |
| 1557 | (error "Cannot have two processes in `%s' at once" | 1571 | (error "Cannot have two processes in `%s' at once" |
| 1558 | (buffer-name))))) | 1572 | (buffer-name))))) |
| 1559 | ;; first transfer directory from where M-x compile was called | 1573 | ;; first transfer directory from where M-x compile was called |
| 1560 | (setq default-directory thisdir) | 1574 | (setq default-directory thisdir) |
| 1561 | ;; Make compilation buffer read-only. The filter can still write it. | 1575 | ;; Make compilation buffer read-only. The filter can still write it. |
| @@ -1610,7 +1624,7 @@ Returns the compilation buffer created." | |||
| 1610 | (let ((process-environment | 1624 | (let ((process-environment |
| 1611 | (append | 1625 | (append |
| 1612 | compilation-environment | 1626 | compilation-environment |
| 1613 | (if (if (boundp 'system-uses-terminfo) ; `if' for compiler warning | 1627 | (if (if (boundp 'system-uses-terminfo);`If' for compiler warning. |
| 1614 | system-uses-terminfo) | 1628 | system-uses-terminfo) |
| 1615 | (list "TERM=dumb" "TERMCAP=" | 1629 | (list "TERM=dumb" "TERMCAP=" |
| 1616 | (format "COLUMNS=%d" (window-width))) | 1630 | (format "COLUMNS=%d" (window-width))) |
| @@ -1660,13 +1674,20 @@ Returns the compilation buffer created." | |||
| 1660 | nil `("-c" ,command)))) | 1674 | nil `("-c" ,command)))) |
| 1661 | (start-file-process-shell-command (downcase mode-name) | 1675 | (start-file-process-shell-command (downcase mode-name) |
| 1662 | outbuf command)))) | 1676 | outbuf command)))) |
| 1663 | ;; Make the buffer's mode line show process state. | 1677 | ;; Make the buffer's mode line show process state. |
| 1664 | (setq mode-line-process | 1678 | (setq mode-line-process |
| 1665 | '(:propertize ":%s" face compilation-mode-line-run)) | 1679 | '(:propertize ":%s" face compilation-mode-line-run)) |
| 1666 | (set-process-sentinel proc 'compilation-sentinel) | 1680 | |
| 1667 | (unless (eq mode t) | 1681 | ;; Set the process as killable without query by default. |
| 1668 | ;; Keep the comint filter, since it's needed for proper handling | 1682 | ;; This allows us to start a new compilation without |
| 1669 | ;; of the prompts. | 1683 | ;; getting prompted. |
| 1684 | (when compilation-always-kill | ||
| 1685 | (set-process-query-on-exit-flag proc nil)) | ||
| 1686 | |||
| 1687 | (set-process-sentinel proc 'compilation-sentinel) | ||
| 1688 | (unless (eq mode t) | ||
| 1689 | ;; Keep the comint filter, since it's needed for proper | ||
| 1690 | ;; handling of the prompts. | ||
| 1670 | (set-process-filter proc 'compilation-filter)) | 1691 | (set-process-filter proc 'compilation-filter)) |
| 1671 | ;; Use (point-max) here so that output comes in | 1692 | ;; Use (point-max) here so that output comes in |
| 1672 | ;; after the initial text, | 1693 | ;; after the initial text, |
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index cdbaf4708a7..0f18cffc3de 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -43,7 +43,7 @@ Please send all bug fixes and enhancements to | |||
| 43 | ;; | 43 | ;; |
| 44 | ;; This package translates an EBNF to a syntactic chart on PostScript. | 44 | ;; This package translates an EBNF to a syntactic chart on PostScript. |
| 45 | ;; | 45 | ;; |
| 46 | ;; To use ebnf2ps, insert in your ~/.emacs: | 46 | ;; To use ebnf2ps, insert in your init file: |
| 47 | ;; | 47 | ;; |
| 48 | ;; (require 'ebnf2ps) | 48 | ;; (require 'ebnf2ps) |
| 49 | ;; | 49 | ;; |
| @@ -772,7 +772,7 @@ Please send all bug fixes and enhancements to | |||
| 772 | ;; | 772 | ;; |
| 773 | ;; To set the above options you may: | 773 | ;; To set the above options you may: |
| 774 | ;; | 774 | ;; |
| 775 | ;; a) insert the code in your ~/.emacs, like: | 775 | ;; a) insert the code in your init file, like: |
| 776 | ;; | 776 | ;; |
| 777 | ;; (setq ebnf-terminal-shape 'bevel) | 777 | ;; (setq ebnf-terminal-shape 'bevel) |
| 778 | ;; | 778 | ;; |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index cc1251f6a75..f42952685d0 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -102,10 +102,9 @@ | |||
| 102 | ;; (abbrev-mode 1) ; turn on abbreviation mode | 102 | ;; (abbrev-mode 1) ; turn on abbreviation mode |
| 103 | ;; (f90-add-imenu-menu) ; extra menu with functions etc. | 103 | ;; (f90-add-imenu-menu) ; extra menu with functions etc. |
| 104 | ;; (if f90-auto-keyword-case ; change case of all keywords on startup | 104 | ;; (if f90-auto-keyword-case ; change case of all keywords on startup |
| 105 | ;; (f90-change-keywords f90-auto-keyword-case)) | 105 | ;; (f90-change-keywords f90-auto-keyword-case)))) |
| 106 | ;; )) | ||
| 107 | ;; | 106 | ;; |
| 108 | ;; in your .emacs file. You can also customize the lists | 107 | ;; in your init file. You can also customize the lists |
| 109 | ;; f90-font-lock-keywords, etc. | 108 | ;; f90-font-lock-keywords, etc. |
| 110 | ;; | 109 | ;; |
| 111 | ;; The auto-fill and abbreviation minor modes are accessible from the F90 menu, | 110 | ;; The auto-fill and abbreviation minor modes are accessible from the F90 menu, |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 233b9a5212e..2a77ad013c7 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | ;; | 52 | ;; |
| 53 | ;; First make sure hideshow.el is in a directory in your `load-path'. | 53 | ;; First make sure hideshow.el is in a directory in your `load-path'. |
| 54 | ;; You can optionally byte-compile it using `M-x byte-compile-file'. | 54 | ;; You can optionally byte-compile it using `M-x byte-compile-file'. |
| 55 | ;; Then, add the following to your ~/.emacs: | 55 | ;; Then, add the following to your init file: |
| 56 | ;; | 56 | ;; |
| 57 | ;; (load-library "hideshow") | 57 | ;; (load-library "hideshow") |
| 58 | ;; (add-hook 'X-mode-hook ; other modes similarly | 58 | ;; (add-hook 'X-mode-hook ; other modes similarly |
diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index 246ba8f29cd..24613d14634 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el | |||
| @@ -53,8 +53,8 @@ | |||
| 53 | ;; | 53 | ;; |
| 54 | ;; INSTALLATION | 54 | ;; INSTALLATION |
| 55 | ;; ============ | 55 | ;; ============ |
| 56 | ;; Put this file on the emacs load path and load it with the following | 56 | ;; Put this file on the emacs load path and load it with the following |
| 57 | ;; line in your .emacs file: | 57 | ;; line in your init file: |
| 58 | ;; | 58 | ;; |
| 59 | ;; (add-hook 'idlwave-load-hook | 59 | ;; (add-hook 'idlwave-load-hook |
| 60 | ;; (lambda () (require 'idlw-complete-structtag))) | 60 | ;; (lambda () (require 'idlw-complete-structtag))) |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 4f9109284ae..08d1461c008 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | ;; | 48 | ;; |
| 49 | ;; Follow the instructions in the INSTALL file of the distribution. | 49 | ;; Follow the instructions in the INSTALL file of the distribution. |
| 50 | ;; In short, put this file on your load path and add the following | 50 | ;; In short, put this file on your load path and add the following |
| 51 | ;; lines to your .emacs file: | 51 | ;; lines to your init file: |
| 52 | ;; | 52 | ;; |
| 53 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) | 53 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
| 54 | ;; | 54 | ;; |
| @@ -111,9 +111,7 @@ For example, \"^\r?IDL> \" or \"^\r?WAVE> \". | |||
| 111 | The \"^\r?\" is needed, to indicate the beginning of the line, with | 111 | The \"^\r?\" is needed, to indicate the beginning of the line, with |
| 112 | optional return character (which IDL seems to output randomly). | 112 | optional return character (which IDL seems to output randomly). |
| 113 | This variable is used to initialize `comint-prompt-regexp' in the | 113 | This variable is used to initialize `comint-prompt-regexp' in the |
| 114 | process buffer. | 114 | process buffer." |
| 115 | |||
| 116 | This is a fine thing to set in your `.emacs' file." | ||
| 117 | :group 'idlwave-shell-general-setup | 115 | :group 'idlwave-shell-general-setup |
| 118 | :type 'regexp) | 116 | :type 'regexp) |
| 119 | 117 | ||
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index a35ffd3e45d..9b634328fa7 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | ;; | 51 | ;; |
| 52 | ;; Follow the instructions in the INSTALL file of the distribution. | 52 | ;; Follow the instructions in the INSTALL file of the distribution. |
| 53 | ;; In short, put this file on your load path and add the following | 53 | ;; In short, put this file on your load path and add the following |
| 54 | ;; lines to your .emacs file: | 54 | ;; lines to your init file: |
| 55 | ;; | 55 | ;; |
| 56 | ;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) | 56 | ;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) |
| 57 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) | 57 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
| @@ -746,7 +746,7 @@ or even '?'. '.' is not a good choice because it can make structure | |||
| 746 | field names act like abbrevs in certain circumstances. | 746 | field names act like abbrevs in certain circumstances. |
| 747 | 747 | ||
| 748 | Changes to this in `idlwave-mode-hook' will have no effect. Instead a user | 748 | Changes to this in `idlwave-mode-hook' will have no effect. Instead a user |
| 749 | must set it directly using `setq' in the .emacs file before idlwave.el | 749 | must set it directly using `setq' in the init file before idlwave.el |
| 750 | is loaded." | 750 | is loaded." |
| 751 | :group 'idlwave-abbrev-and-indent-action | 751 | :group 'idlwave-abbrev-and-indent-action |
| 752 | :type 'string) | 752 | :type 'string) |
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index cd6c8869d9f..401970b2ce8 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -168,9 +168,7 @@ This variable is only used if the variable | |||
| 168 | More precise choices: | 168 | More precise choices: |
| 169 | Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" | 169 | Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" |
| 170 | franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" | 170 | franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" |
| 171 | kcl: \"^>+ *\" | 171 | kcl: \"^>+ *\"" |
| 172 | |||
| 173 | This is a fine thing to set in your .emacs file or through Custom." | ||
| 174 | :type 'regexp | 172 | :type 'regexp |
| 175 | :group 'inferior-lisp) | 173 | :group 'inferior-lisp) |
| 176 | 174 | ||
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index 54d857dd4b1..a59176a5aa6 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and | 32 | ;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and |
| 33 | ;; `ftp://ftp.gnu.org/pub/gnu/mdk'. | 33 | ;; `ftp://ftp.gnu.org/pub/gnu/mdk'. |
| 34 | ;; | 34 | ;; |
| 35 | ;; To use this mode, place the following in your .emacs file: | 35 | ;; To use this mode, place the following in your init file: |
| 36 | ;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. | 36 | ;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. |
| 37 | ;; When you load a file with the extension .mixal the mode will be started | 37 | ;; When you load a file with the extension .mixal the mode will be started |
| 38 | ;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. | 38 | ;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 79b3fcee720..ab5a19f8a2f 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -585,12 +585,12 @@ Variables you can use to customize Octave mode | |||
| 585 | Turning on Octave mode runs the hook `octave-mode-hook'. | 585 | Turning on Octave mode runs the hook `octave-mode-hook'. |
| 586 | 586 | ||
| 587 | To begin using this mode for all `.m' files that you edit, add the | 587 | To begin using this mode for all `.m' files that you edit, add the |
| 588 | following lines to your `.emacs' file: | 588 | following lines to your init file: |
| 589 | 589 | ||
| 590 | (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) | 590 | (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) |
| 591 | 591 | ||
| 592 | To automatically turn on the abbrev and auto-fill features, | 592 | To automatically turn on the abbrev and auto-fill features, |
| 593 | add the following lines to your `.emacs' file as well: | 593 | add the following lines to your init file as well: |
| 594 | 594 | ||
| 595 | (add-hook 'octave-mode-hook | 595 | (add-hook 'octave-mode-hook |
| 596 | (lambda () | 596 | (lambda () |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index e13b67e596d..3dd9a48bb33 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -28,14 +28,14 @@ | |||
| 28 | ;;; Commentary: | 28 | ;;; Commentary: |
| 29 | 29 | ||
| 30 | ;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode") | 30 | ;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode") |
| 31 | ;; to your .emacs file and change the first line of your perl script to: | 31 | ;; to your init file and change the first line of your perl script to: |
| 32 | ;; #!/usr/bin/perl -- # -*-Perl-*- | 32 | ;; #!/usr/bin/perl -- # -*-Perl-*- |
| 33 | ;; With arguments to perl: | 33 | ;; With arguments to perl: |
| 34 | ;; #!/usr/bin/perl -P- # -*-Perl-*- | 34 | ;; #!/usr/bin/perl -P- # -*-Perl-*- |
| 35 | ;; To handle files included with do 'filename.pl';, add something like | 35 | ;; To handle files included with do 'filename.pl';, add something like |
| 36 | ;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode)) | 36 | ;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode)) |
| 37 | ;; auto-mode-alist)) | 37 | ;; auto-mode-alist)) |
| 38 | ;; to your .emacs file; otherwise the .pl suffix defaults to prolog-mode. | 38 | ;; to your init file; otherwise the .pl suffix defaults to prolog-mode. |
| 39 | 39 | ||
| 40 | ;; This code is based on the 18.53 version c-mode.el, with extensive | 40 | ;; This code is based on the 18.53 version c-mode.el, with extensive |
| 41 | ;; rewriting. Most of the features of c-mode survived intact. | 41 | ;; rewriting. Most of the features of c-mode survived intact. |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 16d85cb2d79..33d43cb3d5a 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -60,9 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | ;;; Installation: | 61 | ;;; Installation: |
| 62 | ;; | 62 | ;; |
| 63 | ;; Insert the following lines in your init file--typically ~/.emacs | 63 | ;; Insert the following lines in your init file: |
| 64 | ;; (GNU Emacs and XEmacs <21.4), or ~/.xemacs/init.el (XEmacs | ||
| 65 | ;; 21.4)--to use this mode when editing Prolog files under Emacs: | ||
| 66 | ;; | 64 | ;; |
| 67 | ;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) | 65 | ;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) |
| 68 | ;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) | 66 | ;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index f3ecbe3fc3d..3d5abc4df62 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -268,9 +268,8 @@ | |||
| 268 | 268 | ||
| 269 | (defcustom sql-password "" | 269 | (defcustom sql-password "" |
| 270 | "Default password. | 270 | "Default password. |
| 271 | 271 | If you customize this, the value will be stored in your init | |
| 272 | Storing your password in a textfile such as ~/.emacs could be dangerous. | 272 | file. Since that is a plaintext file, this could be dangerous." |
| 273 | Customizing your password will store it in your ~/.emacs file." | ||
| 274 | :type 'string | 273 | :type 'string |
| 275 | :group 'SQL | 274 | :group 'SQL |
| 276 | :risky t) | 275 | :risky t) |
| @@ -1285,8 +1284,8 @@ Based on `comint-mode-map'.") | |||
| 1285 | ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)] | 1284 | ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)] |
| 1286 | ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)])) | 1285 | ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)])) |
| 1287 | 1286 | ||
| 1288 | ;; Abbreviations -- if you want more of them, define them in your | 1287 | ;; Abbreviations -- if you want more of them, define them in your init |
| 1289 | ;; ~/.emacs file. Abbrevs have to be enabled in your ~/.emacs, too. | 1288 | ;; file. Abbrevs have to be enabled in your init file, too. |
| 1290 | 1289 | ||
| 1291 | (defvar sql-mode-abbrev-table nil | 1290 | (defvar sql-mode-abbrev-table nil |
| 1292 | "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") | 1291 | "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") |
| @@ -3715,8 +3714,8 @@ For information on how to create multiple SQLi buffers, see | |||
| 3715 | `sql-interactive-mode'. | 3714 | `sql-interactive-mode'. |
| 3716 | 3715 | ||
| 3717 | Note that SQL doesn't have an escape character unless you specify | 3716 | Note that SQL doesn't have an escape character unless you specify |
| 3718 | one. If you specify backslash as escape character in SQL, | 3717 | one. If you specify backslash as escape character in SQL, you |
| 3719 | you must tell Emacs. Here's how to do that in your `~/.emacs' file: | 3718 | must tell Emacs. Here's how to do that in your init file: |
| 3720 | 3719 | ||
| 3721 | \(add-hook 'sql-mode-hook | 3720 | \(add-hook 'sql-mode-hook |
| 3722 | (lambda () | 3721 | (lambda () |
| @@ -3806,7 +3805,7 @@ cause the window to scroll to the end of the buffer. | |||
| 3806 | If you want to make SQL buffers limited in length, add the function | 3805 | If you want to make SQL buffers limited in length, add the function |
| 3807 | `comint-truncate-buffer' to `comint-output-filter-functions'. | 3806 | `comint-truncate-buffer' to `comint-output-filter-functions'. |
| 3808 | 3807 | ||
| 3809 | Here is an example for your .emacs file. It keeps the SQLi buffer a | 3808 | Here is an example for your init file. It keeps the SQLi buffer a |
| 3810 | certain length. | 3809 | certain length. |
| 3811 | 3810 | ||
| 3812 | \(add-hook 'sql-interactive-mode-hook | 3811 | \(add-hook 'sql-interactive-mode-hook |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index c072754e66d..835d548c19f 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -8790,7 +8790,7 @@ Note these are only read when the file is first visited, you must use | |||
| 8790 | \\[find-alternate-file] RET to have these take effect after editing them! | 8790 | \\[find-alternate-file] RET to have these take effect after editing them! |
| 8791 | 8791 | ||
| 8792 | If you want to disable the \"Process `eval' or hook local variables\" | 8792 | If you want to disable the \"Process `eval' or hook local variables\" |
| 8793 | warning message, you need to add to your .emacs file: | 8793 | warning message, you need to add to your init file: |
| 8794 | 8794 | ||
| 8795 | (setq enable-local-eval t)" | 8795 | (setq enable-local-eval t)" |
| 8796 | (let ((origbuf (current-buffer))) | 8796 | (let ((origbuf (current-buffer))) |
| @@ -11756,7 +11756,7 @@ An example: | |||
| 11756 | 11756 | ||
| 11757 | // For this example we declare the function in the | 11757 | // For this example we declare the function in the |
| 11758 | // module's file itself. Often you'd define it instead | 11758 | // module's file itself. Often you'd define it instead |
| 11759 | // in a site-start.el or .emacs file. | 11759 | // in a site-start.el or init file. |
| 11760 | /* | 11760 | /* |
| 11761 | Local Variables: | 11761 | Local Variables: |
| 11762 | eval: | 11762 | eval: |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index addf2975c5f..930e750ab27 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -1042,7 +1042,7 @@ Please send all bug fixes and enhancements to | |||
| 1042 | ;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. | 1042 | ;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. |
| 1043 | ;; These variables contain lists of faces that ps-print should consider bold, | 1043 | ;; These variables contain lists of faces that ps-print should consider bold, |
| 1044 | ;; italic or underline; to set them, put code like the following into your | 1044 | ;; italic or underline; to set them, put code like the following into your |
| 1045 | ;; .emacs file: | 1045 | ;; init file: |
| 1046 | ;; | 1046 | ;; |
| 1047 | ;; (setq ps-bold-faces '(my-blue-face)) | 1047 | ;; (setq ps-bold-faces '(my-blue-face)) |
| 1048 | ;; (setq ps-italic-faces '(my-red-face)) | 1048 | ;; (setq ps-italic-faces '(my-red-face)) |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 43dad63a140..0c082169462 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -56,13 +56,12 @@ This means when you visit a file, point goes to the last place | |||
| 56 | where it was when you previously visited the same file. | 56 | where it was when you previously visited the same file. |
| 57 | This variable is automatically buffer-local. | 57 | This variable is automatically buffer-local. |
| 58 | 58 | ||
| 59 | If you wish your place in any file to always be automatically saved, | 59 | If you wish your place in any file to always be automatically |
| 60 | simply put this in your `~/.emacs' file: | 60 | saved, set this to t using the Customize facility, or put the |
| 61 | following code in your init file: | ||
| 61 | 62 | ||
| 62 | \(setq-default save-place t) | 63 | \(setq-default save-place t) |
| 63 | \(require 'saveplace) | 64 | \(require 'saveplace)" |
| 64 | |||
| 65 | or else use the Custom facility to set this option." | ||
| 66 | :type 'boolean | 65 | :type 'boolean |
| 67 | :require 'saveplace | 66 | :require 'saveplace |
| 68 | :group 'save-place) | 67 | :group 'save-place) |
| @@ -148,7 +147,8 @@ even in a later Emacs session. | |||
| 148 | If called with a prefix arg, the mode is enabled if and only if | 147 | If called with a prefix arg, the mode is enabled if and only if |
| 149 | the argument is positive. | 148 | the argument is positive. |
| 150 | 149 | ||
| 151 | To save places automatically in all files, put this in your `.emacs' file: | 150 | To save places automatically in all files, put this in your init |
| 151 | file: | ||
| 152 | 152 | ||
| 153 | \(setq-default save-place t\)" | 153 | \(setq-default save-place t\)" |
| 154 | (interactive "P") | 154 | (interactive "P") |
diff --git a/lisp/shell.el b/lisp/shell.el index b98efceefbf..77a42389785 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | ;; YOUR .EMACS FILE | 47 | ;; YOUR .EMACS FILE |
| 48 | ;;============================================================================= | 48 | ;;============================================================================= |
| 49 | ;; Some suggestions for your .emacs file. | 49 | ;; Some suggestions for your init file. |
| 50 | ;; | 50 | ;; |
| 51 | ;; ;; Define M-# to run some strange command: | 51 | ;; ;; Define M-# to run some strange command: |
| 52 | ;; (eval-after-load "shell" | 52 | ;; (eval-after-load "shell" |
| @@ -136,9 +136,7 @@ how Shell mode treats paragraphs. | |||
| 136 | 136 | ||
| 137 | The pattern should probably not match more than one line. If it does, | 137 | The pattern should probably not match more than one line. If it does, |
| 138 | Shell mode may become confused trying to distinguish prompt from input | 138 | Shell mode may become confused trying to distinguish prompt from input |
| 139 | on lines which don't start with a prompt. | 139 | on lines which don't start with a prompt." |
| 140 | |||
| 141 | This is a fine thing to set in your `.emacs' file." | ||
| 142 | :type 'regexp | 140 | :type 'regexp |
| 143 | :group 'shell) | 141 | :group 'shell) |
| 144 | 142 | ||
| @@ -146,9 +144,7 @@ This is a fine thing to set in your `.emacs' file." | |||
| 146 | "List of suffixes to be disregarded during file/command completion. | 144 | "List of suffixes to be disregarded during file/command completion. |
| 147 | This variable is used to initialize `comint-completion-fignore' in the shell | 145 | This variable is used to initialize `comint-completion-fignore' in the shell |
| 148 | buffer. The default is nil, for compatibility with most shells. | 146 | buffer. The default is nil, for compatibility with most shells. |
| 149 | Some people like (\"~\" \"#\" \"%\"). | 147 | Some people like (\"~\" \"#\" \"%\")." |
| 150 | |||
| 151 | This is a fine thing to set in your `.emacs' file." | ||
| 152 | :type '(repeat (string :tag "Suffix")) | 148 | :type '(repeat (string :tag "Suffix")) |
| 153 | :group 'shell) | 149 | :group 'shell) |
| 154 | 150 | ||
| @@ -158,31 +154,29 @@ This variable is used to initialize `comint-delimiter-argument-list' in the | |||
| 158 | shell buffer. The value may depend on the operating system or shell." | 154 | shell buffer. The value may depend on the operating system or shell." |
| 159 | :type '(choice (const nil) | 155 | :type '(choice (const nil) |
| 160 | (repeat :tag "List of characters" character)) | 156 | (repeat :tag "List of characters" character)) |
| 161 | ;; Reverted. | ||
| 162 | ;; :version "24.1" ; changed to nil (bug#8027) | ||
| 163 | :group 'shell) | 157 | :group 'shell) |
| 164 | 158 | ||
| 165 | (defvar shell-file-name-chars | 159 | (defcustom shell-file-name-chars |
| 166 | (if (memq system-type '(ms-dos windows-nt cygwin)) | 160 | (if (memq system-type '(ms-dos windows-nt cygwin)) |
| 167 | "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" | 161 | "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" |
| 168 | "[]~/A-Za-z0-9+@:_.$#%,={}-") | 162 | "[]~/A-Za-z0-9+@:_.$#%,={}-") |
| 169 | "String of characters valid in a file name. | 163 | "String of characters valid in a file name. |
| 170 | This variable is used to initialize `comint-file-name-chars' in the | 164 | This variable is used to initialize `comint-file-name-chars' in the |
| 171 | shell buffer. The value may depend on the operating system or shell. | 165 | shell buffer. The value may depend on the operating system or shell." |
| 172 | 166 | :type 'string | |
| 173 | This is a fine thing to set in your `.emacs' file.") | 167 | :group 'shell) |
| 174 | 168 | ||
| 175 | (defvar shell-file-name-quote-list | 169 | (defcustom shell-file-name-quote-list |
| 176 | (if (memq system-type '(ms-dos windows-nt)) | 170 | (if (memq system-type '(ms-dos windows-nt)) |
| 177 | nil | 171 | nil |
| 178 | (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) | 172 | (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) |
| 179 | "List of characters to quote when in a file name. | 173 | "List of characters to quote when in a file name. |
| 180 | This variable is used to initialize `comint-file-name-quote-list' in the | 174 | This variable is used to initialize `comint-file-name-quote-list' in the |
| 181 | shell buffer. The value may depend on the operating system or shell. | 175 | shell buffer. The value may depend on the operating system or shell." |
| 182 | 176 | :type '(repeat character) | |
| 183 | This is a fine thing to set in your `.emacs' file.") | 177 | :group 'shell) |
| 184 | 178 | ||
| 185 | (defvar shell-dynamic-complete-functions | 179 | (defcustom shell-dynamic-complete-functions |
| 186 | '(comint-c-a-p-replace-by-expanded-history | 180 | '(comint-c-a-p-replace-by-expanded-history |
| 187 | shell-environment-variable-completion | 181 | shell-environment-variable-completion |
| 188 | shell-command-completion | 182 | shell-command-completion |
| @@ -192,9 +186,9 @@ This is a fine thing to set in your `.emacs' file.") | |||
| 192 | comint-filename-completion) | 186 | comint-filename-completion) |
| 193 | "List of functions called to perform completion. | 187 | "List of functions called to perform completion. |
| 194 | This variable is used to initialize `comint-dynamic-complete-functions' in the | 188 | This variable is used to initialize `comint-dynamic-complete-functions' in the |
| 195 | shell buffer. | 189 | shell buffer." |
| 196 | 190 | :type '(repeat function) | |
| 197 | This is a fine thing to set in your `.emacs' file.") | 191 | :group 'shell) |
| 198 | 192 | ||
| 199 | (defcustom shell-command-regexp "[^;&|\n]+" | 193 | (defcustom shell-command-regexp "[^;&|\n]+" |
| 200 | "Regexp to match a single command within a pipeline. | 194 | "Regexp to match a single command within a pipeline. |
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 90cdea63e85..25a6fbfd998 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -706,7 +706,7 @@ will be stripped by a simplified optimizer when compiled into a | |||
| 706 | singular expression. This variable will be turned into | 706 | singular expression. This variable will be turned into |
| 707 | `speedbar-file-regexp' for use with speedbar. You should use the | 707 | `speedbar-file-regexp' for use with speedbar. You should use the |
| 708 | function `speedbar-add-supported-extension' to add a new extension at | 708 | function `speedbar-add-supported-extension' to add a new extension at |
| 709 | runtime, or use the configuration dialog to set it in your .emacs file. | 709 | runtime, or use the configuration dialog to set it in your init file. |
| 710 | If you add an extension to this list, and it does not appear, you may | 710 | If you add an extension to this list, and it does not appear, you may |
| 711 | need to also modify `completion-ignored-extension' which will also help | 711 | need to also modify `completion-ignored-extension' which will also help |
| 712 | file completion." | 712 | file completion." |
diff --git a/lisp/startup.el b/lisp/startup.el index 348e653dd28..db5efb89eed 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -71,12 +71,13 @@ once you are familiar with the contents of the startup screen." | |||
| 71 | "Non-nil inhibits the initial startup echo area message. | 71 | "Non-nil inhibits the initial startup echo area message. |
| 72 | Setting this variable takes effect | 72 | Setting this variable takes effect |
| 73 | only if you do it with the customization buffer | 73 | only if you do it with the customization buffer |
| 74 | or if your `.emacs' file contains a line of this form: | 74 | or if your init file contains a line of this form: |
| 75 | (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") | 75 | (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") |
| 76 | If your `.emacs' file is byte-compiled, use the following form instead: | 76 | If your init file is byte-compiled, use the following form |
| 77 | instead: | ||
| 77 | (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) | 78 | (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) |
| 78 | Thus, someone else using a copy of your `.emacs' file will see | 79 | Thus, someone else using a copy of your init file will see the |
| 79 | the startup message unless he personally acts to inhibit it." | 80 | startup message unless he personally acts to inhibit it." |
| 80 | :type '(choice (const :tag "Don't inhibit") | 81 | :type '(choice (const :tag "Don't inhibit") |
| 81 | (string :tag "Enter your user name, to inhibit")) | 82 | (string :tag "Enter your user name, to inhibit")) |
| 82 | :group 'initialization) | 83 | :group 'initialization) |
| @@ -261,10 +262,14 @@ and VALUE is the value which is given to that frame parameter | |||
| 261 | "Normal hook run after handling urgent options but before loading init files.") | 262 | "Normal hook run after handling urgent options but before loading init files.") |
| 262 | 263 | ||
| 263 | (defvar after-init-hook nil | 264 | (defvar after-init-hook nil |
| 264 | "Normal hook run after loading the init files, `~/.emacs' and `default.el'. | 265 | "Normal hook run after initializing the Emacs session. |
| 265 | There is no `condition-case' around the running of these functions; | 266 | It is run after Emacs loads the init file, `default' library, the |
| 266 | therefore, if you set `debug-on-error' non-nil in `.emacs', | 267 | abbrevs file, and additional Lisp packages (if any), and setting |
| 267 | an error in one of these functions will invoke the debugger.") | 268 | the value of `after-init-time'. |
| 269 | |||
| 270 | There is no `condition-case' around the running of this hook; | ||
| 271 | therefore, if `debug-on-error' is non-nil, an error in one of | ||
| 272 | these functions will invoke the debugger.") | ||
| 268 | 273 | ||
| 269 | (defvar emacs-startup-hook nil | 274 | (defvar emacs-startup-hook nil |
| 270 | "Normal hook run after loading init files and handling the command line.") | 275 | "Normal hook run after loading init files and handling the command line.") |
| @@ -296,7 +301,7 @@ the user's init file.") | |||
| 296 | :group 'initialization) | 301 | :group 'initialization) |
| 297 | 302 | ||
| 298 | (defvar init-file-user nil | 303 | (defvar init-file-user nil |
| 299 | "Identity of user whose `.emacs' file is or was read. | 304 | "Identity of user whose init file is or was read. |
| 300 | The value is nil if `-q' or `--no-init-file' was specified, | 305 | The value is nil if `-q' or `--no-init-file' was specified, |
| 301 | meaning do not load any init file. | 306 | meaning do not load any init file. |
| 302 | 307 | ||
| @@ -306,7 +311,7 @@ or it may be a string containing a user's name meaning | |||
| 306 | use that person's init file. | 311 | use that person's init file. |
| 307 | 312 | ||
| 308 | In either of the latter cases, `(concat \"~\" init-file-user \"/\")' | 313 | In either of the latter cases, `(concat \"~\" init-file-user \"/\")' |
| 309 | evaluates to the name of the directory where the `.emacs' file was | 314 | evaluates to the name of the directory where the init file was |
| 310 | looked for. | 315 | looked for. |
| 311 | 316 | ||
| 312 | Setting `init-file-user' does not prevent Emacs from loading | 317 | Setting `init-file-user' does not prevent Emacs from loading |
| @@ -365,7 +370,7 @@ init file is read, in case it sets `mail-host-address'." | |||
| 365 | (t | 370 | (t |
| 366 | (concat user-emacs-directory "auto-save-list/.saves-"))) | 371 | (concat user-emacs-directory "auto-save-list/.saves-"))) |
| 367 | "Prefix for generating `auto-save-list-file-name'. | 372 | "Prefix for generating `auto-save-list-file-name'. |
| 368 | This is used after reading your `.emacs' file to initialize | 373 | This is used after reading your init file to initialize |
| 369 | `auto-save-list-file-name', by appending Emacs's pid and the system name, | 374 | `auto-save-list-file-name', by appending Emacs's pid and the system name, |
| 370 | if you have not already set `auto-save-list-file-name' yourself. | 375 | if you have not already set `auto-save-list-file-name' yourself. |
| 371 | Directories in the prefix will be created if necessary. | 376 | Directories in the prefix will be created if necessary. |
diff --git a/lisp/strokes.el b/lisp/strokes.el index dfd0e95f61a..62a8528f25d 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el | |||
| @@ -933,14 +933,7 @@ and then safely save them for later use, send letters to friends | |||
| 933 | extracting the strokes for editing use once again, so the editing | 933 | extracting the strokes for editing use once again, so the editing |
| 934 | cycle can continue. | 934 | cycle can continue. |
| 935 | 935 | ||
| 936 | Strokes are easy to program and fun to use. To start strokes going, | 936 | To toggle strokes-mode, invoke the command |
| 937 | you'll want to put the following line in your .emacs file as mentioned | ||
| 938 | in the commentary to strokes.el. | ||
| 939 | |||
| 940 | This will load strokes when and only when you start Emacs on a window | ||
| 941 | system, with a mouse or other pointer device defined. | ||
| 942 | |||
| 943 | To toggle strokes-mode, you just do | ||
| 944 | 937 | ||
| 945 | > M-x strokes-mode | 938 | > M-x strokes-mode |
| 946 | 939 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index aa1b10ce17d..e9b85ff1f38 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -80,6 +80,7 @@ For more information, see Info node `(elisp)Declaring Functions'." | |||
| 80 | (defmacro noreturn (form) | 80 | (defmacro noreturn (form) |
| 81 | "Evaluate FORM, expecting it not to return. | 81 | "Evaluate FORM, expecting it not to return. |
| 82 | If FORM does return, signal an error." | 82 | If FORM does return, signal an error." |
| 83 | (declare (debug t)) | ||
| 83 | `(prog1 ,form | 84 | `(prog1 ,form |
| 84 | (error "Form marked with `noreturn' did return"))) | 85 | (error "Form marked with `noreturn' did return"))) |
| 85 | 86 | ||
| @@ -87,6 +88,7 @@ If FORM does return, signal an error." | |||
| 87 | "Evaluate FORM, expecting a constant return value. | 88 | "Evaluate FORM, expecting a constant return value. |
| 88 | This is the global do-nothing version. There is also `testcover-1value' | 89 | This is the global do-nothing version. There is also `testcover-1value' |
| 89 | that complains if FORM ever does return differing values." | 90 | that complains if FORM ever does return differing values." |
| 91 | (declare (debug t)) | ||
| 90 | form) | 92 | form) |
| 91 | 93 | ||
| 92 | (defmacro def-edebug-spec (symbol spec) | 94 | (defmacro def-edebug-spec (symbol spec) |
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 9a9a31f4253..aea2e8c1092 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el | |||
| @@ -322,7 +322,7 @@ | |||
| 322 | "Terminal initialization function for iris-ansi." | 322 | "Terminal initialization function for iris-ansi." |
| 323 | ;; Use inheritance to let the main keymap override these defaults. | 323 | ;; Use inheritance to let the main keymap override these defaults. |
| 324 | ;; This way we don't override terminfo-derived settings or settings | 324 | ;; This way we don't override terminfo-derived settings or settings |
| 325 | ;; made in the .emacs file. | 325 | ;; made in the init file. |
| 326 | (let ((m (copy-keymap iris-function-map))) | 326 | (let ((m (copy-keymap iris-function-map))) |
| 327 | (set-keymap-parent m (keymap-parent input-decode-map)) | 327 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 328 | (set-keymap-parent input-decode-map m))) | 328 | (set-keymap-parent input-decode-map m))) |
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 76a3a31cedc..6b9e1301003 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el | |||
| @@ -75,7 +75,7 @@ | |||
| 75 | (defun terminal-init-lk201 () | 75 | (defun terminal-init-lk201 () |
| 76 | ;; Use inheritance to let the main keymap override these defaults. | 76 | ;; Use inheritance to let the main keymap override these defaults. |
| 77 | ;; This way we don't override terminfo-derived settings or settings | 77 | ;; This way we don't override terminfo-derived settings or settings |
| 78 | ;; made in the .emacs file. | 78 | ;; made in the init file. |
| 79 | (let ((m (copy-keymap lk201-function-map))) | 79 | (let ((m (copy-keymap lk201-function-map))) |
| 80 | (set-keymap-parent m (keymap-parent input-decode-map)) | 80 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 81 | (set-keymap-parent input-decode-map m))) | 81 | (set-keymap-parent input-decode-map m))) |
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 481d6b498cf..98141563006 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el | |||
| @@ -166,7 +166,7 @@ | |||
| 166 | 166 | ||
| 167 | ;; Use inheritance to let the main keymap override those defaults. | 167 | ;; Use inheritance to let the main keymap override those defaults. |
| 168 | ;; This way we don't override terminfo-derived settings or settings | 168 | ;; This way we don't override terminfo-derived settings or settings |
| 169 | ;; made in the .emacs file. | 169 | ;; made in the init file. |
| 170 | (let ((m (copy-keymap rxvt-function-map))) | 170 | (let ((m (copy-keymap rxvt-function-map))) |
| 171 | (set-keymap-parent m (keymap-parent input-decode-map)) | 171 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 172 | (set-keymap-parent input-decode-map m)) | 172 | (set-keymap-parent input-decode-map m)) |
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index b02d39c1e0f..f1b6eea8875 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el | |||
| @@ -93,7 +93,7 @@ | |||
| 93 | "Terminal initialization function for tvi970." | 93 | "Terminal initialization function for tvi970." |
| 94 | ;; Use inheritance to let the main keymap override these defaults. | 94 | ;; Use inheritance to let the main keymap override these defaults. |
| 95 | ;; This way we don't override terminfo-derived settings or settings | 95 | ;; This way we don't override terminfo-derived settings or settings |
| 96 | ;; made in the .emacs file. | 96 | ;; made in the init file. |
| 97 | (let ((m (copy-keymap tvi970-terminal-map))) | 97 | (let ((m (copy-keymap tvi970-terminal-map))) |
| 98 | (set-keymap-parent m (keymap-parent input-decode-map)) | 98 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 99 | (set-keymap-parent input-decode-map m)) | 99 | (set-keymap-parent input-decode-map m)) |
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index d037962af19..ce148b62dba 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el | |||
| @@ -109,7 +109,7 @@ | |||
| 109 | "Terminal initialization function for wyse50." | 109 | "Terminal initialization function for wyse50." |
| 110 | ;; Use inheritance to let the main keymap override these defaults. | 110 | ;; Use inheritance to let the main keymap override these defaults. |
| 111 | ;; This way we don't override terminfo-derived settings or settings | 111 | ;; This way we don't override terminfo-derived settings or settings |
| 112 | ;; made in the .emacs file. | 112 | ;; made in the init file. |
| 113 | (let ((m (copy-keymap wyse50-terminal-map))) | 113 | (let ((m (copy-keymap wyse50-terminal-map))) |
| 114 | (set-keymap-parent m (keymap-parent input-decode-map)) | 114 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 115 | (set-keymap-parent input-decode-map m)) | 115 | (set-keymap-parent input-decode-map m)) |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 28fb9da0b9d..e4871658b98 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -480,7 +480,7 @@ The relevant features are: | |||
| 480 | 480 | ||
| 481 | ;; Use inheritance to let the main keymap override those defaults. | 481 | ;; Use inheritance to let the main keymap override those defaults. |
| 482 | ;; This way we don't override terminfo-derived settings or settings | 482 | ;; This way we don't override terminfo-derived settings or settings |
| 483 | ;; made in the .emacs file. | 483 | ;; made in the init file. |
| 484 | (set-keymap-parent map (keymap-parent input-decode-map)) | 484 | (set-keymap-parent map (keymap-parent input-decode-map)) |
| 485 | (set-keymap-parent input-decode-map map))) | 485 | (set-keymap-parent input-decode-map map))) |
| 486 | 486 | ||
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index a9320d945ef..42f0418b690 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -290,9 +290,9 @@ If this variable is nil, all regions are treated as small." | |||
| 290 | ;;* Mode specific options enable users to disable flyspell on */ | 290 | ;;* Mode specific options enable users to disable flyspell on */ |
| 291 | ;;* certain word depending of the emacs mode. For instance, when */ | 291 | ;;* certain word depending of the emacs mode. For instance, when */ |
| 292 | ;;* using flyspell with mail-mode add the following expression */ | 292 | ;;* using flyspell with mail-mode add the following expression */ |
| 293 | ;;* in your .emacs file: */ | 293 | ;;* in your init file: */ |
| 294 | ;;* (add-hook 'mail-mode */ | 294 | ;;* (add-hook 'mail-mode */ |
| 295 | ;;* (lambda () (setq flyspell-generic-check-word-predicate */ | 295 | ;;* (lambda () (setq flyspell-generic-check-word-predicate */ |
| 296 | ;;* 'mail-mode-flyspell-verify))) */ | 296 | ;;* 'mail-mode-flyspell-verify))) */ |
| 297 | ;;*---------------------------------------------------------------------*/ | 297 | ;;*---------------------------------------------------------------------*/ |
| 298 | (defvar flyspell-generic-check-word-predicate nil | 298 | (defvar flyspell-generic-check-word-predicate nil |
| @@ -488,7 +488,7 @@ invoking `ispell-change-dictionary'. | |||
| 488 | Consider using the `ispell-parser' to check your text. For instance | 488 | Consider using the `ispell-parser' to check your text. For instance |
| 489 | consider adding: | 489 | consider adding: |
| 490 | \(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) | 490 | \(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) |
| 491 | in your .emacs file. | 491 | in your init file. |
| 492 | 492 | ||
| 493 | \\[flyspell-region] checks all words inside a region. | 493 | \\[flyspell-region] checks all words inside a region. |
| 494 | \\[flyspell-buffer] checks the whole buffer." | 494 | \\[flyspell-buffer] checks the whole buffer." |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0c7966f22d3..51a4800de52 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1127,7 +1127,8 @@ aspell is used along with Emacs).") | |||
| 1127 | 1127 | ||
| 1128 | ;; If Emacs flavor supports [:alpha:] use it for global dicts. If | 1128 | ;; If Emacs flavor supports [:alpha:] use it for global dicts. If |
| 1129 | ;; spellchecker also supports UTF-8 via command-line option use it | 1129 | ;; spellchecker also supports UTF-8 via command-line option use it |
| 1130 | ;; in communication. This does not affect definitions in ~/.emacs. | 1130 | ;; in communication. This does not affect definitions in your |
| 1131 | ;; init file. | ||
| 1131 | (if ispell-emacs-alpha-regexp | 1132 | (if ispell-emacs-alpha-regexp |
| 1132 | (let (tmp-dicts-alist) | 1133 | (let (tmp-dicts-alist) |
| 1133 | (dolist (adict ispell-dictionary-alist) | 1134 | (dolist (adict ispell-dictionary-alist) |
| @@ -3680,7 +3681,7 @@ use the `x' command. (Any subsequent regions will be checked.) | |||
| 3680 | The `X' command aborts sending the message so that you can edit the buffer. | 3681 | The `X' command aborts sending the message so that you can edit the buffer. |
| 3681 | 3682 | ||
| 3682 | To spell-check whenever a message is sent, include the appropriate lines | 3683 | To spell-check whenever a message is sent, include the appropriate lines |
| 3683 | in your .emacs file: | 3684 | in your init file: |
| 3684 | (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 | 3685 | (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 |
| 3685 | (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 | 3686 | (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 |
| 3686 | (add-hook 'mail-send-hook 'ispell-message) | 3687 | (add-hook 'mail-send-hook 'ispell-message) |
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index d8afb3e5544..8584c496a97 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | ;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'. | 47 | ;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'. |
| 48 | ;; | 48 | ;; |
| 49 | ;; To turn on RefTeX Mode for all LaTeX files, add the following lines | 49 | ;; To turn on RefTeX Mode for all LaTeX files, add the following lines |
| 50 | ;; to your .emacs file: | 50 | ;; to your init file: |
| 51 | ;; | 51 | ;; |
| 52 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode | 52 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode |
| 53 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode | 53 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode |
| @@ -99,7 +99,7 @@ | |||
| 99 | ;; | 99 | ;; |
| 100 | ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x | 100 | ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x |
| 101 | ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the | 101 | ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the |
| 102 | ;; following lines to your `.emacs' file: | 102 | ;; following lines to your init file: |
| 103 | ;; | 103 | ;; |
| 104 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode | 104 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
| 105 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode | 105 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 767f8f360bb..47a821c0148 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -81,7 +81,7 @@ | |||
| 81 | 81 | ||
| 82 | ;;; INSTALLATION | 82 | ;;; INSTALLATION |
| 83 | 83 | ||
| 84 | ;; Add the following lines to your `.emacs' file: | 84 | ;; Add the following lines to your init file: |
| 85 | ;; | 85 | ;; |
| 86 | ;; (require 'rst) | 86 | ;; (require 'rst) |
| 87 | ;; | 87 | ;; |
| @@ -103,11 +103,51 @@ | |||
| 103 | 103 | ||
| 104 | ;;; Code: | 104 | ;;; Code: |
| 105 | 105 | ||
| 106 | ;; FIXME: Check through major mode conventions again. | ||
| 107 | |||
| 106 | ;; FIXME: Add proper ";;;###autoload" comments. | 108 | ;; FIXME: Add proper ";;;###autoload" comments. |
| 107 | 109 | ||
| 108 | ;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- | 110 | ;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- |
| 109 | ;; lexical-binding: t -*-" in the first line. | 111 | ;; lexical-binding: t -*-" in the first line. |
| 110 | 112 | ||
| 113 | ;; FIXME: Use `testcover'. | ||
| 114 | |||
| 115 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 116 | ;; Support for `testcover' | ||
| 117 | |||
| 118 | (when (boundp 'testcover-1value-functions) | ||
| 119 | ;; Below `lambda' is used in a loop with varying parameters and is thus not | ||
| 120 | ;; 1valued. | ||
| 121 | (setq testcover-1value-functions | ||
| 122 | (delq 'lambda testcover-1value-functions)) | ||
| 123 | (add-to-list 'testcover-compose-functions 'lambda)) | ||
| 124 | |||
| 125 | (defun rst-testcover-defcustom () | ||
| 126 | "Remove all customized variables from `testcover-module-constants'. | ||
| 127 | This seems to be a bug in `testcover': `defcustom' variables are | ||
| 128 | considered constants. Revert it with this function after each `defcustom'." | ||
| 129 | (when (boundp 'testcover-module-constants) | ||
| 130 | (setq testcover-module-constants | ||
| 131 | (delq nil | ||
| 132 | (mapcar | ||
| 133 | (lambda (sym) | ||
| 134 | (if (not (plist-member (symbol-plist sym) 'standard-value)) | ||
| 135 | sym)) | ||
| 136 | testcover-module-constants))))) | ||
| 137 | |||
| 138 | (defun rst-testcover-add-compose (fun) | ||
| 139 | "Add FUN to `testcover-compose-functions'." | ||
| 140 | (when (boundp 'testcover-compose-functions) | ||
| 141 | (add-to-list 'testcover-compose-functions fun))) | ||
| 142 | |||
| 143 | (defun rst-testcover-add-1value (fun) | ||
| 144 | "Add FUN to `testcover-1value-functions'." | ||
| 145 | (when (boundp 'testcover-1value-functions) | ||
| 146 | (add-to-list 'testcover-1value-functions fun))) | ||
| 147 | |||
| 148 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 149 | ;; Common Lisp stuff | ||
| 150 | |||
| 111 | ;; Only use of macros is allowed - may be replaced by `cl-lib' some time. | 151 | ;; Only use of macros is allowed - may be replaced by `cl-lib' some time. |
| 112 | (eval-when-compile | 152 | (eval-when-compile |
| 113 | (require 'cl)) | 153 | (require 'cl)) |
| @@ -160,6 +200,7 @@ Comparison done with `equal'." | |||
| 160 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 200 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 161 | ;; Versions | 201 | ;; Versions |
| 162 | 202 | ||
| 203 | ;; testcover: ok. | ||
| 163 | (defun rst-extract-version (delim-re head-re re tail-re var &optional default) | 204 | (defun rst-extract-version (delim-re head-re re tail-re var &optional default) |
| 164 | "Extract the version from a variable according to the given regexes. | 205 | "Extract the version from a variable according to the given regexes. |
| 165 | Return the version after regex DELIM-RE and HEAD-RE matching RE | 206 | Return the version after regex DELIM-RE and HEAD-RE matching RE |
| @@ -173,7 +214,7 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match." | |||
| 173 | ;; Use CVSHeader to really get information from CVS and not other version | 214 | ;; Use CVSHeader to really get information from CVS and not other version |
| 174 | ;; control systems. | 215 | ;; control systems. |
| 175 | (defconst rst-cvs-header | 216 | (defconst rst-cvs-header |
| 176 | "$CVSHeader: sm/rst_el/rst.el,v 1.301 2012-07-30 19:29:46 stefan Exp $") | 217 | "$CVSHeader: sm/rst_el/rst.el,v 1.309.2.1 2012-09-17 17:30:49 stefan Exp $") |
| 177 | (defconst rst-cvs-rev | 218 | (defconst rst-cvs-rev |
| 178 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" | 219 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" |
| 179 | " .*" rst-cvs-header "0.0") | 220 | " .*" rst-cvs-header "0.0") |
| @@ -483,6 +524,8 @@ argument list for `rst-re'.") | |||
| 483 | (defvar rst-re-alist) ; Forward declare to use it in `rst-re'. | 524 | (defvar rst-re-alist) ; Forward declare to use it in `rst-re'. |
| 484 | 525 | ||
| 485 | ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel. | 526 | ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel. |
| 527 | (rst-testcover-add-compose 'rst-re) | ||
| 528 | ;; testcover: ok. | ||
| 486 | (defun rst-re (&rest args) | 529 | (defun rst-re (&rest args) |
| 487 | "Interpret ARGS as regular expressions and return a regex string. | 530 | "Interpret ARGS as regular expressions and return a regex string. |
| 488 | Each element of ARGS may be one of the following: | 531 | Each element of ARGS may be one of the following: |
| @@ -556,6 +599,7 @@ After interpretation of ARGS the results are concatenated as for | |||
| 556 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 599 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 557 | ;; Mode definition | 600 | ;; Mode definition |
| 558 | 601 | ||
| 602 | ;; testcover: ok. | ||
| 559 | (defun rst-define-key (keymap key def &rest deprecated) | 603 | (defun rst-define-key (keymap key def &rest deprecated) |
| 560 | "Bind like `define-key' but add deprecated key definitions. | 604 | "Bind like `define-key' but add deprecated key definitions. |
| 561 | KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key | 605 | KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key |
| @@ -734,6 +778,7 @@ This inherits from Text mode.") | |||
| 734 | The hook for `text-mode' is run before this one." | 778 | The hook for `text-mode' is run before this one." |
| 735 | :group 'rst | 779 | :group 'rst |
| 736 | :type '(hook)) | 780 | :type '(hook)) |
| 781 | (rst-testcover-defcustom) | ||
| 737 | 782 | ||
| 738 | ;; Pull in variable definitions silencing byte-compiler. | 783 | ;; Pull in variable definitions silencing byte-compiler. |
| 739 | (require 'newcomment) | 784 | (require 'newcomment) |
| @@ -949,6 +994,7 @@ file." | |||
| 949 | (const :tag "Underline only" simple)) | 994 | (const :tag "Underline only" simple)) |
| 950 | (integer :tag "Indentation for overline and underline type" | 995 | (integer :tag "Indentation for overline and underline type" |
| 951 | :value 0)))) | 996 | :value 0)))) |
| 997 | (rst-testcover-defcustom) | ||
| 952 | 998 | ||
| 953 | (defcustom rst-default-indent 1 | 999 | (defcustom rst-default-indent 1 |
| 954 | "Number of characters to indent the section title. | 1000 | "Number of characters to indent the section title. |
| @@ -958,7 +1004,7 @@ from a simple adornment style to a over-and-under adornment | |||
| 958 | style." | 1004 | style." |
| 959 | :group 'rst-adjust | 1005 | :group 'rst-adjust |
| 960 | :type '(integer)) | 1006 | :type '(integer)) |
| 961 | 1007 | (rst-testcover-defcustom) | |
| 962 | 1008 | ||
| 963 | (defun rst-compare-adornments (ado1 ado2) | 1009 | (defun rst-compare-adornments (ado1 ado2) |
| 964 | "Compare adornments. | 1010 | "Compare adornments. |
| @@ -979,7 +1025,8 @@ not found." | |||
| 979 | (setq cur (cdr cur))) | 1025 | (setq cur (cdr cur))) |
| 980 | cur)) | 1026 | cur)) |
| 981 | 1027 | ||
| 982 | 1028 | ;; testcover: FIXME: Test with `rst-preferred-adornments' == nil. Add test | |
| 1029 | ;; `rst-adjust-no-preference'. | ||
| 983 | (defun rst-suggest-new-adornment (allados &optional prev) | 1030 | (defun rst-suggest-new-adornment (allados &optional prev) |
| 984 | "Suggest a new, different adornment from all that have been seen. | 1031 | "Suggest a new, different adornment from all that have been seen. |
| 985 | 1032 | ||
| @@ -1032,7 +1079,7 @@ requested adornment." | |||
| 1032 | len) | 1079 | len) |
| 1033 | 1080 | ||
| 1034 | ;; Fixup whitespace at the beginning and end of the line. | 1081 | ;; Fixup whitespace at the beginning and end of the line. |
| 1035 | (if (or (null indent) (eq style 'simple)) | 1082 | (if (or (null indent) (eq style 'simple)) ;; testcover: ok. |
| 1036 | (setq indent 0)) | 1083 | (setq indent 0)) |
| 1037 | (beginning-of-line) | 1084 | (beginning-of-line) |
| 1038 | (delete-horizontal-space) | 1085 | (delete-horizontal-space) |
| @@ -1046,7 +1093,8 @@ requested adornment." | |||
| 1046 | 1093 | ||
| 1047 | ;; Remove previous line if it is an adornment. | 1094 | ;; Remove previous line if it is an adornment. |
| 1048 | (save-excursion | 1095 | (save-excursion |
| 1049 | (forward-line -1) | 1096 | (forward-line -1) ;; testcover: FIXME: Doesn't work when in first line |
| 1097 | ;; of buffer. | ||
| 1050 | (if (and (looking-at (rst-re 'ado-beg-2-1)) | 1098 | (if (and (looking-at (rst-re 'ado-beg-2-1)) |
| 1051 | ;; Avoid removing the underline of a title right above us. | 1099 | ;; Avoid removing the underline of a title right above us. |
| 1052 | (save-excursion (forward-line -1) | 1100 | (save-excursion (forward-line -1) |
| @@ -1055,7 +1103,8 @@ requested adornment." | |||
| 1055 | 1103 | ||
| 1056 | ;; Remove following line if it is an adornment. | 1104 | ;; Remove following line if it is an adornment. |
| 1057 | (save-excursion | 1105 | (save-excursion |
| 1058 | (forward-line +1) | 1106 | (forward-line +1) ;; testcover: FIXME: Doesn't work when in last line |
| 1107 | ;; of buffer. | ||
| 1059 | (if (looking-at (rst-re 'ado-beg-2-1)) | 1108 | (if (looking-at (rst-re 'ado-beg-2-1)) |
| 1060 | (rst-delete-entire-line)) | 1109 | (rst-delete-entire-line)) |
| 1061 | ;; Add a newline if we're at the end of the buffer, for the subsequence | 1110 | ;; Add a newline if we're at the end of the buffer, for the subsequence |
| @@ -1071,13 +1120,14 @@ requested adornment." | |||
| 1071 | (insert (make-string len char)))) | 1120 | (insert (make-string len char)))) |
| 1072 | 1121 | ||
| 1073 | ;; Insert underline. | 1122 | ;; Insert underline. |
| 1074 | (forward-line +1) | 1123 | (1value ;; Line has been inserted above. |
| 1124 | (forward-line +1)) | ||
| 1075 | (open-line 1) | 1125 | (open-line 1) |
| 1076 | (insert (make-string len char)) | 1126 | (insert (make-string len char)) |
| 1077 | 1127 | ||
| 1078 | (forward-line +1) | 1128 | (1value ;; Line has been inserted above. |
| 1079 | (goto-char marker) | 1129 | (forward-line +1)) |
| 1080 | )) | 1130 | (goto-char marker))) |
| 1081 | 1131 | ||
| 1082 | (defun rst-classify-adornment (adornment end) | 1132 | (defun rst-classify-adornment (adornment end) |
| 1083 | "Classify adornment for section titles and transitions. | 1133 | "Classify adornment for section titles and transitions. |
| @@ -1104,11 +1154,14 @@ Return nil if no syntactically valid adornment is found." | |||
| 1104 | (ado-re (rst-re ado-ch 'adorep3-hlp)) | 1154 | (ado-re (rst-re ado-ch 'adorep3-hlp)) |
| 1105 | (end-pnt (point)) | 1155 | (end-pnt (point)) |
| 1106 | (beg-pnt (progn | 1156 | (beg-pnt (progn |
| 1107 | (forward-line 0) | 1157 | (1value ;; No lines may be left to move. |
| 1158 | (forward-line 0)) | ||
| 1108 | (point))) | 1159 | (point))) |
| 1109 | (nxt-emp ; Next line nonexistent or empty | 1160 | (nxt-emp ; Next line nonexistent or empty |
| 1110 | (save-excursion | 1161 | (save-excursion |
| 1111 | (or (not (zerop (forward-line 1))) | 1162 | (or (not (zerop (forward-line 1))) |
| 1163 | ;; testcover: FIXME: Add test classifying at the end of | ||
| 1164 | ;; buffer. | ||
| 1112 | (looking-at (rst-re 'lin-end))))) | 1165 | (looking-at (rst-re 'lin-end))))) |
| 1113 | (prv-emp ; Previous line nonexistent or empty | 1166 | (prv-emp ; Previous line nonexistent or empty |
| 1114 | (save-excursion | 1167 | (save-excursion |
| @@ -1117,7 +1170,9 @@ Return nil if no syntactically valid adornment is found." | |||
| 1117 | (ttl-blw ; Title found below starting here. | 1170 | (ttl-blw ; Title found below starting here. |
| 1118 | (save-excursion | 1171 | (save-excursion |
| 1119 | (and | 1172 | (and |
| 1120 | (zerop (forward-line 1)) | 1173 | (zerop (forward-line 1)) ;; testcover: FIXME: Add test |
| 1174 | ;; classifying at the end of | ||
| 1175 | ;; buffer. | ||
| 1121 | (looking-at (rst-re 'ttl-beg)) | 1176 | (looking-at (rst-re 'ttl-beg)) |
| 1122 | (point)))) | 1177 | (point)))) |
| 1123 | (ttl-abv ; Title found above starting here. | 1178 | (ttl-abv ; Title found above starting here. |
| @@ -1129,7 +1184,9 @@ Return nil if no syntactically valid adornment is found." | |||
| 1129 | (und-fnd ; Matching underline found starting here. | 1184 | (und-fnd ; Matching underline found starting here. |
| 1130 | (save-excursion | 1185 | (save-excursion |
| 1131 | (and ttl-blw | 1186 | (and ttl-blw |
| 1132 | (zerop (forward-line 2)) | 1187 | (zerop (forward-line 2)) ;; testcover: FIXME: Add test |
| 1188 | ;; classifying at the end of | ||
| 1189 | ;; buffer. | ||
| 1133 | (looking-at (rst-re ado-re 'lin-end)) | 1190 | (looking-at (rst-re ado-re 'lin-end)) |
| 1134 | (point)))) | 1191 | (point)))) |
| 1135 | (ovr-fnd ; Matching overline found starting here. | 1192 | (ovr-fnd ; Matching overline found starting here. |
| @@ -1174,8 +1231,8 @@ Return nil if no syntactically valid adornment is found." | |||
| 1174 | (setq key nil))) | 1231 | (setq key nil))) |
| 1175 | (if key | 1232 | (if key |
| 1176 | (list key | 1233 | (list key |
| 1177 | (or beg-ovr beg-txt beg-und) | 1234 | (or beg-ovr beg-txt) |
| 1178 | (or end-und end-txt end-ovr) | 1235 | (or end-und end-txt) |
| 1179 | beg-ovr end-ovr beg-txt end-txt beg-und end-und))))))) | 1236 | beg-ovr end-ovr beg-txt end-txt beg-und end-und))))))) |
| 1180 | 1237 | ||
| 1181 | (defun rst-find-title-line () | 1238 | (defun rst-find-title-line () |
| @@ -1193,7 +1250,8 @@ in the first element. If there is no adornment around the title | |||
| 1193 | CHARACTER is also nil and match groups for overline and underline | 1250 | CHARACTER is also nil and match groups for overline and underline |
| 1194 | are nil." | 1251 | are nil." |
| 1195 | (save-excursion | 1252 | (save-excursion |
| 1196 | (forward-line 0) | 1253 | (1value ;; No lines may be left to move. |
| 1254 | (forward-line 0)) | ||
| 1197 | (let ((orig-pnt (point)) | 1255 | (let ((orig-pnt (point)) |
| 1198 | (orig-end (line-end-position))) | 1256 | (orig-end (line-end-position))) |
| 1199 | (cond | 1257 | (cond |
| @@ -1253,6 +1311,7 @@ t when no section adornments were found. Value depends on | |||
| 1253 | `rst-all-sections'.") | 1311 | `rst-all-sections'.") |
| 1254 | (make-variable-buffer-local 'rst-section-hierarchy) | 1312 | (make-variable-buffer-local 'rst-section-hierarchy) |
| 1255 | 1313 | ||
| 1314 | (rst-testcover-add-1value 'rst-reset-section-caches) | ||
| 1256 | (defun rst-reset-section-caches () | 1315 | (defun rst-reset-section-caches () |
| 1257 | "Reset all section cache variables. | 1316 | "Reset all section cache variables. |
| 1258 | Should be called by interactive functions which deal with sections." | 1317 | Should be called by interactive functions which deal with sections." |
| @@ -1354,9 +1413,7 @@ Return a list of the previous and next adornments." | |||
| 1354 | (if (and cur (caar cur)) | 1413 | (if (and cur (caar cur)) |
| 1355 | (setq next (if (= curline (caar cur)) (cdr cur) cur))) | 1414 | (setq next (if (= curline (caar cur)) (cdr cur) cur))) |
| 1356 | 1415 | ||
| 1357 | (mapcar 'cdar (list prev next)) | 1416 | (mapcar 'cdar (list prev next)))) |
| 1358 | )) | ||
| 1359 | |||
| 1360 | 1417 | ||
| 1361 | (defun rst-adornment-complete-p (ado) | 1418 | (defun rst-adornment-complete-p (ado) |
| 1362 | "Return true if the adornment ADO around point is complete." | 1419 | "Return true if the adornment ADO around point is complete." |
| @@ -1369,8 +1426,7 @@ Return a list of the previous and next adornments." | |||
| 1369 | (let* ((char (car ado)) | 1426 | (let* ((char (car ado)) |
| 1370 | (style (cadr ado)) | 1427 | (style (cadr ado)) |
| 1371 | (indent (caddr ado)) | 1428 | (indent (caddr ado)) |
| 1372 | (endcol (save-excursion (end-of-line) (current-column))) | 1429 | (endcol (save-excursion (end-of-line) (current-column)))) |
| 1373 | ) | ||
| 1374 | (if char | 1430 | (if char |
| 1375 | (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$"))) | 1431 | (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$"))) |
| 1376 | (and | 1432 | (and |
| @@ -1380,9 +1436,7 @@ Return a list of the previous and next adornments." | |||
| 1380 | (or (not (eq style 'over-and-under)) | 1436 | (or (not (eq style 'over-and-under)) |
| 1381 | (save-excursion (forward-line -1) | 1437 | (save-excursion (forward-line -1) |
| 1382 | (beginning-of-line) | 1438 | (beginning-of-line) |
| 1383 | (looking-at exps)))) | 1439 | (looking-at exps)))))))) |
| 1384 | )) | ||
| 1385 | )) | ||
| 1386 | 1440 | ||
| 1387 | 1441 | ||
| 1388 | (defun rst-get-next-adornment | 1442 | (defun rst-get-next-adornment |
| @@ -1414,8 +1468,7 @@ REVERSE-DIRECTION is used to reverse the cycling order." | |||
| 1414 | cur)) | 1468 | cur)) |
| 1415 | 1469 | ||
| 1416 | ;; If not found, take the first of all adornments. | 1470 | ;; If not found, take the first of all adornments. |
| 1417 | suggestion | 1471 | suggestion))) |
| 1418 | ))) | ||
| 1419 | 1472 | ||
| 1420 | 1473 | ||
| 1421 | ;; FIXME: A line "``/`` full" is not accepted as a section title. | 1474 | ;; FIXME: A line "``/`` full" is not accepted as a section title. |
| @@ -1456,7 +1509,7 @@ b. a negative numerical argument, which generally inverts the | |||
| 1456 | (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0))) | 1509 | (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0))) |
| 1457 | (toggle-style (and pfxarg (not reverse-direction)))) | 1510 | (toggle-style (and pfxarg (not reverse-direction)))) |
| 1458 | 1511 | ||
| 1459 | (if (rst-portable-mark-active-p) | 1512 | (if (use-region-p) |
| 1460 | ;; Adjust adornments within region. | 1513 | ;; Adjust adornments within region. |
| 1461 | (rst-promote-region (and pfxarg t)) | 1514 | (rst-promote-region (and pfxarg t)) |
| 1462 | ;; Adjust adornment around point. | 1515 | ;; Adjust adornment around point. |
| @@ -1466,15 +1519,14 @@ b. a negative numerical argument, which generally inverts the | |||
| 1466 | (run-hooks 'rst-adjust-hook) | 1519 | (run-hooks 'rst-adjust-hook) |
| 1467 | 1520 | ||
| 1468 | ;; Make sure to reset the cursor position properly after we're done. | 1521 | ;; Make sure to reset the cursor position properly after we're done. |
| 1469 | (goto-char origpt) | 1522 | (goto-char origpt))) |
| 1470 | |||
| 1471 | )) | ||
| 1472 | 1523 | ||
| 1473 | (defcustom rst-adjust-hook nil | 1524 | (defcustom rst-adjust-hook nil |
| 1474 | "Hooks to be run after running `rst-adjust'." | 1525 | "Hooks to be run after running `rst-adjust'." |
| 1475 | :group 'rst-adjust | 1526 | :group 'rst-adjust |
| 1476 | :type '(hook) | 1527 | :type '(hook) |
| 1477 | :package-version '(rst . "1.1.0")) | 1528 | :package-version '(rst . "1.1.0")) |
| 1529 | (rst-testcover-defcustom) | ||
| 1478 | 1530 | ||
| 1479 | (defcustom rst-new-adornment-down nil | 1531 | (defcustom rst-new-adornment-down nil |
| 1480 | "Controls level of new adornment for section headers." | 1532 | "Controls level of new adornment for section headers." |
| @@ -1483,6 +1535,7 @@ b. a negative numerical argument, which generally inverts the | |||
| 1483 | (const :tag "Same level as previous one" nil) | 1535 | (const :tag "Same level as previous one" nil) |
| 1484 | (const :tag "One level down relative to the previous one" t)) | 1536 | (const :tag "One level down relative to the previous one" t)) |
| 1485 | :package-version '(rst . "1.1.0")) | 1537 | :package-version '(rst . "1.1.0")) |
| 1538 | (rst-testcover-defcustom) | ||
| 1486 | 1539 | ||
| 1487 | (defun rst-adjust-adornment (pfxarg) | 1540 | (defun rst-adjust-adornment (pfxarg) |
| 1488 | "Call `rst-adjust-adornment-work' interactively. | 1541 | "Call `rst-adjust-adornment-work' interactively. |
| @@ -1741,8 +1794,7 @@ hierarchy is similar to that used by `rst-adjust-adornment-work'." | |||
| 1741 | (region-begin-line (line-number-at-pos (region-beginning))) | 1794 | (region-begin-line (line-number-at-pos (region-beginning))) |
| 1742 | (region-end-line (line-number-at-pos (region-end))) | 1795 | (region-end-line (line-number-at-pos (region-end))) |
| 1743 | 1796 | ||
| 1744 | marker-list | 1797 | marker-list) |
| 1745 | ) | ||
| 1746 | 1798 | ||
| 1747 | ;; Skip the markers that come before the region beginning. | 1799 | ;; Skip the markers that come before the region beginning. |
| 1748 | (while (and cur (< (caar cur) region-begin-line)) | 1800 | (while (and cur (< (caar cur) region-begin-line)) |
| @@ -1771,8 +1823,7 @@ hierarchy is similar to that used by `rst-adjust-adornment-work'." | |||
| 1771 | 1823 | ||
| 1772 | ;; Clear marker to avoid slowing down the editing after we're done. | 1824 | ;; Clear marker to avoid slowing down the editing after we're done. |
| 1773 | (set-marker (car p) nil)) | 1825 | (set-marker (car p) nil)) |
| 1774 | (setq deactivate-mark nil) | 1826 | (setq deactivate-mark nil)))) |
| 1775 | ))) | ||
| 1776 | 1827 | ||
| 1777 | 1828 | ||
| 1778 | 1829 | ||
| @@ -1792,9 +1843,7 @@ in ADORNMENTS." | |||
| 1792 | (apply 'rst-update-section x) | 1843 | (apply 'rst-update-section x) |
| 1793 | (goto-char (point-max)) | 1844 | (goto-char (point-max)) |
| 1794 | (insert "\n") | 1845 | (insert "\n") |
| 1795 | (incf level) | 1846 | (incf level)))))) |
| 1796 | )) | ||
| 1797 | ))) | ||
| 1798 | 1847 | ||
| 1799 | (defun rst-straighten-adornments () | 1848 | (defun rst-straighten-adornments () |
| 1800 | "Redo all the adornments in the current buffer. | 1849 | "Redo all the adornments in the current buffer. |
| @@ -1822,10 +1871,7 @@ in order to adapt it to our preferred style." | |||
| 1822 | (apply 'rst-update-section (nth (car lm) rst-preferred-adornments)) | 1871 | (apply 'rst-update-section (nth (car lm) rst-preferred-adornments)) |
| 1823 | 1872 | ||
| 1824 | ;; Reset the marker to avoid slowing down editing until it gets GC'ed. | 1873 | ;; Reset the marker to avoid slowing down editing until it gets GC'ed. |
| 1825 | (set-marker (cdr lm) nil) | 1874 | (set-marker (cdr lm) nil))))) |
| 1826 | ) | ||
| 1827 | ))) | ||
| 1828 | |||
| 1829 | 1875 | ||
| 1830 | 1876 | ||
| 1831 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1877 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -1906,7 +1952,7 @@ and the column of the point." | |||
| 1906 | (looking-at pfx-re)))))) ; ...pfx at same level. | 1952 | (looking-at pfx-re)))))) ; ...pfx at same level. |
| 1907 | (push (cons (point) (current-column)) | 1953 | (push (cons (point) (current-column)) |
| 1908 | pfx)) | 1954 | pfx)) |
| 1909 | (forward-line 1)) ) | 1955 | (forward-line 1))) |
| 1910 | (nreverse pfx))) | 1956 | (nreverse pfx))) |
| 1911 | 1957 | ||
| 1912 | (defun rst-insert-list-pos (newitem) | 1958 | (defun rst-insert-list-pos (newitem) |
| @@ -2005,6 +2051,7 @@ starting item, for example 'e' for 'A)' style. The position is also arranged by | |||
| 2005 | :tag (char-to-string char) char)) | 2051 | :tag (char-to-string char) char)) |
| 2006 | rst-bullets))) | 2052 | rst-bullets))) |
| 2007 | :package-version '(rst . "1.1.0")) | 2053 | :package-version '(rst . "1.1.0")) |
| 2054 | (rst-testcover-defcustom) | ||
| 2008 | 2055 | ||
| 2009 | (defun rst-insert-list-continue (curitem prefer-roman) | 2056 | (defun rst-insert-list-continue (curitem prefer-roman) |
| 2010 | "Insert a list item with list start CURITEM including its indentation level. | 2057 | "Insert a list item with list start CURITEM including its indentation level. |
| @@ -2206,8 +2253,7 @@ list destructively." | |||
| 2206 | (setq node (cons nil (cdaar children)))) | 2253 | (setq node (cons nil (cdaar children)))) |
| 2207 | 2254 | ||
| 2208 | ;; Return this node with its children. | 2255 | ;; Return this node with its children. |
| 2209 | (cons node children) | 2256 | (cons node children))) |
| 2210 | )) | ||
| 2211 | 2257 | ||
| 2212 | 2258 | ||
| 2213 | (defun rst-section-tree-point (node &optional point) | 2259 | (defun rst-section-tree-point (node &optional point) |
| @@ -2241,11 +2287,8 @@ container subtree node that we're returning." | |||
| 2241 | (let ((sub (rst-section-tree-point (car last) curpoint))) | 2287 | (let ((sub (rst-section-tree-point (car last) curpoint))) |
| 2242 | (setq path (car sub) | 2288 | (setq path (car sub) |
| 2243 | outtree (cdr sub))) | 2289 | outtree (cdr sub))) |
| 2244 | (setq outtree node)) | 2290 | (setq outtree node))))) |
| 2245 | 2291 | (cons (cons (car node) path) outtree))) | |
| 2246 | ))) | ||
| 2247 | (cons (cons (car node) path) outtree) | ||
| 2248 | )) | ||
| 2249 | 2292 | ||
| 2250 | 2293 | ||
| 2251 | (defgroup rst-toc nil | 2294 | (defgroup rst-toc nil |
| @@ -2257,6 +2300,7 @@ container subtree node that we're returning." | |||
| 2257 | "Indentation for table-of-contents display. | 2300 | "Indentation for table-of-contents display. |
| 2258 | Also used for formatting insertion, when numbering is disabled." | 2301 | Also used for formatting insertion, when numbering is disabled." |
| 2259 | :group 'rst-toc) | 2302 | :group 'rst-toc) |
| 2303 | (rst-testcover-defcustom) | ||
| 2260 | 2304 | ||
| 2261 | (defcustom rst-toc-insert-style 'fixed | 2305 | (defcustom rst-toc-insert-style 'fixed |
| 2262 | "Insertion style for table-of-contents. | 2306 | "Insertion style for table-of-contents. |
| @@ -2267,10 +2311,12 @@ indentation style: | |||
| 2267 | - aligned: numbering, titles aligned under each other | 2311 | - aligned: numbering, titles aligned under each other |
| 2268 | - listed: numbering, with dashes like list items (EXPERIMENTAL)" | 2312 | - listed: numbering, with dashes like list items (EXPERIMENTAL)" |
| 2269 | :group 'rst-toc) | 2313 | :group 'rst-toc) |
| 2314 | (rst-testcover-defcustom) | ||
| 2270 | 2315 | ||
| 2271 | (defcustom rst-toc-insert-number-separator " " | 2316 | (defcustom rst-toc-insert-number-separator " " |
| 2272 | "Separator that goes between the TOC number and the title." | 2317 | "Separator that goes between the TOC number and the title." |
| 2273 | :group 'rst-toc) | 2318 | :group 'rst-toc) |
| 2319 | (rst-testcover-defcustom) | ||
| 2274 | 2320 | ||
| 2275 | ;; This is used to avoid having to change the user's mode. | 2321 | ;; This is used to avoid having to change the user's mode. |
| 2276 | (defvar rst-toc-insert-click-keymap | 2322 | (defvar rst-toc-insert-click-keymap |
| @@ -2282,7 +2328,7 @@ indentation style: | |||
| 2282 | (defcustom rst-toc-insert-max-level nil | 2328 | (defcustom rst-toc-insert-max-level nil |
| 2283 | "If non-nil, maximum depth of the inserted TOC." | 2329 | "If non-nil, maximum depth of the inserted TOC." |
| 2284 | :group 'rst-toc) | 2330 | :group 'rst-toc) |
| 2285 | 2331 | (rst-testcover-defcustom) | |
| 2286 | 2332 | ||
| 2287 | (defun rst-toc-insert (&optional pfxarg) | 2333 | (defun rst-toc-insert (&optional pfxarg) |
| 2288 | "Insert a simple text rendering of the table of contents. | 2334 | "Insert a simple text rendering of the table of contents. |
| @@ -2316,8 +2362,7 @@ The TOC is inserted indented at the current column." | |||
| 2316 | (delete-region init-point (+ init-point (length initial-indent))) | 2362 | (delete-region init-point (+ init-point (length initial-indent))) |
| 2317 | 2363 | ||
| 2318 | ;; Delete the last newline added. | 2364 | ;; Delete the last newline added. |
| 2319 | (delete-char -1) | 2365 | (delete-char -1)))) |
| 2320 | ))) | ||
| 2321 | 2366 | ||
| 2322 | (defun rst-toc-insert-node (node level indent pfx) | 2367 | (defun rst-toc-insert-node (node level indent pfx) |
| 2323 | "Insert tree node NODE in table-of-contents. | 2368 | "Insert tree node NODE in table-of-contents. |
| @@ -2343,9 +2388,7 @@ level to align." | |||
| 2343 | ;; is generated automatically. | 2388 | ;; is generated automatically. |
| 2344 | (put-text-property b (point) 'mouse-face 'highlight) | 2389 | (put-text-property b (point) 'mouse-face 'highlight) |
| 2345 | (put-text-property b (point) 'rst-toc-target (cadar node)) | 2390 | (put-text-property b (point) 'rst-toc-target (cadar node)) |
| 2346 | (put-text-property b (point) 'keymap rst-toc-insert-click-keymap) | 2391 | (put-text-property b (point) 'keymap rst-toc-insert-click-keymap)) |
| 2347 | |||
| 2348 | ) | ||
| 2349 | (insert "\n") | 2392 | (insert "\n") |
| 2350 | 2393 | ||
| 2351 | ;; Prepare indent for children. | 2394 | ;; Prepare indent for children. |
| @@ -2362,9 +2405,7 @@ level to align." | |||
| 2362 | 2405 | ||
| 2363 | ((eq rst-toc-insert-style 'listed) | 2406 | ((eq rst-toc-insert-style 'listed) |
| 2364 | (concat (substring indent 0 -3) | 2407 | (concat (substring indent 0 -3) |
| 2365 | (concat (make-string (+ (length pfx) 2) ? ) " - "))) | 2408 | (concat (make-string (+ (length pfx) 2) ? ) " - ")))))) |
| 2366 | )) | ||
| 2367 | ) | ||
| 2368 | 2409 | ||
| 2369 | (if (or (eq rst-toc-insert-max-level nil) | 2410 | (if (or (eq rst-toc-insert-max-level nil) |
| 2370 | (< level rst-toc-insert-max-level)) | 2411 | (< level rst-toc-insert-max-level)) |
| @@ -2382,8 +2423,7 @@ level to align." | |||
| 2382 | (if (cdr node) | 2423 | (if (cdr node) |
| 2383 | (setq fmt (format "%%-%dd" | 2424 | (setq fmt (format "%%-%dd" |
| 2384 | (1+ (floor (log10 (length | 2425 | (1+ (floor (log10 (length |
| 2385 | (cdr node)))))))) | 2426 | (cdr node)))))))))) |
| 2386 | )) | ||
| 2387 | 2427 | ||
| 2388 | (dolist (child (cdr node)) | 2428 | (dolist (child (cdr node)) |
| 2389 | (rst-toc-insert-node child | 2429 | (rst-toc-insert-node child |
| @@ -2391,9 +2431,7 @@ level to align." | |||
| 2391 | indent | 2431 | indent |
| 2392 | (if do-child-numbering | 2432 | (if do-child-numbering |
| 2393 | (concat pfx (format fmt count)) pfx)) | 2433 | (concat pfx (format fmt count)) pfx)) |
| 2394 | (incf count))) | 2434 | (incf count)))))) |
| 2395 | |||
| 2396 | ))) | ||
| 2397 | 2435 | ||
| 2398 | 2436 | ||
| 2399 | (defun rst-toc-update () | 2437 | (defun rst-toc-update () |
| @@ -2468,8 +2506,7 @@ file-write hook to always make it up-to-date automatically." | |||
| 2468 | ;; Add link on lines. | 2506 | ;; Add link on lines. |
| 2469 | (put-text-property b (point) 'rst-toc-target (cadar node)) | 2507 | (put-text-property b (point) 'rst-toc-target (cadar node)) |
| 2470 | 2508 | ||
| 2471 | (insert "\n") | 2509 | (insert "\n"))) |
| 2472 | )) | ||
| 2473 | 2510 | ||
| 2474 | (dolist (child (cdr node)) | 2511 | (dolist (child (cdr node)) |
| 2475 | (rst-toc-node child (1+ level)))) | 2512 | (rst-toc-node child (1+ level)))) |
| @@ -2517,8 +2554,7 @@ brings the cursor in that section." | |||
| 2517 | line | 2554 | line |
| 2518 | 2555 | ||
| 2519 | ;; Create a temporary buffer. | 2556 | ;; Create a temporary buffer. |
| 2520 | (buf (get-buffer-create rst-toc-buffer-name)) | 2557 | (buf (get-buffer-create rst-toc-buffer-name))) |
| 2521 | ) | ||
| 2522 | 2558 | ||
| 2523 | (with-current-buffer buf | 2559 | (with-current-buffer buf |
| 2524 | (let ((inhibit-read-only t)) | 2560 | (let ((inhibit-read-only t)) |
| @@ -2531,8 +2567,7 @@ brings the cursor in that section." | |||
| 2531 | 2567 | ||
| 2532 | ;; Count the lines to our found node. | 2568 | ;; Count the lines to our found node. |
| 2533 | (let ((linefound (rst-toc-count-lines sectree our-node))) | 2569 | (let ((linefound (rst-toc-count-lines sectree our-node))) |
| 2534 | (setq line (if (cdr linefound) (car linefound) 0))) | 2570 | (setq line (if (cdr linefound) (car linefound) 0))))) |
| 2535 | )) | ||
| 2536 | (display-buffer buf) | 2571 | (display-buffer buf) |
| 2537 | (pop-to-buffer buf) | 2572 | (pop-to-buffer buf) |
| 2538 | 2573 | ||
| @@ -2541,8 +2576,7 @@ brings the cursor in that section." | |||
| 2541 | 2576 | ||
| 2542 | ;; Move the cursor near the right section in the TOC. | 2577 | ;; Move the cursor near the right section in the TOC. |
| 2543 | (goto-char (point-min)) | 2578 | (goto-char (point-min)) |
| 2544 | (forward-line (1- line)) | 2579 | (forward-line (1- line)))) |
| 2545 | )) | ||
| 2546 | 2580 | ||
| 2547 | 2581 | ||
| 2548 | (defun rst-toc-mode-find-section () | 2582 | (defun rst-toc-mode-find-section () |
| @@ -2644,8 +2678,7 @@ backwards in the file (default is to use 1)." | |||
| 2644 | (curline (line-number-at-pos)) | 2678 | (curline (line-number-at-pos)) |
| 2645 | 2679 | ||
| 2646 | (cur allados) | 2680 | (cur allados) |
| 2647 | (idx 0) | 2681 | (idx 0)) |
| 2648 | ) | ||
| 2649 | 2682 | ||
| 2650 | ;; Find the index of the "next" adornment w.r.t. to the current line. | 2683 | ;; Find the index of the "next" adornment w.r.t. to the current line. |
| 2651 | (while (and cur (< (caar cur) curline)) | 2684 | (while (and cur (< (caar cur) curline)) |
| @@ -2666,8 +2699,7 @@ backwards in the file (default is to use 1)." | |||
| 2666 | (progn | 2699 | (progn |
| 2667 | (goto-char (point-min)) | 2700 | (goto-char (point-min)) |
| 2668 | (forward-line (1- (car cur)))) | 2701 | (forward-line (1- (car cur)))) |
| 2669 | (if (> offset 0) (goto-char (point-max)) (goto-char (point-min)))) | 2702 | (if (> offset 0) (goto-char (point-max)) (goto-char (point-min)))))) |
| 2670 | )) | ||
| 2671 | 2703 | ||
| 2672 | (defun rst-backward-section () | 2704 | (defun rst-backward-section () |
| 2673 | "Like `rst-forward-section', except move back one title." | 2705 | "Like `rst-forward-section', except move back one title." |
| @@ -2686,7 +2718,7 @@ for negative COUNT." | |||
| 2686 | (error "Cannot mark zero sections")) | 2718 | (error "Cannot mark zero sections")) |
| 2687 | (cond ((and allow-extend | 2719 | (cond ((and allow-extend |
| 2688 | (or (and (eq last-command this-command) (mark t)) | 2720 | (or (and (eq last-command this-command) (mark t)) |
| 2689 | (rst-portable-mark-active-p))) | 2721 | (use-region-p))) |
| 2690 | (set-mark | 2722 | (set-mark |
| 2691 | (save-excursion | 2723 | (save-excursion |
| 2692 | (goto-char (mark)) | 2724 | (goto-char (mark)) |
| @@ -2742,17 +2774,14 @@ of each paragraph only." | |||
| 2742 | (valid (and (= curcol leftcol) | 2774 | (valid (and (= curcol leftcol) |
| 2743 | (not (looking-at (rst-re 'lin-end)))) | 2775 | (not (looking-at (rst-re 'lin-end)))) |
| 2744 | (and (= curcol leftcol) | 2776 | (and (= curcol leftcol) |
| 2745 | (not (looking-at (rst-re 'lin-end))))) | 2777 | (not (looking-at (rst-re 'lin-end)))))) |
| 2746 | ) | ||
| 2747 | ((>= (point) endm)) | 2778 | ((>= (point) endm)) |
| 2748 | 2779 | ||
| 2749 | (if (if ,first-only | 2780 | (if (if ,first-only |
| 2750 | (and valid (not previous)) | 2781 | (and valid (not previous)) |
| 2751 | valid) | 2782 | valid) |
| 2752 | ,body-consequent | 2783 | ,body-consequent |
| 2753 | ,body-alternative) | 2784 | ,body-alternative))))) |
| 2754 | |||
| 2755 | )))) | ||
| 2756 | 2785 | ||
| 2757 | ;; FIXME: This needs to be refactored. Probably this is simply a function | 2786 | ;; FIXME: This needs to be refactored. Probably this is simply a function |
| 2758 | ;; applying BODY rather than a macro. | 2787 | ;; applying BODY rather than a macro. |
| @@ -2785,13 +2814,10 @@ first of a paragraph." | |||
| 2785 | (,isleftmost (and (not ,isempty) | 2814 | (,isleftmost (and (not ,isempty) |
| 2786 | (= (current-column) ,leftmost)) | 2815 | (= (current-column) ,leftmost)) |
| 2787 | (and (not ,isempty) | 2816 | (and (not ,isempty) |
| 2788 | (= (current-column) ,leftmost))) | 2817 | (= (current-column) ,leftmost)))) |
| 2789 | ) | ||
| 2790 | ((>= (point) endm)) | 2818 | ((>= (point) endm)) |
| 2791 | 2819 | ||
| 2792 | (progn ,@body) | 2820 | (progn ,@body)))))) |
| 2793 | |||
| 2794 | ))))) | ||
| 2795 | 2821 | ||
| 2796 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2822 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2797 | ;; Indentation | 2823 | ;; Indentation |
| @@ -2817,26 +2843,31 @@ here." | |||
| 2817 | "Indentation when there is no more indentation point given." | 2843 | "Indentation when there is no more indentation point given." |
| 2818 | :group 'rst-indent | 2844 | :group 'rst-indent |
| 2819 | :type '(integer)) | 2845 | :type '(integer)) |
| 2846 | (rst-testcover-defcustom) | ||
| 2820 | 2847 | ||
| 2821 | (defcustom rst-indent-field 3 | 2848 | (defcustom rst-indent-field 3 |
| 2822 | "Indentation for first line after a field or 0 to always indent for content." | 2849 | "Indentation for first line after a field or 0 to always indent for content." |
| 2823 | :group 'rst-indent | 2850 | :group 'rst-indent |
| 2824 | :type '(integer)) | 2851 | :type '(integer)) |
| 2852 | (rst-testcover-defcustom) | ||
| 2825 | 2853 | ||
| 2826 | (defcustom rst-indent-literal-normal 3 | 2854 | (defcustom rst-indent-literal-normal 3 |
| 2827 | "Default indentation for literal block after a markup on an own line." | 2855 | "Default indentation for literal block after a markup on an own line." |
| 2828 | :group 'rst-indent | 2856 | :group 'rst-indent |
| 2829 | :type '(integer)) | 2857 | :type '(integer)) |
| 2858 | (rst-testcover-defcustom) | ||
| 2830 | 2859 | ||
| 2831 | (defcustom rst-indent-literal-minimized 2 | 2860 | (defcustom rst-indent-literal-minimized 2 |
| 2832 | "Default indentation for literal block after a minimized markup." | 2861 | "Default indentation for literal block after a minimized markup." |
| 2833 | :group 'rst-indent | 2862 | :group 'rst-indent |
| 2834 | :type '(integer)) | 2863 | :type '(integer)) |
| 2864 | (rst-testcover-defcustom) | ||
| 2835 | 2865 | ||
| 2836 | (defcustom rst-indent-comment 3 | 2866 | (defcustom rst-indent-comment 3 |
| 2837 | "Default indentation for first line of a comment." | 2867 | "Default indentation for first line of a comment." |
| 2838 | :group 'rst-indent | 2868 | :group 'rst-indent |
| 2839 | :type '(integer)) | 2869 | :type '(integer)) |
| 2870 | (rst-testcover-defcustom) | ||
| 2840 | 2871 | ||
| 2841 | ;; FIXME: Must consider other tabs: | 2872 | ;; FIXME: Must consider other tabs: |
| 2842 | ;; * Line blocks | 2873 | ;; * Line blocks |
| @@ -3116,8 +3147,7 @@ do all lines instead of just paragraphs." | |||
| 3116 | (let ((ins-string (format "%d. " (incf count)))) | 3147 | (let ((ins-string (format "%d. " (incf count)))) |
| 3117 | (setq last-insert-len (length ins-string)) | 3148 | (setq last-insert-len (length ins-string)) |
| 3118 | (insert ins-string)) | 3149 | (insert ins-string)) |
| 3119 | (insert (make-string last-insert-len ?\ )) | 3150 | (insert (make-string last-insert-len ?\ ))))) |
| 3120 | ))) | ||
| 3121 | 3151 | ||
| 3122 | (defun rst-bullet-list-region (beg end all) | 3152 | (defun rst-bullet-list-region (beg end all) |
| 3123 | "Add bullets to all the leftmost paragraphs in the given region. | 3153 | "Add bullets to all the leftmost paragraphs in the given region. |
| @@ -3127,8 +3157,7 @@ do all lines instead of just paragraphs." | |||
| 3127 | (rst-iterate-leftmost-paragraphs | 3157 | (rst-iterate-leftmost-paragraphs |
| 3128 | beg end (not all) | 3158 | beg end (not all) |
| 3129 | (insert (car rst-preferred-bullets) " ") | 3159 | (insert (car rst-preferred-bullets) " ") |
| 3130 | (insert " ") | 3160 | (insert " "))) |
| 3131 | )) | ||
| 3132 | 3161 | ||
| 3133 | ;; FIXME: Does not deal with a varying number of digits appropriately. | 3162 | ;; FIXME: Does not deal with a varying number of digits appropriately. |
| 3134 | ;; FIXME: Does not deal with multiple levels independently. | 3163 | ;; FIXME: Does not deal with multiple levels independently. |
| @@ -3143,18 +3172,13 @@ Renumber as necessary. Region is from BEG to END." | |||
| 3143 | (cons (copy-marker (car x)) | 3172 | (cons (copy-marker (car x)) |
| 3144 | (cdr x))) | 3173 | (cdr x))) |
| 3145 | (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1)))) | 3174 | (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1)))) |
| 3146 | (count 1) | 3175 | (count 1)) |
| 3147 | ) | ||
| 3148 | (save-excursion | 3176 | (save-excursion |
| 3149 | (dolist (x items) | 3177 | (dolist (x items) |
| 3150 | (goto-char (car x)) | 3178 | (goto-char (car x)) |
| 3151 | (looking-at (rst-re 'itmany-beg-1)) | 3179 | (looking-at (rst-re 'itmany-beg-1)) |
| 3152 | (replace-match (format "%d." count) nil nil nil 1) | 3180 | (replace-match (format "%d." count) nil nil nil 1) |
| 3153 | (incf count) | 3181 | (incf count))))) |
| 3154 | )) | ||
| 3155 | )) | ||
| 3156 | |||
| 3157 | |||
| 3158 | 3182 | ||
| 3159 | ;;------------------------------------------------------------------------------ | 3183 | ;;------------------------------------------------------------------------------ |
| 3160 | 3184 | ||
| @@ -3202,6 +3226,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3202 | :version "24.1" | 3226 | :version "24.1" |
| 3203 | :group 'rst-faces | 3227 | :group 'rst-faces |
| 3204 | :type '(face)) | 3228 | :type '(face)) |
| 3229 | (rst-testcover-defcustom) | ||
| 3205 | (make-obsolete-variable 'rst-block-face | 3230 | (make-obsolete-variable 'rst-block-face |
| 3206 | "customize the face `rst-block' instead." | 3231 | "customize the face `rst-block' instead." |
| 3207 | "24.1") | 3232 | "24.1") |
| @@ -3216,6 +3241,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3216 | :version "24.1" | 3241 | :version "24.1" |
| 3217 | :group 'rst-faces | 3242 | :group 'rst-faces |
| 3218 | :type '(face)) | 3243 | :type '(face)) |
| 3244 | (rst-testcover-defcustom) | ||
| 3219 | (make-obsolete-variable 'rst-external-face | 3245 | (make-obsolete-variable 'rst-external-face |
| 3220 | "customize the face `rst-external' instead." | 3246 | "customize the face `rst-external' instead." |
| 3221 | "24.1") | 3247 | "24.1") |
| @@ -3230,6 +3256,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3230 | :version "24.1" | 3256 | :version "24.1" |
| 3231 | :group 'rst-faces | 3257 | :group 'rst-faces |
| 3232 | :type '(face)) | 3258 | :type '(face)) |
| 3259 | (rst-testcover-defcustom) | ||
| 3233 | (make-obsolete-variable 'rst-definition-face | 3260 | (make-obsolete-variable 'rst-definition-face |
| 3234 | "customize the face `rst-definition' instead." | 3261 | "customize the face `rst-definition' instead." |
| 3235 | "24.1") | 3262 | "24.1") |
| @@ -3246,6 +3273,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3246 | "Directives and roles." | 3273 | "Directives and roles." |
| 3247 | :group 'rst-faces | 3274 | :group 'rst-faces |
| 3248 | :type '(face)) | 3275 | :type '(face)) |
| 3276 | (rst-testcover-defcustom) | ||
| 3249 | (make-obsolete-variable 'rst-directive-face | 3277 | (make-obsolete-variable 'rst-directive-face |
| 3250 | "customize the face `rst-directive' instead." | 3278 | "customize the face `rst-directive' instead." |
| 3251 | "24.1") | 3279 | "24.1") |
| @@ -3260,6 +3288,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3260 | :version "24.1" | 3288 | :version "24.1" |
| 3261 | :group 'rst-faces | 3289 | :group 'rst-faces |
| 3262 | :type '(face)) | 3290 | :type '(face)) |
| 3291 | (rst-testcover-defcustom) | ||
| 3263 | (make-obsolete-variable 'rst-comment-face | 3292 | (make-obsolete-variable 'rst-comment-face |
| 3264 | "customize the face `rst-comment' instead." | 3293 | "customize the face `rst-comment' instead." |
| 3265 | "24.1") | 3294 | "24.1") |
| @@ -3274,6 +3303,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3274 | :version "24.1" | 3303 | :version "24.1" |
| 3275 | :group 'rst-faces | 3304 | :group 'rst-faces |
| 3276 | :type '(face)) | 3305 | :type '(face)) |
| 3306 | (rst-testcover-defcustom) | ||
| 3277 | (make-obsolete-variable 'rst-emphasis1-face | 3307 | (make-obsolete-variable 'rst-emphasis1-face |
| 3278 | "customize the face `rst-emphasis1' instead." | 3308 | "customize the face `rst-emphasis1' instead." |
| 3279 | "24.1") | 3309 | "24.1") |
| @@ -3287,6 +3317,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3287 | "Double emphasis." | 3317 | "Double emphasis." |
| 3288 | :group 'rst-faces | 3318 | :group 'rst-faces |
| 3289 | :type '(face)) | 3319 | :type '(face)) |
| 3320 | (rst-testcover-defcustom) | ||
| 3290 | (make-obsolete-variable 'rst-emphasis2-face | 3321 | (make-obsolete-variable 'rst-emphasis2-face |
| 3291 | "customize the face `rst-emphasis2' instead." | 3322 | "customize the face `rst-emphasis2' instead." |
| 3292 | "24.1") | 3323 | "24.1") |
| @@ -3301,6 +3332,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3301 | :version "24.1" | 3332 | :version "24.1" |
| 3302 | :group 'rst-faces | 3333 | :group 'rst-faces |
| 3303 | :type '(face)) | 3334 | :type '(face)) |
| 3335 | (rst-testcover-defcustom) | ||
| 3304 | (make-obsolete-variable 'rst-literal-face | 3336 | (make-obsolete-variable 'rst-literal-face |
| 3305 | "customize the face `rst-literal' instead." | 3337 | "customize the face `rst-literal' instead." |
| 3306 | "24.1") | 3338 | "24.1") |
| @@ -3315,6 +3347,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3315 | :version "24.1" | 3347 | :version "24.1" |
| 3316 | :group 'rst-faces | 3348 | :group 'rst-faces |
| 3317 | :type '(face)) | 3349 | :type '(face)) |
| 3350 | (rst-testcover-defcustom) | ||
| 3318 | (make-obsolete-variable 'rst-reference-face | 3351 | (make-obsolete-variable 'rst-reference-face |
| 3319 | "customize the face `rst-reference' instead." | 3352 | "customize the face `rst-reference' instead." |
| 3320 | "24.1") | 3353 | "24.1") |
| @@ -3368,6 +3401,7 @@ Recompute the faces. VAL is the value to set." | |||
| 3368 | :group 'rst-faces-defaults | 3401 | :group 'rst-faces-defaults |
| 3369 | :type '(integer) | 3402 | :type '(integer) |
| 3370 | :set 'rst-set-level-default) | 3403 | :set 'rst-set-level-default) |
| 3404 | (rst-testcover-defcustom) | ||
| 3371 | ;; FIXME: It should be possible to give "#RRGGBB" type of color values. | 3405 | ;; FIXME: It should be possible to give "#RRGGBB" type of color values. |
| 3372 | ;; Together with a `rst-level-face-end-light' this could be used for | 3406 | ;; Together with a `rst-level-face-end-light' this could be used for |
| 3373 | ;; computing steps. | 3407 | ;; computing steps. |
| @@ -3378,6 +3412,7 @@ Recompute the faces. VAL is the value to set." | |||
| 3378 | :group 'rst-faces-defaults | 3412 | :group 'rst-faces-defaults |
| 3379 | :type '(string) | 3413 | :type '(string) |
| 3380 | :set 'rst-set-level-default) | 3414 | :set 'rst-set-level-default) |
| 3415 | (rst-testcover-defcustom) | ||
| 3381 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify | 3416 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify |
| 3382 | ;; how they behave for dark and light background using the | 3417 | ;; how they behave for dark and light background using the |
| 3383 | ;; relevant options explained in `defface'. | 3418 | ;; relevant options explained in `defface'. |
| @@ -3391,12 +3426,14 @@ The default depends on whether the value of `frame-background-mode' is | |||
| 3391 | :group 'rst-faces-defaults | 3426 | :group 'rst-faces-defaults |
| 3392 | :type '(integer) | 3427 | :type '(integer) |
| 3393 | :set 'rst-set-level-default) | 3428 | :set 'rst-set-level-default) |
| 3429 | (rst-testcover-defcustom) | ||
| 3394 | (defcustom rst-level-face-format-light "%2d" | 3430 | (defcustom rst-level-face-format-light "%2d" |
| 3395 | "The format for the lightness factor appended to the base name of the color. | 3431 | "The format for the lightness factor appended to the base name of the color. |
| 3396 | This value is expanded by `format' with an integer." | 3432 | This value is expanded by `format' with an integer." |
| 3397 | :group 'rst-faces-defaults | 3433 | :group 'rst-faces-defaults |
| 3398 | :type '(string) | 3434 | :type '(string) |
| 3399 | :set 'rst-set-level-default) | 3435 | :set 'rst-set-level-default) |
| 3436 | (rst-testcover-defcustom) | ||
| 3400 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify | 3437 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify |
| 3401 | ;; how they behave for dark and light background using the | 3438 | ;; how they behave for dark and light background using the |
| 3402 | ;; relevant options explained in `defface'. | 3439 | ;; relevant options explained in `defface'. |
| @@ -3420,6 +3457,7 @@ This color is used as background for section title text on level | |||
| 3420 | :group 'rst-faces-defaults | 3457 | :group 'rst-faces-defaults |
| 3421 | :type '(integer) | 3458 | :type '(integer) |
| 3422 | :set 'rst-set-level-default) | 3459 | :set 'rst-set-level-default) |
| 3460 | (rst-testcover-defcustom) | ||
| 3423 | 3461 | ||
| 3424 | (defcustom rst-adornment-faces-alist | 3462 | (defcustom rst-adornment-faces-alist |
| 3425 | ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed | 3463 | ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed |
| @@ -3447,6 +3485,7 @@ group." | |||
| 3447 | (const :tag "section title adornment" nil)) | 3485 | (const :tag "section title adornment" nil)) |
| 3448 | :value-type (face)) | 3486 | :value-type (face)) |
| 3449 | :set-after '(rst-level-face-max)) | 3487 | :set-after '(rst-level-face-max)) |
| 3488 | (rst-testcover-defcustom) | ||
| 3450 | 3489 | ||
| 3451 | (defun rst-define-level-faces () | 3490 | (defun rst-define-level-faces () |
| 3452 | "Define the faces for the section title text faces from the values." | 3491 | "Define the faces for the section title text faces from the values." |
| @@ -3663,8 +3702,7 @@ variable of the `rst-faces-defaults' group is customized. Use | |||
| 3663 | ;; Indentation is not required for doctest blocks. | 3702 | ;; Indentation is not required for doctest blocks. |
| 3664 | (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+")) | 3703 | (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+")) |
| 3665 | (1 rst-block-face) | 3704 | (1 rst-block-face) |
| 3666 | (2 rst-literal-face)) | 3705 | (2 rst-literal-face))) |
| 3667 | ) | ||
| 3668 | "Keywords to highlight in rst mode.") | 3706 | "Keywords to highlight in rst mode.") |
| 3669 | 3707 | ||
| 3670 | (defvar font-lock-beg) | 3708 | (defvar font-lock-beg) |
| @@ -3974,6 +4012,7 @@ string)) to be used for converting the document." | |||
| 3974 | (string :tag "Options")))) | 4012 | (string :tag "Options")))) |
| 3975 | :group 'rst | 4013 | :group 'rst |
| 3976 | :package-version "1.2.0") | 4014 | :package-version "1.2.0") |
| 4015 | (rst-testcover-defcustom) | ||
| 3977 | 4016 | ||
| 3978 | ;; FIXME: Must be `defcustom`. | 4017 | ;; FIXME: Must be `defcustom`. |
| 3979 | (defvar rst-compile-primary-toolset 'html | 4018 | (defvar rst-compile-primary-toolset 'html |
| @@ -3999,11 +4038,8 @@ string)) to be used for converting the document." | |||
| 3999 | (setq prevdir dir) | 4038 | (setq prevdir dir) |
| 4000 | (setq dir (expand-file-name (file-name-directory | 4039 | (setq dir (expand-file-name (file-name-directory |
| 4001 | (directory-file-name | 4040 | (directory-file-name |
| 4002 | (file-name-directory dir))))) | 4041 | (file-name-directory dir)))))) |
| 4003 | ) | 4042 | (or (and dir (concat dir file-name)) nil)))) |
| 4004 | (or (and dir (concat dir file-name)) nil) | ||
| 4005 | ))) | ||
| 4006 | |||
| 4007 | 4043 | ||
| 4008 | (require 'compile) | 4044 | (require 'compile) |
| 4009 | 4045 | ||
| @@ -4041,8 +4077,7 @@ select the alternative tool-set." | |||
| 4041 | ;; Invoke the compile command. | 4077 | ;; Invoke the compile command. |
| 4042 | (if (or compilation-read-command use-alt) | 4078 | (if (or compilation-read-command use-alt) |
| 4043 | (call-interactively 'compile) | 4079 | (call-interactively 'compile) |
| 4044 | (compile compile-command)) | 4080 | (compile compile-command)))) |
| 4045 | )) | ||
| 4046 | 4081 | ||
| 4047 | (defun rst-compile-alt-toolset () | 4082 | (defun rst-compile-alt-toolset () |
| 4048 | "Compile command with the alternative tool-set." | 4083 | "Compile command with the alternative tool-set." |
| @@ -4166,8 +4201,7 @@ column is used (fill-column vs. end of previous/next line)." | |||
| 4166 | (cond ((equal last-command 'rst-repeat-last-character) | 4201 | (cond ((equal last-command 'rst-repeat-last-character) |
| 4167 | (if (= curcol fill-column) prevcol fill-column)) | 4202 | (if (= curcol fill-column) prevcol fill-column)) |
| 4168 | (t (save-excursion | 4203 | (t (save-excursion |
| 4169 | (if (zerop prevcol) fill-column prevcol))) | 4204 | (if (zerop prevcol) fill-column prevcol)))))) |
| 4170 | )) ) | ||
| 4171 | (end-of-line) | 4205 | (end-of-line) |
| 4172 | (if (> (current-column) rightmost-column) | 4206 | (if (> (current-column) rightmost-column) |
| 4173 | ;; Shave characters off the end. | 4207 | ;; Shave characters off the end. |
| @@ -4176,17 +4210,7 @@ column is used (fill-column vs. end of previous/next line)." | |||
| 4176 | (point)) | 4210 | (point)) |
| 4177 | ;; Fill with last characters. | 4211 | ;; Fill with last characters. |
| 4178 | (insert-char (preceding-char) | 4212 | (insert-char (preceding-char) |
| 4179 | (- rightmost-column (current-column)))) | 4213 | (- rightmost-column (current-column)))))) |
| 4180 | )) | ||
| 4181 | |||
| 4182 | |||
| 4183 | (defun rst-portable-mark-active-p () | ||
| 4184 | "Return non-nil if the mark is active. | ||
| 4185 | This is a portable function." | ||
| 4186 | (cond | ||
| 4187 | ((fboundp 'region-active-p) (region-active-p)) | ||
| 4188 | ((boundp 'transient-mark-mode) (and transient-mark-mode mark-active)) | ||
| 4189 | (t mark-active))) | ||
| 4190 | 4214 | ||
| 4191 | 4215 | ||
| 4192 | 4216 | ||
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 5bcd87ede68..67d7f8c01f9 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -451,7 +451,7 @@ the next N words. In Transient Mark mode, when the mark is active, | |||
| 451 | N defaults to -1, which means to wrap it around the current region. | 451 | N defaults to -1, which means to wrap it around the current region. |
| 452 | 452 | ||
| 453 | If you like upcased tags, put (setq sgml-transformation-function 'upcase) | 453 | If you like upcased tags, put (setq sgml-transformation-function 'upcase) |
| 454 | in your `.emacs' file. | 454 | in your init file. |
| 455 | 455 | ||
| 456 | Use \\[sgml-validate] to validate your document with an SGML parser. | 456 | Use \\[sgml-validate] to validate your document with an SGML parser. |
| 457 | 457 | ||
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 2664a89855f..459e884d45d 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el | |||
| @@ -126,7 +126,7 @@ | |||
| 126 | ;; again. | 126 | ;; again. |
| 127 | ;; | 127 | ;; |
| 128 | ;; To use the package regularly place this file in the site library | 128 | ;; To use the package regularly place this file in the site library |
| 129 | ;; directory and add the next expression in your .emacs file. Make | 129 | ;; directory and add the next expression in your init file. Make |
| 130 | ;; sure that directory is included in the `load-path'. | 130 | ;; sure that directory is included in the `load-path'. |
| 131 | ;; | 131 | ;; |
| 132 | ;; (require 'table) | 132 | ;; (require 'table) |
| @@ -342,10 +342,10 @@ | |||
| 342 | ;; (function (lambda () | 342 | ;; (function (lambda () |
| 343 | ;; (local-set-key [<key sequence>] '<function>)))) | 343 | ;; (local-set-key [<key sequence>] '<function>)))) |
| 344 | ;; | 344 | ;; |
| 345 | ;; Above code is well known ~/.emacs idiom for customizing a mode | 345 | ;; Adding the above to your init file is a common way to customize a |
| 346 | ;; specific keymap however it does not work for this package. This is | 346 | ;; mode specific keymap. However it does not work for this package. |
| 347 | ;; because there is no table mode in effect. This package does not | 347 | ;; This is because there is no table mode in effect. This package |
| 348 | ;; use a local map therefore you must modify `table-cell-map' | 348 | ;; does not use a local map therefore you must modify `table-cell-map' |
| 349 | ;; explicitly. The correct way of achieving above task is: | 349 | ;; explicitly. The correct way of achieving above task is: |
| 350 | ;; | 350 | ;; |
| 351 | ;; (add-hook 'table-cell-map-hook | 351 | ;; (add-hook 'table-cell-map-hook |
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 8a4fe4f87fd..b21e72639fd 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el | |||
| @@ -276,8 +276,9 @@ You have the following commands at your disposal: | |||
| 276 | \\[2C-merge] Merge both buffers | 276 | \\[2C-merge] Merge both buffers |
| 277 | \\[2C-dissociate] Dissociate the two buffers | 277 | \\[2C-dissociate] Dissociate the two buffers |
| 278 | 278 | ||
| 279 | These keybindings can be customized in your ~/.emacs by `2C-mode-map', | 279 | These keybindings can be customized in your init file by |
| 280 | `2C-minor-mode-map' and by binding `2C-command' to some prefix. | 280 | `2C-mode-map', `2C-minor-mode-map' and by binding `2C-command' to |
| 281 | some prefix. | ||
| 281 | 282 | ||
| 282 | The appearance of the screen can be customized by the variables | 283 | The appearance of the screen can be customized by the variables |
| 283 | `2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and | 284 | `2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and |
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 13963121e2b..c2ac1035dfe 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; | 29 | ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; |
| 30 | ;; See the top of `time-stamp.el' for another example. | 30 | ;; See the top of `time-stamp.el' for another example. |
| 31 | 31 | ||
| 32 | ;; To use time-stamping, add this line to your .emacs file: | 32 | ;; To use time-stamping, add this line to your init file: |
| 33 | ;; (add-hook 'before-save-hook 'time-stamp) | 33 | ;; (add-hook 'before-save-hook 'time-stamp) |
| 34 | ;; Now any time-stamp templates in your files will be updated automatically. | 34 | ;; Now any time-stamp templates in your files will be updated automatically. |
| 35 | 35 | ||
| @@ -254,7 +254,7 @@ time-stamped file itself.") | |||
| 254 | (defun time-stamp () | 254 | (defun time-stamp () |
| 255 | "Update the time stamp string(s) in the buffer. | 255 | "Update the time stamp string(s) in the buffer. |
| 256 | A template in a file can be automatically updated with a new time stamp | 256 | A template in a file can be automatically updated with a new time stamp |
| 257 | every time you save the file. Add this line to your .emacs file: | 257 | every time you save the file. Add this line to your init file: |
| 258 | (add-hook 'before-save-hook 'time-stamp) | 258 | (add-hook 'before-save-hook 'time-stamp) |
| 259 | or customize `before-save-hook' through Custom. | 259 | or customize `before-save-hook' through Custom. |
| 260 | Normally the template must appear in the first 8 lines of a file and | 260 | Normally the template must appear in the first 8 lines of a file and |
diff --git a/lisp/time.el b/lisp/time.el index 8d43b565416..fe3cdbb57be 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -575,7 +575,8 @@ To turn off the world time display, go to that window and type `q'." | |||
| 575 | (let ((list timer-list)) | 575 | (let ((list timer-list)) |
| 576 | (while list | 576 | (while list |
| 577 | (let ((elt (pop list))) | 577 | (let ((elt (pop list))) |
| 578 | (when (equal (symbol-name (aref elt 5)) "display-time-world-timer") | 578 | (when (equal (symbol-name (timer--function elt)) |
| 579 | "display-time-world-timer") | ||
| 579 | (cancel-timer elt))))))) | 580 | (cancel-timer elt))))))) |
| 580 | 581 | ||
| 581 | ;;;###autoload | 582 | ;;;###autoload |
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index bd7d8e33922..26fe72014f7 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | 79 | ||
| 80 | ;; Store any proxying information - this will not overwrite an old | 80 | ;; Store any proxying information - this will not overwrite an old |
| 81 | ;; entry, so that people can still set this information in their | 81 | ;; entry, so that people can still set this information in their |
| 82 | ;; .emacs file | 82 | ;; init file |
| 83 | (cond | 83 | (cond |
| 84 | (cur-proxy nil) ; Keep their old settings | 84 | (cur-proxy nil) ; Keep their old settings |
| 85 | ((null env-proxy) nil) ; No proxy setup | 85 | ((null env-proxy) nil) ; No proxy setup |
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el index 0f71b7b82e7..fc65d62c67d 100644 --- a/lisp/vc/pcvs-defs.el +++ b/lisp/vc/pcvs-defs.el | |||
| @@ -57,11 +57,7 @@ versions, such as the one in SunOS-4.") | |||
| 57 | ;;;; END OF THINGS TO CHECK WHEN INSTALLING | 57 | ;;;; END OF THINGS TO CHECK WHEN INSTALLING |
| 58 | ;;;; -------------------------------------------------------- | 58 | ;;;; -------------------------------------------------------- |
| 59 | 59 | ||
| 60 | ;;;; | ||
| 61 | ;;;; User configuration variables: | 60 | ;;;; User configuration variables: |
| 62 | ;;;; | ||
| 63 | ;;;; NOTE: these should be set in your ~/.emacs (or site-lisp/default.el) file. | ||
| 64 | ;;;; | ||
| 65 | 61 | ||
| 66 | (defgroup pcl-cvs nil | 62 | (defgroup pcl-cvs nil |
| 67 | "Special support for the CVS versioning system." | 63 | "Special support for the CVS versioning system." |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index c0dafda57b6..1eb33776f6a 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -534,7 +534,9 @@ in the branch repository (or whose status not be determined)." | |||
| 534 | ;; FIXME: maybe it's overkill to check if both these | 534 | ;; FIXME: maybe it's overkill to check if both these |
| 535 | ;; files exist. | 535 | ;; files exist. |
| 536 | (and (file-exists-p branch-format-file) | 536 | (and (file-exists-p branch-format-file) |
| 537 | (file-exists-p lastrev-file))))) | 537 | (file-exists-p lastrev-file) |
| 538 | (equal (emacs-bzr-version-dirstate l-c-parent-dir) | ||
| 539 | (emacs-bzr-version-dirstate rootdir)))))) | ||
| 538 | t))) | 540 | t))) |
| 539 | (with-temp-buffer | 541 | (with-temp-buffer |
| 540 | (insert-file-contents branch-format-file) | 542 | (insert-file-contents branch-format-file) |
| @@ -553,13 +555,17 @@ in the branch repository (or whose status not be determined)." | |||
| 553 | (insert-file-contents lastrev-file) | 555 | (insert-file-contents lastrev-file) |
| 554 | (when (re-search-forward "[0-9]+" nil t) | 556 | (when (re-search-forward "[0-9]+" nil t) |
| 555 | (buffer-substring (match-beginning 0) (match-end 0)))))) | 557 | (buffer-substring (match-beginning 0) (match-end 0)))))) |
| 556 | ;; fallback to calling "bzr revno" | 558 | ;; Fallback to calling "bzr revno --tree". |
| 559 | ;; The "--tree" matters for lightweight checkouts not on the same | ||
| 560 | ;; revision as the parent. | ||
| 557 | (let* ((result (vc-bzr-command-discarding-stderr | 561 | (let* ((result (vc-bzr-command-discarding-stderr |
| 558 | vc-bzr-program "revno" (file-relative-name file))) | 562 | vc-bzr-program "revno" "--tree" |
| 563 | (file-relative-name file))) | ||
| 559 | (exitcode (car result)) | 564 | (exitcode (car result)) |
| 560 | (output (cdr result))) | 565 | (output (cdr result))) |
| 561 | (cond | 566 | (cond |
| 562 | ((eq exitcode 0) (substring output 0 -1)) | 567 | ((and (eq exitcode 0) (not (zerop (length output)))) |
| 568 | (substring output 0 -1)) | ||
| 563 | (t nil)))))) | 569 | (t nil)))))) |
| 564 | 570 | ||
| 565 | (defun vc-bzr-create-repo () | 571 | (defun vc-bzr-create-repo () |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b48ea1afd95..ea9ce949ccb 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | ;; To install: put this file on the load-path and add Git to the list | 32 | ;; To install: put this file on the load-path and add Git to the list |
| 33 | ;; of supported backends in `vc-handled-backends'; the following line, | 33 | ;; of supported backends in `vc-handled-backends'; the following line, |
| 34 | ;; placed in your ~/.emacs, will accomplish this: | 34 | ;; placed in your init file, will accomplish this: |
| 35 | ;; | 35 | ;; |
| 36 | ;; (add-to-list 'vc-handled-backends 'Git) | 36 | ;; (add-to-list 'vc-handled-backends 'Git) |
| 37 | 37 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1ef4faaa008..47800bd4aac 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -653,7 +653,6 @@ | |||
| 653 | 653 | ||
| 654 | (require 'vc-hooks) | 654 | (require 'vc-hooks) |
| 655 | (require 'vc-dispatcher) | 655 | (require 'vc-dispatcher) |
| 656 | (require 'ediff) | ||
| 657 | 656 | ||
| 658 | (declare-function diff-setup-whitespace "diff-mode" ()) | 657 | (declare-function diff-setup-whitespace "diff-mode" ()) |
| 659 | 658 | ||
| @@ -1698,7 +1697,9 @@ saving the buffer." | |||
| 1698 | (vc-diff-internal t (vc-deduce-fileset t) nil nil | 1697 | (vc-diff-internal t (vc-deduce-fileset t) nil nil |
| 1699 | (called-interactively-p 'interactive)))) | 1698 | (called-interactively-p 'interactive)))) |
| 1700 | 1699 | ||
| 1701 | (declare-function ediff-vc-internal (rev1 rev2 &optional startup-hooks)) | 1700 | (declare-function ediff-load-version-control "ediff" (&optional silent)) |
| 1701 | (declare-function ediff-vc-internal "ediff-vers" | ||
| 1702 | (rev1 rev2 &optional startup-hooks)) | ||
| 1702 | 1703 | ||
| 1703 | ;;;###autoload | 1704 | ;;;###autoload |
| 1704 | (defun vc-version-ediff (files rev1 rev2) | 1705 | (defun vc-version-ediff (files rev1 rev2) |
| @@ -1719,7 +1720,8 @@ repository history using ediff." | |||
| 1719 | ;; FIXME We only support running ediff on one file for now. | 1720 | ;; FIXME We only support running ediff on one file for now. |
| 1720 | ;; We could spin off an ediff session per file in the file set. | 1721 | ;; We could spin off an ediff session per file in the file set. |
| 1721 | ((= (length files) 1) | 1722 | ((= (length files) 1) |
| 1722 | (ediff-load-version-control) | 1723 | (require 'ediff) |
| 1724 | (ediff-load-version-control) ; loads ediff-vers | ||
| 1723 | (find-file (car files)) ;FIXME: find-file from Elisp is bad. | 1725 | (find-file (car files)) ;FIXME: find-file from Elisp is bad. |
| 1724 | (ediff-vc-internal rev1 rev2 nil)) | 1726 | (ediff-vc-internal rev1 rev2 nil)) |
| 1725 | (t | 1727 | (t |
diff --git a/lisp/version.el b/lisp/version.el index e63c51d0d26..1fb3828e15d 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -87,40 +87,91 @@ to the system configuration; look at `system-configuration' instead." | |||
| 87 | ;; Set during dumping, this is a defvar so that it can be setq'd. | 87 | ;; Set during dumping, this is a defvar so that it can be setq'd. |
| 88 | (defvar emacs-bzr-version nil | 88 | (defvar emacs-bzr-version nil |
| 89 | "String giving the bzr revision from which this Emacs was built. | 89 | "String giving the bzr revision from which this Emacs was built. |
| 90 | Value is the bzr revision number and a revision ID separated by a blank. | 90 | The format is: [revno] revision_id, where revno may be absent. |
| 91 | Value is nil if Emacs was not built from a bzr checkout, or if we could | 91 | Value is nil if Emacs was not built from a bzr checkout, or if we could |
| 92 | not determine the revision.") | 92 | not determine the revision.") |
| 93 | 93 | ||
| 94 | (defun emacs-bzr-get-version (&optional dir) | 94 | (defun emacs-bzr-version-dirstate (dir) |
| 95 | "Try to return as a string the bzr revision number of the Emacs sources. | 95 | "Try to return as a string the bzr revision ID of directory DIR. |
| 96 | Value is the bzr revision number and a revision ID separated by a blank. | 96 | This uses the dirstate file's parent revision entry. |
| 97 | Returns nil if unable to find this information." | ||
| 98 | (let ((file (expand-file-name ".bzr/checkout/dirstate" dir))) | ||
| 99 | (when (file-readable-p file) | ||
| 100 | (with-temp-buffer | ||
| 101 | (insert-file-contents file) | ||
| 102 | (and (looking-at "#bazaar dirstate flat format 3") | ||
| 103 | (forward-line 3) | ||
| 104 | (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") | ||
| 105 | (match-string 1)))))) | ||
| 106 | |||
| 107 | (defun emacs-bzr-version-bzr (dir) | ||
| 108 | "Ask bzr itself for the version information for directory DIR." | ||
| 109 | ;; Comments on `bzr version-info': | ||
| 110 | ;; i) Unknown files also cause clean != 1. | ||
| 111 | ;; ii) It can be slow, contacting the upstream repo to get the | ||
| 112 | ;; branch nick if one is not set locally, even with a custom | ||
| 113 | ;; template that is not asking for the nick (as used here). You'd | ||
| 114 | ;; think the latter part would be trivial to fix: | ||
| 115 | ;; https://bugs.launchpad.net/bzr/+bug/882541/comments/3 | ||
| 116 | ;; https://bugs.launchpad.net/bzr/+bug/629150 | ||
| 117 | ;; You can set the nick locally with `bzr nick ...', which speeds | ||
| 118 | ;; things up enormously. `bzr revno' does not have this issue, but | ||
| 119 | ;; has no way to print the revision_id AFAICS. | ||
| 120 | (message "Waiting for bzr...") | ||
| 121 | (with-temp-buffer | ||
| 122 | (if (zerop | ||
| 123 | (call-process "bzr" nil '(t nil) nil "version-info" | ||
| 124 | "--custom" | ||
| 125 | "--template={revno} {revision_id} (clean = {clean})" | ||
| 126 | "dir")) | ||
| 127 | (buffer-string)))) | ||
| 128 | |||
| 129 | (defun emacs-bzr-get-version (&optional dir external) | ||
| 130 | "Try to return as a string the bzr revision of the Emacs sources. | ||
| 131 | The format is: [revno] revision_id, where revno may be absent. | ||
| 97 | Value is nil if the sources do not seem to be under bzr, or if we could | 132 | Value is nil if the sources do not seem to be under bzr, or if we could |
| 98 | not determine the revision. Note that this reports on the current state | 133 | not determine the revision. Note that this reports on the current state |
| 99 | of the sources, which may not correspond to the running Emacs. | 134 | of the sources, which may not correspond to the running Emacs. |
| 100 | 135 | ||
| 101 | Optional argument DIR is a directory to use instead of `source-directory'." | 136 | Optional argument DIR is a directory to use instead of `source-directory'. |
| 137 | Optional argument EXTERNAL non-nil means to maybe ask `bzr' itself, | ||
| 138 | if the sources appear to be under bzr. If `force', always ask bzr. | ||
| 139 | Otherwise only ask bzr if we cannot find any information ourselves." | ||
| 102 | (or dir (setq dir source-directory)) | 140 | (or dir (setq dir source-directory)) |
| 103 | (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir))) | 141 | (when (file-directory-p (expand-file-name ".bzr/branch" dir)) |
| 104 | (let (file loc) | 142 | (if (eq external 'force) |
| 105 | (cond ((file-readable-p | 143 | (emacs-bzr-version-bzr dir) |
| 106 | (setq file (expand-file-name "last-revision" dir))) | 144 | (let (file loc rev) |
| 107 | (with-temp-buffer | 145 | (cond ((file-readable-p |
| 108 | (insert-file-contents file) | 146 | (setq file (expand-file-name ".bzr/branch/last-revision" dir))) |
| 109 | (goto-char (point-max)) | 147 | (with-temp-buffer |
| 110 | (if (looking-back "\n") | 148 | (insert-file-contents file) |
| 111 | (delete-char -1)) | 149 | (goto-char (point-max)) |
| 112 | (buffer-string))) | 150 | (if (looking-back "\n") |
| 113 | ;; OK, no last-revision. Is it a lightweight checkout? | 151 | (delete-char -1)) |
| 114 | ((file-readable-p | 152 | (buffer-string))) |
| 115 | (setq file (expand-file-name "location" dir))) | 153 | ;; OK, no last-revision. Is it a lightweight checkout? |
| 116 | ;; If the parent branch is local, try looking there for the revid. | 154 | ((file-readable-p |
| 117 | (if (setq loc (with-temp-buffer | 155 | (setq file (expand-file-name ".bzr/branch/location" dir))) |
| 118 | (insert-file-contents file) | 156 | (setq rev (emacs-bzr-version-dirstate dir)) |
| 119 | (if (looking-at "file://\\(.*\\)") | 157 | ;; If the parent branch is local, try looking there for the rev. |
| 120 | (match-string 1)))) | 158 | ;; Note: there is no guarantee that the parent branch's rev |
| 121 | (emacs-bzr-get-version loc))) | 159 | ;; corresponds to this branch. This branch could have |
| 122 | ;; Could fall back to eg `bzr testament' at this point. | 160 | ;; been made with a specific -r revno argument, or the |
| 123 | )))) | 161 | ;; parent could have been updated since this branch was created. |
| 162 | ;; To try and detect this, we check the dirstate revids | ||
| 163 | ;; to see if they match. | ||
| 164 | (if (and (setq loc (with-temp-buffer | ||
| 165 | (insert-file-contents file) | ||
| 166 | (if (looking-at "file://\\(.*\\)") | ||
| 167 | (match-string 1)))) | ||
| 168 | (equal rev (emacs-bzr-version-dirstate loc))) | ||
| 169 | (emacs-bzr-get-version loc) | ||
| 170 | ;; If parent does not match, the best we can do without | ||
| 171 | ;; calling external commands is to use the dirstate rev. | ||
| 172 | rev)) | ||
| 173 | (external | ||
| 174 | (emacs-bzr-version-bzr dir))))))) | ||
| 124 | 175 | ||
| 125 | ;; We put version info into the executable in the form that `ident' uses. | 176 | ;; We put version info into the executable in the form that `ident' uses. |
| 126 | (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) | 177 | (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) |
diff --git a/lisp/windmove.el b/lisp/windmove.el index 3a1afec38ee..1181e409dff 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -94,7 +94,7 @@ | |||
| 94 | 94 | ||
| 95 | ;; Installation: | 95 | ;; Installation: |
| 96 | ;; | 96 | ;; |
| 97 | ;; Put the following line in your `.emacs' file: | 97 | ;; Put the following line in your init file: |
| 98 | ;; | 98 | ;; |
| 99 | ;; (windmove-default-keybindings) ; shifted arrow keys | 99 | ;; (windmove-default-keybindings) ; shifted arrow keys |
| 100 | ;; | 100 | ;; |
diff --git a/lisp/window.el b/lisp/window.el index dd1f55450c3..fccb68bd94a 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -4551,6 +4551,9 @@ of the window used." | |||
| 4551 | (function :tag "function")) | 4551 | (function :tag "function")) |
| 4552 | :group 'windows) | 4552 | :group 'windows) |
| 4553 | 4553 | ||
| 4554 | (make-obsolete-variable 'display-buffer-function | ||
| 4555 | 'display-buffer-alist "24.3") | ||
| 4556 | |||
| 4554 | ;; Eventually, we want to turn this into a defvar; instead of | 4557 | ;; Eventually, we want to turn this into a defvar; instead of |
| 4555 | ;; customizing this, the user should use a `pop-up-frame-parameters' | 4558 | ;; customizing this, the user should use a `pop-up-frame-parameters' |
| 4556 | ;; alist entry in `display-buffer-base-action'. | 4559 | ;; alist entry in `display-buffer-base-action'. |
| @@ -4768,8 +4771,8 @@ the selected window. If they contain (same-frame . t), display | |||
| 4768 | BUFFER in a window of the selected frame. | 4771 | BUFFER in a window of the selected frame. |
| 4769 | 4772 | ||
| 4770 | If ARGS is a list whose car is a symbol, use (car ARGS) as a | 4773 | If ARGS is a list whose car is a symbol, use (car ARGS) as a |
| 4771 | function to do the work. Pass it BUFFER as first argument, | 4774 | function to do the work. Pass it BUFFER as first argument, and |
| 4772 | and (cdr ARGS) as second." | 4775 | pass the elements of (cdr ARGS) as the remaining arguments." |
| 4773 | (if (and args (symbolp (car args))) | 4776 | (if (and args (symbolp (car args))) |
| 4774 | (apply (car args) buffer (cdr args)) | 4777 | (apply (car args) buffer (cdr args)) |
| 4775 | (let ((window (get-buffer-window buffer 0))) | 4778 | (let ((window (get-buffer-window buffer 0))) |
| @@ -287,10 +287,10 @@ for subdir in site-lisp \ | |||
| 287 | `find etc lisp admin -type d` \ | 287 | `find etc lisp admin -type d` \ |
| 288 | doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ | 288 | doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ |
| 289 | info m4 msdos \ | 289 | info m4 msdos \ |
| 290 | nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ | 290 | nextstep nextstep/templates \ |
| 291 | nextstep/Cocoa nextstep/Cocoa/Emacs.base \ | ||
| 291 | nextstep/Cocoa/Emacs.base/Contents \ | 292 | nextstep/Cocoa/Emacs.base/Contents \ |
| 292 | nextstep/Cocoa/Emacs.base/Contents/Resources \ | 293 | nextstep/Cocoa/Emacs.base/Contents/Resources \ |
| 293 | nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \ | ||
| 294 | nextstep/GNUstep \ | 294 | nextstep/GNUstep \ |
| 295 | nextstep/GNUstep/Emacs.base \ | 295 | nextstep/GNUstep/Emacs.base \ |
| 296 | nextstep/GNUstep/Emacs.base/Resources | 296 | nextstep/GNUstep/Emacs.base/Resources |
| @@ -404,23 +404,23 @@ echo "Making links to \`msdos'" | |||
| 404 | 404 | ||
| 405 | echo "Making links to \`nextstep'" | 405 | echo "Making links to \`nextstep'" |
| 406 | (cd nextstep | 406 | (cd nextstep |
| 407 | ln ChangeLog README INSTALL ../${tempdir}/nextstep) | 407 | ln ChangeLog README INSTALL Makefile.in ../${tempdir}/nextstep) |
| 408 | |||
| 409 | echo "Making links to \`nextstep/templates'" | ||
| 410 | (cd nextstep/templates | ||
| 411 | ln Emacs.desktop.in Info-gnustep.plist.in Info.plist.in InfoPlist.strings.in ../../${tempdir}/nextstep/templates) | ||
| 408 | 412 | ||
| 409 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" | 413 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" |
| 410 | (cd nextstep/Cocoa/Emacs.base/Contents | 414 | (cd nextstep/Cocoa/Emacs.base/Contents |
| 411 | ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) | 415 | ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) |
| 412 | 416 | ||
| 413 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'" | 417 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'" |
| 414 | (cd nextstep/Cocoa/Emacs.base/Contents/Resources | 418 | (cd nextstep/Cocoa/Emacs.base/Contents/Resources |
| 415 | ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources) | 419 | ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources) |
| 416 | 420 | ||
| 417 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'" | ||
| 418 | (cd nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj | ||
| 419 | ln InfoPlist.strings ../../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj) | ||
| 420 | |||
| 421 | echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" | 421 | echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" |
| 422 | (cd nextstep/GNUstep/Emacs.base/Resources | 422 | (cd nextstep/GNUstep/Emacs.base/Resources |
| 423 | ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) | 423 | ln README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) |
| 424 | 424 | ||
| 425 | echo "Making links to \`oldXMenu'" | 425 | echo "Making links to \`oldXMenu'" |
| 426 | (cd oldXMenu | 426 | (cd oldXMenu |
diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog index 6451f7a7322..53f42c97716 100644 --- a/nextstep/ChangeLog +++ b/nextstep/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2012-09-17 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * templates/Info-gnustep.plist.in, templates/InfoPlist.strings.in: | ||
| 4 | * templates/Info.plist.in: Let configure set copyright. | ||
| 5 | |||
| 6 | 2012-09-16 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * Makefile.in: New file. | ||
| 9 | * templates: New directory. | ||
| 10 | * templates/Emacs.desktop.in, templates/Info-gnustep.plist.in: | ||
| 11 | * templates/Info.plist.in, templates/InfoPlist.strings.in: | ||
| 12 | Move here from various Cocoa/, GNUstep/ locations. | ||
| 13 | Let configure set the version number. | ||
| 14 | * Cocoa/Emacs.base/Contents/Info.plist: | ||
| 15 | * Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings: | ||
| 16 | * GNUstep/Emacs.base/Resources/Info-gnustep.plist: | ||
| 17 | * GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/. | ||
| 18 | * Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory. | ||
| 19 | |||
| 1 | 2012-04-07 Glenn Morris <rgm@gnu.org> | 20 | 2012-04-07 Glenn Morris <rgm@gnu.org> |
| 2 | 21 | ||
| 3 | * Cocoa/Emacs.base/Contents/Info.plist: | 22 | * Cocoa/Emacs.base/Contents/Info.plist: |
diff --git a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings deleted file mode 100644 index 7655c0ca8ec..00000000000 --- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | /* Localized versions of Info.plist keys */ | ||
| 2 | |||
| 3 | CFBundleName = "Emacs"; | ||
| 4 | CFBundleShortVersionString = "Version 24.2.50"; | ||
| 5 | CFBundleGetInfoString = "Emacs version 24.2.50, NS Windowing"; | ||
| 6 | NSHumanReadableCopyright = "Copyright (C) 2012 Free Software Foundation, Inc."; | ||
diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in new file mode 100644 index 00000000000..27ec5d1556b --- /dev/null +++ b/nextstep/Makefile.in | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | ### nextstep/Makefile for GNU Emacs | ||
| 2 | |||
| 3 | ## Copyright (C) 2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ## This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ## GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ## it under the terms of the GNU General Public License as published by | ||
| 9 | ## the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ## (at your option) any later version. | ||
| 11 | ## | ||
| 12 | ## GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ## GNU General Public License for more details. | ||
| 16 | ## | ||
| 17 | ## You should have received a copy of the GNU General Public License | ||
| 18 | ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ### Commentary: | ||
| 21 | |||
| 22 | ### Code: | ||
| 23 | SHELL = /bin/sh | ||
| 24 | |||
| 25 | srcdir = @srcdir@ | ||
| 26 | EXEEXT = @EXEEXT@ | ||
| 27 | |||
| 28 | @SET_MAKE@ | ||
| 29 | MKDIR_P = @MKDIR_P@ | ||
| 30 | |||
| 31 | ns_appdir = @ns_appdir@ | ||
| 32 | ns_appbindir = @ns_appbindir@ | ||
| 33 | ns_appsrc = @ns_appsrc@ | ||
| 34 | |||
| 35 | ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc} | ||
| 36 | rm -rf ${ns_appdir} | ||
| 37 | ${MKDIR_P} ${ns_appdir} | ||
| 38 | ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \ | ||
| 39 | ( cd ${ns_appdir} ; umask 022; tar xf - ) | ||
| 40 | [ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || \ | ||
| 41 | ( cd ${ns_appsrc} ; tar cfh - . ) | \ | ||
| 42 | ( cd ${ns_appdir} ; umask 022; tar xf - ) | ||
| 43 | |||
| 44 | ${ns_appbindir}/Emacs: ${ns_appdir} ../src/emacs${EXEEXT} | ||
| 45 | ${MKDIR_P} ${ns_appbindir} | ||
| 46 | cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs | ||
| 47 | |||
| 48 | .PHONY: all | ||
| 49 | |||
| 50 | all: ${ns_appdir} ${ns_appbindir}/Emacs | ||
| 51 | |||
| 52 | |||
| 53 | .PHONY: clean distclean maintainer-clean | ||
| 54 | |||
| 55 | clean: | ||
| 56 | rm -rf ${ns_appdir} | ||
| 57 | |||
| 58 | distclean: clean | ||
| 59 | rm -f Makefile | ||
| 60 | rm -f GNUstep/Emacs.base/Resources/Info-gnustep.plist \ | ||
| 61 | GNUstep/Emacs.base/Resources/Emacs.desktop \ | ||
| 62 | Cocoa/Emacs.base/Contents/Info.plist \ | ||
| 63 | Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings | ||
| 64 | |||
| 65 | maintainer-clean: distclean | ||
| 66 | |||
| 67 | ### Makefile.in ends here | ||
diff --git a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop b/nextstep/templates/Emacs.desktop.in index a36eafaadb0..170f195f270 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop +++ b/nextstep/templates/Emacs.desktop.in | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | [Desktop Entry] | 1 | [Desktop Entry] |
| 2 | Encoding=UTF-8 | 2 | Encoding=UTF-8 |
| 3 | Type=Application | 3 | Type=Application |
| 4 | Version=24.2.50 | 4 | Version=@version@ |
| 5 | Categories=GNUstep | 5 | Categories=GNUstep |
| 6 | Name=Emacs | 6 | Name=Emacs |
| 7 | Comment=GNU Emacs for NeXT/Open/GNUstep and OS X | 7 | Comment=GNU Emacs for NeXT/Open/GNUstep and OS X |
diff --git a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist b/nextstep/templates/Info-gnustep.plist.in index 6cde01b0d05..4ac97e5cde6 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist +++ b/nextstep/templates/Info-gnustep.plist.in | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | ApplicationDescription = "GNU Emacs for GNUstep / OS X"; | 2 | ApplicationDescription = "GNU Emacs for GNUstep / OS X"; |
| 3 | ApplicationIcon = emacs.tiff; | 3 | ApplicationIcon = emacs.tiff; |
| 4 | ApplicationName = Emacs; | 4 | ApplicationName = Emacs; |
| 5 | ApplicationRelease = "24.2.50"; | 5 | ApplicationRelease = "@version@"; |
| 6 | Authors = ( | 6 | Authors = ( |
| 7 | "Adrian Robert (GNUstep)", | 7 | "Adrian Robert (GNUstep)", |
| 8 | "Christophe de Dinechin (MacOS X)", | 8 | "Christophe de Dinechin (MacOS X)", |
| @@ -11,9 +11,9 @@ | |||
| 11 | "Carl Edman (NeXTstep)", | 11 | "Carl Edman (NeXTstep)", |
| 12 | "..see etc/NEXTSTEP" | 12 | "..see etc/NEXTSTEP" |
| 13 | ); | 13 | ); |
| 14 | Copyright = "Copyright (C) 2012 Free Software Foundation, Inc."; | 14 | Copyright = "@copyright@"; |
| 15 | CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; | 15 | CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; |
| 16 | FullVersionID = "Emacs 24.2.50, NS Windowing"; | 16 | FullVersionID = "Emacs @version@, NS Windowing"; |
| 17 | NSExecutable = Emacs; | 17 | NSExecutable = Emacs; |
| 18 | NSIcon = emacs.tiff; | 18 | NSIcon = emacs.tiff; |
| 19 | NSPrincipalClass = NSApplication; | 19 | NSPrincipalClass = NSApplication; |
diff --git a/nextstep/Cocoa/Emacs.base/Contents/Info.plist b/nextstep/templates/Info.plist.in index f5490f613fd..25c73916e58 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist +++ b/nextstep/templates/Info.plist.in | |||
| @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |||
| 553 | <key>CFBundleExecutable</key> | 553 | <key>CFBundleExecutable</key> |
| 554 | <string>Emacs</string> | 554 | <string>Emacs</string> |
| 555 | <key>CFBundleGetInfoString</key> | 555 | <key>CFBundleGetInfoString</key> |
| 556 | <string>Emacs 24.2.50 Copyright (C) 2012 Free Software Foundation, Inc.</string> | 556 | <string>Emacs @version@ @copyright@</string> |
| 557 | <key>CFBundleIconFile</key> | 557 | <key>CFBundleIconFile</key> |
| 558 | <string>Emacs.icns</string> | 558 | <string>Emacs.icns</string> |
| 559 | <key>CFBundleIdentifier</key> | 559 | <key>CFBundleIdentifier</key> |
| @@ -566,7 +566,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |||
| 566 | <string>APPL</string> | 566 | <string>APPL</string> |
| 567 | <!-- This should be the emacs version number. --> | 567 | <!-- This should be the emacs version number. --> |
| 568 | <key>CFBundleShortVersionString</key> | 568 | <key>CFBundleShortVersionString</key> |
| 569 | <string>24.2.50</string> | 569 | <string>@version@</string> |
| 570 | <key>CFBundleSignature</key> | 570 | <key>CFBundleSignature</key> |
| 571 | <string>EMAx</string> | 571 | <string>EMAx</string> |
| 572 | <!-- This SHOULD be a build number. --> | 572 | <!-- This SHOULD be a build number. --> |
diff --git a/nextstep/templates/InfoPlist.strings.in b/nextstep/templates/InfoPlist.strings.in new file mode 100644 index 00000000000..f38d8925017 --- /dev/null +++ b/nextstep/templates/InfoPlist.strings.in | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | /* Localized versions of Info.plist keys */ | ||
| 2 | |||
| 3 | CFBundleName = "Emacs"; | ||
| 4 | CFBundleShortVersionString = "Version @version@"; | ||
| 5 | CFBundleGetInfoString = "Emacs version @version@, NS Windowing"; | ||
| 6 | NSHumanReadableCopyright = "@copyright@"; | ||
diff --git a/nt/ChangeLog b/nt/ChangeLog index fd528315e2a..106f0e91695 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2012-09-17 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * config.nt: Sync with autogen/config.in. | ||
| 4 | (BROKEN_SA_RESTART, SYNC_INPUT): Remove. | ||
| 5 | |||
| 6 | 2012-09-17 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * config.nt (COPYRIGHT): New. | ||
| 9 | |||
| 10 | 2012-09-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 11 | |||
| 12 | Port _setjmp fix to POSIXish hosts as well as Microsoft. | ||
| 13 | * config.nt: Attempt to sync with autogen/config.in. | ||
| 14 | (HAVE_SIGSETJMP, HAVE__SETJMP): New macros. | ||
| 15 | (_longjmp, _setjmp): Remove. | ||
| 16 | |||
| 17 | 2012-09-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 18 | |||
| 19 | * config.nt: Sync with autogen/config.in. | ||
| 20 | (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL) | ||
| 21 | (BROKEN_SIGPTY, HAVE_CBRT, HAVE_LOGB, NO_TERMIO): Remove. | ||
| 22 | (USABLE_FIONREAD, USABLE_SIGIO): New macros. | ||
| 23 | |||
| 24 | 2012-09-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 25 | |||
| 26 | * config.nt: Sync with autogen/config.in. | ||
| 27 | (FLOAT_CHECK_DOMAIN, HAVE_FMOD, HAVE_FREXP) | ||
| 28 | (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove. | ||
| 29 | |||
| 1 | 2012-09-08 Eli Zaretskii <eliz@gnu.org> | 30 | 2012-09-08 Eli Zaretskii <eliz@gnu.org> |
| 2 | 31 | ||
| 3 | * configure.bat <use_extensions>: Don't leave it set in the | 32 | * configure.bat <use_extensions>: Don't leave it set in the |
diff --git a/nt/config.nt b/nt/config.nt index 5dc171bae44..23b33731a36 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -54,9 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 54 | /* Define to the number of bits in type 'wint_t'. */ | 54 | /* Define to the number of bits in type 'wint_t'. */ |
| 55 | #undef BITSIZEOF_WINT_T | 55 | #undef BITSIZEOF_WINT_T |
| 56 | 56 | ||
| 57 | /* Define if FIONREAD should not be used. */ | ||
| 58 | #undef BROKEN_FIONREAD | ||
| 59 | |||
| 60 | /* Define if getwd should not be used. */ | 57 | /* Define if getwd should not be used. */ |
| 61 | #undef BROKEN_GETWD | 58 | #undef BROKEN_GETWD |
| 62 | 59 | ||
| @@ -66,21 +63,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 66 | /* Define on FreeBSD to work around an issue when reading from a PTY. */ | 63 | /* Define on FreeBSD to work around an issue when reading from a PTY. */ |
| 67 | #undef BROKEN_PTY_READ_AFTER_EAGAIN | 64 | #undef BROKEN_PTY_READ_AFTER_EAGAIN |
| 68 | 65 | ||
| 69 | /* Define if SA_RESTART should only be used in batch mode. */ | ||
| 70 | #undef BROKEN_SA_RESTART | ||
| 71 | |||
| 72 | /* Define if SIGAIO should not be used. */ | ||
| 73 | #undef BROKEN_SIGAIO | ||
| 74 | |||
| 75 | /* Define if SIGIO should not be used. */ | ||
| 76 | #undef BROKEN_SIGIO | ||
| 77 | |||
| 78 | /* Define if SIGPOLL should not be used. */ | ||
| 79 | #undef BROKEN_SIGPOLL | ||
| 80 | |||
| 81 | /* Define if SIGPTY should not be used. */ | ||
| 82 | #undef BROKEN_SIGPTY | ||
| 83 | |||
| 84 | /* Define if the system is compatible with BSD 4.2. */ | 66 | /* Define if the system is compatible with BSD 4.2. */ |
| 85 | #undef BSD4_2 | 67 | #undef BSD4_2 |
| 86 | 68 | ||
| @@ -101,6 +83,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 101 | his/her Emacs. */ | 83 | his/her Emacs. */ |
| 102 | #undef CLASH_DETECTION | 84 | #undef CLASH_DETECTION |
| 103 | 85 | ||
| 86 | /* Short copyright string for this version of Emacs. */ | ||
| 87 | #define COPYRIGHT "Copyright (C) 2012 Free Software Foundation, Inc." | ||
| 88 | |||
| 104 | /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP | 89 | /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP |
| 105 | systems. This function is required for 'alloca.c' support on those systems. | 90 | systems. This function is required for 'alloca.c' support on those systems. |
| 106 | */ | 91 | */ |
| @@ -161,10 +146,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 161 | */ | 146 | */ |
| 162 | #define FIRST_PTY_LETTER 'a' | 147 | #define FIRST_PTY_LETTER 'a' |
| 163 | 148 | ||
| 164 | /* Define if the float library doesn't handle errors by either setting errno, | ||
| 165 | or signaling SIGFPE. */ | ||
| 166 | #undef FLOAT_CHECK_DOMAIN | ||
| 167 | |||
| 168 | /* Enable compile-time and run-time bounds-checking, and some warnings, | 149 | /* Enable compile-time and run-time bounds-checking, and some warnings, |
| 169 | without upsetting glibc 2.15+. */ | 150 | without upsetting glibc 2.15+. */ |
| 170 | #if defined __OPTIMIZE__ && __OPTIMIZE__ | 151 | #if defined __OPTIMIZE__ && __OPTIMIZE__ |
| @@ -256,9 +237,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 256 | /* Define to 1 if strtold conforms to C99. */ | 237 | /* Define to 1 if strtold conforms to C99. */ |
| 257 | #undef HAVE_C99_STRTOLD | 238 | #undef HAVE_C99_STRTOLD |
| 258 | 239 | ||
| 259 | /* Define to 1 if you have the `cbrt' function. */ | ||
| 260 | #undef HAVE_CBRT | ||
| 261 | |||
| 262 | /* Define to 1 if you have the `cfmakeraw' function. */ | 240 | /* Define to 1 if you have the `cfmakeraw' function. */ |
| 263 | #undef HAVE_CFMAKERAW | 241 | #undef HAVE_CFMAKERAW |
| 264 | 242 | ||
| @@ -377,9 +355,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 377 | /* Define to 1 if you have the <fcntl.h> header file. */ | 355 | /* Define to 1 if you have the <fcntl.h> header file. */ |
| 378 | #undef HAVE_FCNTL_H | 356 | #undef HAVE_FCNTL_H |
| 379 | 357 | ||
| 380 | /* Define to 1 if you have the `fmod' function. */ | ||
| 381 | #define HAVE_FMOD 1 | ||
| 382 | |||
| 383 | /* Define to 1 if you have the `fork' function. */ | 358 | /* Define to 1 if you have the `fork' function. */ |
| 384 | #undef HAVE_FORK | 359 | #undef HAVE_FORK |
| 385 | 360 | ||
| @@ -392,9 +367,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 392 | /* Define to 1 if using the freetype and fontconfig libraries. */ | 367 | /* Define to 1 if using the freetype and fontconfig libraries. */ |
| 393 | #undef HAVE_FREETYPE | 368 | #undef HAVE_FREETYPE |
| 394 | 369 | ||
| 395 | /* Define to 1 if you have the `frexp' function. */ | ||
| 396 | #define HAVE_FREXP 1 | ||
| 397 | |||
| 398 | /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ | 370 | /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ |
| 399 | #undef HAVE_FSEEKO | 371 | #undef HAVE_FSEEKO |
| 400 | 372 | ||
| @@ -549,9 +521,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 549 | /* Define to 1 if you have the <inttypes.h> header file. */ | 521 | /* Define to 1 if you have the <inttypes.h> header file. */ |
| 550 | #undef HAVE_INTTYPES_H | 522 | #undef HAVE_INTTYPES_H |
| 551 | 523 | ||
| 552 | /* Define if you have the functions acosh, asinh, and atanh. */ | ||
| 553 | #undef HAVE_INVERSE_HYPERBOLIC | ||
| 554 | |||
| 555 | /* Define to 1 if you have the jpeg library (-ljpeg). */ | 524 | /* Define to 1 if you have the jpeg library (-ljpeg). */ |
| 556 | #undef HAVE_JPEG | 525 | #undef HAVE_JPEG |
| 557 | 526 | ||
| @@ -660,9 +629,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 660 | /* Define to 1 if you have the `localtime_r' function. */ | 629 | /* Define to 1 if you have the `localtime_r' function. */ |
| 661 | #undef HAVE_LOCALTIME_R | 630 | #undef HAVE_LOCALTIME_R |
| 662 | 631 | ||
| 663 | /* Define to 1 if you have the `logb' function. */ | ||
| 664 | #define HAVE_LOGB 1 | ||
| 665 | |||
| 666 | /* Define to 1 if you support file names longer than 14 characters. */ | 632 | /* Define to 1 if you support file names longer than 14 characters. */ |
| 667 | #define HAVE_LONG_FILE_NAMES 1 | 633 | #define HAVE_LONG_FILE_NAMES 1 |
| 668 | 634 | ||
| @@ -834,6 +800,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 834 | /* Define to 1 if 'wint_t' is a signed integer type. */ | 800 | /* Define to 1 if 'wint_t' is a signed integer type. */ |
| 835 | #undef HAVE_SIGNED_WINT_T | 801 | #undef HAVE_SIGNED_WINT_T |
| 836 | 802 | ||
| 803 | /* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is | ||
| 804 | irrelevant if HAVE__SETJMP is defined. */ | ||
| 805 | #undef HAVE_SIGSETJMP | ||
| 806 | |||
| 837 | /* Define to 1 if the system has the type `sigset_t'. */ | 807 | /* Define to 1 if the system has the type `sigset_t'. */ |
| 838 | #undef HAVE_SIGSET_T | 808 | #undef HAVE_SIGSET_T |
| 839 | 809 | ||
| @@ -1118,6 +1088,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1118 | /* Define to 1 if you have the `_ftime' function. */ | 1088 | /* Define to 1 if you have the `_ftime' function. */ |
| 1119 | #undef HAVE__FTIME | 1089 | #undef HAVE__FTIME |
| 1120 | 1090 | ||
| 1091 | /* Define to 1 if _setjmp and _longjmp work. */ | ||
| 1092 | #define HAVE__SETJMP 1 | ||
| 1093 | |||
| 1121 | /* Define to 1 if you have the `__builtin_unwind_init' function. */ | 1094 | /* Define to 1 if you have the `__builtin_unwind_init' function. */ |
| 1122 | #undef HAVE___BUILTIN_UNWIND_INIT | 1095 | #undef HAVE___BUILTIN_UNWIND_INIT |
| 1123 | 1096 | ||
| @@ -1192,15 +1165,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1192 | /* Define if XEditRes should not be used. */ | 1165 | /* Define if XEditRes should not be used. */ |
| 1193 | #undef NO_EDITRES | 1166 | #undef NO_EDITRES |
| 1194 | 1167 | ||
| 1195 | /* Define to 1 if you don't have struct exception in math.h. */ | ||
| 1196 | #define NO_MATHERR 1 | ||
| 1197 | |||
| 1198 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ | 1168 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ |
| 1199 | #undef NO_MINUS_C_MINUS_O | 1169 | #undef NO_MINUS_C_MINUS_O |
| 1200 | 1170 | ||
| 1201 | /* Define if termio.h should not be included. */ | ||
| 1202 | #undef NO_TERMIO | ||
| 1203 | |||
| 1204 | /* Minimum value of NSIG. */ | 1171 | /* Minimum value of NSIG. */ |
| 1205 | #undef NSIG_MINIMUM | 1172 | #undef NSIG_MINIMUM |
| 1206 | 1173 | ||
| @@ -1338,9 +1305,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1338 | /* Define to 1 on System V Release 4. */ | 1305 | /* Define to 1 on System V Release 4. */ |
| 1339 | #undef SVR4 | 1306 | #undef SVR4 |
| 1340 | 1307 | ||
| 1341 | /* Process async input synchronously. */ | ||
| 1342 | #undef SYNC_INPUT | ||
| 1343 | |||
| 1344 | /* Define to use system malloc. */ | 1308 | /* Define to use system malloc. */ |
| 1345 | #undef SYSTEM_MALLOC | 1309 | #undef SYSTEM_MALLOC |
| 1346 | 1310 | ||
| @@ -1385,6 +1349,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1385 | /* Define if the system has Unix98 PTYs. */ | 1349 | /* Define if the system has Unix98 PTYs. */ |
| 1386 | #undef UNIX98_PTYS | 1350 | #undef UNIX98_PTYS |
| 1387 | 1351 | ||
| 1352 | /* Define to 1 if FIONREAD is usable. */ | ||
| 1353 | #define USABLE_FIONREAD 1 | ||
| 1354 | |||
| 1355 | /* Define to 1 if SIGIO is usable. */ | ||
| 1356 | #undef USABLE_SIGIO | ||
| 1357 | |||
| 1388 | /* How to get a user's full name. */ | 1358 | /* How to get a user's full name. */ |
| 1389 | #define USER_FULL_NAME pw->pw_gecos | 1359 | #define USER_FULL_NAME pw->pw_gecos |
| 1390 | 1360 | ||
| @@ -1545,14 +1515,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1545 | declarations. Define as empty for no equivalent. */ | 1515 | declarations. Define as empty for no equivalent. */ |
| 1546 | #undef __restrict_arr | 1516 | #undef __restrict_arr |
| 1547 | 1517 | ||
| 1548 | /* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may | ||
| 1549 | alter signal masks, callers of _longjmp should not assume that it leaves | ||
| 1550 | signal masks alone. */ | ||
| 1551 | #undef _longjmp | ||
| 1552 | |||
| 1553 | /* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ | ||
| 1554 | #undef _setjmp | ||
| 1555 | |||
| 1556 | /* Some platforms that do not use configure define this to include extra | 1518 | /* Some platforms that do not use configure define this to include extra |
| 1557 | configuration information. */ | 1519 | configuration information. */ |
| 1558 | #define config_opsysfile <ms-w32.h> | 1520 | #define config_opsysfile <ms-w32.h> |
diff --git a/src/Makefile.in b/src/Makefile.in index a84fdd1caf8..cdae2c89fa1 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -264,9 +264,6 @@ MSDOS_OBJ = | |||
| 264 | ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. | 264 | ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. |
| 265 | MSDOS_X_OBJ = | 265 | MSDOS_X_OBJ = |
| 266 | 266 | ||
| 267 | ns_appdir=@ns_appdir@ | ||
| 268 | ns_appbindir=@ns_appbindir@ | ||
| 269 | ns_appsrc=@ns_appsrc@ | ||
| 270 | NS_OBJ=@NS_OBJ@ | 267 | NS_OBJ=@NS_OBJ@ |
| 271 | ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS. | 268 | ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS. |
| 272 | NS_OBJC_OBJ=@NS_OBJC_OBJ@ | 269 | NS_OBJC_OBJ=@NS_OBJC_OBJ@ |
| @@ -514,8 +511,9 @@ $(OLDXMENU): $(OLDXMENU_TARGET) | |||
| 514 | doc.o: buildobj.h | 511 | doc.o: buildobj.h |
| 515 | 512 | ||
| 516 | 513 | ||
| 517 | ## If HAVE_NS, some ns-specific rules (for OTHER_FILES) are inserted here. | 514 | ns-app: emacs$(EXEEXT) |
| 518 | @ns_frag@ | 515 | cd ../nextstep && $(MAKE) $(MFLAGS) all |
| 516 | |||
| 519 | 517 | ||
| 520 | .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean | 518 | .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean |
| 521 | .PHONY: versionclean extraclean frc | 519 | .PHONY: versionclean extraclean frc |
| @@ -529,7 +527,6 @@ mostlyclean: | |||
| 529 | clean: mostlyclean | 527 | clean: mostlyclean |
| 530 | rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) | 528 | rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) |
| 531 | -rm -rf $(DEPDIR) | 529 | -rm -rf $(DEPDIR) |
| 532 | test "X$(ns_appdir)" = "X" || rm -rf $(ns_appdir) | ||
| 533 | 530 | ||
| 534 | ## bootstrap-clean is used to clean up just before a bootstrap. | 531 | ## bootstrap-clean is used to clean up just before a bootstrap. |
| 535 | ## It should remove all files generated during a compilation/bootstrap, | 532 | ## It should remove all files generated during a compilation/bootstrap, |
diff --git a/src/atimer.c b/src/atimer.c index 34731920af5..5dbd807872a 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -18,7 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <stdio.h> | 20 | #include <stdio.h> |
| 21 | #include <setjmp.h> | 21 | |
| 22 | #include "lisp.h" | 22 | #include "lisp.h" |
| 23 | #include "syssignal.h" | 23 | #include "syssignal.h" |
| 24 | #include "systime.h" | 24 | #include "systime.h" |
| @@ -369,7 +369,6 @@ run_timers (void) | |||
| 369 | if (! atimers) | 369 | if (! atimers) |
| 370 | pending_atimers = 0; | 370 | pending_atimers = 0; |
| 371 | 371 | ||
| 372 | #ifdef SYNC_INPUT | ||
| 373 | if (pending_atimers) | 372 | if (pending_atimers) |
| 374 | pending_signals = 1; | 373 | pending_signals = 1; |
| 375 | else | 374 | else |
| @@ -377,10 +376,6 @@ run_timers (void) | |||
| 377 | pending_signals = interrupt_input_pending; | 376 | pending_signals = interrupt_input_pending; |
| 378 | set_alarm (); | 377 | set_alarm (); |
| 379 | } | 378 | } |
| 380 | #else | ||
| 381 | if (! pending_atimers) | ||
| 382 | set_alarm (); | ||
| 383 | #endif | ||
| 384 | } | 379 | } |
| 385 | 380 | ||
| 386 | 381 | ||
| @@ -391,11 +386,7 @@ static void | |||
| 391 | handle_alarm_signal (int sig) | 386 | handle_alarm_signal (int sig) |
| 392 | { | 387 | { |
| 393 | pending_atimers = 1; | 388 | pending_atimers = 1; |
| 394 | #ifdef SYNC_INPUT | ||
| 395 | pending_signals = 1; | 389 | pending_signals = 1; |
| 396 | #else | ||
| 397 | run_timers (); | ||
| 398 | #endif | ||
| 399 | } | 390 | } |
| 400 | 391 | ||
| 401 | static void | 392 | static void |
diff --git a/src/bidi.c b/src/bidi.c index 4186a46e19e..af0209565e2 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -56,7 +56,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 56 | 56 | ||
| 57 | #include <config.h> | 57 | #include <config.h> |
| 58 | #include <stdio.h> | 58 | #include <stdio.h> |
| 59 | #include <setjmp.h> | ||
| 60 | 59 | ||
| 61 | #include "lisp.h" | 60 | #include "lisp.h" |
| 62 | #include "character.h" | 61 | #include "character.h" |
diff --git a/src/blockinput.h b/src/blockinput.h index 3f61b2b27b9..7501bfc91a0 100644 --- a/src/blockinput.h +++ b/src/blockinput.h | |||
| @@ -67,15 +67,10 @@ extern int pending_atimers; | |||
| 67 | If doing signal-driven input, and a signal came in when input was | 67 | If doing signal-driven input, and a signal came in when input was |
| 68 | blocked, reinvoke the signal handler now to deal with it. | 68 | blocked, reinvoke the signal handler now to deal with it. |
| 69 | 69 | ||
| 70 | We used to have two possible definitions of this macro - one for | 70 | Always test interrupt_input_pending; that's not too expensive, and |
| 71 | when SIGIO was #defined, and one for when it wasn't; when SIGIO | 71 | it'll never get set if we don't need to resignal. This is simpler |
| 72 | wasn't #defined, we wouldn't bother to check if we should re-invoke | 72 | than dealing here with every configuration option that might affect |
| 73 | the signal handler. But that doesn't work very well; some of the | 73 | whether interrupt_input_pending can be nonzero. */ |
| 74 | files which use this macro don't #include the right files to get | ||
| 75 | SIGIO. | ||
| 76 | |||
| 77 | So, we always test interrupt_input_pending now; that's not too | ||
| 78 | expensive, and it'll never get set if we don't need to resignal. */ | ||
| 79 | 74 | ||
| 80 | #define UNBLOCK_INPUT \ | 75 | #define UNBLOCK_INPUT \ |
| 81 | do \ | 76 | do \ |
diff --git a/src/buffer.c b/src/buffer.c index d512547d34e..b020edb9962 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <sys/param.h> | 26 | #include <sys/param.h> |
| 27 | #include <errno.h> | 27 | #include <errno.h> |
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <setjmp.h> | ||
| 30 | #include <unistd.h> | 29 | #include <unistd.h> |
| 31 | 30 | ||
| 32 | #include <verify.h> | 31 | #include <verify.h> |
diff --git a/src/bytecode.c b/src/bytecode.c index 97730636d0e..5f4fdcc5eff 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -33,7 +33,7 @@ by Hallvard: | |||
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | #include <config.h> | 35 | #include <config.h> |
| 36 | #include <setjmp.h> | 36 | |
| 37 | #include "lisp.h" | 37 | #include "lisp.h" |
| 38 | #include "character.h" | 38 | #include "character.h" |
| 39 | #include "buffer.h" | 39 | #include "buffer.h" |
| @@ -458,7 +458,8 @@ unmark_byte_stack (void) | |||
| 458 | Fsignal (Qquit, Qnil); \ | 458 | Fsignal (Qquit, Qnil); \ |
| 459 | AFTER_POTENTIAL_GC (); \ | 459 | AFTER_POTENTIAL_GC (); \ |
| 460 | } \ | 460 | } \ |
| 461 | ELSE_PENDING_SIGNALS \ | 461 | else if (pending_signals) \ |
| 462 | process_pending_signals (); \ | ||
| 462 | } while (0) | 463 | } while (0) |
| 463 | 464 | ||
| 464 | 465 | ||
diff --git a/src/callint.c b/src/callint.c index b11545ddea2..c4c087e83d7 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | ||
| 23 | 22 | ||
| 24 | #include "lisp.h" | 23 | #include "lisp.h" |
| 25 | #include "character.h" | 24 | #include "character.h" |
diff --git a/src/callproc.c b/src/callproc.c index a92959a1559..2604d295f3e 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <errno.h> | 22 | #include <errno.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | #include <sys/types.h> | 24 | #include <sys/types.h> |
| 26 | #include <unistd.h> | 25 | #include <unistd.h> |
| 27 | 26 | ||
| @@ -497,11 +496,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 497 | register char **save_environ = environ; | 496 | register char **save_environ = environ; |
| 498 | register int fd1 = fd[1]; | 497 | register int fd1 = fd[1]; |
| 499 | int fd_error = fd1; | 498 | int fd_error = fd1; |
| 500 | #ifdef HAVE_WORKING_VFORK | ||
| 501 | sigset_t procmask; | ||
| 502 | sigset_t blocked; | ||
| 503 | struct sigaction sigpipe_action; | ||
| 504 | #endif | ||
| 505 | 499 | ||
| 506 | if (fd_output >= 0) | 500 | if (fd_output >= 0) |
| 507 | fd1 = fd_output; | 501 | fd1 = fd_output; |
| @@ -588,17 +582,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 588 | 0, current_dir); | 582 | 0, current_dir); |
| 589 | #else /* not WINDOWSNT */ | 583 | #else /* not WINDOWSNT */ |
| 590 | 584 | ||
| 591 | #ifdef HAVE_WORKING_VFORK | ||
| 592 | /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal', | ||
| 593 | this sets the parent's signal handlers as well as the child's. | ||
| 594 | So delay all interrupts whose handlers the child might munge, | ||
| 595 | and record the current handlers so they can be restored later. */ | ||
| 596 | sigemptyset (&blocked); | ||
| 597 | sigaddset (&blocked, SIGPIPE); | ||
| 598 | sigaction (SIGPIPE, 0, &sigpipe_action); | ||
| 599 | pthread_sigmask (SIG_BLOCK, &blocked, &procmask); | ||
| 600 | #endif | ||
| 601 | |||
| 602 | BLOCK_INPUT; | 585 | BLOCK_INPUT; |
| 603 | 586 | ||
| 604 | /* vfork, and prevent local vars from being clobbered by the vfork. */ | 587 | /* vfork, and prevent local vars from being clobbered by the vfork. */ |
| @@ -646,9 +629,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 646 | /* GConf causes us to ignore SIGPIPE, make sure it is restored | 629 | /* GConf causes us to ignore SIGPIPE, make sure it is restored |
| 647 | in the child. */ | 630 | in the child. */ |
| 648 | signal (SIGPIPE, SIG_DFL); | 631 | signal (SIGPIPE, SIG_DFL); |
| 649 | #ifdef HAVE_WORKING_VFORK | ||
| 650 | pthread_sigmask (SIG_SETMASK, &procmask, 0); | ||
| 651 | #endif | ||
| 652 | 632 | ||
| 653 | child_setup (filefd, fd1, fd_error, (char **) new_argv, | 633 | child_setup (filefd, fd1, fd_error, (char **) new_argv, |
| 654 | 0, current_dir); | 634 | 0, current_dir); |
| @@ -656,12 +636,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 656 | 636 | ||
| 657 | UNBLOCK_INPUT; | 637 | UNBLOCK_INPUT; |
| 658 | 638 | ||
| 659 | #ifdef HAVE_WORKING_VFORK | ||
| 660 | /* Restore the signal state. */ | ||
| 661 | sigaction (SIGPIPE, &sigpipe_action, 0); | ||
| 662 | pthread_sigmask (SIG_SETMASK, &procmask, 0); | ||
| 663 | #endif | ||
| 664 | |||
| 665 | #endif /* not WINDOWSNT */ | 639 | #endif /* not WINDOWSNT */ |
| 666 | 640 | ||
| 667 | /* The MSDOS case did this already. */ | 641 | /* The MSDOS case did this already. */ |
diff --git a/src/casefiddle.c b/src/casefiddle.c index 1102054b153..e3654627576 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "character.h" | 24 | #include "character.h" |
| 25 | #include "buffer.h" | 25 | #include "buffer.h" |
diff --git a/src/casetab.c b/src/casetab.c index 3e22d0d0b77..a84bc9202d0 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License | |||
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "character.h" | 24 | #include "character.h" |
| 25 | #include "buffer.h" | 25 | #include "buffer.h" |
diff --git a/src/category.c b/src/category.c index 80dc6938d8b..01a6f54ad17 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -32,7 +32,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | 32 | ||
| 33 | #define CATEGORY_INLINE EXTERN_INLINE | 33 | #define CATEGORY_INLINE EXTERN_INLINE |
| 34 | 34 | ||
| 35 | #include <setjmp.h> | ||
| 36 | #include "lisp.h" | 35 | #include "lisp.h" |
| 37 | #include "character.h" | 36 | #include "character.h" |
| 38 | #include "buffer.h" | 37 | #include "buffer.h" |
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <config.h> | 26 | #include <config.h> |
| 27 | 27 | ||
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <setjmp.h> | ||
| 30 | #include <limits.h> | 29 | #include <limits.h> |
| 31 | 30 | ||
| 32 | #include "lisp.h" | 31 | #include "lisp.h" |
diff --git a/src/character.c b/src/character.c index 37963d1878c..def1ad090fd 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -36,7 +36,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 36 | #ifdef emacs | 36 | #ifdef emacs |
| 37 | 37 | ||
| 38 | #include <sys/types.h> | 38 | #include <sys/types.h> |
| 39 | #include <setjmp.h> | ||
| 40 | #include <intprops.h> | 39 | #include <intprops.h> |
| 41 | #include "lisp.h" | 40 | #include "lisp.h" |
| 42 | #include "character.h" | 41 | #include "character.h" |
diff --git a/src/charset.c b/src/charset.c index 972a0598059..d8c38e5ea3b 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -32,7 +32,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | #include <unistd.h> | 32 | #include <unistd.h> |
| 33 | #include <limits.h> | 33 | #include <limits.h> |
| 34 | #include <sys/types.h> | 34 | #include <sys/types.h> |
| 35 | #include <setjmp.h> | ||
| 36 | #include <c-ctype.h> | 35 | #include <c-ctype.h> |
| 37 | #include "lisp.h" | 36 | #include "lisp.h" |
| 38 | #include "character.h" | 37 | #include "character.h" |
diff --git a/src/chartab.c b/src/chartab.c index c14df0ebac6..e864514e336 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License | |||
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "character.h" | 24 | #include "character.h" |
| 25 | #include "charset.h" | 25 | #include "charset.h" |
| @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <setjmp.h> | ||
| 24 | 23 | ||
| 25 | #include "lisp.h" | 24 | #include "lisp.h" |
| 26 | #include "frame.h" | 25 | #include "frame.h" |
diff --git a/src/cmds.c b/src/cmds.c index 90d3cd6dced..45f7df948ae 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "commands.h" | 24 | #include "commands.h" |
| 25 | #include "character.h" | 25 | #include "character.h" |
diff --git a/src/coding.c b/src/coding.c index 94a2d9fea80..4b3d22f956c 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -285,7 +285,6 @@ encode_coding_XXX (struct coding_system *coding) | |||
| 285 | 285 | ||
| 286 | #include <config.h> | 286 | #include <config.h> |
| 287 | #include <stdio.h> | 287 | #include <stdio.h> |
| 288 | #include <setjmp.h> | ||
| 289 | 288 | ||
| 290 | #include "lisp.h" | 289 | #include "lisp.h" |
| 291 | #include "character.h" | 290 | #include "character.h" |
diff --git a/src/composite.c b/src/composite.c index eddabb66d33..ae46df0a573 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | 26 | ||
| 27 | #define COMPOSITE_INLINE EXTERN_INLINE | 27 | #define COMPOSITE_INLINE EXTERN_INLINE |
| 28 | 28 | ||
| 29 | #include <setjmp.h> | ||
| 30 | #include "lisp.h" | 29 | #include "lisp.h" |
| 31 | #include "character.h" | 30 | #include "character.h" |
| 32 | #include "buffer.h" | 31 | #include "buffer.h" |
diff --git a/src/conf_post.h b/src/conf_post.h index 1bf40af260b..0c4d029bc5d 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -90,7 +90,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 90 | char *_getpty(); | 90 | char *_getpty(); |
| 91 | #endif | 91 | #endif |
| 92 | 92 | ||
| 93 | #undef SA_RESTART /* not the same as defining BROKEN_SA_RESTART */ | ||
| 94 | #endif /* IRIX6_5 */ | 93 | #endif /* IRIX6_5 */ |
| 95 | 94 | ||
| 96 | #ifdef MSDOS | 95 | #ifdef MSDOS |
| @@ -133,22 +132,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 133 | #endif | 132 | #endif |
| 134 | #endif /* MSDOS */ | 133 | #endif /* MSDOS */ |
| 135 | 134 | ||
| 136 | #ifdef USG5_4 | ||
| 137 | /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars. | ||
| 138 | But get <termio.h> first to make sure ttold.h doesn't interfere. */ | ||
| 139 | #include <sys/wait.h> | ||
| 140 | |||
| 141 | #ifdef emacs | ||
| 142 | #include <sys/filio.h> | ||
| 143 | #include <termio.h> | ||
| 144 | #include <sys/ttold.h> | ||
| 145 | #include <signal.h> | ||
| 146 | #include <sys/stream.h> | ||
| 147 | #include <sys/stropts.h> | ||
| 148 | #include <sys/termios.h> | ||
| 149 | #endif | ||
| 150 | #endif /* USG5_4 */ | ||
| 151 | |||
| 152 | /* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs, | 135 | /* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs, |
| 153 | SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ | 136 | SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ |
| 154 | #ifdef HAVE_NS | 137 | #ifdef HAVE_NS |
diff --git a/src/data.c b/src/data.c index 5d7f036b70d..72d7c8ccf9a 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <setjmp.h> | ||
| 24 | 23 | ||
| 25 | #include <intprops.h> | 24 | #include <intprops.h> |
| 26 | 25 | ||
diff --git a/src/dbusbind.c b/src/dbusbind.c index 901820648cb..c2eefd605bb 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #ifdef HAVE_DBUS | 21 | #ifdef HAVE_DBUS |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <dbus/dbus.h> | 23 | #include <dbus/dbus.h> |
| 24 | #include <setjmp.h> | 24 | |
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "frame.h" | 26 | #include "frame.h" |
| 27 | #include "termhooks.h" | 27 | #include "termhooks.h" |
diff --git a/src/dired.c b/src/dired.c index 9af5f76821b..3aa27ecf920 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
| 24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
| 25 | #include <setjmp.h> | ||
| 26 | 25 | ||
| 27 | #ifdef HAVE_PWD_H | 26 | #ifdef HAVE_PWD_H |
| 28 | #include <pwd.h> | 27 | #include <pwd.h> |
diff --git a/src/dispextern.h b/src/dispextern.h index 11243d23db9..6f5cd55504b 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3221,6 +3221,7 @@ void unrequest_sigio (void); | |||
| 3221 | int tabs_safe_p (int); | 3221 | int tabs_safe_p (int); |
| 3222 | void init_baud_rate (int); | 3222 | void init_baud_rate (int); |
| 3223 | void init_sigio (int); | 3223 | void init_sigio (int); |
| 3224 | void ignore_sigio (void); | ||
| 3224 | 3225 | ||
| 3225 | /* Defined in xfaces.c */ | 3226 | /* Defined in xfaces.c */ |
| 3226 | 3227 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index bc9141a575d..9cc7349f1b0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #define DISPEXTERN_INLINE EXTERN_INLINE | 21 | #define DISPEXTERN_INLINE EXTERN_INLINE |
| 22 | 22 | ||
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | #include <unistd.h> | 24 | #include <unistd.h> |
| 26 | 25 | ||
| 27 | #include "lisp.h" | 26 | #include "lisp.h" |
| @@ -5982,7 +5981,7 @@ sit_for (Lisp_Object timeout, bool reading, int do_display) | |||
| 5982 | wrong_type_argument (Qnumberp, timeout); | 5981 | wrong_type_argument (Qnumberp, timeout); |
| 5983 | 5982 | ||
| 5984 | 5983 | ||
| 5985 | #ifdef SIGIO | 5984 | #ifdef USABLE_SIGIO |
| 5986 | gobble_input (0); | 5985 | gobble_input (0); |
| 5987 | #endif | 5986 | #endif |
| 5988 | 5987 | ||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
| 24 | #include <sys/file.h> /* Must be after sys/types.h for USG*/ | 24 | #include <sys/file.h> /* Must be after sys/types.h for USG*/ |
| 25 | #include <setjmp.h> | ||
| 26 | #include <fcntl.h> | 25 | #include <fcntl.h> |
| 27 | #include <unistd.h> | 26 | #include <unistd.h> |
| 28 | 27 | ||
diff --git a/src/doprnt.c b/src/doprnt.c index 3b7391f07d4..caa56d6ae88 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -102,7 +102,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 102 | 102 | ||
| 103 | #include <config.h> | 103 | #include <config.h> |
| 104 | #include <stdio.h> | 104 | #include <stdio.h> |
| 105 | #include <setjmp.h> | ||
| 106 | #include <float.h> | 105 | #include <float.h> |
| 107 | #include <unistd.h> | 106 | #include <unistd.h> |
| 108 | #include <limits.h> | 107 | #include <limits.h> |
diff --git a/src/dosfns.c b/src/dosfns.c index 21676f4b4f5..3c649f4d534 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #include <dos.h> | 30 | #include <dos.h> |
| 31 | #undef gettime | 31 | #undef gettime |
| 32 | #undef settime | 32 | #undef settime |
| 33 | #include <setjmp.h> | 33 | |
| 34 | #include "lisp.h" | 34 | #include "lisp.h" |
| 35 | #include "character.h" | 35 | #include "character.h" |
| 36 | #include "buffer.h" | 36 | #include "buffer.h" |
diff --git a/src/editfns.c b/src/editfns.c index 299cad07fd7..c6744648bc5 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <sys/types.h> | 22 | #include <sys/types.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | 24 | ||
| 26 | #ifdef HAVE_PWD_H | 25 | #ifdef HAVE_PWD_H |
| 27 | #include <pwd.h> | 26 | #include <pwd.h> |
diff --git a/src/emacs.c b/src/emacs.c index d0e2f1e021d..7e4f25abe6e 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | 25 | ||
| 26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
| 27 | #include <sys/file.h> | 27 | #include <sys/file.h> |
| 28 | #include <setjmp.h> | ||
| 29 | #include <unistd.h> | 28 | #include <unistd.h> |
| 30 | 29 | ||
| 31 | #include "lisp.h" | 30 | #include "lisp.h" |
| @@ -92,7 +91,7 @@ extern void moncontrol (int mode); | |||
| 92 | #endif | 91 | #endif |
| 93 | 92 | ||
| 94 | static const char emacs_version[] = VERSION; | 93 | static const char emacs_version[] = VERSION; |
| 95 | static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; | 94 | static const char emacs_copyright[] = COPYRIGHT; |
| 96 | 95 | ||
| 97 | /* Empty lisp strings. To avoid having to build any others. */ | 96 | /* Empty lisp strings. To avoid having to build any others. */ |
| 98 | Lisp_Object empty_unibyte_string, empty_multibyte_string; | 97 | Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| @@ -852,14 +851,10 @@ main (int argc, char **argv) | |||
| 852 | /* Arrange to get warning messages as memory fills up. */ | 851 | /* Arrange to get warning messages as memory fills up. */ |
| 853 | memory_warnings (0, malloc_warning); | 852 | memory_warnings (0, malloc_warning); |
| 854 | 853 | ||
| 855 | /* Call malloc at least once, to run the initial __malloc_hook. | 854 | /* Call malloc at least once, to run malloc_initialize_hook. |
| 856 | Also call realloc and free for consistency. */ | 855 | Also call realloc and free for consistency. */ |
| 857 | free (realloc (malloc (4), 4)); | 856 | free (realloc (malloc (4), 4)); |
| 858 | 857 | ||
| 859 | # ifndef SYNC_INPUT | ||
| 860 | /* Arrange to disable interrupt input inside malloc etc. */ | ||
| 861 | uninterrupt_malloc (); | ||
| 862 | # endif /* not SYNC_INPUT */ | ||
| 863 | #endif /* not SYSTEM_MALLOC */ | 858 | #endif /* not SYSTEM_MALLOC */ |
| 864 | 859 | ||
| 865 | #if defined (MSDOS) || defined (WINDOWSNT) | 860 | #if defined (MSDOS) || defined (WINDOWSNT) |
| @@ -2041,12 +2036,10 @@ shut_down_emacs (int sig, Lisp_Object stuff) | |||
| 2041 | unlock_all_files (); | 2036 | unlock_all_files (); |
| 2042 | #endif | 2037 | #endif |
| 2043 | 2038 | ||
| 2044 | #ifdef SIGIO | ||
| 2045 | /* There is a tendency for a SIGIO signal to arrive within exit, | 2039 | /* There is a tendency for a SIGIO signal to arrive within exit, |
| 2046 | and cause a SIGHUP because the input descriptor is already closed. */ | 2040 | and cause a SIGHUP because the input descriptor is already closed. */ |
| 2047 | unrequest_sigio (); | 2041 | unrequest_sigio (); |
| 2048 | signal (SIGIO, SIG_IGN); | 2042 | ignore_sigio (); |
| 2049 | #endif | ||
| 2050 | 2043 | ||
| 2051 | #ifdef WINDOWSNT | 2044 | #ifdef WINDOWSNT |
| 2052 | term_ntproc (); | 2045 | term_ntproc (); |
| @@ -2152,12 +2145,6 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2152 | memory_warnings (my_edata, malloc_warning); | 2145 | memory_warnings (my_edata, malloc_warning); |
| 2153 | } | 2146 | } |
| 2154 | #endif /* not WINDOWSNT */ | 2147 | #endif /* not WINDOWSNT */ |
| 2155 | #if defined (HAVE_PTHREAD) && !defined SYNC_INPUT | ||
| 2156 | /* Pthread may call malloc before main, and then we will get an endless | ||
| 2157 | loop, because pthread_self (see alloc.c) calls malloc the first time | ||
| 2158 | it is called on some systems. */ | ||
| 2159 | reset_malloc_hooks (); | ||
| 2160 | #endif | ||
| 2161 | #endif /* not SYSTEM_MALLOC */ | 2148 | #endif /* not SYSTEM_MALLOC */ |
| 2162 | #ifdef DOUG_LEA_MALLOC | 2149 | #ifdef DOUG_LEA_MALLOC |
| 2163 | malloc_state_ptr = malloc_get_state (); | 2150 | malloc_state_ptr = malloc_get_state (); |
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index 5f90a5b90aa..d23f3e21f24 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -22,13 +22,40 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include "emacsgtkfixed.h" | 23 | #include "emacsgtkfixed.h" |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <setjmp.h> | 25 | |
| 26 | #include "lisp.h" | 26 | #include "lisp.h" |
| 27 | #include "frame.h" | 27 | #include "frame.h" |
| 28 | #include "xterm.h" | 28 | #include "xterm.h" |
| 29 | #ifdef HAVE_XWIDGETS | 29 | #ifdef HAVE_XWIDGETS |
| 30 | #include "xwidget.h" | 30 | #include "xwidget.h" |
| 31 | #endif | 31 | #endif |
| 32 | /* Silence a bogus diagnostic; see GNOME bug 683906. */ | ||
| 33 | #if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | ||
| 34 | # pragma GCC diagnostic push | ||
| 35 | # pragma GCC diagnostic ignored "-Wunused-local-typedefs" | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #define EMACS_TYPE_FIXED emacs_fixed_get_type () | ||
| 39 | #define EMACS_FIXED(obj) \ | ||
| 40 | G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed) | ||
| 41 | |||
| 42 | typedef struct _EmacsFixed EmacsFixed; | ||
| 43 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; | ||
| 44 | typedef struct _EmacsFixedClass EmacsFixedClass; | ||
| 45 | |||
| 46 | struct _EmacsFixed | ||
| 47 | { | ||
| 48 | GtkFixed container; | ||
| 49 | |||
| 50 | /*< private >*/ | ||
| 51 | EmacsFixedPrivate *priv; | ||
| 52 | }; | ||
| 53 | |||
| 54 | struct _EmacsFixedClass | ||
| 55 | { | ||
| 56 | GtkFixedClass parent_class; | ||
| 57 | }; | ||
| 58 | |||
| 32 | struct _EmacsFixedPrivate | 59 | struct _EmacsFixedPrivate |
| 33 | { | 60 | { |
| 34 | struct frame *f; | 61 | struct frame *f; |
diff --git a/src/eval.c b/src/eval.c index 8a8a507a1b6..1c565e233c6 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <limits.h> | 21 | #include <limits.h> |
| 22 | #include <setjmp.h> | ||
| 23 | #include <stdio.h> | 22 | #include <stdio.h> |
| 24 | #include "lisp.h" | 23 | #include "lisp.h" |
| 25 | #include "blockinput.h" | 24 | #include "blockinput.h" |
| @@ -118,12 +117,6 @@ static EMACS_INT when_entered_debugger; | |||
| 118 | 117 | ||
| 119 | Lisp_Object Vsignaling_function; | 118 | Lisp_Object Vsignaling_function; |
| 120 | 119 | ||
| 121 | /* Set to non-zero while processing X events. Checked in Feval to | ||
| 122 | make sure the Lisp interpreter isn't called from a signal handler, | ||
| 123 | which is unsafe because the interpreter isn't reentrant. */ | ||
| 124 | |||
| 125 | int handling_signal; | ||
| 126 | |||
| 127 | /* If non-nil, Lisp code must not be run since some part of Emacs is | 120 | /* If non-nil, Lisp code must not be run since some part of Emacs is |
| 128 | in an inconsistent state. Currently, x-create-frame uses this to | 121 | in an inconsistent state. Currently, x-create-frame uses this to |
| 129 | avoid triggering window-configuration-change-hook while the new | 122 | avoid triggering window-configuration-change-hook while the new |
| @@ -707,7 +700,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | |||
| 707 | else | 700 | else |
| 708 | { /* Check if there is really a global binding rather than just a let | 701 | { /* Check if there is really a global binding rather than just a let |
| 709 | binding that shadows the global unboundness of the var. */ | 702 | binding that shadows the global unboundness of the var. */ |
| 710 | volatile struct specbinding *pdl = specpdl_ptr; | 703 | struct specbinding *pdl = specpdl_ptr; |
| 711 | while (pdl > specpdl) | 704 | while (pdl > specpdl) |
| 712 | { | 705 | { |
| 713 | if (EQ ((--pdl)->symbol, sym) && !pdl->func | 706 | if (EQ ((--pdl)->symbol, sym) && !pdl->func |
| @@ -1072,7 +1065,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object | |||
| 1072 | catchlist = &c; | 1065 | catchlist = &c; |
| 1073 | 1066 | ||
| 1074 | /* Call FUNC. */ | 1067 | /* Call FUNC. */ |
| 1075 | if (! _setjmp (c.jmp)) | 1068 | if (! sys_setjmp (c.jmp)) |
| 1076 | c.val = (*func) (arg); | 1069 | c.val = (*func) (arg); |
| 1077 | 1070 | ||
| 1078 | /* Throw works by a longjmp that comes right here. */ | 1071 | /* Throw works by a longjmp that comes right here. */ |
| @@ -1107,7 +1100,6 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) | |||
| 1107 | /* Restore certain special C variables. */ | 1100 | /* Restore certain special C variables. */ |
| 1108 | set_poll_suppress_count (catch->poll_suppress_count); | 1101 | set_poll_suppress_count (catch->poll_suppress_count); |
| 1109 | UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); | 1102 | UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); |
| 1110 | handling_signal = 0; | ||
| 1111 | immediate_quit = 0; | 1103 | immediate_quit = 0; |
| 1112 | 1104 | ||
| 1113 | do | 1105 | do |
| @@ -1140,7 +1132,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) | |||
| 1140 | backtrace_list = catch->backlist; | 1132 | backtrace_list = catch->backlist; |
| 1141 | lisp_eval_depth = catch->lisp_eval_depth; | 1133 | lisp_eval_depth = catch->lisp_eval_depth; |
| 1142 | 1134 | ||
| 1143 | _longjmp (catch->jmp, 1); | 1135 | sys_longjmp (catch->jmp, 1); |
| 1144 | } | 1136 | } |
| 1145 | 1137 | ||
| 1146 | DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, | 1138 | DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, |
| @@ -1204,12 +1196,9 @@ See also the function `signal' for more info. | |||
| 1204 | usage: (condition-case VAR BODYFORM &rest HANDLERS) */) | 1196 | usage: (condition-case VAR BODYFORM &rest HANDLERS) */) |
| 1205 | (Lisp_Object args) | 1197 | (Lisp_Object args) |
| 1206 | { | 1198 | { |
| 1207 | register Lisp_Object bodyform, handlers; | 1199 | Lisp_Object var = Fcar (args); |
| 1208 | volatile Lisp_Object var; | 1200 | Lisp_Object bodyform = Fcar (Fcdr (args)); |
| 1209 | 1201 | Lisp_Object handlers = Fcdr (Fcdr (args)); | |
| 1210 | var = Fcar (args); | ||
| 1211 | bodyform = Fcar (Fcdr (args)); | ||
| 1212 | handlers = Fcdr (Fcdr (args)); | ||
| 1213 | 1202 | ||
| 1214 | return internal_lisp_condition_case (var, bodyform, handlers); | 1203 | return internal_lisp_condition_case (var, bodyform, handlers); |
| 1215 | } | 1204 | } |
| @@ -1249,7 +1238,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, | |||
| 1249 | c.interrupt_input_blocked = interrupt_input_blocked; | 1238 | c.interrupt_input_blocked = interrupt_input_blocked; |
| 1250 | c.gcpro = gcprolist; | 1239 | c.gcpro = gcprolist; |
| 1251 | c.byte_stack = byte_stack_list; | 1240 | c.byte_stack = byte_stack_list; |
| 1252 | if (_setjmp (c.jmp)) | 1241 | if (sys_setjmp (c.jmp)) |
| 1253 | { | 1242 | { |
| 1254 | if (!NILP (h.var)) | 1243 | if (!NILP (h.var)) |
| 1255 | specbind (h.var, c.val); | 1244 | specbind (h.var, c.val); |
| @@ -1304,7 +1293,7 @@ internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers, | |||
| 1304 | c.interrupt_input_blocked = interrupt_input_blocked; | 1293 | c.interrupt_input_blocked = interrupt_input_blocked; |
| 1305 | c.gcpro = gcprolist; | 1294 | c.gcpro = gcprolist; |
| 1306 | c.byte_stack = byte_stack_list; | 1295 | c.byte_stack = byte_stack_list; |
| 1307 | if (_setjmp (c.jmp)) | 1296 | if (sys_setjmp (c.jmp)) |
| 1308 | { | 1297 | { |
| 1309 | return (*hfun) (c.val); | 1298 | return (*hfun) (c.val); |
| 1310 | } | 1299 | } |
| @@ -1342,7 +1331,7 @@ internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg, | |||
| 1342 | c.interrupt_input_blocked = interrupt_input_blocked; | 1331 | c.interrupt_input_blocked = interrupt_input_blocked; |
| 1343 | c.gcpro = gcprolist; | 1332 | c.gcpro = gcprolist; |
| 1344 | c.byte_stack = byte_stack_list; | 1333 | c.byte_stack = byte_stack_list; |
| 1345 | if (_setjmp (c.jmp)) | 1334 | if (sys_setjmp (c.jmp)) |
| 1346 | { | 1335 | { |
| 1347 | return (*hfun) (c.val); | 1336 | return (*hfun) (c.val); |
| 1348 | } | 1337 | } |
| @@ -1384,7 +1373,7 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), | |||
| 1384 | c.interrupt_input_blocked = interrupt_input_blocked; | 1373 | c.interrupt_input_blocked = interrupt_input_blocked; |
| 1385 | c.gcpro = gcprolist; | 1374 | c.gcpro = gcprolist; |
| 1386 | c.byte_stack = byte_stack_list; | 1375 | c.byte_stack = byte_stack_list; |
| 1387 | if (_setjmp (c.jmp)) | 1376 | if (sys_setjmp (c.jmp)) |
| 1388 | { | 1377 | { |
| 1389 | return (*hfun) (c.val); | 1378 | return (*hfun) (c.val); |
| 1390 | } | 1379 | } |
| @@ -1428,7 +1417,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), | |||
| 1428 | c.interrupt_input_blocked = interrupt_input_blocked; | 1417 | c.interrupt_input_blocked = interrupt_input_blocked; |
| 1429 | c.gcpro = gcprolist; | 1418 | c.gcpro = gcprolist; |
| 1430 | c.byte_stack = byte_stack_list; | 1419 | c.byte_stack = byte_stack_list; |
| 1431 | if (_setjmp (c.jmp)) | 1420 | if (sys_setjmp (c.jmp)) |
| 1432 | { | 1421 | { |
| 1433 | return (*hfun) (c.val, nargs, args); | 1422 | return (*hfun) (c.val, nargs, args); |
| 1434 | } | 1423 | } |
| @@ -1490,7 +1479,7 @@ See also the function `condition-case'. */) | |||
| 1490 | struct handler *h; | 1479 | struct handler *h; |
| 1491 | struct backtrace *bp; | 1480 | struct backtrace *bp; |
| 1492 | 1481 | ||
| 1493 | immediate_quit = handling_signal = 0; | 1482 | immediate_quit = 0; |
| 1494 | abort_on_gc = 0; | 1483 | abort_on_gc = 0; |
| 1495 | if (gc_in_progress || waiting_for_input) | 1484 | if (gc_in_progress || waiting_for_input) |
| 1496 | emacs_abort (); | 1485 | emacs_abort (); |
| @@ -2043,9 +2032,6 @@ eval_sub (Lisp_Object form) | |||
| 2043 | struct backtrace backtrace; | 2032 | struct backtrace backtrace; |
| 2044 | struct gcpro gcpro1, gcpro2, gcpro3; | 2033 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 2045 | 2034 | ||
| 2046 | if (handling_signal) | ||
| 2047 | emacs_abort (); | ||
| 2048 | |||
| 2049 | if (SYMBOLP (form)) | 2035 | if (SYMBOLP (form)) |
| 2050 | { | 2036 | { |
| 2051 | /* Look up its binding in the lexical environment. | 2037 | /* Look up its binding in the lexical environment. |
| @@ -3108,8 +3094,6 @@ specbind (Lisp_Object symbol, Lisp_Object value) | |||
| 3108 | { | 3094 | { |
| 3109 | struct Lisp_Symbol *sym; | 3095 | struct Lisp_Symbol *sym; |
| 3110 | 3096 | ||
| 3111 | eassert (!handling_signal); | ||
| 3112 | |||
| 3113 | CHECK_SYMBOL (symbol); | 3097 | CHECK_SYMBOL (symbol); |
| 3114 | sym = XSYMBOL (symbol); | 3098 | sym = XSYMBOL (symbol); |
| 3115 | if (specpdl_ptr == specpdl + specpdl_size) | 3099 | if (specpdl_ptr == specpdl + specpdl_size) |
| @@ -3203,8 +3187,6 @@ specbind (Lisp_Object symbol, Lisp_Object value) | |||
| 3203 | void | 3187 | void |
| 3204 | record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) | 3188 | record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) |
| 3205 | { | 3189 | { |
| 3206 | eassert (!handling_signal); | ||
| 3207 | |||
| 3208 | if (specpdl_ptr == specpdl + specpdl_size) | 3190 | if (specpdl_ptr == specpdl + specpdl_size) |
| 3209 | grow_specpdl (); | 3191 | grow_specpdl (); |
| 3210 | specpdl_ptr->func = function; | 3192 | specpdl_ptr->func = function; |
diff --git a/src/fileio.c b/src/fileio.c index f0b3f0cc2fd..ca71af7ed95 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <sys/types.h> | 24 | #include <sys/types.h> |
| 25 | #include <sys/stat.h> | 25 | #include <sys/stat.h> |
| 26 | #include <setjmp.h> | ||
| 27 | #include <unistd.h> | 26 | #include <unistd.h> |
| 28 | 27 | ||
| 29 | #ifdef HAVE_PWD_H | 28 | #ifdef HAVE_PWD_H |
diff --git a/src/filelock.c b/src/filelock.c index 1f599c68912..17f3f253249 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #include <sys/stat.h> | 23 | #include <sys/stat.h> |
| 24 | #include <signal.h> | 24 | #include <signal.h> |
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <setjmp.h> | ||
| 27 | 26 | ||
| 28 | #ifdef HAVE_PWD_H | 27 | #ifdef HAVE_PWD_H |
| 29 | #include <pwd.h> | 28 | #include <pwd.h> |
diff --git a/src/floatfns.c b/src/floatfns.c index 8a9a9fd0886..4fe209fcb61 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -22,13 +22,14 @@ You should have received a copy of the GNU General Public License | |||
| 22 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 22 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | /* C89 requires only these math.h functions: | 25 | /* C89 requires only the following math.h functions, and Emacs omits |
| 26 | acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod, | 26 | the starred functions since we haven't found a use for them: |
| 27 | frexp, ldexp, log, log10, modf, pow, sin, sinh, sqrt, tan, tanh. | 27 | acos, asin, atan, atan2, ceil, cos, *cosh, exp, fabs, floor, fmod, |
| 28 | frexp, ldexp, log, log10, *modf, pow, sin, *sinh, sqrt, tan, *tanh. | ||
| 28 | */ | 29 | */ |
| 29 | 30 | ||
| 30 | #include <config.h> | 31 | #include <config.h> |
| 31 | #include <setjmp.h> | 32 | |
| 32 | #include "lisp.h" | 33 | #include "lisp.h" |
| 33 | #include "syssignal.h" | 34 | #include "syssignal.h" |
| 34 | 35 | ||
| @@ -42,10 +43,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 42 | 43 | ||
| 43 | #include <math.h> | 44 | #include <math.h> |
| 44 | 45 | ||
| 45 | /* This declaration is omitted on some systems, like Ultrix. */ | 46 | #ifndef isfinite |
| 46 | #if !defined (HPUX) && defined (HAVE_LOGB) && !defined (logb) | 47 | # define isfinite(x) ((x) - (x) == 0) |
| 47 | extern double logb (double); | 48 | #endif |
| 48 | #endif /* not HPUX and HAVE_LOGB and no logb macro */ | 49 | #ifndef isnan |
| 50 | # define isnan(x) ((x) != (x)) | ||
| 51 | #endif | ||
| 49 | 52 | ||
| 50 | /* Extract a Lisp number as a `double', or signal an error. */ | 53 | /* Extract a Lisp number as a `double', or signal an error. */ |
| 51 | 54 | ||
| @@ -126,9 +129,6 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0, | |||
| 126 | return make_float (d); | 129 | return make_float (d); |
| 127 | } | 130 | } |
| 128 | 131 | ||
| 129 | #undef isnan | ||
| 130 | #define isnan(x) ((x) != (x)) | ||
| 131 | |||
| 132 | DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, | 132 | DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, |
| 133 | doc: /* Return non nil iff argument X is a NaN. */) | 133 | doc: /* Return non nil iff argument X is a NaN. */) |
| 134 | (Lisp_Object x) | 134 | (Lisp_Object x) |
| @@ -153,6 +153,7 @@ Cause an error if X1 or X2 is not a float. */) | |||
| 153 | 153 | ||
| 154 | return make_float (copysign (f1, f2)); | 154 | return make_float (copysign (f1, f2)); |
| 155 | } | 155 | } |
| 156 | #endif | ||
| 156 | 157 | ||
| 157 | DEFUN ("frexp", Ffrexp, Sfrexp, 1, 1, 0, | 158 | DEFUN ("frexp", Ffrexp, Sfrexp, 1, 1, 0, |
| 158 | doc: /* Get significand and exponent of a floating point number. | 159 | doc: /* Get significand and exponent of a floating point number. |
| @@ -167,15 +168,9 @@ If X is zero, both parts (SGNFCAND and EXP) are zero. */) | |||
| 167 | (Lisp_Object x) | 168 | (Lisp_Object x) |
| 168 | { | 169 | { |
| 169 | double f = XFLOATINT (x); | 170 | double f = XFLOATINT (x); |
| 170 | 171 | int exponent; | |
| 171 | if (f == 0.0) | 172 | double sgnfcand = frexp (f, &exponent); |
| 172 | return Fcons (make_float (0.0), make_number (0)); | 173 | return Fcons (make_float (sgnfcand), make_number (exponent)); |
| 173 | else | ||
| 174 | { | ||
| 175 | int exponent; | ||
| 176 | double sgnfcand = frexp (f, &exponent); | ||
| 177 | return Fcons (make_float (sgnfcand), make_number (exponent)); | ||
| 178 | } | ||
| 179 | } | 174 | } |
| 180 | 175 | ||
| 181 | DEFUN ("ldexp", Fldexp, Sldexp, 1, 2, 0, | 176 | DEFUN ("ldexp", Fldexp, Sldexp, 1, 2, 0, |
| @@ -187,118 +182,6 @@ Returns the floating point value resulting from multiplying SGNFCAND | |||
| 187 | CHECK_NUMBER (exponent); | 182 | CHECK_NUMBER (exponent); |
| 188 | return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exponent))); | 183 | return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exponent))); |
| 189 | } | 184 | } |
| 190 | #endif | ||
| 191 | |||
| 192 | #if 0 /* Leave these out unless we find there's a reason for them. */ | ||
| 193 | |||
| 194 | DEFUN ("bessel-j0", Fbessel_j0, Sbessel_j0, 1, 1, 0, | ||
| 195 | doc: /* Return the bessel function j0 of ARG. */) | ||
| 196 | (Lisp_Object arg) | ||
| 197 | { | ||
| 198 | double d = extract_float (arg); | ||
| 199 | d = j0 (d); | ||
| 200 | return make_float (d); | ||
| 201 | } | ||
| 202 | |||
| 203 | DEFUN ("bessel-j1", Fbessel_j1, Sbessel_j1, 1, 1, 0, | ||
| 204 | doc: /* Return the bessel function j1 of ARG. */) | ||
| 205 | (Lisp_Object arg) | ||
| 206 | { | ||
| 207 | double d = extract_float (arg); | ||
| 208 | d = j1 (d); | ||
| 209 | return make_float (d); | ||
| 210 | } | ||
| 211 | |||
| 212 | DEFUN ("bessel-jn", Fbessel_jn, Sbessel_jn, 2, 2, 0, | ||
| 213 | doc: /* Return the order N bessel function output jn of ARG. | ||
| 214 | The first arg (the order) is truncated to an integer. */) | ||
| 215 | (Lisp_Object n, Lisp_Object arg) | ||
| 216 | { | ||
| 217 | int i1 = extract_float (n); | ||
| 218 | double f2 = extract_float (arg); | ||
| 219 | |||
| 220 | f2 = jn (i1, f2); | ||
| 221 | return make_float (f2); | ||
| 222 | } | ||
| 223 | |||
| 224 | DEFUN ("bessel-y0", Fbessel_y0, Sbessel_y0, 1, 1, 0, | ||
| 225 | doc: /* Return the bessel function y0 of ARG. */) | ||
| 226 | (Lisp_Object arg) | ||
| 227 | { | ||
| 228 | double d = extract_float (arg); | ||
| 229 | d = y0 (d); | ||
| 230 | return make_float (d); | ||
| 231 | } | ||
| 232 | |||
| 233 | DEFUN ("bessel-y1", Fbessel_y1, Sbessel_y1, 1, 1, 0, | ||
| 234 | doc: /* Return the bessel function y1 of ARG. */) | ||
| 235 | (Lisp_Object arg) | ||
| 236 | { | ||
| 237 | double d = extract_float (arg); | ||
| 238 | d = y1 (d); | ||
| 239 | return make_float (d); | ||
| 240 | } | ||
| 241 | |||
| 242 | DEFUN ("bessel-yn", Fbessel_yn, Sbessel_yn, 2, 2, 0, | ||
| 243 | doc: /* Return the order N bessel function output yn of ARG. | ||
| 244 | The first arg (the order) is truncated to an integer. */) | ||
| 245 | (Lisp_Object n, Lisp_Object arg) | ||
| 246 | { | ||
| 247 | int i1 = extract_float (n); | ||
| 248 | double f2 = extract_float (arg); | ||
| 249 | |||
| 250 | f2 = yn (i1, f2); | ||
| 251 | return make_float (f2); | ||
| 252 | } | ||
| 253 | |||
| 254 | #endif | ||
| 255 | |||
| 256 | #if 0 /* Leave these out unless we see they are worth having. */ | ||
| 257 | |||
| 258 | DEFUN ("erf", Ferf, Serf, 1, 1, 0, | ||
| 259 | doc: /* Return the mathematical error function of ARG. */) | ||
| 260 | (Lisp_Object arg) | ||
| 261 | { | ||
| 262 | double d = extract_float (arg); | ||
| 263 | d = erf (d); | ||
| 264 | return make_float (d); | ||
| 265 | } | ||
| 266 | |||
| 267 | DEFUN ("erfc", Ferfc, Serfc, 1, 1, 0, | ||
| 268 | doc: /* Return the complementary error function of ARG. */) | ||
| 269 | (Lisp_Object arg) | ||
| 270 | { | ||
| 271 | double d = extract_float (arg); | ||
| 272 | d = erfc (d); | ||
| 273 | return make_float (d); | ||
| 274 | } | ||
| 275 | |||
| 276 | DEFUN ("log-gamma", Flog_gamma, Slog_gamma, 1, 1, 0, | ||
| 277 | doc: /* Return the log gamma of ARG. */) | ||
| 278 | (Lisp_Object arg) | ||
| 279 | { | ||
| 280 | double d = extract_float (arg); | ||
| 281 | d = lgamma (d); | ||
| 282 | return make_float (d); | ||
| 283 | } | ||
| 284 | |||
| 285 | DEFUN ("cube-root", Fcube_root, Scube_root, 1, 1, 0, | ||
| 286 | doc: /* Return the cube root of ARG. */) | ||
| 287 | (Lisp_Object arg) | ||
| 288 | { | ||
| 289 | double d = extract_float (arg); | ||
| 290 | #ifdef HAVE_CBRT | ||
| 291 | d = cbrt (d); | ||
| 292 | #else | ||
| 293 | if (d >= 0.0) | ||
| 294 | d = pow (d, 1.0/3.0); | ||
| 295 | else | ||
| 296 | d = -pow (-d, 1.0/3.0); | ||
| 297 | #endif | ||
| 298 | return make_float (d); | ||
| 299 | } | ||
| 300 | |||
| 301 | #endif | ||
| 302 | 185 | ||
| 303 | DEFUN ("exp", Fexp, Sexp, 1, 1, 0, | 186 | DEFUN ("exp", Fexp, Sexp, 1, 1, 0, |
| 304 | doc: /* Return the exponential base e of ARG. */) | 187 | doc: /* Return the exponential base e of ARG. */) |
| @@ -383,63 +266,6 @@ DEFUN ("sqrt", Fsqrt, Ssqrt, 1, 1, 0, | |||
| 383 | return make_float (d); | 266 | return make_float (d); |
| 384 | } | 267 | } |
| 385 | 268 | ||
| 386 | #if 0 /* Not clearly worth adding. */ | ||
| 387 | |||
| 388 | DEFUN ("acosh", Facosh, Sacosh, 1, 1, 0, | ||
| 389 | doc: /* Return the inverse hyperbolic cosine of ARG. */) | ||
| 390 | (Lisp_Object arg) | ||
| 391 | { | ||
| 392 | double d = extract_float (arg); | ||
| 393 | d = acosh (d); | ||
| 394 | return make_float (d); | ||
| 395 | } | ||
| 396 | |||
| 397 | DEFUN ("asinh", Fasinh, Sasinh, 1, 1, 0, | ||
| 398 | doc: /* Return the inverse hyperbolic sine of ARG. */) | ||
| 399 | (Lisp_Object arg) | ||
| 400 | { | ||
| 401 | double d = extract_float (arg); | ||
| 402 | d = asinh (d); | ||
| 403 | return make_float (d); | ||
| 404 | } | ||
| 405 | |||
| 406 | DEFUN ("atanh", Fatanh, Satanh, 1, 1, 0, | ||
| 407 | doc: /* Return the inverse hyperbolic tangent of ARG. */) | ||
| 408 | (Lisp_Object arg) | ||
| 409 | { | ||
| 410 | double d = extract_float (arg); | ||
| 411 | d = atanh (d); | ||
| 412 | return make_float (d); | ||
| 413 | } | ||
| 414 | |||
| 415 | DEFUN ("cosh", Fcosh, Scosh, 1, 1, 0, | ||
| 416 | doc: /* Return the hyperbolic cosine of ARG. */) | ||
| 417 | (Lisp_Object arg) | ||
| 418 | { | ||
| 419 | double d = extract_float (arg); | ||
| 420 | d = cosh (d); | ||
| 421 | return make_float (d); | ||
| 422 | } | ||
| 423 | |||
| 424 | DEFUN ("sinh", Fsinh, Ssinh, 1, 1, 0, | ||
| 425 | doc: /* Return the hyperbolic sine of ARG. */) | ||
| 426 | (Lisp_Object arg) | ||
| 427 | { | ||
| 428 | double d = extract_float (arg); | ||
| 429 | d = sinh (d); | ||
| 430 | return make_float (d); | ||
| 431 | } | ||
| 432 | |||
| 433 | DEFUN ("tanh", Ftanh, Stanh, 1, 1, 0, | ||
| 434 | doc: /* Return the hyperbolic tangent of ARG. */) | ||
| 435 | (Lisp_Object arg) | ||
| 436 | { | ||
| 437 | double d = extract_float (arg); | ||
| 438 | d = tanh (d); | ||
| 439 | return make_float (d); | ||
| 440 | } | ||
| 441 | #endif | ||
| 442 | |||
| 443 | DEFUN ("abs", Fabs, Sabs, 1, 1, 0, | 269 | DEFUN ("abs", Fabs, Sabs, 1, 1, 0, |
| 444 | doc: /* Return the absolute value of ARG. */) | 270 | doc: /* Return the absolute value of ARG. */) |
| 445 | (register Lisp_Object arg) | 271 | (register Lisp_Object arg) |
| @@ -477,16 +303,15 @@ This is the same as the exponent of a float. */) | |||
| 477 | 303 | ||
| 478 | if (f == 0.0) | 304 | if (f == 0.0) |
| 479 | value = MOST_NEGATIVE_FIXNUM; | 305 | value = MOST_NEGATIVE_FIXNUM; |
| 480 | else | 306 | else if (isfinite (f)) |
| 481 | { | 307 | { |
| 482 | #ifdef HAVE_LOGB | ||
| 483 | value = logb (f); | ||
| 484 | #else | ||
| 485 | int ivalue; | 308 | int ivalue; |
| 486 | frexp (f, &ivalue); | 309 | frexp (f, &ivalue); |
| 487 | value = ivalue - 1; | 310 | value = ivalue - 1; |
| 488 | #endif | ||
| 489 | } | 311 | } |
| 312 | else | ||
| 313 | value = MOST_POSITIVE_FIXNUM; | ||
| 314 | |||
| 490 | XSETINT (val, value); | 315 | XSETINT (val, value); |
| 491 | return val; | 316 | return val; |
| 492 | } | 317 | } |
| @@ -719,27 +544,9 @@ syms_of_floatfns (void) | |||
| 719 | defsubr (&Sisnan); | 544 | defsubr (&Sisnan); |
| 720 | #ifdef HAVE_COPYSIGN | 545 | #ifdef HAVE_COPYSIGN |
| 721 | defsubr (&Scopysign); | 546 | defsubr (&Scopysign); |
| 547 | #endif | ||
| 722 | defsubr (&Sfrexp); | 548 | defsubr (&Sfrexp); |
| 723 | defsubr (&Sldexp); | 549 | defsubr (&Sldexp); |
| 724 | #endif | ||
| 725 | #if 0 | ||
| 726 | defsubr (&Sacosh); | ||
| 727 | defsubr (&Sasinh); | ||
| 728 | defsubr (&Satanh); | ||
| 729 | defsubr (&Scosh); | ||
| 730 | defsubr (&Ssinh); | ||
| 731 | defsubr (&Stanh); | ||
| 732 | defsubr (&Sbessel_y0); | ||
| 733 | defsubr (&Sbessel_y1); | ||
| 734 | defsubr (&Sbessel_yn); | ||
| 735 | defsubr (&Sbessel_j0); | ||
| 736 | defsubr (&Sbessel_j1); | ||
| 737 | defsubr (&Sbessel_jn); | ||
| 738 | defsubr (&Serf); | ||
| 739 | defsubr (&Serfc); | ||
| 740 | defsubr (&Slog_gamma); | ||
| 741 | defsubr (&Scube_root); | ||
| 742 | #endif | ||
| 743 | defsubr (&Sfceiling); | 550 | defsubr (&Sfceiling); |
| 744 | defsubr (&Sffloor); | 551 | defsubr (&Sffloor); |
| 745 | defsubr (&Sfround); | 552 | defsubr (&Sfround); |
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <unistd.h> | 22 | #include <unistd.h> |
| 23 | #include <time.h> | 23 | #include <time.h> |
| 24 | #include <setjmp.h> | ||
| 25 | 24 | ||
| 26 | #include <intprops.h> | 25 | #include <intprops.h> |
| 27 | 26 | ||
diff --git a/src/font.c b/src/font.c index 49a09bced28..1f22fee88ee 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <float.h> | 24 | #include <float.h> |
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <setjmp.h> | ||
| 27 | 26 | ||
| 28 | #include <c-ctype.h> | 27 | #include <c-ctype.h> |
| 29 | 28 | ||
| @@ -4296,12 +4295,15 @@ to get the correct visual image of character sequences set in the | |||
| 4296 | header of the glyph-string. | 4295 | header of the glyph-string. |
| 4297 | 4296 | ||
| 4298 | If the shaping was successful, the value is GSTRING itself or a newly | 4297 | If the shaping was successful, the value is GSTRING itself or a newly |
| 4299 | created glyph-string. Otherwise, the value is nil. */) | 4298 | created glyph-string. Otherwise, the value is nil. |
| 4299 | |||
| 4300 | See the documentation of `composition-get-gstring' for the format of | ||
| 4301 | GSTRING. */) | ||
| 4300 | (Lisp_Object gstring) | 4302 | (Lisp_Object gstring) |
| 4301 | { | 4303 | { |
| 4302 | struct font *font; | 4304 | struct font *font; |
| 4303 | Lisp_Object font_object, n, glyph; | 4305 | Lisp_Object font_object, n, glyph; |
| 4304 | ptrdiff_t i, j, from, to; | 4306 | ptrdiff_t i, from, to; |
| 4305 | 4307 | ||
| 4306 | if (! composition_gstring_p (gstring)) | 4308 | if (! composition_gstring_p (gstring)) |
| 4307 | signal_error ("Invalid glyph-string: ", gstring); | 4309 | signal_error ("Invalid glyph-string: ", gstring); |
| @@ -4327,44 +4329,42 @@ created glyph-string. Otherwise, the value is nil. */) | |||
| 4327 | if (XINT (n) < LGSTRING_GLYPH_LEN (gstring)) | 4329 | if (XINT (n) < LGSTRING_GLYPH_LEN (gstring)) |
| 4328 | LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); | 4330 | LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); |
| 4329 | 4331 | ||
| 4332 | /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that | ||
| 4333 | GLYPHS covers all characters (except for the last few ones) in | ||
| 4334 | GSTRING. More formally, provided that NCHARS is the number of | ||
| 4335 | characters in GSTRING and GLYPHS[i] is the ith glyph, FROM_IDX | ||
| 4336 | and TO_IDX of each glyph must satisfy these conditions: | ||
| 4337 | |||
| 4338 | GLYPHS[0].FROM_IDX == 0 | ||
| 4339 | GLYPHS[i].FROM_IDX <= GLYPHS[i].TO_IDX | ||
| 4340 | if (GLYPHS[i].FROM_IDX == GLYPHS[i-1].FROM_IDX) | ||
| 4341 | ;; GLYPHS[i] and GLYPHS[i-1] belongs to the same grapheme cluster | ||
| 4342 | GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX | ||
| 4343 | else | ||
| 4344 | ;; Be sure to cover all characters. | ||
| 4345 | GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 */ | ||
| 4330 | glyph = LGSTRING_GLYPH (gstring, 0); | 4346 | glyph = LGSTRING_GLYPH (gstring, 0); |
| 4331 | from = LGLYPH_FROM (glyph); | 4347 | from = LGLYPH_FROM (glyph); |
| 4332 | to = LGLYPH_TO (glyph); | 4348 | to = LGLYPH_TO (glyph); |
| 4333 | for (i = 1, j = 0; i < LGSTRING_GLYPH_LEN (gstring); i++) | 4349 | if (from != 0 || to < from) |
| 4350 | goto shaper_error; | ||
| 4351 | for (i = 1; i < LGSTRING_GLYPH_LEN (gstring); i++) | ||
| 4334 | { | 4352 | { |
| 4335 | Lisp_Object this = LGSTRING_GLYPH (gstring, i); | 4353 | glyph = LGSTRING_GLYPH (gstring, i); |
| 4336 | 4354 | if (NILP (glyph)) | |
| 4337 | if (NILP (this)) | ||
| 4338 | break; | 4355 | break; |
| 4339 | if (NILP (LGLYPH_ADJUSTMENT (this))) | 4356 | if (! (LGLYPH_FROM (glyph) <= LGLYPH_TO (glyph) |
| 4340 | { | 4357 | && (LGLYPH_FROM (glyph) == from |
| 4341 | if (j < i - 1) | 4358 | ? LGLYPH_TO (glyph) == to |
| 4342 | for (; j < i; j++) | 4359 | : LGLYPH_FROM (glyph) == to + 1))) |
| 4343 | { | 4360 | goto shaper_error; |
| 4344 | glyph = LGSTRING_GLYPH (gstring, j); | 4361 | from = LGLYPH_FROM (glyph); |
| 4345 | LGLYPH_SET_FROM (glyph, from); | 4362 | to = LGLYPH_TO (glyph); |
| 4346 | LGLYPH_SET_TO (glyph, to); | ||
| 4347 | } | ||
| 4348 | from = LGLYPH_FROM (this); | ||
| 4349 | to = LGLYPH_TO (this); | ||
| 4350 | j = i; | ||
| 4351 | } | ||
| 4352 | else | ||
| 4353 | { | ||
| 4354 | if (from > LGLYPH_FROM (this)) | ||
| 4355 | from = LGLYPH_FROM (this); | ||
| 4356 | if (to < LGLYPH_TO (this)) | ||
| 4357 | to = LGLYPH_TO (this); | ||
| 4358 | } | ||
| 4359 | } | 4363 | } |
| 4360 | if (j < i - 1) | ||
| 4361 | for (; j < i; j++) | ||
| 4362 | { | ||
| 4363 | glyph = LGSTRING_GLYPH (gstring, j); | ||
| 4364 | LGLYPH_SET_FROM (glyph, from); | ||
| 4365 | LGLYPH_SET_TO (glyph, to); | ||
| 4366 | } | ||
| 4367 | return composition_gstring_put_cache (gstring, XINT (n)); | 4364 | return composition_gstring_put_cache (gstring, XINT (n)); |
| 4365 | |||
| 4366 | shaper_error: | ||
| 4367 | return Qnil; | ||
| 4368 | } | 4368 | } |
| 4369 | 4369 | ||
| 4370 | DEFUN ("font-variation-glyphs", Ffont_variation_glyphs, Sfont_variation_glyphs, | 4370 | DEFUN ("font-variation-glyphs", Ffont_variation_glyphs, Sfont_variation_glyphs, |
diff --git a/src/fontset.c b/src/fontset.c index 2b955fe6b11..35d4bfb367e 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | 26 | ||
| 27 | #include <config.h> | 27 | #include <config.h> |
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <setjmp.h> | ||
| 30 | 29 | ||
| 31 | #include "lisp.h" | 30 | #include "lisp.h" |
| 32 | #include "blockinput.h" | 31 | #include "blockinput.h" |
diff --git a/src/frame.c b/src/frame.c index 9b12842bf89..6930dac3ce8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <errno.h> | 25 | #include <errno.h> |
| 26 | #include <limits.h> | 26 | #include <limits.h> |
| 27 | #include <setjmp.h> | ||
| 28 | 27 | ||
| 29 | #include <c-ctype.h> | 28 | #include <c-ctype.h> |
| 30 | 29 | ||
| @@ -1299,6 +1298,11 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1299 | structures can still refer to it. */ | 1298 | structures can still refer to it. */ |
| 1300 | fset_menu_bar_vector (f, Qnil); | 1299 | fset_menu_bar_vector (f, Qnil); |
| 1301 | 1300 | ||
| 1301 | /* If FRAME's buffer lists contains killed | ||
| 1302 | buffers, this helps GC to reclaim them. */ | ||
| 1303 | fset_buffer_list (f, Qnil); | ||
| 1304 | fset_buried_buffer_list (f, Qnil); | ||
| 1305 | |||
| 1302 | free_font_driver_list (f); | 1306 | free_font_driver_list (f); |
| 1303 | xfree (f->namebuf); | 1307 | xfree (f->namebuf); |
| 1304 | xfree (f->decode_mode_spec_buffer); | 1308 | xfree (f->decode_mode_spec_buffer); |
diff --git a/src/fringe.c b/src/fringe.c index 0c2109a0f8e..6e6deeddb08 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -18,7 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <stdio.h> | 20 | #include <stdio.h> |
| 21 | #include <setjmp.h> | ||
| 22 | 21 | ||
| 23 | #include "lisp.h" | 22 | #include "lisp.h" |
| 24 | #include "frame.h" | 23 | #include "frame.h" |
diff --git a/src/ftfont.c b/src/ftfont.c index a85773a9a21..f07ad6f33c7 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -21,8 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | |||
| 26 | #include <fontconfig/fontconfig.h> | 24 | #include <fontconfig/fontconfig.h> |
| 27 | #include <fontconfig/fcfreetype.h> | 25 | #include <fontconfig/fcfreetype.h> |
| 28 | 26 | ||
diff --git a/src/ftxfont.c b/src/ftxfont.c index c705ede62c4..466250bd43f 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | #include <X11/Xlib.h> | 24 | #include <X11/Xlib.h> |
| 26 | 25 | ||
| 27 | #include "lisp.h" | 26 | #include "lisp.h" |
diff --git a/src/gnutls.c b/src/gnutls.c index a2573f6bd99..1c4693aee32 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -18,7 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <errno.h> | 20 | #include <errno.h> |
| 21 | #include <setjmp.h> | ||
| 22 | 21 | ||
| 23 | #include "lisp.h" | 22 | #include "lisp.h" |
| 24 | #include "process.h" | 23 | #include "process.h" |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 884574e1062..1eb4b2cabdf 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #ifdef USE_GTK | 22 | #ifdef USE_GTK |
| 23 | #include <float.h> | 23 | #include <float.h> |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <setjmp.h> | ||
| 26 | 25 | ||
| 27 | #include <c-ctype.h> | 26 | #include <c-ctype.h> |
| 28 | 27 | ||
diff --git a/src/image.c b/src/image.c index cf01602050f..8fc1c8637eb 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -5514,6 +5514,15 @@ init_png_functions (Lisp_Object libraries) | |||
| 5514 | 5514 | ||
| 5515 | #endif /* HAVE_NTGUI */ | 5515 | #endif /* HAVE_NTGUI */ |
| 5516 | 5516 | ||
| 5517 | /* Possibly inefficient/inexact substitutes for _setjmp and _longjmp. | ||
| 5518 | Do not use sys_setjmp, as PNG supports only jmp_buf. The _longjmp | ||
| 5519 | substitute may munge the signal mask, but that should be OK here. | ||
| 5520 | MinGW (MS-Windows) uses _setjmp and defines setjmp to _setjmp in | ||
| 5521 | the system header setjmp.h; don't mess up that. */ | ||
| 5522 | #ifndef HAVE__SETJMP | ||
| 5523 | # define _setjmp(j) setjmp (j) | ||
| 5524 | # define _longjmp longjmp | ||
| 5525 | #endif | ||
| 5517 | 5526 | ||
| 5518 | #if (PNG_LIBPNG_VER < 10500) | 5527 | #if (PNG_LIBPNG_VER < 10500) |
| 5519 | #define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1)) | 5528 | #define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1)) |
| @@ -5591,20 +5600,31 @@ png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length) | |||
| 5591 | /* Load PNG image IMG for use on frame F. Value is non-zero if | 5600 | /* Load PNG image IMG for use on frame F. Value is non-zero if |
| 5592 | successful. */ | 5601 | successful. */ |
| 5593 | 5602 | ||
| 5603 | struct png_load_context | ||
| 5604 | { | ||
| 5605 | /* These are members so that longjmp doesn't munge local variables. */ | ||
| 5606 | png_struct *png_ptr; | ||
| 5607 | png_info *info_ptr; | ||
| 5608 | png_info *end_info; | ||
| 5609 | FILE *fp; | ||
| 5610 | png_byte *pixels; | ||
| 5611 | png_byte **rows; | ||
| 5612 | }; | ||
| 5613 | |||
| 5594 | static int | 5614 | static int |
| 5595 | png_load (struct frame *f, struct image *img) | 5615 | png_load_body (struct frame *f, struct image *img, struct png_load_context *c) |
| 5596 | { | 5616 | { |
| 5597 | Lisp_Object file, specified_file; | 5617 | Lisp_Object file, specified_file; |
| 5598 | Lisp_Object specified_data; | 5618 | Lisp_Object specified_data; |
| 5599 | int x, y; | 5619 | int x, y; |
| 5600 | ptrdiff_t i; | 5620 | ptrdiff_t i; |
| 5601 | XImagePtr ximg, mask_img = NULL; | 5621 | XImagePtr ximg, mask_img = NULL; |
| 5602 | png_struct *png_ptr = NULL; | 5622 | png_struct *png_ptr; |
| 5603 | png_info *info_ptr = NULL, *end_info = NULL; | 5623 | png_info *info_ptr = NULL, *end_info = NULL; |
| 5604 | FILE *volatile fp = NULL; | 5624 | FILE *fp = NULL; |
| 5605 | png_byte sig[8]; | 5625 | png_byte sig[8]; |
| 5606 | png_byte * volatile pixels = NULL; | 5626 | png_byte *pixels = NULL; |
| 5607 | png_byte ** volatile rows = NULL; | 5627 | png_byte **rows = NULL; |
| 5608 | png_uint_32 width, height; | 5628 | png_uint_32 width, height; |
| 5609 | int bit_depth, color_type, interlace_type; | 5629 | int bit_depth, color_type, interlace_type; |
| 5610 | png_byte channels; | 5630 | png_byte channels; |
| @@ -5671,24 +5691,26 @@ png_load (struct frame *f, struct image *img) | |||
| 5671 | png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, | 5691 | png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, |
| 5672 | NULL, my_png_error, | 5692 | NULL, my_png_error, |
| 5673 | my_png_warning); | 5693 | my_png_warning); |
| 5674 | if (!png_ptr) | 5694 | if (png_ptr) |
| 5675 | { | 5695 | { |
| 5676 | if (fp) fclose (fp); | 5696 | info_ptr = fn_png_create_info_struct (png_ptr); |
| 5677 | return 0; | 5697 | end_info = fn_png_create_info_struct (png_ptr); |
| 5678 | } | 5698 | } |
| 5679 | 5699 | ||
| 5680 | info_ptr = fn_png_create_info_struct (png_ptr); | 5700 | c->png_ptr = png_ptr; |
| 5681 | if (!info_ptr) | 5701 | c->info_ptr = info_ptr; |
| 5702 | c->end_info = end_info; | ||
| 5703 | c->fp = fp; | ||
| 5704 | c->pixels = pixels; | ||
| 5705 | c->rows = rows; | ||
| 5706 | |||
| 5707 | if (! (info_ptr && end_info)) | ||
| 5682 | { | 5708 | { |
| 5683 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); | 5709 | fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); |
| 5684 | if (fp) fclose (fp); | 5710 | png_ptr = 0; |
| 5685 | return 0; | ||
| 5686 | } | 5711 | } |
| 5687 | 5712 | if (! png_ptr) | |
| 5688 | end_info = fn_png_create_info_struct (png_ptr); | ||
| 5689 | if (!end_info) | ||
| 5690 | { | 5713 | { |
| 5691 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); | ||
| 5692 | if (fp) fclose (fp); | 5714 | if (fp) fclose (fp); |
| 5693 | return 0; | 5715 | return 0; |
| 5694 | } | 5716 | } |
| @@ -5698,14 +5720,18 @@ png_load (struct frame *f, struct image *img) | |||
| 5698 | if (_setjmp (PNG_JMPBUF (png_ptr))) | 5720 | if (_setjmp (PNG_JMPBUF (png_ptr))) |
| 5699 | { | 5721 | { |
| 5700 | error: | 5722 | error: |
| 5701 | if (png_ptr) | 5723 | if (c->png_ptr) |
| 5702 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); | 5724 | fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); |
| 5703 | xfree (pixels); | 5725 | xfree (c->pixels); |
| 5704 | xfree (rows); | 5726 | xfree (c->rows); |
| 5705 | if (fp) fclose (fp); | 5727 | if (c->fp) |
| 5728 | fclose (c->fp); | ||
| 5706 | return 0; | 5729 | return 0; |
| 5707 | } | 5730 | } |
| 5708 | 5731 | ||
| 5732 | /* Silence a bogus diagnostic; see GCC bug 54561. */ | ||
| 5733 | IF_LINT (fp = c->fp); | ||
| 5734 | |||
| 5709 | /* Read image info. */ | 5735 | /* Read image info. */ |
| 5710 | if (!NILP (specified_data)) | 5736 | if (!NILP (specified_data)) |
| 5711 | fn_png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); | 5737 | fn_png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); |
| @@ -5821,8 +5847,8 @@ png_load (struct frame *f, struct image *img) | |||
| 5821 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows < height | 5847 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows < height |
| 5822 | || min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height < row_bytes) | 5848 | || min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height < row_bytes) |
| 5823 | memory_full (SIZE_MAX); | 5849 | memory_full (SIZE_MAX); |
| 5824 | pixels = xmalloc (sizeof *pixels * row_bytes * height); | 5850 | c->pixels = pixels = xmalloc (sizeof *pixels * row_bytes * height); |
| 5825 | rows = xmalloc (height * sizeof *rows); | 5851 | c->rows = rows = xmalloc (height * sizeof *rows); |
| 5826 | for (i = 0; i < height; ++i) | 5852 | for (i = 0; i < height; ++i) |
| 5827 | rows[i] = pixels + i * row_bytes; | 5853 | rows[i] = pixels + i * row_bytes; |
| 5828 | 5854 | ||
| @@ -5832,7 +5858,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5832 | if (fp) | 5858 | if (fp) |
| 5833 | { | 5859 | { |
| 5834 | fclose (fp); | 5860 | fclose (fp); |
| 5835 | fp = NULL; | 5861 | c->fp = NULL; |
| 5836 | } | 5862 | } |
| 5837 | 5863 | ||
| 5838 | /* Create an image and pixmap serving as mask if the PNG image | 5864 | /* Create an image and pixmap serving as mask if the PNG image |
| @@ -5907,7 +5933,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5907 | #endif /* COLOR_TABLE_SUPPORT */ | 5933 | #endif /* COLOR_TABLE_SUPPORT */ |
| 5908 | 5934 | ||
| 5909 | /* Clean up. */ | 5935 | /* Clean up. */ |
| 5910 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); | 5936 | fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); |
| 5911 | xfree (rows); | 5937 | xfree (rows); |
| 5912 | xfree (pixels); | 5938 | xfree (pixels); |
| 5913 | 5939 | ||
| @@ -5936,6 +5962,13 @@ png_load (struct frame *f, struct image *img) | |||
| 5936 | return 1; | 5962 | return 1; |
| 5937 | } | 5963 | } |
| 5938 | 5964 | ||
| 5965 | static int | ||
| 5966 | png_load (struct frame *f, struct image *img) | ||
| 5967 | { | ||
| 5968 | struct png_load_context c; | ||
| 5969 | return png_load_body (f, img, &c); | ||
| 5970 | } | ||
| 5971 | |||
| 5939 | #else /* HAVE_PNG */ | 5972 | #else /* HAVE_PNG */ |
| 5940 | 5973 | ||
| 5941 | #ifdef HAVE_NS | 5974 | #ifdef HAVE_NS |
| @@ -6105,7 +6138,20 @@ jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired) | |||
| 6105 | struct my_jpeg_error_mgr | 6138 | struct my_jpeg_error_mgr |
| 6106 | { | 6139 | { |
| 6107 | struct jpeg_error_mgr pub; | 6140 | struct jpeg_error_mgr pub; |
| 6108 | jmp_buf setjmp_buffer; | 6141 | sys_jmp_buf setjmp_buffer; |
| 6142 | |||
| 6143 | /* The remaining members are so that longjmp doesn't munge local | ||
| 6144 | variables. */ | ||
| 6145 | struct jpeg_decompress_struct cinfo; | ||
| 6146 | enum | ||
| 6147 | { | ||
| 6148 | MY_JPEG_ERROR_EXIT, | ||
| 6149 | MY_JPEG_INVALID_IMAGE_SIZE, | ||
| 6150 | MY_JPEG_CANNOT_CREATE_X | ||
| 6151 | } failure_code; | ||
| 6152 | #ifdef lint | ||
| 6153 | FILE *fp; | ||
| 6154 | #endif | ||
| 6109 | }; | 6155 | }; |
| 6110 | 6156 | ||
| 6111 | 6157 | ||
| @@ -6113,7 +6159,8 @@ static _Noreturn void | |||
| 6113 | my_error_exit (j_common_ptr cinfo) | 6159 | my_error_exit (j_common_ptr cinfo) |
| 6114 | { | 6160 | { |
| 6115 | struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; | 6161 | struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; |
| 6116 | _longjmp (mgr->setjmp_buffer, 1); | 6162 | mgr->failure_code = MY_JPEG_ERROR_EXIT; |
| 6163 | sys_longjmp (mgr->setjmp_buffer, 1); | ||
| 6117 | } | 6164 | } |
| 6118 | 6165 | ||
| 6119 | 6166 | ||
| @@ -6319,17 +6366,15 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp) | |||
| 6319 | from the JPEG lib. */ | 6366 | from the JPEG lib. */ |
| 6320 | 6367 | ||
| 6321 | static int | 6368 | static int |
| 6322 | jpeg_load (struct frame *f, struct image *img) | 6369 | jpeg_load_body (struct frame *f, struct image *img, |
| 6370 | struct my_jpeg_error_mgr *mgr) | ||
| 6323 | { | 6371 | { |
| 6324 | struct jpeg_decompress_struct cinfo; | ||
| 6325 | struct my_jpeg_error_mgr mgr; | ||
| 6326 | Lisp_Object file, specified_file; | 6372 | Lisp_Object file, specified_file; |
| 6327 | Lisp_Object specified_data; | 6373 | Lisp_Object specified_data; |
| 6328 | FILE * volatile fp = NULL; | 6374 | FILE *fp = NULL; |
| 6329 | JSAMPARRAY buffer; | 6375 | JSAMPARRAY buffer; |
| 6330 | int row_stride, x, y; | 6376 | int row_stride, x, y; |
| 6331 | XImagePtr ximg = NULL; | 6377 | XImagePtr ximg = NULL; |
| 6332 | int rc; | ||
| 6333 | unsigned long *colors; | 6378 | unsigned long *colors; |
| 6334 | int width, height; | 6379 | int width, height; |
| 6335 | 6380 | ||
| @@ -6359,26 +6404,37 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6359 | return 0; | 6404 | return 0; |
| 6360 | } | 6405 | } |
| 6361 | 6406 | ||
| 6407 | IF_LINT (mgr->fp = fp); | ||
| 6408 | |||
| 6362 | /* Customize libjpeg's error handling to call my_error_exit when an | 6409 | /* Customize libjpeg's error handling to call my_error_exit when an |
| 6363 | error is detected. This function will perform a longjmp. */ | 6410 | error is detected. This function will perform a longjmp. */ |
| 6364 | cinfo.err = fn_jpeg_std_error (&mgr.pub); | 6411 | mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); |
| 6365 | mgr.pub.error_exit = my_error_exit; | 6412 | mgr->pub.error_exit = my_error_exit; |
| 6366 | 6413 | if (sys_setjmp (mgr->setjmp_buffer)) | |
| 6367 | if ((rc = _setjmp (mgr.setjmp_buffer)) != 0) | ||
| 6368 | { | 6414 | { |
| 6369 | if (rc == 1) | 6415 | switch (mgr->failure_code) |
| 6370 | { | 6416 | { |
| 6371 | /* Called from my_error_exit. Display a JPEG error. */ | 6417 | case MY_JPEG_ERROR_EXIT: |
| 6372 | char buf[JMSG_LENGTH_MAX]; | 6418 | { |
| 6373 | cinfo.err->format_message ((j_common_ptr) &cinfo, buf); | 6419 | char buf[JMSG_LENGTH_MAX]; |
| 6374 | image_error ("Error reading JPEG image `%s': %s", img->spec, | 6420 | mgr->cinfo.err->format_message ((j_common_ptr) &mgr->cinfo, buf); |
| 6375 | build_string (buf)); | 6421 | image_error ("Error reading JPEG image `%s': %s", img->spec, |
| 6422 | build_string (buf)); | ||
| 6423 | break; | ||
| 6424 | } | ||
| 6425 | |||
| 6426 | case MY_JPEG_INVALID_IMAGE_SIZE: | ||
| 6427 | image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); | ||
| 6428 | break; | ||
| 6429 | |||
| 6430 | case MY_JPEG_CANNOT_CREATE_X: | ||
| 6431 | break; | ||
| 6376 | } | 6432 | } |
| 6377 | 6433 | ||
| 6378 | /* Close the input file and destroy the JPEG object. */ | 6434 | /* Close the input file and destroy the JPEG object. */ |
| 6379 | if (fp) | 6435 | if (fp) |
| 6380 | fclose ((FILE *) fp); | 6436 | fclose (fp); |
| 6381 | fn_jpeg_destroy_decompress (&cinfo); | 6437 | fn_jpeg_destroy_decompress (&mgr->cinfo); |
| 6382 | 6438 | ||
| 6383 | /* If we already have an XImage, free that. */ | 6439 | /* If we already have an XImage, free that. */ |
| 6384 | x_destroy_x_image (ximg); | 6440 | x_destroy_x_image (ximg); |
| @@ -6388,46 +6444,52 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6388 | return 0; | 6444 | return 0; |
| 6389 | } | 6445 | } |
| 6390 | 6446 | ||
| 6447 | /* Silence a bogus diagnostic; see GCC bug 54561. */ | ||
| 6448 | IF_LINT (fp = mgr->fp); | ||
| 6449 | |||
| 6391 | /* Create the JPEG decompression object. Let it read from fp. | 6450 | /* Create the JPEG decompression object. Let it read from fp. |
| 6392 | Read the JPEG image header. */ | 6451 | Read the JPEG image header. */ |
| 6393 | fn_jpeg_CreateDecompress (&cinfo, JPEG_LIB_VERSION, sizeof (cinfo)); | 6452 | fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); |
| 6394 | 6453 | ||
| 6395 | if (NILP (specified_data)) | 6454 | if (NILP (specified_data)) |
| 6396 | jpeg_file_src (&cinfo, (FILE *) fp); | 6455 | jpeg_file_src (&mgr->cinfo, fp); |
| 6397 | else | 6456 | else |
| 6398 | jpeg_memory_src (&cinfo, SDATA (specified_data), | 6457 | jpeg_memory_src (&mgr->cinfo, SDATA (specified_data), |
| 6399 | SBYTES (specified_data)); | 6458 | SBYTES (specified_data)); |
| 6400 | 6459 | ||
| 6401 | fn_jpeg_read_header (&cinfo, 1); | 6460 | fn_jpeg_read_header (&mgr->cinfo, 1); |
| 6402 | 6461 | ||
| 6403 | /* Customize decompression so that color quantization will be used. | 6462 | /* Customize decompression so that color quantization will be used. |
| 6404 | Start decompression. */ | 6463 | Start decompression. */ |
| 6405 | cinfo.quantize_colors = 1; | 6464 | mgr->cinfo.quantize_colors = 1; |
| 6406 | fn_jpeg_start_decompress (&cinfo); | 6465 | fn_jpeg_start_decompress (&mgr->cinfo); |
| 6407 | width = img->width = cinfo.output_width; | 6466 | width = img->width = mgr->cinfo.output_width; |
| 6408 | height = img->height = cinfo.output_height; | 6467 | height = img->height = mgr->cinfo.output_height; |
| 6409 | 6468 | ||
| 6410 | if (!check_image_size (f, width, height)) | 6469 | if (!check_image_size (f, width, height)) |
| 6411 | { | 6470 | { |
| 6412 | image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); | 6471 | mgr->failure_code = MY_JPEG_INVALID_IMAGE_SIZE; |
| 6413 | _longjmp (mgr.setjmp_buffer, 2); | 6472 | sys_longjmp (mgr->setjmp_buffer, 1); |
| 6414 | } | 6473 | } |
| 6415 | 6474 | ||
| 6416 | /* Create X image and pixmap. */ | 6475 | /* Create X image and pixmap. */ |
| 6417 | if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) | 6476 | if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) |
| 6418 | _longjmp (mgr.setjmp_buffer, 2); | 6477 | { |
| 6478 | mgr->failure_code = MY_JPEG_CANNOT_CREATE_X; | ||
| 6479 | sys_longjmp (mgr->setjmp_buffer, 1); | ||
| 6480 | } | ||
| 6419 | 6481 | ||
| 6420 | /* Allocate colors. When color quantization is used, | 6482 | /* Allocate colors. When color quantization is used, |
| 6421 | cinfo.actual_number_of_colors has been set with the number of | 6483 | mgr->cinfo.actual_number_of_colors has been set with the number of |
| 6422 | colors generated, and cinfo.colormap is a two-dimensional array | 6484 | colors generated, and mgr->cinfo.colormap is a two-dimensional array |
| 6423 | of color indices in the range 0..cinfo.actual_number_of_colors. | 6485 | of color indices in the range 0..mgr->cinfo.actual_number_of_colors. |
| 6424 | No more than 255 colors will be generated. */ | 6486 | No more than 255 colors will be generated. */ |
| 6425 | { | 6487 | { |
| 6426 | int i, ir, ig, ib; | 6488 | int i, ir, ig, ib; |
| 6427 | 6489 | ||
| 6428 | if (cinfo.out_color_components > 2) | 6490 | if (mgr->cinfo.out_color_components > 2) |
| 6429 | ir = 0, ig = 1, ib = 2; | 6491 | ir = 0, ig = 1, ib = 2; |
| 6430 | else if (cinfo.out_color_components > 1) | 6492 | else if (mgr->cinfo.out_color_components > 1) |
| 6431 | ir = 0, ig = 1, ib = 0; | 6493 | ir = 0, ig = 1, ib = 0; |
| 6432 | else | 6494 | else |
| 6433 | ir = 0, ig = 0, ib = 0; | 6495 | ir = 0, ig = 0, ib = 0; |
| @@ -6437,15 +6499,15 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6437 | a default color, and we don't have to care about which colors | 6499 | a default color, and we don't have to care about which colors |
| 6438 | can be freed safely, and which can't. */ | 6500 | can be freed safely, and which can't. */ |
| 6439 | init_color_table (); | 6501 | init_color_table (); |
| 6440 | colors = alloca (cinfo.actual_number_of_colors * sizeof *colors); | 6502 | colors = alloca (mgr->cinfo.actual_number_of_colors * sizeof *colors); |
| 6441 | 6503 | ||
| 6442 | for (i = 0; i < cinfo.actual_number_of_colors; ++i) | 6504 | for (i = 0; i < mgr->cinfo.actual_number_of_colors; ++i) |
| 6443 | { | 6505 | { |
| 6444 | /* Multiply RGB values with 255 because X expects RGB values | 6506 | /* Multiply RGB values with 255 because X expects RGB values |
| 6445 | in the range 0..0xffff. */ | 6507 | in the range 0..0xffff. */ |
| 6446 | int r = cinfo.colormap[ir][i] << 8; | 6508 | int r = mgr->cinfo.colormap[ir][i] << 8; |
| 6447 | int g = cinfo.colormap[ig][i] << 8; | 6509 | int g = mgr->cinfo.colormap[ig][i] << 8; |
| 6448 | int b = cinfo.colormap[ib][i] << 8; | 6510 | int b = mgr->cinfo.colormap[ib][i] << 8; |
| 6449 | colors[i] = lookup_rgb_color (f, r, g, b); | 6511 | colors[i] = lookup_rgb_color (f, r, g, b); |
| 6450 | } | 6512 | } |
| 6451 | 6513 | ||
| @@ -6457,21 +6519,21 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6457 | } | 6519 | } |
| 6458 | 6520 | ||
| 6459 | /* Read pixels. */ | 6521 | /* Read pixels. */ |
| 6460 | row_stride = width * cinfo.output_components; | 6522 | row_stride = width * mgr->cinfo.output_components; |
| 6461 | buffer = cinfo.mem->alloc_sarray ((j_common_ptr) &cinfo, JPOOL_IMAGE, | 6523 | buffer = mgr->cinfo.mem->alloc_sarray ((j_common_ptr) &mgr->cinfo, |
| 6462 | row_stride, 1); | 6524 | JPOOL_IMAGE, row_stride, 1); |
| 6463 | for (y = 0; y < height; ++y) | 6525 | for (y = 0; y < height; ++y) |
| 6464 | { | 6526 | { |
| 6465 | fn_jpeg_read_scanlines (&cinfo, buffer, 1); | 6527 | fn_jpeg_read_scanlines (&mgr->cinfo, buffer, 1); |
| 6466 | for (x = 0; x < cinfo.output_width; ++x) | 6528 | for (x = 0; x < mgr->cinfo.output_width; ++x) |
| 6467 | XPutPixel (ximg, x, y, colors[buffer[0][x]]); | 6529 | XPutPixel (ximg, x, y, colors[buffer[0][x]]); |
| 6468 | } | 6530 | } |
| 6469 | 6531 | ||
| 6470 | /* Clean up. */ | 6532 | /* Clean up. */ |
| 6471 | fn_jpeg_finish_decompress (&cinfo); | 6533 | fn_jpeg_finish_decompress (&mgr->cinfo); |
| 6472 | fn_jpeg_destroy_decompress (&cinfo); | 6534 | fn_jpeg_destroy_decompress (&mgr->cinfo); |
| 6473 | if (fp) | 6535 | if (fp) |
| 6474 | fclose ((FILE *) fp); | 6536 | fclose (fp); |
| 6475 | 6537 | ||
| 6476 | /* Maybe fill in the background field while we have ximg handy. */ | 6538 | /* Maybe fill in the background field while we have ximg handy. */ |
| 6477 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 6539 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| @@ -6484,6 +6546,13 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6484 | return 1; | 6546 | return 1; |
| 6485 | } | 6547 | } |
| 6486 | 6548 | ||
| 6549 | static int | ||
| 6550 | jpeg_load (struct frame *f, struct image *img) | ||
| 6551 | { | ||
| 6552 | struct my_jpeg_error_mgr mgr; | ||
| 6553 | return jpeg_load_body (f, img, &mgr); | ||
| 6554 | } | ||
| 6555 | |||
| 6487 | #else /* HAVE_JPEG */ | 6556 | #else /* HAVE_JPEG */ |
| 6488 | 6557 | ||
| 6489 | #ifdef HAVE_NS | 6558 | #ifdef HAVE_NS |
diff --git a/src/indent.c b/src/indent.c index c60315a7f6e..053643e6319 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <stdio.h> | 21 | #include <stdio.h> |
| 22 | #include <setjmp.h> | ||
| 23 | 22 | ||
| 24 | #include "lisp.h" | 23 | #include "lisp.h" |
| 25 | #include "character.h" | 24 | #include "character.h" |
diff --git a/src/insdel.c b/src/insdel.c index b12a390633e..87010cd8251 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | ||
| 23 | 22 | ||
| 24 | #include <intprops.h> | 23 | #include <intprops.h> |
| 25 | 24 | ||
| @@ -840,8 +839,7 @@ insert_1_both (const char *string, | |||
| 840 | PT + nchars, PT_BYTE + nbytes, | 839 | PT + nchars, PT_BYTE + nbytes, |
| 841 | before_markers); | 840 | before_markers); |
| 842 | 841 | ||
| 843 | if (buffer_intervals (current_buffer)) | 842 | offset_intervals (current_buffer, PT, nchars); |
| 844 | offset_intervals (current_buffer, PT, nchars); | ||
| 845 | 843 | ||
| 846 | if (!inherit && buffer_intervals (current_buffer)) | 844 | if (!inherit && buffer_intervals (current_buffer)) |
| 847 | set_text_properties (make_number (PT), make_number (PT + nchars), | 845 | set_text_properties (make_number (PT), make_number (PT + nchars), |
| @@ -1153,8 +1151,7 @@ insert_from_buffer_1 (struct buffer *buf, | |||
| 1153 | PT_BYTE + outgoing_nbytes, | 1151 | PT_BYTE + outgoing_nbytes, |
| 1154 | 0); | 1152 | 0); |
| 1155 | 1153 | ||
| 1156 | if (buffer_intervals (current_buffer)) | 1154 | offset_intervals (current_buffer, PT, nchars); |
| 1157 | offset_intervals (current_buffer, PT, nchars); | ||
| 1158 | 1155 | ||
| 1159 | /* Get the intervals for the part of the string we are inserting. */ | 1156 | /* Get the intervals for the part of the string we are inserting. */ |
| 1160 | intervals = buffer_intervals (buf); | 1157 | intervals = buffer_intervals (buf); |
| @@ -1222,8 +1219,7 @@ adjust_after_replace (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1222 | else if (len < nchars_del) | 1219 | else if (len < nchars_del) |
| 1223 | adjust_overlays_for_delete (from, nchars_del - len); | 1220 | adjust_overlays_for_delete (from, nchars_del - len); |
| 1224 | 1221 | ||
| 1225 | if (buffer_intervals (current_buffer)) | 1222 | offset_intervals (current_buffer, from, len - nchars_del); |
| 1226 | offset_intervals (current_buffer, from, len - nchars_del); | ||
| 1227 | 1223 | ||
| 1228 | if (from < PT) | 1224 | if (from < PT) |
| 1229 | adjust_point (len - nchars_del, len_byte - nbytes_del); | 1225 | adjust_point (len - nchars_del, len_byte - nbytes_del); |
| @@ -1394,16 +1390,16 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, | |||
| 1394 | 1390 | ||
| 1395 | eassert (GPT <= GPT_BYTE); | 1391 | eassert (GPT <= GPT_BYTE); |
| 1396 | 1392 | ||
| 1397 | /* Adjust the overlay center as needed. This must be done after | ||
| 1398 | adjusting the markers that bound the overlays. */ | ||
| 1399 | adjust_overlays_for_delete (from, nchars_del); | ||
| 1400 | adjust_overlays_for_insert (from, inschars); | ||
| 1401 | |||
| 1402 | /* Adjust markers for the deletion and the insertion. */ | 1393 | /* Adjust markers for the deletion and the insertion. */ |
| 1403 | if (markers) | 1394 | if (markers) |
| 1404 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, | 1395 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, |
| 1405 | inschars, outgoing_insbytes); | 1396 | inschars, outgoing_insbytes); |
| 1406 | 1397 | ||
| 1398 | /* Adjust the overlay center as needed. This must be done after | ||
| 1399 | adjusting the markers that bound the overlays. */ | ||
| 1400 | adjust_overlays_for_delete (from, nchars_del); | ||
| 1401 | adjust_overlays_for_insert (from, inschars); | ||
| 1402 | |||
| 1407 | offset_intervals (current_buffer, from, inschars - nchars_del); | 1403 | offset_intervals (current_buffer, from, inschars - nchars_del); |
| 1408 | 1404 | ||
| 1409 | /* Get the intervals for the part of the string we are inserting-- | 1405 | /* Get the intervals for the part of the string we are inserting-- |
| @@ -1510,6 +1506,12 @@ replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1510 | 1506 | ||
| 1511 | eassert (GPT <= GPT_BYTE); | 1507 | eassert (GPT <= GPT_BYTE); |
| 1512 | 1508 | ||
| 1509 | /* Adjust markers for the deletion and the insertion. */ | ||
| 1510 | if (markers | ||
| 1511 | && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) | ||
| 1512 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, | ||
| 1513 | inschars, insbytes); | ||
| 1514 | |||
| 1513 | /* Adjust the overlay center as needed. This must be done after | 1515 | /* Adjust the overlay center as needed. This must be done after |
| 1514 | adjusting the markers that bound the overlays. */ | 1516 | adjusting the markers that bound the overlays. */ |
| 1515 | if (nchars_del != inschars) | 1517 | if (nchars_del != inschars) |
| @@ -1518,12 +1520,6 @@ replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1518 | adjust_overlays_for_delete (from + inschars, nchars_del); | 1520 | adjust_overlays_for_delete (from + inschars, nchars_del); |
| 1519 | } | 1521 | } |
| 1520 | 1522 | ||
| 1521 | /* Adjust markers for the deletion and the insertion. */ | ||
| 1522 | if (markers | ||
| 1523 | && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) | ||
| 1524 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, | ||
| 1525 | inschars, insbytes); | ||
| 1526 | |||
| 1527 | offset_intervals (current_buffer, from, inschars - nchars_del); | 1523 | offset_intervals (current_buffer, from, inschars - nchars_del); |
| 1528 | 1524 | ||
| 1529 | /* Relocate point as if it were a marker. */ | 1525 | /* Relocate point as if it were a marker. */ |
diff --git a/src/intervals.c b/src/intervals.c index e508f968963..584ee1e923d 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -41,7 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 41 | 41 | ||
| 42 | #define INTERVALS_INLINE EXTERN_INLINE | 42 | #define INTERVALS_INLINE EXTERN_INLINE |
| 43 | 43 | ||
| 44 | #include <setjmp.h> | ||
| 45 | #include <intprops.h> | 44 | #include <intprops.h> |
| 46 | #include "lisp.h" | 45 | #include "lisp.h" |
| 47 | #include "intervals.h" | 46 | #include "intervals.h" |
| @@ -674,8 +673,7 @@ find_interval (register INTERVAL tree, register ptrdiff_t position) | |||
| 674 | 673 | ||
| 675 | eassert (relative_position <= TOTAL_LENGTH (tree)); | 674 | eassert (relative_position <= TOTAL_LENGTH (tree)); |
| 676 | 675 | ||
| 677 | if (!handling_signal) | 676 | tree = balance_possible_root_interval (tree); |
| 678 | tree = balance_possible_root_interval (tree); | ||
| 679 | 677 | ||
| 680 | while (1) | 678 | while (1) |
| 681 | { | 679 | { |
diff --git a/src/keyboard.c b/src/keyboard.c index de48b53053b..c80f1d61e77 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -22,7 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #define KEYBOARD_INLINE EXTERN_INLINE | 22 | #define KEYBOARD_INLINE EXTERN_INLINE |
| 23 | 23 | ||
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <setjmp.h> | 25 | |
| 26 | #include "lisp.h" | 26 | #include "lisp.h" |
| 27 | #include "termchar.h" | 27 | #include "termchar.h" |
| 28 | #include "termopts.h" | 28 | #include "termopts.h" |
| @@ -56,6 +56,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 56 | #include <sys/ioctl.h> | 56 | #include <sys/ioctl.h> |
| 57 | #endif /* not MSDOS */ | 57 | #endif /* not MSDOS */ |
| 58 | 58 | ||
| 59 | #if defined USABLE_FIONREAD && defined USG5_4 | ||
| 60 | # include <sys/filio.h> | ||
| 61 | #endif | ||
| 62 | |||
| 59 | #include "syssignal.h" | 63 | #include "syssignal.h" |
| 60 | 64 | ||
| 61 | #include <sys/types.h> | 65 | #include <sys/types.h> |
| @@ -80,9 +84,7 @@ int interrupt_input_pending; | |||
| 80 | pending_atimers separately, to reduce code size. So, any code that | 84 | pending_atimers separately, to reduce code size. So, any code that |
| 81 | changes interrupt_input_pending or pending_atimers should update | 85 | changes interrupt_input_pending or pending_atimers should update |
| 82 | this too. */ | 86 | this too. */ |
| 83 | #ifdef SYNC_INPUT | ||
| 84 | int pending_signals; | 87 | int pending_signals; |
| 85 | #endif | ||
| 86 | 88 | ||
| 87 | #define KBD_BUFFER_SIZE 4096 | 89 | #define KBD_BUFFER_SIZE 4096 |
| 88 | 90 | ||
| @@ -141,7 +143,7 @@ static ptrdiff_t before_command_echo_length; | |||
| 141 | 143 | ||
| 142 | /* For longjmp to where kbd input is being done. */ | 144 | /* For longjmp to where kbd input is being done. */ |
| 143 | 145 | ||
| 144 | static jmp_buf getcjmp; | 146 | static sys_jmp_buf getcjmp; |
| 145 | 147 | ||
| 146 | /* True while doing kbd input. */ | 148 | /* True while doing kbd input. */ |
| 147 | int waiting_for_input; | 149 | int waiting_for_input; |
| @@ -388,19 +390,6 @@ int interrupt_input; | |||
| 388 | /* Nonzero while interrupts are temporarily deferred during redisplay. */ | 390 | /* Nonzero while interrupts are temporarily deferred during redisplay. */ |
| 389 | int interrupts_deferred; | 391 | int interrupts_deferred; |
| 390 | 392 | ||
| 391 | /* Allow configure to inhibit use of FIONREAD. */ | ||
| 392 | #ifdef BROKEN_FIONREAD | ||
| 393 | #undef FIONREAD | ||
| 394 | #endif | ||
| 395 | |||
| 396 | /* We are unable to use interrupts if FIONREAD is not available, | ||
| 397 | so flush SIGIO so we won't try. */ | ||
| 398 | #if !defined (FIONREAD) | ||
| 399 | #ifdef SIGIO | ||
| 400 | #undef SIGIO | ||
| 401 | #endif | ||
| 402 | #endif | ||
| 403 | |||
| 404 | /* If we support a window system, turn on the code to poll periodically | 393 | /* If we support a window system, turn on the code to poll periodically |
| 405 | to detect C-g. It isn't actually used when doing interrupt input. */ | 394 | to detect C-g. It isn't actually used when doing interrupt input. */ |
| 406 | #if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS) | 395 | #if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS) |
| @@ -446,12 +435,12 @@ static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object, | |||
| 446 | Lisp_Object *, ptrdiff_t); | 435 | Lisp_Object *, ptrdiff_t); |
| 447 | static Lisp_Object make_lispy_switch_frame (Lisp_Object); | 436 | static Lisp_Object make_lispy_switch_frame (Lisp_Object); |
| 448 | static int help_char_p (Lisp_Object); | 437 | static int help_char_p (Lisp_Object); |
| 449 | static void save_getcjmp (jmp_buf); | 438 | static void save_getcjmp (sys_jmp_buf); |
| 450 | static void restore_getcjmp (jmp_buf); | 439 | static void restore_getcjmp (sys_jmp_buf); |
| 451 | static Lisp_Object apply_modifiers (int, Lisp_Object); | 440 | static Lisp_Object apply_modifiers (int, Lisp_Object); |
| 452 | static void clear_event (struct input_event *); | 441 | static void clear_event (struct input_event *); |
| 453 | static Lisp_Object restore_kboard_configuration (Lisp_Object); | 442 | static Lisp_Object restore_kboard_configuration (Lisp_Object); |
| 454 | #ifdef SIGIO | 443 | #ifdef USABLE_SIGIO |
| 455 | static void deliver_input_available_signal (int signo); | 444 | static void deliver_input_available_signal (int signo); |
| 456 | #endif | 445 | #endif |
| 457 | static void handle_interrupt (void); | 446 | static void handle_interrupt (void); |
| @@ -2022,17 +2011,9 @@ static struct atimer *poll_timer; | |||
| 2022 | void | 2011 | void |
| 2023 | poll_for_input_1 (void) | 2012 | poll_for_input_1 (void) |
| 2024 | { | 2013 | { |
| 2025 | /* Tell ns_read_socket() it is being called asynchronously so it can avoid | ||
| 2026 | doing anything dangerous. */ | ||
| 2027 | #ifdef HAVE_NS | ||
| 2028 | ++handling_signal; | ||
| 2029 | #endif | ||
| 2030 | if (interrupt_input_blocked == 0 | 2014 | if (interrupt_input_blocked == 0 |
| 2031 | && !waiting_for_input) | 2015 | && !waiting_for_input) |
| 2032 | read_avail_input (0); | 2016 | read_avail_input (0); |
| 2033 | #ifdef HAVE_NS | ||
| 2034 | --handling_signal; | ||
| 2035 | #endif | ||
| 2036 | } | 2017 | } |
| 2037 | 2018 | ||
| 2038 | /* Timer callback function for poll_timer. TIMER is equal to | 2019 | /* Timer callback function for poll_timer. TIMER is equal to |
| @@ -2043,12 +2024,8 @@ poll_for_input (struct atimer *timer) | |||
| 2043 | { | 2024 | { |
| 2044 | if (poll_suppress_count == 0) | 2025 | if (poll_suppress_count == 0) |
| 2045 | { | 2026 | { |
| 2046 | #ifdef SYNC_INPUT | ||
| 2047 | interrupt_input_pending = 1; | 2027 | interrupt_input_pending = 1; |
| 2048 | pending_signals = 1; | 2028 | pending_signals = 1; |
| 2049 | #else | ||
| 2050 | poll_for_input_1 (); | ||
| 2051 | #endif | ||
| 2052 | } | 2029 | } |
| 2053 | } | 2030 | } |
| 2054 | 2031 | ||
| @@ -2327,8 +2304,8 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, | |||
| 2327 | { | 2304 | { |
| 2328 | volatile Lisp_Object c; | 2305 | volatile Lisp_Object c; |
| 2329 | ptrdiff_t jmpcount; | 2306 | ptrdiff_t jmpcount; |
| 2330 | jmp_buf local_getcjmp; | 2307 | sys_jmp_buf local_getcjmp; |
| 2331 | jmp_buf save_jump; | 2308 | sys_jmp_buf save_jump; |
| 2332 | volatile int key_already_recorded = 0; | 2309 | volatile int key_already_recorded = 0; |
| 2333 | Lisp_Object tem, save; | 2310 | Lisp_Object tem, save; |
| 2334 | volatile Lisp_Object previous_echo_area_message; | 2311 | volatile Lisp_Object previous_echo_area_message; |
| @@ -2574,7 +2551,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, | |||
| 2574 | it *must not* be in effect when we call redisplay. */ | 2551 | it *must not* be in effect when we call redisplay. */ |
| 2575 | 2552 | ||
| 2576 | jmpcount = SPECPDL_INDEX (); | 2553 | jmpcount = SPECPDL_INDEX (); |
| 2577 | if (_setjmp (local_getcjmp)) | 2554 | if (sys_setjmp (local_getcjmp)) |
| 2578 | { | 2555 | { |
| 2579 | /* Handle quits while reading the keyboard. */ | 2556 | /* Handle quits while reading the keyboard. */ |
| 2580 | /* We must have saved the outer value of getcjmp here, | 2557 | /* We must have saved the outer value of getcjmp here, |
| @@ -3406,13 +3383,13 @@ record_char (Lisp_Object c) | |||
| 3406 | See read_process_output. */ | 3383 | See read_process_output. */ |
| 3407 | 3384 | ||
| 3408 | static void | 3385 | static void |
| 3409 | save_getcjmp (jmp_buf temp) | 3386 | save_getcjmp (sys_jmp_buf temp) |
| 3410 | { | 3387 | { |
| 3411 | memcpy (temp, getcjmp, sizeof getcjmp); | 3388 | memcpy (temp, getcjmp, sizeof getcjmp); |
| 3412 | } | 3389 | } |
| 3413 | 3390 | ||
| 3414 | static void | 3391 | static void |
| 3415 | restore_getcjmp (jmp_buf temp) | 3392 | restore_getcjmp (sys_jmp_buf temp) |
| 3416 | { | 3393 | { |
| 3417 | memcpy (getcjmp, temp, sizeof getcjmp); | 3394 | memcpy (getcjmp, temp, sizeof getcjmp); |
| 3418 | } | 3395 | } |
| @@ -3649,10 +3626,8 @@ kbd_buffer_store_event_hold (register struct input_event *event, | |||
| 3649 | /* Don't read keyboard input until we have processed kbd_buffer. | 3626 | /* Don't read keyboard input until we have processed kbd_buffer. |
| 3650 | This happens when pasting text longer than KBD_BUFFER_SIZE/2. */ | 3627 | This happens when pasting text longer than KBD_BUFFER_SIZE/2. */ |
| 3651 | hold_keyboard_input (); | 3628 | hold_keyboard_input (); |
| 3652 | #ifdef SIGIO | ||
| 3653 | if (!noninteractive) | 3629 | if (!noninteractive) |
| 3654 | signal (SIGIO, SIG_IGN); | 3630 | ignore_sigio (); |
| 3655 | #endif | ||
| 3656 | stop_polling (); | 3631 | stop_polling (); |
| 3657 | } | 3632 | } |
| 3658 | #endif /* subprocesses */ | 3633 | #endif /* subprocesses */ |
| @@ -3821,14 +3796,14 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3821 | /* Start reading input again, we have processed enough so we can | 3796 | /* Start reading input again, we have processed enough so we can |
| 3822 | accept new events again. */ | 3797 | accept new events again. */ |
| 3823 | unhold_keyboard_input (); | 3798 | unhold_keyboard_input (); |
| 3824 | #ifdef SIGIO | 3799 | #ifdef USABLE_SIGIO |
| 3825 | if (!noninteractive) | 3800 | if (!noninteractive) |
| 3826 | { | 3801 | { |
| 3827 | struct sigaction action; | 3802 | struct sigaction action; |
| 3828 | emacs_sigaction_init (&action, deliver_input_available_signal); | 3803 | emacs_sigaction_init (&action, deliver_input_available_signal); |
| 3829 | sigaction (SIGIO, &action, 0); | 3804 | sigaction (SIGIO, &action, 0); |
| 3830 | } | 3805 | } |
| 3831 | #endif /* SIGIO */ | 3806 | #endif |
| 3832 | start_polling (); | 3807 | start_polling (); |
| 3833 | } | 3808 | } |
| 3834 | #endif /* subprocesses */ | 3809 | #endif /* subprocesses */ |
| @@ -3870,10 +3845,9 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3870 | /* One way or another, wait until input is available; then, if | 3845 | /* One way or another, wait until input is available; then, if |
| 3871 | interrupt handlers have not read it, read it now. */ | 3846 | interrupt handlers have not read it, read it now. */ |
| 3872 | 3847 | ||
| 3873 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | 3848 | #ifdef USABLE_SIGIO |
| 3874 | #ifdef SIGIO | ||
| 3875 | gobble_input (0); | 3849 | gobble_input (0); |
| 3876 | #endif /* SIGIO */ | 3850 | #endif |
| 3877 | if (kbd_fetch_ptr != kbd_store_ptr) | 3851 | if (kbd_fetch_ptr != kbd_store_ptr) |
| 3878 | break; | 3852 | break; |
| 3879 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | 3853 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) |
| @@ -4352,7 +4326,7 @@ decode_timer (Lisp_Object timer, EMACS_TIME *result) | |||
| 4352 | if (! NILP (vector[0])) | 4326 | if (! NILP (vector[0])) |
| 4353 | return 0; | 4327 | return 0; |
| 4354 | 4328 | ||
| 4355 | return decode_time_components (vector[1], vector[2], vector[3], vector[4], | 4329 | return decode_time_components (vector[1], vector[2], vector[3], vector[8], |
| 4356 | result, 0); | 4330 | result, 0); |
| 4357 | } | 4331 | } |
| 4358 | 4332 | ||
| @@ -4554,7 +4528,7 @@ in the same style as (current-time). | |||
| 4554 | 4528 | ||
| 4555 | The value when Emacs is not idle is nil. | 4529 | The value when Emacs is not idle is nil. |
| 4556 | 4530 | ||
| 4557 | NSEC is a multiple of the system clock resolution. */) | 4531 | PSEC is a multiple of the system clock resolution. */) |
| 4558 | (void) | 4532 | (void) |
| 4559 | { | 4533 | { |
| 4560 | if (EMACS_TIME_VALID_P (timer_idleness_start_time)) | 4534 | if (EMACS_TIME_VALID_P (timer_idleness_start_time)) |
| @@ -6785,7 +6759,7 @@ get_input_pending (int *addr, int flags) | |||
| 6785 | void | 6759 | void |
| 6786 | gobble_input (int expected) | 6760 | gobble_input (int expected) |
| 6787 | { | 6761 | { |
| 6788 | #ifdef SIGIO | 6762 | #ifdef USABLE_SIGIO |
| 6789 | if (interrupt_input) | 6763 | if (interrupt_input) |
| 6790 | { | 6764 | { |
| 6791 | sigset_t blocked, procmask; | 6765 | sigset_t blocked, procmask; |
| @@ -6840,7 +6814,7 @@ record_asynch_buffer_change (void) | |||
| 6840 | return; | 6814 | return; |
| 6841 | 6815 | ||
| 6842 | /* Make sure no interrupt happens while storing the event. */ | 6816 | /* Make sure no interrupt happens while storing the event. */ |
| 6843 | #ifdef SIGIO | 6817 | #ifdef USABLE_SIGIO |
| 6844 | if (interrupt_input) | 6818 | if (interrupt_input) |
| 6845 | { | 6819 | { |
| 6846 | sigset_t blocked, procmask; | 6820 | sigset_t blocked, procmask; |
| @@ -7066,7 +7040,7 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7066 | #endif /* HAVE_GPM */ | 7040 | #endif /* HAVE_GPM */ |
| 7067 | 7041 | ||
| 7068 | /* Determine how many characters we should *try* to read. */ | 7042 | /* Determine how many characters we should *try* to read. */ |
| 7069 | #ifdef FIONREAD | 7043 | #ifdef USABLE_FIONREAD |
| 7070 | /* Find out how much input is available. */ | 7044 | /* Find out how much input is available. */ |
| 7071 | if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0) | 7045 | if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0) |
| 7072 | { | 7046 | { |
| @@ -7079,14 +7053,12 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7079 | return 0; | 7053 | return 0; |
| 7080 | if (n_to_read > sizeof cbuf) | 7054 | if (n_to_read > sizeof cbuf) |
| 7081 | n_to_read = sizeof cbuf; | 7055 | n_to_read = sizeof cbuf; |
| 7082 | #else /* no FIONREAD */ | 7056 | #elif defined USG || defined CYGWIN |
| 7083 | #if defined (USG) || defined (CYGWIN) | ||
| 7084 | /* Read some input if available, but don't wait. */ | 7057 | /* Read some input if available, but don't wait. */ |
| 7085 | n_to_read = sizeof cbuf; | 7058 | n_to_read = sizeof cbuf; |
| 7086 | fcntl (fileno (tty->input), F_SETFL, O_NDELAY); | 7059 | fcntl (fileno (tty->input), F_SETFL, O_NDELAY); |
| 7087 | #else | 7060 | #else |
| 7088 | you lose; | 7061 | # error "Cannot read without possibly delaying" |
| 7089 | #endif | ||
| 7090 | #endif | 7062 | #endif |
| 7091 | 7063 | ||
| 7092 | #ifdef subprocesses | 7064 | #ifdef subprocesses |
| @@ -7135,7 +7107,7 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7135 | #endif | 7107 | #endif |
| 7136 | ); | 7108 | ); |
| 7137 | 7109 | ||
| 7138 | #ifndef FIONREAD | 7110 | #ifndef USABLE_FIONREAD |
| 7139 | #if defined (USG) || defined (CYGWIN) | 7111 | #if defined (USG) || defined (CYGWIN) |
| 7140 | fcntl (fileno (tty->input), F_SETFL, 0); | 7112 | fcntl (fileno (tty->input), F_SETFL, 0); |
| 7141 | #endif /* USG or CYGWIN */ | 7113 | #endif /* USG or CYGWIN */ |
| @@ -7206,19 +7178,12 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7206 | return nread; | 7178 | return nread; |
| 7207 | } | 7179 | } |
| 7208 | 7180 | ||
| 7209 | #if defined SYNC_INPUT || defined SIGIO | ||
| 7210 | static void | 7181 | static void |
| 7211 | handle_async_input (void) | 7182 | handle_async_input (void) |
| 7212 | { | 7183 | { |
| 7213 | interrupt_input_pending = 0; | 7184 | interrupt_input_pending = 0; |
| 7214 | #ifdef SYNC_INPUT | ||
| 7215 | pending_signals = pending_atimers; | 7185 | pending_signals = pending_atimers; |
| 7216 | #endif | 7186 | |
| 7217 | /* Tell ns_read_socket() it is being called asynchronously so it can avoid | ||
| 7218 | doing anything dangerous. */ | ||
| 7219 | #ifdef HAVE_NS | ||
| 7220 | ++handling_signal; | ||
| 7221 | #endif | ||
| 7222 | while (1) | 7187 | while (1) |
| 7223 | { | 7188 | { |
| 7224 | int nread; | 7189 | int nread; |
| @@ -7229,13 +7194,8 @@ handle_async_input (void) | |||
| 7229 | if (nread <= 0) | 7194 | if (nread <= 0) |
| 7230 | break; | 7195 | break; |
| 7231 | } | 7196 | } |
| 7232 | #ifdef HAVE_NS | ||
| 7233 | --handling_signal; | ||
| 7234 | #endif | ||
| 7235 | } | 7197 | } |
| 7236 | #endif /* SYNC_INPUT || SIGIO */ | ||
| 7237 | 7198 | ||
| 7238 | #ifdef SYNC_INPUT | ||
| 7239 | void | 7199 | void |
| 7240 | process_pending_signals (void) | 7200 | process_pending_signals (void) |
| 7241 | { | 7201 | { |
| @@ -7243,25 +7203,17 @@ process_pending_signals (void) | |||
| 7243 | handle_async_input (); | 7203 | handle_async_input (); |
| 7244 | do_pending_atimers (); | 7204 | do_pending_atimers (); |
| 7245 | } | 7205 | } |
| 7246 | #endif | ||
| 7247 | 7206 | ||
| 7248 | #ifdef SIGIO /* for entire page */ | 7207 | #ifdef USABLE_SIGIO |
| 7249 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | ||
| 7250 | 7208 | ||
| 7251 | static void | 7209 | static void |
| 7252 | handle_input_available_signal (int sig) | 7210 | handle_input_available_signal (int sig) |
| 7253 | { | 7211 | { |
| 7254 | #ifdef SYNC_INPUT | ||
| 7255 | interrupt_input_pending = 1; | 7212 | interrupt_input_pending = 1; |
| 7256 | pending_signals = 1; | 7213 | pending_signals = 1; |
| 7257 | #endif | ||
| 7258 | 7214 | ||
| 7259 | if (input_available_clear_time) | 7215 | if (input_available_clear_time) |
| 7260 | *input_available_clear_time = make_emacs_time (0, 0); | 7216 | *input_available_clear_time = make_emacs_time (0, 0); |
| 7261 | |||
| 7262 | #ifndef SYNC_INPUT | ||
| 7263 | handle_async_input (); | ||
| 7264 | #endif | ||
| 7265 | } | 7217 | } |
| 7266 | 7218 | ||
| 7267 | static void | 7219 | static void |
| @@ -7269,7 +7221,7 @@ deliver_input_available_signal (int sig) | |||
| 7269 | { | 7221 | { |
| 7270 | handle_on_main_thread (sig, handle_input_available_signal); | 7222 | handle_on_main_thread (sig, handle_input_available_signal); |
| 7271 | } | 7223 | } |
| 7272 | #endif /* SIGIO */ | 7224 | #endif /* USABLE_SIGIO */ |
| 7273 | 7225 | ||
| 7274 | /* Send ourselves a SIGIO. | 7226 | /* Send ourselves a SIGIO. |
| 7275 | 7227 | ||
| @@ -7280,7 +7232,7 @@ deliver_input_available_signal (int sig) | |||
| 7280 | void | 7232 | void |
| 7281 | reinvoke_input_signal (void) | 7233 | reinvoke_input_signal (void) |
| 7282 | { | 7234 | { |
| 7283 | #ifdef SIGIO | 7235 | #ifdef USABLE_SIGIO |
| 7284 | handle_async_input (); | 7236 | handle_async_input (); |
| 7285 | #endif | 7237 | #endif |
| 7286 | } | 7238 | } |
| @@ -7354,7 +7306,7 @@ handle_user_signal (int sig) | |||
| 7354 | } | 7306 | } |
| 7355 | 7307 | ||
| 7356 | p->npending++; | 7308 | p->npending++; |
| 7357 | #ifdef SIGIO | 7309 | #ifdef USABLE_SIGIO |
| 7358 | if (interrupt_input) | 7310 | if (interrupt_input) |
| 7359 | kill (getpid (), SIGIO); | 7311 | kill (getpid (), SIGIO); |
| 7360 | else | 7312 | else |
| @@ -11010,7 +10962,7 @@ quit_throw_to_read_char (int from_signal) | |||
| 11010 | do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), | 10962 | do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), |
| 11011 | 0, 0, Qnil); | 10963 | 0, 0, Qnil); |
| 11012 | 10964 | ||
| 11013 | _longjmp (getcjmp, 1); | 10965 | sys_longjmp (getcjmp, 1); |
| 11014 | } | 10966 | } |
| 11015 | 10967 | ||
| 11016 | DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, | 10968 | DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, |
| @@ -11023,8 +10975,7 @@ See also `current-input-mode'. */) | |||
| 11023 | (Lisp_Object interrupt) | 10975 | (Lisp_Object interrupt) |
| 11024 | { | 10976 | { |
| 11025 | int new_interrupt_input; | 10977 | int new_interrupt_input; |
| 11026 | #ifdef SIGIO | 10978 | #ifdef USABLE_SIGIO |
| 11027 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | ||
| 11028 | #ifdef HAVE_X_WINDOWS | 10979 | #ifdef HAVE_X_WINDOWS |
| 11029 | if (x_display_list != NULL) | 10980 | if (x_display_list != NULL) |
| 11030 | { | 10981 | { |
| @@ -11035,9 +10986,9 @@ See also `current-input-mode'. */) | |||
| 11035 | else | 10986 | else |
| 11036 | #endif /* HAVE_X_WINDOWS */ | 10987 | #endif /* HAVE_X_WINDOWS */ |
| 11037 | new_interrupt_input = !NILP (interrupt); | 10988 | new_interrupt_input = !NILP (interrupt); |
| 11038 | #else /* not SIGIO */ | 10989 | #else /* not USABLE_SIGIO */ |
| 11039 | new_interrupt_input = 0; | 10990 | new_interrupt_input = 0; |
| 11040 | #endif /* not SIGIO */ | 10991 | #endif /* not USABLE_SIGIO */ |
| 11041 | 10992 | ||
| 11042 | if (new_interrupt_input != interrupt_input) | 10993 | if (new_interrupt_input != interrupt_input) |
| 11043 | { | 10994 | { |
| @@ -11397,9 +11348,7 @@ init_keyboard (void) | |||
| 11397 | input_pending = 0; | 11348 | input_pending = 0; |
| 11398 | interrupt_input_blocked = 0; | 11349 | interrupt_input_blocked = 0; |
| 11399 | interrupt_input_pending = 0; | 11350 | interrupt_input_pending = 0; |
| 11400 | #ifdef SYNC_INPUT | ||
| 11401 | pending_signals = 0; | 11351 | pending_signals = 0; |
| 11402 | #endif | ||
| 11403 | 11352 | ||
| 11404 | /* This means that command_loop_1 won't try to select anything the first | 11353 | /* This means that command_loop_1 won't try to select anything the first |
| 11405 | time through. */ | 11354 | time through. */ |
| @@ -11431,15 +11380,14 @@ init_keyboard (void) | |||
| 11431 | sigaction (SIGQUIT, &action, 0); | 11380 | sigaction (SIGQUIT, &action, 0); |
| 11432 | #endif /* not DOS_NT */ | 11381 | #endif /* not DOS_NT */ |
| 11433 | } | 11382 | } |
| 11434 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | 11383 | #ifdef USABLE_SIGIO |
| 11435 | #ifdef SIGIO | ||
| 11436 | if (!noninteractive) | 11384 | if (!noninteractive) |
| 11437 | { | 11385 | { |
| 11438 | struct sigaction action; | 11386 | struct sigaction action; |
| 11439 | emacs_sigaction_init (&action, deliver_input_available_signal); | 11387 | emacs_sigaction_init (&action, deliver_input_available_signal); |
| 11440 | sigaction (SIGIO, &action, 0); | 11388 | sigaction (SIGIO, &action, 0); |
| 11441 | } | 11389 | } |
| 11442 | #endif /* SIGIO */ | 11390 | #endif |
| 11443 | 11391 | ||
| 11444 | /* Use interrupt input by default, if it works and noninterrupt input | 11392 | /* Use interrupt input by default, if it works and noninterrupt input |
| 11445 | has deficiencies. */ | 11393 | has deficiencies. */ |
diff --git a/src/keymap.c b/src/keymap.c index d79ff89ed67..66fb52061f9 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -40,7 +40,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 40 | 40 | ||
| 41 | #include <config.h> | 41 | #include <config.h> |
| 42 | #include <stdio.h> | 42 | #include <stdio.h> |
| 43 | #include <setjmp.h> | 43 | |
| 44 | #include "lisp.h" | 44 | #include "lisp.h" |
| 45 | #include "commands.h" | 45 | #include "commands.h" |
| 46 | #include "character.h" | 46 | #include "character.h" |
diff --git a/src/lisp.h b/src/lisp.h index 41fa274a562..37416dc9464 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #ifndef EMACS_LISP_H | 20 | #ifndef EMACS_LISP_H |
| 21 | #define EMACS_LISP_H | 21 | #define EMACS_LISP_H |
| 22 | 22 | ||
| 23 | #include <setjmp.h> | ||
| 23 | #include <stdalign.h> | 24 | #include <stdalign.h> |
| 24 | #include <stdarg.h> | 25 | #include <stdarg.h> |
| 25 | #include <stdbool.h> | 26 | #include <stdbool.h> |
| @@ -1968,7 +1969,25 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int); | |||
| 1968 | static struct Lisp_Kboard_Objfwd ko_fwd; \ | 1969 | static struct Lisp_Kboard_Objfwd ko_fwd; \ |
| 1969 | defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ | 1970 | defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ |
| 1970 | } while (0) | 1971 | } while (0) |
| 1971 | 1972 | ||
| 1973 | /* Save and restore the instruction and environment pointers, | ||
| 1974 | without affecting the signal mask. */ | ||
| 1975 | |||
| 1976 | #ifdef HAVE__SETJMP | ||
| 1977 | typedef jmp_buf sys_jmp_buf; | ||
| 1978 | # define sys_setjmp(j) _setjmp (j) | ||
| 1979 | # define sys_longjmp(j, v) _longjmp (j, v) | ||
| 1980 | #elif defined HAVE_SIGSETJMP | ||
| 1981 | typedef sigjmp_buf sys_jmp_buf; | ||
| 1982 | # define sys_setjmp(j) sigsetjmp (j, 0) | ||
| 1983 | # define sys_longjmp(j, v) siglongjmp (j, v) | ||
| 1984 | #else | ||
| 1985 | /* A platform that uses neither _longjmp nor siglongjmp; assume | ||
| 1986 | longjmp does not affect the sigmask. */ | ||
| 1987 | typedef jmp_buf sys_jmp_buf; | ||
| 1988 | # define sys_setjmp(j) setjmp (j) | ||
| 1989 | # define sys_longjmp(j, v) longjmp (j, v) | ||
| 1990 | #endif | ||
| 1972 | 1991 | ||
| 1973 | 1992 | ||
| 1974 | /* Structure for recording Lisp call stack for backtrace purposes. */ | 1993 | /* Structure for recording Lisp call stack for backtrace purposes. */ |
| @@ -2061,7 +2080,7 @@ struct catchtag | |||
| 2061 | Lisp_Object volatile val; | 2080 | Lisp_Object volatile val; |
| 2062 | struct catchtag *volatile next; | 2081 | struct catchtag *volatile next; |
| 2063 | struct gcpro *gcpro; | 2082 | struct gcpro *gcpro; |
| 2064 | jmp_buf jmp; | 2083 | sys_jmp_buf jmp; |
| 2065 | struct backtrace *backlist; | 2084 | struct backtrace *backlist; |
| 2066 | struct handler *handlerlist; | 2085 | struct handler *handlerlist; |
| 2067 | EMACS_INT lisp_eval_depth; | 2086 | EMACS_INT lisp_eval_depth; |
| @@ -2093,22 +2112,16 @@ extern char *stack_bottom; | |||
| 2093 | If quit-flag is set to `kill-emacs' the SIGINT handler has received | 2112 | If quit-flag is set to `kill-emacs' the SIGINT handler has received |
| 2094 | a request to exit Emacs when it is safe to do. */ | 2113 | a request to exit Emacs when it is safe to do. */ |
| 2095 | 2114 | ||
| 2096 | #ifdef SYNC_INPUT | ||
| 2097 | extern void process_pending_signals (void); | 2115 | extern void process_pending_signals (void); |
| 2098 | extern int pending_signals; | 2116 | extern int pending_signals; |
| 2099 | #define ELSE_PENDING_SIGNALS \ | ||
| 2100 | else if (pending_signals) \ | ||
| 2101 | process_pending_signals (); | ||
| 2102 | #else /* not SYNC_INPUT */ | ||
| 2103 | #define ELSE_PENDING_SIGNALS | ||
| 2104 | #endif /* not SYNC_INPUT */ | ||
| 2105 | 2117 | ||
| 2106 | extern void process_quit_flag (void); | 2118 | extern void process_quit_flag (void); |
| 2107 | #define QUIT \ | 2119 | #define QUIT \ |
| 2108 | do { \ | 2120 | do { \ |
| 2109 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 2121 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 2110 | process_quit_flag (); \ | 2122 | process_quit_flag (); \ |
| 2111 | ELSE_PENDING_SIGNALS \ | 2123 | else if (pending_signals) \ |
| 2124 | process_pending_signals (); \ | ||
| 2112 | } while (0) | 2125 | } while (0) |
| 2113 | 2126 | ||
| 2114 | 2127 | ||
| @@ -2832,8 +2845,6 @@ extern void memory_warnings (void *, void (*warnfun) (const char *)); | |||
| 2832 | /* Defined in alloc.c. */ | 2845 | /* Defined in alloc.c. */ |
| 2833 | extern void check_pure_size (void); | 2846 | extern void check_pure_size (void); |
| 2834 | extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT); | 2847 | extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT); |
| 2835 | extern void reset_malloc_hooks (void); | ||
| 2836 | extern void uninterrupt_malloc (void); | ||
| 2837 | extern void malloc_warning (const char *); | 2848 | extern void malloc_warning (const char *); |
| 2838 | extern _Noreturn void memory_full (size_t); | 2849 | extern _Noreturn void memory_full (size_t); |
| 2839 | extern _Noreturn void buffer_memory_full (ptrdiff_t); | 2850 | extern _Noreturn void buffer_memory_full (ptrdiff_t); |
| @@ -3029,7 +3040,6 @@ extern Lisp_Object Qand_rest; | |||
| 3029 | extern Lisp_Object Vautoload_queue; | 3040 | extern Lisp_Object Vautoload_queue; |
| 3030 | extern Lisp_Object Vsignaling_function; | 3041 | extern Lisp_Object Vsignaling_function; |
| 3031 | extern Lisp_Object inhibit_lisp_code; | 3042 | extern Lisp_Object inhibit_lisp_code; |
| 3032 | extern int handling_signal; | ||
| 3033 | #if BYTE_MARK_STACK | 3043 | #if BYTE_MARK_STACK |
| 3034 | extern struct catchtag *catchlist; | 3044 | extern struct catchtag *catchlist; |
| 3035 | extern struct handler *handlerlist; | 3045 | extern struct handler *handlerlist; |
diff --git a/src/lread.c b/src/lread.c index 08a2e856c00..08d5f97292b 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include <sys/file.h> | 25 | #include <sys/file.h> |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | #include <limits.h> /* For CHAR_BIT. */ | 27 | #include <limits.h> /* For CHAR_BIT. */ |
| 28 | #include <setjmp.h> | ||
| 29 | #include <stat-time.h> | 28 | #include <stat-time.h> |
| 30 | #include "lisp.h" | 29 | #include "lisp.h" |
| 31 | #include "intervals.h" | 30 | #include "intervals.h" |
diff --git a/src/macros.c b/src/macros.c index e81068181b9..a507f12e343 100644 --- a/src/macros.c +++ b/src/macros.c | |||
| @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "macros.h" | 24 | #include "macros.h" |
| 25 | #include "commands.h" | 25 | #include "commands.h" |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 7b9c67bf135..24ecb2676da 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -482,7 +482,6 @@ WINDOW_H = $(SRC)/window.h \ | |||
| 482 | $(BLD)/alloc.$(O) : \ | 482 | $(BLD)/alloc.$(O) : \ |
| 483 | $(SRC)/alloc.c \ | 483 | $(SRC)/alloc.c \ |
| 484 | $(SRC)/puresize.h \ | 484 | $(SRC)/puresize.h \ |
| 485 | $(SRC)/syssignal.h \ | ||
| 486 | $(SRC)/w32.h \ | 485 | $(SRC)/w32.h \ |
| 487 | $(NT_INC)/unistd.h \ | 486 | $(NT_INC)/unistd.h \ |
| 488 | $(GNU_LIB)/verify.h \ | 487 | $(GNU_LIB)/verify.h \ |
diff --git a/src/marker.c b/src/marker.c index bfbb161a71d..0c4e8cb3b55 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -18,7 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <setjmp.h> | 21 | |
| 22 | #include "lisp.h" | 22 | #include "lisp.h" |
| 23 | #include "character.h" | 23 | #include "character.h" |
| 24 | #include "buffer.h" | 24 | #include "buffer.h" |
diff --git a/src/menu.c b/src/menu.c index bfdc68ca118..7b01d1faefc 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <setjmp.h> | ||
| 24 | #include <limits.h> /* for INT_MAX */ | 23 | #include <limits.h> /* for INT_MAX */ |
| 25 | 24 | ||
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
diff --git a/src/minibuf.c b/src/minibuf.c index 4ed480a8408..8a1e0ddde86 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <errno.h> | 22 | #include <errno.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | 24 | ||
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
| 27 | #include "commands.h" | 26 | #include "commands.h" |
diff --git a/src/ns.mk b/src/ns.mk deleted file mode 100644 index 77fbf5845d9..00000000000 --- a/src/ns.mk +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | ### autodeps.mk --- src/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | ## Copyright (C) 2008-2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ## This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ## GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ## it under the terms of the GNU General Public License as published by | ||
| 9 | ## the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ## (at your option) any later version. | ||
| 11 | ## | ||
| 12 | ## GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ## GNU General Public License for more details. | ||
| 16 | ## | ||
| 17 | ## You should have received a copy of the GNU General Public License | ||
| 18 | ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ### Commentary: | ||
| 21 | |||
| 22 | ## This is inserted in src/Makefile if HAVE_NS. | ||
| 23 | |||
| 24 | ## The only reason this is in a separate file is because $ns_appdir, | ||
| 25 | ## which appears as a target, is empty on non-NS builds. Some makes | ||
| 26 | ## do not like empty targets, even if they are never used. | ||
| 27 | |||
| 28 | ${ns_appdir}: ${ns_appsrc} | ||
| 29 | rm -fr ${ns_appdir} | ||
| 30 | ${MKDIR_P} ${ns_appdir} | ||
| 31 | ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - ) | ||
| 32 | |||
| 33 | ${ns_appbindir}/Emacs: emacs${EXEEXT} | ||
| 34 | ${MKDIR_P} ${ns_appbindir} | ||
| 35 | cp -f emacs${EXEEXT} ${ns_appbindir}/Emacs | ||
| 36 | |||
| 37 | ns-app: ${ns_appdir} ${ns_appbindir}/Emacs | ||
| 38 | |||
| 39 | ### ns.mk ends here | ||
diff --git a/src/nsfns.m b/src/nsfns.m index f73086eeee9..072005d2d3d 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -31,7 +31,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 31 | #include <config.h> | 31 | #include <config.h> |
| 32 | 32 | ||
| 33 | #include <math.h> | 33 | #include <math.h> |
| 34 | #include <setjmp.h> | ||
| 35 | #include <c-strcase.h> | 34 | #include <c-strcase.h> |
| 36 | 35 | ||
| 37 | #include "lisp.h" | 36 | #include "lisp.h" |
| @@ -1797,19 +1796,6 @@ terminate Emacs if we can't open the connection. | |||
| 1797 | SSDATA (display)); | 1796 | SSDATA (display)); |
| 1798 | } | 1797 | } |
| 1799 | 1798 | ||
| 1800 | /* Register our external input/output types, used for determining | ||
| 1801 | applicable services and also drag/drop eligibility. */ | ||
| 1802 | ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain]; | ||
| 1803 | ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] | ||
| 1804 | retain]; | ||
| 1805 | ns_drag_types = [[NSArray arrayWithObjects: | ||
| 1806 | NSStringPboardType, | ||
| 1807 | NSTabularTextPboardType, | ||
| 1808 | NSFilenamesPboardType, | ||
| 1809 | NSURLPboardType, | ||
| 1810 | NSColorPboardType, | ||
| 1811 | NSFontPboardType, nil] retain]; | ||
| 1812 | |||
| 1813 | return Qnil; | 1799 | return Qnil; |
| 1814 | } | 1800 | } |
| 1815 | 1801 | ||
diff --git a/src/nsfont.m b/src/nsfont.m index 1c9976ec6cc..eba1eb04765 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -23,7 +23,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 23 | /* This should be the first include, as it may set up #defines affecting | 23 | /* This should be the first include, as it may set up #defines affecting |
| 24 | interpretation of even the system includes. */ | 24 | interpretation of even the system includes. */ |
| 25 | #include <config.h> | 25 | #include <config.h> |
| 26 | #include <setjmp.h> | ||
| 27 | 26 | ||
| 28 | #include "lisp.h" | 27 | #include "lisp.h" |
| 29 | #include "dispextern.h" | 28 | #include "dispextern.h" |
diff --git a/src/nsimage.m b/src/nsimage.m index 8a8a3ddaae4..668664c7a20 100644 --- a/src/nsimage.m +++ b/src/nsimage.m | |||
| @@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 28 | /* This should be the first include, as it may set up #defines affecting | 28 | /* This should be the first include, as it may set up #defines affecting |
| 29 | interpretation of even the system includes. */ | 29 | interpretation of even the system includes. */ |
| 30 | #include <config.h> | 30 | #include <config.h> |
| 31 | #include <setjmp.h> | ||
| 32 | 31 | ||
| 33 | #include "lisp.h" | 32 | #include "lisp.h" |
| 34 | #include "dispextern.h" | 33 | #include "dispextern.h" |
diff --git a/src/nsmenu.m b/src/nsmenu.m index d0f3e45e939..907d3eac622 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -24,7 +24,6 @@ Carbon version by Yamamoto Mitsuharu. */ | |||
| 24 | /* This should be the first include, as it may set up #defines affecting | 24 | /* This should be the first include, as it may set up #defines affecting |
| 25 | interpretation of even the system includes. */ | 25 | interpretation of even the system includes. */ |
| 26 | #include <config.h> | 26 | #include <config.h> |
| 27 | #include <setjmp.h> | ||
| 28 | 27 | ||
| 29 | #include "lisp.h" | 28 | #include "lisp.h" |
| 30 | #include "window.h" | 29 | #include "window.h" |
| @@ -589,10 +588,7 @@ extern NSString *NSMenuDidBeginTrackingNotification; | |||
| 589 | From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the | 588 | From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the |
| 590 | key press case, NSMenuPropertyItemImage (e.g.) won't be set. | 589 | key press case, NSMenuPropertyItemImage (e.g.) won't be set. |
| 591 | */ | 590 | */ |
| 592 | if (trackingMenu == 0 | 591 | if (trackingMenu == 0) |
| 593 | /* Also, don't try this if from an event picked up asynchronously, | ||
| 594 | as lots of lisp evaluation happens in ns_update_menubar. */ | ||
| 595 | || handling_signal != 0) | ||
| 596 | return; | 592 | return; |
| 597 | /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */ | 593 | /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */ |
| 598 | ns_update_menubar (frame, 1, self); | 594 | ns_update_menubar (frame, 1, self); |
diff --git a/src/nsselect.m b/src/nsselect.m index e0bbfe58636..95bc1a95957 100644 --- a/src/nsselect.m +++ b/src/nsselect.m | |||
| @@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 28 | /* This should be the first include, as it may set up #defines affecting | 28 | /* This should be the first include, as it may set up #defines affecting |
| 29 | interpretation of even the system includes. */ | 29 | interpretation of even the system includes. */ |
| 30 | #include <config.h> | 30 | #include <config.h> |
| 31 | #include <setjmp.h> | ||
| 32 | 31 | ||
| 33 | #include "lisp.h" | 32 | #include "lisp.h" |
| 34 | #include "nsterm.h" | 33 | #include "nsterm.h" |
diff --git a/src/print.c b/src/print.c index 5643ff06774..6ae33ee23ef 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | 24 | |
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "character.h" | 26 | #include "character.h" |
| 27 | #include "buffer.h" | 27 | #include "buffer.h" |
diff --git a/src/process.c b/src/process.c index f80b5e80c76..c654369627d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -25,12 +25,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | 25 | ||
| 26 | #include <stdio.h> | 26 | #include <stdio.h> |
| 27 | #include <errno.h> | 27 | #include <errno.h> |
| 28 | #include <setjmp.h> | ||
| 29 | #include <sys/types.h> /* Some typedefs are used in sys/file.h. */ | 28 | #include <sys/types.h> /* Some typedefs are used in sys/file.h. */ |
| 30 | #include <sys/file.h> | 29 | #include <sys/file.h> |
| 31 | #include <sys/stat.h> | 30 | #include <sys/stat.h> |
| 32 | #include <setjmp.h> | ||
| 33 | |||
| 34 | #include <unistd.h> | 31 | #include <unistd.h> |
| 35 | #include <fcntl.h> | 32 | #include <fcntl.h> |
| 36 | 33 | ||
| @@ -75,6 +72,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 75 | #include <bsdtty.h> | 72 | #include <bsdtty.h> |
| 76 | #endif | 73 | #endif |
| 77 | 74 | ||
| 75 | #ifdef USG5_4 | ||
| 76 | # include <sys/stream.h> | ||
| 77 | # include <sys/stropts.h> | ||
| 78 | #endif | ||
| 79 | |||
| 78 | #ifdef HAVE_RES_INIT | 80 | #ifdef HAVE_RES_INIT |
| 79 | #include <netinet/in.h> | 81 | #include <netinet/in.h> |
| 80 | #include <arpa/nameser.h> | 82 | #include <arpa/nameser.h> |
| @@ -212,17 +214,13 @@ static EMACS_INT update_tick; | |||
| 212 | "non-destructive" select. So we require either native select, | 214 | "non-destructive" select. So we require either native select, |
| 213 | or emulation of select using FIONREAD. */ | 215 | or emulation of select using FIONREAD. */ |
| 214 | 216 | ||
| 215 | #ifdef BROKEN_DATAGRAM_SOCKETS | 217 | #ifndef BROKEN_DATAGRAM_SOCKETS |
| 216 | #undef DATAGRAM_SOCKETS | 218 | # if defined HAVE_SELECT || defined USABLE_FIONREAD |
| 217 | #else | 219 | # if defined HAVE_SENDTO && defined HAVE_RECVFROM && defined EMSGSIZE |
| 218 | #ifndef DATAGRAM_SOCKETS | 220 | # define DATAGRAM_SOCKETS |
| 219 | #if defined (HAVE_SELECT) || defined (FIONREAD) | 221 | # endif |
| 220 | #if defined (HAVE_SENDTO) && defined (HAVE_RECVFROM) && defined (EMSGSIZE) | 222 | # endif |
| 221 | #define DATAGRAM_SOCKETS | 223 | #endif |
| 222 | #endif /* HAVE_SENDTO && HAVE_RECVFROM && EMSGSIZE */ | ||
| 223 | #endif /* HAVE_SELECT || FIONREAD */ | ||
| 224 | #endif /* DATAGRAM_SOCKETS */ | ||
| 225 | #endif /* BROKEN_DATAGRAM_SOCKETS */ | ||
| 226 | 224 | ||
| 227 | #if defined HAVE_LOCAL_SOCKETS && defined DATAGRAM_SOCKETS | 225 | #if defined HAVE_LOCAL_SOCKETS && defined DATAGRAM_SOCKETS |
| 228 | # define HAVE_SEQPACKET | 226 | # define HAVE_SEQPACKET |
| @@ -251,7 +249,7 @@ static int process_output_skip; | |||
| 251 | #endif | 249 | #endif |
| 252 | 250 | ||
| 253 | static void create_process (Lisp_Object, char **, Lisp_Object); | 251 | static void create_process (Lisp_Object, char **, Lisp_Object); |
| 254 | #ifdef SIGIO | 252 | #ifdef USABLE_SIGIO |
| 255 | static int keyboard_bit_set (SELECT_TYPE *); | 253 | static int keyboard_bit_set (SELECT_TYPE *); |
| 256 | #endif | 254 | #endif |
| 257 | static void deactivate_process (Lisp_Object); | 255 | static void deactivate_process (Lisp_Object); |
| @@ -1611,14 +1609,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 1611 | #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) | 1609 | #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) |
| 1612 | int wait_child_setup[2]; | 1610 | int wait_child_setup[2]; |
| 1613 | #endif | 1611 | #endif |
| 1612 | #ifdef SIGCHLD | ||
| 1614 | sigset_t blocked, procmask; | 1613 | sigset_t blocked, procmask; |
| 1615 | struct sigaction sigint_action; | ||
| 1616 | struct sigaction sigquit_action; | ||
| 1617 | struct sigaction sigpipe_action; | ||
| 1618 | #ifdef AIX | ||
| 1619 | struct sigaction sighup_action; | ||
| 1620 | #endif | 1614 | #endif |
| 1621 | /* Use volatile to protect variables from being clobbered by longjmp. */ | 1615 | /* Use volatile to protect variables from being clobbered by vfork. */ |
| 1622 | volatile int forkin, forkout; | 1616 | volatile int forkin, forkout; |
| 1623 | volatile int pty_flag = 0; | 1617 | volatile int pty_flag = 0; |
| 1624 | 1618 | ||
| @@ -1710,25 +1704,13 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 1710 | XPROCESS (process)->pty_flag = pty_flag; | 1704 | XPROCESS (process)->pty_flag = pty_flag; |
| 1711 | pset_status (XPROCESS (process), Qrun); | 1705 | pset_status (XPROCESS (process), Qrun); |
| 1712 | 1706 | ||
| 1707 | #ifdef SIGCHLD | ||
| 1713 | /* Delay interrupts until we have a chance to store | 1708 | /* Delay interrupts until we have a chance to store |
| 1714 | the new fork's pid in its process structure */ | 1709 | the new fork's pid in its process structure */ |
| 1715 | sigemptyset (&blocked); | 1710 | sigemptyset (&blocked); |
| 1716 | #ifdef SIGCHLD | ||
| 1717 | sigaddset (&blocked, SIGCHLD); | 1711 | sigaddset (&blocked, SIGCHLD); |
| 1718 | #endif | ||
| 1719 | #ifdef HAVE_WORKING_VFORK | ||
| 1720 | /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal', | ||
| 1721 | this sets the parent's signal handlers as well as the child's. | ||
| 1722 | So delay all interrupts whose handlers the child might munge, | ||
| 1723 | and record the current handlers so they can be restored later. */ | ||
| 1724 | sigaddset (&blocked, SIGINT ); sigaction (SIGINT , 0, &sigint_action ); | ||
| 1725 | sigaddset (&blocked, SIGQUIT); sigaction (SIGQUIT, 0, &sigquit_action); | ||
| 1726 | sigaddset (&blocked, SIGPIPE); sigaction (SIGPIPE, 0, &sigpipe_action); | ||
| 1727 | #ifdef AIX | ||
| 1728 | sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action ); | ||
| 1729 | #endif | ||
| 1730 | #endif /* HAVE_WORKING_VFORK */ | ||
| 1731 | pthread_sigmask (SIG_BLOCK, &blocked, &procmask); | 1712 | pthread_sigmask (SIG_BLOCK, &blocked, &procmask); |
| 1713 | #endif | ||
| 1732 | 1714 | ||
| 1733 | FD_SET (inchannel, &input_wait_mask); | 1715 | FD_SET (inchannel, &input_wait_mask); |
| 1734 | FD_SET (inchannel, &non_keyboard_wait_mask); | 1716 | FD_SET (inchannel, &non_keyboard_wait_mask); |
| @@ -1881,8 +1863,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 1881 | in the child. */ | 1863 | in the child. */ |
| 1882 | signal (SIGPIPE, SIG_DFL); | 1864 | signal (SIGPIPE, SIG_DFL); |
| 1883 | 1865 | ||
| 1866 | #ifdef SIGCHLD | ||
| 1884 | /* Stop blocking signals in the child. */ | 1867 | /* Stop blocking signals in the child. */ |
| 1885 | pthread_sigmask (SIG_SETMASK, &procmask, 0); | 1868 | pthread_sigmask (SIG_SETMASK, &procmask, 0); |
| 1869 | #endif | ||
| 1886 | 1870 | ||
| 1887 | if (pty_flag) | 1871 | if (pty_flag) |
| 1888 | child_setup_tty (xforkout); | 1872 | child_setup_tty (xforkout); |
| @@ -1961,19 +1945,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 1961 | #endif | 1945 | #endif |
| 1962 | } | 1946 | } |
| 1963 | 1947 | ||
| 1964 | /* Restore the signal state whether vfork succeeded or not. | 1948 | #ifdef SIGCHLD |
| 1965 | (We will signal an error, below, if it failed.) */ | ||
| 1966 | #ifdef HAVE_WORKING_VFORK | ||
| 1967 | /* Restore the parent's signal handlers. */ | ||
| 1968 | sigaction (SIGINT, &sigint_action, 0); | ||
| 1969 | sigaction (SIGQUIT, &sigquit_action, 0); | ||
| 1970 | sigaction (SIGPIPE, &sigpipe_action, 0); | ||
| 1971 | #ifdef AIX | ||
| 1972 | sigaction (SIGHUP, &sighup_action, 0); | ||
| 1973 | #endif | ||
| 1974 | #endif /* HAVE_WORKING_VFORK */ | ||
| 1975 | /* Stop blocking signals in the parent. */ | 1949 | /* Stop blocking signals in the parent. */ |
| 1976 | pthread_sigmask (SIG_SETMASK, &procmask, 0); | 1950 | pthread_sigmask (SIG_SETMASK, &procmask, 0); |
| 1951 | #endif | ||
| 1977 | 1952 | ||
| 1978 | /* Now generate the error if vfork failed. */ | 1953 | /* Now generate the error if vfork failed. */ |
| 1979 | if (pid < 0) | 1954 | if (pid < 0) |
| @@ -4397,10 +4372,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4397 | Otherwise, do pending quit if requested. */ | 4372 | Otherwise, do pending quit if requested. */ |
| 4398 | if (read_kbd >= 0) | 4373 | if (read_kbd >= 0) |
| 4399 | QUIT; | 4374 | QUIT; |
| 4400 | #ifdef SYNC_INPUT | ||
| 4401 | else | 4375 | else |
| 4402 | process_pending_signals (); | 4376 | process_pending_signals (); |
| 4403 | #endif | ||
| 4404 | 4377 | ||
| 4405 | /* Exit now if the cell we're waiting for became non-nil. */ | 4378 | /* Exit now if the cell we're waiting for became non-nil. */ |
| 4406 | if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) | 4379 | if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) |
| @@ -4836,7 +4809,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4836 | if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) | 4809 | if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) |
| 4837 | break; | 4810 | break; |
| 4838 | 4811 | ||
| 4839 | #ifdef SIGIO | 4812 | #ifdef USABLE_SIGIO |
| 4840 | /* If we think we have keyboard input waiting, but didn't get SIGIO, | 4813 | /* If we think we have keyboard input waiting, but didn't get SIGIO, |
| 4841 | go read it. This can happen with X on BSD after logging out. | 4814 | go read it. This can happen with X on BSD after logging out. |
| 4842 | In that case, there really is no input and no SIGIO, | 4815 | In that case, there really is no input and no SIGIO, |
| @@ -5420,7 +5393,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5420 | 5393 | ||
| 5421 | /* Sending data to subprocess */ | 5394 | /* Sending data to subprocess */ |
| 5422 | 5395 | ||
| 5423 | static jmp_buf send_process_frame; | 5396 | static sys_jmp_buf send_process_frame; |
| 5424 | static Lisp_Object process_sent_to; | 5397 | static Lisp_Object process_sent_to; |
| 5425 | 5398 | ||
| 5426 | static _Noreturn void | 5399 | static _Noreturn void |
| @@ -5430,7 +5403,7 @@ handle_pipe_signal (int sig) | |||
| 5430 | sigemptyset (&unblocked); | 5403 | sigemptyset (&unblocked); |
| 5431 | sigaddset (&unblocked, SIGPIPE); | 5404 | sigaddset (&unblocked, SIGPIPE); |
| 5432 | pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); | 5405 | pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); |
| 5433 | _longjmp (send_process_frame, 1); | 5406 | sys_longjmp (send_process_frame, 1); |
| 5434 | } | 5407 | } |
| 5435 | 5408 | ||
| 5436 | static void | 5409 | static void |
| @@ -5639,7 +5612,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, | |||
| 5639 | /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, | 5612 | /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, |
| 5640 | CFLAGS="-g -O": The value of the parameter `proc' is clobbered | 5613 | CFLAGS="-g -O": The value of the parameter `proc' is clobbered |
| 5641 | when returning with longjmp despite being declared volatile. */ | 5614 | when returning with longjmp despite being declared volatile. */ |
| 5642 | if (!_setjmp (send_process_frame)) | 5615 | if (!sys_setjmp (send_process_frame)) |
| 5643 | { | 5616 | { |
| 5644 | p = XPROCESS (proc); /* Repair any setjmp clobbering. */ | 5617 | p = XPROCESS (proc); /* Repair any setjmp clobbering. */ |
| 5645 | process_sent_to = proc; | 5618 | process_sent_to = proc; |
| @@ -6853,7 +6826,7 @@ delete_gpm_wait_descriptor (int desc) | |||
| 6853 | 6826 | ||
| 6854 | # endif | 6827 | # endif |
| 6855 | 6828 | ||
| 6856 | # ifdef SIGIO | 6829 | # ifdef USABLE_SIGIO |
| 6857 | 6830 | ||
| 6858 | /* Return nonzero if *MASK has a bit set | 6831 | /* Return nonzero if *MASK has a bit set |
| 6859 | that corresponds to one of the keyboard input descriptors. */ | 6832 | that corresponds to one of the keyboard input descriptors. */ |
diff --git a/src/ralloc.c b/src/ralloc.c index 74834333aa3..9a4b1ada229 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -25,7 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #ifdef emacs | 25 | #ifdef emacs |
| 26 | 26 | ||
| 27 | #include <config.h> | 27 | #include <config.h> |
| 28 | #include <setjmp.h> | 28 | |
| 29 | #include "lisp.h" /* Needed for VALBITS. */ | 29 | #include "lisp.h" /* Needed for VALBITS. */ |
| 30 | #include "blockinput.h" | 30 | #include "blockinput.h" |
| 31 | 31 | ||
| @@ -1204,9 +1204,15 @@ r_alloc_init (void) | |||
| 1204 | UNBLOCK_INPUT; | 1204 | UNBLOCK_INPUT; |
| 1205 | #else | 1205 | #else |
| 1206 | #ifndef SYSTEM_MALLOC | 1206 | #ifndef SYSTEM_MALLOC |
| 1207 | /* Give GNU malloc's morecore some hysteresis | 1207 | /* Give GNU malloc's morecore some hysteresis so that we move all |
| 1208 | so that we move all the relocatable blocks much less often. */ | 1208 | the relocatable blocks much less often. The number used to be |
| 1209 | __malloc_extra_blocks = 64; | 1209 | 64, but alloc.c would override that with 32 in code that was |
| 1210 | removed when SYNC_INPUT became the only input handling mode. | ||
| 1211 | That code was conditioned on !DOUG_LEA_MALLOC, so the call to | ||
| 1212 | mallopt above is left unchanged. (Actually, I think there's no | ||
| 1213 | system nowadays that uses DOUG_LEA_MALLOC and also uses | ||
| 1214 | REL_ALLOC.) */ | ||
| 1215 | __malloc_extra_blocks = 32; | ||
| 1210 | #endif | 1216 | #endif |
| 1211 | #endif | 1217 | #endif |
| 1212 | 1218 | ||
diff --git a/src/regex.c b/src/regex.c index 472ef727979..17562043df1 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -126,7 +126,6 @@ | |||
| 126 | that make sense only in Emacs. */ | 126 | that make sense only in Emacs. */ |
| 127 | #ifdef emacs | 127 | #ifdef emacs |
| 128 | 128 | ||
| 129 | # include <setjmp.h> | ||
| 130 | # include "lisp.h" | 129 | # include "lisp.h" |
| 131 | # include "character.h" | 130 | # include "character.h" |
| 132 | # include "buffer.h" | 131 | # include "buffer.h" |
| @@ -1832,9 +1831,9 @@ typedef struct | |||
| 1832 | /* The next available element. */ | 1831 | /* The next available element. */ |
| 1833 | #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) | 1832 | #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) |
| 1834 | 1833 | ||
| 1835 | /* Explicit quit checking is only used on NTemacs and whenever we | 1834 | /* Explicit quit checking is needed for Emacs, which uses polling to |
| 1836 | use polling to process input events. */ | 1835 | process input events. */ |
| 1837 | #if defined emacs && (defined WINDOWSNT || defined SYNC_INPUT) && defined QUIT | 1836 | #ifdef emacs |
| 1838 | extern int immediate_quit; | 1837 | extern int immediate_quit; |
| 1839 | # define IMMEDIATE_QUIT_CHECK \ | 1838 | # define IMMEDIATE_QUIT_CHECK \ |
| 1840 | do { \ | 1839 | do { \ |
diff --git a/src/region-cache.c b/src/region-cache.c index c3eb087aade..832f4bfd214 100644 --- a/src/region-cache.c +++ b/src/region-cache.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | 24 | ||
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
| 27 | #include "character.h" | 26 | #include "character.h" |
diff --git a/src/scroll.c b/src/scroll.c index 79dd464b29e..71ce43b2e48 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | 24 | |
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "termchar.h" | 26 | #include "termchar.h" |
| 27 | #include "dispextern.h" | 27 | #include "dispextern.h" |
diff --git a/src/search.c b/src/search.c index 72bd5605709..1735ade5d8a 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <setjmp.h> | 23 | |
| 24 | #include "lisp.h" | 24 | #include "lisp.h" |
| 25 | #include "syntax.h" | 25 | #include "syntax.h" |
| 26 | #include "category.h" | 26 | #include "category.h" |
| @@ -674,7 +674,7 @@ scan_buffer (register int target, ptrdiff_t start, ptrdiff_t end, | |||
| 674 | obstacle --- the last character the dumb search loop should | 674 | obstacle --- the last character the dumb search loop should |
| 675 | examine. */ | 675 | examine. */ |
| 676 | ptrdiff_t ceiling_byte = CHAR_TO_BYTE (end) - 1; | 676 | ptrdiff_t ceiling_byte = CHAR_TO_BYTE (end) - 1; |
| 677 | ptrdiff_t start_byte = CHAR_TO_BYTE (start); | 677 | ptrdiff_t start_byte; |
| 678 | ptrdiff_t tem; | 678 | ptrdiff_t tem; |
| 679 | 679 | ||
| 680 | /* If we're looking for a newline, consult the newline cache | 680 | /* If we're looking for a newline, consult the newline cache |
| @@ -684,18 +684,22 @@ scan_buffer (register int target, ptrdiff_t start, ptrdiff_t end, | |||
| 684 | ptrdiff_t next_change; | 684 | ptrdiff_t next_change; |
| 685 | immediate_quit = 0; | 685 | immediate_quit = 0; |
| 686 | while (region_cache_forward | 686 | while (region_cache_forward |
| 687 | (current_buffer, newline_cache, start_byte, &next_change)) | 687 | (current_buffer, newline_cache, start, &next_change)) |
| 688 | start_byte = next_change; | 688 | start = next_change; |
| 689 | immediate_quit = allow_quit; | 689 | immediate_quit = allow_quit; |
| 690 | 690 | ||
| 691 | start_byte = CHAR_TO_BYTE (start); | ||
| 692 | |||
| 691 | /* START should never be after END. */ | 693 | /* START should never be after END. */ |
| 692 | if (start_byte > ceiling_byte) | 694 | if (start_byte > ceiling_byte) |
| 693 | start_byte = ceiling_byte; | 695 | start_byte = ceiling_byte; |
| 694 | 696 | ||
| 695 | /* Now the text after start is an unknown region, and | 697 | /* Now the text after start is an unknown region, and |
| 696 | next_change is the position of the next known region. */ | 698 | next_change is the position of the next known region. */ |
| 697 | ceiling_byte = min (next_change - 1, ceiling_byte); | 699 | ceiling_byte = min (CHAR_TO_BYTE (next_change) - 1, ceiling_byte); |
| 698 | } | 700 | } |
| 701 | else | ||
| 702 | start_byte = CHAR_TO_BYTE (start); | ||
| 699 | 703 | ||
| 700 | /* The dumb loop can only scan text stored in contiguous | 704 | /* The dumb loop can only scan text stored in contiguous |
| 701 | bytes. BUFFER_CEILING_OF returns the last character | 705 | bytes. BUFFER_CEILING_OF returns the last character |
| @@ -747,7 +751,7 @@ scan_buffer (register int target, ptrdiff_t start, ptrdiff_t end, | |||
| 747 | { | 751 | { |
| 748 | /* The last character to check before the next obstacle. */ | 752 | /* The last character to check before the next obstacle. */ |
| 749 | ptrdiff_t ceiling_byte = CHAR_TO_BYTE (end); | 753 | ptrdiff_t ceiling_byte = CHAR_TO_BYTE (end); |
| 750 | ptrdiff_t start_byte = CHAR_TO_BYTE (start); | 754 | ptrdiff_t start_byte; |
| 751 | ptrdiff_t tem; | 755 | ptrdiff_t tem; |
| 752 | 756 | ||
| 753 | /* Consult the newline cache, if appropriate. */ | 757 | /* Consult the newline cache, if appropriate. */ |
| @@ -756,18 +760,22 @@ scan_buffer (register int target, ptrdiff_t start, ptrdiff_t end, | |||
| 756 | ptrdiff_t next_change; | 760 | ptrdiff_t next_change; |
| 757 | immediate_quit = 0; | 761 | immediate_quit = 0; |
| 758 | while (region_cache_backward | 762 | while (region_cache_backward |
| 759 | (current_buffer, newline_cache, start_byte, &next_change)) | 763 | (current_buffer, newline_cache, start, &next_change)) |
| 760 | start_byte = next_change; | 764 | start = next_change; |
| 761 | immediate_quit = allow_quit; | 765 | immediate_quit = allow_quit; |
| 762 | 766 | ||
| 767 | start_byte = CHAR_TO_BYTE (start); | ||
| 768 | |||
| 763 | /* Start should never be at or before end. */ | 769 | /* Start should never be at or before end. */ |
| 764 | if (start_byte <= ceiling_byte) | 770 | if (start_byte <= ceiling_byte) |
| 765 | start_byte = ceiling_byte + 1; | 771 | start_byte = ceiling_byte + 1; |
| 766 | 772 | ||
| 767 | /* Now the text before start is an unknown region, and | 773 | /* Now the text before start is an unknown region, and |
| 768 | next_change is the position of the next known region. */ | 774 | next_change is the position of the next known region. */ |
| 769 | ceiling_byte = max (next_change, ceiling_byte); | 775 | ceiling_byte = max (CHAR_TO_BYTE (next_change), ceiling_byte); |
| 770 | } | 776 | } |
| 777 | else | ||
| 778 | start_byte = CHAR_TO_BYTE (start); | ||
| 771 | 779 | ||
| 772 | /* Stop scanning before the gap. */ | 780 | /* Stop scanning before the gap. */ |
| 773 | tem = BUFFER_FLOOR_OF (start_byte - 1); | 781 | tem = BUFFER_FLOOR_OF (start_byte - 1); |
diff --git a/src/sheap.c b/src/sheap.c index 3ae14b5daec..f6022ea3ce7 100644 --- a/src/sheap.c +++ b/src/sheap.c | |||
| @@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <setjmp.h> | 23 | |
| 24 | #include "lisp.h" | 24 | #include "lisp.h" |
| 25 | 25 | ||
| 26 | #include <unistd.h> | 26 | #include <unistd.h> |
| @@ -93,4 +93,3 @@ report_sheap_usage (int die_if_pure_storage_exceeded) | |||
| 93 | bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); | 93 | bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); |
| 94 | message ("%s", buf); | 94 | message ("%s", buf); |
| 95 | } | 95 | } |
| 96 | |||
diff --git a/src/sound.c b/src/sound.c index 5729d704b6a..0ee85312fd3 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -44,7 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 44 | #include <unistd.h> | 44 | #include <unistd.h> |
| 45 | #include <sys/types.h> | 45 | #include <sys/types.h> |
| 46 | #include <errno.h> | 46 | #include <errno.h> |
| 47 | #include <setjmp.h> | 47 | |
| 48 | #include "lisp.h" | 48 | #include "lisp.h" |
| 49 | #include "dispextern.h" | 49 | #include "dispextern.h" |
| 50 | #include "atimer.h" | 50 | #include "atimer.h" |
| @@ -314,7 +314,7 @@ sound_perror (const char *msg) | |||
| 314 | int saved_errno = errno; | 314 | int saved_errno = errno; |
| 315 | 315 | ||
| 316 | turn_on_atimers (1); | 316 | turn_on_atimers (1); |
| 317 | #ifdef SIGIO | 317 | #ifdef USABLE_SIGIO |
| 318 | { | 318 | { |
| 319 | sigset_t unblocked; | 319 | sigset_t unblocked; |
| 320 | sigemptyset (&unblocked); | 320 | sigemptyset (&unblocked); |
| @@ -732,7 +732,7 @@ static void | |||
| 732 | vox_configure (struct sound_device *sd) | 732 | vox_configure (struct sound_device *sd) |
| 733 | { | 733 | { |
| 734 | int val; | 734 | int val; |
| 735 | #ifdef SIGIO | 735 | #ifdef USABLE_SIGIO |
| 736 | sigset_t blocked; | 736 | sigset_t blocked; |
| 737 | #endif | 737 | #endif |
| 738 | 738 | ||
| @@ -742,7 +742,7 @@ vox_configure (struct sound_device *sd) | |||
| 742 | interrupted by a signal. Block the ones we know to cause | 742 | interrupted by a signal. Block the ones we know to cause |
| 743 | troubles. */ | 743 | troubles. */ |
| 744 | turn_on_atimers (0); | 744 | turn_on_atimers (0); |
| 745 | #ifdef SIGIO | 745 | #ifdef USABLE_SIGIO |
| 746 | sigemptyset (&blocked); | 746 | sigemptyset (&blocked); |
| 747 | sigaddset (&blocked, SIGIO); | 747 | sigaddset (&blocked, SIGIO); |
| 748 | pthread_sigmask (SIG_BLOCK, &blocked, 0); | 748 | pthread_sigmask (SIG_BLOCK, &blocked, 0); |
| @@ -778,7 +778,7 @@ vox_configure (struct sound_device *sd) | |||
| 778 | } | 778 | } |
| 779 | 779 | ||
| 780 | turn_on_atimers (1); | 780 | turn_on_atimers (1); |
| 781 | #ifdef SIGIO | 781 | #ifdef USABLE_SIGIO |
| 782 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); | 782 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); |
| 783 | #endif | 783 | #endif |
| 784 | } | 784 | } |
| @@ -794,7 +794,7 @@ vox_close (struct sound_device *sd) | |||
| 794 | /* On GNU/Linux, it seems that the device driver doesn't like to | 794 | /* On GNU/Linux, it seems that the device driver doesn't like to |
| 795 | be interrupted by a signal. Block the ones we know to cause | 795 | be interrupted by a signal. Block the ones we know to cause |
| 796 | troubles. */ | 796 | troubles. */ |
| 797 | #ifdef SIGIO | 797 | #ifdef USABLE_SIGIO |
| 798 | sigset_t blocked; | 798 | sigset_t blocked; |
| 799 | sigemptyset (&blocked); | 799 | sigemptyset (&blocked); |
| 800 | sigaddset (&blocked, SIGIO); | 800 | sigaddset (&blocked, SIGIO); |
| @@ -806,7 +806,7 @@ vox_close (struct sound_device *sd) | |||
| 806 | ioctl (sd->fd, SNDCTL_DSP_SYNC, NULL); | 806 | ioctl (sd->fd, SNDCTL_DSP_SYNC, NULL); |
| 807 | 807 | ||
| 808 | turn_on_atimers (1); | 808 | turn_on_atimers (1); |
| 809 | #ifdef SIGIO | 809 | #ifdef USABLE_SIGIO |
| 810 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); | 810 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); |
| 811 | #endif | 811 | #endif |
| 812 | 812 | ||
diff --git a/src/syntax.c b/src/syntax.c index fdd9353bb87..91ef4e66663 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | 22 | ||
| 23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
| 24 | #include <setjmp.h> | 24 | |
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "commands.h" | 26 | #include "commands.h" |
| 27 | #include "character.h" | 27 | #include "character.h" |
diff --git a/src/sysdep.c b/src/sysdep.c index 0f16d1a7645..dbfd9efc7d4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | 23 | ||
| 24 | #include <execinfo.h> | 24 | #include <execinfo.h> |
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <setjmp.h> | ||
| 27 | #ifdef HAVE_PWD_H | 26 | #ifdef HAVE_PWD_H |
| 28 | #include <pwd.h> | 27 | #include <pwd.h> |
| 29 | #include <grp.h> | 28 | #include <grp.h> |
| @@ -107,9 +106,6 @@ extern char *getwd (char *); | |||
| 107 | 106 | ||
| 108 | static int emacs_get_tty (int, struct emacs_tty *); | 107 | static int emacs_get_tty (int, struct emacs_tty *); |
| 109 | static int emacs_set_tty (int, struct emacs_tty *, int); | 108 | static int emacs_set_tty (int, struct emacs_tty *, int); |
| 110 | #if defined TIOCNOTTY || defined USG5 || defined CYGWIN | ||
| 111 | static _Noreturn void croak (char *); | ||
| 112 | #endif | ||
| 113 | 109 | ||
| 114 | /* ULLONG_MAX is missing on Red Hat Linux 7.3; see Bug#11781. */ | 110 | /* ULLONG_MAX is missing on Red Hat Linux 7.3; see Bug#11781. */ |
| 115 | #ifndef ULLONG_MAX | 111 | #ifndef ULLONG_MAX |
| @@ -513,7 +509,7 @@ sys_subshell (void) | |||
| 513 | saved_handlers[0].code = SIGINT; | 509 | saved_handlers[0].code = SIGINT; |
| 514 | saved_handlers[1].code = SIGQUIT; | 510 | saved_handlers[1].code = SIGQUIT; |
| 515 | saved_handlers[2].code = SIGTERM; | 511 | saved_handlers[2].code = SIGTERM; |
| 516 | #ifdef SIGIO | 512 | #ifdef USABLE_SIGIO |
| 517 | saved_handlers[3].code = SIGIO; | 513 | saved_handlers[3].code = SIGIO; |
| 518 | saved_handlers[4].code = 0; | 514 | saved_handlers[4].code = 0; |
| 519 | #else | 515 | #else |
| @@ -642,121 +638,75 @@ restore_signal_handlers (struct save_signal *saved_handlers) | |||
| 642 | } | 638 | } |
| 643 | } | 639 | } |
| 644 | 640 | ||
| 645 | #ifndef SIGIO | 641 | #ifdef USABLE_SIGIO |
| 646 | /* If SIGIO is broken, don't do anything. */ | ||
| 647 | void | ||
| 648 | init_sigio (int fd) | ||
| 649 | { | ||
| 650 | } | ||
| 651 | |||
| 652 | static void | ||
| 653 | reset_sigio (int fd) | ||
| 654 | { | ||
| 655 | } | ||
| 656 | |||
| 657 | void | ||
| 658 | request_sigio (void) | ||
| 659 | { | ||
| 660 | } | ||
| 661 | |||
| 662 | void | ||
| 663 | unrequest_sigio (void) | ||
| 664 | { | ||
| 665 | } | ||
| 666 | |||
| 667 | #else | ||
| 668 | #ifdef F_SETFL | ||
| 669 | |||
| 670 | static int old_fcntl_flags[MAXDESC]; | 642 | static int old_fcntl_flags[MAXDESC]; |
| 643 | #endif | ||
| 671 | 644 | ||
| 672 | void | 645 | void |
| 673 | init_sigio (int fd) | 646 | init_sigio (int fd) |
| 674 | { | 647 | { |
| 675 | #ifdef FASYNC | 648 | #ifdef USABLE_SIGIO |
| 676 | old_fcntl_flags[fd] = fcntl (fd, F_GETFL, 0) & ~FASYNC; | 649 | old_fcntl_flags[fd] = fcntl (fd, F_GETFL, 0) & ~FASYNC; |
| 677 | fcntl (fd, F_SETFL, old_fcntl_flags[fd] | FASYNC); | 650 | fcntl (fd, F_SETFL, old_fcntl_flags[fd] | FASYNC); |
| 678 | #endif | ||
| 679 | interrupts_deferred = 0; | 651 | interrupts_deferred = 0; |
| 652 | #endif | ||
| 680 | } | 653 | } |
| 681 | 654 | ||
| 682 | static void | 655 | static void |
| 683 | reset_sigio (int fd) | 656 | reset_sigio (int fd) |
| 684 | { | 657 | { |
| 685 | #ifdef FASYNC | 658 | #ifdef USABLE_SIGIO |
| 686 | fcntl (fd, F_SETFL, old_fcntl_flags[fd]); | 659 | fcntl (fd, F_SETFL, old_fcntl_flags[fd]); |
| 687 | #endif | 660 | #endif |
| 688 | } | 661 | } |
| 689 | 662 | ||
| 690 | #ifdef FASYNC /* F_SETFL does not imply existence of FASYNC */ | ||
| 691 | /* XXX Uhm, FASYNC is not used anymore here. */ | ||
| 692 | /* XXX Yeah, but you need it for SIGIO, don't you? */ | ||
| 693 | |||
| 694 | void | 663 | void |
| 695 | request_sigio (void) | 664 | request_sigio (void) |
| 696 | { | 665 | { |
| 666 | #ifdef USABLE_SIGIO | ||
| 697 | sigset_t unblocked; | 667 | sigset_t unblocked; |
| 698 | 668 | ||
| 699 | if (noninteractive) | 669 | if (noninteractive) |
| 700 | return; | 670 | return; |
| 701 | 671 | ||
| 702 | sigemptyset (&unblocked); | 672 | sigemptyset (&unblocked); |
| 703 | #ifdef SIGWINCH | 673 | # ifdef SIGWINCH |
| 704 | sigaddset (&unblocked, SIGWINCH); | 674 | sigaddset (&unblocked, SIGWINCH); |
| 705 | #endif | 675 | # endif |
| 706 | sigaddset (&unblocked, SIGIO); | 676 | sigaddset (&unblocked, SIGIO); |
| 707 | pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); | 677 | pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); |
| 708 | 678 | ||
| 709 | interrupts_deferred = 0; | 679 | interrupts_deferred = 0; |
| 680 | #endif | ||
| 710 | } | 681 | } |
| 711 | 682 | ||
| 712 | void | 683 | void |
| 713 | unrequest_sigio (void) | 684 | unrequest_sigio (void) |
| 714 | { | 685 | { |
| 686 | #ifdef USABLE_SIGIO | ||
| 715 | sigset_t blocked; | 687 | sigset_t blocked; |
| 716 | 688 | ||
| 717 | if (noninteractive) | 689 | if (noninteractive) |
| 718 | return; | 690 | return; |
| 719 | 691 | ||
| 720 | #if 0 /* XXX What's wrong with blocking SIGIO under X? */ | ||
| 721 | if (x_display_list) | ||
| 722 | return; | ||
| 723 | #endif | ||
| 724 | |||
| 725 | sigemptyset (&blocked); | 692 | sigemptyset (&blocked); |
| 726 | #ifdef SIGWINCH | 693 | # ifdef SIGWINCH |
| 727 | sigaddset (&blocked, SIGWINCH); | 694 | sigaddset (&blocked, SIGWINCH); |
| 728 | #endif | 695 | # endif |
| 729 | sigaddset (&blocked, SIGIO); | 696 | sigaddset (&blocked, SIGIO); |
| 730 | pthread_sigmask (SIG_BLOCK, &blocked, 0); | 697 | pthread_sigmask (SIG_BLOCK, &blocked, 0); |
| 731 | interrupts_deferred = 1; | 698 | interrupts_deferred = 1; |
| 732 | } | 699 | #endif |
| 733 | |||
| 734 | #else /* no FASYNC */ | ||
| 735 | #ifndef MSDOS | ||
| 736 | |||
| 737 | void | ||
| 738 | request_sigio (void) | ||
| 739 | { | ||
| 740 | if (noninteractive || read_socket_hook) | ||
| 741 | return; | ||
| 742 | |||
| 743 | croak ("request_sigio"); | ||
| 744 | } | 700 | } |
| 745 | 701 | ||
| 746 | void | 702 | void |
| 747 | unrequest_sigio (void) | 703 | ignore_sigio (void) |
| 748 | { | 704 | { |
| 749 | if (noninteractive || read_socket_hook) | 705 | #ifdef USABLE_SIGIO |
| 750 | return; | 706 | signal (SIGIO, SIG_IGN); |
| 751 | 707 | #endif | |
| 752 | croak ("unrequest_sigio"); | ||
| 753 | } | 708 | } |
| 754 | 709 | ||
| 755 | #endif /* MSDOS */ | ||
| 756 | #endif /* FASYNC */ | ||
| 757 | #endif /* F_SETFL */ | ||
| 758 | #endif /* SIGIO */ | ||
| 759 | |||
| 760 | 710 | ||
| 761 | /* Getting and setting emacs_tty structures. */ | 711 | /* Getting and setting emacs_tty structures. */ |
| 762 | 712 | ||
| @@ -1497,27 +1447,21 @@ emacs_sigaction_init (struct sigaction *action, signal_handler_t handler) | |||
| 1497 | action->sa_handler = handler; | 1447 | action->sa_handler = handler; |
| 1498 | action->sa_flags = 0; | 1448 | action->sa_flags = 0; |
| 1499 | #if defined (SA_RESTART) | 1449 | #if defined (SA_RESTART) |
| 1500 | /* Emacs mostly works better with restartable system services. If this | 1450 | /* SA_RESTART causes interruptible functions with timeouts (e.g., |
| 1501 | flag exists, we probably want to turn it on here. | 1451 | 'select') to reset their timeout on some platforms (e.g., |
| 1502 | However, on some systems (only hpux11 at present) this resets the | 1452 | HP-UX 11), which is not what we want. Also, when Emacs is |
| 1503 | timeout of `select' which means that `select' never finishes if | 1453 | interactive, we don't want SA_RESTART because we need to poll |
| 1504 | it keeps getting signals. | ||
| 1505 | We define BROKEN_SA_RESTART on those systems. */ | ||
| 1506 | /* It's not clear why the comment above says "mostly works better". --Stef | ||
| 1507 | When SYNC_INPUT is set, we don't want SA_RESTART because we need to poll | ||
| 1508 | for pending input so we need long-running syscalls to be interrupted | 1454 | for pending input so we need long-running syscalls to be interrupted |
| 1509 | after a signal that sets the interrupt_input_pending flag. */ | 1455 | after a signal that sets the interrupt_input_pending flag. */ |
| 1510 | /* Non-interactive keyboard input goes through stdio, where we always | 1456 | /* Non-interactive keyboard input goes through stdio, where we always |
| 1511 | want restartable system calls. */ | 1457 | want restartable system calls. */ |
| 1512 | # if defined (BROKEN_SA_RESTART) || defined (SYNC_INPUT) | ||
| 1513 | if (noninteractive) | 1458 | if (noninteractive) |
| 1514 | # endif | ||
| 1515 | action->sa_flags = SA_RESTART; | 1459 | action->sa_flags = SA_RESTART; |
| 1516 | #endif | 1460 | #endif |
| 1517 | } | 1461 | } |
| 1518 | 1462 | ||
| 1519 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD | 1463 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 1520 | pthread_t main_thread; | 1464 | static pthread_t main_thread; |
| 1521 | #endif | 1465 | #endif |
| 1522 | 1466 | ||
| 1523 | /* If we are on the main thread, handle the signal SIG with HANDLER. | 1467 | /* If we are on the main thread, handle the signal SIG with HANDLER. |
| @@ -1964,11 +1908,9 @@ emacs_write (int fildes, const char *buf, ptrdiff_t nbyte) | |||
| 1964 | { | 1908 | { |
| 1965 | if (errno == EINTR) | 1909 | if (errno == EINTR) |
| 1966 | { | 1910 | { |
| 1967 | #ifdef SYNC_INPUT | ||
| 1968 | /* I originally used `QUIT' but that might causes files to | 1911 | /* I originally used `QUIT' but that might causes files to |
| 1969 | be truncated if you hit C-g in the middle of it. --Stef */ | 1912 | be truncated if you hit C-g in the middle of it. --Stef */ |
| 1970 | process_pending_signals (); | 1913 | process_pending_signals (); |
| 1971 | #endif | ||
| 1972 | continue; | 1914 | continue; |
| 1973 | } | 1915 | } |
| 1974 | else | 1916 | else |
| @@ -2051,19 +1993,6 @@ getwd (char *pathname) | |||
| 2051 | } | 1993 | } |
| 2052 | 1994 | ||
| 2053 | #endif /* !defined (HAVE_GETWD) || defined (BROKEN_GETWD) */ | 1995 | #endif /* !defined (HAVE_GETWD) || defined (BROKEN_GETWD) */ |
| 2054 | |||
| 2055 | /* | ||
| 2056 | * This function will go away as soon as all the stubs fixed. (fnf) | ||
| 2057 | */ | ||
| 2058 | |||
| 2059 | void | ||
| 2060 | croak (char *badfunc) | ||
| 2061 | { | ||
| 2062 | printf ("%s not yet implemented\r\n", badfunc); | ||
| 2063 | reset_all_sys_modes (); | ||
| 2064 | exit (1); | ||
| 2065 | } | ||
| 2066 | |||
| 2067 | #endif /* USG */ | 1996 | #endif /* USG */ |
| 2068 | 1997 | ||
| 2069 | /* Directory routines for systems that don't have them. */ | 1998 | /* Directory routines for systems that don't have them. */ |
diff --git a/src/syssignal.h b/src/syssignal.h index c5529ae718a..e309e6725b7 100644 --- a/src/syssignal.h +++ b/src/syssignal.h | |||
| @@ -34,27 +34,6 @@ typedef void (*signal_handler_t) (int); | |||
| 34 | 34 | ||
| 35 | extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); | 35 | extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); |
| 36 | 36 | ||
| 37 | #if ! (defined TIOCNOTTY || defined USG5 || defined CYGWIN) | ||
| 38 | _Noreturn void croak (char *); | ||
| 39 | #endif | ||
| 40 | |||
| 41 | /* Interrupt input is not used if there is no FIONREAD. */ | ||
| 42 | #include <sys/ioctl.h> | ||
| 43 | #if defined BROKEN_SIGIO || ! defined FIONREAD || defined BROKEN_FIONREAD | ||
| 44 | # undef SIGIO | ||
| 45 | #endif | ||
| 46 | |||
| 47 | /* These are only used by AIX */ | ||
| 48 | #if defined (SIGPOLL) && defined (BROKEN_SIGPOLL) | ||
| 49 | #undef SIGPOLL | ||
| 50 | #endif | ||
| 51 | #if defined (SIGAIO) && defined (BROKEN_SIGAIO) | ||
| 52 | #undef SIGAIO | ||
| 53 | #endif | ||
| 54 | #if defined (SIGPTY) && defined (BROKEN_SIGPTY) | ||
| 55 | #undef SIGPTY | ||
| 56 | #endif | ||
| 57 | |||
| 58 | #if NSIG < NSIG_MINIMUM | 37 | #if NSIG < NSIG_MINIMUM |
| 59 | # undef NSIG | 38 | # undef NSIG |
| 60 | # define NSIG NSIG_MINIMUM | 39 | # define NSIG NSIG_MINIMUM |
| @@ -85,8 +64,4 @@ _Noreturn void croak (char *); | |||
| 85 | char *strsignal (int); | 64 | char *strsignal (int); |
| 86 | #endif | 65 | #endif |
| 87 | 66 | ||
| 88 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD | ||
| 89 | extern pthread_t main_thread; | ||
| 90 | #endif | ||
| 91 | |||
| 92 | void handle_on_main_thread (int, signal_handler_t); | 67 | void handle_on_main_thread (int, signal_handler_t); |
diff --git a/src/systty.h b/src/systty.h index b660441a91e..b7f36c6c259 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -17,10 +17,8 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | /* Include the proper files. */ | 19 | /* Include the proper files. */ |
| 20 | |||
| 20 | #ifndef DOS_NT | 21 | #ifndef DOS_NT |
| 21 | #ifndef NO_TERMIO | ||
| 22 | #include <termio.h> | ||
| 23 | #endif /* not NO_TERMIO */ | ||
| 24 | #include <termios.h> | 22 | #include <termios.h> |
| 25 | #include <fcntl.h> | 23 | #include <fcntl.h> |
| 26 | #endif /* not DOS_NT */ | 24 | #endif /* not DOS_NT */ |
| @@ -39,15 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 39 | #include <unistd.h> | 37 | #include <unistd.h> |
| 40 | 38 | ||
| 41 | 39 | ||
| 42 | /* Special cases - inhibiting the use of certain features. */ | ||
| 43 | |||
| 44 | /* Allow configure to inhibit use of FIONREAD. */ | ||
| 45 | #ifdef BROKEN_FIONREAD | ||
| 46 | #undef FIONREAD | ||
| 47 | #undef ASYNC | ||
| 48 | #endif | ||
| 49 | |||
| 50 | |||
| 51 | /* Try to establish the correct character to disable terminal functions | 40 | /* Try to establish the correct character to disable terminal functions |
| 52 | in a system-independent manner. Note that USG (at least) define | 41 | in a system-independent manner. Note that USG (at least) define |
| 53 | _POSIX_VDISABLE as 0! */ | 42 | _POSIX_VDISABLE as 0! */ |
diff --git a/src/term.c b/src/term.c index 0eaf76a13df..f4117d67dec 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include <sys/file.h> | 25 | #include <sys/file.h> |
| 26 | #include <sys/time.h> | 26 | #include <sys/time.h> |
| 27 | #include <unistd.h> | 27 | #include <unistd.h> |
| 28 | #include <setjmp.h> | ||
| 29 | 28 | ||
| 30 | #include "lisp.h" | 29 | #include "lisp.h" |
| 31 | #include "termchar.h" | 30 | #include "termchar.h" |
| @@ -2944,8 +2943,7 @@ dissociate_if_controlling_tty (int fd) | |||
| 2944 | emacs_close (fd); | 2943 | emacs_close (fd); |
| 2945 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); | 2944 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); |
| 2946 | #else | 2945 | #else |
| 2947 | /* Unknown system. */ | 2946 | # error "Unknown system." |
| 2948 | croak (); | ||
| 2949 | #endif /* ! TIOCNOTTY */ | 2947 | #endif /* ! TIOCNOTTY */ |
| 2950 | #endif /* ! USG */ | 2948 | #endif /* ! USG */ |
| 2951 | } | 2949 | } |
diff --git a/src/termcap.c b/src/termcap.c index d1b05e8df94..e494cd113d9 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -19,7 +19,6 @@ Boston, MA 02110-1301, USA. */ | |||
| 19 | 19 | ||
| 20 | /* Emacs config.h may rename various library functions such as malloc. */ | 20 | /* Emacs config.h may rename various library functions such as malloc. */ |
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | ||
| 23 | #include <sys/file.h> | 22 | #include <sys/file.h> |
| 24 | #include <fcntl.h> | 23 | #include <fcntl.h> |
| 25 | #include <unistd.h> | 24 | #include <unistd.h> |
diff --git a/src/terminal.c b/src/terminal.c index c51a18dfa61..719c2a36111 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #define TERMHOOKS_INLINE EXTERN_INLINE | 21 | #define TERMHOOKS_INLINE EXTERN_INLINE |
| 22 | 22 | ||
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | 24 | ||
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
| 27 | #include "frame.h" | 26 | #include "frame.h" |
diff --git a/src/terminfo.c b/src/terminfo.c index ca2d89a000b..124c452a4a9 100644 --- a/src/terminfo.c +++ b/src/terminfo.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include "tparam.h" | 20 | #include "tparam.h" |
| 21 | 21 | ||
| 22 | #include <setjmp.h> | ||
| 23 | #include "lisp.h" | 22 | #include "lisp.h" |
| 24 | 23 | ||
| 25 | /* Define these variables that serve as global parameters to termcap, | 24 | /* Define these variables that serve as global parameters to termcap, |
diff --git a/src/textprop.c b/src/textprop.c index 2a9efba1c45..872912ea706 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <setjmp.h> | 20 | |
| 21 | #include "lisp.h" | 21 | #include "lisp.h" |
| 22 | #include "intervals.h" | 22 | #include "intervals.h" |
| 23 | #include "character.h" | 23 | #include "character.h" |
diff --git a/src/tparam.c b/src/tparam.c index 58a825c90d7..164f61d471b 100644 --- a/src/tparam.c +++ b/src/tparam.c | |||
| @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 19 | 19 | ||
| 20 | /* Emacs config.h may rename various library functions such as malloc. */ | 20 | /* Emacs config.h may rename various library functions such as malloc. */ |
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | |
| 23 | #include "lisp.h" /* for xmalloc */ | 23 | #include "lisp.h" /* for xmalloc */ |
| 24 | #include "tparam.h" | 24 | #include "tparam.h" |
| 25 | 25 | ||
diff --git a/src/undo.c b/src/undo.c index 9cd1d5f9f67..e878ef4dcf9 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -18,7 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <setjmp.h> | 21 | |
| 22 | #include "lisp.h" | 22 | #include "lisp.h" |
| 23 | #include "character.h" | 23 | #include "character.h" |
| 24 | #include "buffer.h" | 24 | #include "buffer.h" |
diff --git a/src/unexaix.c b/src/unexaix.c index c09156296f7..c01a22a79f6 100644 --- a/src/unexaix.c +++ b/src/unexaix.c | |||
| @@ -89,7 +89,6 @@ static int adjust_lnnoptrs (int, int, const char *); | |||
| 89 | 89 | ||
| 90 | static int pagemask; | 90 | static int pagemask; |
| 91 | 91 | ||
| 92 | #include <setjmp.h> | ||
| 93 | #include "lisp.h" | 92 | #include "lisp.h" |
| 94 | 93 | ||
| 95 | static void | 94 | static void |
diff --git a/src/unexcoff.c b/src/unexcoff.c index e83042a379d..966dd58cb6e 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c | |||
| @@ -120,7 +120,6 @@ static int pagemask; | |||
| 120 | 120 | ||
| 121 | #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) | 121 | #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) |
| 122 | 122 | ||
| 123 | #include <setjmp.h> | ||
| 124 | #include "lisp.h" | 123 | #include "lisp.h" |
| 125 | 124 | ||
| 126 | static void | 125 | static void |
diff --git a/src/unexcw.c b/src/unexcw.c index eae534cf4dd..96c4b4a9aec 100644 --- a/src/unexcw.c +++ b/src/unexcw.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include "unexec.h" | 22 | #include "unexec.h" |
| 23 | 23 | ||
| 24 | #include <setjmp.h> | ||
| 25 | #include <lisp.h> | 24 | #include <lisp.h> |
| 26 | #include <stdio.h> | 25 | #include <stdio.h> |
| 27 | #include <fcntl.h> | 26 | #include <fcntl.h> |
diff --git a/src/unexsol.c b/src/unexsol.c index 336f3b4faea..470206d5838 100644 --- a/src/unexsol.c +++ b/src/unexsol.c | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | #include "unexec.h" | 4 | #include "unexec.h" |
| 5 | 5 | ||
| 6 | #include <dlfcn.h> | 6 | #include <dlfcn.h> |
| 7 | #include <setjmp.h> | ||
| 8 | 7 | ||
| 9 | #include "lisp.h" | 8 | #include "lisp.h" |
| 10 | #include "character.h" | 9 | #include "character.h" |
diff --git a/src/vm-limit.c b/src/vm-limit.c index cf697b56fdf..8de0acd1bb2 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c | |||
| @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <setjmp.h> | ||
| 21 | #include <unistd.h> /* for 'environ', on AIX */ | 20 | #include <unistd.h> /* for 'environ', on AIX */ |
| 22 | #include "lisp.h" | 21 | #include "lisp.h" |
| 23 | #include "mem-limits.h" | 22 | #include "mem-limits.h" |
diff --git a/src/w16select.c b/src/w16select.c index 2026de7421d..a3f6f1fb9ae 100644 --- a/src/w16select.c +++ b/src/w16select.c | |||
| @@ -31,7 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include <dpmi.h> | 31 | #include <dpmi.h> |
| 32 | #include <go32.h> | 32 | #include <go32.h> |
| 33 | #include <sys/farptr.h> | 33 | #include <sys/farptr.h> |
| 34 | #include <setjmp.h> | ||
| 35 | #include "lisp.h" | 34 | #include "lisp.h" |
| 36 | #include "dispextern.h" /* frame.h seems to want this */ | 35 | #include "dispextern.h" /* frame.h seems to want this */ |
| 37 | #include "frame.h" /* Need this to get the X window of selected_frame */ | 36 | #include "frame.h" /* Need this to get the X window of selected_frame */ |
| @@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | #include <sys/utime.h> | 33 | #include <sys/utime.h> |
| 34 | #include <mbstring.h> /* for _mbspbrk */ | 34 | #include <mbstring.h> /* for _mbspbrk */ |
| 35 | #include <math.h> | 35 | #include <math.h> |
| 36 | #include <setjmp.h> | ||
| 37 | #include <time.h> | 36 | #include <time.h> |
| 38 | 37 | ||
| 39 | /* must include CRT headers *before* config.h */ | 38 | /* must include CRT headers *before* config.h */ |
diff --git a/src/w32console.c b/src/w32console.c index 76585851e7f..b22b09af2f2 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | 26 | ||
| 27 | #include <stdio.h> | 27 | #include <stdio.h> |
| 28 | #include <windows.h> | 28 | #include <windows.h> |
| 29 | #include <setjmp.h> | ||
| 30 | 29 | ||
| 31 | #include "lisp.h" | 30 | #include "lisp.h" |
| 32 | #include "character.h" | 31 | #include "character.h" |
diff --git a/src/w32fns.c b/src/w32fns.c index ec1acbd89d9..be008bb18c8 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <limits.h> | 26 | #include <limits.h> |
| 27 | #include <errno.h> | 27 | #include <errno.h> |
| 28 | #include <math.h> | 28 | #include <math.h> |
| 29 | #include <setjmp.h> | ||
| 30 | 29 | ||
| 31 | #include "lisp.h" | 30 | #include "lisp.h" |
| 32 | #include "w32term.h" | 31 | #include "w32term.h" |
diff --git a/src/w32font.c b/src/w32font.c index 8b3a0e4312e..833b7cdfb25 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <math.h> | 21 | #include <math.h> |
| 22 | #include <ctype.h> | 22 | #include <ctype.h> |
| 23 | #include <commdlg.h> | 23 | #include <commdlg.h> |
| 24 | #include <setjmp.h> | ||
| 25 | 24 | ||
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
| 27 | #include "w32term.h" | 26 | #include "w32term.h" |
diff --git a/src/w32heap.c b/src/w32heap.c index 26cc9aa0a0f..dc65198f90b 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <setjmp.h> | ||
| 26 | 25 | ||
| 27 | #include "w32heap.h" | 26 | #include "w32heap.h" |
| 28 | #include "lisp.h" /* for VALMASK */ | 27 | #include "lisp.h" /* for VALMASK */ |
diff --git a/src/w32inevt.c b/src/w32inevt.c index 731dd6715dc..ee07db5335b 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include <config.h> | 25 | #include <config.h> |
| 26 | #include <stdio.h> | 26 | #include <stdio.h> |
| 27 | #include <windows.h> | 27 | #include <windows.h> |
| 28 | #include <setjmp.h> | ||
| 29 | 28 | ||
| 30 | #ifndef MOUSE_MOVED | 29 | #ifndef MOUSE_MOVED |
| 31 | #define MOUSE_MOVED 1 | 30 | #define MOUSE_MOVED 1 |
diff --git a/src/w32menu.c b/src/w32menu.c index d4de73a0de7..fa7db64f147 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include <signal.h> | 22 | #include <signal.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <mbstring.h> | 24 | #include <mbstring.h> |
| 25 | #include <setjmp.h> | ||
| 26 | 25 | ||
| 27 | #include "lisp.h" | 26 | #include "lisp.h" |
| 28 | #include "keyboard.h" | 27 | #include "keyboard.h" |
diff --git a/src/w32proc.c b/src/w32proc.c index 74427e76a4f..26a0925ad87 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include <fcntl.h> | 28 | #include <fcntl.h> |
| 29 | #include <signal.h> | 29 | #include <signal.h> |
| 30 | #include <sys/file.h> | 30 | #include <sys/file.h> |
| 31 | #include <setjmp.h> | ||
| 32 | 31 | ||
| 33 | /* must include CRT headers *before* config.h */ | 32 | /* must include CRT headers *before* config.h */ |
| 34 | #include <config.h> | 33 | #include <config.h> |
diff --git a/src/w32reg.c b/src/w32reg.c index 9c727ae5ab7..8a6a3c853b1 100644 --- a/src/w32reg.c +++ b/src/w32reg.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | /* Written by Kevin Gallo */ | 19 | /* Written by Kevin Gallo */ |
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | ||
| 23 | #include "lisp.h" | 22 | #include "lisp.h" |
| 24 | #include "w32term.h" | 23 | #include "w32term.h" |
| 25 | #include "blockinput.h" | 24 | #include "blockinput.h" |
diff --git a/src/w32select.c b/src/w32select.c index 3fb88d4f17f..11c68c9c617 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -73,7 +73,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| 75 | #include <config.h> | 75 | #include <config.h> |
| 76 | #include <setjmp.h> | ||
| 77 | #include "lisp.h" | 76 | #include "lisp.h" |
| 78 | #include "w32term.h" /* for all of the w32 includes */ | 77 | #include "w32term.h" /* for all of the w32 includes */ |
| 79 | #include "w32heap.h" /* os_subtype */ | 78 | #include "w32heap.h" /* os_subtype */ |
diff --git a/src/w32term.c b/src/w32term.c index 28c1c593cf6..6244728b264 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <signal.h> | 21 | #include <signal.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <setjmp.h> | ||
| 24 | #include "lisp.h" | 23 | #include "lisp.h" |
| 25 | #include "blockinput.h" | 24 | #include "blockinput.h" |
| 26 | #include "w32term.h" | 25 | #include "w32term.h" |
| @@ -4163,6 +4162,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4163 | if (interrupt_input_blocked) | 4162 | if (interrupt_input_blocked) |
| 4164 | { | 4163 | { |
| 4165 | interrupt_input_pending = 1; | 4164 | interrupt_input_pending = 1; |
| 4165 | pending_signals = 1; | ||
| 4166 | return -1; | 4166 | return -1; |
| 4167 | } | 4167 | } |
| 4168 | 4168 | ||
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index cf99d14dc77..5d160b9d42f 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -27,7 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #define _WIN32_WINNT 0x500 | 27 | #define _WIN32_WINNT 0x500 |
| 28 | #include <windows.h> | 28 | #include <windows.h> |
| 29 | #include <usp10.h> | 29 | #include <usp10.h> |
| 30 | #include <setjmp.h> | ||
| 31 | 30 | ||
| 32 | #include "lisp.h" | 31 | #include "lisp.h" |
| 33 | #include "w32term.h" | 32 | #include "w32term.h" |
diff --git a/src/w32xfns.c b/src/w32xfns.c index 820dbcc76c6..33f40fc7c01 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <signal.h> | 20 | #include <signal.h> |
| 21 | #include <stdio.h> | 21 | #include <stdio.h> |
| 22 | #include <setjmp.h> | ||
| 23 | #include "lisp.h" | 22 | #include "lisp.h" |
| 24 | #include "keyboard.h" | 23 | #include "keyboard.h" |
| 25 | #include "frame.h" | 24 | #include "frame.h" |
diff --git a/src/widget.c b/src/widget.c index 0100acc8143..fd5ad167125 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | 30 | ||
| 31 | #include <config.h> | 31 | #include <config.h> |
| 32 | #include <stdio.h> | 32 | #include <stdio.h> |
| 33 | #include <setjmp.h> | 33 | |
| 34 | #include "lisp.h" | 34 | #include "lisp.h" |
| 35 | #include "xterm.h" | 35 | #include "xterm.h" |
| 36 | 36 | ||
diff --git a/src/window.c b/src/window.c index cf296a707e3..2589596ccfd 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #define WINDOW_INLINE EXTERN_INLINE | 23 | #define WINDOW_INLINE EXTERN_INLINE |
| 24 | 24 | ||
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <setjmp.h> | ||
| 27 | 26 | ||
| 28 | #include "lisp.h" | 27 | #include "lisp.h" |
| 29 | #include "character.h" | 28 | #include "character.h" |
| @@ -1857,23 +1856,23 @@ return value is a list of elements of the form (PARAMETER . VALUE). */) | |||
| 1857 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, | 1856 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, |
| 1858 | 2, 2, 0, | 1857 | 2, 2, 0, |
| 1859 | doc: /* Return WINDOW's value for PARAMETER. | 1858 | doc: /* Return WINDOW's value for PARAMETER. |
| 1860 | WINDOW must be a valid window and defaults to the selected one. */) | 1859 | WINDOW can be any window and defaults to the selected one. */) |
| 1861 | (Lisp_Object window, Lisp_Object parameter) | 1860 | (Lisp_Object window, Lisp_Object parameter) |
| 1862 | { | 1861 | { |
| 1863 | Lisp_Object result; | 1862 | Lisp_Object result; |
| 1864 | 1863 | ||
| 1865 | result = Fassq (parameter, decode_valid_window (window)->window_parameters); | 1864 | result = Fassq (parameter, decode_any_window (window)->window_parameters); |
| 1866 | return CDR_SAFE (result); | 1865 | return CDR_SAFE (result); |
| 1867 | } | 1866 | } |
| 1868 | 1867 | ||
| 1869 | DEFUN ("set-window-parameter", Fset_window_parameter, | 1868 | DEFUN ("set-window-parameter", Fset_window_parameter, |
| 1870 | Sset_window_parameter, 3, 3, 0, | 1869 | Sset_window_parameter, 3, 3, 0, |
| 1871 | doc: /* Set WINDOW's value of PARAMETER to VALUE. | 1870 | doc: /* Set WINDOW's value of PARAMETER to VALUE. |
| 1872 | WINDOW must be a valid window and defaults to the selected one. | 1871 | WINDOW can be any window and defaults to the selected one. |
| 1873 | Return VALUE. */) | 1872 | Return VALUE. */) |
| 1874 | (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) | 1873 | (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) |
| 1875 | { | 1874 | { |
| 1876 | register struct window *w = decode_valid_window (window); | 1875 | register struct window *w = decode_any_window (window); |
| 1877 | Lisp_Object old_alist_elt; | 1876 | Lisp_Object old_alist_elt; |
| 1878 | 1877 | ||
| 1879 | old_alist_elt = Fassq (parameter, w->window_parameters); | 1878 | old_alist_elt = Fassq (parameter, w->window_parameters); |
| @@ -2659,7 +2658,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame | |||
| 2659 | /* Check for a window that has a killed buffer. */ | 2658 | /* Check for a window that has a killed buffer. */ |
| 2660 | case CHECK_ALL_WINDOWS: | 2659 | case CHECK_ALL_WINDOWS: |
| 2661 | if (! NILP (w->buffer) | 2660 | if (! NILP (w->buffer) |
| 2662 | && NILP (BVAR (XBUFFER (w->buffer), name))) | 2661 | && !BUFFER_LIVE_P (XBUFFER (w->buffer))) |
| 2663 | emacs_abort (); | 2662 | emacs_abort (); |
| 2664 | break; | 2663 | break; |
| 2665 | 2664 | ||
| @@ -3264,7 +3263,7 @@ This function runs `window-scroll-functions' before running | |||
| 3264 | XSETWINDOW (window, w); | 3263 | XSETWINDOW (window, w); |
| 3265 | buffer = Fget_buffer (buffer_or_name); | 3264 | buffer = Fget_buffer (buffer_or_name); |
| 3266 | CHECK_BUFFER (buffer); | 3265 | CHECK_BUFFER (buffer); |
| 3267 | if (NILP (BVAR (XBUFFER (buffer), name))) | 3266 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) |
| 3268 | error ("Attempt to display deleted buffer"); | 3267 | error ("Attempt to display deleted buffer"); |
| 3269 | 3268 | ||
| 3270 | tem = w->buffer; | 3269 | tem = w->buffer; |
| @@ -3329,7 +3328,7 @@ displaying that buffer. */) | |||
| 3329 | 3328 | ||
| 3330 | if (STRINGP (object)) | 3329 | if (STRINGP (object)) |
| 3331 | object = Fget_buffer (object); | 3330 | object = Fget_buffer (object); |
| 3332 | if (BUFFERP (object) && !NILP (BVAR (XBUFFER (object), name))) | 3331 | if (BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))) |
| 3333 | { | 3332 | { |
| 3334 | /* Walk all windows looking for buffer, and force update | 3333 | /* Walk all windows looking for buffer, and force update |
| 3335 | of each of those windows. */ | 3334 | of each of those windows. */ |
| @@ -5543,7 +5542,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5543 | saved_windows = XVECTOR (data->saved_windows); | 5542 | saved_windows = XVECTOR (data->saved_windows); |
| 5544 | 5543 | ||
| 5545 | new_current_buffer = data->current_buffer; | 5544 | new_current_buffer = data->current_buffer; |
| 5546 | if (NILP (BVAR (XBUFFER (new_current_buffer), name))) | 5545 | if (!BUFFER_LIVE_P (XBUFFER (new_current_buffer))) |
| 5547 | new_current_buffer = Qnil; | 5546 | new_current_buffer = Qnil; |
| 5548 | else | 5547 | else |
| 5549 | { | 5548 | { |
| @@ -5618,7 +5617,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5618 | w = XWINDOW (window); | 5617 | w = XWINDOW (window); |
| 5619 | if (!NILP (w->buffer) | 5618 | if (!NILP (w->buffer) |
| 5620 | && !EQ (w->buffer, p->buffer) | 5619 | && !EQ (w->buffer, p->buffer) |
| 5621 | && !NILP (BVAR (XBUFFER (p->buffer), name))) | 5620 | && BUFFER_LIVE_P (XBUFFER (p->buffer))) |
| 5622 | /* If a window we restore gets another buffer, record the | 5621 | /* If a window we restore gets another buffer, record the |
| 5623 | window's old buffer. */ | 5622 | window's old buffer. */ |
| 5624 | call1 (Qrecord_window_buffer, window); | 5623 | call1 (Qrecord_window_buffer, window); |
| @@ -5768,7 +5767,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5768 | if (NILP (p->buffer)) | 5767 | if (NILP (p->buffer)) |
| 5769 | /* An internal window. */ | 5768 | /* An internal window. */ |
| 5770 | wset_buffer (w, p->buffer); | 5769 | wset_buffer (w, p->buffer); |
| 5771 | else if (!NILP (BVAR (XBUFFER (p->buffer), name))) | 5770 | else if (BUFFER_LIVE_P (XBUFFER (p->buffer))) |
| 5772 | /* If saved buffer is alive, install it. */ | 5771 | /* If saved buffer is alive, install it. */ |
| 5773 | { | 5772 | { |
| 5774 | wset_buffer (w, p->buffer); | 5773 | wset_buffer (w, p->buffer); |
| @@ -5787,7 +5786,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5787 | Fgoto_char (w->pointm); | 5786 | Fgoto_char (w->pointm); |
| 5788 | } | 5787 | } |
| 5789 | else if (!NILP (w->buffer) | 5788 | else if (!NILP (w->buffer) |
| 5790 | && !NILP (BVAR (XBUFFER (w->buffer), name))) | 5789 | && BUFFER_LIVE_P (XBUFFER (w->buffer))) |
| 5791 | /* Keep window's old buffer; make sure the markers are | 5790 | /* Keep window's old buffer; make sure the markers are |
| 5792 | real. */ | 5791 | real. */ |
| 5793 | { | 5792 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index 3536e04fe8d..ef36cf5c867 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -273,7 +273,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 273 | #include <config.h> | 273 | #include <config.h> |
| 274 | #include <stdio.h> | 274 | #include <stdio.h> |
| 275 | #include <limits.h> | 275 | #include <limits.h> |
| 276 | #include <setjmp.h> | ||
| 277 | 276 | ||
| 278 | #include "lisp.h" | 277 | #include "lisp.h" |
| 279 | #include "keyboard.h" | 278 | #include "keyboard.h" |
| @@ -3671,7 +3670,7 @@ handle_fontified_prop (struct it *it) | |||
| 3671 | } | 3670 | } |
| 3672 | /* There isn't much we can reasonably do to protect against | 3671 | /* There isn't much we can reasonably do to protect against |
| 3673 | misbehaving fontification, but here's a fig leaf. */ | 3672 | misbehaving fontification, but here's a fig leaf. */ |
| 3674 | else if (!NILP (BVAR (obuf, name))) | 3673 | else if (BUFFER_LIVE_P (obuf)) |
| 3675 | set_buffer_internal_1 (obuf); | 3674 | set_buffer_internal_1 (obuf); |
| 3676 | 3675 | ||
| 3677 | /* The fontification code may have added/removed text. | 3676 | /* The fontification code may have added/removed text. |
| @@ -9345,12 +9344,6 @@ add_to_log (const char *format, Lisp_Object arg1, Lisp_Object arg2) | |||
| 9345 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 9344 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 9346 | USE_SAFE_ALLOCA; | 9345 | USE_SAFE_ALLOCA; |
| 9347 | 9346 | ||
| 9348 | /* Do nothing if called asynchronously. Inserting text into | ||
| 9349 | a buffer may call after-change-functions and alike and | ||
| 9350 | that would means running Lisp asynchronously. */ | ||
| 9351 | if (handling_signal) | ||
| 9352 | return; | ||
| 9353 | |||
| 9354 | fmt = msg = Qnil; | 9347 | fmt = msg = Qnil; |
| 9355 | GCPRO4 (fmt, msg, arg1, arg2); | 9348 | GCPRO4 (fmt, msg, arg1, arg2); |
| 9356 | 9349 | ||
| @@ -9963,7 +9956,7 @@ ensure_echo_area_buffers (void) | |||
| 9963 | 9956 | ||
| 9964 | for (i = 0; i < 2; ++i) | 9957 | for (i = 0; i < 2; ++i) |
| 9965 | if (!BUFFERP (echo_buffer[i]) | 9958 | if (!BUFFERP (echo_buffer[i]) |
| 9966 | || NILP (BVAR (XBUFFER (echo_buffer[i]), name))) | 9959 | || !BUFFER_LIVE_P (XBUFFER (echo_buffer[i]))) |
| 9967 | { | 9960 | { |
| 9968 | char name[30]; | 9961 | char name[30]; |
| 9969 | Lisp_Object old_buffer; | 9962 | Lisp_Object old_buffer; |
| @@ -21144,8 +21137,7 @@ are the selected window and the WINDOW's buffer). */) | |||
| 21144 | : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID | 21137 | : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID |
| 21145 | : DEFAULT_FACE_ID; | 21138 | : DEFAULT_FACE_ID; |
| 21146 | 21139 | ||
| 21147 | if (XBUFFER (buffer) != current_buffer) | 21140 | old_buffer = current_buffer; |
| 21148 | old_buffer = current_buffer; | ||
| 21149 | 21141 | ||
| 21150 | /* Save things including mode_line_proptrans_alist, | 21142 | /* Save things including mode_line_proptrans_alist, |
| 21151 | and set that to nil so that we don't alter the outer value. */ | 21143 | and set that to nil so that we don't alter the outer value. */ |
| @@ -21156,8 +21148,7 @@ are the selected window and the WINDOW's buffer). */) | |||
| 21156 | mode_line_proptrans_alist = Qnil; | 21148 | mode_line_proptrans_alist = Qnil; |
| 21157 | 21149 | ||
| 21158 | Fselect_window (window, Qt); | 21150 | Fselect_window (window, Qt); |
| 21159 | if (old_buffer) | 21151 | set_buffer_internal_1 (XBUFFER (buffer)); |
| 21160 | set_buffer_internal_1 (XBUFFER (buffer)); | ||
| 21161 | 21152 | ||
| 21162 | init_iterator (&it, w, -1, -1, NULL, face_id); | 21153 | init_iterator (&it, w, -1, -1, NULL, face_id); |
| 21163 | 21154 | ||
| @@ -23167,7 +23158,8 @@ right_overwritten (struct glyph_string *s) | |||
| 23167 | { | 23158 | { |
| 23168 | int x = 0, i; | 23159 | int x = 0, i; |
| 23169 | struct glyph *glyphs = s->row->glyphs[s->area]; | 23160 | struct glyph *glyphs = s->row->glyphs[s->area]; |
| 23170 | int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars); | 23161 | int first = (s->first_glyph - glyphs |
| 23162 | + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars)); | ||
| 23171 | int end = s->row->used[s->area]; | 23163 | int end = s->row->used[s->area]; |
| 23172 | 23164 | ||
| 23173 | for (i = first; i < end && s->right_overhang > x; ++i) | 23165 | for (i = first; i < end && s->right_overhang > x; ++i) |
| @@ -23190,7 +23182,8 @@ right_overwriting (struct glyph_string *s) | |||
| 23190 | int i, k, x; | 23182 | int i, k, x; |
| 23191 | int end = s->row->used[s->area]; | 23183 | int end = s->row->used[s->area]; |
| 23192 | struct glyph *glyphs = s->row->glyphs[s->area]; | 23184 | struct glyph *glyphs = s->row->glyphs[s->area]; |
| 23193 | int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars); | 23185 | int first = (s->first_glyph - glyphs |
| 23186 | + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars)); | ||
| 23194 | 23187 | ||
| 23195 | k = -1; | 23188 | k = -1; |
| 23196 | x = 0; | 23189 | x = 0; |
diff --git a/src/xfaces.c b/src/xfaces.c index c113c1a37b7..c240a05c6c0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -204,7 +204,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 204 | #include <sys/types.h> | 204 | #include <sys/types.h> |
| 205 | #include <sys/stat.h> | 205 | #include <sys/stat.h> |
| 206 | #include <stdio.h> /* This needs to be before termchar.h */ | 206 | #include <stdio.h> /* This needs to be before termchar.h */ |
| 207 | #include <setjmp.h> | ||
| 208 | 207 | ||
| 209 | #include "lisp.h" | 208 | #include "lisp.h" |
| 210 | #include "character.h" | 209 | #include "character.h" |
diff --git a/src/xfns.c b/src/xfns.c index 90b54d12345..8304a3df04f 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <stdio.h> | 21 | #include <stdio.h> |
| 22 | #include <math.h> | 22 | #include <math.h> |
| 23 | #include <setjmp.h> | ||
| 24 | #include <unistd.h> | 23 | #include <unistd.h> |
| 25 | 24 | ||
| 26 | /* This makes the fields of a Display accessible, in Xlib header files. */ | 25 | /* This makes the fields of a Display accessible, in Xlib header files. */ |
diff --git a/src/xfont.c b/src/xfont.c index 7755b780815..1f2fd13f1b7 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | #include <X11/Xlib.h> | 24 | #include <X11/Xlib.h> |
| 26 | 25 | ||
| 27 | #include "lisp.h" | 26 | #include "lisp.h" |
diff --git a/src/xftfont.c b/src/xftfont.c index 404b9124099..9f52eb8b233 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <setjmp.h> | ||
| 25 | #include <X11/Xlib.h> | 24 | #include <X11/Xlib.h> |
| 26 | #include <X11/Xft/Xft.h> | 25 | #include <X11/Xft/Xft.h> |
| 27 | 26 | ||
diff --git a/src/xgselect.c b/src/xgselect.c index 5f4c7edfb79..c161564a322 100644 --- a/src/xgselect.c +++ b/src/xgselect.c | |||
| @@ -19,14 +19,12 @@ along with GNU Emacs. If not, see <http§://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | 21 | ||
| 22 | #include <setjmp.h> | ||
| 23 | #include "xgselect.h" | 22 | #include "xgselect.h" |
| 24 | 23 | ||
| 25 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) | 24 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) |
| 26 | 25 | ||
| 27 | #include <glib.h> | 26 | #include <glib.h> |
| 28 | #include <errno.h> | 27 | #include <errno.h> |
| 29 | #include <setjmp.h> | ||
| 30 | #include "xterm.h" | 28 | #include "xterm.h" |
| 31 | 29 | ||
| 32 | int | 30 | int |
diff --git a/src/xmenu.c b/src/xmenu.c index 605db13e149..d03a4bc974b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | #include <config.h> | 33 | #include <config.h> |
| 34 | 34 | ||
| 35 | #include <stdio.h> | 35 | #include <stdio.h> |
| 36 | #include <setjmp.h> | ||
| 37 | 36 | ||
| 38 | #include "lisp.h" | 37 | #include "lisp.h" |
| 39 | #include "keyboard.h" | 38 | #include "keyboard.h" |
| @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #ifdef HAVE_LIBXML2 | 21 | #ifdef HAVE_LIBXML2 |
| 22 | 22 | ||
| 23 | #include <setjmp.h> | ||
| 24 | #include <libxml/tree.h> | 23 | #include <libxml/tree.h> |
| 25 | #include <libxml/parser.h> | 24 | #include <libxml/parser.h> |
| 26 | #include <libxml/HTMLparser.h> | 25 | #include <libxml/HTMLparser.h> |
diff --git a/src/xrdb.c b/src/xrdb.c index 624bafa5e92..73672c9617c 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <epaths.h> | 26 | #include <epaths.h> |
| 27 | 27 | ||
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <setjmp.h> | ||
| 30 | 29 | ||
| 31 | #include "lisp.h" | 30 | #include "lisp.h" |
| 32 | 31 | ||
diff --git a/src/xselect.c b/src/xselect.c index 5a3b7452c6d..ab199e0b9b9 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <limits.h> | 23 | #include <limits.h> |
| 24 | #include <stdio.h> /* termhooks.h needs this */ | 24 | #include <stdio.h> /* termhooks.h needs this */ |
| 25 | #include <setjmp.h> | ||
| 26 | 25 | ||
| 27 | #ifdef HAVE_SYS_TYPES_H | 26 | #ifdef HAVE_SYS_TYPES_H |
| 28 | #include <sys/types.h> | 27 | #include <sys/types.h> |
diff --git a/src/xsettings.c b/src/xsettings.c index a28d75d9422..58c84495489 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <float.h> | 22 | #include <float.h> |
| 23 | #include <limits.h> | 23 | #include <limits.h> |
| 24 | #include <setjmp.h> | ||
| 25 | #include <fcntl.h> | 24 | #include <fcntl.h> |
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
| 27 | #include "xterm.h" | 26 | #include "xterm.h" |
| @@ -711,12 +710,12 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 711 | if (send_event_p) | 710 | if (send_event_p) |
| 712 | store_config_changed_event (Qfont_render, | 711 | store_config_changed_event (Qfont_render, |
| 713 | XCAR (dpyinfo->name_list_element)); | 712 | XCAR (dpyinfo->name_list_element)); |
| 714 | Vxft_settings | 713 | Vxft_settings |
| 715 | = make_formatted_string (buf, format, | 714 | = make_formatted_string (buf, format, |
| 716 | oldsettings.aa, oldsettings.hinting, | 715 | oldsettings.aa, oldsettings.hinting, |
| 717 | oldsettings.rgba, oldsettings.lcdfilter, | 716 | oldsettings.rgba, oldsettings.lcdfilter, |
| 718 | oldsettings.hintstyle, oldsettings.dpi); | 717 | oldsettings.hintstyle, oldsettings.dpi); |
| 719 | 718 | ||
| 720 | } | 719 | } |
| 721 | else | 720 | else |
| 722 | FcPatternDestroy (pat); | 721 | FcPatternDestroy (pat); |
diff --git a/src/xsmfns.c b/src/xsmfns.c index cddbb2aae86..8067899f931 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -29,7 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include <unistd.h> | 29 | #include <unistd.h> |
| 30 | #include <sys/param.h> | 30 | #include <sys/param.h> |
| 31 | #include <stdio.h> | 31 | #include <stdio.h> |
| 32 | #include <setjmp.h> | ||
| 33 | 32 | ||
| 34 | #include "lisp.h" | 33 | #include "lisp.h" |
| 35 | #include "systime.h" | 34 | #include "systime.h" |
diff --git a/src/xterm.c b/src/xterm.c index 8a702800c38..5bc87d0ec64 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <setjmp.h> | ||
| 26 | 25 | ||
| 27 | #ifdef HAVE_X_WINDOWS | 26 | #ifdef HAVE_X_WINDOWS |
| 28 | 27 | ||
| @@ -47,7 +46,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 47 | 46 | ||
| 48 | #include <fcntl.h> | 47 | #include <fcntl.h> |
| 49 | #include <errno.h> | 48 | #include <errno.h> |
| 50 | #include <setjmp.h> | ||
| 51 | #include <sys/stat.h> | 49 | #include <sys/stat.h> |
| 52 | /* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed. */ | 50 | /* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed. */ |
| 53 | /* #include <sys/param.h> */ | 51 | /* #include <sys/param.h> */ |
| @@ -7140,25 +7138,17 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold | |||
| 7140 | if (interrupt_input_blocked) | 7138 | if (interrupt_input_blocked) |
| 7141 | { | 7139 | { |
| 7142 | interrupt_input_pending = 1; | 7140 | interrupt_input_pending = 1; |
| 7143 | #ifdef SYNC_INPUT | ||
| 7144 | pending_signals = 1; | 7141 | pending_signals = 1; |
| 7145 | #endif | ||
| 7146 | return -1; | 7142 | return -1; |
| 7147 | } | 7143 | } |
| 7148 | 7144 | ||
| 7149 | interrupt_input_pending = 0; | 7145 | interrupt_input_pending = 0; |
| 7150 | #ifdef SYNC_INPUT | ||
| 7151 | pending_signals = pending_atimers; | 7146 | pending_signals = pending_atimers; |
| 7152 | #endif | ||
| 7153 | BLOCK_INPUT; | 7147 | BLOCK_INPUT; |
| 7154 | 7148 | ||
| 7155 | /* So people can tell when we have read the available input. */ | 7149 | /* So people can tell when we have read the available input. */ |
| 7156 | input_signal_count++; | 7150 | input_signal_count++; |
| 7157 | 7151 | ||
| 7158 | #ifndef SYNC_INPUT | ||
| 7159 | ++handling_signal; | ||
| 7160 | #endif | ||
| 7161 | |||
| 7162 | /* For debugging, this gives a way to fake an I/O error. */ | 7152 | /* For debugging, this gives a way to fake an I/O error. */ |
| 7163 | if (terminal->display_info.x == XTread_socket_fake_io_error) | 7153 | if (terminal->display_info.x == XTread_socket_fake_io_error) |
| 7164 | { | 7154 | { |
| @@ -7247,9 +7237,6 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold | |||
| 7247 | pending_autoraise_frame = 0; | 7237 | pending_autoraise_frame = 0; |
| 7248 | } | 7238 | } |
| 7249 | 7239 | ||
| 7250 | #ifndef SYNC_INPUT | ||
| 7251 | --handling_signal; | ||
| 7252 | #endif | ||
| 7253 | UNBLOCK_INPUT; | 7240 | UNBLOCK_INPUT; |
| 7254 | 7241 | ||
| 7255 | return count; | 7242 | return count; |
| @@ -7804,7 +7791,6 @@ x_connection_closed (Display *dpy, const char *error_message) | |||
| 7804 | 7791 | ||
| 7805 | error_msg = alloca (strlen (error_message) + 1); | 7792 | error_msg = alloca (strlen (error_message) + 1); |
| 7806 | strcpy (error_msg, error_message); | 7793 | strcpy (error_msg, error_message); |
| 7807 | handling_signal = 0; | ||
| 7808 | 7794 | ||
| 7809 | /* Inhibit redisplay while frames are being deleted. */ | 7795 | /* Inhibit redisplay while frames are being deleted. */ |
| 7810 | specbind (Qinhibit_redisplay, Qt); | 7796 | specbind (Qinhibit_redisplay, Qt); |
| @@ -7892,7 +7878,7 @@ For details, see etc/PROBLEMS.\n", | |||
| 7892 | { | 7878 | { |
| 7893 | sigset_t unblocked; | 7879 | sigset_t unblocked; |
| 7894 | sigemptyset (&unblocked); | 7880 | sigemptyset (&unblocked); |
| 7895 | #ifdef SIGIO | 7881 | #ifdef USABLE_SIGIO |
| 7896 | sigaddset (&unblocked, SIGIO); | 7882 | sigaddset (&unblocked, SIGIO); |
| 7897 | #endif | 7883 | #endif |
| 7898 | sigaddset (&unblocked, SIGALRM); | 7884 | sigaddset (&unblocked, SIGALRM); |
| @@ -10439,10 +10425,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 10439 | fcntl (connection, F_SETOWN, getpid ()); | 10425 | fcntl (connection, F_SETOWN, getpid ()); |
| 10440 | #endif /* ! defined (F_SETOWN) */ | 10426 | #endif /* ! defined (F_SETOWN) */ |
| 10441 | 10427 | ||
| 10442 | #ifdef SIGIO | ||
| 10443 | if (interrupt_input) | 10428 | if (interrupt_input) |
| 10444 | init_sigio (connection); | 10429 | init_sigio (connection); |
| 10445 | #endif /* ! defined (SIGIO) */ | ||
| 10446 | 10430 | ||
| 10447 | #ifdef USE_LUCID | 10431 | #ifdef USE_LUCID |
| 10448 | { | 10432 | { |