diff options
213 files changed, 6720 insertions, 3593 deletions
| @@ -1,3 +1,78 @@ | |||
| 1 | 2012-09-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * configure.ac (_setjmp, _longjmp): Check by compiling | ||
| 4 | instead of by guessing. The guesses were wrong for | ||
| 5 | recent versions of Solaris, such as Solaris 11. | ||
| 6 | |||
| 7 | 2012-09-03 Paul Eggert <eggert@cs.ucla.edu> | ||
| 8 | |||
| 9 | * configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init. | ||
| 10 | It generates false alarms in doc.c, regex.c, xdisp.c. See | ||
| 11 | <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00040.html>. | ||
| 12 | |||
| 13 | Merge from gnulib, incorporating: | ||
| 14 | 2012-08-29 stdbool: be more compatible with mixed C/C++ compiles | ||
| 15 | 2011-11-30 manywarnings: update the list of "all" warnings | ||
| 16 | |||
| 17 | 2012-09-02 Jan Djärv <jan.h.d@swipnet.se> | ||
| 18 | |||
| 19 | * configure.ac (HAVE_GOBJECT): Check for gobject-2.0 (Bug#12332). | ||
| 20 | |||
| 21 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 22 | |||
| 23 | * configure.ac (_FORTIFY_SOURCE): Define only when optimizing. | ||
| 24 | This ports to glibc 2.15 or later, when configured with | ||
| 25 | --enable-gcc-warnings. See Eric Blake in | ||
| 26 | <http://lists.gnu.org/archive/html/bug-grep/2012-09/msg00000.html>. | ||
| 27 | |||
| 28 | 2012-09-01 Daniel Colascione <dan.colascione@gmail.com> | ||
| 29 | |||
| 30 | * configure.ac: Introduce term_header variable, which holds the | ||
| 31 | value which will become TERM_HEADER in code. We effect our choice | ||
| 32 | of window system by setting term_header and WINDOW_SYSTEM_OBJ | ||
| 33 | instead of using ad-hoc variables and flags for each window | ||
| 34 | system. | ||
| 35 | |||
| 36 | 2012-08-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 37 | |||
| 38 | * configure.ac (CFLAGS): Prefer -g3 to -g if -g3 works | ||
| 39 | and if the user has not specified CFLAGS. -g3 simplifies | ||
| 40 | debugging, since it makes macros visible to the debugger. | ||
| 41 | |||
| 42 | 2012-08-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 43 | |||
| 44 | * lib/makefile.w32-in ($(BLD)/execinfo.$(O)): Update dependencies. | ||
| 45 | |||
| 46 | 2012-08-25 Eli Zaretskii <eliz@gnu.org> | ||
| 47 | |||
| 48 | * lib/makefile.w32-in ($(BLD)/execinfo.$(O), execinfo.h): New targets. | ||
| 49 | (GNULIBOBJS): Add $(BLD)/execinfo.$(O). | ||
| 50 | |||
| 51 | 2012-08-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 52 | |||
| 53 | On assertion failure, print backtrace if available. | ||
| 54 | Merge from gnulib, incorporating: | ||
| 55 | 2012-08-24 execinfo: port to FreeBSD | ||
| 56 | 2012-08-22 execinfo: new module | ||
| 57 | * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. | ||
| 58 | * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4: New files. | ||
| 59 | |||
| 60 | 2012-08-22 Glenn Morris <rgm@gnu.org> | ||
| 61 | |||
| 62 | * Makefile.in (install-arch-dep): If NO_BIN_LINK is non-null, | ||
| 63 | do not create the bin/emacs link. (Bug#12011) | ||
| 64 | |||
| 65 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> | ||
| 66 | |||
| 67 | Merge from gnulib, incorporating: | ||
| 68 | 2012-08-20 extern-inline: support old GCC 'inline' | ||
| 69 | |||
| 70 | 2012-08-20 Glenn Morris <rgm@gnu.org> | ||
| 71 | |||
| 72 | * configure.ac (AC_PROG_LN_S): Test for ln. | ||
| 73 | * Makefile.in (LN_S): New, set by configure. | ||
| 74 | (install-arch-dep): Use $LN_S. | ||
| 75 | |||
| 1 | 2012-08-19 Paul Eggert <eggert@cs.ucla.edu> | 76 | 2012-08-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 77 | ||
| 3 | Merge from gnulib, incorporating: | 78 | Merge from gnulib, incorporating: |
diff --git a/Makefile.in b/Makefile.in index ab9f16c0353..122a35d4416 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -246,6 +246,7 @@ INSTALL_INFO = @INSTALL_INFO@ | |||
| 246 | # By default, we uphold the dignity of our programs. | 246 | # By default, we uphold the dignity of our programs. |
| 247 | INSTALL_STRIP = | 247 | INSTALL_STRIP = |
| 248 | MKDIR_P = @MKDIR_P@ | 248 | MKDIR_P = @MKDIR_P@ |
| 249 | LN_S = @LN_S@ | ||
| 249 | 250 | ||
| 250 | # We use gzip to compress installed .el files. | 251 | # We use gzip to compress installed .el files. |
| 251 | GZIP_PROG = @GZIP_PROG@ | 252 | GZIP_PROG = @GZIP_PROG@ |
| @@ -436,8 +437,10 @@ install-arch-dep: install-arch-indep install-doc | |||
| 436 | if test "${ns_self_contained}" = "no"; then \ | 437 | if test "${ns_self_contained}" = "no"; then \ |
| 437 | ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) || exit 1 ; \ | 438 | ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) || exit 1 ; \ |
| 438 | chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) ; \ | 439 | chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) ; \ |
| 439 | rm -f $(DESTDIR)${bindir}/$(EMACS) ; \ | 440 | if test "x${NO_BIN_LINK}" = x; then \ |
| 440 | ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) || true ; \ | 441 | rm -f $(DESTDIR)${bindir}/$(EMACS) ; \ |
| 442 | cd $(DESTDIR)${bindir} && $(LN_S) $(EMACSFULL) $(EMACS); \ | ||
| 443 | fi; \ | ||
| 441 | else \ | 444 | else \ |
| 442 | subdir=${ns_appresdir}/site-lisp; \ | 445 | subdir=${ns_appresdir}/site-lisp; \ |
| 443 | ${write_subdir} || exit 1; \ | 446 | ${write_subdir} || exit 1; \ |
diff --git a/admin/ChangeLog b/admin/ChangeLog index ea977e80cfa..145028ec815 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2012-08-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree. | ||
| 4 | |||
| 5 | 2012-08-28 Andreas Schwab <schwab@linux-m68k.org> | ||
| 6 | |||
| 7 | * charsets/mule-charsets.el (header): Fix typo. | ||
| 8 | |||
| 9 | 2012-08-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 10 | |||
| 11 | On assertion failure, print backtrace if available. | ||
| 12 | * merge-gnulib (GNULIB_MODULES): Add execinfo. | ||
| 13 | |||
| 1 | 2012-08-16 Paul Eggert <eggert@cs.ucla.edu> | 14 | 2012-08-16 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 15 | ||
| 3 | Use ASCII tests for character types. | 16 | Use ASCII tests for character types. |
diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el index e174312143d..8d64dd9edbf 100644 --- a/admin/bzrmerge.el +++ b/admin/bzrmerge.el | |||
| @@ -45,16 +45,23 @@ The list returned is sorted by oldest-first." | |||
| 45 | (erase-buffer) | 45 | (erase-buffer) |
| 46 | ;; We generally want to make sure we start with a clean tree, but we also | 46 | ;; We generally want to make sure we start with a clean tree, but we also |
| 47 | ;; want to allow restarts (i.e. with some part of FROM already merged but | 47 | ;; want to allow restarts (i.e. with some part of FROM already merged but |
| 48 | ;; not yet committed). | 48 | ;; not yet committed). Unversioned (unknown) files in the tree |
| 49 | ;; are also ok. | ||
| 49 | (call-process "bzr" nil t nil "status" "-v") | 50 | (call-process "bzr" nil t nil "status" "-v") |
| 50 | (goto-char (point-min)) | 51 | (goto-char (point-min)) |
| 51 | (when (re-search-forward "^conflicts:\n" nil t) | 52 | (when (re-search-forward "^conflicts:\n" nil t) |
| 52 | (error "You still have unresolved conflicts")) | 53 | (error "You still have unresolved conflicts")) |
| 53 | (let ((merges ())) | 54 | (let ((merges ()) |
| 55 | found) | ||
| 54 | (if (not (re-search-forward "^pending merges:\n" nil t)) | 56 | (if (not (re-search-forward "^pending merges:\n" nil t)) |
| 55 | (when (save-excursion | 57 | (when (save-excursion |
| 56 | (goto-char (point-min)) | 58 | (goto-char (point-min)) |
| 57 | (re-search-forward "^[a-z ]*:\n" nil t)) | 59 | (while (and |
| 60 | (re-search-forward "^\\([a-z ]*\\):\n" nil t) | ||
| 61 | (not | ||
| 62 | (setq found | ||
| 63 | (not (equal "unknown" (match-string 1))))))) | ||
| 64 | found) | ||
| 58 | (error "You still have uncommitted changes")) | 65 | (error "You still have uncommitted changes")) |
| 59 | ;; This is really stupid, but it seems there's no easy way to figure | 66 | ;; This is really stupid, but it seems there's no easy way to figure |
| 60 | ;; out which revisions have been merged already. The only info I can | 67 | ;; out which revisions have been merged already. The only info I can |
diff --git a/admin/charsets/mule-charsets.el b/admin/charsets/mule-charsets.el index 9ac08bef724..4a48d994b1b 100644 --- a/admin/charsets/mule-charsets.el +++ b/admin/charsets/mule-charsets.el | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | 45 | ||
| 46 | (defconst header | 46 | (defconst header |
| 47 | (format | 47 | (format |
| 48 | "# Generated by running amdin/charsets/mule-charsets.el in Emacs %d.%d.\n" | 48 | "# Generated by running admin/charsets/mule-charsets.el in Emacs %d.%d.\n" |
| 49 | emacs-major-version emacs-minor-version)) | 49 | emacs-major-version emacs-minor-version)) |
| 50 | 50 | ||
| 51 | (dolist (elt charset-alist) | 51 | (dolist (elt charset-alist) |
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 63865edf3ce..775d43e68d3 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -28,7 +28,7 @@ GNULIB_URL=git://git.savannah.gnu.org/gnulib.git | |||
| 28 | GNULIB_MODULES=' | 28 | GNULIB_MODULES=' |
| 29 | alloca-opt c-ctype c-strcase | 29 | alloca-opt c-ctype c-strcase |
| 30 | careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 | 30 | careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 |
| 31 | dtoastr dtotimespec dup2 environ | 31 | dtoastr dtotimespec dup2 environ execinfo |
| 32 | filemode getloadavg getopt-gnu gettime gettimeofday | 32 | filemode getloadavg getopt-gnu gettime gettimeofday |
| 33 | ignore-value intprops largefile lstat | 33 | ignore-value intprops largefile lstat |
| 34 | manywarnings mktime pselect pthread_sigmask readlink | 34 | manywarnings mktime pselect pthread_sigmask readlink |
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index 16af943f331..dbedb5d12e5 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | # the same distribution terms as the rest of that program. | 36 | # the same distribution terms as the rest of that program. |
| 37 | # | 37 | # |
| 38 | # Generated by gnulib-tool. | 38 | # Generated by gnulib-tool. |
| 39 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings | 39 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings |
| 40 | 40 | ||
| 41 | VPATH = @srcdir@ | 41 | VPATH = @srcdir@ |
| 42 | pkgdatadir = $(datadir)/@PACKAGE@ | 42 | pkgdatadir = $(datadir)/@PACKAGE@ |
| @@ -65,7 +65,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |||
| 65 | am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ | 65 | am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ |
| 66 | $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \ | 66 | $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \ |
| 67 | $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/dup2.m4 \ | 67 | $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/dup2.m4 \ |
| 68 | $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/extensions.m4 \ | 68 | $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/execinfo.m4 \ |
| 69 | $(top_srcdir)/m4/extensions.m4 \ | ||
| 69 | $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/filemode.m4 \ | 70 | $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/filemode.m4 \ |
| 70 | $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \ | 71 | $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \ |
| 71 | $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ | 72 | $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ |
| @@ -180,6 +181,7 @@ ECHO_C = @ECHO_C@ | |||
| 180 | ECHO_N = @ECHO_N@ | 181 | ECHO_N = @ECHO_N@ |
| 181 | ECHO_T = @ECHO_T@ | 182 | ECHO_T = @ECHO_T@ |
| 182 | EGREP = @EGREP@ | 183 | EGREP = @EGREP@ |
| 184 | EXECINFO_H = @EXECINFO_H@ | ||
| 183 | EXEEXT = @EXEEXT@ | 185 | EXEEXT = @EXEEXT@ |
| 184 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | 186 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ |
| 185 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | 187 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ |
| @@ -357,6 +359,8 @@ GNULIB_WRITE = @GNULIB_WRITE@ | |||
| 357 | GNULIB__EXIT = @GNULIB__EXIT@ | 359 | GNULIB__EXIT = @GNULIB__EXIT@ |
| 358 | GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@ | 360 | GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@ |
| 359 | GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ | 361 | GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ |
| 362 | GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ | ||
| 363 | GOBJECT_LIBS = @GOBJECT_LIBS@ | ||
| 360 | GREP = @GREP@ | 364 | GREP = @GREP@ |
| 361 | GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ | 365 | GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ |
| 362 | GSETTINGS_LIBS = @GSETTINGS_LIBS@ | 366 | GSETTINGS_LIBS = @GSETTINGS_LIBS@ |
| @@ -556,11 +560,13 @@ LIBXTR6 = @LIBXTR6@ | |||
| 556 | LIBXT_OTHER = @LIBXT_OTHER@ | 560 | LIBXT_OTHER = @LIBXT_OTHER@ |
| 557 | LIBX_OTHER = @LIBX_OTHER@ | 561 | LIBX_OTHER = @LIBX_OTHER@ |
| 558 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ | 562 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ |
| 563 | LIB_EXECINFO = @LIB_EXECINFO@ | ||
| 559 | LIB_GCC = @LIB_GCC@ | 564 | LIB_GCC = @LIB_GCC@ |
| 560 | LIB_MATH = @LIB_MATH@ | 565 | LIB_MATH = @LIB_MATH@ |
| 561 | LIB_PTHREAD = @LIB_PTHREAD@ | 566 | LIB_PTHREAD = @LIB_PTHREAD@ |
| 562 | LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ | 567 | LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ |
| 563 | LIB_STANDARD = @LIB_STANDARD@ | 568 | LIB_STANDARD = @LIB_STANDARD@ |
| 569 | LN_S = @LN_S@ | ||
| 564 | LTLIBINTL = @LTLIBINTL@ | 570 | LTLIBINTL = @LTLIBINTL@ |
| 565 | LTLIBOBJS = @LTLIBOBJS@ | 571 | LTLIBOBJS = @LTLIBOBJS@ |
| 566 | M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ | 572 | M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ |
| @@ -751,6 +757,7 @@ WERROR_CFLAGS = @WERROR_CFLAGS@ | |||
| 751 | WIDGET_OBJ = @WIDGET_OBJ@ | 757 | WIDGET_OBJ = @WIDGET_OBJ@ |
| 752 | WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ | 758 | WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ |
| 753 | WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ | 759 | WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ |
| 760 | WINDOW_SYSTEM_OBJ = @WINDOW_SYSTEM_OBJ@ | ||
| 754 | WINT_T_SUFFIX = @WINT_T_SUFFIX@ | 761 | WINT_T_SUFFIX = @WINT_T_SUFFIX@ |
| 755 | XFT_CFLAGS = @XFT_CFLAGS@ | 762 | XFT_CFLAGS = @XFT_CFLAGS@ |
| 756 | XFT_LIBS = @XFT_LIBS@ | 763 | XFT_LIBS = @XFT_LIBS@ |
| @@ -844,16 +851,17 @@ x_default_search_path = @x_default_search_path@ | |||
| 844 | # statements but through direct file reference. Therefore this snippet must be | 851 | # statements but through direct file reference. Therefore this snippet must be |
| 845 | # present in all Makefile.am that need it. This is ensured by the applicability | 852 | # present in all Makefile.am that need it. This is ensured by the applicability |
| 846 | # 'all' defined above. | 853 | # 'all' defined above. |
| 847 | BUILT_SOURCES = $(ALLOCA_H) $(GETOPT_H) inttypes.h signal.h \ | 854 | BUILT_SOURCES = $(ALLOCA_H) $(EXECINFO_H) $(GETOPT_H) inttypes.h \ |
| 848 | arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \ | 855 | signal.h arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \ |
| 849 | $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ | 856 | $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ |
| 850 | stdlib.h sys/select.h sys/stat.h sys/time.h time.h unistd.h | 857 | stdlib.h sys/select.h sys/stat.h sys/time.h time.h unistd.h |
| 851 | EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \ | 858 | EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \ |
| 852 | sha256.h sha512.h dosname.h ftoastr.c ftoastr.h dup2.c \ | 859 | sha256.h sha512.h dosname.h ftoastr.c ftoastr.h dup2.c \ |
| 853 | filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ | 860 | execinfo.c execinfo.in.h filemode.h getloadavg.c getopt.c \ |
| 854 | getopt_int.h gettimeofday.c ignore-value.h intprops.h \ | 861 | getopt.in.h getopt1.c getopt_int.h gettimeofday.c \ |
| 855 | inttypes.in.h lstat.c mktime-internal.h mktime.c pathmax.h \ | 862 | ignore-value.h intprops.h inttypes.in.h lstat.c \ |
| 856 | pselect.c pthread_sigmask.c readlink.c signal.in.h \ | 863 | mktime-internal.h mktime.c pathmax.h pselect.c \ |
| 864 | pthread_sigmask.c readlink.c signal.in.h \ | ||
| 857 | $(top_srcdir)/build-aux/snippet/_Noreturn.h \ | 865 | $(top_srcdir)/build-aux/snippet/_Noreturn.h \ |
| 858 | $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ | 866 | $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ |
| 859 | $(top_srcdir)/build-aux/snippet/c++defs.h \ | 867 | $(top_srcdir)/build-aux/snippet/c++defs.h \ |
| @@ -865,14 +873,15 @@ EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \ | |||
| 865 | sys_time.in.h time.in.h time_r.c timespec.h u64.h unistd.in.h \ | 873 | sys_time.in.h time.in.h time_r.c timespec.h u64.h unistd.in.h \ |
| 866 | utimens.h verify.h | 874 | utimens.h verify.h |
| 867 | MOSTLYCLEANDIRS = sys sys | 875 | MOSTLYCLEANDIRS = sys sys |
| 868 | MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \ | 876 | MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t execinfo.h \ |
| 869 | getopt.h-t inttypes.h inttypes.h-t signal.h signal.h-t \ | 877 | execinfo.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t \ |
| 870 | arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ | 878 | signal.h signal.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h \ |
| 871 | warn-on-use.h warn-on-use.h-t stdalign.h stdalign.h-t stdarg.h \ | 879 | c++defs.h-t warn-on-use.h warn-on-use.h-t stdalign.h \ |
| 872 | stdarg.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \ | 880 | stdalign.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ |
| 873 | stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t sys/select.h \ | 881 | stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ |
| 874 | sys/select.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \ | 882 | stdlib.h stdlib.h-t sys/select.h sys/select.h-t sys/stat.h \ |
| 875 | time.h time.h-t unistd.h unistd.h-t | 883 | sys/stat.h-t sys/time.h sys/time.h-t time.h time.h-t unistd.h \ |
| 884 | unistd.h-t | ||
| 876 | noinst_LIBRARIES = libgnu.a | 885 | noinst_LIBRARIES = libgnu.a |
| 877 | AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) | 886 | AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) |
| 878 | DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src | 887 | DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src |
| @@ -883,8 +892,8 @@ libgnu_a_SOURCES = allocator.c c-ctype.h c-ctype.c c-strcase.h \ | |||
| 883 | timespec-add.c timespec-sub.c u64.c utimens.c | 892 | timespec-add.c timespec-sub.c u64.c utimens.c |
| 884 | libgnu_a_LIBADD = $(gl_LIBOBJS) | 893 | libgnu_a_LIBADD = $(gl_LIBOBJS) |
| 885 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) | 894 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) |
| 886 | EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \ | 895 | EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c execinfo.c getloadavg.c \ |
| 887 | getopt1.c gettimeofday.c lstat.c mktime.c pselect.c \ | 896 | getopt.c getopt1.c gettimeofday.c lstat.c mktime.c pselect.c \ |
| 888 | pthread_sigmask.c readlink.c stat.c strtoimax.c strtol.c \ | 897 | pthread_sigmask.c readlink.c stat.c strtoimax.c strtol.c \ |
| 889 | strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ | 898 | strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ |
| 890 | strtoumax.c symlink.c time_r.c | 899 | strtoumax.c symlink.c time_r.c |
| @@ -953,6 +962,7 @@ distclean-compile: | |||
| 953 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ | 962 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ |
| 954 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtotimespec.Po@am__quote@ | 963 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtotimespec.Po@am__quote@ |
| 955 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ | 964 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ |
| 965 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.Po@am__quote@ | ||
| 956 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ | 966 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ |
| 957 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ | 967 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ |
| 958 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ | 968 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ |
| @@ -1212,6 +1222,17 @@ uninstall-am: | |||
| 1212 | @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status | 1222 | @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status |
| 1213 | @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ | 1223 | @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ |
| 1214 | 1224 | ||
| 1225 | # We need the following in order to create <execinfo.h> when the system | ||
| 1226 | # doesn't have one that works. | ||
| 1227 | @GL_GENERATE_EXECINFO_H_TRUE@execinfo.h: execinfo.in.h $(top_builddir)/config.status | ||
| 1228 | @GL_GENERATE_EXECINFO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 1229 | @GL_GENERATE_EXECINFO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | ||
| 1230 | @GL_GENERATE_EXECINFO_H_TRUE@ cat $(srcdir)/execinfo.in.h; \ | ||
| 1231 | @GL_GENERATE_EXECINFO_H_TRUE@ } > $@-t && \ | ||
| 1232 | @GL_GENERATE_EXECINFO_H_TRUE@ mv $@-t $@ | ||
| 1233 | @GL_GENERATE_EXECINFO_H_FALSE@execinfo.h: $(top_builddir)/config.status | ||
| 1234 | @GL_GENERATE_EXECINFO_H_FALSE@ rm -f $@ | ||
| 1235 | |||
| 1215 | # We need the following in order to create <getopt.h> when the system | 1236 | # We need the following in order to create <getopt.h> when the system |
| 1216 | # doesn't have one that works with the given compiler. | 1237 | # doesn't have one that works with the given compiler. |
| 1217 | getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) | 1238 | getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) |
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4 index f7ef80bb805..38f7863ba9d 100644 --- a/autogen/aclocal.m4 +++ b/autogen/aclocal.m4 | |||
| @@ -990,6 +990,7 @@ m4_include([m4/c-strtod.m4]) | |||
| 990 | m4_include([m4/clock_time.m4]) | 990 | m4_include([m4/clock_time.m4]) |
| 991 | m4_include([m4/dup2.m4]) | 991 | m4_include([m4/dup2.m4]) |
| 992 | m4_include([m4/environ.m4]) | 992 | m4_include([m4/environ.m4]) |
| 993 | m4_include([m4/execinfo.m4]) | ||
| 993 | m4_include([m4/extensions.m4]) | 994 | m4_include([m4/extensions.m4]) |
| 994 | m4_include([m4/extern-inline.m4]) | 995 | m4_include([m4/extern-inline.m4]) |
| 995 | m4_include([m4/filemode.m4]) | 996 | m4_include([m4/filemode.m4]) |
diff --git a/autogen/config.in b/autogen/config.in index bd10c9f4076..59bc8dca231 100644 --- a/autogen/config.in +++ b/autogen/config.in | |||
| @@ -161,6 +161,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 161 | or signaling SIGFPE/SIGILL. */ | 161 | or signaling SIGFPE/SIGILL. */ |
| 162 | #undef FLOAT_CHECK_DOMAIN | 162 | #undef FLOAT_CHECK_DOMAIN |
| 163 | 163 | ||
| 164 | /* Enable compile-time and run-time bounds-checking, and some warnings, | ||
| 165 | without upsetting glibc 2.15+. */ | ||
| 166 | #if defined __OPTIMIZE__ && __OPTIMIZE__ | ||
| 167 | # define _FORTIFY_SOURCE 2 | ||
| 168 | #endif | ||
| 169 | |||
| 170 | |||
| 164 | /* Define to 1 if futimesat mishandles a NULL file name. */ | 171 | /* Define to 1 if futimesat mishandles a NULL file name. */ |
| 165 | #undef FUTIMESAT_NULL_BUG | 172 | #undef FUTIMESAT_NULL_BUG |
| 166 | 173 | ||
| @@ -358,6 +365,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 358 | /* Define to 1 if you have the `euidaccess' function. */ | 365 | /* Define to 1 if you have the `euidaccess' function. */ |
| 359 | #undef HAVE_EUIDACCESS | 366 | #undef HAVE_EUIDACCESS |
| 360 | 367 | ||
| 368 | /* Define to 1 if you have the <execinfo.h> header file. */ | ||
| 369 | #undef HAVE_EXECINFO_H | ||
| 370 | |||
| 361 | /* Define to 1 if you have the <fcntl.h> header file. */ | 371 | /* Define to 1 if you have the <fcntl.h> header file. */ |
| 362 | #undef HAVE_FCNTL_H | 372 | #undef HAVE_FCNTL_H |
| 363 | 373 | ||
| @@ -1342,6 +1352,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1342 | /* Define to 1 if you use terminfo instead of termcap. */ | 1352 | /* Define to 1 if you use terminfo instead of termcap. */ |
| 1343 | #undef TERMINFO | 1353 | #undef TERMINFO |
| 1344 | 1354 | ||
| 1355 | /* Define to the header for the built-in window system. */ | ||
| 1356 | #undef TERM_HEADER | ||
| 1357 | |||
| 1345 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | 1358 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ |
| 1346 | #undef TIME_WITH_SYS_TIME | 1359 | #undef TIME_WITH_SYS_TIME |
| 1347 | 1360 | ||
| @@ -1452,9 +1465,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1452 | /* Number of bits in a file offset, on hosts where this is settable. */ | 1465 | /* Number of bits in a file offset, on hosts where this is settable. */ |
| 1453 | #undef _FILE_OFFSET_BITS | 1466 | #undef _FILE_OFFSET_BITS |
| 1454 | 1467 | ||
| 1455 | /* enable compile-time and run-time bounds-checking, and some warnings */ | ||
| 1456 | #undef _FORTIFY_SOURCE | ||
| 1457 | |||
| 1458 | /* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct | 1468 | /* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct |
| 1459 | stat.st_size becomes 64-bit. */ | 1469 | stat.st_size becomes 64-bit. */ |
| 1460 | #undef _GL_WINDOWS_64_BIT_ST_SIZE | 1470 | #undef _GL_WINDOWS_64_BIT_ST_SIZE |
| @@ -1532,10 +1542,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1532 | declarations. Define as empty for no equivalent. */ | 1542 | declarations. Define as empty for no equivalent. */ |
| 1533 | #undef __restrict_arr | 1543 | #undef __restrict_arr |
| 1534 | 1544 | ||
| 1535 | /* Some platforms redefine this. */ | 1545 | /* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may |
| 1546 | alter signal masks, callers of _longjmp should not assume that it leaves | ||
| 1547 | signal masks alone. */ | ||
| 1536 | #undef _longjmp | 1548 | #undef _longjmp |
| 1537 | 1549 | ||
| 1538 | /* Some platforms redefine this. */ | 1550 | /* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ |
| 1539 | #undef _setjmp | 1551 | #undef _setjmp |
| 1540 | 1552 | ||
| 1541 | /* Some platforms that do not use configure define this to include extra | 1553 | /* Some platforms that do not use configure define this to include extra |
| @@ -1554,20 +1566,34 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1554 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ | 1566 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ |
| 1555 | # define _GL_INLINE inline | 1567 | # define _GL_INLINE inline |
| 1556 | # define _GL_EXTERN_INLINE extern inline | 1568 | # define _GL_EXTERN_INLINE extern inline |
| 1557 | # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | 1569 | #elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) |
| 1558 | # define _GL_INLINE_HEADER_BEGIN \ | 1570 | # if __GNUC_GNU_INLINE__ |
| 1559 | _Pragma ("GCC diagnostic push") \ | 1571 | /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ |
| 1560 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | 1572 | # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) |
| 1561 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") | 1573 | # else |
| 1562 | # define _GL_INLINE_HEADER_END \ | 1574 | # define _GL_INLINE extern inline |
| 1563 | _Pragma ("GCC diagnostic pop") | ||
| 1564 | # endif | 1575 | # endif |
| 1576 | # define _GL_EXTERN_INLINE extern | ||
| 1565 | #else | 1577 | #else |
| 1566 | # define _GL_INLINE static inline | 1578 | # define _GL_INLINE static inline |
| 1567 | # define _GL_EXTERN_INLINE static inline | 1579 | # define _GL_EXTERN_INLINE static inline |
| 1568 | #endif | 1580 | #endif |
| 1569 | 1581 | ||
| 1570 | #ifndef _GL_INLINE_HEADER_BEGIN | 1582 | #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) |
| 1583 | # if __GNUC_STDC_INLINE__ | ||
| 1584 | # define _GL_INLINE_HEADER_CONST_PRAGMA | ||
| 1585 | # else | ||
| 1586 | # define _GL_INLINE_HEADER_CONST_PRAGMA \ | ||
| 1587 | _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") | ||
| 1588 | # endif | ||
| 1589 | # define _GL_INLINE_HEADER_BEGIN \ | ||
| 1590 | _Pragma ("GCC diagnostic push") \ | ||
| 1591 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | ||
| 1592 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ | ||
| 1593 | _GL_INLINE_HEADER_CONST_PRAGMA | ||
| 1594 | # define _GL_INLINE_HEADER_END \ | ||
| 1595 | _Pragma ("GCC diagnostic pop") | ||
| 1596 | #else | ||
| 1571 | # define _GL_INLINE_HEADER_BEGIN | 1597 | # define _GL_INLINE_HEADER_BEGIN |
| 1572 | # define _GL_INLINE_HEADER_END | 1598 | # define _GL_INLINE_HEADER_END |
| 1573 | #endif | 1599 | #endif |
diff --git a/autogen/configure b/autogen/configure index 7efbd25f0d6..885b6f4b471 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -604,6 +604,7 @@ am__EXEEXT_TRUE | |||
| 604 | LTLIBOBJS | 604 | LTLIBOBJS |
| 605 | LIBOBJS | 605 | LIBOBJS |
| 606 | SUBDIR_MAKEFILES_IN | 606 | SUBDIR_MAKEFILES_IN |
| 607 | WINDOW_SYSTEM_OBJ | ||
| 607 | LIB_GCC | 608 | LIB_GCC |
| 608 | LD_FIRSTFLAG | 609 | LD_FIRSTFLAG |
| 609 | LD_SWITCH_SYSTEM_TEMACS | 610 | LD_SWITCH_SYSTEM_TEMACS |
| @@ -971,6 +972,10 @@ GNULIB_CANONICALIZE_FILE_NAME | |||
| 971 | GNULIB_CALLOC_POSIX | 972 | GNULIB_CALLOC_POSIX |
| 972 | GNULIB_ATOLL | 973 | GNULIB_ATOLL |
| 973 | GNULIB__EXIT | 974 | GNULIB__EXIT |
| 975 | GL_GENERATE_EXECINFO_H_FALSE | ||
| 976 | GL_GENERATE_EXECINFO_H_TRUE | ||
| 977 | LIB_EXECINFO | ||
| 978 | EXECINFO_H | ||
| 974 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS | 979 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
| 975 | UNISTD_H_HAVE_WINSOCK2_H | 980 | UNISTD_H_HAVE_WINSOCK2_H |
| 976 | REPLACE_WRITE | 981 | REPLACE_WRITE |
| @@ -1176,6 +1181,8 @@ LIBGNUTLS_CFLAGS | |||
| 1176 | LIBSELINUX_LIBS | 1181 | LIBSELINUX_LIBS |
| 1177 | SETTINGS_LIBS | 1182 | SETTINGS_LIBS |
| 1178 | SETTINGS_CFLAGS | 1183 | SETTINGS_CFLAGS |
| 1184 | GOBJECT_LIBS | ||
| 1185 | GOBJECT_CFLAGS | ||
| 1179 | GCONF_LIBS | 1186 | GCONF_LIBS |
| 1180 | GCONF_CFLAGS | 1187 | GCONF_CFLAGS |
| 1181 | GSETTINGS_LIBS | 1188 | GSETTINGS_LIBS |
| @@ -1224,6 +1231,7 @@ HAVE_MAKEINFO | |||
| 1224 | PAXCTL | 1231 | PAXCTL |
| 1225 | GZIP_PROG | 1232 | GZIP_PROG |
| 1226 | INSTALL_INFO | 1233 | INSTALL_INFO |
| 1234 | LN_S | ||
| 1227 | GNULIB_WARN_CFLAGS | 1235 | GNULIB_WARN_CFLAGS |
| 1228 | WARN_CFLAGS | 1236 | WARN_CFLAGS |
| 1229 | WERROR_CFLAGS | 1237 | WERROR_CFLAGS |
| @@ -3193,6 +3201,7 @@ as_fn_append ac_header_list " maillock.h" | |||
| 3193 | as_fn_append ac_header_list " sys/un.h" | 3201 | as_fn_append ac_header_list " sys/un.h" |
| 3194 | as_fn_append ac_func_list " tzset" | 3202 | as_fn_append ac_func_list " tzset" |
| 3195 | as_fn_append ac_func_list " readlinkat" | 3203 | as_fn_append ac_func_list " readlinkat" |
| 3204 | as_fn_append ac_header_list " execinfo.h" | ||
| 3196 | gl_getopt_required=GNU | 3205 | gl_getopt_required=GNU |
| 3197 | as_fn_append ac_header_list " getopt.h" | 3206 | as_fn_append ac_header_list " getopt.h" |
| 3198 | as_fn_append ac_func_list " gettimeofday" | 3207 | as_fn_append ac_func_list " gettimeofday" |
| @@ -6955,6 +6964,7 @@ esac | |||
| 6955 | # Code from module dtotimespec: | 6964 | # Code from module dtotimespec: |
| 6956 | # Code from module dup2: | 6965 | # Code from module dup2: |
| 6957 | # Code from module environ: | 6966 | # Code from module environ: |
| 6967 | # Code from module execinfo: | ||
| 6958 | # Code from module extensions: | 6968 | # Code from module extensions: |
| 6959 | 6969 | ||
| 6960 | # Code from module extern-inline: | 6970 | # Code from module extern-inline: |
| @@ -7020,6 +7030,55 @@ esac | |||
| 7020 | # Code from module warnings: | 7030 | # Code from module warnings: |
| 7021 | 7031 | ||
| 7022 | 7032 | ||
| 7033 | # It's helpful to have C macros available to GDB, so prefer -g3 to -g | ||
| 7034 | # if -g3 works and the user does not specify CFLAGS. | ||
| 7035 | # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. | ||
| 7036 | if test "$ac_test_CFLAGS" != set; then | ||
| 7037 | case $CFLAGS in | ||
| 7038 | '-g') | ||
| 7039 | emacs_g3_CFLAGS='-g3';; | ||
| 7040 | '-g -O2') | ||
| 7041 | emacs_g3_CFLAGS='-g3 -O2';; | ||
| 7042 | *) | ||
| 7043 | emacs_g3_CFLAGS='';; | ||
| 7044 | esac | ||
| 7045 | if test -n "$emacs_g3_CFLAGS"; then | ||
| 7046 | emacs_save_CFLAGS=$CFLAGS | ||
| 7047 | CFLAGS=$emacs_g3_CFLAGS | ||
| 7048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5 | ||
| 7049 | $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; } | ||
| 7050 | if test "${emacs_cv_prog_cc_g3+set}" = set; then : | ||
| 7051 | $as_echo_n "(cached) " >&6 | ||
| 7052 | else | ||
| 7053 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 7054 | /* end confdefs.h. */ | ||
| 7055 | |||
| 7056 | int | ||
| 7057 | main () | ||
| 7058 | { | ||
| 7059 | |||
| 7060 | ; | ||
| 7061 | return 0; | ||
| 7062 | } | ||
| 7063 | _ACEOF | ||
| 7064 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 7065 | emacs_cv_prog_cc_g3=yes | ||
| 7066 | else | ||
| 7067 | emacs_cv_prog_cc_g3=no | ||
| 7068 | fi | ||
| 7069 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 7070 | conftest$ac_exeext conftest.$ac_ext | ||
| 7071 | fi | ||
| 7072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5 | ||
| 7073 | $as_echo "$emacs_cv_prog_cc_g3" >&6; } | ||
| 7074 | if test $emacs_cv_prog_cc_g3 = yes; then | ||
| 7075 | CFLAGS=$emacs_g3_CFLAGS | ||
| 7076 | else | ||
| 7077 | CFLAGS=$emacs_save_CFLAGS | ||
| 7078 | fi | ||
| 7079 | fi | ||
| 7080 | fi | ||
| 7081 | |||
| 7023 | # Check whether --enable-gcc-warnings was given. | 7082 | # Check whether --enable-gcc-warnings was given. |
| 7024 | if test "${enable_gcc_warnings+set}" = set; then : | 7083 | if test "${enable_gcc_warnings+set}" = set; then : |
| 7025 | enableval=$enable_gcc_warnings; case $enableval in | 7084 | enableval=$enable_gcc_warnings; case $enableval in |
| @@ -7159,6 +7218,7 @@ fi | |||
| 7159 | nw="$nw -Wswitch-default" # Too many warnings for now | 7218 | nw="$nw -Wswitch-default" # Too many warnings for now |
| 7160 | nw="$nw -Wfloat-equal" # warns about high-quality code | 7219 | nw="$nw -Wfloat-equal" # warns about high-quality code |
| 7161 | nw="$nw -Winline" # OK to ignore 'inline' | 7220 | nw="$nw -Winline" # OK to ignore 'inline' |
| 7221 | nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. | ||
| 7162 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning | 7222 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning |
| 7163 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations | 7223 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations |
| 7164 | 7224 | ||
| @@ -7248,95 +7308,118 @@ $as_echo "$gl_cv_cc_nomfi_needed" >&6; } | |||
| 7248 | 7308 | ||
| 7249 | gl_manywarn_set= | 7309 | gl_manywarn_set= |
| 7250 | for gl_manywarn_item in \ | 7310 | for gl_manywarn_item in \ |
| 7251 | -Wall \ | ||
| 7252 | -W \ | 7311 | -W \ |
| 7253 | -Wformat-y2k \ | 7312 | -Wabi \ |
| 7254 | -Wformat-nonliteral \ | 7313 | -Waddress \ |
| 7255 | -Wformat-security \ | 7314 | -Wall \ |
| 7256 | -Winit-self \ | 7315 | -Warray-bounds \ |
| 7257 | -Wmissing-include-dirs \ | 7316 | -Wattributes \ |
| 7258 | -Wswitch-default \ | ||
| 7259 | -Wswitch-enum \ | ||
| 7260 | -Wunused \ | ||
| 7261 | -Wunknown-pragmas \ | ||
| 7262 | -Wstrict-aliasing \ | ||
| 7263 | -Wstrict-overflow \ | ||
| 7264 | -Wsystem-headers \ | ||
| 7265 | -Wfloat-equal \ | ||
| 7266 | -Wtraditional \ | ||
| 7267 | -Wtraditional-conversion \ | ||
| 7268 | -Wdeclaration-after-statement \ | ||
| 7269 | -Wundef \ | ||
| 7270 | -Wshadow \ | ||
| 7271 | -Wunsafe-loop-optimizations \ | ||
| 7272 | -Wpointer-arith \ | ||
| 7273 | -Wbad-function-cast \ | 7317 | -Wbad-function-cast \ |
| 7274 | -Wc++-compat \ | ||
| 7275 | -Wcast-qual \ | ||
| 7276 | -Wcast-align \ | ||
| 7277 | -Wwrite-strings \ | ||
| 7278 | -Wconversion \ | ||
| 7279 | -Wsign-conversion \ | ||
| 7280 | -Wlogical-op \ | ||
| 7281 | -Waggregate-return \ | ||
| 7282 | -Wstrict-prototypes \ | ||
| 7283 | -Wold-style-definition \ | ||
| 7284 | -Wmissing-prototypes \ | ||
| 7285 | -Wmissing-declarations \ | ||
| 7286 | -Wmissing-noreturn \ | ||
| 7287 | -Wmissing-format-attribute \ | ||
| 7288 | -Wpacked \ | ||
| 7289 | -Wpadded \ | ||
| 7290 | -Wredundant-decls \ | ||
| 7291 | -Wnested-externs \ | ||
| 7292 | -Wunreachable-code \ | ||
| 7293 | -Winline \ | ||
| 7294 | -Winvalid-pch \ | ||
| 7295 | -Wlong-long \ | ||
| 7296 | -Wvla \ | ||
| 7297 | -Wvolatile-register-var \ | ||
| 7298 | -Wdisabled-optimization \ | ||
| 7299 | -Wstack-protector \ | ||
| 7300 | -Woverlength-strings \ | ||
| 7301 | -Wbuiltin-macro-redefined \ | 7318 | -Wbuiltin-macro-redefined \ |
| 7302 | -Wmudflap \ | 7319 | -Wcast-align \ |
| 7303 | -Wpacked-bitfield-compat \ | 7320 | -Wchar-subscripts \ |
| 7304 | -Wsync-nand \ | 7321 | -Wclobbered \ |
| 7305 | ; do | 7322 | -Wcomment \ |
| 7306 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | 7323 | -Wcomments \ |
| 7307 | done | ||
| 7308 | # The following are not documented in the manual but are included in | ||
| 7309 | # output from gcc --help=warnings. | ||
| 7310 | for gl_manywarn_item in \ | ||
| 7311 | -Wattributes \ | ||
| 7312 | -Wcoverage-mismatch \ | 7324 | -Wcoverage-mismatch \ |
| 7313 | -Wunused-macros \ | ||
| 7314 | ; do | ||
| 7315 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | ||
| 7316 | done | ||
| 7317 | # More warnings from gcc 4.6.2 --help=warnings. | ||
| 7318 | for gl_manywarn_item in \ | ||
| 7319 | -Wabi \ | ||
| 7320 | -Wcpp \ | 7325 | -Wcpp \ |
| 7321 | -Wdeprecated \ | 7326 | -Wdeprecated \ |
| 7322 | -Wdeprecated-declarations \ | 7327 | -Wdeprecated-declarations \ |
| 7328 | -Wdisabled-optimization \ | ||
| 7323 | -Wdiv-by-zero \ | 7329 | -Wdiv-by-zero \ |
| 7324 | -Wdouble-promotion \ | 7330 | -Wdouble-promotion \ |
| 7331 | -Wempty-body \ | ||
| 7325 | -Wendif-labels \ | 7332 | -Wendif-labels \ |
| 7333 | -Wenum-compare \ | ||
| 7326 | -Wextra \ | 7334 | -Wextra \ |
| 7327 | -Wformat-contains-nul \ | 7335 | -Wformat-contains-nul \ |
| 7328 | -Wformat-extra-args \ | 7336 | -Wformat-extra-args \ |
| 7337 | -Wformat-nonliteral \ | ||
| 7338 | -Wformat-security \ | ||
| 7339 | -Wformat-y2k \ | ||
| 7329 | -Wformat-zero-length \ | 7340 | -Wformat-zero-length \ |
| 7330 | -Wformat=2 \ | 7341 | -Wformat=2 \ |
| 7342 | -Wfree-nonheap-object \ | ||
| 7343 | -Wignored-qualifiers \ | ||
| 7344 | -Wimplicit \ | ||
| 7345 | -Wimplicit-function-declaration \ | ||
| 7346 | -Wimplicit-int \ | ||
| 7347 | -Winit-self \ | ||
| 7348 | -Winline \ | ||
| 7349 | -Wint-to-pointer-cast \ | ||
| 7350 | -Winvalid-memory-model \ | ||
| 7351 | -Winvalid-pch \ | ||
| 7352 | -Wjump-misses-init \ | ||
| 7353 | -Wlogical-op \ | ||
| 7354 | -Wmain \ | ||
| 7355 | -Wmaybe-uninitialized \ | ||
| 7356 | -Wmissing-braces \ | ||
| 7357 | -Wmissing-declarations \ | ||
| 7358 | -Wmissing-field-initializers \ | ||
| 7359 | -Wmissing-format-attribute \ | ||
| 7360 | -Wmissing-include-dirs \ | ||
| 7361 | -Wmissing-noreturn \ | ||
| 7362 | -Wmissing-parameter-type \ | ||
| 7363 | -Wmissing-prototypes \ | ||
| 7364 | -Wmudflap \ | ||
| 7331 | -Wmultichar \ | 7365 | -Wmultichar \ |
| 7366 | -Wnarrowing \ | ||
| 7367 | -Wnested-externs \ | ||
| 7368 | -Wnonnull \ | ||
| 7332 | -Wnormalized=nfc \ | 7369 | -Wnormalized=nfc \ |
| 7370 | -Wold-style-declaration \ | ||
| 7371 | -Wold-style-definition \ | ||
| 7333 | -Woverflow \ | 7372 | -Woverflow \ |
| 7373 | -Woverlength-strings \ | ||
| 7374 | -Woverride-init \ | ||
| 7375 | -Wpacked \ | ||
| 7376 | -Wpacked-bitfield-compat \ | ||
| 7377 | -Wparentheses \ | ||
| 7378 | -Wpointer-arith \ | ||
| 7379 | -Wpointer-sign \ | ||
| 7334 | -Wpointer-to-int-cast \ | 7380 | -Wpointer-to-int-cast \ |
| 7335 | -Wpragmas \ | 7381 | -Wpragmas \ |
| 7382 | -Wreturn-type \ | ||
| 7383 | -Wsequence-point \ | ||
| 7384 | -Wshadow \ | ||
| 7385 | -Wsizeof-pointer-memaccess \ | ||
| 7386 | -Wstack-protector \ | ||
| 7387 | -Wstrict-aliasing \ | ||
| 7388 | -Wstrict-overflow \ | ||
| 7389 | -Wstrict-prototypes \ | ||
| 7336 | -Wsuggest-attribute=const \ | 7390 | -Wsuggest-attribute=const \ |
| 7391 | -Wsuggest-attribute=format \ | ||
| 7337 | -Wsuggest-attribute=noreturn \ | 7392 | -Wsuggest-attribute=noreturn \ |
| 7338 | -Wsuggest-attribute=pure \ | 7393 | -Wsuggest-attribute=pure \ |
| 7394 | -Wswitch \ | ||
| 7395 | -Wswitch-default \ | ||
| 7396 | -Wsync-nand \ | ||
| 7397 | -Wsystem-headers \ | ||
| 7339 | -Wtrampolines \ | 7398 | -Wtrampolines \ |
| 7399 | -Wtrigraphs \ | ||
| 7400 | -Wtype-limits \ | ||
| 7401 | -Wuninitialized \ | ||
| 7402 | -Wunknown-pragmas \ | ||
| 7403 | -Wunreachable-code \ | ||
| 7404 | -Wunsafe-loop-optimizations \ | ||
| 7405 | -Wunused \ | ||
| 7406 | -Wunused-but-set-parameter \ | ||
| 7407 | -Wunused-but-set-variable \ | ||
| 7408 | -Wunused-function \ | ||
| 7409 | -Wunused-label \ | ||
| 7410 | -Wunused-local-typedefs \ | ||
| 7411 | -Wunused-macros \ | ||
| 7412 | -Wunused-parameter \ | ||
| 7413 | -Wunused-result \ | ||
| 7414 | -Wunused-value \ | ||
| 7415 | -Wunused-variable \ | ||
| 7416 | -Wvarargs \ | ||
| 7417 | -Wvariadic-macros \ | ||
| 7418 | -Wvector-operation-performance \ | ||
| 7419 | -Wvla \ | ||
| 7420 | -Wvolatile-register-var \ | ||
| 7421 | -Wwrite-strings \ | ||
| 7422 | \ | ||
| 7340 | ; do | 7423 | ; do |
| 7341 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | 7424 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" |
| 7342 | done | 7425 | done |
| @@ -7727,8 +7810,6 @@ fi | |||
| 7727 | $as_echo "#define lint 1" >>confdefs.h | 7810 | $as_echo "#define lint 1" >>confdefs.h |
| 7728 | 7811 | ||
| 7729 | 7812 | ||
| 7730 | $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h | ||
| 7731 | |||
| 7732 | 7813 | ||
| 7733 | $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h | 7814 | $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h |
| 7734 | 7815 | ||
| @@ -7758,6 +7839,17 @@ fi | |||
| 7758 | 7839 | ||
| 7759 | 7840 | ||
| 7760 | 7841 | ||
| 7842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 | ||
| 7843 | $as_echo_n "checking whether ln -s works... " >&6; } | ||
| 7844 | LN_S=$as_ln_s | ||
| 7845 | if test "$LN_S" = "ln -s"; then | ||
| 7846 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
| 7847 | $as_echo "yes" >&6; } | ||
| 7848 | else | ||
| 7849 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 | ||
| 7850 | $as_echo "no, using $LN_S" >&6; } | ||
| 7851 | fi | ||
| 7852 | |||
| 7761 | 7853 | ||
| 7762 | # Extract the first word of "install-info", so it can be a program name with args. | 7854 | # Extract the first word of "install-info", so it can be a program name with args. |
| 7763 | set dummy install-info; ac_word=$2 | 7855 | set dummy install-info; ac_word=$2 |
| @@ -9082,6 +9174,12 @@ fi | |||
| 9082 | 9174 | ||
| 9083 | #### Choose a window system. | 9175 | #### Choose a window system. |
| 9084 | 9176 | ||
| 9177 | ## We leave window_system equal to none if | ||
| 9178 | ## we end up building without one. Any new window system should | ||
| 9179 | ## set window_system to an appropriate value and add objects to | ||
| 9180 | ## window-system-specific substs. | ||
| 9181 | |||
| 9182 | window_system=none | ||
| 9085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | 9183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
| 9086 | $as_echo_n "checking for X... " >&6; } | 9184 | $as_echo_n "checking for X... " >&6; } |
| 9087 | 9185 | ||
| @@ -9275,9 +9373,7 @@ else | |||
| 9275 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | 9373 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } |
| 9276 | fi | 9374 | fi |
| 9277 | 9375 | ||
| 9278 | if test "$no_x" = yes; then | 9376 | if test "$no_x" != yes; then |
| 9279 | window_system=none | ||
| 9280 | else | ||
| 9281 | window_system=x11 | 9377 | window_system=x11 |
| 9282 | fi | 9378 | fi |
| 9283 | 9379 | ||
| @@ -9452,7 +9548,6 @@ if test "${HAVE_NS}" = yes; then | |||
| 9452 | fi | 9548 | fi |
| 9453 | 9549 | ||
| 9454 | window_system=nextstep | 9550 | window_system=nextstep |
| 9455 | with_xft=no | ||
| 9456 | # set up packaging dirs | 9551 | # set up packaging dirs |
| 9457 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | 9552 | if test "${EN_NS_SELF_CONTAINED}" = yes; then |
| 9458 | ns_self_contained=yes | 9553 | ns_self_contained=yes |
| @@ -9469,7 +9564,6 @@ if test "${HAVE_NS}" = yes; then | |||
| 9469 | INSTALL_ARCH_INDEP_EXTRA= | 9564 | INSTALL_ARCH_INDEP_EXTRA= |
| 9470 | fi | 9565 | fi |
| 9471 | ns_frag=$srcdir/src/ns.mk | 9566 | ns_frag=$srcdir/src/ns.mk |
| 9472 | NS_OBJ="fontset.o fringe.o image.o" | ||
| 9473 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | 9567 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
| 9474 | fi | 9568 | fi |
| 9475 | CFLAGS="$tmp_CFLAGS" | 9569 | CFLAGS="$tmp_CFLAGS" |
| @@ -9481,28 +9575,45 @@ CPPFLAGS="$tmp_CPPFLAGS" | |||
| 9481 | 9575 | ||
| 9482 | 9576 | ||
| 9483 | 9577 | ||
| 9578 | ## $window_system is now set to the window system we will | ||
| 9579 | ## ultimately use. | ||
| 9580 | |||
| 9581 | term_header= | ||
| 9582 | HAVE_X_WINDOWS=no | ||
| 9583 | HAVE_X11=no | ||
| 9584 | USE_X_TOOLKIT=none | ||
| 9585 | |||
| 9484 | case "${window_system}" in | 9586 | case "${window_system}" in |
| 9485 | x11 ) | 9587 | x11 ) |
| 9486 | HAVE_X_WINDOWS=yes | 9588 | HAVE_X_WINDOWS=yes |
| 9487 | HAVE_X11=yes | 9589 | HAVE_X11=yes |
| 9590 | term_header=xterm.h | ||
| 9488 | case "${with_x_toolkit}" in | 9591 | case "${with_x_toolkit}" in |
| 9489 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | 9592 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; |
| 9490 | motif ) USE_X_TOOLKIT=MOTIF ;; | 9593 | motif ) USE_X_TOOLKIT=MOTIF ;; |
| 9491 | gtk ) with_gtk=yes | 9594 | gtk ) with_gtk=yes |
| 9595 | term_header=gtkutil.h | ||
| 9492 | USE_X_TOOLKIT=none ;; | 9596 | USE_X_TOOLKIT=none ;; |
| 9493 | gtk3 ) with_gtk3=yes | 9597 | gtk3 ) with_gtk3=yes |
| 9598 | term_header=gtkutil.h | ||
| 9494 | USE_X_TOOLKIT=none ;; | 9599 | USE_X_TOOLKIT=none ;; |
| 9495 | no ) USE_X_TOOLKIT=none ;; | 9600 | no ) USE_X_TOOLKIT=none ;; |
| 9496 | * ) USE_X_TOOLKIT=maybe ;; | 9601 | * ) USE_X_TOOLKIT=maybe ;; |
| 9497 | esac | 9602 | esac |
| 9498 | ;; | 9603 | ;; |
| 9499 | nextstep | none ) | 9604 | nextstep ) |
| 9500 | HAVE_X_WINDOWS=no | 9605 | term_header=nsterm.h |
| 9501 | HAVE_X11=no | ||
| 9502 | USE_X_TOOLKIT=none | ||
| 9503 | ;; | 9606 | ;; |
| 9504 | esac | 9607 | esac |
| 9505 | 9608 | ||
| 9609 | if test -n "${term_header}"; then | ||
| 9610 | |||
| 9611 | cat >>confdefs.h <<_ACEOF | ||
| 9612 | #define TERM_HEADER "${term_header}" | ||
| 9613 | _ACEOF | ||
| 9614 | |||
| 9615 | fi | ||
| 9616 | |||
| 9506 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | 9617 | if test "$window_system" = none && test "X$with_x" != "Xno"; then |
| 9507 | # Extract the first word of "X", so it can be a program name with args. | 9618 | # Extract the first word of "X", so it can be a program name with args. |
| 9508 | set dummy X; ac_word=$2 | 9619 | set dummy X; ac_word=$2 |
| @@ -10494,6 +10605,7 @@ $as_echo "no" >&6; } | |||
| 10494 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h | 10605 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h |
| 10495 | 10606 | ||
| 10496 | GTK_OBJ=emacsgtkfixed.o | 10607 | GTK_OBJ=emacsgtkfixed.o |
| 10608 | term_header=gtkutil.h | ||
| 10497 | fi | 10609 | fi |
| 10498 | 10610 | ||
| 10499 | if test "$pkg_check_gtk" != "yes"; then | 10611 | if test "$pkg_check_gtk" != "yes"; then |
| @@ -10656,6 +10768,8 @@ _ACEOF | |||
| 10656 | fi | 10768 | fi |
| 10657 | done | 10769 | done |
| 10658 | 10770 | ||
| 10771 | |||
| 10772 | term_header=gtkutil.h | ||
| 10659 | fi | 10773 | fi |
| 10660 | 10774 | ||
| 10661 | HAVE_DBUS=no | 10775 | HAVE_DBUS=no |
| @@ -10862,6 +10976,60 @@ $as_echo "#define HAVE_GCONF 1" >>confdefs.h | |||
| 10862 | fi | 10976 | fi |
| 10863 | 10977 | ||
| 10864 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then | 10978 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then |
| 10979 | |||
| 10980 | succeeded=no | ||
| 10981 | |||
| 10982 | if test "$PKG_CONFIG" = "no" ; then | ||
| 10983 | HAVE_GOBJECT=no | ||
| 10984 | else | ||
| 10985 | PKG_CONFIG_MIN_VERSION=0.9.0 | ||
| 10986 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | ||
| 10987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5 | ||
| 10988 | $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; } | ||
| 10989 | |||
| 10990 | if $PKG_CONFIG --exists "gobject-2.0 >= 2.0" 2>&5 && | ||
| 10991 | GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.0" 2>&5` && | ||
| 10992 | GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.0" 2>&5`; then | ||
| 10993 | edit_cflags=" | ||
| 10994 | s,///*,/,g | ||
| 10995 | s/^/ / | ||
| 10996 | s/ -I/ $isystem/g | ||
| 10997 | s/^ // | ||
| 10998 | " | ||
| 10999 | GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"` | ||
| 11000 | GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'` | ||
| 11001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5 | ||
| 11002 | $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; } | ||
| 11003 | succeeded=yes | ||
| 11004 | else | ||
| 11005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 11006 | $as_echo "no" >&6; } | ||
| 11007 | GOBJECT_CFLAGS="" | ||
| 11008 | GOBJECT_LIBS="" | ||
| 11009 | ## If we have a custom action on failure, don't print errors, but | ||
| 11010 | ## do set a variable so people can do so. | ||
| 11011 | GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"` | ||
| 11012 | |||
| 11013 | fi | ||
| 11014 | |||
| 11015 | |||
| 11016 | |||
| 11017 | else | ||
| 11018 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | ||
| 11019 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | ||
| 11020 | fi | ||
| 11021 | fi | ||
| 11022 | |||
| 11023 | if test $succeeded = yes; then | ||
| 11024 | HAVE_GOBJECT=yes | ||
| 11025 | else | ||
| 11026 | HAVE_GOBJECT=no | ||
| 11027 | fi | ||
| 11028 | |||
| 11029 | if test "$HAVE_GOBJECT" = "yes"; then | ||
| 11030 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS" | ||
| 11031 | SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS" | ||
| 11032 | fi | ||
| 10865 | SAVE_CFLAGS="$CFLAGS" | 11033 | SAVE_CFLAGS="$CFLAGS" |
| 10866 | SAVE_LIBS="$LIBS" | 11034 | SAVE_LIBS="$LIBS" |
| 10867 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | 11035 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" |
| @@ -15313,15 +15481,46 @@ else | |||
| 15313 | ;; | 15481 | ;; |
| 15314 | esac | 15482 | esac |
| 15315 | fi | 15483 | fi |
| 15484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5 | ||
| 15485 | $as_echo_n "checking for _setjmp... " >&6; } | ||
| 15486 | if test "${emacs_cv_func__setjmp+set}" = set; then : | ||
| 15487 | $as_echo_n "(cached) " >&6 | ||
| 15488 | else | ||
| 15489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15490 | /* end confdefs.h. */ | ||
| 15491 | #include <setjmp.h> | ||
| 15316 | 15492 | ||
| 15317 | case $opsys in | 15493 | int |
| 15318 | sol2* | unixware ) | 15494 | main () |
| 15495 | { | ||
| 15496 | jmp_buf j; | ||
| 15497 | if (! _setjmp (j)) | ||
| 15498 | _longjmp (j, 1); | ||
| 15499 | ; | ||
| 15500 | return 0; | ||
| 15501 | } | ||
| 15502 | _ACEOF | ||
| 15503 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 15504 | emacs_cv_func__setjmp=yes | ||
| 15505 | else | ||
| 15506 | emacs_cv_func__setjmp=no | ||
| 15507 | fi | ||
| 15508 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 15509 | conftest$ac_exeext conftest.$ac_ext | ||
| 15510 | fi | ||
| 15511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 | ||
| 15512 | $as_echo "$emacs_cv_func__setjmp" >&6; } | ||
| 15513 | if test $emacs_cv_func__setjmp = no; then | ||
| 15319 | 15514 | ||
| 15320 | $as_echo "#define _setjmp setjmp" >>confdefs.h | 15515 | $as_echo "#define _setjmp setjmp" >>confdefs.h |
| 15321 | 15516 | ||
| 15322 | 15517 | ||
| 15323 | $as_echo "#define _longjmp longjmp" >>confdefs.h | 15518 | $as_echo "#define _longjmp longjmp" >>confdefs.h |
| 15324 | 15519 | ||
| 15520 | fi | ||
| 15521 | |||
| 15522 | case $opsys in | ||
| 15523 | sol2* | unixware ) | ||
| 15325 | 15524 | ||
| 15326 | $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h | 15525 | $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h |
| 15327 | 15526 | ||
| @@ -15576,6 +15775,14 @@ version=$PACKAGE_VERSION | |||
| 15576 | 15775 | ||
| 15577 | 15776 | ||
| 15578 | 15777 | ||
| 15778 | if test -n "${term_header}"; then | ||
| 15779 | |||
| 15780 | cat >>confdefs.h <<_ACEOF | ||
| 15781 | #define TERM_HEADER "${term_header}" | ||
| 15782 | _ACEOF | ||
| 15783 | |||
| 15784 | fi | ||
| 15785 | |||
| 15579 | 15786 | ||
| 15580 | cat >>confdefs.h <<_ACEOF | 15787 | cat >>confdefs.h <<_ACEOF |
| 15581 | #define EMACS_CONFIGURATION "${canonical}" | 15788 | #define EMACS_CONFIGURATION "${canonical}" |
| @@ -15596,7 +15803,7 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then | |||
| 15596 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | 15803 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h |
| 15597 | 15804 | ||
| 15598 | XMENU_OBJ=xmenu.o | 15805 | XMENU_OBJ=xmenu.o |
| 15599 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | 15806 | XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o" |
| 15600 | FONT_OBJ=xfont.o | 15807 | FONT_OBJ=xfont.o |
| 15601 | if test "$HAVE_XFT" = "yes"; then | 15808 | if test "$HAVE_XFT" = "yes"; then |
| 15602 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | 15809 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" |
| @@ -16452,6 +16659,8 @@ $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h | |||
| 16452 | 16659 | ||
| 16453 | 16660 | ||
| 16454 | 16661 | ||
| 16662 | |||
| 16663 | |||
| 16455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 | 16664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 |
| 16456 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } | 16665 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } |
| 16457 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : | 16666 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : |
| @@ -20088,6 +20297,99 @@ $as_echo "$gl_cv_func_dup2_works" >&6; } | |||
| 20088 | 20297 | ||
| 20089 | 20298 | ||
| 20090 | 20299 | ||
| 20300 | LIB_EXECINFO='' | ||
| 20301 | EXECINFO_H='execinfo.h' | ||
| 20302 | |||
| 20303 | if test $ac_cv_header_execinfo_h = yes; then | ||
| 20304 | gl_saved_libs=$LIBS | ||
| 20305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5 | ||
| 20306 | $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; } | ||
| 20307 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | ||
| 20308 | $as_echo_n "(cached) " >&6 | ||
| 20309 | else | ||
| 20310 | ac_func_search_save_LIBS=$LIBS | ||
| 20311 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 20312 | /* end confdefs.h. */ | ||
| 20313 | |||
| 20314 | /* Override any GCC internal prototype to avoid an error. | ||
| 20315 | Use char because int might match the return type of a GCC | ||
| 20316 | builtin and then its argument prototype would still apply. */ | ||
| 20317 | #ifdef __cplusplus | ||
| 20318 | extern "C" | ||
| 20319 | #endif | ||
| 20320 | char backtrace_symbols_fd (); | ||
| 20321 | int | ||
| 20322 | main () | ||
| 20323 | { | ||
| 20324 | return backtrace_symbols_fd (); | ||
| 20325 | ; | ||
| 20326 | return 0; | ||
| 20327 | } | ||
| 20328 | _ACEOF | ||
| 20329 | for ac_lib in '' execinfo; do | ||
| 20330 | if test -z "$ac_lib"; then | ||
| 20331 | ac_res="none required" | ||
| 20332 | else | ||
| 20333 | ac_res=-l$ac_lib | ||
| 20334 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 20335 | fi | ||
| 20336 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 20337 | ac_cv_search_backtrace_symbols_fd=$ac_res | ||
| 20338 | fi | ||
| 20339 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 20340 | conftest$ac_exeext | ||
| 20341 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | ||
| 20342 | break | ||
| 20343 | fi | ||
| 20344 | done | ||
| 20345 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | ||
| 20346 | |||
| 20347 | else | ||
| 20348 | ac_cv_search_backtrace_symbols_fd=no | ||
| 20349 | fi | ||
| 20350 | rm conftest.$ac_ext | ||
| 20351 | LIBS=$ac_func_search_save_LIBS | ||
| 20352 | fi | ||
| 20353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5 | ||
| 20354 | $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; } | ||
| 20355 | ac_res=$ac_cv_search_backtrace_symbols_fd | ||
| 20356 | if test "$ac_res" != no; then : | ||
| 20357 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 20358 | test "$ac_cv_search_backtrace_symbols_fd" = "none required" || | ||
| 20359 | LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd | ||
| 20360 | fi | ||
| 20361 | |||
| 20362 | LIBS=$gl_saved_libs | ||
| 20363 | test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H='' | ||
| 20364 | fi | ||
| 20365 | |||
| 20366 | if test -n "$EXECINFO_H"; then | ||
| 20367 | |||
| 20368 | |||
| 20369 | |||
| 20370 | |||
| 20371 | |||
| 20372 | |||
| 20373 | |||
| 20374 | |||
| 20375 | gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext" | ||
| 20376 | |||
| 20377 | fi | ||
| 20378 | |||
| 20379 | |||
| 20380 | |||
| 20381 | if test -n "$EXECINFO_H"; then | ||
| 20382 | GL_GENERATE_EXECINFO_H_TRUE= | ||
| 20383 | GL_GENERATE_EXECINFO_H_FALSE='#' | ||
| 20384 | else | ||
| 20385 | GL_GENERATE_EXECINFO_H_TRUE='#' | ||
| 20386 | GL_GENERATE_EXECINFO_H_FALSE= | ||
| 20387 | fi | ||
| 20388 | |||
| 20389 | |||
| 20390 | |||
| 20391 | |||
| 20392 | |||
| 20091 | 20393 | ||
| 20092 | 20394 | ||
| 20093 | 20395 | ||
| @@ -23908,20 +24210,21 @@ if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |||
| 23908 | esac | 24210 | esac |
| 23909 | fi | 24211 | fi |
| 23910 | 24212 | ||
| 23911 | 24213 | ## Common for all window systems | |
| 23912 | ## If we're using X11/GNUstep, define some consequences. | 24214 | if test "$window_system" != "none"; then |
| 23913 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | ||
| 23914 | 24215 | ||
| 23915 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | 24216 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h |
| 23916 | 24217 | ||
| 23917 | 24218 | ||
| 23918 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h | 24219 | $as_echo "#define HAVE_MOUSE 1" >>confdefs.h |
| 23919 | 24220 | ||
| 24221 | WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o" | ||
| 23920 | fi | 24222 | fi |
| 23921 | 24223 | ||
| 23922 | 24224 | ||
| 23923 | 24225 | ||
| 23924 | 24226 | ||
| 24227 | |||
| 23925 | #### Report on what we decided to do. | 24228 | #### Report on what we decided to do. |
| 23926 | #### Report GTK as a toolkit, even if it doesn't use Xt. | 24229 | #### Report GTK as a toolkit, even if it doesn't use Xt. |
| 23927 | #### It makes printing result more understandable as using GTK sets | 24230 | #### It makes printing result more understandable as using GTK sets |
| @@ -24178,6 +24481,10 @@ if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FAL | |||
| 24178 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 24481 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 24179 | fi | 24482 | fi |
| 24180 | 24483 | ||
| 24484 | if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then | ||
| 24485 | as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined. | ||
| 24486 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
| 24487 | fi | ||
| 24181 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then | 24488 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
| 24182 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. | 24489 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. |
| 24183 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 24490 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
diff --git a/configure.ac b/configure.ac index 90c0ef07aa1..d4b0fc256b4 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -577,6 +577,34 @@ fi | |||
| 577 | # Initialize gnulib right after choosing the compiler. | 577 | # Initialize gnulib right after choosing the compiler. |
| 578 | gl_EARLY | 578 | gl_EARLY |
| 579 | 579 | ||
| 580 | # It's helpful to have C macros available to GDB, so prefer -g3 to -g | ||
| 581 | # if -g3 works and the user does not specify CFLAGS. | ||
| 582 | # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. | ||
| 583 | if test "$ac_test_CFLAGS" != set; then | ||
| 584 | case $CFLAGS in | ||
| 585 | '-g') | ||
| 586 | emacs_g3_CFLAGS='-g3';; | ||
| 587 | '-g -O2') | ||
| 588 | emacs_g3_CFLAGS='-g3 -O2';; | ||
| 589 | *) | ||
| 590 | emacs_g3_CFLAGS='';; | ||
| 591 | esac | ||
| 592 | if test -n "$emacs_g3_CFLAGS"; then | ||
| 593 | emacs_save_CFLAGS=$CFLAGS | ||
| 594 | CFLAGS=$emacs_g3_CFLAGS | ||
| 595 | AC_CACHE_CHECK([whether $CC accepts $emacs_g3_CFLAGS], | ||
| 596 | [emacs_cv_prog_cc_g3], | ||
| 597 | [AC_LINK_IFELSE([AC_LANG_PROGRAM()], | ||
| 598 | [emacs_cv_prog_cc_g3=yes], | ||
| 599 | [emacs_cv_prog_cc_g3=no])]) | ||
| 600 | if test $emacs_cv_prog_cc_g3 = yes; then | ||
| 601 | CFLAGS=$emacs_g3_CFLAGS | ||
| 602 | else | ||
| 603 | CFLAGS=$emacs_save_CFLAGS | ||
| 604 | fi | ||
| 605 | fi | ||
| 606 | fi | ||
| 607 | |||
| 580 | AC_ARG_ENABLE([gcc-warnings], | 608 | AC_ARG_ENABLE([gcc-warnings], |
| 581 | [AS_HELP_STRING([--enable-gcc-warnings], | 609 | [AS_HELP_STRING([--enable-gcc-warnings], |
| 582 | [turn on lots of GCC warnings. This is intended for | 610 | [turn on lots of GCC warnings. This is intended for |
| @@ -677,6 +705,7 @@ else | |||
| 677 | nw="$nw -Wswitch-default" # Too many warnings for now | 705 | nw="$nw -Wswitch-default" # Too many warnings for now |
| 678 | nw="$nw -Wfloat-equal" # warns about high-quality code | 706 | nw="$nw -Wfloat-equal" # warns about high-quality code |
| 679 | nw="$nw -Winline" # OK to ignore 'inline' | 707 | nw="$nw -Winline" # OK to ignore 'inline' |
| 708 | nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. | ||
| 680 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning | 709 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning |
| 681 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations | 710 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations |
| 682 | 711 | ||
| @@ -709,8 +738,13 @@ else | |||
| 709 | gl_WARN_ADD([-funit-at-a-time]) | 738 | gl_WARN_ADD([-funit-at-a-time]) |
| 710 | 739 | ||
| 711 | AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) | 740 | AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) |
| 712 | AC_DEFINE([_FORTIFY_SOURCE], [2], | 741 | AH_VERBATIM([FORTIFY_SOURCE], |
| 713 | [enable compile-time and run-time bounds-checking, and some warnings]) | 742 | [/* Enable compile-time and run-time bounds-checking, and some warnings, |
| 743 | without upsetting glibc 2.15+. */ | ||
| 744 | #if defined __OPTIMIZE__ && __OPTIMIZE__ | ||
| 745 | # define _FORTIFY_SOURCE 2 | ||
| 746 | #endif | ||
| 747 | ]) | ||
| 714 | AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) | 748 | AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) |
| 715 | 749 | ||
| 716 | # We use a slightly smaller set of warning options for lib/. | 750 | # We use a slightly smaller set of warning options for lib/. |
| @@ -731,6 +765,7 @@ dnl AC_PROG_MKDIR_P | |||
| 731 | dnl if test "x$RANLIB" = x; then | 765 | dnl if test "x$RANLIB" = x; then |
| 732 | dnl AC_PROG_RANLIB | 766 | dnl AC_PROG_RANLIB |
| 733 | dnl fi | 767 | dnl fi |
| 768 | AC_PROG_LN_S | ||
| 734 | 769 | ||
| 735 | AC_PATH_PROG(INSTALL_INFO, install-info, :, | 770 | AC_PATH_PROG(INSTALL_INFO, install-info, :, |
| 736 | $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) | 771 | $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) |
| @@ -1357,10 +1392,14 @@ AC_SYS_LONG_FILE_NAMES | |||
| 1357 | 1392 | ||
| 1358 | #### Choose a window system. | 1393 | #### Choose a window system. |
| 1359 | 1394 | ||
| 1395 | ## We leave window_system equal to none if | ||
| 1396 | ## we end up building without one. Any new window system should | ||
| 1397 | ## set window_system to an appropriate value and add objects to | ||
| 1398 | ## window-system-specific substs. | ||
| 1399 | |||
| 1400 | window_system=none | ||
| 1360 | AC_PATH_X | 1401 | AC_PATH_X |
| 1361 | if test "$no_x" = yes; then | 1402 | if test "$no_x" != yes; then |
| 1362 | window_system=none | ||
| 1363 | else | ||
| 1364 | window_system=x11 | 1403 | window_system=x11 |
| 1365 | fi | 1404 | fi |
| 1366 | 1405 | ||
| @@ -1499,7 +1538,6 @@ if test "${HAVE_NS}" = yes; then | |||
| 1499 | fi | 1538 | fi |
| 1500 | 1539 | ||
| 1501 | window_system=nextstep | 1540 | window_system=nextstep |
| 1502 | with_xft=no | ||
| 1503 | # set up packaging dirs | 1541 | # set up packaging dirs |
| 1504 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | 1542 | if test "${EN_NS_SELF_CONTAINED}" = yes; then |
| 1505 | ns_self_contained=yes | 1543 | ns_self_contained=yes |
| @@ -1519,7 +1557,6 @@ if test "${HAVE_NS}" = yes; then | |||
| 1519 | INSTALL_ARCH_INDEP_EXTRA= | 1557 | INSTALL_ARCH_INDEP_EXTRA= |
| 1520 | fi | 1558 | fi |
| 1521 | ns_frag=$srcdir/src/ns.mk | 1559 | ns_frag=$srcdir/src/ns.mk |
| 1522 | NS_OBJ="fontset.o fringe.o image.o" | ||
| 1523 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | 1560 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
| 1524 | fi | 1561 | fi |
| 1525 | CFLAGS="$tmp_CFLAGS" | 1562 | CFLAGS="$tmp_CFLAGS" |
| @@ -1531,18 +1568,29 @@ AC_SUBST(NS_OBJC_OBJ) | |||
| 1531 | AC_SUBST(LIB_STANDARD) | 1568 | AC_SUBST(LIB_STANDARD) |
| 1532 | AC_SUBST_FILE(ns_frag) | 1569 | AC_SUBST_FILE(ns_frag) |
| 1533 | 1570 | ||
| 1571 | ## $window_system is now set to the window system we will | ||
| 1572 | ## ultimately use. | ||
| 1573 | |||
| 1574 | term_header= | ||
| 1575 | HAVE_X_WINDOWS=no | ||
| 1576 | HAVE_X11=no | ||
| 1577 | USE_X_TOOLKIT=none | ||
| 1578 | |||
| 1534 | case "${window_system}" in | 1579 | case "${window_system}" in |
| 1535 | x11 ) | 1580 | x11 ) |
| 1536 | HAVE_X_WINDOWS=yes | 1581 | HAVE_X_WINDOWS=yes |
| 1537 | HAVE_X11=yes | 1582 | HAVE_X11=yes |
| 1583 | term_header=xterm.h | ||
| 1538 | case "${with_x_toolkit}" in | 1584 | case "${with_x_toolkit}" in |
| 1539 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | 1585 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; |
| 1540 | motif ) USE_X_TOOLKIT=MOTIF ;; | 1586 | motif ) USE_X_TOOLKIT=MOTIF ;; |
| 1541 | gtk ) with_gtk=yes | 1587 | gtk ) with_gtk=yes |
| 1588 | term_header=gtkutil.h | ||
| 1542 | dnl Don't set this for GTK. A lot of tests below assumes Xt when | 1589 | dnl Don't set this for GTK. A lot of tests below assumes Xt when |
| 1543 | dnl USE_X_TOOLKIT is set. | 1590 | dnl USE_X_TOOLKIT is set. |
| 1544 | USE_X_TOOLKIT=none ;; | 1591 | USE_X_TOOLKIT=none ;; |
| 1545 | gtk3 ) with_gtk3=yes | 1592 | gtk3 ) with_gtk3=yes |
| 1593 | term_header=gtkutil.h | ||
| 1546 | USE_X_TOOLKIT=none ;; | 1594 | USE_X_TOOLKIT=none ;; |
| 1547 | no ) USE_X_TOOLKIT=none ;; | 1595 | no ) USE_X_TOOLKIT=none ;; |
| 1548 | dnl If user did not say whether to use a toolkit, make this decision later: | 1596 | dnl If user did not say whether to use a toolkit, make this decision later: |
| @@ -1550,13 +1598,16 @@ dnl use the toolkit if we have gtk, or X11R5 or newer. | |||
| 1550 | * ) USE_X_TOOLKIT=maybe ;; | 1598 | * ) USE_X_TOOLKIT=maybe ;; |
| 1551 | esac | 1599 | esac |
| 1552 | ;; | 1600 | ;; |
| 1553 | nextstep | none ) | 1601 | nextstep ) |
| 1554 | HAVE_X_WINDOWS=no | 1602 | term_header=nsterm.h |
| 1555 | HAVE_X11=no | ||
| 1556 | USE_X_TOOLKIT=none | ||
| 1557 | ;; | 1603 | ;; |
| 1558 | esac | 1604 | esac |
| 1559 | 1605 | ||
| 1606 | if test -n "${term_header}"; then | ||
| 1607 | AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}", | ||
| 1608 | [Define to the header for the built-in window system.]) | ||
| 1609 | fi | ||
| 1610 | |||
| 1560 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | 1611 | if test "$window_system" = none && test "X$with_x" != "Xno"; then |
| 1561 | AC_CHECK_PROG(HAVE_XSERVER, X, true, false) | 1612 | AC_CHECK_PROG(HAVE_XSERVER, X, true, false) |
| 1562 | if test "$HAVE_XSERVER" = true || | 1613 | if test "$HAVE_XSERVER" = true || |
| @@ -1872,6 +1923,7 @@ if test "${with_gtk3}" = "yes"; then | |||
| 1872 | fi | 1923 | fi |
| 1873 | AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) | 1924 | AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) |
| 1874 | GTK_OBJ=emacsgtkfixed.o | 1925 | GTK_OBJ=emacsgtkfixed.o |
| 1926 | term_header=gtkutil.h | ||
| 1875 | fi | 1927 | fi |
| 1876 | 1928 | ||
| 1877 | if test "$pkg_check_gtk" != "yes"; then | 1929 | if test "$pkg_check_gtk" != "yes"; then |
| @@ -1950,6 +2002,8 @@ if test "${HAVE_GTK}" = "yes"; then | |||
| 1950 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | 2002 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ |
| 1951 | gtk_orientable_set_orientation \ | 2003 | gtk_orientable_set_orientation \ |
| 1952 | gtk_window_set_has_resize_grip) | 2004 | gtk_window_set_has_resize_grip) |
| 2005 | |||
| 2006 | term_header=gtkutil.h | ||
| 1953 | fi | 2007 | fi |
| 1954 | 2008 | ||
| 1955 | dnl D-Bus has been tested under GNU/Linux only. Must be adapted for | 2009 | dnl D-Bus has been tested under GNU/Linux only. Must be adapted for |
| @@ -2000,6 +2054,11 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |||
| 2000 | fi | 2054 | fi |
| 2001 | 2055 | ||
| 2002 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then | 2056 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then |
| 2057 | PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= 2.0, HAVE_GOBJECT=yes, HAVE_GOBJECT=no) | ||
| 2058 | if test "$HAVE_GOBJECT" = "yes"; then | ||
| 2059 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS" | ||
| 2060 | SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS" | ||
| 2061 | fi | ||
| 2003 | SAVE_CFLAGS="$CFLAGS" | 2062 | SAVE_CFLAGS="$CFLAGS" |
| 2004 | SAVE_LIBS="$LIBS" | 2063 | SAVE_LIBS="$LIBS" |
| 2005 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | 2064 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" |
| @@ -3732,13 +3791,27 @@ else | |||
| 3732 | esac | 3791 | esac |
| 3733 | fi dnl GCC? | 3792 | fi dnl GCC? |
| 3734 | 3793 | ||
| 3794 | AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp], | ||
| 3795 | [AC_LINK_IFELSE( | ||
| 3796 | [AC_LANG_PROGRAM( | ||
| 3797 | [[#include <setjmp.h> | ||
| 3798 | ]], | ||
| 3799 | [[jmp_buf j; | ||
| 3800 | if (! _setjmp (j)) | ||
| 3801 | _longjmp (j, 1);]])], | ||
| 3802 | [emacs_cv_func__setjmp=yes], | ||
| 3803 | [emacs_cv_func__setjmp=no])]) | ||
| 3804 | if test $emacs_cv_func__setjmp = no; then | ||
| 3805 | AC_DEFINE([_setjmp], [setjmp], | ||
| 3806 | [Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.]) | ||
| 3807 | AC_DEFINE([_longjmp], [longjmp], | ||
| 3808 | [Define to longjmp if _setjmp and _longjmp do not work. | ||
| 3809 | Because longjmp may alter signal masks, callers of _longjmp | ||
| 3810 | should not assume that it leaves signal masks alone.]) | ||
| 3811 | fi | ||
| 3735 | 3812 | ||
| 3736 | case $opsys in | 3813 | case $opsys in |
| 3737 | sol2* | unixware ) | 3814 | sol2* | unixware ) |
| 3738 | dnl setjmp and longjmp can safely replace _setjmp and _longjmp, | ||
| 3739 | dnl but they will run more slowly. | ||
| 3740 | AC_DEFINE(_setjmp, setjmp, [Some platforms redefine this.]) | ||
| 3741 | AC_DEFINE(_longjmp, longjmp, [Some platforms redefine this.]) | ||
| 3742 | dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | 3815 | dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY |
| 3743 | dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs, | 3816 | dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs, |
| 3744 | dnl and this is all we need. | 3817 | dnl and this is all we need. |
| @@ -3944,6 +4017,11 @@ AC_SUBST(ns_appsrc) | |||
| 3944 | AC_SUBST(GNU_OBJC_CFLAGS) | 4017 | AC_SUBST(GNU_OBJC_CFLAGS) |
| 3945 | AC_SUBST(OTHER_FILES) | 4018 | AC_SUBST(OTHER_FILES) |
| 3946 | 4019 | ||
| 4020 | if test -n "${term_header}"; then | ||
| 4021 | AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}", | ||
| 4022 | [Define to the header for the built-in window system.]) | ||
| 4023 | fi | ||
| 4024 | |||
| 3947 | AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", | 4025 | AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", |
| 3948 | [Define to the canonical Emacs configuration name.]) | 4026 | [Define to the canonical Emacs configuration name.]) |
| 3949 | AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}", | 4027 | AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}", |
| @@ -3958,7 +4036,7 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then | |||
| 3958 | AC_DEFINE(HAVE_X_WINDOWS, 1, | 4036 | AC_DEFINE(HAVE_X_WINDOWS, 1, |
| 3959 | [Define to 1 if you want to use the X window system.]) | 4037 | [Define to 1 if you want to use the X window system.]) |
| 3960 | XMENU_OBJ=xmenu.o | 4038 | XMENU_OBJ=xmenu.o |
| 3961 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | 4039 | XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o" |
| 3962 | FONT_OBJ=xfont.o | 4040 | FONT_OBJ=xfont.o |
| 3963 | if test "$HAVE_XFT" = "yes"; then | 4041 | if test "$HAVE_XFT" = "yes"; then |
| 3964 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | 4042 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" |
| @@ -4248,13 +4326,14 @@ if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | |||
| 4248 | fi dnl if $GCC | 4326 | fi dnl if $GCC |
| 4249 | AC_SUBST(LIB_GCC) | 4327 | AC_SUBST(LIB_GCC) |
| 4250 | 4328 | ||
| 4251 | 4329 | ## Common for all window systems | |
| 4252 | ## If we're using X11/GNUstep, define some consequences. | 4330 | if test "$window_system" != "none"; then |
| 4253 | if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then | ||
| 4254 | AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) | 4331 | AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) |
| 4255 | AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.]) | 4332 | AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.]) |
| 4333 | WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o" | ||
| 4256 | fi | 4334 | fi |
| 4257 | 4335 | ||
| 4336 | AC_SUBST(WINDOW_SYSTEM_OBJ) | ||
| 4258 | 4337 | ||
| 4259 | AH_TOP([/* GNU Emacs site configuration template file. | 4338 | AH_TOP([/* GNU Emacs site configuration template file. |
| 4260 | 4339 | ||
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index fa78cc4c502..a4f9985ad85 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-08-24 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * cmdargs.texi (General Variables): Setting | ||
| 4 | $DBUS_SESSION_BUS_ADDRESS to a dummy value suppresses connections | ||
| 5 | to the D-Bus session bus. (Bug#12112) | ||
| 6 | |||
| 1 | 2012-08-14 Eli Zaretskii <eliz@gnu.org> | 7 | 2012-08-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * building.texi (Debugger Operation): Correct and improve | 9 | * building.texi (Debugger Operation): Correct and improve |
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 2dea1577c04..d4573eed5a8 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi | |||
| @@ -434,6 +434,11 @@ variables to be set, but it uses their values if they are set. | |||
| 434 | @item CDPATH | 434 | @item CDPATH |
| 435 | Used by the @code{cd} command to search for the directory you specify, | 435 | Used by the @code{cd} command to search for the directory you specify, |
| 436 | when you specify a relative directory name. | 436 | when you specify a relative directory name. |
| 437 | @item DBUS_SESSION_BUS_ADDRESS | ||
| 438 | Used by D-Bus when Emacs is compiled with it. Usually, there is no | ||
| 439 | need to change it. Setting it to a dummy address, like | ||
| 440 | @samp{unix:path=/tmp/foo}, suppresses connections to the D-Bus session | ||
| 441 | bus. | ||
| 437 | @item EMACSDATA | 442 | @item EMACSDATA |
| 438 | Directory for the architecture-independent files that come with Emacs. | 443 | Directory for the architecture-independent files that come with Emacs. |
| 439 | This is used to initialize the variable @code{data-directory}. | 444 | This is used to initialize the variable @code{data-directory}. |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 6579cc48fd5..b0156e5ac7e 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2012-09-02 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * windows.texi (Window Configurations): Recommend against using | ||
| 4 | save-window-excursion (Bug#12075). | ||
| 5 | |||
| 6 | * control.texi (Catch and Throw): | ||
| 7 | * positions.texi (Excursions): Don't mention it. | ||
| 8 | |||
| 9 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 10 | |||
| 11 | Better seed support for (random). | ||
| 12 | * numbers.texi (Random Numbers): Document new behavior of | ||
| 13 | the calls (random) and (random STRING). | ||
| 14 | |||
| 15 | 2012-08-21 Martin Rudalics <rudalics@gmx.at> | ||
| 16 | |||
| 17 | * windows.texi (Window Point): Document recent changes in | ||
| 18 | window-point and set-window-point. | ||
| 19 | (Selecting Windows): Document recent change in select-window. | ||
| 20 | |||
| 1 | 2012-08-06 Eli Zaretskii <eliz@gnu.org> | 21 | 2012-08-06 Eli Zaretskii <eliz@gnu.org> |
| 2 | 22 | ||
| 3 | * functions.texi (Closures): Put the main index entry for | 23 | * functions.texi (Closures): Put the main index entry for |
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 07d2d0d993c..25a7655b7b8 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -556,16 +556,14 @@ the @code{catch} in @code{foo-outer} specifies the same symbol, so that | |||
| 556 | @code{catch} in between). | 556 | @code{catch} in between). |
| 557 | 557 | ||
| 558 | Executing @code{throw} exits all Lisp constructs up to the matching | 558 | Executing @code{throw} exits all Lisp constructs up to the matching |
| 559 | @code{catch}, including function calls. When binding constructs such as | 559 | @code{catch}, including function calls. When binding constructs such |
| 560 | @code{let} or function calls are exited in this way, the bindings are | 560 | as @code{let} or function calls are exited in this way, the bindings |
| 561 | unbound, just as they are when these constructs exit normally | 561 | are unbound, just as they are when these constructs exit normally |
| 562 | (@pxref{Local Variables}). Likewise, @code{throw} restores the buffer | 562 | (@pxref{Local Variables}). Likewise, @code{throw} restores the buffer |
| 563 | and position saved by @code{save-excursion} (@pxref{Excursions}), and | 563 | and position saved by @code{save-excursion} (@pxref{Excursions}), and |
| 564 | the narrowing status saved by @code{save-restriction} and the window | 564 | the narrowing status saved by @code{save-restriction}. It also runs |
| 565 | selection saved by @code{save-window-excursion} (@pxref{Window | 565 | any cleanups established with the @code{unwind-protect} special form |
| 566 | Configurations}). It also runs any cleanups established with the | 566 | when it exits that form (@pxref{Cleanups}). |
| 567 | @code{unwind-protect} special form when it exits that form | ||
| 568 | (@pxref{Cleanups}). | ||
| 569 | 567 | ||
| 570 | The @code{throw} need not appear lexically within the @code{catch} | 568 | The @code{throw} need not appear lexically within the @code{catch} |
| 571 | that it jumps to. It can equally well be called from another function | 569 | that it jumps to. It can equally well be called from another function |
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index ce0716f39ef..17f3ee099bd 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi | |||
| @@ -1199,30 +1199,32 @@ numbers are not truly random, but they have certain properties that | |||
| 1199 | mimic a random series. For example, all possible values occur equally | 1199 | mimic a random series. For example, all possible values occur equally |
| 1200 | often in a pseudo-random series. | 1200 | often in a pseudo-random series. |
| 1201 | 1201 | ||
| 1202 | In Emacs, pseudo-random numbers are generated from a ``seed'' number. | 1202 | In Emacs, pseudo-random numbers are generated from a ``seed''. |
| 1203 | Starting from any given seed, the @code{random} function always | 1203 | Starting from any given seed, the @code{random} function always |
| 1204 | generates the same sequence of numbers. Emacs always starts with the | 1204 | generates the same sequence of numbers. Emacs typically starts with a |
| 1205 | same seed value, so the sequence of values of @code{random} is actually | 1205 | different seed each time, so the sequence of values of @code{random} |
| 1206 | the same in each Emacs run! For example, in one operating system, the | 1206 | typically differs in each Emacs run. |
| 1207 | first call to @code{(random)} after you start Emacs always returns | 1207 | |
| 1208 | @minus{}1457731, and the second one always returns @minus{}7692030. This | 1208 | Sometimes you want the random number sequence to be repeatable. For |
| 1209 | repeatability is helpful for debugging. | 1209 | example, when debugging a program whose behavior depends on the random |
| 1210 | 1210 | number sequence, it is helpful to get the same behavior in each | |
| 1211 | If you want random numbers that don't always come out the same, execute | 1211 | program run. To make the sequence repeat, execute @code{(random "")}. |
| 1212 | @code{(random t)}. This chooses a new seed based on the current time of | 1212 | This sets the seed to a constant value for your particular Emacs |
| 1213 | day and on Emacs's process @acronym{ID} number. | 1213 | executable (though it may differ for other Emacs builds). You can use |
| 1214 | other strings to choose various seed values. | ||
| 1214 | 1215 | ||
| 1215 | @defun random &optional limit | 1216 | @defun random &optional limit |
| 1216 | This function returns a pseudo-random integer. Repeated calls return a | 1217 | This function returns a pseudo-random integer. Repeated calls return a |
| 1217 | series of pseudo-random integers. | 1218 | series of pseudo-random integers. |
| 1218 | 1219 | ||
| 1219 | If @var{limit} is a positive integer, the value is chosen to be | 1220 | If @var{limit} is a positive integer, the value is chosen to be |
| 1220 | nonnegative and less than @var{limit}. | 1221 | nonnegative and less than @var{limit}. Otherwise, the value |
| 1222 | might be any integer representable in Lisp. | ||
| 1221 | 1223 | ||
| 1222 | If @var{limit} is @code{t}, it means to choose a new seed based on the | 1224 | If @var{limit} is @code{t}, it means to choose a new seed based on the |
| 1223 | current time of day and on Emacs's process @acronym{ID} number. | 1225 | current time of day and on Emacs's process @acronym{ID} number. |
| 1224 | 1226 | ||
| 1225 | On some machines, any integer representable in Lisp may be the result | 1227 | If @var{limit} is a string, it means to choose a new seed based on the |
| 1226 | of @code{random}. On other machines, the result can never be larger | 1228 | string's contents. |
| 1227 | than a certain maximum or less than a certain (negative) minimum. | 1229 | |
| 1228 | @end defun | 1230 | @end defun |
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index a59a99d124c..a0c65319850 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi | |||
| @@ -850,9 +850,6 @@ after setting the desired current buffer, as in the following example: | |||
| 850 | @cindex window excursions | 850 | @cindex window excursions |
| 851 | Likewise, @code{save-excursion} does not restore window-buffer | 851 | Likewise, @code{save-excursion} does not restore window-buffer |
| 852 | correspondences altered by functions such as @code{switch-to-buffer}. | 852 | correspondences altered by functions such as @code{switch-to-buffer}. |
| 853 | One way to restore these correspondences, and the selected window, is to | ||
| 854 | use @code{save-window-excursion} inside @code{save-excursion} | ||
| 855 | (@pxref{Window Configurations}). | ||
| 856 | 853 | ||
| 857 | @strong{Warning:} Ordinary insertion of text adjacent to the saved | 854 | @strong{Warning:} Ordinary insertion of text adjacent to the saved |
| 858 | point value relocates the saved value, just as it relocates all | 855 | point value relocates the saved value, just as it relocates all |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index c7c466c7d36..5fe007ba02d 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -1129,16 +1129,15 @@ are the opposite of what they are in those other functions. | |||
| 1129 | 1129 | ||
| 1130 | @defun select-window window &optional norecord | 1130 | @defun select-window window &optional norecord |
| 1131 | This function makes @var{window} the selected window, as well as the | 1131 | This function makes @var{window} the selected window, as well as the |
| 1132 | window selected within its frame (@pxref{Basic Windows}). | 1132 | window selected within its frame (@pxref{Basic Windows}). @var{window} |
| 1133 | @var{window} must be a live window. Unless @var{window} already is the | 1133 | must be a live window. This function makes also @var{window}'s buffer |
| 1134 | selected window, its buffer becomes the current buffer (@pxref{Buffers | 1134 | current (@pxref{Buffers and Windows}). The return value is |
| 1135 | and Windows}). The return value is @var{window}. | 1135 | @var{window}. |
| 1136 | 1136 | ||
| 1137 | By default, this function also moves @var{window}'s selected buffer to | 1137 | By default, this function also moves @var{window}'s buffer to the front |
| 1138 | the front of the buffer list (@pxref{The Buffer List}), and makes | 1138 | of the buffer list (@pxref{The Buffer List}), and makes @var{window} the |
| 1139 | @var{window} the most recently selected window. However, if the | 1139 | most recently selected window. However, if the optional argument |
| 1140 | optional argument @var{norecord} is non-@code{nil}, these additional | 1140 | @var{norecord} is non-@code{nil}, these additional actions are omitted. |
| 1141 | actions are omitted. | ||
| 1142 | @end defun | 1141 | @end defun |
| 1143 | 1142 | ||
| 1144 | @cindex most recently selected windows | 1143 | @cindex most recently selected windows |
| @@ -2276,19 +2275,18 @@ For a nonselected window, this is the value point would have (in that | |||
| 2276 | window's buffer) if that window were selected. The default for | 2275 | window's buffer) if that window were selected. The default for |
| 2277 | @var{window} is the selected window. | 2276 | @var{window} is the selected window. |
| 2278 | 2277 | ||
| 2279 | When @var{window} is the selected window and its buffer is also the | 2278 | When @var{window} is the selected window, the value returned is the |
| 2280 | current buffer, the value returned is the same as point in that buffer. | 2279 | value of point in that window's buffer. Strictly speaking, it would be |
| 2281 | Strictly speaking, it would be more correct to return the ``top-level'' | 2280 | more correct to return the ``top-level'' value of point, outside of any |
| 2282 | value of point, outside of any @code{save-excursion} forms. But that | 2281 | @code{save-excursion} forms. But that value is hard to find. |
| 2283 | value is hard to find. | ||
| 2284 | @end defun | 2282 | @end defun |
| 2285 | 2283 | ||
| 2286 | @defun set-window-point window position | 2284 | @defun set-window-point window position |
| 2287 | This function positions point in @var{window} at position | 2285 | This function positions point in @var{window} at position |
| 2288 | @var{position} in @var{window}'s buffer. It returns @var{position}. | 2286 | @var{position} in @var{window}'s buffer. It returns @var{position}. |
| 2289 | 2287 | ||
| 2290 | If @var{window} is selected, and its buffer is current, | 2288 | If @var{window} is selected, this simply does @code{goto-char} in |
| 2291 | this simply does @code{goto-char}. | 2289 | @var{window}'s buffer. |
| 2292 | @end defun | 2290 | @end defun |
| 2293 | 2291 | ||
| 2294 | @defvar window-point-insertion-type | 2292 | @defvar window-point-insertion-type |
| @@ -3155,42 +3153,21 @@ as @code{save-window-excursion}: | |||
| 3155 | @end defun | 3153 | @end defun |
| 3156 | 3154 | ||
| 3157 | @defmac save-window-excursion forms@dots{} | 3155 | @defmac save-window-excursion forms@dots{} |
| 3158 | This special form records the window configuration, executes @var{forms} | 3156 | This macro records the window configuration of the selected frame, |
| 3159 | in sequence, then restores the earlier window configuration. The window | 3157 | executes @var{forms} in sequence, then restores the earlier window |
| 3160 | configuration includes, for each window, the value of point and the | 3158 | configuration. The return value is the value of the final form in |
| 3161 | portion of the buffer that is visible. It also includes the choice of | 3159 | @var{forms}. |
| 3162 | selected window. However, it does not include the value of point in | 3160 | |
| 3163 | the current buffer; use @code{save-excursion} also, if you wish to | 3161 | Most Lisp code should not use this macro; @code{save-selected-window} |
| 3164 | preserve that. | 3162 | is typically sufficient. In particular, this macro cannot reliably |
| 3165 | 3163 | prevent the code in @var{forms} from opening new windows, because new | |
| 3166 | Don't use this construct when @code{save-selected-window} is sufficient. | 3164 | windows might be opened in other frames (@pxref{Choosing Window}), and |
| 3167 | 3165 | @code{save-window-excursion} only saves and restores the window | |
| 3168 | Exit from @code{save-window-excursion} always triggers execution of | 3166 | configuration on the current frame. |
| 3169 | @code{window-size-change-functions}. (It doesn't know how to tell | 3167 | |
| 3170 | whether the restored configuration actually differs from the one in | 3168 | Do not use this macro in @code{window-size-change-functions}; exiting |
| 3171 | effect at the end of the @var{forms}.) | 3169 | the macro triggers execution of @code{window-size-change-functions}, |
| 3172 | 3170 | leading to an endless loop. | |
| 3173 | The return value is the value of the final form in @var{forms}. | ||
| 3174 | For example: | ||
| 3175 | |||
| 3176 | @example | ||
| 3177 | @group | ||
| 3178 | (split-window) | ||
| 3179 | @result{} #<window 25 on control.texi> | ||
| 3180 | @end group | ||
| 3181 | @group | ||
| 3182 | (setq w (selected-window)) | ||
| 3183 | @result{} #<window 19 on control.texi> | ||
| 3184 | @end group | ||
| 3185 | @group | ||
| 3186 | (save-window-excursion | ||
| 3187 | (delete-other-windows w) | ||
| 3188 | (switch-to-buffer "foo") | ||
| 3189 | 'do-something) | ||
| 3190 | @result{} do-something | ||
| 3191 | ;; @r{The screen is now split again.} | ||
| 3192 | @end group | ||
| 3193 | @end example | ||
| 3194 | @end defmac | 3171 | @end defmac |
| 3195 | 3172 | ||
| 3196 | @defun window-configuration-p object | 3173 | @defun window-configuration-p object |
| @@ -3426,11 +3403,11 @@ Creating or deleting windows counts as a size change, and therefore | |||
| 3426 | causes these functions to be called. Changing the frame size also | 3403 | causes these functions to be called. Changing the frame size also |
| 3427 | counts, because it changes the sizes of the existing windows. | 3404 | counts, because it changes the sizes of the existing windows. |
| 3428 | 3405 | ||
| 3429 | It is not a good idea to use @code{save-window-excursion} (@pxref{Window | 3406 | You may use @code{save-selected-window} in these functions |
| 3430 | Configurations}) in these functions, because that always counts as a | 3407 | (@pxref{Selecting Windows}). However, do not use |
| 3431 | size change, and it would cause these functions to be called over and | 3408 | @code{save-window-excursion} (@pxref{Window Configurations}); exiting |
| 3432 | over. In most cases, @code{save-selected-window} (@pxref{Selecting | 3409 | that macro counts as a size change, which would cause these functions |
| 3433 | Windows}) is what you need here. | 3410 | to be called over and over. |
| 3434 | @end defvar | 3411 | @end defvar |
| 3435 | 3412 | ||
| 3436 | @defvar window-configuration-change-hook | 3413 | @defvar window-configuration-change-hook |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 452a99d2d9b..f3f244c7e39 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Better seeds for (random). | ||
| 4 | * NEWS: Document new behavior of (random), (random "string"). | ||
| 5 | |||
| 6 | 2012-08-28 Andreas Schwab <schwab@linux-m68k.org> | ||
| 7 | |||
| 8 | * charsets/MULE-ethiopic.map: Fix typo in comment. | ||
| 9 | * charsets/MULE-ipa.map: Likewise. | ||
| 10 | * charsets/MULE-is13194.map: Likewise. | ||
| 11 | * charsets/MULE-lviscii.map: Likewise. | ||
| 12 | * charsets/MULE-sisheng.map: Likewise. | ||
| 13 | * charsets/MULE-tibetan.map: Likewise. | ||
| 14 | * charsets/MULE-uviscii.map: Likewise. | ||
| 15 | |||
| 1 | 2012-08-09 Chong Yidong <cyd@gnu.org> | 16 | 2012-08-09 Chong Yidong <cyd@gnu.org> |
| 2 | 17 | ||
| 3 | * images/splash.svg, images/splash.png: Tweak SVG paths to improve | 18 | * images/splash.svg, images/splash.png: Tweak SVG paths to improve |
| @@ -23,7 +23,7 @@ so we will look at it and add it to the manual. | |||
| 23 | 23 | ||
| 24 | * Installation Changes in Emacs 24.3 | 24 | * Installation Changes in Emacs 24.3 |
| 25 | 25 | ||
| 26 | ** New configure option '--without-all' to disable additonal features. | 26 | ** New configure option '--without-all' to disable additional features. |
| 27 | This disables most of the features that are normally enabled by default. | 27 | This disables most of the features that are normally enabled by default. |
| 28 | 28 | ||
| 29 | ** New configure option '--enable-link-time-optimization' to utilize | 29 | ** New configure option '--enable-link-time-optimization' to utilize |
| @@ -39,6 +39,11 @@ may be useful. | |||
| 39 | as it was confusingly-named and rarely useful. | 39 | as it was confusingly-named and rarely useful. |
| 40 | 40 | ||
| 41 | --- | 41 | --- |
| 42 | ** You can use `NO_BIN_LINK=t make install' to prevent the installation | ||
| 43 | overwriting "emacs" in the installation bin/ directory with a link | ||
| 44 | to emacs-VERSION. | ||
| 45 | |||
| 46 | --- | ||
| 42 | ** Emacs uses libtinfo in preference to libncurses, if available. | 47 | ** Emacs uses libtinfo in preference to libncurses, if available. |
| 43 | 48 | ||
| 44 | --- | 49 | --- |
| @@ -160,6 +165,10 @@ The PCL-CVS commands are still available via the keyboard. | |||
| 160 | 165 | ||
| 161 | * Editing Changes in Emacs 24.3 | 166 | * Editing Changes in Emacs 24.3 |
| 162 | 167 | ||
| 168 | ** The `z' key no longer has a binding in most special modes. | ||
| 169 | It used to be bound to `kill-this-buffer', but `z' is too easy to | ||
| 170 | accidentally type. | ||
| 171 | |||
| 163 | ** New option `yank-handled-properties' allows processing of text | 172 | ** New option `yank-handled-properties' allows processing of text |
| 164 | properties on yanked text, in more ways that are more general than | 173 | properties on yanked text, in more ways that are more general than |
| 165 | just removing them, as done by `yank-excluded-properties'. | 174 | just removing them, as done by `yank-excluded-properties'. |
| @@ -174,6 +183,15 @@ end of the buffer. It defaults to t. | |||
| 174 | and `M-s _' in Isearch toggles symbol search mode. | 183 | and `M-s _' in Isearch toggles symbol search mode. |
| 175 | `M-s c' in Isearch toggles search case-sensitivity. | 184 | `M-s c' in Isearch toggles search case-sensitivity. |
| 176 | 185 | ||
| 186 | *** `M-s SPC' in Isearch toggles whitespace matching mode | ||
| 187 | in both ordinary and regexp incremental search, so that each | ||
| 188 | sequence of spaces in the search string matches any combination | ||
| 189 | of one or more whitespace characters defined by the variable | ||
| 190 | `search-whitespace-regexp'. In ordinary incremental search, | ||
| 191 | `isearch-toggle-lax-whitespace' toggles the value of the variable | ||
| 192 | `isearch-lax-whitespace'. In regexp incremental search, it toggles | ||
| 193 | the value of the variable `isearch-regexp-lax-whitespace'. | ||
| 194 | |||
| 177 | ** M-x move-to-column, if called interactively with no prefix arg, now | 195 | ** M-x move-to-column, if called interactively with no prefix arg, now |
| 178 | prompts for a column number. | 196 | prompts for a column number. |
| 179 | 197 | ||
| @@ -195,6 +213,8 @@ It copies the region-rectangle as the last rectangle kill. | |||
| 195 | 213 | ||
| 196 | * Changes in Specialized Modes and Packages in Emacs 24.3 | 214 | * Changes in Specialized Modes and Packages in Emacs 24.3 |
| 197 | 215 | ||
| 216 | ** Compilation has a new `compilation-always-kill' configuration variable. | ||
| 217 | |||
| 198 | ** Term changes | 218 | ** Term changes |
| 199 | 219 | ||
| 200 | The variables `term-default-fg-color' and `term-default-bg-color' are | 220 | The variables `term-default-fg-color' and `term-default-bg-color' are |
| @@ -510,6 +530,11 @@ inefficiency, and not namespace-clean. | |||
| 510 | 530 | ||
| 511 | * Incompatible Lisp Changes in Emacs 24.3 | 531 | * Incompatible Lisp Changes in Emacs 24.3 |
| 512 | 532 | ||
| 533 | ** (random) by default now returns a different random sequence in | ||
| 534 | every Emacs run. Use (random S), where S is a string, to set the | ||
| 535 | random seed to a value based on S, in order to get a repeatable | ||
| 536 | sequence in later calls. | ||
| 537 | |||
| 513 | ** The function `x-select-font' can return a font spec, instead of a | 538 | ** The function `x-select-font' can return a font spec, instead of a |
| 514 | font name as a string. Whether it returns a font spec or a font name | 539 | font name as a string. Whether it returns a font spec or a font name |
| 515 | depends on the graphical library. | 540 | depends on the graphical library. |
| @@ -576,6 +601,8 @@ are deprecated and will be removed eventually. | |||
| 576 | 601 | ||
| 577 | * Lisp changes in Emacs 24.3 | 602 | * Lisp changes in Emacs 24.3 |
| 578 | 603 | ||
| 604 | ** New minor mode `read-only-mode' to replace toggle-read-only (now obsolete). | ||
| 605 | |||
| 579 | ** New functions `autoloadp' and `autoload-do-load'. | 606 | ** New functions `autoloadp' and `autoload-do-load'. |
| 580 | 607 | ||
| 581 | ** New function `posnp' to test if an object is a `posn'. | 608 | ** New function `posnp' to test if an object is a `posn'. |
| @@ -604,9 +631,26 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'. | |||
| 604 | *** The functions get-lru-window, get-mru-window and get-largest-window | 631 | *** The functions get-lru-window, get-mru-window and get-largest-window |
| 605 | now accept a third argument to avoid choosing the selected window. | 632 | now accept a third argument to avoid choosing the selected window. |
| 606 | 633 | ||
| 634 | *** New macro with-temp-buffer-window. | ||
| 635 | |||
| 636 | *** New display action function display-buffer-below-selected. | ||
| 637 | |||
| 607 | *** New display action alist `inhibit-switch-frame', if non-nil, tells | 638 | *** New display action alist `inhibit-switch-frame', if non-nil, tells |
| 608 | display action functions to avoid changing which frame is selected. | 639 | display action functions to avoid changing which frame is selected. |
| 609 | 640 | ||
| 641 | *** New display action alist `pop-up-frame-parameters', if non-nil, | ||
| 642 | specifies frame parameters to give any newly-created frame. | ||
| 643 | |||
| 644 | *** The following variables are obsolete, as they can be replaced by | ||
| 645 | appropriate entries in the `display-buffer-alist' function introduced | ||
| 646 | in Emacs 24.1: | ||
| 647 | |||
| 648 | **** `display-buffer-reuse-frames' | ||
| 649 | **** `special-display-regexps' | ||
| 650 | **** `special-display-frame-alist' | ||
| 651 | **** `special-display-buffer-names' | ||
| 652 | **** `special-display-function' | ||
| 653 | |||
| 610 | ** Completion | 654 | ** Completion |
| 611 | 655 | ||
| 612 | *** New function `completion-table-with-quoting' to handle completion | 656 | *** New function `completion-table-with-quoting' to handle completion |
diff --git a/etc/charsets/MULE-ethiopic.map b/etc/charsets/MULE-ethiopic.map index d2720bd10ba..30cf5736763 100644 --- a/etc/charsets/MULE-ethiopic.map +++ b/etc/charsets/MULE-ethiopic.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x2121 0x1200 | 2 | 0x2121 0x1200 |
| 3 | 0x2122 0x1201 | 3 | 0x2122 0x1201 |
| 4 | 0x2123 0x1202 | 4 | 0x2123 0x1202 |
diff --git a/etc/charsets/MULE-ipa.map b/etc/charsets/MULE-ipa.map index 35e5d50ecec..0a6c61d5a95 100644 --- a/etc/charsets/MULE-ipa.map +++ b/etc/charsets/MULE-ipa.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x20 0x0069 | 2 | 0x20 0x0069 |
| 3 | 0x21 0x026A | 3 | 0x21 0x026A |
| 4 | 0x22 0x0065 | 4 | 0x22 0x0065 |
diff --git a/etc/charsets/MULE-is13194.map b/etc/charsets/MULE-is13194.map index 1fa9b21dcf8..390132cd375 100644 --- a/etc/charsets/MULE-is13194.map +++ b/etc/charsets/MULE-is13194.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x21 0x0901 | 2 | 0x21 0x0901 |
| 3 | 0x22 0x0902 | 3 | 0x22 0x0902 |
| 4 | 0x23 0x0903 | 4 | 0x23 0x0903 |
diff --git a/etc/charsets/MULE-lviscii.map b/etc/charsets/MULE-lviscii.map index 3b6a38be616..e4d2eca90ac 100644 --- a/etc/charsets/MULE-lviscii.map +++ b/etc/charsets/MULE-lviscii.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x21 0x1EAF | 2 | 0x21 0x1EAF |
| 3 | 0x22 0x1EB1 | 3 | 0x22 0x1EB1 |
| 4 | 0x23 0x1EB7 | 4 | 0x23 0x1EB7 |
diff --git a/etc/charsets/MULE-sisheng.map b/etc/charsets/MULE-sisheng.map index 405bb1ffa2c..144a3ff5134 100644 --- a/etc/charsets/MULE-sisheng.map +++ b/etc/charsets/MULE-sisheng.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x21 0x0101 | 2 | 0x21 0x0101 |
| 3 | 0x22 0x00E1 | 3 | 0x22 0x00E1 |
| 4 | 0x23 0x01CE | 4 | 0x23 0x01CE |
diff --git a/etc/charsets/MULE-tibetan.map b/etc/charsets/MULE-tibetan.map index 0d6ff3a0a39..b885585c094 100644 --- a/etc/charsets/MULE-tibetan.map +++ b/etc/charsets/MULE-tibetan.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x2130 0x0F00 | 2 | 0x2130 0x0F00 |
| 3 | 0x2131 0x0F01 | 3 | 0x2131 0x0F01 |
| 4 | 0x2132 0x0F02 | 4 | 0x2132 0x0F02 |
diff --git a/etc/charsets/MULE-uviscii.map b/etc/charsets/MULE-uviscii.map index 65e5d2968e5..dc19583bdfe 100644 --- a/etc/charsets/MULE-uviscii.map +++ b/etc/charsets/MULE-uviscii.map | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. | 1 | # Generated by running admin/charsets/mule-charsets.el in Emacs 22.3. |
| 2 | 0x21 0x1EAE | 2 | 0x21 0x1EAE |
| 3 | 0x22 0x1EB0 | 3 | 0x22 0x1EB0 |
| 4 | 0x23 0x1EB6 | 4 | 0x23 0x1EB6 |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4e3f3424c91..35190fd2a8f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-31 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * etags.c (consider_token): Always zero-terminate token buffer. | ||
| 4 | (Bug#12306) | ||
| 5 | |||
| 1 | 2012-08-19 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2012-08-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Rely on <config.h> + <unistd.h> to declare 'environ'. | 8 | Rely on <config.h> + <unistd.h> to declare 'environ'. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 9c03735c954..e65082de534 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -2878,6 +2878,7 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2878 | objdef = omethodtag; | 2878 | objdef = omethodtag; |
| 2879 | linebuffer_setlen (&token_name, oldlen + len); | 2879 | linebuffer_setlen (&token_name, oldlen + len); |
| 2880 | memcpy (token_name.buffer + oldlen, str, len); | 2880 | memcpy (token_name.buffer + oldlen, str, len); |
| 2881 | token_name.buffer[oldlen + len] = '\0'; | ||
| 2881 | return TRUE; | 2882 | return TRUE; |
| 2882 | } | 2883 | } |
| 2883 | return FALSE; | 2884 | return FALSE; |
diff --git a/lib/execinfo.c b/lib/execinfo.c new file mode 100644 index 00000000000..0bcd9f078ba --- /dev/null +++ b/lib/execinfo.c | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #include <config.h> | ||
| 2 | #define _GL_EXECINFO_INLINE _GL_EXTERN_INLINE | ||
| 3 | #include "execinfo.h" | ||
diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h new file mode 100644 index 00000000000..d76b0e1b771 --- /dev/null +++ b/lib/execinfo.in.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* Information about executables. | ||
| 2 | |||
| 3 | Copyright (C) 2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This program is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License as published by | ||
| 7 | the Free Software Foundation; either version 3 of the License, or | ||
| 8 | (at your option) any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | /* Written by Paul Eggert. */ | ||
| 19 | |||
| 20 | #ifndef _GL_EXECINFO_H | ||
| 21 | #define _GL_EXECINFO_H | ||
| 22 | |||
| 23 | _GL_INLINE_HEADER_BEGIN | ||
| 24 | #ifndef _GL_EXECINFO_INLINE | ||
| 25 | # define _GL_EXECINFO_INLINE _GL_INLINE | ||
| 26 | #endif | ||
| 27 | |||
| 28 | _GL_EXECINFO_INLINE int | ||
| 29 | backtrace (void **buffer, int size) | ||
| 30 | { | ||
| 31 | (void) buffer; | ||
| 32 | (void) size; | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | _GL_EXECINFO_INLINE char ** | ||
| 37 | backtrace_symbols (void *const *buffer, int size) | ||
| 38 | { | ||
| 39 | (void) buffer; | ||
| 40 | (void) size; | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | |||
| 44 | _GL_EXECINFO_INLINE void | ||
| 45 | backtrace_symbols_fd (void *const *buffer, int size, int fd) | ||
| 46 | { | ||
| 47 | (void) buffer; | ||
| 48 | (void) size; | ||
| 49 | (void) fd; | ||
| 50 | } | ||
| 51 | |||
| 52 | _GL_INLINE_HEADER_END | ||
| 53 | |||
| 54 | #endif | ||
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index a90cc59bbde..d49eb4fdf7a 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | # the same distribution terms as the rest of that program. | 21 | # the same distribution terms as the rest of that program. |
| 22 | # | 22 | # |
| 23 | # Generated by gnulib-tool. | 23 | # Generated by gnulib-tool. |
| 24 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings | 24 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | MOSTLYCLEANFILES += core *.stackdump | 27 | MOSTLYCLEANFILES += core *.stackdump |
| @@ -150,6 +150,31 @@ EXTRA_libgnu_a_SOURCES += dup2.c | |||
| 150 | 150 | ||
| 151 | ## end gnulib module dup2 | 151 | ## end gnulib module dup2 |
| 152 | 152 | ||
| 153 | ## begin gnulib module execinfo | ||
| 154 | |||
| 155 | BUILT_SOURCES += $(EXECINFO_H) | ||
| 156 | |||
| 157 | # We need the following in order to create <execinfo.h> when the system | ||
| 158 | # doesn't have one that works. | ||
| 159 | if GL_GENERATE_EXECINFO_H | ||
| 160 | execinfo.h: execinfo.in.h $(top_builddir)/config.status | ||
| 161 | $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 162 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | ||
| 163 | cat $(srcdir)/execinfo.in.h; \ | ||
| 164 | } > $@-t && \ | ||
| 165 | mv $@-t $@ | ||
| 166 | else | ||
| 167 | execinfo.h: $(top_builddir)/config.status | ||
| 168 | rm -f $@ | ||
| 169 | endif | ||
| 170 | MOSTLYCLEANFILES += execinfo.h execinfo.h-t | ||
| 171 | |||
| 172 | EXTRA_DIST += execinfo.c execinfo.in.h | ||
| 173 | |||
| 174 | EXTRA_libgnu_a_SOURCES += execinfo.c | ||
| 175 | |||
| 176 | ## end gnulib module execinfo | ||
| 177 | |||
| 153 | ## begin gnulib module filemode | 178 | ## begin gnulib module filemode |
| 154 | 179 | ||
| 155 | libgnu_a_SOURCES += filemode.c | 180 | libgnu_a_SOURCES += filemode.c |
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in index 11251d55f77..f0cea56f829 100644 --- a/lib/makefile.w32-in +++ b/lib/makefile.w32-in | |||
| @@ -28,6 +28,7 @@ GNULIBOBJS = $(BLD)/c-ctype.$(O) \ | |||
| 28 | $(BLD)/c-strncasecmp.$(O) \ | 28 | $(BLD)/c-strncasecmp.$(O) \ |
| 29 | $(BLD)/dtoastr.$(O) \ | 29 | $(BLD)/dtoastr.$(O) \ |
| 30 | $(BLD)/dtotimespec.$(O) \ | 30 | $(BLD)/dtotimespec.$(O) \ |
| 31 | $(BLD)/execinfo.$(O) \ | ||
| 31 | $(BLD)/getopt.$(O) \ | 32 | $(BLD)/getopt.$(O) \ |
| 32 | $(BLD)/getopt1.$(O) \ | 33 | $(BLD)/getopt1.$(O) \ |
| 33 | $(BLD)/gettime.$(O) \ | 34 | $(BLD)/gettime.$(O) \ |
| @@ -129,6 +130,11 @@ $(BLD)/dtotimespec.$(O) : \ | |||
| 129 | $(GNU_LIB)/timespec.h \ | 130 | $(GNU_LIB)/timespec.h \ |
| 130 | $(CONFIG_H) | 131 | $(CONFIG_H) |
| 131 | 132 | ||
| 133 | $(BLD)/execinfo.$(O) : \ | ||
| 134 | $(GNU_LIB)/execinfo.c \ | ||
| 135 | $(GNU_LIB)/execinfo.h \ | ||
| 136 | $(CONFIG_H) | ||
| 137 | |||
| 132 | $(BLD)/getopt.$(O) : \ | 138 | $(BLD)/getopt.$(O) : \ |
| 133 | $(GNU_LIB)/getopt.c \ | 139 | $(GNU_LIB)/getopt.c \ |
| 134 | $(GNU_LIB)/getopt.h \ | 140 | $(GNU_LIB)/getopt.h \ |
| @@ -299,3 +305,7 @@ getopt_h: | |||
| 299 | < getopt.in.h > getopt_.h-t | 305 | < getopt.in.h > getopt_.h-t |
| 300 | $(CP) getopt_.h-t getopt_.h | 306 | $(CP) getopt_.h-t getopt_.h |
| 301 | - $(DEL) getopt_.h-t | 307 | - $(DEL) getopt_.h-t |
| 308 | |||
| 309 | execinfo.h: execinfo.in.h | ||
| 310 | $(CP) execinfo.in.h $@ | ||
| 311 | |||
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h index ed1f9aa488b..1f8caee4f2d 100644 --- a/lib/stdbool.in.h +++ b/lib/stdbool.in.h | |||
| @@ -66,24 +66,19 @@ | |||
| 66 | # undef true | 66 | # undef true |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | /* For the sake of symbolic names in gdb, we define true and false as | 69 | #ifdef __cplusplus |
| 70 | enum constants, not only as macros. | 70 | # define _Bool bool |
| 71 | It is tempting to write | 71 | # define bool bool |
| 72 | typedef enum { false = 0, true = 1 } _Bool; | 72 | #else |
| 73 | so that gdb prints values of type 'bool' symbolically. But if we do | 73 | # if defined __BEOS__ && !defined __HAIKU__ |
| 74 | this, values of type '_Bool' may promote to 'int' or 'unsigned int' | ||
| 75 | (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' | ||
| 76 | (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the | ||
| 77 | enum; this ensures that '_Bool' promotes to 'int'. */ | ||
| 78 | #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) | ||
| 79 | /* A compiler known to have 'bool'. */ | 74 | /* A compiler known to have 'bool'. */ |
| 80 | /* If the compiler already has both 'bool' and '_Bool', we can assume they | 75 | /* If the compiler already has both 'bool' and '_Bool', we can assume they |
| 81 | are the same types. */ | 76 | are the same types. */ |
| 82 | # if !@HAVE__BOOL@ | 77 | # if !@HAVE__BOOL@ |
| 83 | typedef bool _Bool; | 78 | typedef bool _Bool; |
| 84 | # endif | 79 | # endif |
| 85 | #else | 80 | # else |
| 86 | # if !defined __GNUC__ | 81 | # if !defined __GNUC__ |
| 87 | /* If @HAVE__BOOL@: | 82 | /* If @HAVE__BOOL@: |
| 88 | Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when | 83 | Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when |
| 89 | the built-in _Bool type is used. See | 84 | the built-in _Bool type is used. See |
| @@ -103,19 +98,35 @@ typedef bool _Bool; | |||
| 103 | "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. | 98 | "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. |
| 104 | The only benefit of the enum, debuggability, is not important | 99 | The only benefit of the enum, debuggability, is not important |
| 105 | with these compilers. So use 'signed char' and no enum. */ | 100 | with these compilers. So use 'signed char' and no enum. */ |
| 106 | # define _Bool signed char | 101 | # define _Bool signed char |
| 107 | # else | 102 | # else |
| 108 | /* With this compiler, trust the _Bool type if the compiler has it. */ | 103 | /* With this compiler, trust the _Bool type if the compiler has it. */ |
| 109 | # if !@HAVE__BOOL@ | 104 | # if !@HAVE__BOOL@ |
| 105 | /* For the sake of symbolic names in gdb, define true and false as | ||
| 106 | enum constants, not only as macros. | ||
| 107 | It is tempting to write | ||
| 108 | typedef enum { false = 0, true = 1 } _Bool; | ||
| 109 | so that gdb prints values of type 'bool' symbolically. But then | ||
| 110 | values of type '_Bool' might promote to 'int' or 'unsigned int' | ||
| 111 | (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' | ||
| 112 | (see ISO C 99 6.3.1.1.(2)). So add a negative value to the | ||
| 113 | enum; this ensures that '_Bool' promotes to 'int'. */ | ||
| 110 | typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; | 114 | typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; |
| 115 | # endif | ||
| 111 | # endif | 116 | # endif |
| 112 | # endif | 117 | # endif |
| 118 | # define bool _Bool | ||
| 113 | #endif | 119 | #endif |
| 114 | #define bool _Bool | ||
| 115 | 120 | ||
| 116 | /* The other macros must be usable in preprocessor directives. */ | 121 | /* The other macros must be usable in preprocessor directives. */ |
| 117 | #define false 0 | 122 | #ifdef __cplusplus |
| 118 | #define true 1 | 123 | # define false false |
| 124 | # define true true | ||
| 125 | #else | ||
| 126 | # define false 0 | ||
| 127 | # define true 1 | ||
| 128 | #endif | ||
| 129 | |||
| 119 | #define __bool_true_false_are_defined 1 | 130 | #define __bool_true_false_are_defined 1 |
| 120 | 131 | ||
| 121 | #endif /* _GL_STDBOOL_H */ | 132 | #endif /* _GL_STDBOOL_H */ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d748214959d..d4630d36691 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,454 @@ | |||
| 1 | 2012-09-04 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el: Clean up keybindings. | ||
| 4 | (ruby-mode-map): Don't bind ruby-electric-brace, | ||
| 5 | ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun, | ||
| 6 | backward-kill-word, reindent-then-newline-and-indent. | ||
| 7 | (ruby-mark-defun): Remove. | ||
| 8 | (ruby-electric-brace): Remove. Obsoleted by electric-indent-chars. | ||
| 9 | (ruby-mode): Set local beginning-of-defun-function and | ||
| 10 | end-of-defun-function values. | ||
| 11 | |||
| 12 | 2012-09-03 Martin Rudalics <rudalics@gmx.at> | ||
| 13 | |||
| 14 | * window.el (temp-buffer-window-setup-hook) | ||
| 15 | (temp-buffer-window-show-hook): New hooks. | ||
| 16 | (temp-buffer-window-setup, temp-buffer-window-show) | ||
| 17 | (with-temp-buffer-window): New functions. | ||
| 18 | (fit-window-to-buffer): Remove unused optional argument | ||
| 19 | OVERRIDE. | ||
| 20 | (special-display-popup-frame): Make sure the window used shows | ||
| 21 | BUFFER. | ||
| 22 | |||
| 23 | * help.el (temp-buffer-resize-mode): Fix doc-string. | ||
| 24 | (resize-temp-buffer-window): New optional argument WINDOW. | ||
| 25 | |||
| 26 | * files.el (recover-file, save-buffers-kill-emacs): | ||
| 27 | * dired.el (dired-mark-pop-up): Use with-temp-buffer-window. | ||
| 28 | |||
| 29 | 2012-09-02 Michael Albinus <michael.albinus@gmx.de> | ||
| 30 | |||
| 31 | * eshell/em-unix.el (eshell/sudo): When we have an ad-hoc | ||
| 32 | remote definition of `default-directory', ensure we can connect. | ||
| 33 | |||
| 34 | 2012-09-02 Juri Linkov <juri@jurta.org> | ||
| 35 | |||
| 36 | Toggle whitespace matching mode with M-s SPC. | ||
| 37 | http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00008.html | ||
| 38 | |||
| 39 | * isearch.el (search-whitespace-regexp): Doc fix. | ||
| 40 | Remove cons cell customization. | ||
| 41 | (isearch-mode-map): Bind "\M-s " to isearch-toggle-lax-whitespace. | ||
| 42 | (isearch-lax-whitespace, isearch-regexp-lax-whitespace): | ||
| 43 | New variables. | ||
| 44 | (isearch-forward, isearch-forward-regexp): Doc fix. | ||
| 45 | (isearch-toggle-lax-whitespace): New command. | ||
| 46 | (search-forward-lax-whitespace, search-backward-lax-whitespace) | ||
| 47 | (re-search-forward-lax-whitespace) | ||
| 48 | (re-search-backward-lax-whitespace): New functions. | ||
| 49 | (isearch-whitespace-regexp): Remove function. | ||
| 50 | (isearch-query-replace): Let-bind replace-search-function and | ||
| 51 | replace-re-search-function. | ||
| 52 | (isearch-occur): Let-bind search-spaces-regexp according to the | ||
| 53 | value of isearch-lax-whitespace and isearch-regexp-lax-whitespace. | ||
| 54 | (isearch-quote-char): Check isearch-regexp-lax-whitespace in the | ||
| 55 | condition for C-q SPC. | ||
| 56 | (isearch-search-fun-default): Use new functions mentioned above. | ||
| 57 | (isearch-search-forward, isearch-search-backward): Remove functions. | ||
| 58 | (isearch-search): Don't let-bind search-spaces-regexp. | ||
| 59 | (isearch-lazy-highlight-space-regexp): Remove variable. | ||
| 60 | (isearch-lazy-highlight-lax-whitespace) | ||
| 61 | (isearch-lazy-highlight-regexp-lax-whitespace): New variables. | ||
| 62 | (isearch-lazy-highlight-new-loop): Use them. | ||
| 63 | (isearch-lazy-highlight-search): Don't let-bind search-spaces-regexp. | ||
| 64 | |||
| 65 | 2012-09-02 Chong Yidong <cyd@gnu.org> | ||
| 66 | |||
| 67 | * dired.el (dired-mode-map): Menu string fixes (Bug#11616). | ||
| 68 | |||
| 69 | 2012-09-02 Glenn Morris <rgm@gnu.org> | ||
| 70 | |||
| 71 | * simple.el (undo): Tweak message in undo-only case. (Bug#12283) | ||
| 72 | |||
| 73 | 2012-09-01 Glenn Morris <rgm@gnu.org> | ||
| 74 | |||
| 75 | * term.el: Tidy up menu definitions. | ||
| 76 | (term-mode-map): Use easymenu for In/Out, Complete menus. | ||
| 77 | (term-pager-break-map): Initialize in the defvar. | ||
| 78 | (term-terminal-menu, term-signals-menu): Define with easymenu. | ||
| 79 | (term-terminal-menu): Also show it in line-mode. (Bug#11957) | ||
| 80 | (term-pager-menu): New, extracted from term-process-pager. | ||
| 81 | (term-mode, term-char-mode, term-process-pager): Use easymenu-add. | ||
| 82 | (term-update-mode-line): Propertize line/char and page items. | ||
| 83 | (term-process-pager): Move keymap initialization elsewhere. | ||
| 84 | |||
| 85 | 2012-09-01 Martin Rudalics <rudalics@gmx.at> | ||
| 86 | |||
| 87 | * window.el (switch-to-prev-buffer): Handle additional values of | ||
| 88 | BURY-OR-KILL argument. Don't switch in minibuffer window. | ||
| 89 | (switch-to-next-buffer): Don't switch in minibuffer window. | ||
| 90 | (quit-restore-window): New function based on quit-window. | ||
| 91 | Handle additional values of former KILL argument. | ||
| 92 | (quit-window): Call quit-restore-window with appropriate | ||
| 93 | interpretation of KILL argument. | ||
| 94 | (display-buffer-below-selected): New buffer display action | ||
| 95 | function. | ||
| 96 | |||
| 97 | 2012-09-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 98 | |||
| 99 | * minibuffer.el (completion-at-point-functions): Complete docstring | ||
| 100 | (bug#12254). | ||
| 101 | |||
| 102 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 103 | |||
| 104 | Better seed support for (random). | ||
| 105 | * play/5x5.el, play/animate.el, play/cookie1.el, play/dissociate.el: | ||
| 106 | * play/doctor.el, play/dunnet.el, play/gomoku.el, play/landmark.el: | ||
| 107 | * play/mpuz.el, play/tetris.el, play/zone.el: | ||
| 108 | * calc/calc-comb.el (math-init-random-base): | ||
| 109 | * play/blackbox.el (bb-init-board): | ||
| 110 | * play/life.el (life): | ||
| 111 | * server.el (server-use-tcp): | ||
| 112 | * type-break.el (type-break): | ||
| 113 | Remove unnecessary call to (random t). | ||
| 114 | * net/sasl.el (sasl-unique-id-function): | ||
| 115 | Change (random t) to (random), now that the latter is more random. | ||
| 116 | * play/life.el (life-initialized): Remove no-longer-needed var. | ||
| 117 | |||
| 118 | 2012-08-31 Alp Aker <alp.tekin.aker@gmail.com> | ||
| 119 | |||
| 120 | * window.el (switch-to-prev-buffer, switch-to-next-buffer): | ||
| 121 | Consider frame's buffer predicate when choosing the buffer. | ||
| 122 | (Bug#12081) | ||
| 123 | |||
| 124 | 2012-08-30 Richard Stallman <rms@gnu.org> | ||
| 125 | |||
| 126 | * simple.el (special-mode-map): Delete binding for `z'. | ||
| 127 | |||
| 128 | 2012-08-30 Andreas Schwab <schwab@linux-m68k.org> | ||
| 129 | |||
| 130 | * progmodes/compile.el (compilation-always-kill): Doc fix. | ||
| 131 | |||
| 132 | 2012-08-30 Chong Yidong <cyd@gnu.org> | ||
| 133 | |||
| 134 | * window.el (display-buffer-reuse-frames): Make the obsolescence | ||
| 135 | message more informative. | ||
| 136 | |||
| 137 | 2012-08-30 Glenn Morris <rgm@gnu.org> | ||
| 138 | |||
| 139 | * paren.el (show-paren-delay): | ||
| 140 | Add a :set function. Doc fix. (Bug#12297) | ||
| 141 | |||
| 142 | 2012-08-29 Martin Blais <blais@furius.ca> (tiny change) | ||
| 143 | |||
| 144 | * progmodes/compile.el (compilation-always-kill): New var. | ||
| 145 | (compilation-start): Use it. | ||
| 146 | |||
| 147 | 2012-08-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 148 | |||
| 149 | * simple.el (read-only-mode): Move from files.el for bootstrapping. | ||
| 150 | * files.el (read-only-mode): Move to simple.el. | ||
| 151 | |||
| 152 | * files.el (read-only-mode): New minor mode. | ||
| 153 | (toggle-read-only): Use it and mark obsolete. | ||
| 154 | (find-file--read-only): | ||
| 155 | * vc/vc.el (vc-next-action, vc-checkout): | ||
| 156 | * vc/vc-cvs.el (vc-cvs-checkout): | ||
| 157 | * obsolete/vc-mcvs.el (vc-mcvs-update): | ||
| 158 | * ffap.el (ffap--toggle-read-only): Update callers. | ||
| 159 | |||
| 160 | 2012-08-29 Michael Albinus <michael.albinus@gmx.de> | ||
| 161 | |||
| 162 | * eshell/esh-ext.el (eshell-external-command): Do not examine | ||
| 163 | remote shell scripts. See | ||
| 164 | <https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/1035790>. | ||
| 165 | |||
| 166 | * net/tramp-sh.el (tramp-remote-path): Add "/sbin" and | ||
| 167 | "/usr/local/sbin". | ||
| 168 | |||
| 169 | 2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 170 | |||
| 171 | * emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293). | ||
| 172 | |||
| 173 | 2012-08-28 Leo Liu <sdl.web@gmail.com> | ||
| 174 | |||
| 175 | * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to | ||
| 176 | completion-at-point. (Bug#12220) | ||
| 177 | |||
| 178 | * skeleton.el (skeleton-untabify): Change to nil (bug#12223). | ||
| 179 | |||
| 180 | * progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267). | ||
| 181 | |||
| 182 | 2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 183 | |||
| 184 | * files.el (safe-local-eval-forms): Fix before-save-hook entry to | ||
| 185 | be buffer-local; add delete-trailing-whitespace (bug#12259). | ||
| 186 | |||
| 187 | 2012-08-28 Jeremy Moore <jmoore@ieee.org> (tiny change) | ||
| 188 | |||
| 189 | * progmodes/hideif.el (hif-compress-define-list): | ||
| 190 | Fix typo. (Bug#11951) | ||
| 191 | |||
| 192 | 2012-08-28 Dan Nicolaescu <dann@gnu.org> | ||
| 193 | |||
| 194 | * progmodes/hideshow.el (hs-block-end-regexp): Restore lost | ||
| 195 | buffer local setting. | ||
| 196 | |||
| 197 | * net/rcirc.el (rcirc-split-message): Fix for buffer-local | ||
| 198 | rcirc-encode-coding-system. | ||
| 199 | |||
| 200 | 2012-08-28 Leo Liu <sdl.web@gmail.com> | ||
| 201 | |||
| 202 | * net/rcirc.el (rcirc-split-message): New function. | ||
| 203 | (rcirc-send-message): Use it. (Bug#12051) | ||
| 204 | |||
| 205 | 2012-08-28 Juri Linkov <juri@jurta.org> | ||
| 206 | |||
| 207 | * info.el (Info-fontify-node): Hide empty lines at the end of | ||
| 208 | the node. (Bug#12272) | ||
| 209 | |||
| 210 | 2012-08-27 Drew Adams <drew.adams@oracle.com> | ||
| 211 | |||
| 212 | * dired.el (dired-pop-to-buffer): Make window start at beginning | ||
| 213 | of buffer (Bug#12281). | ||
| 214 | |||
| 215 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 216 | |||
| 217 | * window.el (special-display-regexps, special-display-frame-alist) | ||
| 218 | (special-display-buffer-names, special-display-function) | ||
| 219 | (display-buffer-reuse-frames): Mark as obsolete. | ||
| 220 | |||
| 221 | * progmodes/compile.el: Don't use display-buffer-reuse-frames. | ||
| 222 | |||
| 223 | * help.el (help-print-return-message): Don't treat | ||
| 224 | display-buffer-reuse-frames specially. | ||
| 225 | |||
| 226 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 227 | |||
| 228 | * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): | ||
| 229 | New variable, replacing gdb-frame-parameters. | ||
| 230 | (gdb-frame-io-buffer, gdb-frame-breakpoints-buffer) | ||
| 231 | (gdb-frame-threads-buffer, gdb-frame-memory-buffer) | ||
| 232 | (gdb-frame-disassembly-buffer, gdb-frame-stack-buffer) | ||
| 233 | (gdb-frame-locals-buffer, gdb-frame-registers-buffer): Use it. | ||
| 234 | (def-gdb-frame-for-buffer): Macro deleted. It is easier to define | ||
| 235 | the functions directly with gdb-display-buffer-other-frame-action. | ||
| 236 | (gdb-display-breakpoints-buffer, gdb-display-threads-buffer) | ||
| 237 | (gdb-display-memory-buffer, gdb-display-disassembly-buffer) | ||
| 238 | (gdb-display-stack-buffer, gdb-display-locals-buffer) | ||
| 239 | (gdb-display-registers-buffer): Define directly. | ||
| 240 | (def-gdb-display-buffer): Macro deleted. | ||
| 241 | (gdb-display-buffer): Remove second and third args, callers don't | ||
| 242 | use them. Defer to the default display-buffer behavior, apart | ||
| 243 | from making windows dedicated. | ||
| 244 | (gdb-setup-windows): Don't call display-buffer unnecessarily. | ||
| 245 | |||
| 246 | * progmodes/gud.el (gud-display-line): Just use display-buffer. | ||
| 247 | |||
| 248 | * window.el (display-buffer-pop-up-frame): Handle a | ||
| 249 | pop-up-frame-parameters alist entry. | ||
| 250 | (display-buffer): Document it. | ||
| 251 | |||
| 252 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 253 | |||
| 254 | * isearch.el (search-whitespace-regexp): Make string and nil | ||
| 255 | values apply to both ordinary and regexp search. Allow a cons | ||
| 256 | cell value to distinguish between the two. | ||
| 257 | (isearch-whitespace-regexp, isearch-search-forward) | ||
| 258 | (isearch-search-backward): New functions. | ||
| 259 | (isearch-occur, isearch-search-fun-default, isearch-search) | ||
| 260 | (isearch-lazy-highlight-new-loop): Use them. | ||
| 261 | (isearch-forward, isearch-forward-regexp): Doc fix. | ||
| 262 | |||
| 263 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 264 | |||
| 265 | * faces.el (help-argument-name): Always inherit from italic | ||
| 266 | (Bug#12213). | ||
| 267 | |||
| 268 | 2012-08-25 Martin Rudalics <rudalics@gmx.at> | ||
| 269 | |||
| 270 | * window.el (window--even-window-heights): Even heights when | ||
| 271 | WINDOW and the selected window form a vertical combination. | ||
| 272 | (display-buffer-use-some-window): Provide that window used gets | ||
| 273 | sized back by quit-window. (Bug#11880) and (Bug#12091) | ||
| 274 | |||
| 275 | 2012-08-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 276 | |||
| 277 | Fix file time stamp problem with bzr and CVS (Bug#12001). | ||
| 278 | * vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information | ||
| 279 | in the file's time stamp, since the version control system loses | ||
| 280 | that information. | ||
| 281 | |||
| 282 | 2012-08-22 Juri Linkov <juri@jurta.org> | ||
| 283 | |||
| 284 | * info.el (Info-fontify-node): Hide the suffix of the | ||
| 285 | Info file name in the header line. (Bug#12187) | ||
| 286 | |||
| 287 | 2012-08-22 Glenn Morris <rgm@gnu.org> | ||
| 288 | |||
| 289 | * calendar/cal-tex.el (cal-tex-weekly-common): | ||
| 290 | Restore leading blank page. | ||
| 291 | |||
| 292 | 2012-08-22 Le Wang <l26wang@gmail.com> (tiny change) | ||
| 293 | |||
| 294 | * misc.el (forward-to-word, backward-to-word): Activate or extend | ||
| 295 | the region under `shift-select-mode'. (Bug#12231) | ||
| 296 | |||
| 297 | 2012-08-22 Bastien Guerry <bzg@gnu.org> | ||
| 298 | |||
| 299 | * progmodes/executable.el (executable-prefix): Set to "#!" instead | ||
| 300 | of "#! ". http://www.in-ulm.de/~mascheck/various/shebang/#details | ||
| 301 | gives details on why the space is never needed. | ||
| 302 | |||
| 303 | 2012-08-22 Martin Rudalics <rudalics@gmx.at> | ||
| 304 | |||
| 305 | * window.el (walk-window-tree, window-with-parameter): | ||
| 306 | New optional argument MINIBUF to control whether these functions | ||
| 307 | should run on the minibuffer window. | ||
| 308 | (window-at-side-list): Don't operate on minibuffer window. | ||
| 309 | (window-in-direction): Simplify and rewrite doc-string. | ||
| 310 | (window--size-ignore): Rename to window--size-ignore-p. | ||
| 311 | Update callers. | ||
| 312 | (display-buffer-in-atom-window, window--major-non-side-window) | ||
| 313 | (window--major-side-window, display-buffer-in-major-side-window) | ||
| 314 | (delete-side-window, display-buffer-in-side-window): | ||
| 315 | New functions. | ||
| 316 | (window--side-check, window-deletable-p, delete-window) | ||
| 317 | (delete-other-windows, split-window): Handle side windows and | ||
| 318 | atomic windows appropriately. | ||
| 319 | (window--display-buffer): Call display-buffer-record-window also | ||
| 320 | when the window buffer did not change. | ||
| 321 | |||
| 322 | 2012-08-22 Christopher Schmidt <christopher@ch.ristopher.com> | ||
| 323 | |||
| 324 | * help-fns.el (help-fns--key-bindings): | ||
| 325 | Abbreviate non-symbol remap targets. (Bug#12174) | ||
| 326 | |||
| 327 | 2012-08-22 Martin Rudalics <rudalics@gmx.at> | ||
| 328 | |||
| 329 | * dired.el (dired-mark-remembered): Don't clobber point. | ||
| 330 | (Bug#11795) | ||
| 331 | |||
| 332 | 2012-08-22 Glenn Morris <rgm@gnu.org> | ||
| 333 | |||
| 334 | * progmodes/bug-reference.el (bug-reference): New custom group. | ||
| 335 | (bug-reference-bug-regexp): Make it a defcustom. | ||
| 336 | |||
| 337 | 2012-08-22 Daiki Ueno <ueno@unixuser.org> | ||
| 338 | |||
| 339 | * progmodes/js.el (js-indent-level, js-expr-indent-offset) | ||
| 340 | (js-paren-indent-offset, js-square-indent-offset) | ||
| 341 | (js-curly-indent-offset): Add :safe (Bug#12257). | ||
| 342 | |||
| 343 | 2012-08-22 Edward O'Connor <hober0@gmail.com> | ||
| 344 | |||
| 345 | * json.el (json-key-format): Add error properties. | ||
| 346 | (json-encode-key): New function. | ||
| 347 | (json-encode-hash-table, json-encode-alist, json-encode-plist): | ||
| 348 | Use json-encode-key. | ||
| 349 | |||
| 350 | 2012-08-22 Glenn Morris <rgm@gnu.org> | ||
| 351 | |||
| 352 | * calendar/cal-tex.el (cal-tex-longday): New function, replacing... | ||
| 353 | (cal-tex-leftday, cal-tex-rightday): Remove functions. | ||
| 354 | (cal-tex-weekly-common, cal-tex-cursor-filofax-2week): | ||
| 355 | Update for above change. | ||
| 356 | |||
| 357 | 2012-08-21 Andreas Schwab <schwab@linux-m68k.org> | ||
| 358 | |||
| 359 | * cus-face.el (custom-face-attributes): Fix customize type for the | ||
| 360 | :underline attribute. (Bug#11805) | ||
| 361 | |||
| 362 | 2012-08-21 Martin Rudalics <rudalics@gmx.at> | ||
| 363 | |||
| 364 | * window.el (window-point-1, set-window-point-1): Remove. | ||
| 365 | (window-in-direction, record-window-buffer) | ||
| 366 | (set-window-buffer-start-and-point, split-window-below) | ||
| 367 | (window--state-get-1, display-buffer-record-window): | ||
| 368 | Replace calls to window-point-1 and set-window-point-1 by calls to | ||
| 369 | window-point and set-window-point respectively. | ||
| 370 | |||
| 371 | 2012-08-21 Glenn Morris <rgm@gnu.org> | ||
| 372 | |||
| 373 | * calendar/cal-tex.el (cal-tex-weekly-common): New function. | ||
| 374 | (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week): | ||
| 375 | Use it. | ||
| 376 | |||
| 377 | * calendar/cal-tex.el (cal-tex-rightday): Add optional funcname arg. | ||
| 378 | (cal-tex-shortday): New function. | ||
| 379 | (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week) | ||
| 380 | (cal-tex-cursor-filofax-daily): Use the above. | ||
| 381 | |||
| 382 | * calendar/cal-tex.el (cal-tex-leftday, cal-tex-rightday): | ||
| 383 | New functions. | ||
| 384 | (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week) | ||
| 385 | (cal-tex-cursor-filofax-week): Use them. | ||
| 386 | |||
| 387 | * calendar/cal-tex.el (cal-tex-lefthead, cal-tex-righthead): | ||
| 388 | New constants. | ||
| 389 | (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week) | ||
| 390 | (cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use them. | ||
| 391 | |||
| 392 | * calendar/cal-tex.el (cal-tex-preamble): Generate new buffers. | ||
| 393 | (cal-tex-end-document): Don't rely on buffer name. | ||
| 394 | |||
| 395 | * calendar/cal-tex.el (cal-tex-cursor-filofax-year): | ||
| 396 | Use cal-tex-vspace. | ||
| 397 | (cal-tex-vspace, cal-tex-hspace, cal-tex-em, cal-tex-bf) | ||
| 398 | (cal-tex-Huge-bf, cal-tex-large-bf): Use cal-tex-cmd. | ||
| 399 | (cal-tex-scriptsize, cal-tex-huge, cal-tex-Huge, cal-tex-large): | ||
| 400 | Use cal-tex-arg. | ||
| 401 | |||
| 402 | * calendar/cal-tex.el (cal-tex-cursor-filofax-year) | ||
| 403 | (cal-tex-cursor-week, cal-tex-cursor-week2) | ||
| 404 | (cal-tex-cursor-week-iso, cal-tex-cursor-week-at-a-glance) | ||
| 405 | (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week) | ||
| 406 | (cal-tex-cursor-filofax-daily, cal-tex-cursor-day) | ||
| 407 | (cal-tex-insert-preamble, cal-tex-b-document) | ||
| 408 | (cal-tex-e-document, cal-tex-b-center, cal-tex-e-center): | ||
| 409 | Improve cal-tex-cmd usage. | ||
| 410 | |||
| 411 | * calendar/cal-tex.el (cal-tex-filofax-paper): New function. | ||
| 412 | (cal-tex-cursor-filofax-year, cal-tex-cursor-filofax-2week) | ||
| 413 | (cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use it. | ||
| 414 | (cal-tex-weekly-paper): New function. | ||
| 415 | (cal-tex-cursor-week, cal-tex-cursor-week2) | ||
| 416 | (cal-tex-cursor-week-iso, cal-tex-cursor-week-monday) | ||
| 417 | (cal-tex-cursor-day): Use it. | ||
| 418 | |||
| 419 | * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance) | ||
| 420 | (cal-tex-cursor-filofax-week): Remove leading blank page. | ||
| 421 | |||
| 422 | * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance): | ||
| 423 | Add autoload cookie. For now at least, don't use color, since | ||
| 424 | no other cal-tex function does. | ||
| 425 | |||
| 426 | * calendar/cal-tex.el (cal-tex-cursor-week-iso) | ||
| 427 | (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week) | ||
| 428 | (cal-tex-cursor-filofax-daily): Correct start date for diary entries. | ||
| 429 | |||
| 430 | 2012-08-21 Juri Linkov <juri@jurta.org> | ||
| 431 | |||
| 432 | * info.el (Info-file-attributes): New variable. | ||
| 433 | (info-insert-file-contents): Add file attributes to | ||
| 434 | `Info-file-attributes'. Clear the caches `Info-index-nodes' and | ||
| 435 | `Info-toc-nodes' when previous modtime of the Info file is less | ||
| 436 | than new modtime. | ||
| 437 | (Info-toc-nodes, Info-index-nodes): Move definitions up to the top | ||
| 438 | of info.el. (Bug#12230) | ||
| 439 | |||
| 440 | 2012-08-20 Glenn Morris <rgm@gnu.org> | ||
| 441 | |||
| 442 | * calendar/diary-lib.el (diary-include-files, diary-sexp-entry): | ||
| 443 | * calendar/holidays.el (calendar-holiday-list): | ||
| 444 | Report errors with display-warning rather than beep'n'sleep. | ||
| 445 | |||
| 446 | 2012-08-20 Michael Albinus <michael.albinus@gmx.de> | ||
| 447 | |||
| 448 | * net/tramp.el (tramp-accept-process-output): Accept only output | ||
| 449 | from PROC. Otherwise, process filters and sentinels might be | ||
| 450 | confused. (Bug#12145) | ||
| 451 | |||
| 1 | 2012-08-20 Chong Yidong <cyd@gnu.org> | 452 | 2012-08-20 Chong Yidong <cyd@gnu.org> |
| 2 | 453 | ||
| 3 | * descr-text.el (describe-text-properties-1): Use overlays-in to | 454 | * descr-text.el (describe-text-properties-1): Use overlays-in to |
| @@ -32,8 +483,8 @@ | |||
| 32 | (yank-excluded-properties): Add font-lock-face and category. | 483 | (yank-excluded-properties): Add font-lock-face and category. |
| 33 | (yank): Doc fix. | 484 | (yank): Doc fix. |
| 34 | 485 | ||
| 35 | * subr.el (remove-yank-excluded-properties): Obey | 486 | * subr.el (remove-yank-excluded-properties): |
| 36 | yank-handled-properties. The special handling of font-lock-face | 487 | Obey yank-handled-properties. The special handling of font-lock-face |
| 37 | and category is now done this way, instead of being hard-coded. | 488 | and category is now done this way, instead of being hard-coded. |
| 38 | (insert-for-yank-1): Remove font-lock-face handling. | 489 | (insert-for-yank-1): Remove font-lock-face handling. |
| 39 | (yank-handle-font-lock-face-property) | 490 | (yank-handle-font-lock-face-property) |
| @@ -47,8 +498,8 @@ | |||
| 47 | 498 | ||
| 48 | 2012-08-17 Michael Albinus <michael.albinus@gmx.de> | 499 | 2012-08-17 Michael Albinus <michael.albinus@gmx.de> |
| 49 | 500 | ||
| 50 | * net/tramp-sh.el (tramp-sh-handle-start-file-process): Eliminate | 501 | * net/tramp-sh.el (tramp-sh-handle-start-file-process): |
| 51 | superfluous prompt. (Bug#12203) | 502 | Eliminate superfluous prompt. (Bug#12203) |
| 52 | 503 | ||
| 53 | 2012-08-17 Chong Yidong <cyd@gnu.org> | 504 | 2012-08-17 Chong Yidong <cyd@gnu.org> |
| 54 | 505 | ||
| @@ -75,8 +526,8 @@ | |||
| 75 | (next-buffer, previous-buffer, split-window, balance-windows-2) | 526 | (next-buffer, previous-buffer, split-window, balance-windows-2) |
| 76 | (set-window-text-height, window-buffer-height) | 527 | (set-window-text-height, window-buffer-height) |
| 77 | (fit-window-to-buffer, shrink-window-if-larger-than-buffer) | 528 | (fit-window-to-buffer, shrink-window-if-larger-than-buffer) |
| 78 | (truncated-partial-width-window-p): Minor code adjustments. In | 529 | (truncated-partial-width-window-p): Minor code adjustments. |
| 79 | doc-strings state whether the argument window has to denote a | 530 | In doc-strings state whether the argument window has to denote a |
| 80 | live, valid or any window. | 531 | live, valid or any window. |
| 81 | 532 | ||
| 82 | 2012-08-16 Phil Sainty <psainty@orcon.net.nz> (tiny change) | 533 | 2012-08-16 Phil Sainty <psainty@orcon.net.nz> (tiny change) |
| @@ -251,7 +702,7 @@ | |||
| 251 | 702 | ||
| 252 | 2012-08-13 Bastien Guerry <bzg@gnu.org> | 703 | 2012-08-13 Bastien Guerry <bzg@gnu.org> |
| 253 | 704 | ||
| 254 | * window.el (special-display-popup-frame): Small docstring | 705 | * window.el (special-display-popup-frame): Minor docstring |
| 255 | enhancement. (Bug#12172) | 706 | enhancement. (Bug#12172) |
| 256 | 707 | ||
| 257 | 2012-08-13 Andreas Schwab <schwab@linux-m68k.org> | 708 | 2012-08-13 Andreas Schwab <schwab@linux-m68k.org> |
| @@ -319,6 +770,7 @@ | |||
| 319 | * files.el (hack-local-variables-filter): If an eval: form is not | 770 | * files.el (hack-local-variables-filter): If an eval: form is not |
| 320 | known to be safe, and enable-local-variables is :safe, then ignore | 771 | known to be safe, and enable-local-variables is :safe, then ignore |
| 321 | the form totally, as is done for non-eval forms. (Bug#12155) | 772 | the form totally, as is done for non-eval forms. (Bug#12155) |
| 773 | This is CVE-2012-3479. | ||
| 322 | 774 | ||
| 323 | 2012-08-10 Stefan Monnier <monnier@iro.umontreal.ca> | 775 | 2012-08-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 324 | 776 | ||
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 962a8fb557a..c5790603d11 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el | |||
| @@ -1374,7 +1374,6 @@ FROM and TO must be in increasing order, as must be the pairs in RANGES." | |||
| 1374 | ;; (time-trial | 1374 | ;; (time-trial |
| 1375 | ;; '(let ((size 10000) | 1375 | ;; '(let ((size 10000) |
| 1376 | ;; doing) | 1376 | ;; doing) |
| 1377 | ;; (random t) | ||
| 1378 | ;; (dotimes (count size) | 1377 | ;; (dotimes (count size) |
| 1379 | ;; (setq doing (random size)) | 1378 | ;; (setq doing (random size)) |
| 1380 | ;; (funcall try doing (+ doing (random 5))) | 1379 | ;; (funcall try doing (+ doing (random 5))) |
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 199bbf0ae35..431ea18f580 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el | |||
| @@ -77,7 +77,7 @@ | |||
| 77 | 4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967 4969 4973 | 77 | 4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967 4969 4973 |
| 78 | 4987 4993 4999 5003]) | 78 | 4987 4993 4999 5003]) |
| 79 | 79 | ||
| 80 | ;; The variable math-prime-factors-finished is set by calcFunc-prfac to | 80 | ;; The variable math-prime-factors-finished is set by calcFunc-prfac to |
| 81 | ;; indicate whether factoring is complete, and used by calcFunc-factors, | 81 | ;; indicate whether factoring is complete, and used by calcFunc-factors, |
| 82 | ;; calcFunc-totient and calcFunc-moebius. | 82 | ;; calcFunc-totient and calcFunc-moebius. |
| 83 | (defvar math-prime-factors-finished) | 83 | (defvar math-prime-factors-finished) |
| @@ -510,8 +510,8 @@ | |||
| 510 | (while (<= (length math-stirling-local-cache) n) | 510 | (while (<= (length math-stirling-local-cache) n) |
| 511 | (let ((i (1- (length math-stirling-local-cache))) | 511 | (let ((i (1- (length math-stirling-local-cache))) |
| 512 | row) | 512 | row) |
| 513 | (setq math-stirling-local-cache | 513 | (setq math-stirling-local-cache |
| 514 | (vconcat math-stirling-local-cache | 514 | (vconcat math-stirling-local-cache |
| 515 | (make-vector (length math-stirling-local-cache) nil))) | 515 | (make-vector (length math-stirling-local-cache) nil))) |
| 516 | (aset math-stirling-cache k math-stirling-local-cache) | 516 | (aset math-stirling-cache k math-stirling-local-cache) |
| 517 | (while (< (setq i (1+ i)) (length math-stirling-local-cache)) | 517 | (while (< (setq i (1+ i)) (length math-stirling-local-cache)) |
| @@ -572,7 +572,6 @@ | |||
| 572 | (let ((i 200)) | 572 | (let ((i 200)) |
| 573 | (while (> (setq i (1- i)) 0) | 573 | (while (> (setq i (1- i)) 0) |
| 574 | (math-random-base)))) | 574 | (math-random-base)))) |
| 575 | (random t) | ||
| 576 | (setq var-RandSeed nil | 575 | (setq var-RandSeed nil |
| 577 | math-random-cache nil | 576 | math-random-cache nil |
| 578 | math-random-shift -4) ; assume RAND_MAX >= 16383 | 577 | math-random-shift -4) ; assume RAND_MAX >= 16383 |
| @@ -629,7 +628,7 @@ | |||
| 629 | (i (/ (+ n slop) 3)) | 628 | (i (/ (+ n slop) 3)) |
| 630 | (rnum 0)) | 629 | (rnum 0)) |
| 631 | (while (> i 0) | 630 | (while (> i 0) |
| 632 | (setq rnum | 631 | (setq rnum |
| 633 | (math-add | 632 | (math-add |
| 634 | (math-random-three-digit-number) | 633 | (math-random-three-digit-number) |
| 635 | (math-mul rnum 1000))) | 634 | (math-mul rnum 1000))) |
| @@ -823,11 +822,11 @@ | |||
| 823 | (setq sum (% | 822 | (setq sum (% |
| 824 | (+ | 823 | (+ |
| 825 | sum | 824 | sum |
| 826 | (calcFunc-mod | 825 | (calcFunc-mod |
| 827 | q 1000000)) | 826 | q 1000000)) |
| 828 | 111111)) | 827 | 111111)) |
| 829 | (setq q | 828 | (setq q |
| 830 | (math-quotient | 829 | (math-quotient |
| 831 | q 1000000))) | 830 | q 1000000))) |
| 832 | (cond ((= (% sum 3) 0) '(nil 3)) | 831 | (cond ((= (% sum 3) 0) '(nil 3)) |
| 833 | ((= (% sum 7) 0) '(nil 7)) | 832 | ((= (% sum 7) 0) '(nil 7)) |
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 51ea8e7b7a3..2f1c95b7668 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el | |||
| @@ -86,7 +86,7 @@ | |||
| 86 | (setq sn (math-to-underscores sn))) | 86 | (setq sn (math-to-underscores sn))) |
| 87 | sn))) | 87 | sn))) |
| 88 | 88 | ||
| 89 | ;;; Give multiplication precendence when composing to avoid | 89 | ;;; Give multiplication precedence when composing to avoid |
| 90 | ;;; writing a*(b c) instead of a b c | 90 | ;;; writing a*(b c) instead of a b c |
| 91 | (defun math-compose-expr (a prec &optional div) | 91 | (defun math-compose-expr (a prec &optional div) |
| 92 | (let ((calc-multiplication-has-precedence t) | 92 | (let ((calc-multiplication-has-precedence t) |
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index c8c80370dfa..9c01ab40c0c 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el | |||
| @@ -237,6 +237,14 @@ The names are taken from `calendar-day-name-array'.") | |||
| 237 | "LaTeX code to insert one box with date info in calendar. | 237 | "LaTeX code to insert one box with date info in calendar. |
| 238 | This definition is the heart of the calendar!") | 238 | This definition is the heart of the calendar!") |
| 239 | 239 | ||
| 240 | (defconst cal-tex-lefthead | ||
| 241 | "\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}\n" | ||
| 242 | "LaTeX code for left header.") | ||
| 243 | |||
| 244 | (defconst cal-tex-righthead | ||
| 245 | "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}\n" | ||
| 246 | "LaTeX code for right header.") | ||
| 247 | |||
| 240 | (autoload 'holiday-in-range "holidays") | 248 | (autoload 'holiday-in-range "holidays") |
| 241 | 249 | ||
| 242 | (define-obsolete-function-alias 'cal-tex-list-holidays 'holiday-in-range "24.3") | 250 | (define-obsolete-function-alias 'cal-tex-list-holidays 'holiday-in-range "24.3") |
| @@ -253,14 +261,14 @@ This definition is the heart of the calendar!") | |||
| 253 | "Insert the LaTeX calendar preamble into `cal-tex-buffer'. | 261 | "Insert the LaTeX calendar preamble into `cal-tex-buffer'. |
| 254 | Preamble includes initial definitions for various LaTeX commands. | 262 | Preamble includes initial definitions for various LaTeX commands. |
| 255 | Optional string ARGS are included as options for the article document class." | 263 | Optional string ARGS are included as options for the article document class." |
| 256 | ;; FIXME use generate-new-buffer, and adjust cal-tex-end-document. | 264 | (set-buffer (generate-new-buffer cal-tex-buffer)) |
| 257 | (set-buffer (get-buffer-create cal-tex-buffer)) | ||
| 258 | (insert (format "\\documentclass%s{article}\n" | 265 | (insert (format "\\documentclass%s{article}\n" |
| 259 | (if (stringp args) | 266 | (if (stringp args) |
| 260 | (format "[%s]" args) | 267 | (format "[%s]" args) |
| 261 | ""))) | 268 | ""))) |
| 262 | (if (stringp cal-tex-preamble-extra) | 269 | (if (stringp cal-tex-preamble-extra) |
| 263 | (insert cal-tex-preamble-extra "\n")) | 270 | (insert cal-tex-preamble-extra "\n")) |
| 271 | ;; FIXME boxwidth and boxheight unused? | ||
| 264 | (insert "\\hbadness 20000 | 272 | (insert "\\hbadness 20000 |
| 265 | \\hfuzz=1000pt | 273 | \\hfuzz=1000pt |
| 266 | \\vbadness 20000 | 274 | \\vbadness 20000 |
| @@ -344,6 +352,54 @@ landscape mode with three rows of four months each." | |||
| 344 | (run-hooks 'cal-tex-year-hook)) | 352 | (run-hooks 'cal-tex-year-hook)) |
| 345 | (run-hooks 'cal-tex-hook)) | 353 | (run-hooks 'cal-tex-hook)) |
| 346 | 354 | ||
| 355 | |||
| 356 | (defun cal-tex-filofax-paper (&optional year) | ||
| 357 | "Insert some page size settings for filofax layouts." | ||
| 358 | (insert "\\textwidth 3.25in | ||
| 359 | \\textheight 6.5in | ||
| 360 | \\headheight -0.875in | ||
| 361 | \\topmargin 0pt | ||
| 362 | ") | ||
| 363 | (insert | ||
| 364 | ;; Why is this one subtly different? Who knows... | ||
| 365 | (if year "\\oddsidemargin 1.675in | ||
| 366 | \\evensidemargin 1.675in | ||
| 367 | " | ||
| 368 | "\\oddsidemargin 1.75in | ||
| 369 | \\evensidemargin 1.5in | ||
| 370 | \\headsep 0.125in | ||
| 371 | \\footskip 0.125in | ||
| 372 | "))) | ||
| 373 | |||
| 374 | (defun cal-tex-longday (funcname height) | ||
| 375 | "Insert LaTeX code for a long day function." | ||
| 376 | (insert "\\long\\def\\" funcname "#1#2#3#4#5{% | ||
| 377 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 378 | \\hbox to \\textwidth{% | ||
| 379 | \\vbox to " height "{% | ||
| 380 | \\vspace*{2pt}% | ||
| 381 | \\hbox to \\textwidth{" | ||
| 382 | (if (string-equal funcname "leftday") | ||
| 383 | "\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%\n" | ||
| 384 | "\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%\n") | ||
| 385 | " \\hbox to \\textwidth{\\vbox {\\" | ||
| 386 | (if (string-equal funcname "leftday") "noindent" "raggedleft") | ||
| 387 | " \\footnotesize \\em #4}}% | ||
| 388 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}\n")) | ||
| 389 | |||
| 390 | (defun cal-tex-shortday (funcname) | ||
| 391 | "Insert LaTeX code for a short day function." | ||
| 392 | (insert "\\long\\def\\" funcname "#1#2#3{% | ||
| 393 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 394 | \\hbox to \\textwidth{% | ||
| 395 | \\vbox {% | ||
| 396 | \\vspace*{2pt}% | ||
| 397 | \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}% | ||
| 398 | \\hbox to \\textwidth{\\vbox {\\" | ||
| 399 | (if (string-equal funcname "rightday") "raggedleft" "noindent") | ||
| 400 | " \\em #2}}% | ||
| 401 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}\n")) | ||
| 402 | |||
| 347 | ;;;###cal-autoload | 403 | ;;;###cal-autoload |
| 348 | (defun cal-tex-cursor-filofax-year (&optional n event) | 404 | (defun cal-tex-cursor-filofax-year (&optional n event) |
| 349 | "Make a Filofax one page yearly calendar of year indicated by cursor. | 405 | "Make a Filofax one page yearly calendar of year indicated by cursor. |
| @@ -354,16 +410,11 @@ Optional EVENT indicates a buffer position to use instead of point." | |||
| 354 | (or n (setq n 1)) | 410 | (or n (setq n 1)) |
| 355 | (let ((year (calendar-extract-year (calendar-cursor-to-date t event)))) | 411 | (let ((year (calendar-extract-year (calendar-cursor-to-date t event)))) |
| 356 | (cal-tex-preamble "twoside") | 412 | (cal-tex-preamble "twoside") |
| 357 | (cal-tex-cmd "\\textwidth 3.25in") | 413 | (cal-tex-filofax-paper 'year) |
| 358 | (cal-tex-cmd "\\textheight 6.5in") | ||
| 359 | (cal-tex-cmd "\\oddsidemargin 1.675in") | ||
| 360 | (cal-tex-cmd "\\evensidemargin 1.675in") | ||
| 361 | (cal-tex-cmd "\\topmargin 0pt") | ||
| 362 | (cal-tex-cmd "\\headheight -0.875in") | ||
| 363 | (cal-tex-cmd "\\fboxsep 0.5mm") | 414 | (cal-tex-cmd "\\fboxsep 0.5mm") |
| 364 | (cal-tex-cmd "\\pagestyle{empty}") | 415 | (cal-tex-cmd "\\pagestyle" "empty") |
| 365 | (cal-tex-b-document) | 416 | (cal-tex-b-document) |
| 366 | (cal-tex-cmd "\\vspace*{0.25in}") | 417 | (cal-tex-vspace "0.25in") |
| 367 | (dotimes (j n) | 418 | (dotimes (j n) |
| 368 | (insert (format "\\hfil \\textbf{\\Large %s} \\hfil\\\\\n" year)) | 419 | (insert (format "\\hfil \\textbf{\\Large %s} \\hfil\\\\\n" year)) |
| 369 | (cal-tex-b-center) | 420 | (cal-tex-b-center) |
| @@ -391,7 +442,7 @@ Optional EVENT indicates a buffer position to use instead of point." | |||
| 391 | (if (= j (1- n)) | 442 | (if (= j (1- n)) |
| 392 | (cal-tex-end-document) | 443 | (cal-tex-end-document) |
| 393 | (cal-tex-newpage) | 444 | (cal-tex-newpage) |
| 394 | (cal-tex-cmd "\\vspace*{0.25in}")) | 445 | (cal-tex-vspace "0.25in")) |
| 395 | (run-hooks 'cal-tex-year-hook)) | 446 | (run-hooks 'cal-tex-year-hook)) |
| 396 | (run-hooks 'cal-tex-hook))) | 447 | (run-hooks 'cal-tex-hook))) |
| 397 | 448 | ||
| @@ -653,6 +704,15 @@ this is only an upper bound." | |||
| 653 | {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n" | 704 | {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n" |
| 654 | "One hour and a line on the right.") | 705 | "One hour and a line on the right.") |
| 655 | 706 | ||
| 707 | (defun cal-tex-weekly-paper (&optional nomargins) | ||
| 708 | "Insert some page size settings for weekly layouts." | ||
| 709 | (insert "\\textwidth 6.5in | ||
| 710 | \\textheight 10.5in | ||
| 711 | ") | ||
| 712 | (or nomargins (insert "\\oddsidemargin 0in | ||
| 713 | \\evensidemargin 0in | ||
| 714 | "))) | ||
| 715 | |||
| 656 | ;; TODO cal-tex-diary-support. | 716 | ;; TODO cal-tex-diary-support. |
| 657 | ;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours). | 717 | ;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours). |
| 658 | ;;;###cal-autoload | 718 | ;;;###cal-autoload |
| @@ -677,13 +737,10 @@ entries are not shown). The calendar shows the hours 8-12am, 1-5pm." | |||
| 677 | (holidays (if cal-tex-holidays | 737 | (holidays (if cal-tex-holidays |
| 678 | (holiday-in-range d1 d2)))) | 738 | (holiday-in-range d1 d2)))) |
| 679 | (cal-tex-preamble "11pt") | 739 | (cal-tex-preamble "11pt") |
| 680 | (cal-tex-cmd "\\textwidth 6.5in") | 740 | (cal-tex-weekly-paper) |
| 681 | (cal-tex-cmd "\\textheight 10.5in") | ||
| 682 | (cal-tex-cmd "\\oddsidemargin 0in") | ||
| 683 | (cal-tex-cmd "\\evensidemargin 0in") | ||
| 684 | (insert cal-tex-LaTeX-hourbox) | 741 | (insert cal-tex-LaTeX-hourbox) |
| 685 | (cal-tex-b-document) | 742 | (cal-tex-b-document) |
| 686 | (cal-tex-cmd "\\pagestyle{empty}") | 743 | (cal-tex-cmd "\\pagestyle" "empty") |
| 687 | (dotimes (i n) | 744 | (dotimes (i n) |
| 688 | (cal-tex-vspace "-1.5in") | 745 | (cal-tex-vspace "-1.5in") |
| 689 | (cal-tex-b-center) | 746 | (cal-tex-b-center) |
| @@ -732,13 +789,10 @@ Optional EVENT indicates a buffer position to use instead of point." | |||
| 732 | (holidays (if cal-tex-holidays | 789 | (holidays (if cal-tex-holidays |
| 733 | (holiday-in-range d1 d2)))) | 790 | (holiday-in-range d1 d2)))) |
| 734 | (cal-tex-preamble "12pt") | 791 | (cal-tex-preamble "12pt") |
| 735 | (cal-tex-cmd "\\textwidth 6.5in") | 792 | (cal-tex-weekly-paper) |
| 736 | (cal-tex-cmd "\\textheight 10.5in") | ||
| 737 | (cal-tex-cmd "\\oddsidemargin 0in") | ||
| 738 | (cal-tex-cmd "\\evensidemargin 0in") | ||
| 739 | (insert cal-tex-LaTeX-hourbox) | 793 | (insert cal-tex-LaTeX-hourbox) |
| 740 | (cal-tex-b-document) | 794 | (cal-tex-b-document) |
| 741 | (cal-tex-cmd "\\pagestyle{empty}") | 795 | (cal-tex-cmd "\\pagestyle" "empty") |
| 742 | (dotimes (i n) | 796 | (dotimes (i n) |
| 743 | (cal-tex-vspace "-1.5in") | 797 | (cal-tex-vspace "-1.5in") |
| 744 | (cal-tex-b-center) | 798 | (cal-tex-b-center) |
| @@ -816,18 +870,12 @@ position to use instead of point." | |||
| 816 | (holidays (if cal-tex-holidays | 870 | (holidays (if cal-tex-holidays |
| 817 | (holiday-in-range d1 d2))) | 871 | (holiday-in-range d1 d2))) |
| 818 | (diary-list (if cal-tex-diary | 872 | (diary-list (if cal-tex-diary |
| 819 | (cal-tex-list-diary-entries | 873 | (cal-tex-list-diary-entries d1 d2))) |
| 820 | ;; FIXME d1? | ||
| 821 | (calendar-absolute-from-gregorian (list month 1 year)) | ||
| 822 | d2))) | ||
| 823 | s) | 874 | s) |
| 824 | (cal-tex-preamble "11pt") | 875 | (cal-tex-preamble "11pt") |
| 825 | (cal-tex-cmd "\\textwidth 6.5in") | 876 | (cal-tex-weekly-paper) |
| 826 | (cal-tex-cmd "\\textheight 10.5in") | ||
| 827 | (cal-tex-cmd "\\oddsidemargin 0in") | ||
| 828 | (cal-tex-cmd "\\evensidemargin 0in") | ||
| 829 | (cal-tex-b-document) | 877 | (cal-tex-b-document) |
| 830 | (cal-tex-cmd "\\pagestyle{empty}") | 878 | (cal-tex-cmd "\\pagestyle" "empty") |
| 831 | (dotimes (i n) | 879 | (dotimes (i n) |
| 832 | (cal-tex-vspace "-1.5in") | 880 | (cal-tex-vspace "-1.5in") |
| 833 | (cal-tex-b-center) | 881 | (cal-tex-b-center) |
| @@ -944,10 +992,7 @@ to use instead of point." | |||
| 944 | (calendar-absolute-from-gregorian | 992 | (calendar-absolute-from-gregorian |
| 945 | (calendar-cursor-to-date t event)))))) | 993 | (calendar-cursor-to-date t event)))))) |
| 946 | (cal-tex-preamble "11pt") | 994 | (cal-tex-preamble "11pt") |
| 947 | (cal-tex-cmd "\\textwidth 6.5in") | 995 | (cal-tex-weekly-paper) |
| 948 | (cal-tex-cmd "\\textheight 10.5in") | ||
| 949 | (cal-tex-cmd "\\oddsidemargin 0in") | ||
| 950 | (cal-tex-cmd "\\evensidemargin 0in") | ||
| 951 | (cal-tex-b-document) | 996 | (cal-tex-b-document) |
| 952 | (dotimes (i n) | 997 | (dotimes (i n) |
| 953 | (cal-tex-vspace "-1cm") | 998 | (cal-tex-vspace "-1cm") |
| @@ -1009,15 +1054,8 @@ shown are hard-coded to 8-12, 13-17." | |||
| 1009 | (cal-tex-e-framebox) | 1054 | (cal-tex-e-framebox) |
| 1010 | (cal-tex-hspace "1cm"))) | 1055 | (cal-tex-hspace "1cm"))) |
| 1011 | 1056 | ||
| 1012 | (defun cal-tex-cursor-week-at-a-glance (&optional n event) | 1057 | (defun cal-tex-weekly-common (n event &optional filofax) |
| 1013 | "One-week-at-a-glance full page calendar for week indicated by cursor. | 1058 | "Common code for weekly calendars." |
| 1014 | Optional prefix argument N specifies number of weeks (default 1), | ||
| 1015 | starting on Mondays. The calendar shows holiday and diary entries | ||
| 1016 | if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil. | ||
| 1017 | It does not show hours of the day. Optional EVENT indicates a buffer | ||
| 1018 | position to use instead of point." | ||
| 1019 | (interactive (list (prefix-numeric-value current-prefix-arg) | ||
| 1020 | last-nonmenu-event)) | ||
| 1021 | (or n (setq n 1)) | 1059 | (or n (setq n 1)) |
| 1022 | (let* ((date (calendar-gregorian-from-absolute | 1060 | (let* ((date (calendar-gregorian-from-absolute |
| 1023 | (calendar-dayname-on-or-before | 1061 | (calendar-dayname-on-or-before |
| @@ -1033,45 +1071,37 @@ position to use instead of point." | |||
| 1033 | (holiday-in-range d1 d2))) | 1071 | (holiday-in-range d1 d2))) |
| 1034 | (diary-list (if cal-tex-diary | 1072 | (diary-list (if cal-tex-diary |
| 1035 | (cal-tex-list-diary-entries d1 d2)))) | 1073 | (cal-tex-list-diary-entries d1 d2)))) |
| 1036 | (cal-tex-preamble "twoside,12pt") | 1074 | (if filofax |
| 1037 | (cal-tex-cmd "\\usepackage{color}") | 1075 | (progn |
| 1038 | (cal-tex-cmd "\\textwidth 7in") | 1076 | (cal-tex-preamble "twoside") |
| 1039 | (cal-tex-cmd "\\textheight 10.5in") | 1077 | (cal-tex-filofax-paper) |
| 1040 | (cal-tex-cmd "\\oddsidemargin 0in") | 1078 | (insert cal-tex-righthead) |
| 1041 | (cal-tex-cmd "\\evensidemargin 0in") | 1079 | (cal-tex-longday "rightday" "1.85in") |
| 1042 | (cal-tex-cmd "\\topmargin 0pt") | 1080 | (cal-tex-longday "weekend" "0.8in") |
| 1043 | (cal-tex-cmd "\\headheight -0.875in") | 1081 | (insert cal-tex-lefthead) |
| 1044 | (cal-tex-cmd "\\headsep 0.125in") | 1082 | (cal-tex-longday "leftday" "1.85in")) |
| 1045 | (cal-tex-cmd "\\footskip .125in") | 1083 | (cal-tex-preamble "twoside,12pt") |
| 1046 | (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]} | 1084 | (insert "\\textwidth 7in |
| 1047 | \\long\\def\\rightday#1#2#3#4#5{% | 1085 | \\textheight 10.5in |
| 1048 | \\rule{\\textwidth}{0.3pt}\\\\% | 1086 | \\oddsidemargin 0in |
| 1049 | \\hbox to \\textwidth{% | 1087 | \\evensidemargin 0in |
| 1050 | \\vbox to 2.75in{% | 1088 | \\topmargin 0pt |
| 1051 | \\vspace*{2pt}% | 1089 | \\headheight -0.875in |
| 1052 | \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% | 1090 | \\headsep 0.125in |
| 1053 | \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}% | 1091 | \\footskip .125in |
| 1054 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\} | ||
| 1055 | \\long\\def\\weekend#1#2#3#4#5{% | ||
| 1056 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1057 | \\hbox to \\textwidth{% | ||
| 1058 | \\vbox to 1.8in{% | ||
| 1059 | \\vspace*{2pt}% | ||
| 1060 | \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% | ||
| 1061 | \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}% | ||
| 1062 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\} | ||
| 1063 | \\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]} | ||
| 1064 | \\long\\def\\leftday#1#2#3#4#5{% | ||
| 1065 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1066 | \\hbox to \\textwidth{% | ||
| 1067 | \\vbox to 2.75in{% | ||
| 1068 | \\vspace*{2pt}% | ||
| 1069 | \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}% | ||
| 1070 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em \\textcolor{red}{#4}}}% | ||
| 1071 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\} | ||
| 1072 | ") | 1092 | ") |
| 1093 | (insert cal-tex-righthead) | ||
| 1094 | (cal-tex-longday "rightday" "2.75in") | ||
| 1095 | (cal-tex-longday "weekend" "1.8in") | ||
| 1096 | (insert cal-tex-lefthead) | ||
| 1097 | (cal-tex-longday "leftday" "2.75in")) | ||
| 1073 | (cal-tex-b-document) | 1098 | (cal-tex-b-document) |
| 1074 | (cal-tex-cmd "\\pagestyle{empty}\\ ") | 1099 | (cal-tex-cmd "\\pagestyle" "empty") |
| 1100 | ;; Let's assume this is something to with twopage documents. | ||
| 1101 | ;; It has the downside that we start with a blank page. | ||
| 1102 | ;; It doesn't make obvious sense when oddside and evenside margins | ||
| 1103 | ;; are the same (non-filofax), but consider the left and right | ||
| 1104 | ;; versions of various functions as applicable to even and odd pages. | ||
| 1075 | (cal-tex-newpage) | 1105 | (cal-tex-newpage) |
| 1076 | (dotimes (i n) | 1106 | (dotimes (i n) |
| 1077 | (insert "\\lefthead") | 1107 | (insert "\\lefthead") |
| @@ -1104,34 +1134,35 @@ position to use instead of point." | |||
| 1104 | (insert "%\n") | 1134 | (insert "%\n") |
| 1105 | (setq date (cal-tex-incr-date date))) | 1135 | (setq date (cal-tex-incr-date date))) |
| 1106 | (insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n") | 1136 | (insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n") |
| 1107 | (cal-tex-nl) | 1137 | (unless filofax |
| 1108 | (insert (cal-tex-mini-calendar | 1138 | (cal-tex-nl) |
| 1109 | (calendar-extract-month (cal-tex-previous-month date)) | 1139 | (insert (cal-tex-mini-calendar |
| 1110 | (calendar-extract-year (cal-tex-previous-month date)) | 1140 | (calendar-extract-month (cal-tex-previous-month date)) |
| 1111 | "lastmonth" "1.1in" "1in")) | 1141 | (calendar-extract-year (cal-tex-previous-month date)) |
| 1112 | (insert (cal-tex-mini-calendar | 1142 | "lastmonth" "1.1in" "1in")) |
| 1113 | (calendar-extract-month date) | 1143 | (insert (cal-tex-mini-calendar |
| 1114 | (calendar-extract-year date) | 1144 | (calendar-extract-month date) |
| 1115 | "thismonth" "1.1in" "1in")) | 1145 | (calendar-extract-year date) |
| 1116 | (insert (cal-tex-mini-calendar | 1146 | "thismonth" "1.1in" "1in")) |
| 1117 | (calendar-extract-month (cal-tex-next-month date)) | 1147 | (insert (cal-tex-mini-calendar |
| 1118 | (calendar-extract-year (cal-tex-next-month date)) | 1148 | (calendar-extract-month (cal-tex-next-month date)) |
| 1119 | "nextmonth" "1.1in" "1in")) | 1149 | (calendar-extract-year (cal-tex-next-month date)) |
| 1120 | (insert "\\hbox to \\textwidth{") | 1150 | "nextmonth" "1.1in" "1in")) |
| 1121 | (cal-tex-hfill) | 1151 | (insert "\\hbox to \\textwidth{") |
| 1122 | (insert "\\lastmonth") | 1152 | (cal-tex-hfill) |
| 1123 | (cal-tex-hfill) | 1153 | (insert "\\lastmonth") |
| 1124 | (insert "\\thismonth") | 1154 | (cal-tex-hfill) |
| 1125 | (cal-tex-hfill) | 1155 | (insert "\\thismonth") |
| 1126 | (insert "\\nextmonth") | 1156 | (cal-tex-hfill) |
| 1127 | (cal-tex-hfill) | 1157 | (insert "\\nextmonth") |
| 1128 | (insert "}") | 1158 | (cal-tex-hfill) |
| 1159 | (insert "}")) | ||
| 1129 | (cal-tex-newpage) | 1160 | (cal-tex-newpage) |
| 1130 | (insert "\\righthead") | 1161 | (insert "\\righthead") |
| 1131 | (cal-tex-arg | 1162 | (cal-tex-arg |
| 1132 | (let ((d (cal-tex-incr-date date 3))) | 1163 | (let ((d (cal-tex-incr-date date 3))) |
| 1133 | (if (= (calendar-extract-month date) | 1164 | (if (= (calendar-extract-month date) |
| 1134 | (calendar-extract-month d)) | 1165 | (calendar-extract-month d)) |
| 1135 | (format "%s %s" | 1166 | (format "%s %s" |
| 1136 | (cal-tex-month-name (calendar-extract-month date)) | 1167 | (cal-tex-month-name (calendar-extract-month date)) |
| 1137 | (calendar-extract-year date)) | 1168 | (calendar-extract-year date)) |
| @@ -1172,6 +1203,18 @@ position to use instead of point." | |||
| 1172 | (run-hooks 'cal-tex-hook))) | 1203 | (run-hooks 'cal-tex-hook))) |
| 1173 | 1204 | ||
| 1174 | ;;;###cal-autoload | 1205 | ;;;###cal-autoload |
| 1206 | (defun cal-tex-cursor-week-at-a-glance (&optional n event) | ||
| 1207 | "One-week-at-a-glance full page calendar for week indicated by cursor. | ||
| 1208 | Optional prefix argument N specifies number of weeks (default 1), | ||
| 1209 | starting on Mondays. The calendar shows holiday and diary entries | ||
| 1210 | if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil. | ||
| 1211 | It does not show hours of the day. Optional EVENT indicates a buffer | ||
| 1212 | position to use instead of point." | ||
| 1213 | (interactive (list (prefix-numeric-value current-prefix-arg) | ||
| 1214 | last-nonmenu-event)) | ||
| 1215 | (cal-tex-weekly-common n event)) | ||
| 1216 | |||
| 1217 | ;;;###cal-autoload | ||
| 1175 | (defun cal-tex-cursor-filofax-2week (&optional n event) | 1218 | (defun cal-tex-cursor-filofax-2week (&optional n event) |
| 1176 | "Two-weeks-at-a-glance Filofax style calendar for week cursor is in. | 1219 | "Two-weeks-at-a-glance Filofax style calendar for week cursor is in. |
| 1177 | Optional prefix argument N specifies number of weeks (default 1). | 1220 | Optional prefix argument N specifies number of weeks (default 1). |
| @@ -1194,40 +1237,15 @@ Optional EVENT indicates a buffer position to use instead of point." | |||
| 1194 | (holidays (if cal-tex-holidays | 1237 | (holidays (if cal-tex-holidays |
| 1195 | (holiday-in-range d1 d2))) | 1238 | (holiday-in-range d1 d2))) |
| 1196 | (diary-list (if cal-tex-diary | 1239 | (diary-list (if cal-tex-diary |
| 1197 | (cal-tex-list-diary-entries | 1240 | (cal-tex-list-diary-entries d1 d2)))) |
| 1198 | ;; FIXME d1? | ||
| 1199 | (calendar-absolute-from-gregorian (list month 1 year)) | ||
| 1200 | d2)))) | ||
| 1201 | (cal-tex-preamble "twoside") | 1241 | (cal-tex-preamble "twoside") |
| 1202 | (cal-tex-cmd "\\textwidth 3.25in") | 1242 | (cal-tex-filofax-paper) |
| 1203 | (cal-tex-cmd "\\textheight 6.5in") | 1243 | (insert cal-tex-righthead) |
| 1204 | (cal-tex-cmd "\\oddsidemargin 1.75in") | 1244 | (cal-tex-longday "rightday" "0.7in") |
| 1205 | (cal-tex-cmd "\\evensidemargin 1.5in") | 1245 | (insert cal-tex-lefthead) |
| 1206 | (cal-tex-cmd "\\topmargin 0pt") | 1246 | (cal-tex-longday "leftday" "0.7in") |
| 1207 | (cal-tex-cmd "\\headheight -0.875in") | ||
| 1208 | (cal-tex-cmd "\\headsep 0.125in") | ||
| 1209 | (cal-tex-cmd "\\footskip .125in") | ||
| 1210 | (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]} | ||
| 1211 | \\long\\def\\rightday#1#2#3#4#5{% | ||
| 1212 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1213 | \\hbox to \\textwidth{% | ||
| 1214 | \\vbox to 0.7in{% | ||
| 1215 | \\vspace*{2pt}% | ||
| 1216 | \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% | ||
| 1217 | \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}% | ||
| 1218 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\} | ||
| 1219 | \\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]} | ||
| 1220 | \\long\\def\\leftday#1#2#3#4#5{% | ||
| 1221 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1222 | \\hbox to \\textwidth{% | ||
| 1223 | \\vbox to 0.7in{% | ||
| 1224 | \\vspace*{2pt}% | ||
| 1225 | \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}% | ||
| 1226 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}% | ||
| 1227 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\} | ||
| 1228 | ") | ||
| 1229 | (cal-tex-b-document) | 1247 | (cal-tex-b-document) |
| 1230 | (cal-tex-cmd "\\pagestyle{empty}") | 1248 | (cal-tex-cmd "\\pagestyle" "empty") |
| 1231 | (dotimes (i n) | 1249 | (dotimes (i n) |
| 1232 | (if (zerop (mod i 2)) | 1250 | (if (zerop (mod i 2)) |
| 1233 | (insert "\\righthead") | 1251 | (insert "\\righthead") |
| @@ -1277,138 +1295,7 @@ if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil. | |||
| 1277 | Optional EVENT indicates a buffer position to use instead of point." | 1295 | Optional EVENT indicates a buffer position to use instead of point." |
| 1278 | (interactive (list (prefix-numeric-value current-prefix-arg) | 1296 | (interactive (list (prefix-numeric-value current-prefix-arg) |
| 1279 | last-nonmenu-event)) | 1297 | last-nonmenu-event)) |
| 1280 | (or n (setq n 1)) | 1298 | (cal-tex-weekly-common n event t)) |
| 1281 | (let* ((date (calendar-gregorian-from-absolute | ||
| 1282 | (calendar-dayname-on-or-before | ||
| 1283 | 1 | ||
| 1284 | (calendar-absolute-from-gregorian | ||
| 1285 | (calendar-cursor-to-date t event))))) | ||
| 1286 | (month (calendar-extract-month date)) | ||
| 1287 | (year (calendar-extract-year date)) | ||
| 1288 | (day (calendar-extract-day date)) | ||
| 1289 | (d1 (calendar-absolute-from-gregorian date)) | ||
| 1290 | (d2 (+ (* 7 n) d1)) | ||
| 1291 | (holidays (if cal-tex-holidays | ||
| 1292 | (holiday-in-range d1 d2))) | ||
| 1293 | (diary-list (if cal-tex-diary | ||
| 1294 | (cal-tex-list-diary-entries | ||
| 1295 | ;; FIXME d1? | ||
| 1296 | (calendar-absolute-from-gregorian (list month 1 year)) | ||
| 1297 | d2)))) | ||
| 1298 | (cal-tex-preamble "twoside") | ||
| 1299 | (cal-tex-cmd "\\textwidth 3.25in") | ||
| 1300 | (cal-tex-cmd "\\textheight 6.5in") | ||
| 1301 | (cal-tex-cmd "\\oddsidemargin 1.75in") | ||
| 1302 | (cal-tex-cmd "\\evensidemargin 1.5in") | ||
| 1303 | (cal-tex-cmd "\\topmargin 0pt") | ||
| 1304 | (cal-tex-cmd "\\headheight -0.875in") | ||
| 1305 | (cal-tex-cmd "\\headsep 0.125in") | ||
| 1306 | (cal-tex-cmd "\\footskip .125in") | ||
| 1307 | (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]} | ||
| 1308 | \\long\\def\\rightday#1#2#3#4#5{% | ||
| 1309 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1310 | \\hbox to \\textwidth{% | ||
| 1311 | \\vbox to 1.85in{% | ||
| 1312 | \\vspace*{2pt}% | ||
| 1313 | \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% | ||
| 1314 | \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}% | ||
| 1315 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\} | ||
| 1316 | \\long\\def\\weekend#1#2#3#4#5{% | ||
| 1317 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1318 | \\hbox to \\textwidth{% | ||
| 1319 | \\vbox to .8in{% | ||
| 1320 | \\vspace*{2pt}% | ||
| 1321 | \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}% | ||
| 1322 | \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}% | ||
| 1323 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\} | ||
| 1324 | \\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]} | ||
| 1325 | \\long\\def\\leftday#1#2#3#4#5{% | ||
| 1326 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1327 | \\hbox to \\textwidth{% | ||
| 1328 | \\vbox to 1.85in{% | ||
| 1329 | \\vspace*{2pt}% | ||
| 1330 | \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}% | ||
| 1331 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}% | ||
| 1332 | \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\} | ||
| 1333 | ") | ||
| 1334 | (cal-tex-b-document) | ||
| 1335 | (cal-tex-cmd "\\pagestyle{empty}\\ ") | ||
| 1336 | (cal-tex-newpage) | ||
| 1337 | (dotimes (i n) | ||
| 1338 | (insert "\\lefthead") | ||
| 1339 | (cal-tex-arg | ||
| 1340 | (let ((d (cal-tex-incr-date date 2))) | ||
| 1341 | (if (= (calendar-extract-month date) | ||
| 1342 | (calendar-extract-month d)) | ||
| 1343 | (format "%s %s" | ||
| 1344 | (cal-tex-month-name (calendar-extract-month date)) | ||
| 1345 | (calendar-extract-year date)) | ||
| 1346 | (if (= (calendar-extract-year date) | ||
| 1347 | (calendar-extract-year d)) | ||
| 1348 | (format "%s---%s %s" | ||
| 1349 | (cal-tex-month-name (calendar-extract-month date)) | ||
| 1350 | (cal-tex-month-name (calendar-extract-month d)) | ||
| 1351 | (calendar-extract-year date)) | ||
| 1352 | (format "%s %s---%s %s" | ||
| 1353 | (cal-tex-month-name (calendar-extract-month date)) | ||
| 1354 | (calendar-extract-year date) | ||
| 1355 | (cal-tex-month-name (calendar-extract-month d)) | ||
| 1356 | (calendar-extract-year d)))))) | ||
| 1357 | (insert "%\n") | ||
| 1358 | (dotimes (_jdummy 3) | ||
| 1359 | (insert "\\leftday") | ||
| 1360 | (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) | ||
| 1361 | (cal-tex-arg (number-to-string (calendar-extract-day date))) | ||
| 1362 | (cal-tex-arg (cal-tex-latexify-list diary-list date)) | ||
| 1363 | (cal-tex-arg (cal-tex-latexify-list holidays date)) | ||
| 1364 | (cal-tex-arg (eval cal-tex-daily-string)) | ||
| 1365 | (insert "%\n") | ||
| 1366 | (setq date (cal-tex-incr-date date))) | ||
| 1367 | (insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n") | ||
| 1368 | (cal-tex-newpage) | ||
| 1369 | (insert "\\righthead") | ||
| 1370 | (cal-tex-arg | ||
| 1371 | (let ((d (cal-tex-incr-date date 3))) | ||
| 1372 | (if (= (calendar-extract-month date) | ||
| 1373 | (calendar-extract-month d)) | ||
| 1374 | (format "%s %s" | ||
| 1375 | (cal-tex-month-name (calendar-extract-month date)) | ||
| 1376 | (calendar-extract-year date)) | ||
| 1377 | (if (= (calendar-extract-year date) | ||
| 1378 | (calendar-extract-year d)) | ||
| 1379 | (format "%s---%s %s" | ||
| 1380 | (cal-tex-month-name (calendar-extract-month date)) | ||
| 1381 | (cal-tex-month-name (calendar-extract-month d)) | ||
| 1382 | (calendar-extract-year date)) | ||
| 1383 | (format "%s %s---%s %s" | ||
| 1384 | (cal-tex-month-name (calendar-extract-month date)) | ||
| 1385 | (calendar-extract-year date) | ||
| 1386 | (cal-tex-month-name (calendar-extract-month d)) | ||
| 1387 | (calendar-extract-year d)))))) | ||
| 1388 | (insert "%\n") | ||
| 1389 | (dotimes (_jdummy 2) | ||
| 1390 | (insert "\\rightday") | ||
| 1391 | (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) | ||
| 1392 | (cal-tex-arg (number-to-string (calendar-extract-day date))) | ||
| 1393 | (cal-tex-arg (cal-tex-latexify-list diary-list date)) | ||
| 1394 | (cal-tex-arg (cal-tex-latexify-list holidays date)) | ||
| 1395 | (cal-tex-arg (eval cal-tex-daily-string)) | ||
| 1396 | (insert "%\n") | ||
| 1397 | (setq date (cal-tex-incr-date date))) | ||
| 1398 | (dotimes (_jdummy 2) | ||
| 1399 | (insert "\\weekend") | ||
| 1400 | (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) | ||
| 1401 | (cal-tex-arg (number-to-string (calendar-extract-day date))) | ||
| 1402 | (cal-tex-arg (cal-tex-latexify-list diary-list date)) | ||
| 1403 | (cal-tex-arg (cal-tex-latexify-list holidays date)) | ||
| 1404 | (cal-tex-arg (eval cal-tex-daily-string)) | ||
| 1405 | (insert "%\n") | ||
| 1406 | (setq date (cal-tex-incr-date date))) | ||
| 1407 | (unless (= i (1- n)) | ||
| 1408 | (run-hooks 'cal-tex-week-hook) | ||
| 1409 | (cal-tex-newpage))) | ||
| 1410 | (cal-tex-end-document) | ||
| 1411 | (run-hooks 'cal-tex-hook))) | ||
| 1412 | 1299 | ||
| 1413 | ;;;###cal-autoload | 1300 | ;;;###cal-autoload |
| 1414 | (defun cal-tex-cursor-filofax-daily (&optional n event) | 1301 | (defun cal-tex-cursor-filofax-daily (&optional n event) |
| @@ -1434,52 +1321,21 @@ Optional EVENT indicates a buffer position to use instead of point." | |||
| 1434 | (holidays (if cal-tex-holidays | 1321 | (holidays (if cal-tex-holidays |
| 1435 | (holiday-in-range d1 d2))) | 1322 | (holiday-in-range d1 d2))) |
| 1436 | (diary-list (if cal-tex-diary | 1323 | (diary-list (if cal-tex-diary |
| 1437 | (cal-tex-list-diary-entries | 1324 | (cal-tex-list-diary-entries d1 d2)))) |
| 1438 | ;; FIXME d1? | ||
| 1439 | (calendar-absolute-from-gregorian (list month 1 year)) | ||
| 1440 | d2)))) | ||
| 1441 | (cal-tex-preamble "twoside") | 1325 | (cal-tex-preamble "twoside") |
| 1442 | (cal-tex-cmd "\\textwidth 3.25in") | 1326 | (cal-tex-filofax-paper) |
| 1443 | (cal-tex-cmd "\\textheight 6.5in") | 1327 | (insert cal-tex-righthead) |
| 1444 | (cal-tex-cmd "\\oddsidemargin 1.75in") | 1328 | (cal-tex-shortday "rightday") |
| 1445 | (cal-tex-cmd "\\evensidemargin 1.5in") | 1329 | (cal-tex-shortday "weekend") |
| 1446 | (cal-tex-cmd "\\topmargin 0pt") | 1330 | (insert cal-tex-lefthead) |
| 1447 | (cal-tex-cmd "\\headheight -0.875in") | 1331 | (cal-tex-shortday "leftday") |
| 1448 | (cal-tex-cmd "\\headsep 0.125in") | 1332 | (insert "\\newbox\\LineBox |
| 1449 | (cal-tex-cmd "\\footskip .125in") | ||
| 1450 | (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]} | ||
| 1451 | \\long\\def\\rightday#1#2#3{% | ||
| 1452 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1453 | \\hbox to \\textwidth{% | ||
| 1454 | \\vbox {% | ||
| 1455 | \\vspace*{2pt}% | ||
| 1456 | \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}% | ||
| 1457 | \\hbox to \\textwidth{\\vbox {\\raggedleft \\em #2}}% | ||
| 1458 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}} | ||
| 1459 | \\long\\def\\weekend#1#2#3{% | ||
| 1460 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1461 | \\hbox to \\textwidth{% | ||
| 1462 | \\vbox {% | ||
| 1463 | \\vspace*{2pt}% | ||
| 1464 | \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}% | ||
| 1465 | \\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}% | ||
| 1466 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}} | ||
| 1467 | \\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]} | ||
| 1468 | \\long\\def\\leftday#1#2#3{% | ||
| 1469 | \\rule{\\textwidth}{0.3pt}\\\\% | ||
| 1470 | \\hbox to \\textwidth{% | ||
| 1471 | \\vbox {% | ||
| 1472 | \\vspace*{2pt}% | ||
| 1473 | \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}% | ||
| 1474 | \\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}% | ||
| 1475 | \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}} | ||
| 1476 | \\newbox\\LineBox | ||
| 1477 | \\setbox\\LineBox=\\hbox to\\textwidth{% | 1333 | \\setbox\\LineBox=\\hbox to\\textwidth{% |
| 1478 | \\vrule height.2in width0pt\\leaders\\hrule\\hfill} | 1334 | \\vrule height.2in width0pt\\leaders\\hrule\\hfill} |
| 1479 | \\def\\linesfill{\\par\\leaders\\copy\\LineBox\\vfill} | 1335 | \\def\\linesfill{\\par\\leaders\\copy\\LineBox\\vfill} |
| 1480 | ") | 1336 | ") |
| 1481 | (cal-tex-b-document) | 1337 | (cal-tex-b-document) |
| 1482 | (cal-tex-cmd "\\pagestyle{empty}") | 1338 | (cal-tex-cmd "\\pagestyle" "empty") |
| 1483 | (dotimes (i n) | 1339 | (dotimes (i n) |
| 1484 | (dotimes (j 4) | 1340 | (dotimes (j 4) |
| 1485 | (let ((even (zerop (% j 2)))) | 1341 | (let ((even (zerop (% j 2)))) |
| @@ -1539,10 +1395,9 @@ a buffer position to use instead of point." | |||
| 1539 | (let ((date (calendar-absolute-from-gregorian | 1395 | (let ((date (calendar-absolute-from-gregorian |
| 1540 | (calendar-cursor-to-date t event)))) | 1396 | (calendar-cursor-to-date t event)))) |
| 1541 | (cal-tex-preamble "12pt") | 1397 | (cal-tex-preamble "12pt") |
| 1542 | (cal-tex-cmd "\\textwidth 6.5in") | 1398 | (cal-tex-weekly-paper 'nomargins) |
| 1543 | (cal-tex-cmd "\\textheight 10.5in") | ||
| 1544 | (cal-tex-b-document) | 1399 | (cal-tex-b-document) |
| 1545 | (cal-tex-cmd "\\pagestyle{empty}") | 1400 | (cal-tex-cmd "\\pagestyle" "empty") |
| 1546 | (dotimes (i n) | 1401 | (dotimes (i n) |
| 1547 | (cal-tex-vspace "-1.7in") | 1402 | (cal-tex-vspace "-1.7in") |
| 1548 | (cal-tex-daily-page (calendar-gregorian-from-absolute date)) | 1403 | (cal-tex-daily-page (calendar-gregorian-from-absolute date)) |
| @@ -1736,7 +1591,7 @@ informative header, and run HOOK." | |||
| 1736 | ;; FIXME latin1 might not always be right. | 1591 | ;; FIXME latin1 might not always be right. |
| 1737 | (insert "\\usepackage[latin1]{inputenc}\n")))) | 1592 | (insert "\\usepackage[latin1]{inputenc}\n")))) |
| 1738 | (latex-mode) | 1593 | (latex-mode) |
| 1739 | (pop-to-buffer cal-tex-buffer) | 1594 | (pop-to-buffer (current-buffer)) |
| 1740 | (goto-char (point-min)) | 1595 | (goto-char (point-min)) |
| 1741 | ;; FIXME auctex equivalents? | 1596 | ;; FIXME auctex equivalents? |
| 1742 | (cal-tex-comment | 1597 | (cal-tex-comment |
| @@ -1761,16 +1616,16 @@ non-nil, means add to end of buffer without erasing current contents." | |||
| 1761 | (if (not landscape) | 1616 | (if (not landscape) |
| 1762 | (progn | 1617 | (progn |
| 1763 | (cal-tex-cmd "\\oddsidemargin -1.75cm") | 1618 | (cal-tex-cmd "\\oddsidemargin -1.75cm") |
| 1764 | (cal-tex-cmd "\\def\\holidaymult{.06}")) | 1619 | (cal-tex-cmd "\\def\\holidaymult" ".06")) |
| 1765 | (cal-tex-cmd "\\special{landscape}") | 1620 | (cal-tex-cmd "\\special" "landscape") |
| 1766 | (cal-tex-cmd "\\textwidth 9.5in") | 1621 | (cal-tex-cmd "\\textwidth 9.5in") |
| 1767 | (cal-tex-cmd "\\textheight 7in") | 1622 | (cal-tex-cmd "\\textheight 7in") |
| 1768 | (cal-tex-comment) | 1623 | (cal-tex-comment) |
| 1769 | (cal-tex-cmd "\\def\\holidaymult{.08}")) | 1624 | (cal-tex-cmd "\\def\\holidaymult" ".08")) |
| 1770 | (cal-tex-cmd cal-tex-caldate) | 1625 | (cal-tex-cmd cal-tex-caldate) |
| 1771 | (cal-tex-cmd cal-tex-myday) | 1626 | (cal-tex-cmd cal-tex-myday) |
| 1772 | (cal-tex-b-document) | 1627 | (cal-tex-b-document) |
| 1773 | (cal-tex-cmd "\\pagestyle{empty}")) | 1628 | (cal-tex-cmd "\\pagestyle" "empty")) |
| 1774 | (cal-tex-cmd "\\setlength{\\cellwidth}" width) | 1629 | (cal-tex-cmd "\\setlength{\\cellwidth}" width) |
| 1775 | (insert (format "\\setlength{\\cellwidth}{%f\\cellwidth}\n" | 1630 | (insert (format "\\setlength{\\cellwidth}{%f\\cellwidth}\n" |
| 1776 | (/ 1.1 (length cal-tex-which-days)))) | 1631 | (/ 1.1 (length cal-tex-which-days)))) |
| @@ -1833,13 +1688,11 @@ non-nil, means add to end of buffer without erasing current contents." | |||
| 1833 | 1688 | ||
| 1834 | (defun cal-tex-vspace (space) | 1689 | (defun cal-tex-vspace (space) |
| 1835 | "Insert vspace command to move SPACE vertically." | 1690 | "Insert vspace command to move SPACE vertically." |
| 1836 | (insert "\\vspace*{" space "}") | 1691 | (cal-tex-cmd "\\vspace*" space)) |
| 1837 | (cal-tex-comment)) | ||
| 1838 | 1692 | ||
| 1839 | (defun cal-tex-hspace (space) | 1693 | (defun cal-tex-hspace (space) |
| 1840 | "Insert hspace command to move SPACE horizontally." | 1694 | "Insert hspace command to move SPACE horizontally." |
| 1841 | (insert "\\hspace*{" space "}") | 1695 | (cal-tex-cmd "\\hspace*" space)) |
| 1842 | (cal-tex-comment)) | ||
| 1843 | 1696 | ||
| 1844 | (defun cal-tex-comment (&optional comment) | 1697 | (defun cal-tex-comment (&optional comment) |
| 1845 | "Insert `% ', followed by optional string COMMENT, followed by newline. | 1698 | "Insert `% ', followed by optional string COMMENT, followed by newline. |
| @@ -1878,20 +1731,20 @@ Add trailing COMMENT if present." | |||
| 1878 | 1731 | ||
| 1879 | (defun cal-tex-b-document () | 1732 | (defun cal-tex-b-document () |
| 1880 | "Insert beginning of document." | 1733 | "Insert beginning of document." |
| 1881 | (cal-tex-cmd "\\begin{document}")) | 1734 | (cal-tex-cmd "\\begin" "document")) |
| 1882 | 1735 | ||
| 1883 | (defun cal-tex-e-document () | 1736 | (defun cal-tex-e-document () |
| 1884 | "Insert end of document." | 1737 | "Insert end of document." |
| 1885 | (cal-tex-cmd "\\end{document}")) | 1738 | (cal-tex-cmd "\\end" "document")) |
| 1886 | 1739 | ||
| 1887 | (defun cal-tex-b-center () | 1740 | (defun cal-tex-b-center () |
| 1888 | "Insert beginning of centered block." | 1741 | "Insert beginning of centered block." |
| 1889 | (cal-tex-cmd "\\begin{center}")) | 1742 | (cal-tex-cmd "\\begin" "center")) |
| 1890 | 1743 | ||
| 1891 | (defun cal-tex-e-center () | 1744 | (defun cal-tex-e-center () |
| 1892 | "Insert end of centered block." | 1745 | "Insert end of centered block." |
| 1893 | (cal-tex-comment) | 1746 | (cal-tex-comment) |
| 1894 | (cal-tex-cmd "\\end{center}")) | 1747 | (cal-tex-cmd "\\end" "center")) |
| 1895 | 1748 | ||
| 1896 | 1749 | ||
| 1897 | ;;; | 1750 | ;;; |
| @@ -1946,35 +1799,35 @@ Add trailing COMMENT if present." | |||
| 1946 | 1799 | ||
| 1947 | (defun cal-tex-em (string) | 1800 | (defun cal-tex-em (string) |
| 1948 | "Insert STRING in italic font." | 1801 | "Insert STRING in italic font." |
| 1949 | (insert "\\textit{" string "}")) | 1802 | (cal-tex-cmd "\\textit" string)) |
| 1950 | 1803 | ||
| 1951 | (defun cal-tex-bf (string) | 1804 | (defun cal-tex-bf (string) |
| 1952 | "Insert STRING in bf font." | 1805 | "Insert STRING in bf font." |
| 1953 | (insert "\\textbf{ " string "}")) | 1806 | (cal-tex-cmd "\\textbf" string)) |
| 1954 | 1807 | ||
| 1955 | (defun cal-tex-scriptsize (string) | 1808 | (defun cal-tex-scriptsize (string) |
| 1956 | "Insert STRING in scriptsize font." | 1809 | "Insert STRING in scriptsize font." |
| 1957 | (insert "{\\scriptsize " string "}")) | 1810 | (cal-tex-arg (concat "\\scriptsize " string))) |
| 1958 | 1811 | ||
| 1959 | (defun cal-tex-huge (string) | 1812 | (defun cal-tex-huge (string) |
| 1960 | "Insert STRING in huge font." | 1813 | "Insert STRING in huge font." |
| 1961 | (insert "{\\huge " string "}")) | 1814 | (cal-tex-arg (concat "\\huge " string))) |
| 1962 | 1815 | ||
| 1963 | (defun cal-tex-Huge (string) | 1816 | (defun cal-tex-Huge (string) |
| 1964 | "Insert STRING in Huge font." | 1817 | "Insert STRING in Huge font." |
| 1965 | (insert "{\\Huge " string "}")) | 1818 | (cal-tex-arg (concat "\\Huge " string))) |
| 1966 | 1819 | ||
| 1967 | (defun cal-tex-Huge-bf (string) | 1820 | (defun cal-tex-Huge-bf (string) |
| 1968 | "Insert STRING in Huge bf font." | 1821 | "Insert STRING in Huge bf font." |
| 1969 | (insert "\\textbf{\\Huge " string "}")) | 1822 | (cal-tex-cmd "\\textbf" (concat "\\Huge " string))) |
| 1970 | 1823 | ||
| 1971 | (defun cal-tex-large (string) | 1824 | (defun cal-tex-large (string) |
| 1972 | "Insert STRING in large font." | 1825 | "Insert STRING in large font." |
| 1973 | (insert "{\\large " string "}")) | 1826 | (cal-tex-arg (concat "\\large " string))) |
| 1974 | 1827 | ||
| 1975 | (defun cal-tex-large-bf (string) | 1828 | (defun cal-tex-large-bf (string) |
| 1976 | "Insert STRING in large bf font." | 1829 | "Insert STRING in large bf font." |
| 1977 | (insert "\\textbf{\\large " string "}")) | 1830 | (cal-tex-cmd "\\textbf" (concat "\\large " string))) |
| 1978 | 1831 | ||
| 1979 | 1832 | ||
| 1980 | (provide 'cal-tex) | 1833 | (provide 'cal-tex) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 2e073fd1267..8fa5b0ddb07 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -951,12 +951,12 @@ This is recursive; that is, included files may include other files." | |||
| 951 | (setq diary-entries-list | 951 | (setq diary-entries-list |
| 952 | (append diary-entries-list | 952 | (append diary-entries-list |
| 953 | (diary-list-entries original-date number t))))) | 953 | (diary-list-entries original-date number t))))) |
| 954 | (beep) | 954 | (display-warning |
| 955 | (message "Can't read included diary file %s" diary-file) | 955 | :error |
| 956 | (sleep-for 2)) | 956 | (format "Can't read included diary file %s\n" diary-file))) |
| 957 | (beep) | 957 | (display-warning |
| 958 | (message "Can't find included diary file %s" diary-file) | 958 | :error |
| 959 | (sleep-for 2)))) | 959 | (format "Can't find included diary file %s\n" diary-file))))) |
| 960 | (goto-char (point-min))) | 960 | (goto-char (point-min))) |
| 961 | 961 | ||
| 962 | (defun diary-include-other-diary-files () | 962 | (defun diary-include-other-diary-files () |
| @@ -1456,14 +1456,17 @@ marks. This is intended to deal with deleted diary entries." | |||
| 1456 | (let ((result (if calendar-debug-sexp | 1456 | (let ((result (if calendar-debug-sexp |
| 1457 | (let ((debug-on-error t)) | 1457 | (let ((debug-on-error t)) |
| 1458 | (eval (car (read-from-string sexp)))) | 1458 | (eval (car (read-from-string sexp)))) |
| 1459 | (condition-case nil | 1459 | (let (err) |
| 1460 | (eval (car (read-from-string sexp))) | 1460 | (condition-case err |
| 1461 | (error | 1461 | (eval (car (read-from-string sexp))) |
| 1462 | (beep) | 1462 | (error |
| 1463 | (message "Bad sexp at line %d in %s: %s" | 1463 | (display-warning |
| 1464 | (count-lines (point-min) (point)) | 1464 | :error |
| 1465 | diary-file sexp) | 1465 | (format "Bad diary sexp at line %d in %s:\n%s\n\ |
| 1466 | (sleep-for 2)))))) | 1466 | Error: %s\n" |
| 1467 | (count-lines (point-min) (point)) | ||
| 1468 | diary-file sexp err)) | ||
| 1469 | nil)))))) | ||
| 1467 | (cond ((stringp result) result) | 1470 | (cond ((stringp result) result) |
| 1468 | ((and (consp result) | 1471 | ((and (consp result) |
| 1469 | (stringp (cdr result))) result) | 1472 | (stringp (cdr result))) result) |
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 0bb3c231840..043d402f612 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el | |||
| @@ -458,17 +458,20 @@ with descriptive strings such as | |||
| 458 | (defun calendar-holiday-list () | 458 | (defun calendar-holiday-list () |
| 459 | "Form the list of holidays that occur on dates in the calendar window. | 459 | "Form the list of holidays that occur on dates in the calendar window. |
| 460 | The holidays are those in the list `calendar-holidays'." | 460 | The holidays are those in the list `calendar-holidays'." |
| 461 | (let (res h) | 461 | (let (res h err) |
| 462 | (sort | 462 | (sort |
| 463 | (dolist (p calendar-holidays res) | 463 | (dolist (p calendar-holidays res) |
| 464 | (if (setq h (if calendar-debug-sexp | 464 | (if (setq h (if calendar-debug-sexp |
| 465 | (let ((debug-on-error t)) | 465 | (let ((debug-on-error t)) |
| 466 | (eval p)) | 466 | (eval p)) |
| 467 | (condition-case nil | 467 | (condition-case err |
| 468 | (eval p) | 468 | (eval p) |
| 469 | (error (beep) | 469 | (error |
| 470 | (message "Bad holiday list item: %s" p) | 470 | (display-warning |
| 471 | (sleep-for 2))))) | 471 | :error |
| 472 | (format "Bad holiday list item: %s\nError: %s\n" | ||
| 473 | p err)) | ||
| 474 | nil)))) | ||
| 472 | (setq res (append h res)))) | 475 | (setq res (append h res)))) |
| 473 | 'calendar-date-compare))) | 476 | 'calendar-date-compare))) |
| 474 | 477 | ||
diff --git a/lisp/cus-face.el b/lisp/cus-face.el index 3680a2648ce..06fd10149d3 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el | |||
| @@ -136,12 +136,36 @@ | |||
| 136 | :help-echo "Control text underlining." | 136 | :help-echo "Control text underlining." |
| 137 | (const :tag "Off" nil) | 137 | (const :tag "Off" nil) |
| 138 | (list :tag "On" | 138 | (list :tag "On" |
| 139 | :value (:color foreground-color :style line) | ||
| 139 | (const :format "" :value :color) | 140 | (const :format "" :value :color) |
| 140 | (choice :tag "Color" (const :tag "Foreground Color" foreground-color) color) | 141 | (choice :tag "Color" |
| 141 | (const :format "" :value :style) | 142 | (const :tag "Foreground Color" foreground-color) |
| 142 | (choice :tag "Style" | 143 | color) |
| 143 | (const :tag "Line" line) | 144 | (const :format "" :value :style) |
| 144 | (const :tag "Wave" wave))))) | 145 | (choice :tag "Style" |
| 146 | (const :tag "Line" line) | ||
| 147 | (const :tag "Wave" wave)))) | ||
| 148 | ;; filter to make value suitable for customize | ||
| 149 | (lambda (real-value) | ||
| 150 | (and real-value | ||
| 151 | (let ((color | ||
| 152 | (or (and (consp real-value) (plist-get real-value :color)) | ||
| 153 | (and (stringp real-value) real-value) | ||
| 154 | 'foreground-color)) | ||
| 155 | (style | ||
| 156 | (or (and (consp real-value) (plist-get real-value :style)) | ||
| 157 | 'line))) | ||
| 158 | (list :color color :style style)))) | ||
| 159 | ;; filter to make customized-value suitable for storing | ||
| 160 | (lambda (cus-value) | ||
| 161 | (and cus-value | ||
| 162 | (let ((color (plist-get cus-value :color)) | ||
| 163 | (style (plist-get cus-value :style))) | ||
| 164 | (cond ((eq style 'line) | ||
| 165 | ;; Use simple value for default style | ||
| 166 | (if (eq color 'foreground-color) t color)) | ||
| 167 | (t | ||
| 168 | `(:color ,color :style ,style))))))) | ||
| 145 | 169 | ||
| 146 | (:overline | 170 | (:overline |
| 147 | (choice :tag "Overline" | 171 | (choice :tag "Overline" |
diff --git a/lisp/dired.el b/lisp/dired.el index 6684be3356c..cd27b6b6404 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1331,16 +1331,16 @@ DIRED-FILENAME WINDOW-POINT)." | |||
| 1331 | "Mark all files remembered in ALIST. | 1331 | "Mark all files remembered in ALIST. |
| 1332 | Each element of ALIST looks like (FILE . MARKERCHAR)." | 1332 | Each element of ALIST looks like (FILE . MARKERCHAR)." |
| 1333 | (let (elt fil chr) | 1333 | (let (elt fil chr) |
| 1334 | (while alist | 1334 | (save-excursion |
| 1335 | (setq elt (car alist) | 1335 | (while alist |
| 1336 | alist (cdr alist) | 1336 | (setq elt (car alist) |
| 1337 | fil (car elt) | 1337 | alist (cdr alist) |
| 1338 | chr (cdr elt)) | 1338 | fil (car elt) |
| 1339 | (if (dired-goto-file fil) | 1339 | chr (cdr elt)) |
| 1340 | (save-excursion | 1340 | (when (dired-goto-file fil) |
| 1341 | (beginning-of-line) | 1341 | (beginning-of-line) |
| 1342 | (delete-char 1) | 1342 | (delete-char 1) |
| 1343 | (insert chr)))))) | 1343 | (insert chr)))))) |
| 1344 | 1344 | ||
| 1345 | (defun dired-remember-hidden () | 1345 | (defun dired-remember-hidden () |
| 1346 | "Return a list of names of subdirs currently hidden." | 1346 | "Return a list of names of subdirs currently hidden." |
| @@ -1739,7 +1739,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1739 | 1739 | ||
| 1740 | (define-key map | 1740 | (define-key map |
| 1741 | [menu-bar operate epa-dired-do-decrypt] | 1741 | [menu-bar operate epa-dired-do-decrypt] |
| 1742 | '(menu-item "Decrypt" epa-dired-do-decrypt | 1742 | '(menu-item "Decrypt..." epa-dired-do-decrypt |
| 1743 | :help "Decrypt file at cursor")) | 1743 | :help "Decrypt file at cursor")) |
| 1744 | 1744 | ||
| 1745 | (define-key map | 1745 | (define-key map |
| @@ -1749,12 +1749,12 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1749 | 1749 | ||
| 1750 | (define-key map | 1750 | (define-key map |
| 1751 | [menu-bar operate epa-dired-do-sign] | 1751 | [menu-bar operate epa-dired-do-sign] |
| 1752 | '(menu-item "Sign" epa-dired-do-sign | 1752 | '(menu-item "Sign..." epa-dired-do-sign |
| 1753 | :help "Create digital signature of file at cursor")) | 1753 | :help "Create digital signature of file at cursor")) |
| 1754 | 1754 | ||
| 1755 | (define-key map | 1755 | (define-key map |
| 1756 | [menu-bar operate epa-dired-do-encrypt] | 1756 | [menu-bar operate epa-dired-do-encrypt] |
| 1757 | '(menu-item "Encrypt" epa-dired-do-encrypt | 1757 | '(menu-item "Encrypt..." epa-dired-do-encrypt |
| 1758 | :help "Encrypt file at cursor")) | 1758 | :help "Encrypt file at cursor")) |
| 1759 | 1759 | ||
| 1760 | (define-key map [menu-bar operate dashes-3] | 1760 | (define-key map [menu-bar operate dashes-3] |
| @@ -2950,6 +2950,8 @@ or \"* [3 files]\"." | |||
| 2950 | (split-window-sensibly window)))) | 2950 | (split-window-sensibly window)))) |
| 2951 | pop-up-frames) | 2951 | pop-up-frames) |
| 2952 | (pop-to-buffer (get-buffer-create buf))) | 2952 | (pop-to-buffer (get-buffer-create buf))) |
| 2953 | ;; See Bug#12281. | ||
| 2954 | (set-window-start nil (point-min)) | ||
| 2953 | ;; If dired-shrink-to-fit is t, make its window fit its contents. | 2955 | ;; If dired-shrink-to-fit is t, make its window fit its contents. |
| 2954 | (when dired-shrink-to-fit | 2956 | (when dired-shrink-to-fit |
| 2955 | ;; Try to not delete window when we want to display less than | 2957 | ;; Try to not delete window when we want to display less than |
| @@ -2971,36 +2973,43 @@ If t, confirmation is never needed." | |||
| 2971 | (const shell) (const symlink) (const touch) | 2973 | (const shell) (const symlink) (const touch) |
| 2972 | (const uncompress)))) | 2974 | (const uncompress)))) |
| 2973 | 2975 | ||
| 2974 | (defun dired-mark-pop-up (bufname op-symbol files function &rest args) | 2976 | (defun dired-mark-pop-up (buffer-or-name op-symbol files function &rest args) |
| 2975 | "Return FUNCTION's result on ARGS after showing which files are marked. | 2977 | "Return FUNCTION's result on ARGS after showing which files are marked. |
| 2976 | Displays the file names in a buffer named BUFNAME; | 2978 | Displays the file names in a window showing a buffer named |
| 2977 | nil gives \" *Marked Files*\". | 2979 | BUFFER-OR-NAME; the default name being \" *Marked Files*\". The |
| 2978 | This uses function `dired-pop-to-buffer' to do that. | 2980 | window is not shown if there is just one file, `dired-no-confirm' |
| 2979 | 2981 | is t, or OP-SYMBOL is a member of the list in `dired-no-confirm'. | |
| 2980 | FUNCTION should not manipulate files, just read input | 2982 | |
| 2981 | (an argument or confirmation). | ||
| 2982 | The window is not shown if there is just one file or | ||
| 2983 | OP-SYMBOL is a member of the list in `dired-no-confirm'. | ||
| 2984 | FILES is the list of marked files. It can also be (t FILENAME) | 2983 | FILES is the list of marked files. It can also be (t FILENAME) |
| 2985 | in the case of one marked file, to distinguish that from using | 2984 | in the case of one marked file, to distinguish that from using |
| 2986 | just the current file." | 2985 | just the current file. |
| 2987 | (or bufname (setq bufname " *Marked Files*")) | 2986 | |
| 2987 | FUNCTION should not manipulate files, just read input \(an | ||
| 2988 | argument or confirmation)." | ||
| 2988 | (if (or (eq dired-no-confirm t) | 2989 | (if (or (eq dired-no-confirm t) |
| 2989 | (memq op-symbol dired-no-confirm) | 2990 | (memq op-symbol dired-no-confirm) |
| 2990 | ;; If FILES defaulted to the current line's file. | 2991 | ;; If FILES defaulted to the current line's file. |
| 2991 | (= (length files) 1)) | 2992 | (= (length files) 1)) |
| 2992 | (apply function args) | 2993 | (apply function args) |
| 2993 | (with-current-buffer (get-buffer-create bufname) | 2994 | (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))) |
| 2994 | (erase-buffer) | 2995 | (with-current-buffer buffer |
| 2995 | ;; Handle (t FILE) just like (FILE), here. | 2996 | (let ((split-height-threshold 0)) |
| 2996 | ;; That value is used (only in some cases), to mean | 2997 | (with-temp-buffer-window |
| 2997 | ;; just one file that was marked, rather than the current line file. | 2998 | buffer |
| 2998 | (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files)) | 2999 | (cons 'display-buffer-below-selected nil) |
| 2999 | (remove-text-properties (point-min) (point-max) | 3000 | #'(lambda (window _value) |
| 3000 | '(mouse-face nil help-echo nil))) | 3001 | (with-selected-window window |
| 3001 | (save-window-excursion | 3002 | (unwind-protect |
| 3002 | (dired-pop-to-buffer bufname) | 3003 | (apply function args) |
| 3003 | (apply function args)))) | 3004 | (when (window-live-p window) |
| 3005 | (quit-restore-window window 'kill))))) | ||
| 3006 | ;; Handle (t FILE) just like (FILE), here. That value is | ||
| 3007 | ;; used (only in some cases), to mean just one file that was | ||
| 3008 | ;; marked, rather than the current line file. | ||
| 3009 | (dired-format-columns-of-files | ||
| 3010 | (if (eq (car files) t) (cdr files) files)) | ||
| 3011 | (remove-text-properties (point-min) (point-max) | ||
| 3012 | '(mouse-face nil help-echo nil)))))))) | ||
| 3004 | 3013 | ||
| 3005 | (defun dired-format-columns-of-files (files) | 3014 | (defun dired-format-columns-of-files (files) |
| 3006 | (let ((beg (point))) | 3015 | (let ((beg (point))) |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 86497a3c73f..532c81c502c 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -635,7 +635,7 @@ If ALIST is non-nil, the new pairs are prepended to it." | |||
| 635 | (set-buffer-modified-p ,flag))) | 635 | (set-buffer-modified-p ,flag))) |
| 636 | (gv-define-simple-setter buffer-name rename-buffer t) | 636 | (gv-define-simple-setter buffer-name rename-buffer t) |
| 637 | (gv-define-setter buffer-string (store) | 637 | (gv-define-setter buffer-string (store) |
| 638 | `(progn (erase-buffer) (insert ,store))) | 638 | `(insert (prog1 ,store (erase-buffer)))) |
| 639 | (gv-define-simple-setter buffer-substring cl--set-buffer-substring) | 639 | (gv-define-simple-setter buffer-substring cl--set-buffer-substring) |
| 640 | (gv-define-simple-setter current-buffer set-buffer) | 640 | (gv-define-simple-setter current-buffer set-buffer) |
| 641 | (gv-define-simple-setter current-case-table set-case-table) | 641 | (gv-define-simple-setter current-case-table set-case-table) |
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index d1f997c99c4..4caa0a73866 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el | |||
| @@ -191,8 +191,9 @@ well for simple place forms. | |||
| 191 | Assignments of VAL to (NAME ARGS...) are expanded by binding the argument | 191 | Assignments of VAL to (NAME ARGS...) are expanded by binding the argument |
| 192 | forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must | 192 | forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must |
| 193 | return a Lisp form that does the assignment. | 193 | return a Lisp form that does the assignment. |
| 194 | Actually, ARGLIST may be bound to temporary variables which are introduced | 194 | The first arg in ARLIST (the one that receives VAL) receives an expression |
| 195 | automatically to preserve proper execution order of the arguments. Example: | 195 | which can do arbitrary things, whereas the other arguments are all guaranteed |
| 196 | to be pure and copyable. Example use: | ||
| 196 | (gv-define-setter aref (v a i) `(aset ,a ,i ,v))" | 197 | (gv-define-setter aref (v a i) `(aset ,a ,i ,v))" |
| 197 | (declare (indent 2) (debug (&define name sexp body))) | 198 | (declare (indent 2) (debug (&define name sexp body))) |
| 198 | `(gv-define-expander ,name | 199 | `(gv-define-expander ,name |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index b87cfd41f61..37e755e7655 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,29 @@ | |||
| 1 | 2012-08-21 Josh Feinstein <jlf@foxtail.org> | ||
| 2 | |||
| 3 | * erc-join.el (erc-autojoin-timing): Fix defcustom type. | ||
| 4 | |||
| 5 | 2012-08-21 Julien Danjou <julien@danjou.info> | ||
| 6 | |||
| 7 | * erc-match.el (erc-match-message): Use | ||
| 8 | `erc-match-exclude-server-buffer' not | ||
| 9 | `erc-track-exclude-server-buffer'. | ||
| 10 | |||
| 11 | 2012-08-20 Josh Feinstein <jlf@foxtail.org> | ||
| 12 | |||
| 13 | * erc.el (erc-display-message): Abstract message hiding decision | ||
| 14 | to new function erc-hide-current-message-p. | ||
| 15 | (erc-lurker): New customization group. | ||
| 16 | (erc-lurker-state, erc-lurker-trim-nicks, erc-lurker-ignore-chars) | ||
| 17 | (erc-lurker-hide-list, erc-lurker-cleanup-interval) | ||
| 18 | (erc-lurker-threshold-time): New variables. | ||
| 19 | (erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup) | ||
| 20 | (erc-hide-current-message-p, erc-canonicalize-server-name) | ||
| 21 | (erc-lurker-update-status, erc-lurker-p): New functions. Together | ||
| 22 | they maintain state about which users have spoken in the last | ||
| 23 | erc-lurker-threshold-time, with all other users being considered | ||
| 24 | lurkers whose messages of types in erc-lurker-hide-list will not | ||
| 25 | be displayed by erc-display-message. | ||
| 26 | |||
| 1 | 2012-08-06 Julien Danjou <julien@danjou.info> | 27 | 2012-08-06 Julien Danjou <julien@danjou.info> |
| 2 | 28 | ||
| 3 | * erc-match.el (erc-match-exclude-server-buffer) | 29 | * erc-match.el (erc-match-exclude-server-buffer) |
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index 85d1edf6427..ae7f90003a6 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el | |||
| @@ -84,8 +84,8 @@ identification, or after `erc-autojoin-delay' seconds. | |||
| 84 | Any other value means the same as `connect'." | 84 | Any other value means the same as `connect'." |
| 85 | :group 'erc-autojoin | 85 | :group 'erc-autojoin |
| 86 | :version "24.1" | 86 | :version "24.1" |
| 87 | :type '(choice (const :tag "On Connection" 'connect) | 87 | :type '(choice (const :tag "On Connection" connect) |
| 88 | (const :tag "When Identified" 'ident))) | 88 | (const :tag "When Identified" ident))) |
| 89 | 89 | ||
| 90 | (defcustom erc-autojoin-delay 30 | 90 | (defcustom erc-autojoin-delay 30 |
| 91 | "Number of seconds to wait before attempting to autojoin channels. | 91 | "Number of seconds to wait before attempting to autojoin channels. |
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 8daf9be2b14..cac042c0298 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el | |||
| @@ -458,7 +458,7 @@ Use this defun with `erc-insert-modify-hook'." | |||
| 458 | (point-min)) | 458 | (point-min)) |
| 459 | (point-max)))) | 459 | (point-max)))) |
| 460 | (when (and vector | 460 | (when (and vector |
| 461 | (not (and erc-track-exclude-server-buffer | 461 | (not (and erc-match-exclude-server-buffer |
| 462 | (erc-server-buffer-p)))) | 462 | (erc-server-buffer-p)))) |
| 463 | (mapc | 463 | (mapc |
| 464 | (lambda (match-type) | 464 | (lambda (match-type) |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 0fc308621b1..feef75940f3 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -100,6 +100,10 @@ | |||
| 100 | "Ignoring certain messages" | 100 | "Ignoring certain messages" |
| 101 | :group 'erc) | 101 | :group 'erc) |
| 102 | 102 | ||
| 103 | (defgroup erc-lurker nil | ||
| 104 | "Hide specified message types sent by lurkers" | ||
| 105 | :group 'erc-ignore) | ||
| 106 | |||
| 103 | (defgroup erc-query nil | 107 | (defgroup erc-query nil |
| 104 | "Using separate buffers for private discussions" | 108 | "Using separate buffers for private discussions" |
| 105 | :group 'erc) | 109 | :group 'erc) |
| @@ -2455,6 +2459,174 @@ See also `erc-make-notice'." | |||
| 2455 | string) | 2459 | string) |
| 2456 | string))) | 2460 | string))) |
| 2457 | 2461 | ||
| 2462 | (defvar erc-lurker-state nil | ||
| 2463 | "Track the time of the last PRIVMSG for each (server,nick) pair. | ||
| 2464 | |||
| 2465 | This is implemented as a hash of hashes, where the outer key is | ||
| 2466 | the canonicalized server name (as returned by | ||
| 2467 | `erc-canonicalize-server-name') and the outer value is a hash | ||
| 2468 | table mapping nicks (as returned by `erc-lurker-maybe-trim') to | ||
| 2469 | the times of their most recently received PRIVMSG on any channel | ||
| 2470 | on the given server.") | ||
| 2471 | |||
| 2472 | (defcustom erc-lurker-trim-nicks t | ||
| 2473 | "If t, trim trailing `erc-lurker-ignore-chars' from nicks. | ||
| 2474 | |||
| 2475 | This causes e.g. nick and nick` to be considered as the same | ||
| 2476 | individual for activity tracking and lurkiness detection | ||
| 2477 | purposes." | ||
| 2478 | :group 'erc-lurker | ||
| 2479 | :type 'boolean) | ||
| 2480 | |||
| 2481 | (defun erc-lurker-maybe-trim (nick) | ||
| 2482 | "Maybe trim trailing `erc-lurker-ignore-chars' from NICK. | ||
| 2483 | |||
| 2484 | Returns NICK unmodified unless `erc-lurker-trim-nicks' is | ||
| 2485 | non-nil." | ||
| 2486 | (if erc-lurker-trim-nicks | ||
| 2487 | (replace-regexp-in-string | ||
| 2488 | (format "[%s]" | ||
| 2489 | (mapconcat (lambda (char) | ||
| 2490 | (regexp-quote (char-to-string char))) | ||
| 2491 | erc-lurker-ignore-chars "")) | ||
| 2492 | "" nick) | ||
| 2493 | nick)) | ||
| 2494 | |||
| 2495 | (defcustom erc-lurker-ignore-chars "`_" | ||
| 2496 | "Characters at the end of a nick to strip for activity tracking purposes. | ||
| 2497 | |||
| 2498 | See also `erc-lurker-trim-nicks'." | ||
| 2499 | :group 'erc-lurker | ||
| 2500 | :type 'string) | ||
| 2501 | |||
| 2502 | (defcustom erc-lurker-hide-list nil | ||
| 2503 | "List of IRC type messages to hide when sent by lurkers. | ||
| 2504 | |||
| 2505 | A typical value would be '(\"JOIN\" \"PART\" \"QUIT\"). | ||
| 2506 | See also `erc-lurker-p' and `erc-hide-list'." | ||
| 2507 | :group 'erc-lurker | ||
| 2508 | :type 'erc-message-type) | ||
| 2509 | |||
| 2510 | (defcustom erc-lurker-threshold-time (* 60 60 24) ; 24h by default | ||
| 2511 | "Nicks from which no PRIVMSGs have been received within this | ||
| 2512 | interval (in units of seconds) are considered lurkers by | ||
| 2513 | `erc-lurker-p' and as a result their messages of types in | ||
| 2514 | `erc-lurker-hide-list' will be hidden." | ||
| 2515 | :group 'erc-lurker | ||
| 2516 | :type 'integer) | ||
| 2517 | |||
| 2518 | (defun erc-lurker-initialize () | ||
| 2519 | "Initialize ERC lurker tracking functionality. | ||
| 2520 | |||
| 2521 | This function adds `erc-lurker-update-status' to | ||
| 2522 | `erc-insert-pre-hook' in order to record the time of each nick's | ||
| 2523 | most recent PRIVMSG as well as initializing the state variable | ||
| 2524 | storing this information." | ||
| 2525 | (setq erc-lurker-state (make-hash-table :test 'equal)) | ||
| 2526 | (add-hook 'erc-insert-pre-hook 'erc-lurker-update-status)) | ||
| 2527 | |||
| 2528 | (defun erc-lurker-cleanup () | ||
| 2529 | "Remove all last PRIVMSG state older than `erc-lurker-threshold-time'. | ||
| 2530 | |||
| 2531 | This should be called regularly to avoid excessive resource | ||
| 2532 | consumption for long-lived IRC or Emacs sessions." | ||
| 2533 | (maphash | ||
| 2534 | (lambda (server hash) | ||
| 2535 | (maphash | ||
| 2536 | (lambda (nick last-PRIVMSG-time) | ||
| 2537 | (when | ||
| 2538 | (> (time-to-seconds (time-subtract | ||
| 2539 | (current-time) | ||
| 2540 | last-PRIVMSG-time)) | ||
| 2541 | erc-lurker-threshold-time) | ||
| 2542 | (remhash nick hash))) | ||
| 2543 | hash) | ||
| 2544 | (if (zerop (hash-table-count hash)) | ||
| 2545 | (remhash server erc-lurker-state))) | ||
| 2546 | erc-lurker-state)) | ||
| 2547 | |||
| 2548 | (defvar erc-lurker-cleanup-count 0 | ||
| 2549 | "Internal counter variable for use with `erc-lurker-cleanup-interval'.") | ||
| 2550 | |||
| 2551 | (defvar erc-lurker-cleanup-interval 100 | ||
| 2552 | "Specifies frequency of cleaning up stale erc-lurker state. | ||
| 2553 | |||
| 2554 | `erc-lurker-update-status' calls `erc-lurker-cleanup' once for | ||
| 2555 | every `erc-lurker-cleanup-interval' updates to | ||
| 2556 | `erc-lurker-state'. This is designed to limit the memory | ||
| 2557 | consumption of lurker state during long Emacs sessions and/or ERC | ||
| 2558 | sessions with large numbers of incoming PRIVMSGs.") | ||
| 2559 | |||
| 2560 | (defun erc-lurker-update-status (message) | ||
| 2561 | "Update `erc-lurker-state' if necessary. | ||
| 2562 | |||
| 2563 | This function is called from `erc-insert-pre-hook'. If the | ||
| 2564 | current message is a PRIVMSG, update `erc-lurker-state' to | ||
| 2565 | reflect the fact that its sender has issued a PRIVMSG at the | ||
| 2566 | current time. Otherwise, take no action. | ||
| 2567 | |||
| 2568 | This function depends on the fact that `erc-display-message' | ||
| 2569 | dynamically binds `parsed', which is used to check if the current | ||
| 2570 | message is a PRIVMSG and to determine its sender. See also | ||
| 2571 | `erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'. | ||
| 2572 | |||
| 2573 | In order to limit memory consumption, this function also calls | ||
| 2574 | `erc-lurker-cleanup' once every `erc-lurker-cleanup-interval' | ||
| 2575 | updates of `erc-lurker-state'." | ||
| 2576 | (when (and (boundp 'parsed) (erc-response-p parsed)) | ||
| 2577 | (let* ((command (erc-response.command parsed)) | ||
| 2578 | (sender | ||
| 2579 | (erc-lurker-maybe-trim | ||
| 2580 | (car (erc-parse-user (erc-response.sender parsed))))) | ||
| 2581 | (server | ||
| 2582 | (erc-canonicalize-server-name erc-server-announced-name))) | ||
| 2583 | (when (equal command "PRIVMSG") | ||
| 2584 | (when (>= (incf erc-lurker-cleanup-count) erc-lurker-cleanup-interval) | ||
| 2585 | (setq erc-lurker-cleanup-count 0) | ||
| 2586 | (erc-lurker-cleanup)) | ||
| 2587 | (unless (gethash server erc-lurker-state) | ||
| 2588 | (puthash server (make-hash-table :test 'equal) erc-lurker-state)) | ||
| 2589 | (puthash sender (current-time) | ||
| 2590 | (gethash server erc-lurker-state)))))) | ||
| 2591 | |||
| 2592 | (defun erc-lurker-p (nick) | ||
| 2593 | "Predicate indicating NICK's lurking status on the current server. | ||
| 2594 | |||
| 2595 | Lurking is the condition where NICK has issued no PRIVMSG on this | ||
| 2596 | server within `erc-lurker-threshold-time'. See also | ||
| 2597 | `erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'." | ||
| 2598 | (unless erc-lurker-state (erc-lurker-initialize)) | ||
| 2599 | (let* ((server | ||
| 2600 | (erc-canonicalize-server-name erc-server-announced-name)) | ||
| 2601 | (last-PRIVMSG-time | ||
| 2602 | (gethash (erc-lurker-maybe-trim nick) | ||
| 2603 | (gethash server erc-lurker-state (make-hash-table))))) | ||
| 2604 | (or (null last-PRIVMSG-time) | ||
| 2605 | (> (time-to-seconds | ||
| 2606 | (time-subtract (current-time) last-PRIVMSG-time)) | ||
| 2607 | erc-lurker-threshold-time)))) | ||
| 2608 | |||
| 2609 | (defun erc-canonicalize-server-name (server) | ||
| 2610 | "Returns the canonical network name for SERVER if any, | ||
| 2611 | otherwise `erc-server-announced-name'. SERVER is matched against | ||
| 2612 | `erc-common-server-suffixes'." | ||
| 2613 | (when server | ||
| 2614 | (or (cdar (erc-remove-if-not | ||
| 2615 | (lambda (net) (string-match (car net) server)) | ||
| 2616 | erc-common-server-suffixes)) | ||
| 2617 | erc-server-announced-name))) | ||
| 2618 | |||
| 2619 | (defun erc-hide-current-message-p (parsed) | ||
| 2620 | "Predicate indicating whether the parsed ERC response PARSED should be hidden. | ||
| 2621 | |||
| 2622 | Messages are always hidden if the message type of PARSED appears in | ||
| 2623 | `erc-hide-list'. In addition, messages whose type is a member of | ||
| 2624 | `erc-lurker-hide-list' are hidden if `erc-lurker-p' returns true." | ||
| 2625 | (let* ((command (erc-response.command parsed)) | ||
| 2626 | (sender (car (erc-parse-user (erc-response.sender parsed))))) | ||
| 2627 | (or (member command erc-hide-list) | ||
| 2628 | (and (member command erc-lurker-hide-list) (erc-lurker-p sender))))) | ||
| 2629 | |||
| 2458 | (defun erc-display-message (parsed type buffer msg &rest args) | 2630 | (defun erc-display-message (parsed type buffer msg &rest args) |
| 2459 | "Display MSG in BUFFER. | 2631 | "Display MSG in BUFFER. |
| 2460 | 2632 | ||
| @@ -2479,7 +2651,7 @@ See also `erc-format-message' and `erc-display-line'." | |||
| 2479 | 2651 | ||
| 2480 | (if (not (erc-response-p parsed)) | 2652 | (if (not (erc-response-p parsed)) |
| 2481 | (erc-display-line string buffer) | 2653 | (erc-display-line string buffer) |
| 2482 | (unless (member (erc-response.command parsed) erc-hide-list) | 2654 | (unless (erc-hide-current-message-p parsed) |
| 2483 | (erc-put-text-property 0 (length string) 'erc-parsed parsed string) | 2655 | (erc-put-text-property 0 (length string) 'erc-parsed parsed string) |
| 2484 | (erc-put-text-property 0 (length string) 'rear-sticky t string) | 2656 | (erc-put-text-property 0 (length string) 'rear-sticky t string) |
| 2485 | (erc-display-line string buffer))))) | 2657 | (erc-display-line string buffer))))) |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 35f7a0a9e3d..58402e37508 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -1110,6 +1110,8 @@ Execute a COMMAND as the superuser or another USER.") | |||
| 1110 | (format "%s|sudo:%s@%s:%s" | 1110 | (format "%s|sudo:%s@%s:%s" |
| 1111 | (substring prefix 0 -1) user host dir) | 1111 | (substring prefix 0 -1) user host dir) |
| 1112 | (format "/sudo:%s@%s:%s" user host dir)))) | 1112 | (format "/sudo:%s@%s:%s" user host dir)))) |
| 1113 | ;; Ensure, that Tramp has connected to that construct already. | ||
| 1114 | (file-exists-p default-directory) | ||
| 1113 | (eshell-named-command (car orig-args) (cdr orig-args)))))))) | 1115 | (eshell-named-command (car orig-args) (cdr orig-args)))))))) |
| 1114 | 1116 | ||
| 1115 | (put 'eshell/sudo 'eshell-no-numeric-conversions t) | 1117 | (put 'eshell/sudo 'eshell-no-numeric-conversions t) |
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 52df1587d5f..e48213c54d6 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el | |||
| @@ -207,9 +207,14 @@ causing the user to wonder if anything's really going on..." | |||
| 207 | (defun eshell-external-command (command args) | 207 | (defun eshell-external-command (command args) |
| 208 | "Insert output from an external COMMAND, using ARGS." | 208 | "Insert output from an external COMMAND, using ARGS." |
| 209 | (setq args (eshell-stringify-list (eshell-flatten-list args))) | 209 | (setq args (eshell-stringify-list (eshell-flatten-list args))) |
| 210 | ;; (if (file-remote-p default-directory) | 210 | (let ((interp (eshell-find-interpreter |
| 211 | ;; (eshell-remote-command command args)) | 211 | command |
| 212 | (let ((interp (eshell-find-interpreter command))) | 212 | ;; `eshell-find-interpreter' does not work correctly |
| 213 | ;; for Tramp file name syntax. But we don't need to | ||
| 214 | ;; know the interpreter in that case, therefore the | ||
| 215 | ;; check is suppressed. | ||
| 216 | (or (and (stringp command) (file-remote-p command)) | ||
| 217 | (file-remote-p default-directory))))) | ||
| 213 | (cl-assert interp) | 218 | (cl-assert interp) |
| 214 | (if (functionp (car interp)) | 219 | (if (functionp (car interp)) |
| 215 | (apply (car interp) (append (cdr interp) args)) | 220 | (apply (car interp) (append (cdr interp) args)) |
diff --git a/lisp/faces.el b/lisp/faces.el index 2e1ba7798e9..6a477e172e1 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2444,7 +2444,7 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2444 | :group 'menu | 2444 | :group 'menu |
| 2445 | :group 'basic-faces) | 2445 | :group 'basic-faces) |
| 2446 | 2446 | ||
| 2447 | (defface help-argument-name '((((supports :slant italic)) :inherit italic)) | 2447 | (defface help-argument-name '((t :inherit italic)) |
| 2448 | "Face to highlight argument names in *Help* buffers." | 2448 | "Face to highlight argument names in *Help* buffers." |
| 2449 | :group 'help) | 2449 | :group 'help) |
| 2450 | 2450 | ||
diff --git a/lisp/ffap.el b/lisp/ffap.el index d0f3b639cf2..ebe8b6dee94 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -1703,7 +1703,7 @@ Only intended for interactive use." | |||
| 1703 | buffer-or-list | 1703 | buffer-or-list |
| 1704 | (list buffer-or-list))) | 1704 | (list buffer-or-list))) |
| 1705 | (with-current-buffer buffer | 1705 | (with-current-buffer buffer |
| 1706 | (toggle-read-only 1)))) | 1706 | (read-only-mode 1)))) |
| 1707 | 1707 | ||
| 1708 | (defun ffap-read-only () | 1708 | (defun ffap-read-only () |
| 1709 | "Like `ffap', but mark buffer as read-only. | 1709 | "Like `ffap', but mark buffer as read-only. |
diff --git a/lisp/files.el b/lisp/files.el index 5caa4681884..6528632c841 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1456,7 +1456,7 @@ file names with wildcards." | |||
| 1456 | (file-exists-p filename)) | 1456 | (file-exists-p filename)) |
| 1457 | (error "%s does not exist" filename)) | 1457 | (error "%s does not exist" filename)) |
| 1458 | (let ((value (funcall fun filename wildcards))) | 1458 | (let ((value (funcall fun filename wildcards))) |
| 1459 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | 1459 | (mapc (lambda (b) (with-current-buffer b (read-only-mode 1))) |
| 1460 | (if (listp value) value (list value))) | 1460 | (if (listp value) value (list value))) |
| 1461 | value)) | 1461 | value)) |
| 1462 | 1462 | ||
| @@ -2837,7 +2837,8 @@ symbol and VAL is a value that is considered safe." | |||
| 2837 | ;; This should be here at least as long as Emacs supports write-file-hooks. | 2837 | ;; This should be here at least as long as Emacs supports write-file-hooks. |
| 2838 | '((add-hook 'write-file-hooks 'time-stamp) | 2838 | '((add-hook 'write-file-hooks 'time-stamp) |
| 2839 | (add-hook 'write-file-functions 'time-stamp) | 2839 | (add-hook 'write-file-functions 'time-stamp) |
| 2840 | (add-hook 'before-save-hook 'time-stamp)) | 2840 | (add-hook 'before-save-hook 'time-stamp nil t) |
| 2841 | (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)) | ||
| 2841 | "Expressions that are considered safe in an `eval:' local variable. | 2842 | "Expressions that are considered safe in an `eval:' local variable. |
| 2842 | Add expressions to this list if you want Emacs to evaluate them, when | 2843 | Add expressions to this list if you want Emacs to evaluate them, when |
| 2843 | they appear in an `eval' local variable specification, without first | 2844 | they appear in an `eval' local variable specification, without first |
| @@ -4817,51 +4818,12 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'." | |||
| 4817 | "Modification-flag cleared")) | 4818 | "Modification-flag cleared")) |
| 4818 | (set-buffer-modified-p arg)) | 4819 | (set-buffer-modified-p arg)) |
| 4819 | 4820 | ||
| 4820 | (defun toggle-read-only (&optional arg message) | 4821 | (defun toggle-read-only (&optional arg interactive) |
| 4821 | "Toggle the read-only state of the current buffer. | 4822 | (declare (obsolete read-only-mode "24.3")) |
| 4822 | With prefix argument ARG, make the buffer read-only if ARG is | 4823 | (interactive (list current-prefix-arg t)) |
| 4823 | positive; otherwise make it writable. | 4824 | (if interactive |
| 4824 | 4825 | (call-interactively 'read-only-mode) | |
| 4825 | When making the buffer read-only, enable View mode if | 4826 | (read-only-mode (or arg 'toggle)))) |
| 4826 | `view-read-only' is non-nil. When making the buffer writable, | ||
| 4827 | disable View mode if View mode is enabled. | ||
| 4828 | |||
| 4829 | If called interactively, or if called from Lisp with MESSAGE | ||
| 4830 | non-nil, print a message reporting the buffer's new read-only | ||
| 4831 | status. | ||
| 4832 | |||
| 4833 | Do not call this from a Lisp program unless you really intend to | ||
| 4834 | do the same thing as the \\[toggle-read-only] command, including | ||
| 4835 | possibly enabling or disabling View mode. Also, note that this | ||
| 4836 | command works by setting the variable `buffer-read-only', which | ||
| 4837 | does not affect read-only regions caused by text properties. To | ||
| 4838 | ignore read-only status in a Lisp program (whether due to text | ||
| 4839 | properties or buffer state), bind `inhibit-read-only' temporarily | ||
| 4840 | to a non-nil value." | ||
| 4841 | (interactive "P") | ||
| 4842 | (cond | ||
| 4843 | ;; Do nothing if `buffer-read-only' already matches the state | ||
| 4844 | ;; specified by ARG. | ||
| 4845 | ((and arg | ||
| 4846 | (if (> (prefix-numeric-value arg) 0) | ||
| 4847 | buffer-read-only | ||
| 4848 | (not buffer-read-only)))) | ||
| 4849 | ;; If View mode is enabled, exit it. | ||
| 4850 | ((and buffer-read-only view-mode) | ||
| 4851 | (View-exit-and-edit) | ||
| 4852 | (set (make-local-variable 'view-read-only) t)) | ||
| 4853 | ;; If `view-read-only' is non-nil, enable View mode. | ||
| 4854 | ((and view-read-only | ||
| 4855 | (not buffer-read-only) | ||
| 4856 | (not view-mode) | ||
| 4857 | (not (eq (get major-mode 'mode-class) 'special))) | ||
| 4858 | (view-mode-enter)) | ||
| 4859 | ;; The usual action: flip `buffer-read-only'. | ||
| 4860 | (t (setq buffer-read-only (not buffer-read-only)) | ||
| 4861 | (force-mode-line-update))) | ||
| 4862 | (if (or message (called-interactively-p 'interactive)) | ||
| 4863 | (message "Read-only %s for this buffer" | ||
| 4864 | (if buffer-read-only "enabled" "disabled")))) | ||
| 4865 | 4827 | ||
| 4866 | (defun insert-file (filename) | 4828 | (defun insert-file (filename) |
| 4867 | "Insert contents of file FILENAME into buffer after point. | 4829 | "Insert contents of file FILENAME into buffer after point. |
| @@ -5388,23 +5350,26 @@ non-nil, it is called instead of rereading visited file contents." | |||
| 5388 | (not (file-exists-p file-name))) | 5350 | (not (file-exists-p file-name))) |
| 5389 | (error "Auto-save file %s not current" | 5351 | (error "Auto-save file %s not current" |
| 5390 | (abbreviate-file-name file-name))) | 5352 | (abbreviate-file-name file-name))) |
| 5391 | ((save-window-excursion | 5353 | ((with-temp-buffer-window |
| 5392 | (with-output-to-temp-buffer "*Directory*" | 5354 | "*Directory*" nil |
| 5393 | (buffer-disable-undo standard-output) | 5355 | #'(lambda (window _value) |
| 5394 | (save-excursion | 5356 | (with-selected-window window |
| 5395 | (let ((switches dired-listing-switches)) | 5357 | (unwind-protect |
| 5396 | (if (file-symlink-p file) | 5358 | (yes-or-no-p (format "Recover auto save file %s? " file-name)) |
| 5397 | (setq switches (concat switches " -L"))) | 5359 | (when (window-live-p window) |
| 5398 | (set-buffer standard-output) | 5360 | (quit-restore-window window 'kill))))) |
| 5399 | ;; Use insert-directory-safely, not insert-directory, | 5361 | (with-current-buffer standard-output |
| 5400 | ;; because these files might not exist. In particular, | 5362 | (let ((switches dired-listing-switches)) |
| 5401 | ;; FILE might not exist if the auto-save file was for | 5363 | (if (file-symlink-p file) |
| 5402 | ;; a buffer that didn't visit a file, such as "*mail*". | 5364 | (setq switches (concat switches " -L"))) |
| 5403 | ;; The code in v20.x called `ls' directly, so we need | 5365 | ;; Use insert-directory-safely, not insert-directory, |
| 5404 | ;; to emulate what `ls' did in that case. | 5366 | ;; because these files might not exist. In particular, |
| 5405 | (insert-directory-safely file switches) | 5367 | ;; FILE might not exist if the auto-save file was for |
| 5406 | (insert-directory-safely file-name switches)))) | 5368 | ;; a buffer that didn't visit a file, such as "*mail*". |
| 5407 | (yes-or-no-p (format "Recover auto save file %s? " file-name))) | 5369 | ;; The code in v20.x called `ls' directly, so we need |
| 5370 | ;; to emulate what `ls' did in that case. | ||
| 5371 | (insert-directory-safely file switches) | ||
| 5372 | (insert-directory-safely file-name switches)))) | ||
| 5408 | (switch-to-buffer (find-file-noselect file t)) | 5373 | (switch-to-buffer (find-file-noselect file t)) |
| 5409 | (let ((inhibit-read-only t) | 5374 | (let ((inhibit-read-only t) |
| 5410 | ;; Keep the current buffer-file-coding-system. | 5375 | ;; Keep the current buffer-file-coding-system. |
| @@ -6365,8 +6330,15 @@ if any returns nil. If `confirm-kill-emacs' is non-nil, calls it." | |||
| 6365 | (setq active t)) | 6330 | (setq active t)) |
| 6366 | (setq processes (cdr processes))) | 6331 | (setq processes (cdr processes))) |
| 6367 | (or (not active) | 6332 | (or (not active) |
| 6368 | (progn (list-processes t) | 6333 | (with-temp-buffer-window |
| 6369 | (yes-or-no-p "Active processes exist; kill them and exit anyway? "))))) | 6334 | (get-buffer-create "*Process List*") nil |
| 6335 | #'(lambda (window _value) | ||
| 6336 | (with-selected-window window | ||
| 6337 | (unwind-protect | ||
| 6338 | (yes-or-no-p "Active processes exist; kill them and exit anyway? ") | ||
| 6339 | (when (window-live-p window) | ||
| 6340 | (quit-restore-window window 'kill))))) | ||
| 6341 | (list-processes t))))) | ||
| 6370 | ;; Query the user for other things, perhaps. | 6342 | ;; Query the user for other things, perhaps. |
| 6371 | (run-hook-with-args-until-failure 'kill-emacs-query-functions) | 6343 | (run-hook-with-args-until-failure 'kill-emacs-query-functions) |
| 6372 | (or (null confirm-kill-emacs) | 6344 | (or (null confirm-kill-emacs) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index df35e998c31..37d89ba8cad 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,82 @@ | |||
| 1 | 2012-09-03 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * dgnushack.el: XEmacs 21.5 compilation fix. | ||
| 4 | |||
| 5 | * gnus-notifications.el (gnus-notifications-notify): Use it. | ||
| 6 | |||
| 7 | * gnus-fun.el (gnus-funcall-no-warning): New function to silence | ||
| 8 | warnings on XEmacs. | ||
| 9 | |||
| 10 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 11 | |||
| 12 | Better seeds for (random). | ||
| 13 | * gnus-sync.el (gnus-sync-lesync-setup): | ||
| 14 | * message.el (message-canlock-generate, message-unique-id): | ||
| 15 | Change (random t) to (random), now that the latter is more random. | ||
| 16 | |||
| 17 | 2012-08-31 Dave Abrahams <dave@boostpro.com> | ||
| 18 | |||
| 19 | * auth-source.el (auth-sources): Fix macos keychain access. | ||
| 20 | |||
| 21 | * gnus-int.el (gnus-request-head): When gnus-override-method is set, | ||
| 22 | allow the backend `request-head' function to determine the group | ||
| 23 | name on its own. | ||
| 24 | (gnus-request-expire-articles): Filter out negative article numbers | ||
| 25 | during expiry (Bug#11980). | ||
| 26 | |||
| 27 | * gnus-range.el (gnus-set-difference): Change gnus-set-difference from | ||
| 28 | O(N^2) to O(N). This makes warping into huge groups tolerable. | ||
| 29 | |||
| 30 | * gnus-registry.el (gnus-try-warping-via-registry): Don't act as though | ||
| 31 | you've found the article when you haven't. | ||
| 32 | |||
| 33 | 2012-08-31 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 34 | |||
| 35 | * gnus-notifications.el (gnus-notifications-action): Avoid CL-ism. | ||
| 36 | |||
| 37 | 2012-08-30 Julien Danjou <julien@danjou.info> | ||
| 38 | |||
| 39 | * gnus-notifications.el (gnus-notifications-notify): Use timeout from | ||
| 40 | `gnus-notifications-timeout'. | ||
| 41 | (gnus-notifications-timeout): Add. | ||
| 42 | (gnus-notifications-action): New function. | ||
| 43 | (gnus-notifications-notify): Add :action using | ||
| 44 | `gnus-notifications-action'. | ||
| 45 | (gnus-notifications-id-to-msg): New variable. | ||
| 46 | (gnus-notifications): Use `gnus-notifications-id-to-msg' to map | ||
| 47 | notifications id to messages. | ||
| 48 | |||
| 49 | 2012-08-30 Kenichi Handa <handa@gnu.org> | ||
| 50 | |||
| 51 | * qp.el (quoted-printable-decode-region): Decode multiple bytes at | ||
| 52 | once. | ||
| 53 | |||
| 54 | 2012-08-29 Julien Danjou <julien@danjou.info> | ||
| 55 | |||
| 56 | * gnus-notifications.el: New file. | ||
| 57 | (gnus-notifications-notify): New function. | ||
| 58 | (gnus-notifications): Use `gnus-notifications-notify'. | ||
| 59 | |||
| 60 | 2012-08-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 61 | |||
| 62 | * gnus-sum.el (gnus-summary-enter-digest-group): Decode content | ||
| 63 | transfer encoding first; bind gnus-newsgroup-charset to the charset | ||
| 64 | that the article specifies (Bug#12209). | ||
| 65 | |||
| 66 | 2012-08-22 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 67 | |||
| 68 | * gnus-cus.el (gnus-group-customize): Decode values posting-style holds. | ||
| 69 | (gnus-group-customize-done): Encode values posting-style holds. | ||
| 70 | |||
| 71 | * gnus-msg.el (gnus-summary-resend-message) | ||
| 72 | (gnus-configure-posting-styles): Decode values posting-style group | ||
| 73 | parameter holds. | ||
| 74 | |||
| 75 | 2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 76 | |||
| 77 | * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for | ||
| 78 | `name' and `address' in Resent-From header. | ||
| 79 | |||
| 1 | 2012-08-14 Chong Yidong <cyd@gnu.org> | 80 | 2012-08-14 Chong Yidong <cyd@gnu.org> |
| 2 | 81 | ||
| 3 | * gnus-art.el (article-display-face): Handle failure in | 82 | * gnus-art.el (article-display-face): Handle failure in |
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 262da447358..4c5e5ffadce 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el | |||
| @@ -256,10 +256,10 @@ can get pretty complex." | |||
| 256 | (const :tag "Temp Secrets API Collection" "secrets:session") | 256 | (const :tag "Temp Secrets API Collection" "secrets:session") |
| 257 | 257 | ||
| 258 | (const :tag "Default internet Mac OS Keychain" | 258 | (const :tag "Default internet Mac OS Keychain" |
| 259 | 'macos-keychain-internet) | 259 | macos-keychain-internet) |
| 260 | 260 | ||
| 261 | (const :tag "Default generic Mac OS Keychain" | 261 | (const :tag "Default generic Mac OS Keychain" |
| 262 | 'macos-keychain-generic) | 262 | macos-keychain-generic) |
| 263 | 263 | ||
| 264 | (list :tag "Source definition" | 264 | (list :tag "Source definition" |
| 265 | (const :format "" :value :source) | 265 | (const :format "" :value :source) |
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 234d0f7ae56..3440e6310af 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el | |||
| @@ -417,6 +417,11 @@ category.")) | |||
| 417 | (delq elem tmp)) | 417 | (delq elem tmp)) |
| 418 | (setq tmp (cdr tmp)))) | 418 | (setq tmp (cdr tmp)))) |
| 419 | 419 | ||
| 420 | ;; Decode values posting-style holds. | ||
| 421 | (dolist (style (cdr (assq 'posting-style values))) | ||
| 422 | (when (stringp (cadr style)) | ||
| 423 | (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8))))) | ||
| 424 | |||
| 420 | (setq gnus-custom-params | 425 | (setq gnus-custom-params |
| 421 | (apply 'widget-create 'group | 426 | (apply 'widget-create 'group |
| 422 | :value values | 427 | :value values |
| @@ -487,14 +492,17 @@ form, but who cares?" | |||
| 487 | (defun gnus-group-customize-done (&rest ignore) | 492 | (defun gnus-group-customize-done (&rest ignore) |
| 488 | "Apply changes and bury the buffer." | 493 | "Apply changes and bury the buffer." |
| 489 | (interactive) | 494 | (interactive) |
| 490 | (if gnus-custom-topic | 495 | (let ((params (widget-value gnus-custom-params))) |
| 491 | (gnus-topic-set-parameters gnus-custom-topic | 496 | ;; Encode values posting-style holds. |
| 492 | (widget-value gnus-custom-params)) | 497 | (dolist (style (cdr (assq 'posting-style params))) |
| 493 | (gnus-group-edit-group-done 'params gnus-custom-group | 498 | (when (stringp (cadr style)) |
| 494 | (widget-value gnus-custom-params)) | 499 | (setcdr style (list (mm-encode-coding-string (cadr style) 'utf-8))))) |
| 495 | (gnus-group-edit-group-done 'method gnus-custom-group | 500 | (if gnus-custom-topic |
| 496 | (widget-value gnus-custom-method))) | 501 | (gnus-topic-set-parameters gnus-custom-topic params) |
| 497 | (bury-buffer)) | 502 | (gnus-group-edit-group-done 'params gnus-custom-group params) |
| 503 | (gnus-group-edit-group-done 'method gnus-custom-group | ||
| 504 | (widget-value gnus-custom-method))) | ||
| 505 | (bury-buffer))) | ||
| 498 | 506 | ||
| 499 | ;;; Score Customization: | 507 | ;;; Score Customization: |
| 500 | 508 | ||
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index f33eb910c6a..f5e1c5ad691 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el | |||
| @@ -278,6 +278,10 @@ colors of the displayed X-Faces." | |||
| 278 | values)) | 278 | values)) |
| 279 | (mapconcat 'identity values " "))) | 279 | (mapconcat 'identity values " "))) |
| 280 | 280 | ||
| 281 | (defun gnus-funcall-no-warning (function &rest args) | ||
| 282 | (when (fboundp function) | ||
| 283 | (apply function args))) | ||
| 284 | |||
| 281 | (provide 'gnus-fun) | 285 | (provide 'gnus-fun) |
| 282 | 286 | ||
| 283 | ;;; gnus-fun.el ends here | 287 | ;;; gnus-fun.el ends here |
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 339e3d951c2..bc3ba187dd4 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el | |||
| @@ -599,7 +599,8 @@ real group. Does nothing on a real group." | |||
| 599 | clean-up t)) | 599 | clean-up t)) |
| 600 | ;; Use `head' function. | 600 | ;; Use `head' function. |
| 601 | ((fboundp head) | 601 | ((fboundp head) |
| 602 | (setq res (funcall head article (gnus-group-real-name group) | 602 | (setq res (funcall head article |
| 603 | (and (not gnus-override-method) (gnus-group-real-name group)) | ||
| 603 | (nth 1 gnus-command-method)))) | 604 | (nth 1 gnus-command-method)))) |
| 604 | ;; Use `article' function. | 605 | ;; Use `article' function. |
| 605 | (t | 606 | (t |
| @@ -706,6 +707,10 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned." | |||
| 706 | 707 | ||
| 707 | (defun gnus-request-expire-articles (articles group &optional force) | 708 | (defun gnus-request-expire-articles (articles group &optional force) |
| 708 | (let* ((gnus-command-method (gnus-find-method-for-group group)) | 709 | (let* ((gnus-command-method (gnus-find-method-for-group group)) |
| 710 | ;; Filter out any negative article numbers; they can't be | ||
| 711 | ;; expired here. | ||
| 712 | (articles | ||
| 713 | (delq nil (mapcar (lambda (n) (and (>= n 0) n)) articles))) | ||
| 709 | (gnus-inhibit-demon t) | 714 | (gnus-inhibit-demon t) |
| 710 | (not-deleted | 715 | (not-deleted |
| 711 | (funcall | 716 | (funcall |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 594f68bb86f..c2f79e70d1e 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1369,7 +1369,24 @@ For the \"inline\" alternatives, also see the variable | |||
| 1369 | (nnmail-fetch-field "to")))) | 1369 | (nnmail-fetch-field "to")))) |
| 1370 | current-prefix-arg)) | 1370 | current-prefix-arg)) |
| 1371 | (let ((message-header-setup-hook (copy-sequence message-header-setup-hook)) | 1371 | (let ((message-header-setup-hook (copy-sequence message-header-setup-hook)) |
| 1372 | (message-sent-hook (copy-sequence message-sent-hook))) | 1372 | (message-sent-hook (copy-sequence message-sent-hook)) |
| 1373 | ;; Honor posting-style for `name' and `address' in Resent-From header. | ||
| 1374 | (styles (gnus-group-find-parameter gnus-newsgroup-name | ||
| 1375 | 'posting-style t)) | ||
| 1376 | (user-full-name user-full-name) | ||
| 1377 | (user-mail-address user-mail-address) | ||
| 1378 | tem) | ||
| 1379 | (dolist (style styles) | ||
| 1380 | (when (stringp (cadr style)) | ||
| 1381 | (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8))))) | ||
| 1382 | (dolist (style (if styles | ||
| 1383 | (append gnus-posting-styles (list (cons ".*" styles))) | ||
| 1384 | gnus-posting-styles)) | ||
| 1385 | (when (string-match (pop style) gnus-newsgroup-name) | ||
| 1386 | (when (setq tem (cadr (assq 'name style))) | ||
| 1387 | (setq user-full-name tem)) | ||
| 1388 | (when (setq tem (cadr (assq 'address style))) | ||
| 1389 | (setq user-mail-address tem)))) | ||
| 1373 | ;; `gnus-summary-resend-message-insert-gcc' must run last. | 1390 | ;; `gnus-summary-resend-message-insert-gcc' must run last. |
| 1374 | (add-hook 'message-header-setup-hook | 1391 | (add-hook 'message-header-setup-hook |
| 1375 | 'gnus-summary-resend-message-insert-gcc t) | 1392 | 'gnus-summary-resend-message-insert-gcc t) |
| @@ -1793,6 +1810,10 @@ this is a reply." | |||
| 1793 | (when gnus-newsgroup-name | 1810 | (when gnus-newsgroup-name |
| 1794 | (let ((tmp-style (gnus-group-find-parameter group 'posting-style t))) | 1811 | (let ((tmp-style (gnus-group-find-parameter group 'posting-style t))) |
| 1795 | (when tmp-style | 1812 | (when tmp-style |
| 1813 | (dolist (style tmp-style) | ||
| 1814 | (when (stringp (cadr style)) | ||
| 1815 | (setcdr style (list (mm-decode-coding-string (cadr style) | ||
| 1816 | 'utf-8))))) | ||
| 1796 | (setq styles (append styles (list (cons ".*" tmp-style))))))) | 1817 | (setq styles (append styles (list (cons ".*" tmp-style))))))) |
| 1797 | ;; Go through all styles and look for matches. | 1818 | ;; Go through all styles and look for matches. |
| 1798 | (dolist (style styles) | 1819 | (dolist (style styles) |
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el new file mode 100644 index 00000000000..f9c2d309a35 --- /dev/null +++ b/lisp/gnus/gnus-notifications.el | |||
| @@ -0,0 +1,187 @@ | |||
| 1 | ;; gnus-notifications.el -- Send notification on new message in Gnus | ||
| 2 | |||
| 3 | ;; Copyright (C) 2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Julien Danjou <julien@danjou.info> | ||
| 6 | ;; Keywords: news | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;; This implements notifications using `notifications-notify' on new | ||
| 26 | ;; messages received. | ||
| 27 | ;; Use (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications) | ||
| 28 | ;; to get notifications just after getting the new news. | ||
| 29 | |||
| 30 | ;;; Code: | ||
| 31 | |||
| 32 | (ignore-errors | ||
| 33 | (require 'notifications)) | ||
| 34 | (require 'gnus-sum) | ||
| 35 | (require 'gnus-group) | ||
| 36 | (require 'gnus-int) | ||
| 37 | (require 'gnus-art) | ||
| 38 | (require 'gnus-util) | ||
| 39 | (ignore-errors | ||
| 40 | (require 'google-contacts)) ; Optional | ||
| 41 | (require 'gnus-fun) | ||
| 42 | |||
| 43 | (defgroup gnus-notifications nil | ||
| 44 | "Send notifications on new message in Gnus." | ||
| 45 | :group 'gnus) | ||
| 46 | |||
| 47 | (defcustom gnus-notifications-use-google-contacts t | ||
| 48 | "Use Google Contacts to retrieve photo." | ||
| 49 | :type 'boolean | ||
| 50 | :group 'gnus-notifications) | ||
| 51 | |||
| 52 | (defcustom gnus-notifications-use-gravatar t | ||
| 53 | "Use Gravatar to retrieve photo." | ||
| 54 | :type 'boolean | ||
| 55 | :group 'gnus-notifications) | ||
| 56 | |||
| 57 | (defcustom gnus-notifications-minimum-level 1 | ||
| 58 | "Minimum group level the message should have to be notified. | ||
| 59 | Any message in a group that has a greater value than this will | ||
| 60 | not get notifications." | ||
| 61 | :type 'integer | ||
| 62 | :group 'gnus-notifications) | ||
| 63 | |||
| 64 | (defcustom gnus-notifications-timeout nil | ||
| 65 | "Timeout used for notifications sent via `notifications-notify'." | ||
| 66 | :type 'integer | ||
| 67 | :group 'gnus-notifications) | ||
| 68 | |||
| 69 | (defvar gnus-notifications-sent nil | ||
| 70 | "Notifications already sent.") | ||
| 71 | |||
| 72 | (defvar gnus-notifications-id-to-msg nil | ||
| 73 | "Map notifications ids to messages.") | ||
| 74 | |||
| 75 | (defun gnus-notifications-action (id key) | ||
| 76 | (when (string= key "read") | ||
| 77 | (let ((group-article (assoc id gnus-notifications-id-to-msg))) | ||
| 78 | (when group-article | ||
| 79 | (let ((group (cadr group-article)) | ||
| 80 | (article (nth 2 group-article))) | ||
| 81 | (gnus-fetch-group group (list article))))))) | ||
| 82 | |||
| 83 | (defun gnus-notifications-notify (from subject photo-file) | ||
| 84 | "Send a notification about a new mail. | ||
| 85 | Return a notification id if any, or t on success." | ||
| 86 | (if (fboundp 'notifications-notify) | ||
| 87 | (gnus-funcall-no-warning | ||
| 88 | 'notifications-notify | ||
| 89 | :title from | ||
| 90 | :body subject | ||
| 91 | :actions '("read" "Read") | ||
| 92 | :on-action 'gnus-notifications-action | ||
| 93 | :app-icon (gnus-funcall-no-warning | ||
| 94 | 'image-search-load-path "gnus/gnus.png") | ||
| 95 | :app-name "Gnus" | ||
| 96 | :category "email.arrived" | ||
| 97 | :timeout gnus-notifications-timeout | ||
| 98 | :image-path photo-file) | ||
| 99 | (message "New message from %s: %s" from subject) | ||
| 100 | ;; Don't return an id | ||
| 101 | t)) | ||
| 102 | |||
| 103 | (defun gnus-notifications-get-photo (mail-address) | ||
| 104 | "Get photo for mail address." | ||
| 105 | (let ((google-photo (when (and gnus-notifications-use-google-contacts | ||
| 106 | (fboundp 'google-contacts-get-photo)) | ||
| 107 | (ignore-errors | ||
| 108 | (gnus-funcall-no-warning | ||
| 109 | 'google-contacts-get-photo mail-address))))) | ||
| 110 | (if google-photo | ||
| 111 | google-photo | ||
| 112 | (when gnus-notifications-use-gravatar | ||
| 113 | (let ((gravatar (ignore-errors | ||
| 114 | (gravatar-retrieve-synchronously mail-address)))) | ||
| 115 | (if (eq gravatar 'error) | ||
| 116 | nil | ||
| 117 | (plist-get (cdr gravatar) :data))))))) | ||
| 118 | |||
| 119 | (defun gnus-notifications-get-photo-file (mail-address) | ||
| 120 | "Get a temporary file with an image for MAIL-ADDRESS. | ||
| 121 | You have to delete the temporary image yourself using | ||
| 122 | `delete-image'. | ||
| 123 | |||
| 124 | Returns nil if no image found." | ||
| 125 | (let ((photo (gnus-notifications-get-photo mail-address))) | ||
| 126 | (when photo | ||
| 127 | (let ((photo-file (make-temp-file "gnus-notifications-photo-")) | ||
| 128 | (coding-system-for-write 'binary)) | ||
| 129 | (with-temp-file photo-file | ||
| 130 | (insert photo)) | ||
| 131 | photo-file)))) | ||
| 132 | |||
| 133 | ;;;###autoload | ||
| 134 | (defun gnus-notifications () | ||
| 135 | "Send a notification on new message. | ||
| 136 | This check for new messages that are in group with a level lower | ||
| 137 | or equal to `gnus-notifications-minimum-level' and send a | ||
| 138 | notification using `notifications-notify' for it. | ||
| 139 | |||
| 140 | This is typically a function to add in | ||
| 141 | `gnus-after-getting-new-news-hook'" | ||
| 142 | (dolist (entry gnus-newsrc-alist) | ||
| 143 | (let ((group (car entry))) | ||
| 144 | ;; Check that the group level is less than | ||
| 145 | ;; `gnus-notifications-minimum-level' and the the group has unread | ||
| 146 | ;; messages. | ||
| 147 | (when (and (<= (gnus-group-level group) gnus-notifications-minimum-level) | ||
| 148 | (let ((unread (gnus-group-unread group))) | ||
| 149 | (and (numberp unread) | ||
| 150 | (> unread 0)))) | ||
| 151 | ;; Each group should have an entry in the `gnus-notifications-sent' | ||
| 152 | ;; alist. If not, we add one at this time. | ||
| 153 | (let ((group-notifications (or (assoc group gnus-notifications-sent) | ||
| 154 | ;; Nothing, add one and return it. | ||
| 155 | (assoc group | ||
| 156 | (add-to-list | ||
| 157 | 'gnus-notifications-sent | ||
| 158 | (cons group nil)))))) | ||
| 159 | (dolist (article (gnus-list-of-unread-articles group)) | ||
| 160 | ;; Check if the article already has been notified | ||
| 161 | (unless (memq article (cdr group-notifications)) | ||
| 162 | (with-current-buffer nntp-server-buffer | ||
| 163 | (gnus-request-head article group) | ||
| 164 | (article-decode-encoded-words) ; to decode mail addresses, subjects, etc | ||
| 165 | (let* ((address-components (mail-extract-address-components | ||
| 166 | (or (mail-fetch-field "From") ""))) | ||
| 167 | (address (cadr address-components))) | ||
| 168 | ;; Ignore mails from ourselves | ||
| 169 | (unless (gnus-string-match-p gnus-ignored-from-addresses | ||
| 170 | address) | ||
| 171 | (let* ((photo-file (gnus-notifications-get-photo-file address)) | ||
| 172 | (notification-id (gnus-notifications-notify | ||
| 173 | (or (car address-components) address) | ||
| 174 | (mail-fetch-field "Subject") | ||
| 175 | photo-file))) | ||
| 176 | (when notification-id | ||
| 177 | ;; Register that we did notify this message | ||
| 178 | (setcdr group-notifications (cons article (cdr group-notifications))) | ||
| 179 | (unless (eq notification-id t) | ||
| 180 | ;; Register the notification id for later actions | ||
| 181 | (add-to-list 'gnus-notifications-id-to-msg (list notification-id group article)))) | ||
| 182 | (when photo-file | ||
| 183 | (delete-file photo-file))))))))))))) | ||
| 184 | |||
| 185 | (provide 'gnus-notifications) | ||
| 186 | |||
| 187 | ;;; gnus-notifications.el ends here | ||
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index 68729da0910..091276ee4f8 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el | |||
| @@ -52,11 +52,13 @@ If RANGE is a single range, return (RANGE). Otherwise, return RANGE." | |||
| 52 | 52 | ||
| 53 | (defun gnus-set-difference (list1 list2) | 53 | (defun gnus-set-difference (list1 list2) |
| 54 | "Return a list of elements of LIST1 that do not appear in LIST2." | 54 | "Return a list of elements of LIST1 that do not appear in LIST2." |
| 55 | (let ((list1 (copy-sequence list1))) | 55 | (let ((hash2 (make-hash-table :test 'eq)) |
| 56 | (while list2 | 56 | (result nil)) |
| 57 | (setq list1 (delq (car list2) list1)) | 57 | (dolist (elt list2) (puthash elt t hash2)) |
| 58 | (setq list2 (cdr list2))) | 58 | (dolist (elt list1) |
| 59 | list1)) | 59 | (unless (gethash elt hash2) |
| 60 | (setq result (cons elt result)))) | ||
| 61 | (nreverse result))) | ||
| 60 | 62 | ||
| 61 | (defun gnus-range-nconcat (&rest ranges) | 63 | (defun gnus-range-nconcat (&rest ranges) |
| 62 | "Return a range comprising all the RANGES, which are pre-sorted. | 64 | "Return a range comprising all the RANGES, which are pre-sorted. |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 8aecc98ee86..71e00967548 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -1169,9 +1169,10 @@ data stored in the registry." | |||
| 1169 | 1169 | ||
| 1170 | ;; Try to activate the group. If that fails, just move | 1170 | ;; Try to activate the group. If that fails, just move |
| 1171 | ;; along. We may have more groups to work with | 1171 | ;; along. We may have more groups to work with |
| 1172 | (ignore-errors | 1172 | (when |
| 1173 | (gnus-select-group-with-message-id group message-id)) | 1173 | (ignore-errors |
| 1174 | (throw 'found t))))))) | 1174 | (gnus-select-group-with-message-id group message-id) t) |
| 1175 | (throw 'found t)))))))) | ||
| 1175 | 1176 | ||
| 1176 | ;; TODO: a few things | 1177 | ;; TODO: a few things |
| 1177 | 1178 | ||
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 06f17bcf646..b44b953bec6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9137,7 +9137,7 @@ To control what happens when you exit the group, see the | |||
| 9137 | (list (cons 'save-article-group ogroup)))) | 9137 | (list (cons 'save-article-group ogroup)))) |
| 9138 | (case-fold-search t) | 9138 | (case-fold-search t) |
| 9139 | (buf (current-buffer)) | 9139 | (buf (current-buffer)) |
| 9140 | dig to-address) | 9140 | dig to-address charset) |
| 9141 | (with-current-buffer gnus-original-article-buffer | 9141 | (with-current-buffer gnus-original-article-buffer |
| 9142 | ;; Have the digest group inherit the main mail address of | 9142 | ;; Have the digest group inherit the main mail address of |
| 9143 | ;; the parent article. | 9143 | ;; the parent article. |
| @@ -9150,16 +9150,32 @@ To control what happens when you exit the group, see the | |||
| 9150 | to-address)))))) | 9150 | to-address)))))) |
| 9151 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) | 9151 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) |
| 9152 | (insert-buffer-substring gnus-original-article-buffer) | 9152 | (insert-buffer-substring gnus-original-article-buffer) |
| 9153 | ;; Remove lines that may lead nndoc to misinterpret the | ||
| 9154 | ;; document type. | ||
| 9155 | (narrow-to-region | 9153 | (narrow-to-region |
| 9156 | (goto-char (point-min)) | 9154 | (goto-char (point-min)) |
| 9157 | (or (search-forward "\n\n" nil t) (point))) | 9155 | (or (search-forward "\n\n" nil t) (point))) |
| 9156 | ;; Remove lines that may lead nndoc to misinterpret the | ||
| 9157 | ;; document type. | ||
| 9158 | (goto-char (point-min)) | 9158 | (goto-char (point-min)) |
| 9159 | (delete-matching-lines "^Path:\\|^From ") | 9159 | (delete-matching-lines "^Path:\\|^From ") |
| 9160 | ;; Parse charset, and decode content transfer encoding. | ||
| 9161 | (setq charset (mail-content-type-get | ||
| 9162 | (mail-header-parse-content-type | ||
| 9163 | (or (gnus-fetch-field "content-type") "")) | ||
| 9164 | 'charset)) | ||
| 9165 | (let ((encoding (gnus-fetch-field "content-transfer-encoding"))) | ||
| 9166 | (when encoding | ||
| 9167 | (message-remove-header "content-transfer-encoding") | ||
| 9168 | (goto-char (point-max)) | ||
| 9169 | (widen) | ||
| 9170 | (narrow-to-region (point) (point-max)) | ||
| 9171 | (mm-decode-content-transfer-encoding | ||
| 9172 | (intern (downcase (mail-header-strip encoding)))))) | ||
| 9160 | (widen)) | 9173 | (widen)) |
| 9161 | (unwind-protect | 9174 | (unwind-protect |
| 9162 | (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset) | 9175 | (if (let ((gnus-newsgroup-ephemeral-charset |
| 9176 | (if charset | ||
| 9177 | (intern (downcase (gnus-strip-whitespace charset))) | ||
| 9178 | gnus-newsgroup-charset)) | ||
| 9163 | (gnus-newsgroup-ephemeral-ignored-charsets | 9179 | (gnus-newsgroup-ephemeral-ignored-charsets |
| 9164 | gnus-newsgroup-ignored-charsets)) | 9180 | gnus-newsgroup-ignored-charsets)) |
| 9165 | (gnus-group-read-ephemeral-group | 9181 | (gnus-group-read-ephemeral-group |
diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el index 15d94810c3a..ca8662ff936 100644 --- a/lisp/gnus/gnus-sync.el +++ b/lisp/gnus/gnus-sync.el | |||
| @@ -225,7 +225,7 @@ When SALT is nil, a random one will be generated using `random'." | |||
| 225 | (security-object (concat url "/_security")) | 225 | (security-object (concat url "/_security")) |
| 226 | (user-record `((names . [,user]) (roles . []))) | 226 | (user-record `((names . [,user]) (roles . []))) |
| 227 | (couch-user-name (format "org.couchdb.user:%s" user)) | 227 | (couch-user-name (format "org.couchdb.user:%s" user)) |
| 228 | (salt (or salt (sha1 (format "%s" (random t))))) | 228 | (salt (or salt (sha1 (format "%s" (random))))) |
| 229 | (couch-user-record | 229 | (couch-user-record |
| 230 | `((_id . ,couch-user-name) | 230 | `((_id . ,couch-user-name) |
| 231 | (type . user) | 231 | (type . user) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8fd89b1742c..18088423eb0 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -4820,9 +4820,7 @@ Do not use this for anything important, it is cryptographically weak." | |||
| 4820 | (require 'sha1) | 4820 | (require 'sha1) |
| 4821 | (let (sha1-maximum-internal-length) | 4821 | (let (sha1-maximum-internal-length) |
| 4822 | (sha1 (concat (message-unique-id) | 4822 | (sha1 (concat (message-unique-id) |
| 4823 | (format "%x%x%x" (random) | 4823 | (format "%x%x%x" (random) (random) (random)) |
| 4824 | (progn (random t) (random)) | ||
| 4825 | (random)) | ||
| 4826 | (prin1-to-string (recent-keys)) | 4824 | (prin1-to-string (recent-keys)) |
| 4827 | (prin1-to-string (garbage-collect)))))) | 4825 | (prin1-to-string (garbage-collect)))))) |
| 4828 | 4826 | ||
| @@ -5525,7 +5523,6 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." | |||
| 5525 | ;; You might for example insert a "." somewhere (not next to another dot | 5523 | ;; You might for example insert a "." somewhere (not next to another dot |
| 5526 | ;; or string boundary), or modify the "fsf" string. | 5524 | ;; or string boundary), or modify the "fsf" string. |
| 5527 | (defun message-unique-id () | 5525 | (defun message-unique-id () |
| 5528 | (random t) | ||
| 5529 | ;; Don't use microseconds from (current-time), they may be unsupported. | 5526 | ;; Don't use microseconds from (current-time), they may be unsupported. |
| 5530 | ;; Instead we use this randomly inited counter. | 5527 | ;; Instead we use this randomly inited counter. |
| 5531 | (setq message-unique-id-char | 5528 | (setq message-unique-id-char |
diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index c8481aa9dee..87252684a48 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el | |||
| @@ -53,7 +53,10 @@ them into characters should be done separately." | |||
| 53 | ;; or both of which are lowercase letters in "abcdef", is | 53 | ;; or both of which are lowercase letters in "abcdef", is |
| 54 | ;; formally illegal. A robust implementation might choose to | 54 | ;; formally illegal. A robust implementation might choose to |
| 55 | ;; recognize them as the corresponding uppercase letters.'' | 55 | ;; recognize them as the corresponding uppercase letters.'' |
| 56 | (let ((case-fold-search t)) | 56 | (let ((case-fold-search t) |
| 57 | (decode-hex #'(lambda (n1 n2) | ||
| 58 | (+ (* (if (<= n1 ?9) (- n1 ?0) (+ (- n1 ?A) 10)) 16) | ||
| 59 | (if (<= n2 ?9) (- n2 ?0) (+ (- n2 ?A) 10)))))) | ||
| 57 | (narrow-to-region from to) | 60 | (narrow-to-region from to) |
| 58 | ;; Do this in case we're called from Gnus, say, in a buffer | 61 | ;; Do this in case we're called from Gnus, say, in a buffer |
| 59 | ;; which already contains non-ASCII characters which would | 62 | ;; which already contains non-ASCII characters which would |
| @@ -65,12 +68,17 @@ them into characters should be done separately." | |||
| 65 | (not (eobp))) | 68 | (not (eobp))) |
| 66 | (cond ((eq (char-after (1+ (point))) ?\n) | 69 | (cond ((eq (char-after (1+ (point))) ?\n) |
| 67 | (delete-char 2)) | 70 | (delete-char 2)) |
| 68 | ((looking-at "=[0-9A-F][0-9A-F]") | 71 | ((looking-at "\\(=[0-9A-F][0-9A-F]\\)+") |
| 69 | (let ((byte (string-to-number (buffer-substring (1+ (point)) | 72 | ;; Decode this sequence at once; i.e. by a single |
| 70 | (+ 3 (point))) | 73 | ;; deletion and insertion. |
| 71 | 16))) | 74 | (let* ((n (/ (- (match-end 0) (point)) 3)) |
| 72 | (mm-insert-byte byte 1) | 75 | (str (make-string n 0))) |
| 73 | (delete-char 3))) | 76 | (dotimes (i n) |
| 77 | (aset str i (funcall decode-hex (char-after (1+ (point))) | ||
| 78 | (char-after (+ 2 (point))))) | ||
| 79 | (forward-char 3)) | ||
| 80 | (delete-region (match-beginning 0) (match-end 0)) | ||
| 81 | (insert str))) | ||
| 74 | (t | 82 | (t |
| 75 | (message "Malformed quoted-printable text") | 83 | (message "Malformed quoted-printable text") |
| 76 | (forward-char))))) | 84 | (forward-char))))) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 4b1480444c2..5791f1225c1 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -397,9 +397,11 @@ suitable file is found, return nil." | |||
| 397 | (if (member (event-modifiers (aref key 0)) '(nil (shift))) | 397 | (if (member (event-modifiers (aref key 0)) '(nil (shift))) |
| 398 | (push key non-modified-keys))) | 398 | (push key non-modified-keys))) |
| 399 | (when remapped | 399 | (when remapped |
| 400 | (princ "Its keys are remapped to `") | 400 | (princ "Its keys are remapped to ") |
| 401 | (princ (symbol-name remapped)) | 401 | (princ (if (symbolp remapped) |
| 402 | (princ "'.\n")) | 402 | (concat "`" (symbol-name remapped) "'") |
| 403 | "an anonymous command")) | ||
| 404 | (princ ".\n")) | ||
| 403 | 405 | ||
| 404 | (when keys | 406 | (when keys |
| 405 | (princ (if remapped | 407 | (princ (if remapped |
diff --git a/lisp/help.el b/lisp/help.el index 19cb811bcf5..9740f8996c1 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -39,9 +39,10 @@ | |||
| 39 | ;; `help-window-point-marker' is a marker you can move to a valid | 39 | ;; `help-window-point-marker' is a marker you can move to a valid |
| 40 | ;; position of the buffer shown in the help window in order to override | 40 | ;; position of the buffer shown in the help window in order to override |
| 41 | ;; the standard positioning mechanism (`point-min') chosen by | 41 | ;; the standard positioning mechanism (`point-min') chosen by |
| 42 | ;; `with-output-to-temp-buffer'. `with-help-window' has this point | 42 | ;; `with-output-to-temp-buffer' and `with-temp-buffer-window'. |
| 43 | ;; nowhere before exiting. Currently used by `view-lossage' to assert | 43 | ;; `with-help-window' has this point nowhere before exiting. Currently |
| 44 | ;; that the last keystrokes are always visible. | 44 | ;; used by `view-lossage' to assert that the last keystrokes are always |
| 45 | ;; visible. | ||
| 45 | (defvar help-window-point-marker (make-marker) | 46 | (defvar help-window-point-marker (make-marker) |
| 46 | "Marker to override default `window-point' in help windows.") | 47 | "Marker to override default `window-point' in help windows.") |
| 47 | 48 | ||
| @@ -145,10 +146,6 @@ specifies what to do when the user exits the help buffer." | |||
| 145 | ;; Secondly, the buffer has not been displayed yet, | 146 | ;; Secondly, the buffer has not been displayed yet, |
| 146 | ;; so we don't know whether its frame will be selected. | 147 | ;; so we don't know whether its frame will be selected. |
| 147 | nil) | 148 | nil) |
| 148 | (display-buffer-reuse-frames | ||
| 149 | (setq help-return-method (cons (selected-window) | ||
| 150 | 'quit-window)) | ||
| 151 | nil) | ||
| 152 | ((not (one-window-p t)) | 149 | ((not (one-window-p t)) |
| 153 | (setq help-return-method | 150 | (setq help-return-method |
| 154 | (cons (selected-window) 'quit-window)) | 151 | (cons (selected-window) 'quit-window)) |
| @@ -979,13 +976,13 @@ function is called, the window to be resized is selected." | |||
| 979 | :version "20.4") | 976 | :version "20.4") |
| 980 | 977 | ||
| 981 | (define-minor-mode temp-buffer-resize-mode | 978 | (define-minor-mode temp-buffer-resize-mode |
| 982 | "Toggle auto-shrinking temp buffer windows (Temp Buffer Resize mode). | 979 | "Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode). |
| 983 | With a prefix argument ARG, enable Temp Buffer Resize mode if ARG | 980 | With a prefix argument ARG, enable Temp Buffer Resize mode if ARG |
| 984 | is positive, and disable it otherwise. If called from Lisp, | 981 | is positive, and disable it otherwise. If called from Lisp, |
| 985 | enable the mode if ARG is omitted or nil. | 982 | enable the mode if ARG is omitted or nil. |
| 986 | 983 | ||
| 987 | When Temp Buffer Resize mode is enabled, the windows in which we | 984 | When Temp Buffer Resize mode is enabled, the windows in which we |
| 988 | show a temporary buffer are automatically reduced in height to | 985 | show a temporary buffer are automatically resized in height to |
| 989 | fit the buffer's contents, but never more than | 986 | fit the buffer's contents, but never more than |
| 990 | `temp-buffer-max-height' nor less than `window-min-height'. | 987 | `temp-buffer-max-height' nor less than `window-min-height'. |
| 991 | 988 | ||
| @@ -998,19 +995,22 @@ and some others." | |||
| 998 | (add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append) | 995 | (add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append) |
| 999 | (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) | 996 | (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) |
| 1000 | 997 | ||
| 1001 | (defun resize-temp-buffer-window () | 998 | (defun resize-temp-buffer-window (&optional window) |
| 1002 | "Resize the selected window to fit its contents. | 999 | "Resize WINDOW to fit its contents. |
| 1003 | Will not make it higher than `temp-buffer-max-height' nor smaller | 1000 | WINDOW can be any live window and defaults to the selected one. |
| 1004 | than `window-min-height'. Do nothing if the selected window is | 1001 | |
| 1005 | not vertically combined or some of its contents are scrolled out | 1002 | Do not make WINDOW higher than `temp-buffer-max-height' nor |
| 1006 | of view." | 1003 | smaller than `window-min-height'. Do nothing if WINDOW is not |
| 1007 | (when (and (pos-visible-in-window-p (point-min)) | 1004 | vertically combined or some of its contents are scrolled out of |
| 1008 | (window-combined-p)) | 1005 | view." |
| 1009 | (fit-window-to-buffer | 1006 | (setq window (window-normalize-window window t)) |
| 1010 | nil | 1007 | (let ((height (if (functionp temp-buffer-max-height) |
| 1011 | (if (functionp temp-buffer-max-height) | 1008 | (with-selected-window window |
| 1012 | (funcall temp-buffer-max-height (window-buffer)) | 1009 | (funcall temp-buffer-max-height (window-buffer))) |
| 1013 | temp-buffer-max-height)))) | 1010 | temp-buffer-max-height))) |
| 1011 | (when (and (pos-visible-in-window-p (point-min) window) | ||
| 1012 | (window-combined-p window)) | ||
| 1013 | (fit-window-to-buffer window height)))) | ||
| 1014 | 1014 | ||
| 1015 | ;;; Help windows. | 1015 | ;;; Help windows. |
| 1016 | (defcustom help-window-select 'other | 1016 | (defcustom help-window-select 'other |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 648c4c3b0af..c6e799252a2 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -2401,7 +2401,7 @@ Operations on marked buffers: | |||
| 2401 | buffer's file as an argument. | 2401 | buffer's file as an argument. |
| 2402 | '\\[ibuffer-do-eval]' - Evaluate a form in each of the marked buffers. This | 2402 | '\\[ibuffer-do-eval]' - Evaluate a form in each of the marked buffers. This |
| 2403 | is a very flexible command. For example, if you want to make all | 2403 | is a very flexible command. For example, if you want to make all |
| 2404 | of the marked buffers read only, try using (toggle-read-only 1) as | 2404 | of the marked buffers read only, try using (read-only-mode 1) as |
| 2405 | the input form. | 2405 | the input form. |
| 2406 | '\\[ibuffer-do-view-and-eval]' - As above, but view each buffer while the form | 2406 | '\\[ibuffer-do-view-and-eval]' - As above, but view each buffer while the form |
| 2407 | is evaluated. | 2407 | is evaluated. |
diff --git a/lisp/info.el b/lisp/info.el index 317cba86500..fe4afd72163 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -417,6 +417,21 @@ If number, the point is moved to the corresponding line.") | |||
| 417 | (defvar Info-standalone nil | 417 | (defvar Info-standalone nil |
| 418 | "Non-nil if Emacs was started solely as an Info browser.") | 418 | "Non-nil if Emacs was started solely as an Info browser.") |
| 419 | 419 | ||
| 420 | (defvar Info-file-attributes nil | ||
| 421 | "Alist of file attributes of visited Info files. | ||
| 422 | Each element is a list (FILE-NAME FILE-ATTRIBUTES...).") | ||
| 423 | |||
| 424 | (defvar Info-toc-nodes nil | ||
| 425 | "Alist of cached parent-children node information in visited Info files. | ||
| 426 | Each element is (FILE (NODE-NAME PARENT SECTION CHILDREN) ...) | ||
| 427 | where PARENT is the parent node extracted from the Up pointer, | ||
| 428 | SECTION is the section name in the Top node where this node is placed, | ||
| 429 | CHILDREN is a list of child nodes extracted from the node menu.") | ||
| 430 | |||
| 431 | (defvar Info-index-nodes nil | ||
| 432 | "Alist of cached index node names of visited Info files. | ||
| 433 | Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).") | ||
| 434 | |||
| 420 | (defvar Info-virtual-files nil | 435 | (defvar Info-virtual-files nil |
| 421 | "List of definitions of virtual Info files. | 436 | "List of definitions of virtual Info files. |
| 422 | Each element of the list has the format (FILENAME (OPERATION . HANDLER) ...) | 437 | Each element of the list has the format (FILENAME (OPERATION . HANDLER) ...) |
| @@ -609,7 +624,26 @@ Do the right thing if the file has been compressed or zipped." | |||
| 609 | (apply 'call-process-region (point-min) (point-max) | 624 | (apply 'call-process-region (point-min) (point-max) |
| 610 | (car decoder) t t nil (cdr decoder)))) | 625 | (car decoder) t t nil (cdr decoder)))) |
| 611 | (let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes | 626 | (let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes |
| 612 | (insert-file-contents fullname visit))))) | 627 | (insert-file-contents fullname visit))) |
| 628 | |||
| 629 | ;; Clear the caches of modified Info files. | ||
| 630 | (let* ((attribs-old (cdr (assoc fullname Info-file-attributes))) | ||
| 631 | (modtime-old (and attribs-old (nth 5 attribs-old))) | ||
| 632 | (attribs-new (and (stringp fullname) (file-attributes fullname))) | ||
| 633 | (modtime-new (and attribs-new (nth 5 attribs-new)))) | ||
| 634 | (when (and modtime-old modtime-new | ||
| 635 | (> (float-time modtime-new) (float-time modtime-old))) | ||
| 636 | (setq Info-index-nodes (remove (assoc (or Info-current-file filename) | ||
| 637 | Info-index-nodes) | ||
| 638 | Info-index-nodes)) | ||
| 639 | (setq Info-toc-nodes (remove (assoc (or Info-current-file filename) | ||
| 640 | Info-toc-nodes) | ||
| 641 | Info-toc-nodes))) | ||
| 642 | ;; Add new modtime to `Info-file-attributes'. | ||
| 643 | (setq Info-file-attributes | ||
| 644 | (cons (cons fullname attribs-new) | ||
| 645 | (remove (assoc fullname Info-file-attributes) | ||
| 646 | Info-file-attributes)))))) | ||
| 613 | 647 | ||
| 614 | (defun Info-file-supports-index-cookies (&optional file) | 648 | (defun Info-file-supports-index-cookies (&optional file) |
| 615 | "Return non-nil value if FILE supports Info index cookies. | 649 | "Return non-nil value if FILE supports Info index cookies. |
| @@ -2394,13 +2428,6 @@ Table of contents is created from the tree structure of menus." | |||
| 2394 | (message "") | 2428 | (message "") |
| 2395 | (nreverse nodes)))) | 2429 | (nreverse nodes)))) |
| 2396 | 2430 | ||
| 2397 | (defvar Info-toc-nodes nil | ||
| 2398 | "Alist of cached parent-children node information in visited Info files. | ||
| 2399 | Each element is (FILE (NODE-NAME PARENT SECTION CHILDREN) ...) | ||
| 2400 | where PARENT is the parent node extracted from the Up pointer, | ||
| 2401 | SECTION is the section name in the Top node where this node is placed, | ||
| 2402 | CHILDREN is a list of child nodes extracted from the node menu.") | ||
| 2403 | |||
| 2404 | (defun Info-toc-nodes (filename) | 2431 | (defun Info-toc-nodes (filename) |
| 2405 | "Return a node list of Info FILENAME with parent-children information. | 2432 | "Return a node list of Info FILENAME with parent-children information. |
| 2406 | This information is cached in the variable `Info-toc-nodes' with the help | 2433 | This information is cached in the variable `Info-toc-nodes' with the help |
| @@ -3032,10 +3059,6 @@ See `Info-scroll-down'." | |||
| 3032 | (if (looking-at "^\\* ") | 3059 | (if (looking-at "^\\* ") |
| 3033 | (forward-char 2))))) | 3060 | (forward-char 2))))) |
| 3034 | 3061 | ||
| 3035 | (defvar Info-index-nodes nil | ||
| 3036 | "Alist of cached index node names of visited Info files. | ||
| 3037 | Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).") | ||
| 3038 | |||
| 3039 | (defun Info-index-nodes (&optional file) | 3062 | (defun Info-index-nodes (&optional file) |
| 3040 | "Return a list of names of all index nodes in Info FILE. | 3063 | "Return a list of names of all index nodes in Info FILE. |
| 3041 | If FILE is omitted, it defaults to the current Info file. | 3064 | If FILE is omitted, it defaults to the current Info file. |
| @@ -4504,7 +4527,17 @@ first line or header line, and for breadcrumb links.") | |||
| 4504 | ((not (bobp)) | 4527 | ((not (bobp)) |
| 4505 | ;; Hide the punctuation at the end, too. | 4528 | ;; Hide the punctuation at the end, too. |
| 4506 | (skip-chars-backward " \t,") | 4529 | (skip-chars-backward " \t,") |
| 4507 | (put-text-property (point) header-end 'invisible t)))))) | 4530 | (put-text-property (point) header-end 'invisible t) |
| 4531 | ;; Hide the suffix of the Info file name. | ||
| 4532 | (beginning-of-line) | ||
| 4533 | (if (re-search-forward | ||
| 4534 | (format "File: %s\\([^,\n\t]+\\)," | ||
| 4535 | (if (stringp Info-current-file) | ||
| 4536 | (file-name-nondirectory Info-current-file) | ||
| 4537 | Info-current-file)) | ||
| 4538 | header-end t) | ||
| 4539 | (put-text-property (match-beginning 1) (match-end 1) | ||
| 4540 | 'invisible t))))))) | ||
| 4508 | 4541 | ||
| 4509 | ;; Fontify titles | 4542 | ;; Fontify titles |
| 4510 | (goto-char (point-min)) | 4543 | (goto-char (point-min)) |
| @@ -4792,6 +4825,12 @@ first line or header line, and for breadcrumb links.") | |||
| 4792 | mouse-face highlight | 4825 | mouse-face highlight |
| 4793 | help-echo "mouse-2: go to this URL")))) | 4826 | help-echo "mouse-2: go to this URL")))) |
| 4794 | 4827 | ||
| 4828 | ;; Hide empty lines at the end of the node. | ||
| 4829 | (goto-char (point-max)) | ||
| 4830 | (skip-chars-backward "\n") | ||
| 4831 | (when (< (1+ (point)) (point-max)) | ||
| 4832 | (put-text-property (1+ (point)) (point-max) 'invisible t)) | ||
| 4833 | |||
| 4795 | (set-buffer-modified-p nil)))) | 4834 | (set-buffer-modified-p nil)))) |
| 4796 | 4835 | ||
| 4797 | ;;; Speedbar support: | 4836 | ;;; Speedbar support: |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 9271ce32484..e6e0a01566a 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -111,17 +111,24 @@ string, and RET terminates editing and does a nonincremental search." | |||
| 111 | 111 | ||
| 112 | (defcustom search-whitespace-regexp (purecopy "\\s-+") | 112 | (defcustom search-whitespace-regexp (purecopy "\\s-+") |
| 113 | "If non-nil, regular expression to match a sequence of whitespace chars. | 113 | "If non-nil, regular expression to match a sequence of whitespace chars. |
| 114 | This applies to regular expression incremental search. | 114 | When you enter a space or spaces in the incremental search, it |
| 115 | When you put a space or spaces in the incremental regexp, it stands for | 115 | will match any sequence matched by this regexp. As an exception, |
| 116 | this, unless it is inside of a regexp construct such as [...] or *, + or ?. | 116 | spaces are treated normally in regexp incremental search if they |
| 117 | occur in a regexp construct like [...] or *, + or ?. | ||
| 118 | |||
| 119 | If the value is a string, it applies to both ordinary and | ||
| 120 | regexp incremental search. If the value is nil, or | ||
| 121 | `isearch-lax-whitespace' is nil for ordinary incremental search, or | ||
| 122 | `isearch-regexp-lax-whitespace' is nil for regexp incremental search, | ||
| 123 | then each space you type matches literally, against one space. | ||
| 124 | |||
| 117 | You might want to use something like \"[ \\t\\r\\n]+\" instead. | 125 | You might want to use something like \"[ \\t\\r\\n]+\" instead. |
| 118 | In the Customization buffer, that is `[' followed by a space, | 126 | In the Customization buffer, that is `[' followed by a space, |
| 119 | a tab, a carriage return (control-M), a newline, and `]+'. | 127 | a tab, a carriage return (control-M), a newline, and `]+'." |
| 120 | 128 | :type '(choice (const :tag "Match Spaces Literally" nil) | |
| 121 | When this is nil, each space you type matches literally, against one space." | ||
| 122 | :type '(choice (const :tag "Find Spaces Literally" nil) | ||
| 123 | regexp) | 129 | regexp) |
| 124 | :group 'isearch) | 130 | :group 'isearch |
| 131 | :version "24.3") | ||
| 125 | 132 | ||
| 126 | (defcustom search-invisible 'open | 133 | (defcustom search-invisible 'open |
| 127 | "If t incremental search can match hidden text. | 134 | "If t incremental search can match hidden text. |
| @@ -499,6 +506,7 @@ This is like `describe-bindings', but displays only Isearch keys." | |||
| 499 | (define-key map "\M-sr" 'isearch-toggle-regexp) | 506 | (define-key map "\M-sr" 'isearch-toggle-regexp) |
| 500 | (define-key map "\M-sw" 'isearch-toggle-word) | 507 | (define-key map "\M-sw" 'isearch-toggle-word) |
| 501 | (define-key map "\M-s_" 'isearch-toggle-symbol) | 508 | (define-key map "\M-s_" 'isearch-toggle-symbol) |
| 509 | (define-key map "\M-s " 'isearch-toggle-lax-whitespace) | ||
| 502 | 510 | ||
| 503 | (define-key map [?\M-%] 'isearch-query-replace) | 511 | (define-key map [?\M-%] 'isearch-query-replace) |
| 504 | (define-key map [?\C-\M-%] 'isearch-query-replace-regexp) | 512 | (define-key map [?\C-\M-%] 'isearch-query-replace-regexp) |
| @@ -541,6 +549,22 @@ convert the search string to a regexp used by regexp search functions. | |||
| 541 | The property `isearch-message-prefix' put on this function specifies the | 549 | The property `isearch-message-prefix' put on this function specifies the |
| 542 | prefix string displayed in the search message.") | 550 | prefix string displayed in the search message.") |
| 543 | 551 | ||
| 552 | (defvar isearch-lax-whitespace t | ||
| 553 | "If non-nil, a space will match a sequence of whitespace chars. | ||
| 554 | When you enter a space or spaces in ordinary incremental search, it | ||
| 555 | will match any sequence matched by the regexp defined by the variable | ||
| 556 | `search-whitespace-regexp'. If the value is nil, each space you type | ||
| 557 | matches literally, against one space. You can toggle the value of this | ||
| 558 | variable by the command `isearch-toggle-lax-whitespace'.") | ||
| 559 | |||
| 560 | (defvar isearch-regexp-lax-whitespace nil | ||
| 561 | "If non-nil, a space will match a sequence of whitespace chars. | ||
| 562 | When you enter a space or spaces in regexp incremental search, it | ||
| 563 | will match any sequence matched by the regexp defined by the variable | ||
| 564 | `search-whitespace-regexp'. If the value is nil, each space you type | ||
| 565 | matches literally, against one space. You can toggle the value of this | ||
| 566 | variable by the command `isearch-toggle-lax-whitespace'.") | ||
| 567 | |||
| 544 | (defvar isearch-cmds nil | 568 | (defvar isearch-cmds nil |
| 545 | "Stack of search status sets. | 569 | "Stack of search status sets. |
| 546 | Each set is a vector of the form: | 570 | Each set is a vector of the form: |
| @@ -666,6 +690,12 @@ Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity. | |||
| 666 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. | 690 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. |
| 667 | Type \\[isearch-toggle-word] to toggle word mode. | 691 | Type \\[isearch-toggle-word] to toggle word mode. |
| 668 | Type \\[isearch-toggle-symbol] to toggle symbol mode. | 692 | Type \\[isearch-toggle-symbol] to toggle symbol mode. |
| 693 | |||
| 694 | Type \\[isearch-toggle-lax-whitespace] to toggle whitespace matching. | ||
| 695 | In incremental searches, a space or spaces normally matches any whitespace | ||
| 696 | defined by the variable `search-whitespace-regexp'; see also the variables | ||
| 697 | `isearch-lax-whitespace' and `isearch-regexp-lax-whitespace'. | ||
| 698 | |||
| 669 | Type \\[isearch-edit-string] to edit the search string in the minibuffer. | 699 | Type \\[isearch-edit-string] to edit the search string in the minibuffer. |
| 670 | 700 | ||
| 671 | Also supported is a search ring of the previous 16 search strings. | 701 | Also supported is a search ring of the previous 16 search strings. |
| @@ -710,22 +740,20 @@ the calling function until the search is done." | |||
| 710 | (isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit))) | 740 | (isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit))) |
| 711 | 741 | ||
| 712 | (defun isearch-forward-regexp (&optional not-regexp no-recursive-edit) | 742 | (defun isearch-forward-regexp (&optional not-regexp no-recursive-edit) |
| 713 | "\ | 743 | "Do incremental search forward for regular expression. |
| 714 | Do incremental search forward for regular expression. | ||
| 715 | With a prefix argument, do a regular string search instead. | 744 | With a prefix argument, do a regular string search instead. |
| 716 | Like ordinary incremental search except that your input is treated | 745 | Like ordinary incremental search except that your input is treated |
| 717 | as a regexp. See the command `isearch-forward' for more information. | 746 | as a regexp. See the command `isearch-forward' for more information. |
| 718 | 747 | ||
| 719 | In regexp incremental searches, a space or spaces normally matches | 748 | In incremental searches, a space or spaces normally matches any |
| 720 | any whitespace (the variable `search-whitespace-regexp' controls | 749 | whitespace defined by the variable `search-whitespace-regexp'. |
| 721 | precisely what that means). If you want to search for a literal space | 750 | To search for a literal space and nothing else, enter C-q SPC. |
| 722 | and nothing else, enter C-q SPC." | 751 | To toggle whitespace matching, use `isearch-toggle-lax-whitespace'." |
| 723 | (interactive "P\np") | 752 | (interactive "P\np") |
| 724 | (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) | 753 | (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) |
| 725 | 754 | ||
| 726 | (defun isearch-forward-word (&optional not-word no-recursive-edit) | 755 | (defun isearch-forward-word (&optional not-word no-recursive-edit) |
| 727 | "\ | 756 | "Do incremental search forward for a sequence of words. |
| 728 | Do incremental search forward for a sequence of words. | ||
| 729 | With a prefix argument, do a regular string search instead. | 757 | With a prefix argument, do a regular string search instead. |
| 730 | Like ordinary incremental search except that your input is treated | 758 | Like ordinary incremental search except that your input is treated |
| 731 | as a sequence of words without regard to how the words are separated. | 759 | as a sequence of words without regard to how the words are separated. |
| @@ -734,8 +762,7 @@ See the command `isearch-forward' for more information." | |||
| 734 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) | 762 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) |
| 735 | 763 | ||
| 736 | (defun isearch-forward-symbol (&optional not-symbol no-recursive-edit) | 764 | (defun isearch-forward-symbol (&optional not-symbol no-recursive-edit) |
| 737 | "\ | 765 | "Do incremental search forward for a symbol. |
| 738 | Do incremental search forward for a symbol. | ||
| 739 | The prefix argument is currently unused. | 766 | The prefix argument is currently unused. |
| 740 | Like ordinary incremental search except that your input is treated | 767 | Like ordinary incremental search except that your input is treated |
| 741 | as a symbol surrounded by symbol boundary constructs \\_< and \\_>. | 768 | as a symbol surrounded by symbol boundary constructs \\_< and \\_>. |
| @@ -744,16 +771,14 @@ See the command `isearch-forward' for more information." | |||
| 744 | (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) | 771 | (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) |
| 745 | 772 | ||
| 746 | (defun isearch-backward (&optional regexp-p no-recursive-edit) | 773 | (defun isearch-backward (&optional regexp-p no-recursive-edit) |
| 747 | "\ | 774 | "Do incremental search backward. |
| 748 | Do incremental search backward. | ||
| 749 | With a prefix argument, do a regular expression search instead. | 775 | With a prefix argument, do a regular expression search instead. |
| 750 | See the command `isearch-forward' for more information." | 776 | See the command `isearch-forward' for more information." |
| 751 | (interactive "P\np") | 777 | (interactive "P\np") |
| 752 | (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) | 778 | (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) |
| 753 | 779 | ||
| 754 | (defun isearch-backward-regexp (&optional not-regexp no-recursive-edit) | 780 | (defun isearch-backward-regexp (&optional not-regexp no-recursive-edit) |
| 755 | "\ | 781 | "Do incremental search backward for regular expression. |
| 756 | Do incremental search backward for regular expression. | ||
| 757 | With a prefix argument, do a regular string search instead. | 782 | With a prefix argument, do a regular string search instead. |
| 758 | Like ordinary incremental search except that your input is treated | 783 | Like ordinary incremental search except that your input is treated |
| 759 | as a regexp. See the command `isearch-forward' for more information." | 784 | as a regexp. See the command `isearch-forward' for more information." |
| @@ -895,8 +920,7 @@ The last thing it does is to run `isearch-update-post-hook'." | |||
| 895 | (if (< isearch-other-end (point)) ; isearch-forward? | 920 | (if (< isearch-other-end (point)) ; isearch-forward? |
| 896 | (isearch-highlight isearch-other-end (point)) | 921 | (isearch-highlight isearch-other-end (point)) |
| 897 | (isearch-highlight (point) isearch-other-end)) | 922 | (isearch-highlight (point) isearch-other-end)) |
| 898 | (isearch-dehighlight)) | 923 | (isearch-dehighlight)))) |
| 899 | )) | ||
| 900 | (setq ;; quit-flag nil not for isearch-mode | 924 | (setq ;; quit-flag nil not for isearch-mode |
| 901 | isearch-adjusted nil | 925 | isearch-adjusted nil |
| 902 | isearch-yank-flag nil) | 926 | isearch-yank-flag nil) |
| @@ -1384,6 +1408,28 @@ Use `isearch-exit' to quit without signaling." | |||
| 1384 | (setq isearch-success t isearch-adjusted t) | 1408 | (setq isearch-success t isearch-adjusted t) |
| 1385 | (isearch-update)) | 1409 | (isearch-update)) |
| 1386 | 1410 | ||
| 1411 | (defun isearch-toggle-lax-whitespace () | ||
| 1412 | "Toggle whitespace matching in searching on or off. | ||
| 1413 | In ordinary search, toggles the value of the variable | ||
| 1414 | `isearch-lax-whitespace'. In regexp search, toggles the | ||
| 1415 | value of the variable `isearch-regexp-lax-whitespace'." | ||
| 1416 | (interactive) | ||
| 1417 | (if isearch-regexp | ||
| 1418 | (setq isearch-regexp-lax-whitespace (not isearch-regexp-lax-whitespace)) | ||
| 1419 | (setq isearch-lax-whitespace (not isearch-lax-whitespace))) | ||
| 1420 | (let ((message-log-max nil)) | ||
| 1421 | (message "%s%s [%s]" | ||
| 1422 | (isearch-message-prefix nil isearch-nonincremental) | ||
| 1423 | isearch-message | ||
| 1424 | (if (if isearch-regexp | ||
| 1425 | isearch-regexp-lax-whitespace | ||
| 1426 | isearch-lax-whitespace) | ||
| 1427 | "match spaces loosely" | ||
| 1428 | "match spaces literally"))) | ||
| 1429 | (setq isearch-success t isearch-adjusted t) | ||
| 1430 | (sit-for 1) | ||
| 1431 | (isearch-update)) | ||
| 1432 | |||
| 1387 | (defun isearch-toggle-case-fold () | 1433 | (defun isearch-toggle-case-fold () |
| 1388 | "Toggle case folding in searching on or off." | 1434 | "Toggle case folding in searching on or off." |
| 1389 | (interactive) | 1435 | (interactive) |
| @@ -1495,6 +1541,28 @@ If LAX is non-nil, the end of the string need not match a symbol boundary." | |||
| 1495 | 1541 | ||
| 1496 | (put 'isearch-symbol-regexp 'isearch-message-prefix "symbol ") | 1542 | (put 'isearch-symbol-regexp 'isearch-message-prefix "symbol ") |
| 1497 | 1543 | ||
| 1544 | ;; Search with lax whitespace | ||
| 1545 | |||
| 1546 | (defun search-forward-lax-whitespace (string &optional bound noerror count) | ||
| 1547 | "Search forward for STRING, matching a sequence of whitespace chars." | ||
| 1548 | (let ((search-spaces-regexp search-whitespace-regexp)) | ||
| 1549 | (re-search-forward (regexp-quote string) bound noerror count))) | ||
| 1550 | |||
| 1551 | (defun search-backward-lax-whitespace (string &optional bound noerror count) | ||
| 1552 | "Search backward for STRING, matching a sequence of whitespace chars." | ||
| 1553 | (let ((search-spaces-regexp search-whitespace-regexp)) | ||
| 1554 | (re-search-backward (regexp-quote string) bound noerror count))) | ||
| 1555 | |||
| 1556 | (defun re-search-forward-lax-whitespace (regexp &optional bound noerror count) | ||
| 1557 | "Search forward for REGEXP, matching a sequence of whitespace chars." | ||
| 1558 | (let ((search-spaces-regexp search-whitespace-regexp)) | ||
| 1559 | (re-search-forward regexp bound noerror count))) | ||
| 1560 | |||
| 1561 | (defun re-search-backward-lax-whitespace (regexp &optional bound noerror count) | ||
| 1562 | "Search backward for REGEXP, matching a sequence of whitespace chars." | ||
| 1563 | (let ((search-spaces-regexp search-whitespace-regexp)) | ||
| 1564 | (re-search-backward regexp bound noerror count))) | ||
| 1565 | |||
| 1498 | 1566 | ||
| 1499 | (defun isearch-query-replace (&optional delimited regexp-flag) | 1567 | (defun isearch-query-replace (&optional delimited regexp-flag) |
| 1500 | "Start `query-replace' with string to replace from last search string. | 1568 | "Start `query-replace' with string to replace from last search string. |
| @@ -1511,6 +1579,14 @@ way to run word replacements from Isearch is `M-s w ... M-%'." | |||
| 1511 | ;; set `search-upper-case' to nil to not call | 1579 | ;; set `search-upper-case' to nil to not call |
| 1512 | ;; `isearch-no-upper-case-p' in `perform-replace' | 1580 | ;; `isearch-no-upper-case-p' in `perform-replace' |
| 1513 | (search-upper-case nil) | 1581 | (search-upper-case nil) |
| 1582 | (replace-search-function | ||
| 1583 | (if (and isearch-lax-whitespace (not regexp-flag)) | ||
| 1584 | #'search-forward-lax-whitespace | ||
| 1585 | replace-search-function)) | ||
| 1586 | (replace-re-search-function | ||
| 1587 | (if (and isearch-regexp-lax-whitespace regexp-flag) | ||
| 1588 | #'re-search-forward-lax-whitespace | ||
| 1589 | replace-re-search-function)) | ||
| 1514 | ;; Set `isearch-recursive-edit' to nil to prevent calling | 1590 | ;; Set `isearch-recursive-edit' to nil to prevent calling |
| 1515 | ;; `exit-recursive-edit' in `isearch-done' that terminates | 1591 | ;; `exit-recursive-edit' in `isearch-done' that terminates |
| 1516 | ;; the execution of this command when it is non-nil. | 1592 | ;; the execution of this command when it is non-nil. |
| @@ -1586,7 +1662,11 @@ characters in that string." | |||
| 1586 | ;; Set `search-upper-case' to nil to not call | 1662 | ;; Set `search-upper-case' to nil to not call |
| 1587 | ;; `isearch-no-upper-case-p' in `occur-1'. | 1663 | ;; `isearch-no-upper-case-p' in `occur-1'. |
| 1588 | (search-upper-case nil) | 1664 | (search-upper-case nil) |
| 1589 | (search-spaces-regexp (if isearch-regexp search-whitespace-regexp))) | 1665 | (search-spaces-regexp |
| 1666 | (if (if isearch-regexp | ||
| 1667 | isearch-regexp-lax-whitespace | ||
| 1668 | isearch-lax-whitespace) | ||
| 1669 | search-whitespace-regexp))) | ||
| 1590 | (occur regexp nlines))) | 1670 | (occur regexp nlines))) |
| 1591 | 1671 | ||
| 1592 | (declare-function hi-lock-read-face-name "hi-lock" ()) | 1672 | (declare-function hi-lock-read-face-name "hi-lock" ()) |
| @@ -2183,7 +2263,7 @@ Isearch mode." | |||
| 2183 | ;; Assume character codes 0200 - 0377 stand for characters in some | 2263 | ;; Assume character codes 0200 - 0377 stand for characters in some |
| 2184 | ;; single-byte character set, and convert them to Emacs | 2264 | ;; single-byte character set, and convert them to Emacs |
| 2185 | ;; characters. | 2265 | ;; characters. |
| 2186 | (if (and isearch-regexp (= char ?\s)) | 2266 | (if (and isearch-regexp isearch-regexp-lax-whitespace (= char ?\s)) |
| 2187 | (if (subregexp-context-p isearch-string (length isearch-string)) | 2267 | (if (subregexp-context-p isearch-string (length isearch-string)) |
| 2188 | (isearch-process-search-string "[ ]" " ") | 2268 | (isearch-process-search-string "[ ]" " ") |
| 2189 | (isearch-process-search-char char)) | 2269 | (isearch-process-search-char char)) |
| @@ -2423,8 +2503,17 @@ Can be changed via `isearch-search-fun-function' for special needs." | |||
| 2423 | (funcall isearch-word string lax) | 2503 | (funcall isearch-word string lax) |
| 2424 | (word-search-regexp string lax)) | 2504 | (word-search-regexp string lax)) |
| 2425 | bound noerror count)))) | 2505 | bound noerror count)))) |
| 2506 | ((and isearch-regexp isearch-regexp-lax-whitespace | ||
| 2507 | search-whitespace-regexp) | ||
| 2508 | (if isearch-forward | ||
| 2509 | 're-search-forward-lax-whitespace | ||
| 2510 | 're-search-backward-lax-whitespace)) | ||
| 2426 | (isearch-regexp | 2511 | (isearch-regexp |
| 2427 | (if isearch-forward 're-search-forward 're-search-backward)) | 2512 | (if isearch-forward 're-search-forward 're-search-backward)) |
| 2513 | ((and isearch-lax-whitespace search-whitespace-regexp) | ||
| 2514 | (if isearch-forward | ||
| 2515 | 'search-forward-lax-whitespace | ||
| 2516 | 'search-backward-lax-whitespace)) | ||
| 2428 | (t | 2517 | (t |
| 2429 | (if isearch-forward 'search-forward 'search-backward)))) | 2518 | (if isearch-forward 'search-forward 'search-backward)))) |
| 2430 | 2519 | ||
| @@ -2487,7 +2576,6 @@ update the match data, and return point." | |||
| 2487 | search-invisible)) | 2576 | search-invisible)) |
| 2488 | (inhibit-quit nil) | 2577 | (inhibit-quit nil) |
| 2489 | (case-fold-search isearch-case-fold-search) | 2578 | (case-fold-search isearch-case-fold-search) |
| 2490 | (search-spaces-regexp search-whitespace-regexp) | ||
| 2491 | (retry t)) | 2579 | (retry t)) |
| 2492 | (setq isearch-error nil) | 2580 | (setq isearch-error nil) |
| 2493 | (while retry | 2581 | (while retry |
| @@ -2779,7 +2867,8 @@ since they have special meaning in a regexp." | |||
| 2779 | (defvar isearch-lazy-highlight-window-end nil) | 2867 | (defvar isearch-lazy-highlight-window-end nil) |
| 2780 | (defvar isearch-lazy-highlight-case-fold-search nil) | 2868 | (defvar isearch-lazy-highlight-case-fold-search nil) |
| 2781 | (defvar isearch-lazy-highlight-regexp nil) | 2869 | (defvar isearch-lazy-highlight-regexp nil) |
| 2782 | (defvar isearch-lazy-highlight-space-regexp nil) | 2870 | (defvar isearch-lazy-highlight-lax-whitespace nil) |
| 2871 | (defvar isearch-lazy-highlight-regexp-lax-whitespace nil) | ||
| 2783 | (defvar isearch-lazy-highlight-word nil) | 2872 | (defvar isearch-lazy-highlight-word nil) |
| 2784 | (defvar isearch-lazy-highlight-forward nil) | 2873 | (defvar isearch-lazy-highlight-forward nil) |
| 2785 | (defvar isearch-lazy-highlight-error nil) | 2874 | (defvar isearch-lazy-highlight-error nil) |
| @@ -2821,6 +2910,10 @@ by other Emacs features." | |||
| 2821 | isearch-regexp)) | 2910 | isearch-regexp)) |
| 2822 | (not (eq isearch-lazy-highlight-word | 2911 | (not (eq isearch-lazy-highlight-word |
| 2823 | isearch-word)) | 2912 | isearch-word)) |
| 2913 | (not (eq isearch-lazy-highlight-lax-whitespace | ||
| 2914 | isearch-lax-whitespace)) | ||
| 2915 | (not (eq isearch-lazy-highlight-regexp-lax-whitespace | ||
| 2916 | isearch-regexp-lax-whitespace)) | ||
| 2824 | (not (= (window-start) | 2917 | (not (= (window-start) |
| 2825 | isearch-lazy-highlight-window-start)) | 2918 | isearch-lazy-highlight-window-start)) |
| 2826 | (not (= (window-end) ; Window may have been split/joined. | 2919 | (not (= (window-end) ; Window may have been split/joined. |
| @@ -2847,7 +2940,8 @@ by other Emacs features." | |||
| 2847 | isearch-lazy-highlight-last-string isearch-string | 2940 | isearch-lazy-highlight-last-string isearch-string |
| 2848 | isearch-lazy-highlight-case-fold-search isearch-case-fold-search | 2941 | isearch-lazy-highlight-case-fold-search isearch-case-fold-search |
| 2849 | isearch-lazy-highlight-regexp isearch-regexp | 2942 | isearch-lazy-highlight-regexp isearch-regexp |
| 2850 | isearch-lazy-highlight-space-regexp search-whitespace-regexp | 2943 | isearch-lazy-highlight-lax-whitespace isearch-lax-whitespace |
| 2944 | isearch-lazy-highlight-regexp-lax-whitespace isearch-regexp-lax-whitespace | ||
| 2851 | isearch-lazy-highlight-word isearch-word | 2945 | isearch-lazy-highlight-word isearch-word |
| 2852 | isearch-lazy-highlight-forward isearch-forward) | 2946 | isearch-lazy-highlight-forward isearch-forward) |
| 2853 | (unless (equal isearch-string "") | 2947 | (unless (equal isearch-string "") |
| @@ -2861,7 +2955,6 @@ Attempt to do the search exactly the way the pending Isearch would." | |||
| 2861 | (condition-case nil | 2955 | (condition-case nil |
| 2862 | (let ((case-fold-search isearch-lazy-highlight-case-fold-search) | 2956 | (let ((case-fold-search isearch-lazy-highlight-case-fold-search) |
| 2863 | (isearch-regexp isearch-lazy-highlight-regexp) | 2957 | (isearch-regexp isearch-lazy-highlight-regexp) |
| 2864 | (search-spaces-regexp isearch-lazy-highlight-space-regexp) | ||
| 2865 | (isearch-word isearch-lazy-highlight-word) | 2958 | (isearch-word isearch-lazy-highlight-word) |
| 2866 | (search-invisible nil) ; don't match invisible text | 2959 | (search-invisible nil) ; don't match invisible text |
| 2867 | (retry t) | 2960 | (retry t) |
diff --git a/lisp/json.el b/lisp/json.el index 468358ccd1a..f1ee3a52032 100644 --- a/lisp/json.el +++ b/lisp/json.el | |||
| @@ -174,6 +174,10 @@ this around your call to `json-read' instead of `setq'ing it.") | |||
| 174 | (put 'json-string-format 'error-conditions | 174 | (put 'json-string-format 'error-conditions |
| 175 | '(json-string-format json-error error)) | 175 | '(json-string-format json-error error)) |
| 176 | 176 | ||
| 177 | (put 'json-key-format 'error-message "Bad JSON object key") | ||
| 178 | (put 'json-key-format 'error-conditions | ||
| 179 | '(json-key-format json-error error)) | ||
| 180 | |||
| 177 | (put 'json-object-format 'error-message "Bad JSON object") | 181 | (put 'json-object-format 'error-message "Bad JSON object") |
| 178 | (put 'json-object-format 'error-conditions | 182 | (put 'json-object-format 'error-conditions |
| 179 | '(json-object-format json-error error)) | 183 | '(json-object-format json-error error)) |
| @@ -321,6 +325,15 @@ representation will be parsed correctly." | |||
| 321 | "Return a JSON representation of STRING." | 325 | "Return a JSON representation of STRING." |
| 322 | (format "\"%s\"" (mapconcat 'json-encode-char string ""))) | 326 | (format "\"%s\"" (mapconcat 'json-encode-char string ""))) |
| 323 | 327 | ||
| 328 | (defun json-encode-key (object) | ||
| 329 | "Return a JSON representation of OBJECT. | ||
| 330 | If the resulting JSON object isn't a valid JSON object key, | ||
| 331 | this signals `json-key-format'." | ||
| 332 | (let ((encoded (json-encode object))) | ||
| 333 | (unless (stringp (json-read-from-string encoded)) | ||
| 334 | (signal 'json-key-format (list object))) | ||
| 335 | encoded)) | ||
| 336 | |||
| 324 | ;;; JSON Objects | 337 | ;;; JSON Objects |
| 325 | 338 | ||
| 326 | (defun json-new-object () | 339 | (defun json-new-object () |
| @@ -395,7 +408,7 @@ Please see the documentation of `json-object-type' and `json-key-type'." | |||
| 395 | (maphash | 408 | (maphash |
| 396 | (lambda (k v) | 409 | (lambda (k v) |
| 397 | (push (format "%s:%s" | 410 | (push (format "%s:%s" |
| 398 | (json-encode k) | 411 | (json-encode-key k) |
| 399 | (json-encode v)) | 412 | (json-encode v)) |
| 400 | r)) | 413 | r)) |
| 401 | hash-table) | 414 | hash-table) |
| @@ -409,7 +422,7 @@ Please see the documentation of `json-object-type' and `json-key-type'." | |||
| 409 | (format "{%s}" | 422 | (format "{%s}" |
| 410 | (json-join (mapcar (lambda (cons) | 423 | (json-join (mapcar (lambda (cons) |
| 411 | (format "%s:%s" | 424 | (format "%s:%s" |
| 412 | (json-encode (car cons)) | 425 | (json-encode-key (car cons)) |
| 413 | (json-encode (cdr cons)))) | 426 | (json-encode (cdr cons)))) |
| 414 | alist) | 427 | alist) |
| 415 | ", "))) | 428 | ", "))) |
| @@ -418,7 +431,7 @@ Please see the documentation of `json-object-type' and `json-key-type'." | |||
| 418 | "Return a JSON representation of PLIST." | 431 | "Return a JSON representation of PLIST." |
| 419 | (let (result) | 432 | (let (result) |
| 420 | (while plist | 433 | (while plist |
| 421 | (push (concat (json-encode (car plist)) | 434 | (push (concat (json-encode-key (car plist)) |
| 422 | ":" | 435 | ":" |
| 423 | (json-encode (cadr plist))) | 436 | (json-encode (cadr plist))) |
| 424 | result) | 437 | result) |
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 8b7a0ab3e6f..7b515a69a1c 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best | 6 | ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best |
| 7 | ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" | 7 | ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" |
| 8 | ;;;;;; "play/5x5.el" (20478 3673 653810 0)) | 8 | ;;;;;; "play/5x5.el" (20545 57511 257469 0)) |
| 9 | ;;; Generated autoloads from play/5x5.el | 9 | ;;; Generated autoloads from play/5x5.el |
| 10 | 10 | ||
| 11 | (autoload '5x5 "5x5" "\ | 11 | (autoload '5x5 "5x5" "\ |
| @@ -114,7 +114,7 @@ Completion is available. | |||
| 114 | ;;;;;; add-change-log-entry-other-window add-change-log-entry find-change-log | 114 | ;;;;;; add-change-log-entry-other-window add-change-log-entry find-change-log |
| 115 | ;;;;;; prompt-for-change-log-name add-log-mailing-address add-log-full-name | 115 | ;;;;;; prompt-for-change-log-name add-log-mailing-address add-log-full-name |
| 116 | ;;;;;; add-log-current-defun-function) "add-log" "vc/add-log.el" | 116 | ;;;;;; add-log-current-defun-function) "add-log" "vc/add-log.el" |
| 117 | ;;;;;; (20495 51111 757560 0)) | 117 | ;;;;;; (20523 62082 997685 0)) |
| 118 | ;;; Generated autoloads from vc/add-log.el | 118 | ;;; Generated autoloads from vc/add-log.el |
| 119 | 119 | ||
| 120 | (put 'change-log-default-name 'safe-local-variable 'string-or-null-p) | 120 | (put 'change-log-default-name 'safe-local-variable 'string-or-null-p) |
| @@ -398,7 +398,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) | |||
| 398 | 398 | ||
| 399 | ;;;### (autoloads (align-newline-and-indent align-unhighlight-rule | 399 | ;;;### (autoloads (align-newline-and-indent align-unhighlight-rule |
| 400 | ;;;;;; align-highlight-rule align-current align-entire align-regexp | 400 | ;;;;;; align-highlight-rule align-current align-entire align-regexp |
| 401 | ;;;;;; align) "align" "align.el" (20355 10021 546955 0)) | 401 | ;;;;;; align) "align" "align.el" (20515 36389 544939 0)) |
| 402 | ;;; Generated autoloads from align.el | 402 | ;;; Generated autoloads from align.el |
| 403 | 403 | ||
| 404 | (autoload 'align "align" "\ | 404 | (autoload 'align "align" "\ |
| @@ -489,7 +489,7 @@ A replacement function for `newline-and-indent', aligning as it goes. | |||
| 489 | 489 | ||
| 490 | ;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation | 490 | ;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation |
| 491 | ;;;;;; allout-setup allout-auto-activation-helper) "allout" "allout.el" | 491 | ;;;;;; allout-setup allout-auto-activation-helper) "allout" "allout.el" |
| 492 | ;;;;;; (20399 35365 4050 0)) | 492 | ;;;;;; (20523 62082 997685 0)) |
| 493 | ;;; Generated autoloads from allout.el | 493 | ;;; Generated autoloads from allout.el |
| 494 | 494 | ||
| 495 | (autoload 'allout-auto-activation-helper "allout" "\ | 495 | (autoload 'allout-auto-activation-helper "allout" "\ |
| @@ -850,7 +850,7 @@ for details on preparing Emacs for automatic allout activation. | |||
| 850 | 850 | ||
| 851 | ;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation | 851 | ;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation |
| 852 | ;;;;;; allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el" | 852 | ;;;;;; allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el" |
| 853 | ;;;;;; (20437 50597 545250 0)) | 853 | ;;;;;; (20545 57511 257469 0)) |
| 854 | ;;; Generated autoloads from allout-widgets.el | 854 | ;;; Generated autoloads from allout-widgets.el |
| 855 | 855 | ||
| 856 | (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) | 856 | (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) |
| @@ -932,7 +932,7 @@ directory, so that Emacs will know its current contents. | |||
| 932 | ;;;*** | 932 | ;;;*** |
| 933 | 933 | ||
| 934 | ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) | 934 | ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) |
| 935 | ;;;;;; "animate" "play/animate.el" (20355 10021 546955 0)) | 935 | ;;;;;; "animate" "play/animate.el" (20545 57511 257469 0)) |
| 936 | ;;; Generated autoloads from play/animate.el | 936 | ;;; Generated autoloads from play/animate.el |
| 937 | 937 | ||
| 938 | (autoload 'animate-string "animate" "\ | 938 | (autoload 'animate-string "animate" "\ |
| @@ -965,7 +965,7 @@ the buffer *Birthday-Present-for-Name*. | |||
| 965 | ;;;*** | 965 | ;;;*** |
| 966 | 966 | ||
| 967 | ;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) | 967 | ;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) |
| 968 | ;;;;;; "ansi-color" "ansi-color.el" (20453 38823 158957 0)) | 968 | ;;;;;; "ansi-color" "ansi-color.el" (20523 30501 603360 0)) |
| 969 | ;;; Generated autoloads from ansi-color.el | 969 | ;;; Generated autoloads from ansi-color.el |
| 970 | 970 | ||
| 971 | (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ | 971 | (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ |
| @@ -1051,8 +1051,8 @@ ARG is positive, otherwise off. | |||
| 1051 | 1051 | ||
| 1052 | ;;;### (autoloads (apropos-documentation apropos-value apropos-library | 1052 | ;;;### (autoloads (apropos-documentation apropos-value apropos-library |
| 1053 | ;;;;;; apropos apropos-documentation-property apropos-command apropos-variable | 1053 | ;;;;;; apropos apropos-documentation-property apropos-command apropos-variable |
| 1054 | ;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20497 6436 | 1054 | ;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20523 62082 |
| 1055 | ;;;;;; 957082 0)) | 1055 | ;;;;;; 997685 0)) |
| 1056 | ;;; Generated autoloads from apropos.el | 1056 | ;;; Generated autoloads from apropos.el |
| 1057 | 1057 | ||
| 1058 | (autoload 'apropos-read-pattern "apropos" "\ | 1058 | (autoload 'apropos-read-pattern "apropos" "\ |
| @@ -1253,8 +1253,8 @@ Entering array mode calls the function `array-mode-hook'. | |||
| 1253 | 1253 | ||
| 1254 | ;;;*** | 1254 | ;;;*** |
| 1255 | 1255 | ||
| 1256 | ;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20357 | 1256 | ;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20513 |
| 1257 | ;;;;;; 58785 834364 0)) | 1257 | ;;;;;; 18948 537867 0)) |
| 1258 | ;;; Generated autoloads from textmodes/artist.el | 1258 | ;;; Generated autoloads from textmodes/artist.el |
| 1259 | 1259 | ||
| 1260 | (autoload 'artist-mode "artist" "\ | 1260 | (autoload 'artist-mode "artist" "\ |
| @@ -1488,7 +1488,7 @@ Special commands: | |||
| 1488 | ;;;*** | 1488 | ;;;*** |
| 1489 | 1489 | ||
| 1490 | ;;;### (autoloads (auth-source-cache-expiry) "auth-source" "gnus/auth-source.el" | 1490 | ;;;### (autoloads (auth-source-cache-expiry) "auth-source" "gnus/auth-source.el" |
| 1491 | ;;;;;; (20502 24369 261101 0)) | 1491 | ;;;;;; (20544 36659 880486 0)) |
| 1492 | ;;; Generated autoloads from gnus/auth-source.el | 1492 | ;;; Generated autoloads from gnus/auth-source.el |
| 1493 | 1493 | ||
| 1494 | (defvar auth-source-cache-expiry 7200 "\ | 1494 | (defvar auth-source-cache-expiry 7200 "\ |
| @@ -1562,7 +1562,7 @@ This is similar to `autoarg-mode' but rebinds the keypad keys | |||
| 1562 | ;;;*** | 1562 | ;;;*** |
| 1563 | 1563 | ||
| 1564 | ;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el" | 1564 | ;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el" |
| 1565 | ;;;;;; (20505 550 96420 0)) | 1565 | ;;;;;; (20513 18948 537867 0)) |
| 1566 | ;;; Generated autoloads from progmodes/autoconf.el | 1566 | ;;; Generated autoloads from progmodes/autoconf.el |
| 1567 | 1567 | ||
| 1568 | (autoload 'autoconf-mode "autoconf" "\ | 1568 | (autoload 'autoconf-mode "autoconf" "\ |
| @@ -1613,7 +1613,7 @@ insert a template for the file depending on the mode of the buffer. | |||
| 1613 | 1613 | ||
| 1614 | ;;;### (autoloads (batch-update-autoloads update-directory-autoloads | 1614 | ;;;### (autoloads (batch-update-autoloads update-directory-autoloads |
| 1615 | ;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el" | 1615 | ;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el" |
| 1616 | ;;;;;; (20497 6436 957082 0)) | 1616 | ;;;;;; (20518 12580 46478 0)) |
| 1617 | ;;; Generated autoloads from emacs-lisp/autoload.el | 1617 | ;;; Generated autoloads from emacs-lisp/autoload.el |
| 1618 | 1618 | ||
| 1619 | (put 'generated-autoload-file 'safe-local-variable 'stringp) | 1619 | (put 'generated-autoload-file 'safe-local-variable 'stringp) |
| @@ -1989,8 +1989,8 @@ Binhex decode region between START and END. | |||
| 1989 | 1989 | ||
| 1990 | ;;;*** | 1990 | ;;;*** |
| 1991 | 1991 | ||
| 1992 | ;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20355 | 1992 | ;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20545 |
| 1993 | ;;;;;; 10021 546955 0)) | 1993 | ;;;;;; 57511 257469 0)) |
| 1994 | ;;; Generated autoloads from play/blackbox.el | 1994 | ;;; Generated autoloads from play/blackbox.el |
| 1995 | 1995 | ||
| 1996 | (autoload 'blackbox "blackbox" "\ | 1996 | (autoload 'blackbox "blackbox" "\ |
| @@ -2113,7 +2113,7 @@ a reflection. | |||
| 2113 | ;;;;;; bookmark-save bookmark-write bookmark-delete bookmark-insert | 2113 | ;;;;;; bookmark-save bookmark-write bookmark-delete bookmark-insert |
| 2114 | ;;;;;; bookmark-rename bookmark-insert-location bookmark-relocate | 2114 | ;;;;;; bookmark-rename bookmark-insert-location bookmark-relocate |
| 2115 | ;;;;;; bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark" | 2115 | ;;;;;; bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark" |
| 2116 | ;;;;;; "bookmark.el" (20476 31768 298871 0)) | 2116 | ;;;;;; "bookmark.el" (20514 15527 107017 0)) |
| 2117 | ;;; Generated autoloads from bookmark.el | 2117 | ;;; Generated autoloads from bookmark.el |
| 2118 | (define-key ctl-x-r-map "b" 'bookmark-jump) | 2118 | (define-key ctl-x-r-map "b" 'bookmark-jump) |
| 2119 | (define-key ctl-x-r-map "m" 'bookmark-set) | 2119 | (define-key ctl-x-r-map "m" 'bookmark-set) |
| @@ -2630,7 +2630,7 @@ from `browse-url-elinks-wrapper'. | |||
| 2630 | ;;;*** | 2630 | ;;;*** |
| 2631 | 2631 | ||
| 2632 | ;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next) | 2632 | ;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next) |
| 2633 | ;;;;;; "bs" "bs.el" (20479 62884 77836 0)) | 2633 | ;;;;;; "bs" "bs.el" (20520 54308 826101 0)) |
| 2634 | ;;; Generated autoloads from bs.el | 2634 | ;;; Generated autoloads from bs.el |
| 2635 | 2635 | ||
| 2636 | (autoload 'bs-cycle-next "bs" "\ | 2636 | (autoload 'bs-cycle-next "bs" "\ |
| @@ -2693,7 +2693,7 @@ columns on its right towards the left. | |||
| 2693 | ;;;*** | 2693 | ;;;*** |
| 2694 | 2694 | ||
| 2695 | ;;;### (autoloads (bug-reference-prog-mode bug-reference-mode) "bug-reference" | 2695 | ;;;### (autoloads (bug-reference-prog-mode bug-reference-mode) "bug-reference" |
| 2696 | ;;;;;; "progmodes/bug-reference.el" (20490 33188 850375 0)) | 2696 | ;;;;;; "progmodes/bug-reference.el" (20532 45476 981297 0)) |
| 2697 | ;;; Generated autoloads from progmodes/bug-reference.el | 2697 | ;;; Generated autoloads from progmodes/bug-reference.el |
| 2698 | 2698 | ||
| 2699 | (put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format))))) | 2699 | (put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format))))) |
| @@ -2717,7 +2717,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings. | |||
| 2717 | ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile | 2717 | ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile |
| 2718 | ;;;;;; compile-defun byte-compile-file byte-recompile-directory | 2718 | ;;;;;; compile-defun byte-compile-file byte-recompile-directory |
| 2719 | ;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning) | 2719 | ;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning) |
| 2720 | ;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20497 6436 957082 0)) | 2720 | ;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20522 38631 876994 556000)) |
| 2721 | ;;; Generated autoloads from emacs-lisp/bytecomp.el | 2721 | ;;; Generated autoloads from emacs-lisp/bytecomp.el |
| 2722 | (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) | 2722 | (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) |
| 2723 | (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) | 2723 | (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) |
| @@ -4129,8 +4129,8 @@ For example, the function `case' has an indent property | |||
| 4129 | 4129 | ||
| 4130 | ;;;*** | 4130 | ;;;*** |
| 4131 | 4131 | ||
| 4132 | ;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20478 3673 | 4132 | ;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20541 60450 |
| 4133 | ;;;;;; 653810 0)) | 4133 | ;;;;;; 834170 0)) |
| 4134 | ;;; Generated autoloads from emacs-lisp/cl-lib.el | 4134 | ;;; Generated autoloads from emacs-lisp/cl-lib.el |
| 4135 | 4135 | ||
| 4136 | (define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3") | 4136 | (define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3") |
| @@ -4199,8 +4199,8 @@ is run). | |||
| 4199 | 4199 | ||
| 4200 | ;;;*** | 4200 | ;;;*** |
| 4201 | 4201 | ||
| 4202 | ;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20355 10021 | 4202 | ;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20522 9637 |
| 4203 | ;;;;;; 546955 0)) | 4203 | ;;;;;; 465791 0)) |
| 4204 | ;;; Generated autoloads from color.el | 4204 | ;;; Generated autoloads from color.el |
| 4205 | 4205 | ||
| 4206 | (autoload 'color-name-to-rgb "color" "\ | 4206 | (autoload 'color-name-to-rgb "color" "\ |
| @@ -4222,7 +4222,7 @@ If FRAME cannot display COLOR, return nil. | |||
| 4222 | ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list | 4222 | ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list |
| 4223 | ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command | 4223 | ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command |
| 4224 | ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" | 4224 | ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" |
| 4225 | ;;;;;; (20476 31768 298871 0)) | 4225 | ;;;;;; (20523 62082 997685 0)) |
| 4226 | ;;; Generated autoloads from comint.el | 4226 | ;;; Generated autoloads from comint.el |
| 4227 | 4227 | ||
| 4228 | (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ | 4228 | (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ |
| @@ -4359,8 +4359,8 @@ on third call it again advances points to the next difference and so on. | |||
| 4359 | ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start | 4359 | ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start |
| 4360 | ;;;;;; compile compilation-disable-input compile-command compilation-search-path | 4360 | ;;;;;; compile compilation-disable-input compile-command compilation-search-path |
| 4361 | ;;;;;; compilation-ask-about-save compilation-window-height compilation-start-hook | 4361 | ;;;;;; compilation-ask-about-save compilation-window-height compilation-start-hook |
| 4362 | ;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20478 | 4362 | ;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20543 |
| 4363 | ;;;;;; 3673 653810 0)) | 4363 | ;;;;;; 15782 195452 0)) |
| 4364 | ;;; Generated autoloads from progmodes/compile.el | 4364 | ;;; Generated autoloads from progmodes/compile.el |
| 4365 | 4365 | ||
| 4366 | (defvar compilation-mode-hook nil "\ | 4366 | (defvar compilation-mode-hook nil "\ |
| @@ -4723,7 +4723,7 @@ For details see `conf-mode'. Example: | |||
| 4723 | ;;;*** | 4723 | ;;;*** |
| 4724 | 4724 | ||
| 4725 | ;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) | 4725 | ;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) |
| 4726 | ;;;;;; "cookie1" "play/cookie1.el" (20364 27900 192709 741000)) | 4726 | ;;;;;; "cookie1" "play/cookie1.el" (20545 57511 257469 0)) |
| 4727 | ;;; Generated autoloads from play/cookie1.el | 4727 | ;;; Generated autoloads from play/cookie1.el |
| 4728 | 4728 | ||
| 4729 | (autoload 'cookie "cookie1" "\ | 4729 | (autoload 'cookie "cookie1" "\ |
| @@ -4755,8 +4755,8 @@ Randomly permute the elements of VECTOR (all permutations equally likely). | |||
| 4755 | ;;;*** | 4755 | ;;;*** |
| 4756 | 4756 | ||
| 4757 | ;;;### (autoloads (copyright-update-directory copyright copyright-fix-years | 4757 | ;;;### (autoloads (copyright-update-directory copyright copyright-fix-years |
| 4758 | ;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20387 | 4758 | ;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20518 |
| 4759 | ;;;;;; 44199 24128 0)) | 4759 | ;;;;;; 12580 46478 0)) |
| 4760 | ;;; Generated autoloads from emacs-lisp/copyright.el | 4760 | ;;; Generated autoloads from emacs-lisp/copyright.el |
| 4761 | (put 'copyright-at-end-flag 'safe-local-variable 'booleanp) | 4761 | (put 'copyright-at-end-flag 'safe-local-variable 'booleanp) |
| 4762 | (put 'copyright-names-regexp 'safe-local-variable 'stringp) | 4762 | (put 'copyright-names-regexp 'safe-local-variable 'stringp) |
| @@ -4795,7 +4795,7 @@ If FIX is non-nil, run `copyright-fix-years' instead. | |||
| 4795 | ;;;*** | 4795 | ;;;*** |
| 4796 | 4796 | ||
| 4797 | ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) | 4797 | ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) |
| 4798 | ;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20490 33188 850375 | 4798 | ;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20512 60198 306109 |
| 4799 | ;;;;;; 0)) | 4799 | ;;;;;; 0)) |
| 4800 | ;;; Generated autoloads from progmodes/cperl-mode.el | 4800 | ;;; Generated autoloads from progmodes/cperl-mode.el |
| 4801 | (put 'cperl-indent-level 'safe-local-variable 'integerp) | 4801 | (put 'cperl-indent-level 'safe-local-variable 'integerp) |
| @@ -5014,7 +5014,7 @@ Edit display information for cpp conditionals. | |||
| 5014 | ;;;*** | 5014 | ;;;*** |
| 5015 | 5015 | ||
| 5016 | ;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el" | 5016 | ;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el" |
| 5017 | ;;;;;; (20476 31768 298871 0)) | 5017 | ;;;;;; (20523 62082 997685 0)) |
| 5018 | ;;; Generated autoloads from emulation/crisp.el | 5018 | ;;; Generated autoloads from emulation/crisp.el |
| 5019 | 5019 | ||
| 5020 | (defvar crisp-mode nil "\ | 5020 | (defvar crisp-mode nil "\ |
| @@ -5147,7 +5147,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. | |||
| 5147 | ;;;;;; customize-mode customize customize-push-and-save customize-save-variable | 5147 | ;;;;;; customize-mode customize customize-push-and-save customize-save-variable |
| 5148 | ;;;;;; customize-set-variable customize-set-value custom-menu-sort-alphabetically | 5148 | ;;;;;; customize-set-variable customize-set-value custom-menu-sort-alphabetically |
| 5149 | ;;;;;; custom-buffer-sort-alphabetically custom-browse-sort-alphabetically) | 5149 | ;;;;;; custom-buffer-sort-alphabetically custom-browse-sort-alphabetically) |
| 5150 | ;;;;;; "cus-edit" "cus-edit.el" (20437 50597 545250 0)) | 5150 | ;;;;;; "cus-edit" "cus-edit.el" (20523 62082 997685 0)) |
| 5151 | ;;; Generated autoloads from cus-edit.el | 5151 | ;;; Generated autoloads from cus-edit.el |
| 5152 | 5152 | ||
| 5153 | (defvar custom-browse-sort-alphabetically nil "\ | 5153 | (defvar custom-browse-sort-alphabetically nil "\ |
| @@ -5642,8 +5642,8 @@ Create a new data-debug buffer with NAME. | |||
| 5642 | 5642 | ||
| 5643 | ;;;*** | 5643 | ;;;*** |
| 5644 | 5644 | ||
| 5645 | ;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20476 | 5645 | ;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20523 |
| 5646 | ;;;;;; 31768 298871 0)) | 5646 | ;;;;;; 62082 997685 0)) |
| 5647 | ;;; Generated autoloads from net/dbus.el | 5647 | ;;; Generated autoloads from net/dbus.el |
| 5648 | 5648 | ||
| 5649 | (autoload 'dbus-handle-event "dbus" "\ | 5649 | (autoload 'dbus-handle-event "dbus" "\ |
| @@ -5934,8 +5934,8 @@ with no args, if that value is non-nil. | |||
| 5934 | 5934 | ||
| 5935 | ;;;*** | 5935 | ;;;*** |
| 5936 | 5936 | ||
| 5937 | ;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20355 | 5937 | ;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20515 |
| 5938 | ;;;;;; 10021 546955 0)) | 5938 | ;;;;;; 36389 544939 0)) |
| 5939 | ;;; Generated autoloads from delsel.el | 5939 | ;;; Generated autoloads from delsel.el |
| 5940 | 5940 | ||
| 5941 | (defalias 'pending-delete-mode 'delete-selection-mode) | 5941 | (defalias 'pending-delete-mode 'delete-selection-mode) |
| @@ -6032,7 +6032,7 @@ the first time the mode is used. | |||
| 6032 | ;;;*** | 6032 | ;;;*** |
| 6033 | 6033 | ||
| 6034 | ;;;### (autoloads (describe-char describe-text-properties) "descr-text" | 6034 | ;;;### (autoloads (describe-char describe-text-properties) "descr-text" |
| 6035 | ;;;;;; "descr-text.el" (20486 36135 22104 0)) | 6035 | ;;;;;; "descr-text.el" (20530 32114 546307 0)) |
| 6036 | ;;; Generated autoloads from descr-text.el | 6036 | ;;; Generated autoloads from descr-text.el |
| 6037 | 6037 | ||
| 6038 | (autoload 'describe-text-properties "descr-text" "\ | 6038 | (autoload 'describe-text-properties "descr-text" "\ |
| @@ -6289,7 +6289,7 @@ Deuglify broken Outlook (Express) articles and redisplay. | |||
| 6289 | ;;;*** | 6289 | ;;;*** |
| 6290 | 6290 | ||
| 6291 | ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" | 6291 | ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" |
| 6292 | ;;;;;; "calendar/diary-lib.el" (20355 10021 546955 0)) | 6292 | ;;;;;; "calendar/diary-lib.el" (20530 32124 97707 678000)) |
| 6293 | ;;; Generated autoloads from calendar/diary-lib.el | 6293 | ;;; Generated autoloads from calendar/diary-lib.el |
| 6294 | 6294 | ||
| 6295 | (autoload 'diary "diary-lib" "\ | 6295 | (autoload 'diary "diary-lib" "\ |
| @@ -6376,7 +6376,7 @@ This requires the external program `diff' to be in your `exec-path'. | |||
| 6376 | ;;;*** | 6376 | ;;;*** |
| 6377 | 6377 | ||
| 6378 | ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "vc/diff-mode.el" | 6378 | ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "vc/diff-mode.el" |
| 6379 | ;;;;;; (20476 31768 298871 0)) | 6379 | ;;;;;; (20523 62082 997685 0)) |
| 6380 | ;;; Generated autoloads from vc/diff-mode.el | 6380 | ;;; Generated autoloads from vc/diff-mode.el |
| 6381 | 6381 | ||
| 6382 | (autoload 'diff-mode "diff-mode" "\ | 6382 | (autoload 'diff-mode "diff-mode" "\ |
| @@ -6420,8 +6420,8 @@ Optional arguments are passed to `dig-invoke'. | |||
| 6420 | ;;;*** | 6420 | ;;;*** |
| 6421 | 6421 | ||
| 6422 | ;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window | 6422 | ;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window |
| 6423 | ;;;;;; dired dired-listing-switches) "dired" "dired.el" (20486 36135 | 6423 | ;;;;;; dired dired-listing-switches) "dired" "dired.el" (20539 18737 |
| 6424 | ;;;;;; 22104 0)) | 6424 | ;;;;;; 159373 0)) |
| 6425 | ;;; Generated autoloads from dired.el | 6425 | ;;; Generated autoloads from dired.el |
| 6426 | 6426 | ||
| 6427 | (defvar dired-listing-switches (purecopy "-al") "\ | 6427 | (defvar dired-listing-switches (purecopy "-al") "\ |
| @@ -6715,7 +6715,7 @@ in `.emacs'. | |||
| 6715 | ;;;*** | 6715 | ;;;*** |
| 6716 | 6716 | ||
| 6717 | ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" | 6717 | ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" |
| 6718 | ;;;;;; (20355 10021 546955 0)) | 6718 | ;;;;;; (20545 57511 257469 0)) |
| 6719 | ;;; Generated autoloads from play/dissociate.el | 6719 | ;;; Generated autoloads from play/dissociate.el |
| 6720 | 6720 | ||
| 6721 | (autoload 'dissociated-press "dissociate" "\ | 6721 | (autoload 'dissociated-press "dissociate" "\ |
| @@ -6824,8 +6824,8 @@ See the command `doc-view-mode' for more information on this mode. | |||
| 6824 | 6824 | ||
| 6825 | ;;;*** | 6825 | ;;;*** |
| 6826 | 6826 | ||
| 6827 | ;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20443 2992 | 6827 | ;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20545 57511 |
| 6828 | ;;;;;; 177196 0)) | 6828 | ;;;;;; 257469 0)) |
| 6829 | ;;; Generated autoloads from play/doctor.el | 6829 | ;;; Generated autoloads from play/doctor.el |
| 6830 | 6830 | ||
| 6831 | (autoload 'doctor "doctor" "\ | 6831 | (autoload 'doctor "doctor" "\ |
| @@ -6852,8 +6852,8 @@ strings when pressed twice. See `double-map' for details. | |||
| 6852 | 6852 | ||
| 6853 | ;;;*** | 6853 | ;;;*** |
| 6854 | 6854 | ||
| 6855 | ;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20355 10021 | 6855 | ;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20545 57511 |
| 6856 | ;;;;;; 546955 0)) | 6856 | ;;;;;; 257469 0)) |
| 6857 | ;;; Generated autoloads from play/dunnet.el | 6857 | ;;; Generated autoloads from play/dunnet.el |
| 6858 | 6858 | ||
| 6859 | (autoload 'dunnet "dunnet" "\ | 6859 | (autoload 'dunnet "dunnet" "\ |
| @@ -7574,7 +7574,7 @@ Display statistics for a class tree. | |||
| 7574 | ;;;*** | 7574 | ;;;*** |
| 7575 | 7575 | ||
| 7576 | ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el" | 7576 | ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el" |
| 7577 | ;;;;;; (20436 29731 313079 0)) | 7577 | ;;;;;; (20523 62082 997685 0)) |
| 7578 | ;;; Generated autoloads from ebuff-menu.el | 7578 | ;;; Generated autoloads from ebuff-menu.el |
| 7579 | 7579 | ||
| 7580 | (autoload 'electric-buffer-list "ebuff-menu" "\ | 7580 | (autoload 'electric-buffer-list "ebuff-menu" "\ |
| @@ -7657,7 +7657,7 @@ an EDE controlled project. | |||
| 7657 | 7657 | ||
| 7658 | ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form | 7658 | ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form |
| 7659 | ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" | 7659 | ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" |
| 7660 | ;;;;;; "emacs-lisp/edebug.el" (20497 6436 957082 0)) | 7660 | ;;;;;; "emacs-lisp/edebug.el" (20523 62082 997685 0)) |
| 7661 | ;;; Generated autoloads from emacs-lisp/edebug.el | 7661 | ;;; Generated autoloads from emacs-lisp/edebug.el |
| 7662 | 7662 | ||
| 7663 | (defvar edebug-all-defs nil "\ | 7663 | (defvar edebug-all-defs nil "\ |
| @@ -8319,7 +8319,7 @@ displayed. | |||
| 8319 | ;;;*** | 8319 | ;;;*** |
| 8320 | 8320 | ||
| 8321 | ;;;### (autoloads (emacs-lock-mode) "emacs-lock" "emacs-lock.el" | 8321 | ;;;### (autoloads (emacs-lock-mode) "emacs-lock" "emacs-lock.el" |
| 8322 | ;;;;;; (20399 35365 4050 0)) | 8322 | ;;;;;; (20523 62082 997685 0)) |
| 8323 | ;;; Generated autoloads from emacs-lock.el | 8323 | ;;; Generated autoloads from emacs-lock.el |
| 8324 | 8324 | ||
| 8325 | (autoload 'emacs-lock-mode "emacs-lock" "\ | 8325 | (autoload 'emacs-lock-mode "emacs-lock" "\ |
| @@ -8347,7 +8347,7 @@ Other values are interpreted as usual. | |||
| 8347 | ;;;*** | 8347 | ;;;*** |
| 8348 | 8348 | ||
| 8349 | ;;;### (autoloads (report-emacs-bug-query-existing-bugs report-emacs-bug) | 8349 | ;;;### (autoloads (report-emacs-bug-query-existing-bugs report-emacs-bug) |
| 8350 | ;;;;;; "emacsbug" "mail/emacsbug.el" (20495 51111 757560 0)) | 8350 | ;;;;;; "emacsbug" "mail/emacsbug.el" (20523 62082 997685 0)) |
| 8351 | ;;; Generated autoloads from mail/emacsbug.el | 8351 | ;;; Generated autoloads from mail/emacsbug.el |
| 8352 | 8352 | ||
| 8353 | (autoload 'report-emacs-bug "emacsbug" "\ | 8353 | (autoload 'report-emacs-bug "emacsbug" "\ |
| @@ -8800,7 +8800,7 @@ Look at CONFIG and try to expand GROUP. | |||
| 8800 | ;;;*** | 8800 | ;;;*** |
| 8801 | 8801 | ||
| 8802 | ;;;### (autoloads (erc-handle-irc-url erc-tls erc erc-select-read-args) | 8802 | ;;;### (autoloads (erc-handle-irc-url erc-tls erc erc-select-read-args) |
| 8803 | ;;;;;; "erc" "erc/erc.el" (20444 23842 968143 0)) | 8803 | ;;;;;; "erc" "erc/erc.el" (20530 32114 546307 0)) |
| 8804 | ;;; Generated autoloads from erc/erc.el | 8804 | ;;; Generated autoloads from erc/erc.el |
| 8805 | 8805 | ||
| 8806 | (autoload 'erc-select-read-args "erc" "\ | 8806 | (autoload 'erc-select-read-args "erc" "\ |
| @@ -8877,7 +8877,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. | |||
| 8877 | ;;;*** | 8877 | ;;;*** |
| 8878 | 8878 | ||
| 8879 | ;;;### (autoloads (erc-ctcp-query-DCC pcomplete/erc-mode/DCC erc-cmd-DCC) | 8879 | ;;;### (autoloads (erc-ctcp-query-DCC pcomplete/erc-mode/DCC erc-cmd-DCC) |
| 8880 | ;;;;;; "erc-dcc" "erc/erc-dcc.el" (20439 5925 915283 0)) | 8880 | ;;;;;; "erc-dcc" "erc/erc-dcc.el" (20523 62082 997685 0)) |
| 8881 | ;;; Generated autoloads from erc/erc-dcc.el | 8881 | ;;; Generated autoloads from erc/erc-dcc.el |
| 8882 | (autoload 'erc-dcc-mode "erc-dcc") | 8882 | (autoload 'erc-dcc-mode "erc-dcc") |
| 8883 | 8883 | ||
| @@ -9018,7 +9018,7 @@ system. | |||
| 9018 | 9018 | ||
| 9019 | ;;;*** | 9019 | ;;;*** |
| 9020 | 9020 | ||
| 9021 | ;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20356 2211 532900 | 9021 | ;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20532 45476 981297 |
| 9022 | ;;;;;; 0)) | 9022 | ;;;;;; 0)) |
| 9023 | ;;; Generated autoloads from erc/erc-join.el | 9023 | ;;; Generated autoloads from erc/erc-join.el |
| 9024 | (autoload 'erc-autojoin-mode "erc-join" nil t) | 9024 | (autoload 'erc-autojoin-mode "erc-join" nil t) |
| @@ -9065,7 +9065,7 @@ You can save every individual message by putting this function on | |||
| 9065 | ;;;### (autoloads (erc-delete-dangerous-host erc-add-dangerous-host | 9065 | ;;;### (autoloads (erc-delete-dangerous-host erc-add-dangerous-host |
| 9066 | ;;;;;; erc-delete-keyword erc-add-keyword erc-delete-fool erc-add-fool | 9066 | ;;;;;; erc-delete-keyword erc-add-keyword erc-delete-fool erc-add-fool |
| 9067 | ;;;;;; erc-delete-pal erc-add-pal) "erc-match" "erc/erc-match.el" | 9067 | ;;;;;; erc-delete-pal erc-add-pal) "erc-match" "erc/erc-match.el" |
| 9068 | ;;;;;; (20434 17809 692608 0)) | 9068 | ;;;;;; (20531 24613 995935 0)) |
| 9069 | ;;; Generated autoloads from erc/erc-match.el | 9069 | ;;; Generated autoloads from erc/erc-match.el |
| 9070 | (autoload 'erc-match-mode "erc-match") | 9070 | (autoload 'erc-match-mode "erc-match") |
| 9071 | 9071 | ||
| @@ -9393,8 +9393,8 @@ Kill all test buffers that are still live. | |||
| 9393 | 9393 | ||
| 9394 | ;;;*** | 9394 | ;;;*** |
| 9395 | 9395 | ||
| 9396 | ;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20427 | 9396 | ;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20523 |
| 9397 | ;;;;;; 14766 970343 0)) | 9397 | ;;;;;; 62082 997685 0)) |
| 9398 | ;;; Generated autoloads from eshell/esh-mode.el | 9398 | ;;; Generated autoloads from eshell/esh-mode.el |
| 9399 | 9399 | ||
| 9400 | (autoload 'eshell-mode "esh-mode" "\ | 9400 | (autoload 'eshell-mode "esh-mode" "\ |
| @@ -9407,7 +9407,7 @@ Emacs shell interactive mode. | |||
| 9407 | ;;;*** | 9407 | ;;;*** |
| 9408 | 9408 | ||
| 9409 | ;;;### (autoloads (eshell-command-result eshell-command eshell) "eshell" | 9409 | ;;;### (autoloads (eshell-command-result eshell-command eshell) "eshell" |
| 9410 | ;;;;;; "eshell/eshell.el" (20478 3673 653810 0)) | 9410 | ;;;;;; "eshell/eshell.el" (20523 62082 997685 0)) |
| 9411 | ;;; Generated autoloads from eshell/eshell.el | 9411 | ;;; Generated autoloads from eshell/eshell.el |
| 9412 | 9412 | ||
| 9413 | (autoload 'eshell "eshell" "\ | 9413 | (autoload 'eshell "eshell" "\ |
| @@ -10085,7 +10085,7 @@ fourth arg NOSEP non-nil inhibits this. | |||
| 10085 | ;;;### (autoloads (executable-make-buffer-file-executable-if-script-p | 10085 | ;;;### (autoloads (executable-make-buffer-file-executable-if-script-p |
| 10086 | ;;;;;; executable-self-display executable-set-magic executable-interpret | 10086 | ;;;;;; executable-self-display executable-set-magic executable-interpret |
| 10087 | ;;;;;; executable-command-find-posix-p) "executable" "progmodes/executable.el" | 10087 | ;;;;;; executable-command-find-posix-p) "executable" "progmodes/executable.el" |
| 10088 | ;;;;;; (20355 10021 546955 0)) | 10088 | ;;;;;; (20533 6181 437016 717000)) |
| 10089 | ;;; Generated autoloads from progmodes/executable.el | 10089 | ;;; Generated autoloads from progmodes/executable.el |
| 10090 | 10090 | ||
| 10091 | (autoload 'executable-command-find-posix-p "executable" "\ | 10091 | (autoload 'executable-command-find-posix-p "executable" "\ |
| @@ -10464,7 +10464,7 @@ you can set `feedmail-queue-reminder-alist' to nil. | |||
| 10464 | 10464 | ||
| 10465 | ;;;### (autoloads (ffap-bindings ffap-guess-file-name-at-point dired-at-point | 10465 | ;;;### (autoloads (ffap-bindings ffap-guess-file-name-at-point dired-at-point |
| 10466 | ;;;;;; ffap-at-mouse ffap-menu find-file-at-point ffap-next) "ffap" | 10466 | ;;;;;; ffap-at-mouse ffap-menu find-file-at-point ffap-next) "ffap" |
| 10467 | ;;;;;; "ffap.el" (20479 62884 77836 0)) | 10467 | ;;;;;; "ffap.el" (20542 46798 773957 0)) |
| 10468 | ;;; Generated autoloads from ffap.el | 10468 | ;;; Generated autoloads from ffap.el |
| 10469 | 10469 | ||
| 10470 | (autoload 'ffap-next "ffap" "\ | 10470 | (autoload 'ffap-next "ffap" "\ |
| @@ -11422,7 +11422,7 @@ and choose the directory as the fortune-file. | |||
| 11422 | ;;;*** | 11422 | ;;;*** |
| 11423 | 11423 | ||
| 11424 | ;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el" | 11424 | ;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el" |
| 11425 | ;;;;;; (20501 3499 284800 0)) | 11425 | ;;;;;; (20537 63402 936234 0)) |
| 11426 | ;;; Generated autoloads from progmodes/gdb-mi.el | 11426 | ;;; Generated autoloads from progmodes/gdb-mi.el |
| 11427 | 11427 | ||
| 11428 | (defvar gdb-enable-debug nil "\ | 11428 | (defvar gdb-enable-debug nil "\ |
| @@ -11705,7 +11705,7 @@ prompt the user for the name of an NNTP server to use. | |||
| 11705 | ;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group | 11705 | ;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group |
| 11706 | ;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize | 11706 | ;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize |
| 11707 | ;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent" | 11707 | ;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent" |
| 11708 | ;;;;;; "gnus/gnus-agent.el" (20458 56750 651721 0)) | 11708 | ;;;;;; "gnus/gnus-agent.el" (20518 12580 46478 0)) |
| 11709 | ;;; Generated autoloads from gnus/gnus-agent.el | 11709 | ;;; Generated autoloads from gnus/gnus-agent.el |
| 11710 | 11710 | ||
| 11711 | (autoload 'gnus-unplugged "gnus-agent" "\ | 11711 | (autoload 'gnus-unplugged "gnus-agent" "\ |
| @@ -11796,7 +11796,7 @@ If CLEAN, obsolete (ignore). | |||
| 11796 | ;;;*** | 11796 | ;;;*** |
| 11797 | 11797 | ||
| 11798 | ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" | 11798 | ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" |
| 11799 | ;;;;;; (20497 6436 957082 0)) | 11799 | ;;;;;; (20522 9637 465791 0)) |
| 11800 | ;;; Generated autoloads from gnus/gnus-art.el | 11800 | ;;; Generated autoloads from gnus/gnus-art.el |
| 11801 | 11801 | ||
| 11802 | (autoload 'gnus-article-prepare-display "gnus-art" "\ | 11802 | (autoload 'gnus-article-prepare-display "gnus-art" "\ |
| @@ -12191,7 +12191,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: | |||
| 12191 | ;;;*** | 12191 | ;;;*** |
| 12192 | 12192 | ||
| 12193 | ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) | 12193 | ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) |
| 12194 | ;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20495 51111 757560 0)) | 12194 | ;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20533 5993 500881 0)) |
| 12195 | ;;; Generated autoloads from gnus/gnus-msg.el | 12195 | ;;; Generated autoloads from gnus/gnus-msg.el |
| 12196 | 12196 | ||
| 12197 | (autoload 'gnus-msg-mail "gnus-msg" "\ | 12197 | (autoload 'gnus-msg-mail "gnus-msg" "\ |
| @@ -12217,9 +12217,26 @@ Like `message-reply'. | |||
| 12217 | 12217 | ||
| 12218 | ;;;*** | 12218 | ;;;*** |
| 12219 | 12219 | ||
| 12220 | ;;;### (autoloads (gnus-notifications) "gnus-notifications" "gnus/gnus-notifications.el" | ||
| 12221 | ;;;;;; (20544 36659 880486 0)) | ||
| 12222 | ;;; Generated autoloads from gnus/gnus-notifications.el | ||
| 12223 | |||
| 12224 | (autoload 'gnus-notifications "gnus-notifications" "\ | ||
| 12225 | Send a notification on new message. | ||
| 12226 | This check for new messages that are in group with a level lower | ||
| 12227 | or equal to `gnus-notifications-minimum-level' and send a | ||
| 12228 | notification using `notifications-notify' for it. | ||
| 12229 | |||
| 12230 | This is typically a function to add in | ||
| 12231 | `gnus-after-getting-new-news-hook' | ||
| 12232 | |||
| 12233 | \(fn)" nil nil) | ||
| 12234 | |||
| 12235 | ;;;*** | ||
| 12236 | |||
| 12220 | ;;;### (autoloads (gnus-treat-newsgroups-picon gnus-treat-mail-picon | 12237 | ;;;### (autoloads (gnus-treat-newsgroups-picon gnus-treat-mail-picon |
| 12221 | ;;;;;; gnus-treat-from-picon) "gnus-picon" "gnus/gnus-picon.el" | 12238 | ;;;;;; gnus-treat-from-picon) "gnus-picon" "gnus/gnus-picon.el" |
| 12222 | ;;;;;; (20458 56750 651721 0)) | 12239 | ;;;;;; (20523 62082 997685 0)) |
| 12223 | ;;; Generated autoloads from gnus/gnus-picon.el | 12240 | ;;; Generated autoloads from gnus/gnus-picon.el |
| 12224 | 12241 | ||
| 12225 | (autoload 'gnus-treat-from-picon "gnus-picon" "\ | 12242 | (autoload 'gnus-treat-from-picon "gnus-picon" "\ |
| @@ -12246,7 +12263,7 @@ If picons are already displayed, remove them. | |||
| 12246 | ;;;;;; gnus-sorted-nintersection gnus-sorted-range-intersection | 12263 | ;;;;;; gnus-sorted-nintersection gnus-sorted-range-intersection |
| 12247 | ;;;;;; gnus-sorted-intersection gnus-intersection gnus-sorted-complement | 12264 | ;;;;;; gnus-sorted-intersection gnus-intersection gnus-sorted-complement |
| 12248 | ;;;;;; gnus-sorted-ndifference gnus-sorted-difference) "gnus-range" | 12265 | ;;;;;; gnus-sorted-ndifference gnus-sorted-difference) "gnus-range" |
| 12249 | ;;;;;; "gnus/gnus-range.el" (20495 51111 757560 0)) | 12266 | ;;;;;; "gnus/gnus-range.el" (20544 36659 880486 0)) |
| 12250 | ;;; Generated autoloads from gnus/gnus-range.el | 12267 | ;;; Generated autoloads from gnus/gnus-range.el |
| 12251 | 12268 | ||
| 12252 | (autoload 'gnus-sorted-difference "gnus-range" "\ | 12269 | (autoload 'gnus-sorted-difference "gnus-range" "\ |
| @@ -12314,7 +12331,7 @@ Add NUM into sorted LIST by side effect. | |||
| 12314 | ;;;*** | 12331 | ;;;*** |
| 12315 | 12332 | ||
| 12316 | ;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize) | 12333 | ;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize) |
| 12317 | ;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20458 56750 651721 | 12334 | ;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20544 36659 880486 |
| 12318 | ;;;;;; 0)) | 12335 | ;;;;;; 0)) |
| 12319 | ;;; Generated autoloads from gnus/gnus-registry.el | 12336 | ;;; Generated autoloads from gnus/gnus-registry.el |
| 12320 | 12337 | ||
| @@ -12382,7 +12399,7 @@ Declare back end NAME with ABILITIES as a Gnus back end. | |||
| 12382 | ;;;*** | 12399 | ;;;*** |
| 12383 | 12400 | ||
| 12384 | ;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el" | 12401 | ;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el" |
| 12385 | ;;;;;; (20495 51111 757560 0)) | 12402 | ;;;;;; (20540 39589 424586 0)) |
| 12386 | ;;; Generated autoloads from gnus/gnus-sum.el | 12403 | ;;; Generated autoloads from gnus/gnus-sum.el |
| 12387 | 12404 | ||
| 12388 | (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ | 12405 | (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ |
| @@ -12394,7 +12411,7 @@ BOOKMARK is a bookmark name or a bookmark record. | |||
| 12394 | ;;;*** | 12411 | ;;;*** |
| 12395 | 12412 | ||
| 12396 | ;;;### (autoloads (gnus-sync-install-hooks gnus-sync-initialize) | 12413 | ;;;### (autoloads (gnus-sync-install-hooks gnus-sync-initialize) |
| 12397 | ;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20465 29989 57840 0)) | 12414 | ;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20545 57511 257469 0)) |
| 12398 | ;;; Generated autoloads from gnus/gnus-sync.el | 12415 | ;;; Generated autoloads from gnus/gnus-sync.el |
| 12399 | 12416 | ||
| 12400 | (autoload 'gnus-sync-initialize "gnus-sync" "\ | 12417 | (autoload 'gnus-sync-initialize "gnus-sync" "\ |
| @@ -12437,8 +12454,8 @@ A value of nil says to use the default GnuTLS value.") | |||
| 12437 | 12454 | ||
| 12438 | ;;;*** | 12455 | ;;;*** |
| 12439 | 12456 | ||
| 12440 | ;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20355 10021 | 12457 | ;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20545 57511 |
| 12441 | ;;;;;; 546955 0)) | 12458 | ;;;;;; 257469 0)) |
| 12442 | ;;; Generated autoloads from play/gomoku.el | 12459 | ;;; Generated autoloads from play/gomoku.el |
| 12443 | 12460 | ||
| 12444 | (autoload 'gomoku "gomoku" "\ | 12461 | (autoload 'gomoku "gomoku" "\ |
| @@ -12705,8 +12722,8 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. | |||
| 12705 | ;;;*** | 12722 | ;;;*** |
| 12706 | 12723 | ||
| 12707 | ;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb | 12724 | ;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb |
| 12708 | ;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20478 3673 | 12725 | ;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20537 63402 |
| 12709 | ;;;;;; 653810 0)) | 12726 | ;;;;;; 936234 0)) |
| 12710 | ;;; Generated autoloads from progmodes/gud.el | 12727 | ;;; Generated autoloads from progmodes/gud.el |
| 12711 | 12728 | ||
| 12712 | (autoload 'gud-gdb "gud" "\ | 12729 | (autoload 'gud-gdb "gud" "\ |
| @@ -12796,7 +12813,7 @@ it if ARG is omitted or nil. | |||
| 12796 | 12813 | ||
| 12797 | ;;;### (autoloads (setf gv-define-simple-setter gv-define-setter | 12814 | ;;;### (autoloads (setf gv-define-simple-setter gv-define-setter |
| 12798 | ;;;;;; gv--defun-declaration gv-define-expander gv-letplace gv-get) | 12815 | ;;;;;; gv--defun-declaration gv-define-expander gv-letplace gv-get) |
| 12799 | ;;;;;; "gv" "emacs-lisp/gv.el" (20497 6436 957082 0)) | 12816 | ;;;;;; "gv" "emacs-lisp/gv.el" (20542 46798 773957 0)) |
| 12800 | ;;; Generated autoloads from emacs-lisp/gv.el | 12817 | ;;; Generated autoloads from emacs-lisp/gv.el |
| 12801 | 12818 | ||
| 12802 | (autoload 'gv-get "gv" "\ | 12819 | (autoload 'gv-get "gv" "\ |
| @@ -12852,8 +12869,9 @@ well for simple place forms. | |||
| 12852 | Assignments of VAL to (NAME ARGS...) are expanded by binding the argument | 12869 | Assignments of VAL to (NAME ARGS...) are expanded by binding the argument |
| 12853 | forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must | 12870 | forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must |
| 12854 | return a Lisp form that does the assignment. | 12871 | return a Lisp form that does the assignment. |
| 12855 | Actually, ARGLIST may be bound to temporary variables which are introduced | 12872 | The first arg in ARLIST (the one that receives VAL) receives an expression |
| 12856 | automatically to preserve proper execution order of the arguments. Example: | 12873 | which can do arbitrary things, whereas the other arguments are all guaranteed |
| 12874 | to be pure and copyable. Example use: | ||
| 12857 | (gv-define-setter aref (v a i) `(aset ,a ,i ,v)) | 12875 | (gv-define-setter aref (v a i) `(aset ,a ,i ,v)) |
| 12858 | 12876 | ||
| 12859 | \(fn NAME ARGLIST &rest BODY)" nil t) | 12877 | \(fn NAME ARGLIST &rest BODY)" nil t) |
| @@ -13108,7 +13126,7 @@ different regions. With numeric argument ARG, behaves like | |||
| 13108 | ;;;### (autoloads (doc-file-to-info doc-file-to-man describe-categories | 13126 | ;;;### (autoloads (doc-file-to-info doc-file-to-man describe-categories |
| 13109 | ;;;;;; describe-syntax describe-variable variable-at-point describe-function-1 | 13127 | ;;;;;; describe-syntax describe-variable variable-at-point describe-function-1 |
| 13110 | ;;;;;; find-lisp-object-file-name help-C-file-name describe-function) | 13128 | ;;;;;; find-lisp-object-file-name help-C-file-name describe-function) |
| 13111 | ;;;;;; "help-fns" "help-fns.el" (20497 6436 957082 0)) | 13129 | ;;;;;; "help-fns" "help-fns.el" (20532 45476 981297 0)) |
| 13112 | ;;; Generated autoloads from help-fns.el | 13130 | ;;; Generated autoloads from help-fns.el |
| 13113 | 13131 | ||
| 13114 | (autoload 'describe-function "help-fns" "\ | 13132 | (autoload 'describe-function "help-fns" "\ |
| @@ -13205,7 +13223,7 @@ gives the window that lists the options.") | |||
| 13205 | ;;;### (autoloads (help-bookmark-jump help-xref-on-pp help-insert-xref-button | 13223 | ;;;### (autoloads (help-bookmark-jump help-xref-on-pp help-insert-xref-button |
| 13206 | ;;;;;; help-xref-button help-make-xrefs help-buffer help-setup-xref | 13224 | ;;;;;; help-xref-button help-make-xrefs help-buffer help-setup-xref |
| 13207 | ;;;;;; help-mode-finish help-mode-setup help-mode) "help-mode" "help-mode.el" | 13225 | ;;;;;; help-mode-finish help-mode-setup help-mode) "help-mode" "help-mode.el" |
| 13208 | ;;;;;; (20479 62884 77836 0)) | 13226 | ;;;;;; (20510 18478 782378 0)) |
| 13209 | ;;; Generated autoloads from help-mode.el | 13227 | ;;; Generated autoloads from help-mode.el |
| 13210 | 13228 | ||
| 13211 | (autoload 'help-mode "help-mode" "\ | 13229 | (autoload 'help-mode "help-mode" "\ |
| @@ -13321,7 +13339,7 @@ Provide help for current mode. | |||
| 13321 | ;;;*** | 13339 | ;;;*** |
| 13322 | 13340 | ||
| 13323 | ;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" | 13341 | ;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" |
| 13324 | ;;;;;; "hexl.el" (20478 3673 653810 0)) | 13342 | ;;;;;; "hexl.el" (20523 62082 997685 0)) |
| 13325 | ;;; Generated autoloads from hexl.el | 13343 | ;;; Generated autoloads from hexl.el |
| 13326 | 13344 | ||
| 13327 | (autoload 'hexl-mode "hexl" "\ | 13345 | (autoload 'hexl-mode "hexl" "\ |
| @@ -13418,7 +13436,7 @@ This discards the buffer's undo information. | |||
| 13418 | ;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer | 13436 | ;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer |
| 13419 | ;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer | 13437 | ;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer |
| 13420 | ;;;;;; global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el" | 13438 | ;;;;;; global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el" |
| 13421 | ;;;;;; (20410 5673 834266 0)) | 13439 | ;;;;;; (20522 9637 465791 0)) |
| 13422 | ;;; Generated autoloads from hi-lock.el | 13440 | ;;; Generated autoloads from hi-lock.el |
| 13423 | 13441 | ||
| 13424 | (autoload 'hi-lock-mode "hi-lock" "\ | 13442 | (autoload 'hi-lock-mode "hi-lock" "\ |
| @@ -13427,12 +13445,19 @@ With a prefix argument ARG, enable Hi Lock mode if ARG is | |||
| 13427 | positive, and disable it otherwise. If called from Lisp, enable | 13445 | positive, and disable it otherwise. If called from Lisp, enable |
| 13428 | the mode if ARG is omitted or nil. | 13446 | the mode if ARG is omitted or nil. |
| 13429 | 13447 | ||
| 13430 | Issuing one the highlighting commands listed below will | 13448 | Hi Lock mode is automatically enabled when you invoke any of the |
| 13431 | automatically enable Hi Lock mode. To enable Hi Lock mode in all | 13449 | highlighting commands listed below, such as \\[highlight-regexp]. |
| 13432 | buffers, use `global-hi-lock-mode' or add (global-hi-lock-mode 1) | 13450 | To enable Hi Lock mode in all buffers, use `global-hi-lock-mode' |
| 13433 | to your init file. When Hi Lock mode is enabled, a \"Regexp | 13451 | or add (global-hi-lock-mode 1) to your init file. |
| 13434 | Highlighting\" submenu is added to the \"Edit\" menu. The | 13452 | |
| 13435 | commands in the submenu, which can be called interactively, are: | 13453 | In buffers where Font Lock mode is enabled, patterns are |
| 13454 | highlighted using font lock. In buffers where Font Lock mode is | ||
| 13455 | disabled, patterns are applied using overlays; in this case, the | ||
| 13456 | highlighting will not be updated as you type. | ||
| 13457 | |||
| 13458 | When Hi Lock mode is enabled, a \"Regexp Highlighting\" submenu | ||
| 13459 | is added to the \"Edit\" menu. The commands in the submenu, | ||
| 13460 | which can be called interactively, are: | ||
| 13436 | 13461 | ||
| 13437 | \\[highlight-regexp] REGEXP FACE | 13462 | \\[highlight-regexp] REGEXP FACE |
| 13438 | Highlight matches of pattern REGEXP in current buffer with FACE. | 13463 | Highlight matches of pattern REGEXP in current buffer with FACE. |
| @@ -13466,12 +13491,12 @@ When hi-lock is started and if the mode is not excluded or patterns | |||
| 13466 | rejected, the beginning of the buffer is searched for lines of the | 13491 | rejected, the beginning of the buffer is searched for lines of the |
| 13467 | form: | 13492 | form: |
| 13468 | Hi-lock: FOO | 13493 | Hi-lock: FOO |
| 13469 | where FOO is a list of patterns. These are added to the font lock | 13494 | |
| 13470 | keywords already present. The patterns must start before position | 13495 | where FOO is a list of patterns. The patterns must start before |
| 13471 | \(number of characters into buffer) `hi-lock-file-patterns-range'. | 13496 | position (number of characters into buffer) |
| 13472 | Patterns will be read until | 13497 | `hi-lock-file-patterns-range'. Patterns will be read until |
| 13473 | Hi-lock: end | 13498 | Hi-lock: end is found. A mode is excluded if it's in the list |
| 13474 | is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'. | 13499 | `hi-lock-exclude-modes'. |
| 13475 | 13500 | ||
| 13476 | \(fn &optional ARG)" t nil) | 13501 | \(fn &optional ARG)" t nil) |
| 13477 | 13502 | ||
| @@ -13500,12 +13525,13 @@ See `hi-lock-mode' for more information on Hi-Lock mode. | |||
| 13500 | 13525 | ||
| 13501 | (autoload 'hi-lock-line-face-buffer "hi-lock" "\ | 13526 | (autoload 'hi-lock-line-face-buffer "hi-lock" "\ |
| 13502 | Set face of all lines containing a match of REGEXP to FACE. | 13527 | Set face of all lines containing a match of REGEXP to FACE. |
| 13528 | Interactively, prompt for REGEXP then FACE, using a buffer-local | ||
| 13529 | history list for REGEXP and a global history list for FACE. | ||
| 13503 | 13530 | ||
| 13504 | Interactively, prompt for REGEXP then FACE. Buffer-local history | 13531 | If Font Lock mode is enabled in the buffer, it is used to |
| 13505 | list maintained for regexps, global history maintained for faces. | 13532 | highlight REGEXP. If Font Lock mode is disabled, overlays are |
| 13506 | \\<minibuffer-local-map>Use \\[previous-history-element] to retrieve previous history items, | 13533 | used for highlighting; in this case, the highlighting will not be |
| 13507 | and \\[next-history-element] to retrieve default values. | 13534 | updated as you type. |
| 13508 | \(See info node `Minibuffer History'.) | ||
| 13509 | 13535 | ||
| 13510 | \(fn REGEXP &optional FACE)" t nil) | 13536 | \(fn REGEXP &optional FACE)" t nil) |
| 13511 | 13537 | ||
| @@ -13513,12 +13539,13 @@ and \\[next-history-element] to retrieve default values. | |||
| 13513 | 13539 | ||
| 13514 | (autoload 'hi-lock-face-buffer "hi-lock" "\ | 13540 | (autoload 'hi-lock-face-buffer "hi-lock" "\ |
| 13515 | Set face of each match of REGEXP to FACE. | 13541 | Set face of each match of REGEXP to FACE. |
| 13542 | Interactively, prompt for REGEXP then FACE, using a buffer-local | ||
| 13543 | history list for REGEXP and a global history list for FACE. | ||
| 13516 | 13544 | ||
| 13517 | Interactively, prompt for REGEXP then FACE. Buffer-local history | 13545 | If Font Lock mode is enabled in the buffer, it is used to |
| 13518 | list maintained for regexps, global history maintained for faces. | 13546 | highlight REGEXP. If Font Lock mode is disabled, overlays are |
| 13519 | \\<minibuffer-local-map>Use \\[previous-history-element] to retrieve previous history items, | 13547 | used for highlighting; in this case, the highlighting will not be |
| 13520 | and \\[next-history-element] to retrieve default values. | 13548 | updated as you type. |
| 13521 | \(See info node `Minibuffer History'.) | ||
| 13522 | 13549 | ||
| 13523 | \(fn REGEXP &optional FACE)" t nil) | 13550 | \(fn REGEXP &optional FACE)" t nil) |
| 13524 | 13551 | ||
| @@ -13526,22 +13553,22 @@ and \\[next-history-element] to retrieve default values. | |||
| 13526 | 13553 | ||
| 13527 | (autoload 'hi-lock-face-phrase-buffer "hi-lock" "\ | 13554 | (autoload 'hi-lock-face-phrase-buffer "hi-lock" "\ |
| 13528 | Set face of each match of phrase REGEXP to FACE. | 13555 | Set face of each match of phrase REGEXP to FACE. |
| 13529 | |||
| 13530 | Whitespace in REGEXP converted to arbitrary whitespace and initial | 13556 | Whitespace in REGEXP converted to arbitrary whitespace and initial |
| 13531 | lower-case letters made case insensitive. | 13557 | lower-case letters made case insensitive. |
| 13532 | 13558 | ||
| 13559 | If Font Lock mode is enabled in the buffer, it is used to | ||
| 13560 | highlight REGEXP. If Font Lock mode is disabled, overlays are | ||
| 13561 | used for highlighting; in this case, the highlighting will not be | ||
| 13562 | updated as you type. | ||
| 13563 | |||
| 13533 | \(fn REGEXP &optional FACE)" t nil) | 13564 | \(fn REGEXP &optional FACE)" t nil) |
| 13534 | 13565 | ||
| 13535 | (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) | 13566 | (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) |
| 13536 | 13567 | ||
| 13537 | (autoload 'hi-lock-unface-buffer "hi-lock" "\ | 13568 | (autoload 'hi-lock-unface-buffer "hi-lock" "\ |
| 13538 | Remove highlighting of each match to REGEXP set by hi-lock. | 13569 | Remove highlighting of each match to REGEXP set by hi-lock. |
| 13539 | 13570 | Interactively, prompt for REGEXP, accepting only regexps | |
| 13540 | Interactively, prompt for REGEXP. Buffer-local history of inserted | 13571 | previously inserted by hi-lock interactive functions. |
| 13541 | regexp's maintained. Will accept only regexps inserted by hi-lock | ||
| 13542 | interactive functions. (See `hi-lock-interactive-patterns'.) | ||
| 13543 | \\<minibuffer-local-must-match-map>Use \\[minibuffer-complete] to complete a partially typed regexp. | ||
| 13544 | \(See info node `Minibuffer History'.) | ||
| 13545 | 13572 | ||
| 13546 | \(fn REGEXP)" t nil) | 13573 | \(fn REGEXP)" t nil) |
| 13547 | 13574 | ||
| @@ -13557,7 +13584,7 @@ be found in variable `hi-lock-interactive-patterns'. | |||
| 13557 | ;;;*** | 13584 | ;;;*** |
| 13558 | 13585 | ||
| 13559 | ;;;### (autoloads (hide-ifdef-mode) "hideif" "progmodes/hideif.el" | 13586 | ;;;### (autoloads (hide-ifdef-mode) "hideif" "progmodes/hideif.el" |
| 13560 | ;;;;;; (20355 10021 546955 0)) | 13587 | ;;;;;; (20541 6907 775259 0)) |
| 13561 | ;;; Generated autoloads from progmodes/hideif.el | 13588 | ;;; Generated autoloads from progmodes/hideif.el |
| 13562 | 13589 | ||
| 13563 | (autoload 'hide-ifdef-mode "hideif" "\ | 13590 | (autoload 'hide-ifdef-mode "hideif" "\ |
| @@ -13601,7 +13628,7 @@ Several variables affect how the hiding is done: | |||
| 13601 | ;;;*** | 13628 | ;;;*** |
| 13602 | 13629 | ||
| 13603 | ;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el" | 13630 | ;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el" |
| 13604 | ;;;;;; (20356 55829 180242 0)) | 13631 | ;;;;;; (20541 6907 775259 0)) |
| 13605 | ;;; Generated autoloads from progmodes/hideshow.el | 13632 | ;;; Generated autoloads from progmodes/hideshow.el |
| 13606 | 13633 | ||
| 13607 | (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\ | 13634 | (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\ |
| @@ -13929,7 +13956,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and | |||
| 13929 | ;;;;;; holiday-bahai-holidays holiday-islamic-holidays holiday-christian-holidays | 13956 | ;;;;;; holiday-bahai-holidays holiday-islamic-holidays holiday-christian-holidays |
| 13930 | ;;;;;; holiday-hebrew-holidays holiday-other-holidays holiday-local-holidays | 13957 | ;;;;;; holiday-hebrew-holidays holiday-other-holidays holiday-local-holidays |
| 13931 | ;;;;;; holiday-oriental-holidays holiday-general-holidays) "holidays" | 13958 | ;;;;;; holiday-oriental-holidays holiday-general-holidays) "holidays" |
| 13932 | ;;;;;; "calendar/holidays.el" (20390 20388 254308 0)) | 13959 | ;;;;;; "calendar/holidays.el" (20530 32124 107724 973000)) |
| 13933 | ;;; Generated autoloads from calendar/holidays.el | 13960 | ;;; Generated autoloads from calendar/holidays.el |
| 13934 | 13961 | ||
| 13935 | (define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1") | 13962 | (define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1") |
| @@ -14212,7 +14239,7 @@ bound to the current value of the filter. | |||
| 14212 | ;;;*** | 14239 | ;;;*** |
| 14213 | 14240 | ||
| 14214 | ;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) | 14241 | ;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) |
| 14215 | ;;;;;; "ibuffer" "ibuffer.el" (20479 62884 77836 0)) | 14242 | ;;;;;; "ibuffer" "ibuffer.el" (20542 46798 773957 0)) |
| 14216 | ;;; Generated autoloads from ibuffer.el | 14243 | ;;; Generated autoloads from ibuffer.el |
| 14217 | 14244 | ||
| 14218 | (autoload 'ibuffer-list-buffers "ibuffer" "\ | 14245 | (autoload 'ibuffer-list-buffers "ibuffer" "\ |
| @@ -14823,7 +14850,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. | |||
| 14823 | ;;;;;; create-image image-type-auto-detected-p image-type-available-p | 14850 | ;;;;;; create-image image-type-auto-detected-p image-type-available-p |
| 14824 | ;;;;;; image-type image-type-from-file-name image-type-from-file-header | 14851 | ;;;;;; image-type image-type-from-file-name image-type-from-file-header |
| 14825 | ;;;;;; image-type-from-buffer image-type-from-data) "image" "image.el" | 14852 | ;;;;;; image-type-from-buffer image-type-from-data) "image" "image.el" |
| 14826 | ;;;;;; (20437 50597 545250 0)) | 14853 | ;;;;;; (20523 62082 997685 0)) |
| 14827 | ;;; Generated autoloads from image.el | 14854 | ;;; Generated autoloads from image.el |
| 14828 | 14855 | ||
| 14829 | (autoload 'image-type-from-data "image" "\ | 14856 | (autoload 'image-type-from-data "image" "\ |
| @@ -15270,7 +15297,7 @@ on these modes. | |||
| 15270 | ;;;*** | 15297 | ;;;*** |
| 15271 | 15298 | ||
| 15272 | ;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar | 15299 | ;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar |
| 15273 | ;;;;;; imenu-sort-function) "imenu" "imenu.el" (20476 31768 298871 | 15300 | ;;;;;; imenu-sort-function) "imenu" "imenu.el" (20511 39332 974340 |
| 15274 | ;;;;;; 0)) | 15301 | ;;;;;; 0)) |
| 15275 | ;;; Generated autoloads from imenu.el | 15302 | ;;; Generated autoloads from imenu.el |
| 15276 | 15303 | ||
| @@ -15292,16 +15319,39 @@ element should come before the second. The arguments are cons cells; | |||
| 15292 | (custom-autoload 'imenu-sort-function "imenu" t) | 15319 | (custom-autoload 'imenu-sort-function "imenu" t) |
| 15293 | 15320 | ||
| 15294 | (defvar imenu-generic-expression nil "\ | 15321 | (defvar imenu-generic-expression nil "\ |
| 15295 | The regex pattern to use for creating a buffer index. | 15322 | List of definition matchers for creating an Imenu index. |
| 15323 | Each element of this list should have the form | ||
| 15324 | |||
| 15325 | (MENU-TITLE REGEXP INDEX [FUNCTION] [ARGUMENTS...]) | ||
| 15326 | |||
| 15327 | MENU-TITLE should be nil (in which case the matches for this | ||
| 15328 | element are put in the top level of the buffer index) or a | ||
| 15329 | string (which specifies the title of a submenu into which the | ||
| 15330 | matches are put). | ||
| 15331 | REGEXP is a regular expression matching a definition construct | ||
| 15332 | which is to be displayed in the menu. REGEXP may also be a | ||
| 15333 | function, called without arguments. It is expected to search | ||
| 15334 | backwards. It must return true and set `match-data' if it finds | ||
| 15335 | another element. | ||
| 15336 | INDEX is an integer specifying which subexpression of REGEXP | ||
| 15337 | matches the definition's name; this subexpression is displayed as | ||
| 15338 | the menu item. | ||
| 15339 | FUNCTION, if present, specifies a function to call when the index | ||
| 15340 | item is selected by the user. This function is called with | ||
| 15341 | arguments consisting of the item name, the buffer position, and | ||
| 15342 | the ARGUMENTS. | ||
| 15343 | |||
| 15344 | The variable `imenu-case-fold-search' determines whether or not | ||
| 15345 | the regexp matches are case sensitive, and `imenu-syntax-alist' | ||
| 15346 | can be used to alter the syntax table for the search. | ||
| 15296 | 15347 | ||
| 15297 | If non-nil this pattern is passed to `imenu--generic-function' to | 15348 | If non-nil this pattern is passed to `imenu--generic-function' to |
| 15298 | create a buffer index. Look there for the documentation of this | 15349 | create a buffer index. |
| 15299 | pattern's structure. | ||
| 15300 | 15350 | ||
| 15301 | For example, see the value of `fortran-imenu-generic-expression' used by | 15351 | For example, see the value of `fortran-imenu-generic-expression' |
| 15302 | `fortran-mode' with `imenu-syntax-alist' set locally to give the | 15352 | used by `fortran-mode' with `imenu-syntax-alist' set locally to |
| 15303 | characters which normally have \"symbol\" syntax \"word\" syntax | 15353 | give the characters which normally have \"symbol\" syntax |
| 15304 | during matching.") | 15354 | \"word\" syntax during matching.") |
| 15305 | (put 'imenu-generic-expression 'risky-local-variable t) | 15355 | (put 'imenu-generic-expression 'risky-local-variable t) |
| 15306 | 15356 | ||
| 15307 | (make-variable-buffer-local 'imenu-generic-expression) | 15357 | (make-variable-buffer-local 'imenu-generic-expression) |
| @@ -15487,7 +15537,7 @@ of `inferior-lisp-program'). Runs the hooks from | |||
| 15487 | ;;;;;; Info-goto-emacs-key-command-node Info-goto-emacs-command-node | 15537 | ;;;;;; Info-goto-emacs-key-command-node Info-goto-emacs-command-node |
| 15488 | ;;;;;; Info-mode info-finder info-apropos Info-index Info-directory | 15538 | ;;;;;; Info-mode info-finder info-apropos Info-index Info-directory |
| 15489 | ;;;;;; Info-on-current-buffer info-standalone info-emacs-bug info-emacs-manual | 15539 | ;;;;;; Info-on-current-buffer info-standalone info-emacs-bug info-emacs-manual |
| 15490 | ;;;;;; info info-other-window) "info" "info.el" (20476 31768 298871 | 15540 | ;;;;;; info info-other-window) "info" "info.el" (20540 39589 424586 |
| 15491 | ;;;;;; 0)) | 15541 | ;;;;;; 0)) |
| 15492 | ;;; Generated autoloads from info.el | 15542 | ;;; Generated autoloads from info.el |
| 15493 | 15543 | ||
| @@ -16375,7 +16425,7 @@ by `jka-compr-installed'. | |||
| 16375 | 16425 | ||
| 16376 | ;;;*** | 16426 | ;;;*** |
| 16377 | 16427 | ||
| 16378 | ;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20478 3673 653810 | 16428 | ;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20532 45476 981297 |
| 16379 | ;;;;;; 0)) | 16429 | ;;;;;; 0)) |
| 16380 | ;;; Generated autoloads from progmodes/js.el | 16430 | ;;; Generated autoloads from progmodes/js.el |
| 16381 | 16431 | ||
| @@ -16619,7 +16669,7 @@ The kind of Korean keyboard for Korean input method. | |||
| 16619 | ;;;*** | 16669 | ;;;*** |
| 16620 | 16670 | ||
| 16621 | ;;;### (autoloads (landmark landmark-test-run) "landmark" "play/landmark.el" | 16671 | ;;;### (autoloads (landmark landmark-test-run) "landmark" "play/landmark.el" |
| 16622 | ;;;;;; (20478 3673 653810 0)) | 16672 | ;;;;;; (20545 57511 257469 0)) |
| 16623 | ;;; Generated autoloads from play/landmark.el | 16673 | ;;; Generated autoloads from play/landmark.el |
| 16624 | 16674 | ||
| 16625 | (defalias 'landmark-repeat 'landmark-test-run) | 16675 | (defalias 'landmark-repeat 'landmark-test-run) |
| @@ -16776,7 +16826,7 @@ A major mode to edit GNU ld script files | |||
| 16776 | 16826 | ||
| 16777 | ;;;*** | 16827 | ;;;*** |
| 16778 | 16828 | ||
| 16779 | ;;;### (autoloads (life) "life" "play/life.el" (20355 10021 546955 | 16829 | ;;;### (autoloads (life) "life" "play/life.el" (20545 57511 257469 |
| 16780 | ;;;;;; 0)) | 16830 | ;;;;;; 0)) |
| 16781 | ;;; Generated autoloads from play/life.el | 16831 | ;;; Generated autoloads from play/life.el |
| 16782 | 16832 | ||
| @@ -16953,8 +17003,8 @@ done. Otherwise, it uses the current buffer. | |||
| 16953 | 17003 | ||
| 16954 | ;;;*** | 17004 | ;;;*** |
| 16955 | 17005 | ||
| 16956 | ;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20477 | 17006 | ;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20515 |
| 16957 | ;;;;;; 21160 227853 0)) | 17007 | ;;;;;; 36389 544939 0)) |
| 16958 | ;;; Generated autoloads from vc/log-view.el | 17008 | ;;; Generated autoloads from vc/log-view.el |
| 16959 | 17009 | ||
| 16960 | (autoload 'log-view-mode "log-view" "\ | 17010 | (autoload 'log-view-mode "log-view" "\ |
| @@ -17618,7 +17668,7 @@ Previous contents of that buffer are killed first. | |||
| 17618 | ;;;*** | 17668 | ;;;*** |
| 17619 | 17669 | ||
| 17620 | ;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el" | 17670 | ;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el" |
| 17621 | ;;;;;; (20504 6781 423358 0)) | 17671 | ;;;;;; (20523 62082 997685 0)) |
| 17622 | ;;; Generated autoloads from man.el | 17672 | ;;; Generated autoloads from man.el |
| 17623 | 17673 | ||
| 17624 | (defalias 'manual-entry 'man) | 17674 | (defalias 'manual-entry 'man) |
| @@ -17729,7 +17779,7 @@ recursion depth in the minibuffer prompt. This is only useful if | |||
| 17729 | ;;;;;; message-forward-make-body message-forward message-recover | 17779 | ;;;;;; message-forward-make-body message-forward message-recover |
| 17730 | ;;;;;; message-supersede message-cancel-news message-followup message-wide-reply | 17780 | ;;;;;; message-supersede message-cancel-news message-followup message-wide-reply |
| 17731 | ;;;;;; message-reply message-news message-mail message-mode) "message" | 17781 | ;;;;;; message-reply message-news message-mail message-mode) "message" |
| 17732 | ;;;;;; "gnus/message.el" (20501 3499 284800 0)) | 17782 | ;;;;;; "gnus/message.el" (20545 57511 257469 0)) |
| 17733 | ;;; Generated autoloads from gnus/message.el | 17783 | ;;; Generated autoloads from gnus/message.el |
| 17734 | 17784 | ||
| 17735 | (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) | 17785 | (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) |
| @@ -18204,7 +18254,7 @@ is modified to remove the default indication. | |||
| 18204 | ;;;*** | 18254 | ;;;*** |
| 18205 | 18255 | ||
| 18206 | ;;;### (autoloads (list-dynamic-libraries butterfly) "misc" "misc.el" | 18256 | ;;;### (autoloads (list-dynamic-libraries butterfly) "misc" "misc.el" |
| 18207 | ;;;;;; (20356 27828 24951 0)) | 18257 | ;;;;;; (20533 5993 500881 0)) |
| 18208 | ;;; Generated autoloads from misc.el | 18258 | ;;; Generated autoloads from misc.el |
| 18209 | 18259 | ||
| 18210 | (autoload 'butterfly "misc" "\ | 18260 | (autoload 'butterfly "misc" "\ |
| @@ -18606,7 +18656,7 @@ To test this function, evaluate: | |||
| 18606 | 18656 | ||
| 18607 | ;;;*** | 18657 | ;;;*** |
| 18608 | 18658 | ||
| 18609 | ;;;### (autoloads (mpc) "mpc" "mpc.el" (20476 31768 298871 0)) | 18659 | ;;;### (autoloads (mpc) "mpc" "mpc.el" (20523 62082 997685 0)) |
| 18610 | ;;; Generated autoloads from mpc.el | 18660 | ;;; Generated autoloads from mpc.el |
| 18611 | 18661 | ||
| 18612 | (autoload 'mpc "mpc" "\ | 18662 | (autoload 'mpc "mpc" "\ |
| @@ -18616,7 +18666,7 @@ Main entry point for MPC. | |||
| 18616 | 18666 | ||
| 18617 | ;;;*** | 18667 | ;;;*** |
| 18618 | 18668 | ||
| 18619 | ;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20434 17809 692608 | 18669 | ;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20545 57511 257469 |
| 18620 | ;;;;;; 0)) | 18670 | ;;;;;; 0)) |
| 18621 | ;;; Generated autoloads from play/mpuz.el | 18671 | ;;; Generated autoloads from play/mpuz.el |
| 18622 | 18672 | ||
| @@ -19309,7 +19359,7 @@ closing requests for requests that are used in matched pairs. | |||
| 19309 | ;;;*** | 19359 | ;;;*** |
| 19310 | 19360 | ||
| 19311 | ;;;### (autoloads (nxml-glyph-display-string) "nxml-glyph" "nxml/nxml-glyph.el" | 19361 | ;;;### (autoloads (nxml-glyph-display-string) "nxml-glyph" "nxml/nxml-glyph.el" |
| 19312 | ;;;;;; (20439 5925 915283 0)) | 19362 | ;;;;;; (20523 62082 997685 0)) |
| 19313 | ;;; Generated autoloads from nxml/nxml-glyph.el | 19363 | ;;; Generated autoloads from nxml/nxml-glyph.el |
| 19314 | 19364 | ||
| 19315 | (autoload 'nxml-glyph-display-string "nxml-glyph" "\ | 19365 | (autoload 'nxml-glyph-display-string "nxml-glyph" "\ |
| @@ -20901,7 +20951,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'. | |||
| 20901 | ;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find | 20951 | ;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find |
| 20902 | ;;;;;; org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion | 20952 | ;;;;;; org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion |
| 20903 | ;;;;;; org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el" | 20953 | ;;;;;; org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el" |
| 20904 | ;;;;;; (20355 10021 546955 0)) | 20954 | ;;;;;; (20545 57511 257469 0)) |
| 20905 | ;;; Generated autoloads from org/org-id.el | 20955 | ;;; Generated autoloads from org/org-id.el |
| 20906 | 20956 | ||
| 20907 | (autoload 'org-id-get-create "org-id" "\ | 20957 | (autoload 'org-id-get-create "org-id" "\ |
| @@ -21620,8 +21670,8 @@ The list is displayed in a buffer named `*Packages*'. | |||
| 21620 | 21670 | ||
| 21621 | ;;;*** | 21671 | ;;;*** |
| 21622 | 21672 | ||
| 21623 | ;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20355 10021 | 21673 | ;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20542 50478 |
| 21624 | ;;;;;; 546955 0)) | 21674 | ;;;;;; 439878 507000)) |
| 21625 | ;;; Generated autoloads from paren.el | 21675 | ;;; Generated autoloads from paren.el |
| 21626 | 21676 | ||
| 21627 | (defvar show-paren-mode nil "\ | 21677 | (defvar show-paren-mode nil "\ |
| @@ -21859,8 +21909,8 @@ Completion for GNU/Linux `mount'. | |||
| 21859 | 21909 | ||
| 21860 | ;;;*** | 21910 | ;;;*** |
| 21861 | 21911 | ||
| 21862 | ;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20453 | 21912 | ;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20523 |
| 21863 | ;;;;;; 5408 87415 759000)) | 21913 | ;;;;;; 62082 997685 0)) |
| 21864 | ;;; Generated autoloads from pcmpl-rpm.el | 21914 | ;;; Generated autoloads from pcmpl-rpm.el |
| 21865 | 21915 | ||
| 21866 | (autoload 'pcomplete/rpm "pcmpl-rpm" "\ | 21916 | (autoload 'pcomplete/rpm "pcmpl-rpm" "\ |
| @@ -21930,8 +21980,8 @@ Includes files as well as host names followed by a colon. | |||
| 21930 | 21980 | ||
| 21931 | ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list | 21981 | ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list |
| 21932 | ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete | 21982 | ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete |
| 21933 | ;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20476 | 21983 | ;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20523 |
| 21934 | ;;;;;; 31768 298871 0)) | 21984 | ;;;;;; 62082 997685 0)) |
| 21935 | ;;; Generated autoloads from pcomplete.el | 21985 | ;;; Generated autoloads from pcomplete.el |
| 21936 | 21986 | ||
| 21937 | (autoload 'pcomplete "pcomplete" "\ | 21987 | (autoload 'pcomplete "pcomplete" "\ |
| @@ -22075,7 +22125,7 @@ Global menu used by PCL-CVS.") | |||
| 22075 | ;;;*** | 22125 | ;;;*** |
| 22076 | 22126 | ||
| 22077 | ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" | 22127 | ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" |
| 22078 | ;;;;;; (20478 3673 653810 0)) | 22128 | ;;;;;; (20523 62082 997685 0)) |
| 22079 | ;;; Generated autoloads from progmodes/perl-mode.el | 22129 | ;;; Generated autoloads from progmodes/perl-mode.el |
| 22080 | (put 'perl-indent-level 'safe-local-variable 'integerp) | 22130 | (put 'perl-indent-level 'safe-local-variable 'integerp) |
| 22081 | (put 'perl-continued-statement-offset 'safe-local-variable 'integerp) | 22131 | (put 'perl-continued-statement-offset 'safe-local-variable 'integerp) |
| @@ -22931,17 +22981,20 @@ are both set to t. | |||
| 22931 | 22981 | ||
| 22932 | ;;;*** | 22982 | ;;;*** |
| 22933 | 22983 | ||
| 22934 | ;;;### (autoloads (proced) "proced" "proced.el" (20453 5437 764254 | 22984 | ;;;### (autoloads (proced) "proced" "proced.el" (20511 39332 974340 |
| 22935 | ;;;;;; 0)) | 22985 | ;;;;;; 0)) |
| 22936 | ;;; Generated autoloads from proced.el | 22986 | ;;; Generated autoloads from proced.el |
| 22937 | 22987 | ||
| 22938 | (autoload 'proced "proced" "\ | 22988 | (autoload 'proced "proced" "\ |
| 22939 | Generate a listing of UNIX system processes. | 22989 | Generate a listing of UNIX system processes. |
| 22940 | If invoked with optional ARG the window displaying the process | 22990 | \\<proced-mode-map> |
| 22941 | information will be displayed but not selected. | 22991 | If invoked with optional ARG, do not select the window displaying |
| 22942 | Runs the normal hook `proced-post-display-hook'. | 22992 | the process information. |
| 22993 | |||
| 22994 | This function runs the normal hook `proced-post-display-hook'. | ||
| 22943 | 22995 | ||
| 22944 | See `proced-mode' for a description of features available in Proced buffers. | 22996 | See `proced-mode' for a description of features available in |
| 22997 | Proced buffers. | ||
| 22945 | 22998 | ||
| 22946 | \(fn &optional ARG)" t nil) | 22999 | \(fn &optional ARG)" t nil) |
| 22947 | 23000 | ||
| @@ -23245,7 +23298,7 @@ If EXTENSION is any other symbol, it is ignored. | |||
| 23245 | ;;;*** | 23298 | ;;;*** |
| 23246 | 23299 | ||
| 23247 | ;;;### (autoloads (python-mode run-python) "python" "progmodes/python.el" | 23300 | ;;;### (autoloads (python-mode run-python) "python" "progmodes/python.el" |
| 23248 | ;;;;;; (20504 35072 130543 0)) | 23301 | ;;;;;; (20523 62082 997685 0)) |
| 23249 | ;;; Generated autoloads from progmodes/python.el | 23302 | ;;; Generated autoloads from progmodes/python.el |
| 23250 | 23303 | ||
| 23251 | (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) | 23304 | (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) |
| @@ -23281,7 +23334,7 @@ if that value is non-nil. | |||
| 23281 | ;;;*** | 23334 | ;;;*** |
| 23282 | 23335 | ||
| 23283 | ;;;### (autoloads (quoted-printable-decode-region) "qp" "gnus/qp.el" | 23336 | ;;;### (autoloads (quoted-printable-decode-region) "qp" "gnus/qp.el" |
| 23284 | ;;;;;; (20355 10021 546955 0)) | 23337 | ;;;;;; (20544 36659 880486 0)) |
| 23285 | ;;; Generated autoloads from gnus/qp.el | 23338 | ;;; Generated autoloads from gnus/qp.el |
| 23286 | 23339 | ||
| 23287 | (autoload 'quoted-printable-decode-region "qp" "\ | 23340 | (autoload 'quoted-printable-decode-region "qp" "\ |
| @@ -23304,7 +23357,7 @@ them into characters should be done separately. | |||
| 23304 | ;;;;;; quail-defrule quail-install-decode-map quail-install-map | 23357 | ;;;;;; quail-defrule quail-install-decode-map quail-install-map |
| 23305 | ;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout | 23358 | ;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout |
| 23306 | ;;;;;; quail-define-package quail-use-package quail-title) "quail" | 23359 | ;;;;;; quail-define-package quail-use-package quail-title) "quail" |
| 23307 | ;;;;;; "international/quail.el" (20501 3499 284800 0)) | 23360 | ;;;;;; "international/quail.el" (20523 62082 997685 0)) |
| 23308 | ;;; Generated autoloads from international/quail.el | 23361 | ;;; Generated autoloads from international/quail.el |
| 23309 | 23362 | ||
| 23310 | (autoload 'quail-title "quail" "\ | 23363 | (autoload 'quail-title "quail" "\ |
| @@ -23608,7 +23661,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'. | |||
| 23608 | ;;;*** | 23661 | ;;;*** |
| 23609 | 23662 | ||
| 23610 | ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc" | 23663 | ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc" |
| 23611 | ;;;;;; "net/rcirc.el" (20434 17809 692608 0)) | 23664 | ;;;;;; "net/rcirc.el" (20541 6907 775259 0)) |
| 23612 | ;;; Generated autoloads from net/rcirc.el | 23665 | ;;; Generated autoloads from net/rcirc.el |
| 23613 | 23666 | ||
| 23614 | (autoload 'rcirc "rcirc" "\ | 23667 | (autoload 'rcirc "rcirc" "\ |
| @@ -23864,8 +23917,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead. | |||
| 23864 | ;;;*** | 23917 | ;;;*** |
| 23865 | 23918 | ||
| 23866 | ;;;### (autoloads (reftex-reset-scanning-information reftex-mode | 23919 | ;;;### (autoloads (reftex-reset-scanning-information reftex-mode |
| 23867 | ;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20499 48164 | 23920 | ;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20507 42276 |
| 23868 | ;;;;;; 310488 0)) | 23921 | ;;;;;; 222255 0)) |
| 23869 | ;;; Generated autoloads from textmodes/reftex.el | 23922 | ;;; Generated autoloads from textmodes/reftex.el |
| 23870 | 23923 | ||
| 23871 | (autoload 'turn-on-reftex "reftex" "\ | 23924 | (autoload 'turn-on-reftex "reftex" "\ |
| @@ -24013,8 +24066,8 @@ of master file. | |||
| 24013 | 24066 | ||
| 24014 | ;;;*** | 24067 | ;;;*** |
| 24015 | 24068 | ||
| 24016 | ;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20498 | 24069 | ;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20507 |
| 24017 | ;;;;;; 27300 867875 0)) | 24070 | ;;;;;; 42276 222255 0)) |
| 24018 | ;;; Generated autoloads from textmodes/reftex-vars.el | 24071 | ;;; Generated autoloads from textmodes/reftex-vars.el |
| 24019 | (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) | 24072 | (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) |
| 24020 | (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) | 24073 | (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) |
| @@ -24024,7 +24077,7 @@ of master file. | |||
| 24024 | ;;;*** | 24077 | ;;;*** |
| 24025 | 24078 | ||
| 24026 | ;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el" | 24079 | ;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el" |
| 24027 | ;;;;;; (20363 61861 222722 0)) | 24080 | ;;;;;; (20522 38650 757441 0)) |
| 24028 | ;;; Generated autoloads from emacs-lisp/regexp-opt.el | 24081 | ;;; Generated autoloads from emacs-lisp/regexp-opt.el |
| 24029 | 24082 | ||
| 24030 | (autoload 'regexp-opt "regexp-opt" "\ | 24083 | (autoload 'regexp-opt "regexp-opt" "\ |
| @@ -24270,8 +24323,8 @@ variable. | |||
| 24270 | ;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers | 24323 | ;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers |
| 24271 | ;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers | 24324 | ;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers |
| 24272 | ;;;;;; rmail-user-mail-address-regexp rmail-movemail-variant-p rmail-spool-directory | 24325 | ;;;;;; rmail-user-mail-address-regexp rmail-movemail-variant-p rmail-spool-directory |
| 24273 | ;;;;;; rmail-file-name) "rmail" "mail/rmail.el" (20437 50597 545250 | 24326 | ;;;;;; rmail-file-name) "rmail" "mail/rmail.el" (20526 43809 637014 |
| 24274 | ;;;;;; 0)) | 24327 | ;;;;;; 858000)) |
| 24275 | ;;; Generated autoloads from mail/rmail.el | 24328 | ;;; Generated autoloads from mail/rmail.el |
| 24276 | 24329 | ||
| 24277 | (defvar rmail-file-name (purecopy "~/RMAIL") "\ | 24330 | (defvar rmail-file-name (purecopy "~/RMAIL") "\ |
| @@ -24469,8 +24522,8 @@ Set PASSWORD to be used for retrieving mail from a POP or IMAP server. | |||
| 24469 | ;;;*** | 24522 | ;;;*** |
| 24470 | 24523 | ||
| 24471 | ;;;### (autoloads (rmail-output-body-to-file rmail-output-as-seen | 24524 | ;;;### (autoloads (rmail-output-body-to-file rmail-output-as-seen |
| 24472 | ;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20355 10021 | 24525 | ;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20530 3765 184907 |
| 24473 | ;;;;;; 546955 0)) | 24526 | ;;;;;; 0)) |
| 24474 | ;;; Generated autoloads from mail/rmailout.el | 24527 | ;;; Generated autoloads from mail/rmailout.el |
| 24475 | (put 'rmail-output-file-alist 'risky-local-variable t) | 24528 | (put 'rmail-output-file-alist 'risky-local-variable t) |
| 24476 | 24529 | ||
| @@ -24619,7 +24672,7 @@ must be equal. | |||
| 24619 | ;;;*** | 24672 | ;;;*** |
| 24620 | 24673 | ||
| 24621 | ;;;### (autoloads (robin-use-package robin-modify-package robin-define-package) | 24674 | ;;;### (autoloads (robin-use-package robin-modify-package robin-define-package) |
| 24622 | ;;;;;; "robin" "international/robin.el" (20501 3499 284800 0)) | 24675 | ;;;;;; "robin" "international/robin.el" (20523 62082 997685 0)) |
| 24623 | ;;; Generated autoloads from international/robin.el | 24676 | ;;; Generated autoloads from international/robin.el |
| 24624 | 24677 | ||
| 24625 | (autoload 'robin-define-package "robin" "\ | 24678 | (autoload 'robin-define-package "robin" "\ |
| @@ -24691,7 +24744,7 @@ Toggle the use of ROT13 encoding for the current window. | |||
| 24691 | ;;;*** | 24744 | ;;;*** |
| 24692 | 24745 | ||
| 24693 | ;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el" | 24746 | ;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el" |
| 24694 | ;;;;;; (20502 63903 34842 0)) | 24747 | ;;;;;; (20523 62082 997685 0)) |
| 24695 | ;;; Generated autoloads from textmodes/rst.el | 24748 | ;;; Generated autoloads from textmodes/rst.el |
| 24696 | (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) | 24749 | (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) |
| 24697 | 24750 | ||
| @@ -24722,7 +24775,7 @@ for modes derived from Text mode, like Mail mode. | |||
| 24722 | ;;;*** | 24775 | ;;;*** |
| 24723 | 24776 | ||
| 24724 | ;;;### (autoloads (ruby-mode) "ruby-mode" "progmodes/ruby-mode.el" | 24777 | ;;;### (autoloads (ruby-mode) "ruby-mode" "progmodes/ruby-mode.el" |
| 24725 | ;;;;;; (20490 33188 850375 0)) | 24778 | ;;;;;; (20522 38650 757441 0)) |
| 24726 | ;;; Generated autoloads from progmodes/ruby-mode.el | 24779 | ;;; Generated autoloads from progmodes/ruby-mode.el |
| 24727 | 24780 | ||
| 24728 | (autoload 'ruby-mode "ruby-mode" "\ | 24781 | (autoload 'ruby-mode "ruby-mode" "\ |
| @@ -24761,8 +24814,8 @@ if ARG is omitted or nil. | |||
| 24761 | 24814 | ||
| 24762 | ;;;*** | 24815 | ;;;*** |
| 24763 | 24816 | ||
| 24764 | ;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20355 | 24817 | ;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20518 |
| 24765 | ;;;;;; 10021 546955 0)) | 24818 | ;;;;;; 12580 46478 0)) |
| 24766 | ;;; Generated autoloads from emacs-lisp/rx.el | 24819 | ;;; Generated autoloads from emacs-lisp/rx.el |
| 24767 | 24820 | ||
| 24768 | (autoload 'rx-to-string "rx" "\ | 24821 | (autoload 'rx-to-string "rx" "\ |
| @@ -25073,8 +25126,8 @@ enclosed in `(and ...)'. | |||
| 25073 | 25126 | ||
| 25074 | ;;;*** | 25127 | ;;;*** |
| 25075 | 25128 | ||
| 25076 | ;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20453 | 25129 | ;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20523 |
| 25077 | ;;;;;; 5437 764254 0)) | 25130 | ;;;;;; 62082 997685 0)) |
| 25078 | ;;; Generated autoloads from savehist.el | 25131 | ;;; Generated autoloads from savehist.el |
| 25079 | 25132 | ||
| 25080 | (defvar savehist-mode nil "\ | 25133 | (defvar savehist-mode nil "\ |
| @@ -25549,8 +25602,8 @@ Like `mail' command, but display mail buffer in another frame. | |||
| 25549 | ;;;*** | 25602 | ;;;*** |
| 25550 | 25603 | ||
| 25551 | ;;;### (autoloads (server-save-buffers-kill-terminal server-mode | 25604 | ;;;### (autoloads (server-save-buffers-kill-terminal server-mode |
| 25552 | ;;;;;; server-force-delete server-start) "server" "server.el" (20478 | 25605 | ;;;;;; server-force-delete server-start) "server" "server.el" (20545 |
| 25553 | ;;;;;; 3673 653810 0)) | 25606 | ;;;;;; 57511 257469 0)) |
| 25554 | ;;; Generated autoloads from server.el | 25607 | ;;; Generated autoloads from server.el |
| 25555 | 25608 | ||
| 25556 | (put 'server-host 'risky-local-variable t) | 25609 | (put 'server-host 'risky-local-variable t) |
| @@ -25702,7 +25755,7 @@ To work around that, do: | |||
| 25702 | ;;;*** | 25755 | ;;;*** |
| 25703 | 25756 | ||
| 25704 | ;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el" | 25757 | ;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el" |
| 25705 | ;;;;;; (20487 57003 603251 0)) | 25758 | ;;;;;; (20541 6907 775259 0)) |
| 25706 | ;;; Generated autoloads from progmodes/sh-script.el | 25759 | ;;; Generated autoloads from progmodes/sh-script.el |
| 25707 | (put 'sh-shell 'safe-local-variable 'symbolp) | 25760 | (put 'sh-shell 'safe-local-variable 'symbolp) |
| 25708 | 25761 | ||
| @@ -26010,7 +26063,7 @@ with no arguments, if that value is non-nil. | |||
| 26010 | ;;;*** | 26063 | ;;;*** |
| 26011 | 26064 | ||
| 26012 | ;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new | 26065 | ;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new |
| 26013 | ;;;;;; define-skeleton) "skeleton" "skeleton.el" (20406 8611 875037 | 26066 | ;;;;;; define-skeleton) "skeleton" "skeleton.el" (20541 6907 775259 |
| 26014 | ;;;;;; 0)) | 26067 | ;;;;;; 0)) |
| 26015 | ;;; Generated autoloads from skeleton.el | 26068 | ;;; Generated autoloads from skeleton.el |
| 26016 | 26069 | ||
| @@ -26123,7 +26176,7 @@ symmetrical ones, and the same character twice for the others. | |||
| 26123 | ;;;*** | 26176 | ;;;*** |
| 26124 | 26177 | ||
| 26125 | ;;;### (autoloads (smerge-start-session smerge-mode smerge-ediff) | 26178 | ;;;### (autoloads (smerge-start-session smerge-mode smerge-ediff) |
| 26126 | ;;;;;; "smerge-mode" "vc/smerge-mode.el" (20476 31768 298871 0)) | 26179 | ;;;;;; "smerge-mode" "vc/smerge-mode.el" (20523 62082 997685 0)) |
| 26127 | ;;; Generated autoloads from vc/smerge-mode.el | 26180 | ;;; Generated autoloads from vc/smerge-mode.el |
| 26128 | 26181 | ||
| 26129 | (autoload 'smerge-ediff "smerge-mode" "\ | 26182 | (autoload 'smerge-ediff "smerge-mode" "\ |
| @@ -26332,7 +26385,7 @@ Pick your favorite shortcuts: | |||
| 26332 | 26385 | ||
| 26333 | ;;;### (autoloads (reverse-region sort-columns sort-regexp-fields | 26386 | ;;;### (autoloads (reverse-region sort-columns sort-regexp-fields |
| 26334 | ;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs | 26387 | ;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs |
| 26335 | ;;;;;; sort-lines sort-subr) "sort" "sort.el" (20355 10021 546955 | 26388 | ;;;;;; sort-lines sort-subr) "sort" "sort.el" (20507 42276 222255 |
| 26336 | ;;;;;; 0)) | 26389 | ;;;;;; 0)) |
| 26337 | ;;; Generated autoloads from sort.el | 26390 | ;;; Generated autoloads from sort.el |
| 26338 | (put 'sort-fold-case 'safe-local-variable 'booleanp) | 26391 | (put 'sort-fold-case 'safe-local-variable 'booleanp) |
| @@ -26430,18 +26483,23 @@ the sort order. | |||
| 26430 | \(fn FIELD BEG END)" t nil) | 26483 | \(fn FIELD BEG END)" t nil) |
| 26431 | 26484 | ||
| 26432 | (autoload 'sort-regexp-fields "sort" "\ | 26485 | (autoload 'sort-regexp-fields "sort" "\ |
| 26433 | Sort the region lexicographically as specified by RECORD-REGEXP and KEY. | 26486 | Sort the text in the region region lexicographically. |
| 26434 | RECORD-REGEXP specifies the textual units which should be sorted. | 26487 | If called interactively, prompt for two regular expressions, |
| 26435 | For example, to sort lines RECORD-REGEXP would be \"^.*$\" | 26488 | RECORD-REGEXP and KEY-REGEXP. |
| 26436 | KEY specifies the part of each record (ie each match for RECORD-REGEXP) | 26489 | |
| 26437 | is to be used for sorting. | 26490 | RECORD-REGEXP specifies the textual units to be sorted. |
| 26438 | If it is \"\\\\digit\" then the digit'th \"\\\\(...\\\\)\" match field from | 26491 | For example, to sort lines, RECORD-REGEXP would be \"^.*$\". |
| 26439 | RECORD-REGEXP is used. | 26492 | |
| 26440 | If it is \"\\\\&\" then the whole record is used. | 26493 | KEY-REGEXP specifies the part of each record (i.e. each match for |
| 26441 | Otherwise, it is a regular-expression for which to search within the record. | 26494 | RECORD-REGEXP) to be used for sorting. |
| 26442 | If a match for KEY is not found within a record then that record is ignored. | 26495 | If it is \"\\\\digit\", use the digit'th \"\\\\(...\\\\)\" |
| 26443 | 26496 | match field specified by RECORD-REGEXP. | |
| 26444 | With a negative prefix arg sorts in reverse order. | 26497 | If it is \"\\\\&\", use the whole record. |
| 26498 | Otherwise, KEY-REGEXP should be a regular expression with which | ||
| 26499 | to search within the record. If a match for KEY-REGEXP is not | ||
| 26500 | found within a record, that record is ignored. | ||
| 26501 | |||
| 26502 | With a negative prefix arg, sort in reverse order. | ||
| 26445 | 26503 | ||
| 26446 | The variable `sort-fold-case' determines whether alphabetic case affects | 26504 | The variable `sort-fold-case' determines whether alphabetic case affects |
| 26447 | the sort order. | 26505 | the sort order. |
| @@ -27117,8 +27175,8 @@ GnuTLS requires a port number. | |||
| 27117 | ;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes | 27175 | ;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes |
| 27118 | ;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke | 27176 | ;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke |
| 27119 | ;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke | 27177 | ;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke |
| 27120 | ;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20478 | 27178 | ;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20523 |
| 27121 | ;;;;;; 3673 653810 0)) | 27179 | ;;;;;; 62082 997685 0)) |
| 27122 | ;;; Generated autoloads from strokes.el | 27180 | ;;; Generated autoloads from strokes.el |
| 27123 | 27181 | ||
| 27124 | (autoload 'strokes-global-set-stroke "strokes" "\ | 27182 | (autoload 'strokes-global-set-stroke "strokes" "\ |
| @@ -27253,7 +27311,7 @@ Studlify-case the current buffer. | |||
| 27253 | ;;;*** | 27311 | ;;;*** |
| 27254 | 27312 | ||
| 27255 | ;;;### (autoloads (global-subword-mode subword-mode) "subword" "progmodes/subword.el" | 27313 | ;;;### (autoloads (global-subword-mode subword-mode) "subword" "progmodes/subword.el" |
| 27256 | ;;;;;; (20355 10021 546955 0)) | 27314 | ;;;;;; (20524 51365 2559 0)) |
| 27257 | ;;; Generated autoloads from progmodes/subword.el | 27315 | ;;; Generated autoloads from progmodes/subword.el |
| 27258 | 27316 | ||
| 27259 | (autoload 'subword-mode "subword" "\ | 27317 | (autoload 'subword-mode "subword" "\ |
| @@ -28010,8 +28068,8 @@ Connect to the Emacs talk group from the current X display or tty frame. | |||
| 28010 | 28068 | ||
| 28011 | ;;;*** | 28069 | ;;;*** |
| 28012 | 28070 | ||
| 28013 | ;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20478 3673 | 28071 | ;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20522 9637 |
| 28014 | ;;;;;; 653810 0)) | 28072 | ;;;;;; 465791 0)) |
| 28015 | ;;; Generated autoloads from tar-mode.el | 28073 | ;;; Generated autoloads from tar-mode.el |
| 28016 | 28074 | ||
| 28017 | (autoload 'tar-mode "tar-mode" "\ | 28075 | (autoload 'tar-mode "tar-mode" "\ |
| @@ -28200,8 +28258,8 @@ Start coverage on function under point. | |||
| 28200 | 28258 | ||
| 28201 | ;;;*** | 28259 | ;;;*** |
| 28202 | 28260 | ||
| 28203 | ;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20478 3673 | 28261 | ;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20545 57511 |
| 28204 | ;;;;;; 653810 0)) | 28262 | ;;;;;; 257469 0)) |
| 28205 | ;;; Generated autoloads from play/tetris.el | 28263 | ;;; Generated autoloads from play/tetris.el |
| 28206 | 28264 | ||
| 28207 | (autoload 'tetris "tetris" "\ | 28265 | (autoload 'tetris "tetris" "\ |
| @@ -28232,7 +28290,7 @@ tetris-mode keybindings: | |||
| 28232 | ;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command | 28290 | ;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command |
| 28233 | ;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp | 28291 | ;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp |
| 28234 | ;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el" | 28292 | ;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el" |
| 28235 | ;;;;;; (20485 15269 390836 0)) | 28293 | ;;;;;; (20523 62082 997685 0)) |
| 28236 | ;;; Generated autoloads from textmodes/tex-mode.el | 28294 | ;;; Generated autoloads from textmodes/tex-mode.el |
| 28237 | 28295 | ||
| 28238 | (defvar tex-shell-file-name nil "\ | 28296 | (defvar tex-shell-file-name nil "\ |
| @@ -29114,7 +29172,7 @@ With ARG, turn time stamping on if and only if arg is positive. | |||
| 29114 | ;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out | 29172 | ;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out |
| 29115 | ;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in | 29173 | ;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in |
| 29116 | ;;;;;; timeclock-mode-line-display) "timeclock" "calendar/timeclock.el" | 29174 | ;;;;;; timeclock-mode-line-display) "timeclock" "calendar/timeclock.el" |
| 29117 | ;;;;;; (20427 14766 970343 0)) | 29175 | ;;;;;; (20523 62082 997685 0)) |
| 29118 | ;;; Generated autoloads from calendar/timeclock.el | 29176 | ;;; Generated autoloads from calendar/timeclock.el |
| 29119 | 29177 | ||
| 29120 | (autoload 'timeclock-mode-line-display "timeclock" "\ | 29178 | (autoload 'timeclock-mode-line-display "timeclock" "\ |
| @@ -29524,7 +29582,7 @@ BUFFER defaults to `trace-buffer'. | |||
| 29524 | ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion | 29582 | ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion |
| 29525 | ;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers | 29583 | ;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers |
| 29526 | ;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp" | 29584 | ;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp" |
| 29527 | ;;;;;; "net/tramp.el" (20471 14012 248888 0)) | 29585 | ;;;;;; "net/tramp.el" (20530 32114 546307 0)) |
| 29528 | ;;; Generated autoloads from net/tramp.el | 29586 | ;;; Generated autoloads from net/tramp.el |
| 29529 | 29587 | ||
| 29530 | (defvar tramp-mode t "\ | 29588 | (defvar tramp-mode t "\ |
| @@ -29667,8 +29725,8 @@ Discard Tramp from loading remote files. | |||
| 29667 | 29725 | ||
| 29668 | ;;;*** | 29726 | ;;;*** |
| 29669 | 29727 | ||
| 29670 | ;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20369 | 29728 | ;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20518 |
| 29671 | ;;;;;; 14251 85829 0)) | 29729 | ;;;;;; 12580 46478 0)) |
| 29672 | ;;; Generated autoloads from tutorial.el | 29730 | ;;; Generated autoloads from tutorial.el |
| 29673 | 29731 | ||
| 29674 | (autoload 'help-with-tutorial "tutorial" "\ | 29732 | (autoload 'help-with-tutorial "tutorial" "\ |
| @@ -29755,7 +29813,7 @@ First column's text sSs Second column's text | |||
| 29755 | ;;;;;; type-break type-break-mode type-break-keystroke-threshold | 29813 | ;;;;;; type-break type-break-mode type-break-keystroke-threshold |
| 29756 | ;;;;;; type-break-good-break-interval type-break-good-rest-interval | 29814 | ;;;;;; type-break-good-break-interval type-break-good-rest-interval |
| 29757 | ;;;;;; type-break-interval type-break-mode) "type-break" "type-break.el" | 29815 | ;;;;;; type-break-interval type-break-mode) "type-break" "type-break.el" |
| 29758 | ;;;;;; (20355 10021 546955 0)) | 29816 | ;;;;;; (20545 57511 257469 0)) |
| 29759 | ;;; Generated autoloads from type-break.el | 29817 | ;;; Generated autoloads from type-break.el |
| 29760 | 29818 | ||
| 29761 | (defvar type-break-mode nil "\ | 29819 | (defvar type-break-mode nil "\ |
| @@ -30320,7 +30378,7 @@ accessible. | |||
| 30320 | ;;;*** | 30378 | ;;;*** |
| 30321 | 30379 | ||
| 30322 | ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p | 30380 | ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p |
| 30323 | ;;;;;; url-http) "url-http" "url/url-http.el" (20478 3673 653810 | 30381 | ;;;;;; url-http) "url-http" "url/url-http.el" (20522 38650 757441 |
| 30324 | ;;;;;; 0)) | 30382 | ;;;;;; 0)) |
| 30325 | ;;; Generated autoloads from url/url-http.el | 30383 | ;;; Generated autoloads from url/url-http.el |
| 30326 | 30384 | ||
| @@ -30523,7 +30581,7 @@ Fetch a data URL (RFC 2397). | |||
| 30523 | ;;;*** | 30581 | ;;;*** |
| 30524 | 30582 | ||
| 30525 | ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" | 30583 | ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" |
| 30526 | ;;;;;; "url/url-parse.el" (20478 3673 653810 0)) | 30584 | ;;;;;; "url/url-parse.el" (20523 62082 997685 0)) |
| 30527 | ;;; Generated autoloads from url/url-parse.el | 30585 | ;;; Generated autoloads from url/url-parse.el |
| 30528 | 30586 | ||
| 30529 | (autoload 'url-recreate-url "url-parse" "\ | 30587 | (autoload 'url-recreate-url "url-parse" "\ |
| @@ -30606,8 +30664,8 @@ The variable `url-queue-timeout' sets a timeout. | |||
| 30606 | ;;;;;; url-percentage url-display-percentage url-pretty-length url-strip-leading-spaces | 30664 | ;;;;;; url-percentage url-display-percentage url-pretty-length url-strip-leading-spaces |
| 30607 | ;;;;;; url-eat-trailing-space url-get-normalized-date url-lazy-message | 30665 | ;;;;;; url-eat-trailing-space url-get-normalized-date url-lazy-message |
| 30608 | ;;;;;; url-normalize-url url-insert-entities-in-string url-parse-args | 30666 | ;;;;;; url-normalize-url url-insert-entities-in-string url-parse-args |
| 30609 | ;;;;;; url-debug url-debug) "url-util" "url/url-util.el" (20478 | 30667 | ;;;;;; url-debug url-debug) "url-util" "url/url-util.el" (20520 |
| 30610 | ;;;;;; 3673 653810 0)) | 30668 | ;;;;;; 54308 826101 0)) |
| 30611 | ;;; Generated autoloads from url/url-util.el | 30669 | ;;; Generated autoloads from url/url-util.el |
| 30612 | 30670 | ||
| 30613 | (defvar url-debug nil "\ | 30671 | (defvar url-debug nil "\ |
| @@ -30867,8 +30925,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. | |||
| 30867 | ;;;;;; vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers | 30925 | ;;;;;; vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers |
| 30868 | ;;;;;; vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff | 30926 | ;;;;;; vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff |
| 30869 | ;;;;;; vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook | 30927 | ;;;;;; vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook |
| 30870 | ;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20501 | 30928 | ;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20542 |
| 30871 | ;;;;;; 3499 284800 0)) | 30929 | ;;;;;; 46798 773957 0)) |
| 30872 | ;;; Generated autoloads from vc/vc.el | 30930 | ;;; Generated autoloads from vc/vc.el |
| 30873 | 30931 | ||
| 30874 | (defvar vc-checkout-hook nil "\ | 30932 | (defvar vc-checkout-hook nil "\ |
| @@ -31211,7 +31269,7 @@ Name of the format file in a .bzr directory.") | |||
| 31211 | 31269 | ||
| 31212 | ;;;*** | 31270 | ;;;*** |
| 31213 | 31271 | ||
| 31214 | ;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20478 3673 653810 | 31272 | ;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20542 46798 773957 |
| 31215 | ;;;;;; 0)) | 31273 | ;;;;;; 0)) |
| 31216 | ;;; Generated autoloads from vc/vc-cvs.el | 31274 | ;;; Generated autoloads from vc/vc-cvs.el |
| 31217 | (defun vc-cvs-registered (f) | 31275 | (defun vc-cvs-registered (f) |
| @@ -31223,7 +31281,7 @@ Name of the format file in a .bzr directory.") | |||
| 31223 | 31281 | ||
| 31224 | ;;;*** | 31282 | ;;;*** |
| 31225 | 31283 | ||
| 31226 | ;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20478 3673 653810 | 31284 | ;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20522 9637 465791 |
| 31227 | ;;;;;; 0)) | 31285 | ;;;;;; 0)) |
| 31228 | ;;; Generated autoloads from vc/vc-dir.el | 31286 | ;;; Generated autoloads from vc/vc-dir.el |
| 31229 | 31287 | ||
| @@ -31295,8 +31353,7 @@ case, and the process object in the asynchronous case. | |||
| 31295 | 31353 | ||
| 31296 | ;;;*** | 31354 | ;;;*** |
| 31297 | 31355 | ||
| 31298 | ;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20478 3673 653810 | 31356 | ;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20524 51365 2559 0)) |
| 31299 | ;;;;;; 0)) | ||
| 31300 | ;;; Generated autoloads from vc/vc-mtn.el | 31357 | ;;; Generated autoloads from vc/vc-mtn.el |
| 31301 | 31358 | ||
| 31302 | (defconst vc-mtn-admin-dir "_MTN" "\ | 31359 | (defconst vc-mtn-admin-dir "_MTN" "\ |
| @@ -32468,8 +32525,8 @@ Exit View mode and make the current buffer editable. | |||
| 32468 | 32525 | ||
| 32469 | ;;;*** | 32526 | ;;;*** |
| 32470 | 32527 | ||
| 32471 | ;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20355 | 32528 | ;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20513 |
| 32472 | ;;;;;; 10021 546955 0)) | 32529 | ;;;;;; 18948 537867 0)) |
| 32473 | ;;; Generated autoloads from emulation/vip.el | 32530 | ;;; Generated autoloads from emulation/vip.el |
| 32474 | 32531 | ||
| 32475 | (autoload 'vip-setup "vip" "\ | 32532 | (autoload 'vip-setup "vip" "\ |
| @@ -32592,15 +32649,16 @@ this is equivalent to `display-warning', using | |||
| 32592 | ;;;*** | 32649 | ;;;*** |
| 32593 | 32650 | ||
| 32594 | ;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el" | 32651 | ;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el" |
| 32595 | ;;;;;; (20478 3673 653810 0)) | 32652 | ;;;;;; (20510 18478 782378 0)) |
| 32596 | ;;; Generated autoloads from wdired.el | 32653 | ;;; Generated autoloads from wdired.el |
| 32597 | 32654 | ||
| 32598 | (autoload 'wdired-change-to-wdired-mode "wdired" "\ | 32655 | (autoload 'wdired-change-to-wdired-mode "wdired" "\ |
| 32599 | Put a dired buffer in a mode in which filenames are editable. | 32656 | Put a Dired buffer in Writable Dired (WDired) mode. |
| 32600 | \\<wdired-mode-map> | 32657 | \\<wdired-mode-map> |
| 32601 | This mode allows the user to change the names of the files, and after | 32658 | In WDired mode, you can edit the names of the files in the |
| 32602 | typing \\[wdired-finish-edit] Emacs renames the files and directories | 32659 | buffer, the target of the links, and the permission bits of the |
| 32603 | in disk. | 32660 | files. After typing \\[wdired-finish-edit], Emacs modifies the files and |
| 32661 | directories to reflect your edits. | ||
| 32604 | 32662 | ||
| 32605 | See `wdired-mode'. | 32663 | See `wdired-mode'. |
| 32606 | 32664 | ||
| @@ -32626,7 +32684,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke | |||
| 32626 | ;;;*** | 32684 | ;;;*** |
| 32627 | 32685 | ||
| 32628 | ;;;### (autoloads (which-function-mode which-func-mode) "which-func" | 32686 | ;;;### (autoloads (which-function-mode which-func-mode) "which-func" |
| 32629 | ;;;;;; "progmodes/which-func.el" (20461 32935 300400 0)) | 32687 | ;;;;;; "progmodes/which-func.el" (20523 62082 997685 0)) |
| 32630 | ;;; Generated autoloads from progmodes/which-func.el | 32688 | ;;; Generated autoloads from progmodes/which-func.el |
| 32631 | (put 'which-func-format 'risky-local-variable t) | 32689 | (put 'which-func-format 'risky-local-variable t) |
| 32632 | (put 'which-func-current 'risky-local-variable t) | 32690 | (put 'which-func-current 'risky-local-variable t) |
| @@ -32662,8 +32720,8 @@ in certain major modes. | |||
| 32662 | ;;;### (autoloads (whitespace-report-region whitespace-report whitespace-cleanup-region | 32720 | ;;;### (autoloads (whitespace-report-region whitespace-report whitespace-cleanup-region |
| 32663 | ;;;;;; whitespace-cleanup global-whitespace-toggle-options whitespace-toggle-options | 32721 | ;;;;;; whitespace-cleanup global-whitespace-toggle-options whitespace-toggle-options |
| 32664 | ;;;;;; global-whitespace-newline-mode global-whitespace-mode whitespace-newline-mode | 32722 | ;;;;;; global-whitespace-newline-mode global-whitespace-mode whitespace-newline-mode |
| 32665 | ;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20495 51111 | 32723 | ;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20508 13724 |
| 32666 | ;;;;;; 757560 0)) | 32724 | ;;;;;; 260761 0)) |
| 32667 | ;;; Generated autoloads from whitespace.el | 32725 | ;;; Generated autoloads from whitespace.el |
| 32668 | 32726 | ||
| 32669 | (autoload 'whitespace-mode "whitespace" "\ | 32727 | (autoload 'whitespace-mode "whitespace" "\ |
| @@ -33209,7 +33267,7 @@ With arg, turn Winner mode on if and only if arg is positive. | |||
| 33209 | ;;;*** | 33267 | ;;;*** |
| 33210 | 33268 | ||
| 33211 | ;;;### (autoloads (woman-bookmark-jump woman-find-file woman-dired-find-file | 33269 | ;;;### (autoloads (woman-bookmark-jump woman-find-file woman-dired-find-file |
| 33212 | ;;;;;; woman woman-locale) "woman" "woman.el" (20504 6781 423358 | 33270 | ;;;;;; woman woman-locale) "woman" "woman.el" (20539 18737 159373 |
| 33213 | ;;;;;; 0)) | 33271 | ;;;;;; 0)) |
| 33214 | ;;; Generated autoloads from woman.el | 33272 | ;;; Generated autoloads from woman.el |
| 33215 | 33273 | ||
| @@ -33392,7 +33450,7 @@ Example: | |||
| 33392 | ;;;*** | 33450 | ;;;*** |
| 33393 | 33451 | ||
| 33394 | ;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" | 33452 | ;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" |
| 33395 | ;;;;;; (20499 48164 310488 0)) | 33453 | ;;;;;; (20528 48420 241677 0)) |
| 33396 | ;;; Generated autoloads from xml.el | 33454 | ;;; Generated autoloads from xml.el |
| 33397 | 33455 | ||
| 33398 | (autoload 'xml-parse-file "xml" "\ | 33456 | (autoload 'xml-parse-file "xml" "\ |
| @@ -33540,7 +33598,7 @@ Zippy goes to the analyst. | |||
| 33540 | 33598 | ||
| 33541 | ;;;*** | 33599 | ;;;*** |
| 33542 | 33600 | ||
| 33543 | ;;;### (autoloads (zone) "zone" "play/zone.el" (20427 14766 970343 | 33601 | ;;;### (autoloads (zone) "zone" "play/zone.el" (20545 57511 257469 |
| 33544 | ;;;;;; 0)) | 33602 | ;;;;;; 0)) |
| 33545 | ;;; Generated autoloads from play/zone.el | 33603 | ;;; Generated autoloads from play/zone.el |
| 33546 | 33604 | ||
| @@ -33752,7 +33810,7 @@ Zone out, completely. | |||
| 33752 | ;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" | 33810 | ;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" |
| 33753 | ;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" | 33811 | ;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" |
| 33754 | ;;;;;; "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el" | 33812 | ;;;;;; "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el" |
| 33755 | ;;;;;; "w32-vars.el" "x-dnd.el") (20505 765 716386 793000)) | 33813 | ;;;;;; "w32-vars.el" "x-dnd.el") (20545 57718 475744 538000)) |
| 33756 | 33814 | ||
| 33757 | ;;;*** | 33815 | ;;;*** |
| 33758 | 33816 | ||
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index cc2638d58de..a696fff7dc7 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1821,7 +1821,9 @@ Currently supported properties are all the properties that can appear in | |||
| 1821 | `:predicate' a predicate that completion candidates need to satisfy. | 1821 | `:predicate' a predicate that completion candidates need to satisfy. |
| 1822 | `:exclusive' If `no', means that if the completion table fails to | 1822 | `:exclusive' If `no', means that if the completion table fails to |
| 1823 | match the text at point, then instead of reporting a completion | 1823 | match the text at point, then instead of reporting a completion |
| 1824 | failure, the completion should try the next completion function.") | 1824 | failure, the completion should try the next completion function. |
| 1825 | As is the case with most hooks, the functions are responsible to preserve | ||
| 1826 | things like point and current buffer.") | ||
| 1825 | 1827 | ||
| 1826 | (defvar completion--capf-misbehave-funs nil | 1828 | (defvar completion--capf-misbehave-funs nil |
| 1827 | "List of functions found on `completion-at-point-functions' that misbehave. | 1829 | "List of functions found on `completion-at-point-functions' that misbehave. |
diff --git a/lisp/misc.el b/lisp/misc.el index cb52ecbd36e..96b739dc2b7 100644 --- a/lisp/misc.el +++ b/lisp/misc.el | |||
| @@ -99,14 +99,14 @@ Ignores CHAR at point." | |||
| 99 | (defun forward-to-word (arg) | 99 | (defun forward-to-word (arg) |
| 100 | "Move forward until encountering the beginning of a word. | 100 | "Move forward until encountering the beginning of a word. |
| 101 | With argument, do this that many times." | 101 | With argument, do this that many times." |
| 102 | (interactive "p") | 102 | (interactive "^p") |
| 103 | (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg) | 103 | (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg) |
| 104 | (goto-char (if (> arg 0) (point-max) (point-min))))) | 104 | (goto-char (if (> arg 0) (point-max) (point-min))))) |
| 105 | 105 | ||
| 106 | (defun backward-to-word (arg) | 106 | (defun backward-to-word (arg) |
| 107 | "Move backward until encountering the end of a word. | 107 | "Move backward until encountering the end of a word. |
| 108 | With argument, do this that many times." | 108 | With argument, do this that many times." |
| 109 | (interactive "p") | 109 | (interactive "^p") |
| 110 | (forward-to-word (- arg))) | 110 | (forward-to-word (- arg))) |
| 111 | 111 | ||
| 112 | ;;;###autoload | 112 | ;;;###autoload |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 27cf50f06ca..dd345630b9b 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -802,26 +802,36 @@ With no argument or nil as argument, use the current buffer." | |||
| 802 | (defvar rcirc-max-message-length 420 | 802 | (defvar rcirc-max-message-length 420 |
| 803 | "Messages longer than this value will be split.") | 803 | "Messages longer than this value will be split.") |
| 804 | 804 | ||
| 805 | (defun rcirc-split-message (message) | ||
| 806 | "Split MESSAGE into chunks within `rcirc-max-message-length'." | ||
| 807 | ;; `rcirc-encode-coding-system' can have buffer-local value. | ||
| 808 | (let ((encoding rcirc-encode-coding-system)) | ||
| 809 | (with-temp-buffer | ||
| 810 | (insert message) | ||
| 811 | (goto-char (point-min)) | ||
| 812 | (let (result) | ||
| 813 | (while (not (eobp)) | ||
| 814 | (goto-char (or (byte-to-position rcirc-max-message-length) | ||
| 815 | (point-max))) | ||
| 816 | ;; max message length is 512 including CRLF | ||
| 817 | (while (and (not (bobp)) | ||
| 818 | (> (length (encode-coding-region | ||
| 819 | (point-min) (point) encoding t)) | ||
| 820 | rcirc-max-message-length)) | ||
| 821 | (forward-char -1)) | ||
| 822 | (push (delete-and-extract-region (point-min) (point)) result)) | ||
| 823 | (nreverse result))))) | ||
| 824 | |||
| 805 | (defun rcirc-send-message (process target message &optional noticep silent) | 825 | (defun rcirc-send-message (process target message &optional noticep silent) |
| 806 | "Send TARGET associated with PROCESS a privmsg with text MESSAGE. | 826 | "Send TARGET associated with PROCESS a privmsg with text MESSAGE. |
| 807 | If NOTICEP is non-nil, send a notice instead of privmsg. | 827 | If NOTICEP is non-nil, send a notice instead of privmsg. |
| 808 | If SILENT is non-nil, do not print the message in any irc buffer." | 828 | If SILENT is non-nil, do not print the message in any irc buffer." |
| 809 | ;; max message length is 512 including CRLF | 829 | (let ((response (if noticep "NOTICE" "PRIVMSG"))) |
| 810 | (let* ((response (if noticep "NOTICE" "PRIVMSG")) | ||
| 811 | (oversize (> (length message) rcirc-max-message-length)) | ||
| 812 | (text (if oversize | ||
| 813 | (substring message 0 rcirc-max-message-length) | ||
| 814 | message)) | ||
| 815 | (text (if (string= text "") | ||
| 816 | " " | ||
| 817 | text)) | ||
| 818 | (more (if oversize | ||
| 819 | (substring message rcirc-max-message-length)))) | ||
| 820 | (rcirc-get-buffer-create process target) | 830 | (rcirc-get-buffer-create process target) |
| 821 | (rcirc-send-string process (concat response " " target " :" text)) | 831 | (dolist (msg (rcirc-split-message message)) |
| 822 | (unless silent | 832 | (rcirc-send-string process (concat response " " target " :" msg)) |
| 823 | (rcirc-print process (rcirc-nick process) response target text)) | 833 | (unless silent |
| 824 | (when more (rcirc-send-message process target more noticep)))) | 834 | (rcirc-print process (rcirc-nick process) response target msg))))) |
| 825 | 835 | ||
| 826 | (defvar rcirc-input-ring nil) | 836 | (defvar rcirc-input-ring nil) |
| 827 | (defvar rcirc-input-ring-index 0) | 837 | (defvar rcirc-input-ring-index 0) |
diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el index c6e95970f3d..4e759a4e6b2 100644 --- a/lisp/net/sasl.el +++ b/lisp/net/sasl.el | |||
| @@ -183,7 +183,7 @@ It contain at least 64 bits of entropy." | |||
| 183 | ;; Don't use microseconds from (current-time), they may be unsupported. | 183 | ;; Don't use microseconds from (current-time), they may be unsupported. |
| 184 | ;; Instead we use this randomly inited counter. | 184 | ;; Instead we use this randomly inited counter. |
| 185 | (setq sasl-unique-id-char | 185 | (setq sasl-unique-id-char |
| 186 | (% (1+ (or sasl-unique-id-char (logand (random t) (1- (lsh 1 20))))) | 186 | (% (1+ (or sasl-unique-id-char (logand (random) (1- (lsh 1 20))))) |
| 187 | ;; (current-time) returns 16-bit ints, | 187 | ;; (current-time) returns 16-bit ints, |
| 188 | ;; and 2^16*25 just fits into 4 digits i base 36. | 188 | ;; and 2^16*25 just fits into 4 digits i base 36. |
| 189 | (* 25 25))) | 189 | (* 25 25))) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 6283188d46a..2c1af3e83fa 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -512,9 +512,9 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 512 | ;; IRIX64: /usr/bin | 512 | ;; IRIX64: /usr/bin |
| 513 | ;;;###tramp-autoload | 513 | ;;;###tramp-autoload |
| 514 | (defcustom tramp-remote-path | 514 | (defcustom tramp-remote-path |
| 515 | '(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin" | 515 | '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" |
| 516 | "/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" | 516 | "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" |
| 517 | "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" | 517 | "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" |
| 518 | "/opt/bin" "/opt/sbin" "/opt/local/bin") | 518 | "/opt/bin" "/opt/sbin" "/opt/local/bin") |
| 519 | "List of directories to search for executables on remote host. | 519 | "List of directories to search for executables on remote host. |
| 520 | For every remote host, this variable will be set buffer local, | 520 | For every remote host, this variable will be set buffer local, |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 848599104c5..a17bbfa0d14 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3293,7 +3293,7 @@ for process communication also." | |||
| 3293 | ;; Under Windows XP, accept-process-output doesn't return | 3293 | ;; Under Windows XP, accept-process-output doesn't return |
| 3294 | ;; sometimes. So we add an additional timeout. | 3294 | ;; sometimes. So we add an additional timeout. |
| 3295 | (with-timeout ((or timeout 1)) | 3295 | (with-timeout ((or timeout 1)) |
| 3296 | (accept-process-output proc timeout timeout-msecs))) | 3296 | (accept-process-output proc timeout timeout-msecs (and proc t)))) |
| 3297 | (tramp-message proc 10 "\n%s" (buffer-string)))) | 3297 | (tramp-message proc 10 "\n%s" (buffer-string)))) |
| 3298 | 3298 | ||
| 3299 | (defun tramp-check-for-regexp (proc regexp) | 3299 | (defun tramp-check-for-regexp (proc regexp) |
diff --git a/lisp/obsolete/vc-mcvs.el b/lisp/obsolete/vc-mcvs.el index 94db90f1d6a..78221945073 100644 --- a/lisp/obsolete/vc-mcvs.el +++ b/lisp/obsolete/vc-mcvs.el | |||
| @@ -329,7 +329,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.") | |||
| 329 | (if vc-mcvs-use-edit | 329 | (if vc-mcvs-use-edit |
| 330 | (vc-mcvs-command nil 0 file "edit") | 330 | (vc-mcvs-command nil 0 file "edit") |
| 331 | (set-file-modes file (logior (file-modes file) 128)) | 331 | (set-file-modes file (logior (file-modes file) 128)) |
| 332 | (if (equal file buffer-file-name) (toggle-read-only -1)))) | 332 | (if (equal file buffer-file-name) (read-only-mode -1)))) |
| 333 | ;; Check out a particular revision (or recreate the file). | 333 | ;; Check out a particular revision (or recreate the file). |
| 334 | (vc-file-setprop file 'vc-working-revision nil) | 334 | (vc-file-setprop file 'vc-working-revision nil) |
| 335 | (apply 'vc-mcvs-command nil 0 file | 335 | (apply 'vc-mcvs-command nil 0 file |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index cf9c32006ac..152af5f43ed 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Better seed support for (random). | ||
| 4 | * org-id.el (org-id-uuid): | ||
| 5 | Change (random t) to (random), now that the latter is more random. | ||
| 6 | |||
| 1 | 2012-07-29 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2012-07-29 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | Don't use the abbreviation "win" to refer to Windows (Bug#10421). | 9 | Don't use the abbreviation "win" to refer to Windows (Bug#10421). |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 55e826f3ae6..a93f804946f 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -318,7 +318,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"." | |||
| 318 | (defun org-id-uuid () | 318 | (defun org-id-uuid () |
| 319 | "Return string with random (version 4) UUID." | 319 | "Return string with random (version 4) UUID." |
| 320 | (let ((rnd (md5 (format "%s%s%s%s%s%s%s" | 320 | (let ((rnd (md5 (format "%s%s%s%s%s%s%s" |
| 321 | (random t) | 321 | (random) |
| 322 | (current-time) | 322 | (current-time) |
| 323 | (user-uid) | 323 | (user-uid) |
| 324 | (emacs-pid) | 324 | (emacs-pid) |
diff --git a/lisp/paren.el b/lisp/paren.el index 2d6c42478e1..ab856380d3f 100644 --- a/lisp/paren.el +++ b/lisp/paren.el | |||
| @@ -52,8 +52,17 @@ otherwise)." | |||
| 52 | :group 'paren-showing) | 52 | :group 'paren-showing) |
| 53 | 53 | ||
| 54 | (defcustom show-paren-delay 0.125 | 54 | (defcustom show-paren-delay 0.125 |
| 55 | "Time in seconds to delay before showing a matching paren." | 55 | "Time in seconds to delay before showing a matching paren. |
| 56 | If you change this without using customize while `show-paren-mode' is | ||
| 57 | active, you must toggle the mode off and on again for this to take effect." | ||
| 56 | :type '(number :tag "seconds") | 58 | :type '(number :tag "seconds") |
| 59 | :initialize 'custom-initialize-default | ||
| 60 | :set (lambda (sym val) | ||
| 61 | (if (not show-paren-mode) | ||
| 62 | (set sym val) | ||
| 63 | (show-paren-mode -1) | ||
| 64 | (set sym val) | ||
| 65 | (show-paren-mode 1))) | ||
| 57 | :group 'paren-showing) | 66 | :group 'paren-showing) |
| 58 | 67 | ||
| 59 | (defcustom show-paren-priority 1000 | 68 | (defcustom show-paren-priority 1000 |
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index e6df0df8282..abc78cd495c 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el | |||
| @@ -953,8 +953,6 @@ lest." | |||
| 953 | (y-or-n-p prompt) | 953 | (y-or-n-p prompt) |
| 954 | t)) | 954 | t)) |
| 955 | 955 | ||
| 956 | (random t) | ||
| 957 | |||
| 958 | (provide '5x5) | 956 | (provide '5x5) |
| 959 | 957 | ||
| 960 | ;;; 5x5.el ends here | 958 | ;;; 5x5.el ends here |
diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 9919600202f..2398a7b89c7 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el | |||
| @@ -201,8 +201,6 @@ the buffer *Birthday-Present-for-Name*." | |||
| 201 | (animate-string "my sunshine" 18 34) | 201 | (animate-string "my sunshine" 18 34) |
| 202 | (animate-string "to stay!" 19 34)) | 202 | (animate-string "to stay!" 19 34)) |
| 203 | 203 | ||
| 204 | (random t) | ||
| 205 | |||
| 206 | (provide 'animate) | 204 | (provide 'animate) |
| 207 | 205 | ||
| 208 | ;;; animate.el ends here | 206 | ;;; animate.el ends here |
diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index eb2d784c8e5..db2e18188e5 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el | |||
| @@ -93,7 +93,7 @@ | |||
| 93 | (define-key map (vector 'remap oldfun) newfun)) | 93 | (define-key map (vector 'remap oldfun) newfun)) |
| 94 | 94 | ||
| 95 | 95 | ||
| 96 | (defvar blackbox-mode-map | 96 | (defvar blackbox-mode-map |
| 97 | (let ((map (make-keymap))) | 97 | (let ((map (make-keymap))) |
| 98 | (suppress-keymap map t) | 98 | (suppress-keymap map t) |
| 99 | (blackbox-redefine-key map 'backward-char 'bb-left) | 99 | (blackbox-redefine-key map 'backward-char 'bb-left) |
| @@ -257,7 +257,6 @@ a reflection." | |||
| 257 | (bb-goto (cons bb-x bb-y))) | 257 | (bb-goto (cons bb-x bb-y))) |
| 258 | 258 | ||
| 259 | (defun bb-init-board (num-balls) | 259 | (defun bb-init-board (num-balls) |
| 260 | (random t) | ||
| 261 | (let (board pos) | 260 | (let (board pos) |
| 262 | (while (>= (setq num-balls (1- num-balls)) 0) | 261 | (while (>= (setq num-balls (1- num-balls)) 0) |
| 263 | (while | 262 | (while |
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index cbf29a26a71..dbd6e893473 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el | |||
| @@ -53,9 +53,6 @@ | |||
| 53 | 53 | ||
| 54 | ;;; Code: | 54 | ;;; Code: |
| 55 | 55 | ||
| 56 | ; Randomize the seed in the random number generator. | ||
| 57 | (random t) | ||
| 58 | |||
| 59 | (defconst cookie-delimiter "\n%%\n\\|\n%\n\\|\0" | 56 | (defconst cookie-delimiter "\n%%\n\\|\n%\n\\|\0" |
| 60 | "Delimiter used to separate cookie file entries.") | 57 | "Delimiter used to separate cookie file entries.") |
| 61 | 58 | ||
diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el index 8f9f8cea24f..238b2a86c17 100644 --- a/lisp/play/dissociate.el +++ b/lisp/play/dissociate.el | |||
| @@ -94,8 +94,6 @@ Default is 2." | |||
| 94 | (funcall search-function overlap opoint t)))))) | 94 | (funcall search-function overlap opoint t)))))) |
| 95 | (sit-for 0)))) | 95 | (sit-for 0)))) |
| 96 | 96 | ||
| 97 | (random t) | ||
| 98 | |||
| 99 | (provide 'dissociate) | 97 | (provide 'dissociate) |
| 100 | 98 | ||
| 101 | ;;; dissociate.el ends here | 99 | ;;; dissociate.el ends here |
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index fdae2ec9326..57dbb1452f3 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el | |||
| @@ -1620,8 +1620,6 @@ Hack on previous word, setting global variable DOCTOR-OWNER to correct result." | |||
| 1620 | 1620 | ||
| 1621 | (defun doctor-chat () (doctor-type (doc$ doctor--chatlst))) | 1621 | (defun doctor-chat () (doctor-type (doc$ doctor--chatlst))) |
| 1622 | 1622 | ||
| 1623 | (random t) | ||
| 1624 | |||
| 1625 | (provide 'doctor) | 1623 | (provide 'doctor) |
| 1626 | 1624 | ||
| 1627 | ;;; doctor.el ends here | 1625 | ;;; doctor.el ends here |
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 22a2642f751..2d62b800ef4 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el | |||
| @@ -3010,7 +3010,6 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") | |||
| 3010 | (dun-uexit nil))) | 3010 | (dun-uexit nil))) |
| 3011 | 3011 | ||
| 3012 | 3012 | ||
| 3013 | (random t) | ||
| 3014 | (setq tloc (+ 60 (random 18))) | 3013 | (setq tloc (+ 60 (random 18))) |
| 3015 | (dun-replace dun-room-objects tloc | 3014 | (dun-replace dun-room-objects tloc |
| 3016 | (append (nth tloc dun-room-objects) (list 18))) | 3015 | (append (nth tloc dun-room-objects) (list 18))) |
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 6d73e2ccb65..3dba99d98d5 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el | |||
| @@ -1197,8 +1197,6 @@ If the game is finished, this command requests for another game." | |||
| 1197 | (move-to-column (+ gomoku-x-offset | 1197 | (move-to-column (+ gomoku-x-offset |
| 1198 | (* gomoku-square-width (1- gomoku-board-width))))) | 1198 | (* gomoku-square-width (1- gomoku-board-width))))) |
| 1199 | 1199 | ||
| 1200 | (random t) | ||
| 1201 | |||
| 1202 | (provide 'gomoku) | 1200 | (provide 'gomoku) |
| 1203 | 1201 | ||
| 1204 | ;;; gomoku.el ends here | 1202 | ;;; gomoku.el ends here |
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index e9f555093db..e103249da49 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el | |||
| @@ -1683,8 +1683,6 @@ Use \\[describe-mode] for more info." | |||
| 1683 | ;;;allout-layout: (0 : -1 -1 0) | 1683 | ;;;allout-layout: (0 : -1 -1 0) |
| 1684 | ;;;End: | 1684 | ;;;End: |
| 1685 | 1685 | ||
| 1686 | (random t) | ||
| 1687 | |||
| 1688 | (provide 'landmark) | 1686 | (provide 'landmark) |
| 1689 | 1687 | ||
| 1690 | ;;; landmark.el ends here | 1688 | ;;; landmark.el ends here |
diff --git a/lisp/play/life.el b/lisp/play/life.el index e9133f84862..87ec0226af5 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el | |||
| @@ -111,9 +111,6 @@ | |||
| 111 | ;; Sadly, mode-line-format won't display numbers. | 111 | ;; Sadly, mode-line-format won't display numbers. |
| 112 | (defvar life-generation-string nil) | 112 | (defvar life-generation-string nil) |
| 113 | 113 | ||
| 114 | (defvar life-initialized nil | ||
| 115 | "Non-nil if `life' has been run at least once.") | ||
| 116 | |||
| 117 | ;;;###autoload | 114 | ;;;###autoload |
| 118 | (defun life (&optional sleeptime) | 115 | (defun life (&optional sleeptime) |
| 119 | "Run Conway's Life simulation. | 116 | "Run Conway's Life simulation. |
| @@ -121,9 +118,6 @@ The starting pattern is randomly selected. Prefix arg (optional first | |||
| 121 | arg non-nil from a program) is the number of seconds to sleep between | 118 | arg non-nil from a program) is the number of seconds to sleep between |
| 122 | generations (this defaults to 1)." | 119 | generations (this defaults to 1)." |
| 123 | (interactive "p") | 120 | (interactive "p") |
| 124 | (or life-initialized | ||
| 125 | (random t)) | ||
| 126 | (setq life-initialized t) | ||
| 127 | (or sleeptime (setq sleeptime 1)) | 121 | (or sleeptime (setq sleeptime 1)) |
| 128 | (life-setup) | 122 | (life-setup) |
| 129 | (catch 'life-exit | 123 | (catch 'life-exit |
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index c0c8803f896..e16bb2f1bde 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el | |||
| @@ -35,8 +35,6 @@ | |||
| 35 | :prefix "mpuz-" | 35 | :prefix "mpuz-" |
| 36 | :group 'games) | 36 | :group 'games) |
| 37 | 37 | ||
| 38 | (random t) ; randomize | ||
| 39 | |||
| 40 | (defcustom mpuz-silent 'error | 38 | (defcustom mpuz-silent 'error |
| 41 | "Set this to nil if you want dings on inputs. | 39 | "Set this to nil if you want dings on inputs. |
| 42 | The value t means never ding, and `error' means only ding on wrong input." | 40 | The value t means never ding, and `error' means only ding on wrong input." |
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index b811a21605b..9cc33304589 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el | |||
| @@ -635,8 +635,6 @@ tetris-mode keybindings: | |||
| 635 | (tetris-mode) | 635 | (tetris-mode) |
| 636 | (tetris-start-game)) | 636 | (tetris-start-game)) |
| 637 | 637 | ||
| 638 | (random t) | ||
| 639 | |||
| 640 | (provide 'tetris) | 638 | (provide 'tetris) |
| 641 | 639 | ||
| 642 | ;;; tetris.el ends here | 640 | ;;; tetris.el ends here |
diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 34e21193437..1cfc6c59987 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el | |||
| @@ -675,8 +675,6 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") | |||
| 675 | (kill-buffer nil)))) | 675 | (kill-buffer nil)))) |
| 676 | 676 | ||
| 677 | 677 | ||
| 678 | (random t) | ||
| 679 | |||
| 680 | ;;;;;;;;;;;;;;; | 678 | ;;;;;;;;;;;;;;; |
| 681 | (provide 'zone) | 679 | (provide 'zone) |
| 682 | 680 | ||
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 0a7d65c1fa4..97fcb6874dd 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el | |||
| @@ -32,6 +32,11 @@ | |||
| 32 | 32 | ||
| 33 | ;;; Code: | 33 | ;;; Code: |
| 34 | 34 | ||
| 35 | (defgroup bug-reference nil | ||
| 36 | "Hyperlinking references to bug reports" | ||
| 37 | ;; Somewhat arbitrary, by analogy with eg goto-address. | ||
| 38 | :group 'comm) | ||
| 39 | |||
| 35 | (defvar bug-reference-map | 40 | (defvar bug-reference-map |
| 36 | (let ((map (make-sparse-keymap))) | 41 | (let ((map (make-sparse-keymap))) |
| 37 | (define-key map [mouse-2] 'bug-reference-push-button) | 42 | (define-key map [mouse-2] 'bug-reference-push-button) |
| @@ -63,9 +68,13 @@ so that it is considered safe, see `enable-local-variables'.") | |||
| 63 | (and (symbolp s) | 68 | (and (symbolp s) |
| 64 | (get s 'bug-reference-url-format))))) | 69 | (get s 'bug-reference-url-format))))) |
| 65 | 70 | ||
| 66 | (defconst bug-reference-bug-regexp | 71 | (defcustom bug-reference-bug-regexp |
| 67 | "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)" | 72 | "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)" |
| 68 | "Regular expression which matches bug references.") | 73 | "Regular expression matching bug references. |
| 74 | The second subexpression should match the bug reference (usually a number)." | ||
| 75 | :type 'string | ||
| 76 | :safe 'stringp | ||
| 77 | :group 'bug-reference) | ||
| 69 | 78 | ||
| 70 | (defun bug-reference-set-overlay-properties () | 79 | (defun bug-reference-set-overlay-properties () |
| 71 | "Set properties of bug reference overlays." | 80 | "Set properties of bug reference overlays." |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 21a323d8b45..fbb0c9e204a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1503,6 +1503,13 @@ Otherwise, construct a buffer name from NAME-OF-MODE." | |||
| 1503 | (compilation-start command nil name-function highlight-regexp))) | 1503 | (compilation-start command nil name-function highlight-regexp))) |
| 1504 | (make-obsolete 'compile-internal 'compilation-start "22.1") | 1504 | (make-obsolete 'compile-internal 'compilation-start "22.1") |
| 1505 | 1505 | ||
| 1506 | (defcustom compilation-always-kill nil | ||
| 1507 | "If t, always kill a running compilation process before starting a new one. | ||
| 1508 | If nil, ask to kill it." | ||
| 1509 | :type 'boolean | ||
| 1510 | :version "24.3" | ||
| 1511 | :group 'compilation) | ||
| 1512 | |||
| 1506 | ;;;###autoload | 1513 | ;;;###autoload |
| 1507 | (defun compilation-start (command &optional mode name-function highlight-regexp) | 1514 | (defun compilation-start (command &optional mode name-function highlight-regexp) |
| 1508 | "Run compilation command COMMAND (low level interface). | 1515 | "Run compilation command COMMAND (low level interface). |
| @@ -1537,6 +1544,7 @@ Returns the compilation buffer created." | |||
| 1537 | (let ((comp-proc (get-buffer-process (current-buffer)))) | 1544 | (let ((comp-proc (get-buffer-process (current-buffer)))) |
| 1538 | (if comp-proc | 1545 | (if comp-proc |
| 1539 | (if (or (not (eq (process-status comp-proc) 'run)) | 1546 | (if (or (not (eq (process-status comp-proc) 'run)) |
| 1547 | compilation-always-kill | ||
| 1540 | (yes-or-no-p | 1548 | (yes-or-no-p |
| 1541 | (format "A %s process is running; kill it? " | 1549 | (format "A %s process is running; kill it? " |
| 1542 | name-of-mode))) | 1550 | name-of-mode))) |
| @@ -2461,10 +2469,7 @@ and overlay is highlighted between MK and END-MK." | |||
| 2461 | ;; the error location if the two buffers are in two | 2469 | ;; the error location if the two buffers are in two |
| 2462 | ;; different frames. So don't do it if it's not necessary. | 2470 | ;; different frames. So don't do it if it's not necessary. |
| 2463 | pre-existing | 2471 | pre-existing |
| 2464 | (let ((display-buffer-reuse-frames t) | 2472 | (display-buffer (marker-buffer msg)))) |
| 2465 | (pop-up-windows t)) | ||
| 2466 | ;; Pop up a window. | ||
| 2467 | (display-buffer (marker-buffer msg))))) | ||
| 2468 | (highlight-regexp (with-current-buffer (marker-buffer msg) | 2473 | (highlight-regexp (with-current-buffer (marker-buffer msg) |
| 2469 | ;; also do this while we change buffer | 2474 | ;; also do this while we change buffer |
| 2470 | (compilation-set-window w msg) | 2475 | (compilation-set-window w msg) |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index e5142571972..092e1a4d578 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -84,8 +84,9 @@ When this is `function', only ask when called non-interactively." | |||
| 84 | :group 'executable) | 84 | :group 'executable) |
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | (defcustom executable-prefix "#! " | 87 | (defcustom executable-prefix "#!" |
| 88 | "Interpreter magic number prefix inserted when there was no magic number." | 88 | "Interpreter magic number prefix inserted when there was no magic number." |
| 89 | :version "24.3" ; "#! " -> "#!" | ||
| 89 | :type 'string | 90 | :type 'string |
| 90 | :group 'executable) | 91 | :group 'executable) |
| 91 | 92 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 0a99c2f5c24..59c419abfc3 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1413,29 +1413,6 @@ this trigger is subscribed to `gdb-buf-publisher' and called with | |||
| 1413 | (with-current-buffer ,buffer | 1413 | (with-current-buffer ,buffer |
| 1414 | (apply ',expr args)))) | 1414 | (apply ',expr args)))) |
| 1415 | 1415 | ||
| 1416 | ;; Used to define all gdb-frame-*-buffer functions except | ||
| 1417 | ;; `gdb-frame-io-buffer' | ||
| 1418 | (defmacro def-gdb-frame-for-buffer (name buffer &optional doc) | ||
| 1419 | "Define a function NAME which shows gdb BUFFER in a separate frame. | ||
| 1420 | |||
| 1421 | DOC is an optional documentation string." | ||
| 1422 | `(defun ,name (&optional thread) | ||
| 1423 | ,(when doc doc) | ||
| 1424 | (interactive) | ||
| 1425 | (let ((special-display-regexps (append special-display-regexps '(".*"))) | ||
| 1426 | (special-display-frame-alist gdb-frame-parameters)) | ||
| 1427 | (display-buffer (gdb-get-buffer-create ,buffer thread))))) | ||
| 1428 | |||
| 1429 | (defmacro def-gdb-display-buffer (name buffer &optional doc) | ||
| 1430 | "Define a function NAME which shows gdb BUFFER. | ||
| 1431 | |||
| 1432 | DOC is an optional documentation string." | ||
| 1433 | `(defun ,name (&optional thread) | ||
| 1434 | ,(when doc doc) | ||
| 1435 | (interactive) | ||
| 1436 | (gdb-display-buffer | ||
| 1437 | (gdb-get-buffer-create ,buffer thread) t))) | ||
| 1438 | |||
| 1439 | ;; Used to display windows with thread-bound buffers | 1416 | ;; Used to display windows with thread-bound buffers |
| 1440 | (defmacro def-gdb-preempt-display-buffer (name buffer &optional doc | 1417 | (defmacro def-gdb-preempt-display-buffer (name buffer &optional doc |
| 1441 | split-horizontal) | 1418 | split-horizontal) |
| @@ -1511,8 +1488,7 @@ DOC is an optional documentation string." | |||
| 1511 | (defun gdb-display-io-buffer () | 1488 | (defun gdb-display-io-buffer () |
| 1512 | "Display IO of debugged program in a separate window." | 1489 | "Display IO of debugged program in a separate window." |
| 1513 | (interactive) | 1490 | (interactive) |
| 1514 | (gdb-display-buffer | 1491 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))) |
| 1515 | (gdb-get-buffer-create 'gdb-inferior-io) t)) | ||
| 1516 | 1492 | ||
| 1517 | (defun gdb-inferior-io--init-proc (proc) | 1493 | (defun gdb-inferior-io--init-proc (proc) |
| 1518 | ;; Set up inferior I/O. Needs GDB 6.4 onwards. | 1494 | ;; Set up inferior I/O. Needs GDB 6.4 onwards. |
| @@ -1540,19 +1516,24 @@ DOC is an optional documentation string." | |||
| 1540 | (comint-exec io-buffer "gdb-inferior" nil nil nil) | 1516 | (comint-exec io-buffer "gdb-inferior" nil nil nil) |
| 1541 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) | 1517 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) |
| 1542 | 1518 | ||
| 1543 | (defconst gdb-frame-parameters | 1519 | (defvar gdb-display-buffer-other-frame-action |
| 1544 | '((height . 14) (width . 80) | 1520 | `((display-buffer-reuse-window display-buffer-pop-up-frame) |
| 1545 | (unsplittable . t) | 1521 | (reusable-frames . 0) |
| 1546 | (tool-bar-lines . nil) | 1522 | (inhibit-same-window . t) |
| 1547 | (menu-bar-lines . nil) | 1523 | (pop-up-frame-parameters (height . 14) |
| 1548 | (minibuffer . nil))) | 1524 | (width . 80) |
| 1525 | (unsplittable . t) | ||
| 1526 | (tool-bar-lines . nil) | ||
| 1527 | (menu-bar-lines . nil) | ||
| 1528 | (minibuffer . nil))) | ||
| 1529 | "A `display-buffer' action for displaying GDB utility frames.") | ||
| 1530 | (put 'gdb-display-buffer-other-frame-action 'risky-local-variable t) | ||
| 1549 | 1531 | ||
| 1550 | (defun gdb-frame-io-buffer () | 1532 | (defun gdb-frame-io-buffer () |
| 1551 | "Display IO of debugged program in a new frame." | 1533 | "Display IO of debugged program in another frame." |
| 1552 | (interactive) | 1534 | (interactive) |
| 1553 | (let ((special-display-regexps (append special-display-regexps '(".*"))) | 1535 | (display-buffer (gdb-get-buffer-create 'gdb-inferior-io) |
| 1554 | (special-display-frame-alist gdb-frame-parameters)) | 1536 | gdb-display-buffer-other-frame-action)) |
| 1555 | (display-buffer (gdb-get-buffer-create 'gdb-inferior-io)))) | ||
| 1556 | 1537 | ||
| 1557 | (defvar gdb-inferior-io-mode-map | 1538 | (defvar gdb-inferior-io-mode-map |
| 1558 | (let ((map (make-sparse-keymap))) | 1539 | (let ((map (make-sparse-keymap))) |
| @@ -1571,7 +1552,7 @@ DOC is an optional documentation string." | |||
| 1571 | 1552 | ||
| 1572 | (defun gdb-inferior-filter (proc string) | 1553 | (defun gdb-inferior-filter (proc string) |
| 1573 | (unless (string-equal string "") | 1554 | (unless (string-equal string "") |
| 1574 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io) t)) | 1555 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))) |
| 1575 | (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) | 1556 | (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) |
| 1576 | (comint-output-filter proc string))) | 1557 | (comint-output-filter proc string))) |
| 1577 | 1558 | ||
| @@ -2615,15 +2596,16 @@ If not in a source or disassembly buffer just set point." | |||
| 2615 | (defun gdb-breakpoints-buffer-name () | 2596 | (defun gdb-breakpoints-buffer-name () |
| 2616 | (concat "*breakpoints of " (gdb-get-target-string) "*")) | 2597 | (concat "*breakpoints of " (gdb-get-target-string) "*")) |
| 2617 | 2598 | ||
| 2618 | (def-gdb-display-buffer | 2599 | (defun gdb-display-breakpoints-buffer (&optional thread) |
| 2619 | gdb-display-breakpoints-buffer | 2600 | "Display GDB breakpoints." |
| 2620 | 'gdb-breakpoints-buffer | 2601 | (interactive) |
| 2621 | "Display status of user-settable breakpoints.") | 2602 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-breakpoints-buffer thread))) |
| 2622 | 2603 | ||
| 2623 | (def-gdb-frame-for-buffer | 2604 | (defun gdb-frame-breakpoints-buffer (&optional thread) |
| 2624 | gdb-frame-breakpoints-buffer | 2605 | "Display GDB breakpoints in another frame." |
| 2625 | 'gdb-breakpoints-buffer | 2606 | (interactive) |
| 2626 | "Display status of user-settable breakpoints in a new frame.") | 2607 | (display-buffer (gdb-get-buffer-create 'gdb-breakpoints-buffer thread) |
| 2608 | gdb-display-buffer-other-frame-action)) | ||
| 2627 | 2609 | ||
| 2628 | (defvar gdb-breakpoints-mode-map | 2610 | (defvar gdb-breakpoints-mode-map |
| 2629 | (let ((map (make-sparse-keymap)) | 2611 | (let ((map (make-sparse-keymap)) |
| @@ -2684,15 +2666,16 @@ corresponding to the mode line clicked." | |||
| 2684 | (defun gdb-threads-buffer-name () | 2666 | (defun gdb-threads-buffer-name () |
| 2685 | (concat "*threads of " (gdb-get-target-string) "*")) | 2667 | (concat "*threads of " (gdb-get-target-string) "*")) |
| 2686 | 2668 | ||
| 2687 | (def-gdb-display-buffer | 2669 | (defun gdb-display-threads-buffer (&optional thread) |
| 2688 | gdb-display-threads-buffer | 2670 | "Display GDB threads." |
| 2689 | 'gdb-threads-buffer | 2671 | (interactive) |
| 2690 | "Display GDB threads.") | 2672 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-threads-buffer thread))) |
| 2691 | 2673 | ||
| 2692 | (def-gdb-frame-for-buffer | 2674 | (defun gdb-frame-threads-buffer (&optional thread) |
| 2693 | gdb-frame-threads-buffer | 2675 | "Display GDB threads in another frame." |
| 2694 | 'gdb-threads-buffer | 2676 | (interactive) |
| 2695 | "Display GDB threads in a new frame.") | 2677 | (display-buffer (gdb-get-buffer-create 'gdb-threads-buffer thread) |
| 2678 | gdb-display-buffer-other-frame-action)) | ||
| 2696 | 2679 | ||
| 2697 | (def-gdb-trigger-and-handler | 2680 | (def-gdb-trigger-and-handler |
| 2698 | gdb-invalidate-threads (gdb-current-context-command "-thread-info") | 2681 | gdb-invalidate-threads (gdb-current-context-command "-thread-info") |
| @@ -2868,26 +2851,22 @@ on the current line." | |||
| 2868 | (def-gdb-thread-buffer-simple-command | 2851 | (def-gdb-thread-buffer-simple-command |
| 2869 | gdb-frame-stack-for-thread | 2852 | gdb-frame-stack-for-thread |
| 2870 | gdb-frame-stack-buffer | 2853 | gdb-frame-stack-buffer |
| 2871 | "Display a new frame with stack buffer for the thread at | 2854 | "Display another frame with stack buffer for thread at current line.") |
| 2872 | current line.") | ||
| 2873 | 2855 | ||
| 2874 | (def-gdb-thread-buffer-simple-command | 2856 | (def-gdb-thread-buffer-simple-command |
| 2875 | gdb-frame-locals-for-thread | 2857 | gdb-frame-locals-for-thread |
| 2876 | gdb-frame-locals-buffer | 2858 | gdb-frame-locals-buffer |
| 2877 | "Display a new frame with locals buffer for the thread at | 2859 | "Display another frame with locals buffer for thread at current line.") |
| 2878 | current line.") | ||
| 2879 | 2860 | ||
| 2880 | (def-gdb-thread-buffer-simple-command | 2861 | (def-gdb-thread-buffer-simple-command |
| 2881 | gdb-frame-registers-for-thread | 2862 | gdb-frame-registers-for-thread |
| 2882 | gdb-frame-registers-buffer | 2863 | gdb-frame-registers-buffer |
| 2883 | "Display a new frame with registers buffer for the thread at | 2864 | "Display another frame with registers buffer for the thread at current line.") |
| 2884 | current line.") | ||
| 2885 | 2865 | ||
| 2886 | (def-gdb-thread-buffer-simple-command | 2866 | (def-gdb-thread-buffer-simple-command |
| 2887 | gdb-frame-disassembly-for-thread | 2867 | gdb-frame-disassembly-for-thread |
| 2888 | gdb-frame-disassembly-buffer | 2868 | gdb-frame-disassembly-buffer |
| 2889 | "Display a new frame with disassembly buffer for the thread at | 2869 | "Display another frame with disassembly buffer for the thread at current line.") |
| 2890 | current line.") | ||
| 2891 | 2870 | ||
| 2892 | (defmacro def-gdb-thread-buffer-gud-command (name gud-command &optional doc) | 2871 | (defmacro def-gdb-thread-buffer-gud-command (name gud-command &optional doc) |
| 2893 | "Define a NAME which will execute GUD-COMMAND with | 2872 | "Define a NAME which will execute GUD-COMMAND with |
| @@ -3290,21 +3269,16 @@ DOC is an optional documentation string." | |||
| 3290 | (defun gdb-memory-buffer-name () | 3269 | (defun gdb-memory-buffer-name () |
| 3291 | (concat "*memory of " (gdb-get-target-string) "*")) | 3270 | (concat "*memory of " (gdb-get-target-string) "*")) |
| 3292 | 3271 | ||
| 3293 | (def-gdb-display-buffer | 3272 | (defun gdb-display-memory-buffer (&optional thread) |
| 3294 | gdb-display-memory-buffer | 3273 | "Display GDB memory contents." |
| 3295 | 'gdb-memory-buffer | 3274 | (interactive) |
| 3296 | "Display memory contents.") | 3275 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-memory-buffer thread))) |
| 3297 | 3276 | ||
| 3298 | (defun gdb-frame-memory-buffer () | 3277 | (defun gdb-frame-memory-buffer () |
| 3299 | "Display memory contents in a new frame." | 3278 | "Display memory contents in another frame." |
| 3300 | (interactive) | 3279 | (interactive) |
| 3301 | (let* ((special-display-regexps (append special-display-regexps '(".*"))) | 3280 | (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer) |
| 3302 | (special-display-frame-alist | 3281 | gdb-display-buffer-other-frame-action)) |
| 3303 | `((left-fringe . 0) | ||
| 3304 | (right-fringe . 0) | ||
| 3305 | (width . 83) | ||
| 3306 | ,@gdb-frame-parameters))) | ||
| 3307 | (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer)))) | ||
| 3308 | 3282 | ||
| 3309 | 3283 | ||
| 3310 | ;;; Disassembly view | 3284 | ;;; Disassembly view |
| @@ -3313,19 +3287,20 @@ DOC is an optional documentation string." | |||
| 3313 | (gdb-current-context-buffer-name | 3287 | (gdb-current-context-buffer-name |
| 3314 | (concat "disassembly of " (gdb-get-target-string)))) | 3288 | (concat "disassembly of " (gdb-get-target-string)))) |
| 3315 | 3289 | ||
| 3316 | (def-gdb-display-buffer | 3290 | (defun gdb-display-disassembly-buffer (&optional thread) |
| 3317 | gdb-display-disassembly-buffer | 3291 | "Display GDB disassembly information." |
| 3318 | 'gdb-disassembly-buffer | 3292 | (interactive) |
| 3319 | "Display disassembly for current stack frame.") | 3293 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-disassembly-buffer thread))) |
| 3320 | 3294 | ||
| 3321 | (def-gdb-preempt-display-buffer | 3295 | (def-gdb-preempt-display-buffer |
| 3322 | gdb-preemptively-display-disassembly-buffer | 3296 | gdb-preemptively-display-disassembly-buffer |
| 3323 | 'gdb-disassembly-buffer) | 3297 | 'gdb-disassembly-buffer) |
| 3324 | 3298 | ||
| 3325 | (def-gdb-frame-for-buffer | 3299 | (defun gdb-frame-disassembly-buffer (&optional thread) |
| 3326 | gdb-frame-disassembly-buffer | 3300 | "Display GDB disassembly information in another frame." |
| 3327 | 'gdb-disassembly-buffer | 3301 | (interactive) |
| 3328 | "Display disassembly in a new frame.") | 3302 | (display-buffer (gdb-get-buffer-create 'gdb-disassembly-buffer thread) |
| 3303 | gdb-display-buffer-other-frame-action)) | ||
| 3329 | 3304 | ||
| 3330 | (def-gdb-auto-update-trigger gdb-invalidate-disassembly | 3305 | (def-gdb-auto-update-trigger gdb-invalidate-disassembly |
| 3331 | (let* ((frame (gdb-current-buffer-frame)) | 3306 | (let* ((frame (gdb-current-buffer-frame)) |
| @@ -3560,19 +3535,20 @@ member." | |||
| 3560 | (gdb-current-context-buffer-name | 3535 | (gdb-current-context-buffer-name |
| 3561 | (concat "stack frames of " (gdb-get-target-string)))) | 3536 | (concat "stack frames of " (gdb-get-target-string)))) |
| 3562 | 3537 | ||
| 3563 | (def-gdb-display-buffer | 3538 | (defun gdb-display-stack-buffer (&optional thread) |
| 3564 | gdb-display-stack-buffer | 3539 | "Display GDB backtrace for current stack." |
| 3565 | 'gdb-stack-buffer | 3540 | (interactive) |
| 3566 | "Display backtrace of current stack.") | 3541 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-stack-buffer thread))) |
| 3567 | 3542 | ||
| 3568 | (def-gdb-preempt-display-buffer | 3543 | (def-gdb-preempt-display-buffer |
| 3569 | gdb-preemptively-display-stack-buffer | 3544 | gdb-preemptively-display-stack-buffer |
| 3570 | 'gdb-stack-buffer nil t) | 3545 | 'gdb-stack-buffer nil t) |
| 3571 | 3546 | ||
| 3572 | (def-gdb-frame-for-buffer | 3547 | (defun gdb-frame-stack-buffer (&optional thread) |
| 3573 | gdb-frame-stack-buffer | 3548 | "Display GDB backtrace for current stack in another frame." |
| 3574 | 'gdb-stack-buffer | 3549 | (interactive) |
| 3575 | "Display backtrace of current stack in a new frame.") | 3550 | (display-buffer (gdb-get-buffer-create 'gdb-stack-buffer thread) |
| 3551 | gdb-display-buffer-other-frame-action)) | ||
| 3576 | 3552 | ||
| 3577 | (defvar gdb-frames-mode-map | 3553 | (defvar gdb-frames-mode-map |
| 3578 | (let ((map (make-sparse-keymap))) | 3554 | (let ((map (make-sparse-keymap))) |
| @@ -3719,19 +3695,20 @@ member." | |||
| 3719 | (gdb-current-context-buffer-name | 3695 | (gdb-current-context-buffer-name |
| 3720 | (concat "locals of " (gdb-get-target-string)))) | 3696 | (concat "locals of " (gdb-get-target-string)))) |
| 3721 | 3697 | ||
| 3722 | (def-gdb-display-buffer | 3698 | (defun gdb-display-locals-buffer (&optional thread) |
| 3723 | gdb-display-locals-buffer | 3699 | "Display the local variables of current GDB stack." |
| 3724 | 'gdb-locals-buffer | 3700 | (interactive) |
| 3725 | "Display local variables of current stack and their values.") | 3701 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-locals-buffer thread))) |
| 3726 | 3702 | ||
| 3727 | (def-gdb-preempt-display-buffer | 3703 | (def-gdb-preempt-display-buffer |
| 3728 | gdb-preemptively-display-locals-buffer | 3704 | gdb-preemptively-display-locals-buffer |
| 3729 | 'gdb-locals-buffer nil t) | 3705 | 'gdb-locals-buffer nil t) |
| 3730 | 3706 | ||
| 3731 | (def-gdb-frame-for-buffer | 3707 | (defun gdb-frame-locals-buffer (&optional thread) |
| 3732 | gdb-frame-locals-buffer | 3708 | "Display the local variables of the current GDB stack in another frame." |
| 3733 | 'gdb-locals-buffer | 3709 | (interactive) |
| 3734 | "Display local variables of current stack and their values in a new frame.") | 3710 | (display-buffer (gdb-get-buffer-create 'gdb-locals-buffer thread) |
| 3711 | gdb-display-buffer-other-frame-action)) | ||
| 3735 | 3712 | ||
| 3736 | 3713 | ||
| 3737 | ;; Registers buffer. | 3714 | ;; Registers buffer. |
| @@ -3818,19 +3795,20 @@ member." | |||
| 3818 | (gdb-current-context-buffer-name | 3795 | (gdb-current-context-buffer-name |
| 3819 | (concat "registers of " (gdb-get-target-string)))) | 3796 | (concat "registers of " (gdb-get-target-string)))) |
| 3820 | 3797 | ||
| 3821 | (def-gdb-display-buffer | 3798 | (defun gdb-display-registers-buffer (&optional thread) |
| 3822 | gdb-display-registers-buffer | 3799 | "Display GDB register contents." |
| 3823 | 'gdb-registers-buffer | 3800 | (interactive) |
| 3824 | "Display integer register contents.") | 3801 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-registers-buffer thread))) |
| 3825 | 3802 | ||
| 3826 | (def-gdb-preempt-display-buffer | 3803 | (def-gdb-preempt-display-buffer |
| 3827 | gdb-preemptively-display-registers-buffer | 3804 | gdb-preemptively-display-registers-buffer |
| 3828 | 'gdb-registers-buffer nil t) | 3805 | 'gdb-registers-buffer nil t) |
| 3829 | 3806 | ||
| 3830 | (def-gdb-frame-for-buffer | 3807 | (defun gdb-frame-registers-buffer (&optional thread) |
| 3831 | gdb-frame-registers-buffer | 3808 | "Display GDB register contents in another frame." |
| 3832 | 'gdb-registers-buffer | 3809 | (interactive) |
| 3833 | "Display integer register contents in a new frame.") | 3810 | (display-buffer (gdb-get-buffer-create 'gdb-registers-buffer thread) |
| 3811 | gdb-display-buffer-other-frame-action)) | ||
| 3834 | 3812 | ||
| 3835 | ;; Needs GDB 6.4 onwards (used to fail with no stack). | 3813 | ;; Needs GDB 6.4 onwards (used to fail with no stack). |
| 3836 | (defun gdb-get-changed-registers () | 3814 | (defun gdb-get-changed-registers () |
| @@ -3917,26 +3895,26 @@ overlay arrow in source buffer." | |||
| 3917 | (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) | 3895 | (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) |
| 3918 | 3896 | ||
| 3919 | ;;;; Window management | 3897 | ;;;; Window management |
| 3920 | (defun gdb-display-buffer (buf dedicated &optional frame) | 3898 | (defun gdb-display-buffer (buf) |
| 3921 | "Show buffer BUF. | 3899 | "Show buffer BUF, and make that window dedicated." |
| 3922 | 3900 | (let ((window (display-buffer buf))) | |
| 3923 | If BUF is already displayed in some window, show it, deiconifying | 3901 | (set-window-dedicated-p window t) |
| 3924 | the frame if necessary. Otherwise, find least recently used | 3902 | window)) |
| 3925 | window and show BUF there, if the window is not used for GDB | 3903 | |
| 3926 | already, in which case that window is split first." | 3904 | ;; (let ((answer (get-buffer-window buf 0))) |
| 3927 | (let ((answer (get-buffer-window buf (or frame 0)))) | 3905 | ;; (if answer |
| 3928 | (if answer | 3906 | ;; (display-buffer buf nil 0) ;Deiconify frame if necessary. |
| 3929 | (display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary. | 3907 | ;; (let ((window (get-lru-window))) |
| 3930 | (let ((window (get-lru-window))) | 3908 | ;; (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) |
| 3931 | (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) | 3909 | ;; 'gdbmi) |
| 3932 | 'gdbmi) | 3910 | ;; (let ((largest (get-largest-window))) |
| 3933 | (let ((largest (get-largest-window))) | 3911 | ;; (setq answer (split-window largest)) |
| 3934 | (setq answer (split-window largest)) | 3912 | ;; (set-window-buffer answer buf) |
| 3935 | (set-window-buffer answer buf) | 3913 | ;; (set-window-dedicated-p answer t) |
| 3936 | (set-window-dedicated-p answer dedicated) | 3914 | ;; answer) |
| 3937 | answer) | 3915 | ;; (set-window-buffer window buf) |
| 3938 | (set-window-buffer window buf) | 3916 | ;; window))))) |
| 3939 | window))))) | 3917 | |
| 3940 | 3918 | ||
| 3941 | (defun gdb-preempt-existing-or-display-buffer (buf &optional split-horizontal) | 3919 | (defun gdb-preempt-existing-or-display-buffer (buf &optional split-horizontal) |
| 3942 | "Find window displaying a buffer with the same | 3920 | "Find window displaying a buffer with the same |
| @@ -3963,7 +3941,7 @@ SPLIT-HORIZONTAL and show BUF in the new window." | |||
| 3963 | (if dedicated-window | 3941 | (if dedicated-window |
| 3964 | (set-window-buffer | 3942 | (set-window-buffer |
| 3965 | (split-window dedicated-window nil split-horizontal) buf) | 3943 | (split-window dedicated-window nil split-horizontal) buf) |
| 3966 | (gdb-display-buffer buf t)))))) | 3944 | (gdb-display-buffer buf)))))) |
| 3967 | (error "Null buffer"))) | 3945 | (error "Null buffer"))) |
| 3968 | 3946 | ||
| 3969 | ;;; Shared keymap initialization: | 3947 | ;;; Shared keymap initialization: |
| @@ -4067,7 +4045,7 @@ SPLIT-HORIZONTAL and show BUF in the new window." | |||
| 4067 | 'all-threads) | 4045 | 'all-threads) |
| 4068 | 4046 | ||
| 4069 | (defun gdb-frame-gdb-buffer () | 4047 | (defun gdb-frame-gdb-buffer () |
| 4070 | "Display GUD buffer in a new frame." | 4048 | "Display GUD buffer in another frame." |
| 4071 | (interactive) | 4049 | (interactive) |
| 4072 | (display-buffer-other-frame gud-comint-buffer)) | 4050 | (display-buffer-other-frame gud-comint-buffer)) |
| 4073 | 4051 | ||
| @@ -4089,13 +4067,12 @@ window is dedicated." | |||
| 4089 | 4067 | ||
| 4090 | (defun gdb-setup-windows () | 4068 | (defun gdb-setup-windows () |
| 4091 | "Layout the window pattern for `gdb-many-windows'." | 4069 | "Layout the window pattern for `gdb-many-windows'." |
| 4092 | (gdb-display-locals-buffer) | 4070 | (gdb-get-buffer-create 'gdb-locals-buffer) |
| 4093 | (gdb-display-stack-buffer) | 4071 | (gdb-get-buffer-create 'gdb-stack-buffer) |
| 4094 | (delete-other-windows) | 4072 | (gdb-get-buffer-create 'gdb-breakpoints-buffer) |
| 4095 | (gdb-display-breakpoints-buffer) | 4073 | (set-window-dedicated-p (selected-window) nil) |
| 4096 | (delete-other-windows) | ||
| 4097 | ;; Don't dedicate. | ||
| 4098 | (switch-to-buffer gud-comint-buffer) | 4074 | (switch-to-buffer gud-comint-buffer) |
| 4075 | (delete-other-windows) | ||
| 4099 | (let ((win0 (selected-window)) | 4076 | (let ((win0 (selected-window)) |
| 4100 | (win1 (split-window nil ( / ( * (window-height) 3) 4))) | 4077 | (win1 (split-window nil ( / ( * (window-height) 3) 4))) |
| 4101 | (win2 (split-window nil ( / (window-height) 3))) | 4078 | (win2 (split-window nil ( / (window-height) 3))) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 5946e93f34d..2e3858b2cc5 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -2685,7 +2685,6 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2685 | (declare-function global-hl-line-highlight "hl-line" ()) | 2685 | (declare-function global-hl-line-highlight "hl-line" ()) |
| 2686 | (declare-function hl-line-highlight "hl-line" ()) | 2686 | (declare-function hl-line-highlight "hl-line" ()) |
| 2687 | (declare-function gdb-display-source-buffer "gdb-mi" (buffer)) | 2687 | (declare-function gdb-display-source-buffer "gdb-mi" (buffer)) |
| 2688 | (declare-function gdb-display-buffer "gdb-mi" (buf dedicated &optional size)) | ||
| 2689 | 2688 | ||
| 2690 | ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen | 2689 | ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen |
| 2691 | ;; and that its line LINE is visible. | 2690 | ;; and that its line LINE is visible. |
| @@ -2702,10 +2701,7 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2702 | (window (and buffer | 2701 | (window (and buffer |
| 2703 | (or (get-buffer-window buffer) | 2702 | (or (get-buffer-window buffer) |
| 2704 | (if (eq gud-minor-mode 'gdbmi) | 2703 | (if (eq gud-minor-mode 'gdbmi) |
| 2705 | (or (if (get-buffer-window buffer 'visible) | 2704 | (display-buffer buffer nil 'visible)) |
| 2706 | (display-buffer buffer nil 'visible)) | ||
| 2707 | (unless (gdb-display-source-buffer buffer) | ||
| 2708 | (gdb-display-buffer buffer nil 'visible)))) | ||
| 2709 | (display-buffer buffer)))) | 2705 | (display-buffer buffer)))) |
| 2710 | (pos)) | 2706 | (pos)) |
| 2711 | (if buffer | 2707 | (if buffer |
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 3e3d7adc0b6..4b77c6dab1a 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -1003,7 +1003,7 @@ Return as (TOP . BOTTOM) the extent of ifdef block." | |||
| 1003 | "Compress the define list ENV into a list of defined symbols only." | 1003 | "Compress the define list ENV into a list of defined symbols only." |
| 1004 | (let ((new-defs nil)) | 1004 | (let ((new-defs nil)) |
| 1005 | (dolist (def env new-defs) | 1005 | (dolist (def env new-defs) |
| 1006 | (if (hif-lookup (car def)) (push (car env) new-defs))))) | 1006 | (if (hif-lookup (car def)) (push (car def) new-defs))))) |
| 1007 | 1007 | ||
| 1008 | (defun hide-ifdef-set-define-alist (name) | 1008 | (defun hide-ifdef-set-define-alist (name) |
| 1009 | "Set the association for NAME to `hide-ifdef-env'." | 1009 | "Set the association for NAME to `hide-ifdef-env'." |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index b6d2b5e319c..233b9a5212e 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -408,6 +408,8 @@ element (using `match-beginning') before calling `hs-forward-sexp-func'.") | |||
| 408 | 408 | ||
| 409 | (defvar hs-block-end-regexp nil | 409 | (defvar hs-block-end-regexp nil |
| 410 | "Regexp for end of block.") | 410 | "Regexp for end of block.") |
| 411 | (make-variable-buffer-local 'hs-block-end-regexp) | ||
| 412 | |||
| 411 | 413 | ||
| 412 | (defvar hs-forward-sexp-func 'forward-sexp | 414 | (defvar hs-forward-sexp-func 'forward-sexp |
| 413 | "Function used to do a `forward-sexp'. | 415 | "Function used to do a `forward-sexp'. |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 519e5aef2bc..d954cd53e0a 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -426,18 +426,21 @@ Match group 1 is the name of the macro.") | |||
| 426 | (defcustom js-indent-level 4 | 426 | (defcustom js-indent-level 4 |
| 427 | "Number of spaces for each indentation step in `js-mode'." | 427 | "Number of spaces for each indentation step in `js-mode'." |
| 428 | :type 'integer | 428 | :type 'integer |
| 429 | :safe 'integerp | ||
| 429 | :group 'js) | 430 | :group 'js) |
| 430 | 431 | ||
| 431 | (defcustom js-expr-indent-offset 0 | 432 | (defcustom js-expr-indent-offset 0 |
| 432 | "Number of additional spaces for indenting continued expressions. | 433 | "Number of additional spaces for indenting continued expressions. |
| 433 | The value must be no less than minus `js-indent-level'." | 434 | The value must be no less than minus `js-indent-level'." |
| 434 | :type 'integer | 435 | :type 'integer |
| 436 | :safe 'integerp | ||
| 435 | :group 'js) | 437 | :group 'js) |
| 436 | 438 | ||
| 437 | (defcustom js-paren-indent-offset 0 | 439 | (defcustom js-paren-indent-offset 0 |
| 438 | "Number of additional spaces for indenting expressions in parentheses. | 440 | "Number of additional spaces for indenting expressions in parentheses. |
| 439 | The value must be no less than minus `js-indent-level'." | 441 | The value must be no less than minus `js-indent-level'." |
| 440 | :type 'integer | 442 | :type 'integer |
| 443 | :safe 'integerp | ||
| 441 | :group 'js | 444 | :group 'js |
| 442 | :version "24.1") | 445 | :version "24.1") |
| 443 | 446 | ||
| @@ -445,6 +448,7 @@ The value must be no less than minus `js-indent-level'." | |||
| 445 | "Number of additional spaces for indenting expressions in square braces. | 448 | "Number of additional spaces for indenting expressions in square braces. |
| 446 | The value must be no less than minus `js-indent-level'." | 449 | The value must be no less than minus `js-indent-level'." |
| 447 | :type 'integer | 450 | :type 'integer |
| 451 | :safe 'integerp | ||
| 448 | :group 'js | 452 | :group 'js |
| 449 | :version "24.1") | 453 | :version "24.1") |
| 450 | 454 | ||
| @@ -452,6 +456,7 @@ The value must be no less than minus `js-indent-level'." | |||
| 452 | "Number of additional spaces for indenting expressions in curly braces. | 456 | "Number of additional spaces for indenting expressions in curly braces. |
| 453 | The value must be no less than minus `js-indent-level'." | 457 | The value must be no less than minus `js-indent-level'." |
| 454 | :type 'integer | 458 | :type 'integer |
| 459 | :safe 'integerp | ||
| 455 | :group 'js | 460 | :group 'js |
| 456 | :version "24.1") | 461 | :version "24.1") |
| 457 | 462 | ||
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 457c7fee36c..3f93ffa84ba 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -138,18 +138,11 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 138 | 138 | ||
| 139 | (defvar ruby-mode-map | 139 | (defvar ruby-mode-map |
| 140 | (let ((map (make-sparse-keymap))) | 140 | (let ((map (make-sparse-keymap))) |
| 141 | (define-key map "{" 'ruby-electric-brace) | ||
| 142 | (define-key map "}" 'ruby-electric-brace) | ||
| 143 | (define-key map (kbd "M-C-a") 'ruby-beginning-of-defun) | ||
| 144 | (define-key map (kbd "M-C-e") 'ruby-end-of-defun) | ||
| 145 | (define-key map (kbd "M-C-b") 'ruby-backward-sexp) | 141 | (define-key map (kbd "M-C-b") 'ruby-backward-sexp) |
| 146 | (define-key map (kbd "M-C-f") 'ruby-forward-sexp) | 142 | (define-key map (kbd "M-C-f") 'ruby-forward-sexp) |
| 147 | (define-key map (kbd "M-C-p") 'ruby-beginning-of-block) | 143 | (define-key map (kbd "M-C-p") 'ruby-beginning-of-block) |
| 148 | (define-key map (kbd "M-C-n") 'ruby-end-of-block) | 144 | (define-key map (kbd "M-C-n") 'ruby-end-of-block) |
| 149 | (define-key map (kbd "M-C-h") 'ruby-mark-defun) | ||
| 150 | (define-key map (kbd "M-C-q") 'ruby-indent-exp) | 145 | (define-key map (kbd "M-C-q") 'ruby-indent-exp) |
| 151 | (define-key map (kbd "C-M-h") 'backward-kill-word) | ||
| 152 | (define-key map (kbd "C-j") 'reindent-then-newline-and-indent) | ||
| 153 | (define-key map (kbd "C-c {") 'ruby-toggle-block) | 146 | (define-key map (kbd "C-c {") 'ruby-toggle-block) |
| 154 | map) | 147 | map) |
| 155 | "Keymap used in Ruby mode.") | 148 | "Keymap used in Ruby mode.") |
| @@ -840,12 +833,6 @@ and `\\' when preceded by `?'." | |||
| 840 | (+ indent ruby-indent-level) | 833 | (+ indent ruby-indent-level) |
| 841 | indent)))) | 834 | indent)))) |
| 842 | 835 | ||
| 843 | (defun ruby-electric-brace (arg) | ||
| 844 | "Insert a brace and re-indent the current line." | ||
| 845 | (interactive "P") | ||
| 846 | (self-insert-command (prefix-numeric-value arg)) | ||
| 847 | (ruby-indent-line t)) | ||
| 848 | |||
| 849 | ;; TODO: Why isn't one ruby-*-of-defun written in terms of the other? | 836 | ;; TODO: Why isn't one ruby-*-of-defun written in terms of the other? |
| 850 | (defun ruby-beginning-of-defun (&optional arg) | 837 | (defun ruby-beginning-of-defun (&optional arg) |
| 851 | "Move backward to the beginning of the current top-level defun. | 838 | "Move backward to the beginning of the current top-level defun. |
| @@ -1024,15 +1011,6 @@ With ARG, do it many times. Negative ARG means move forward." | |||
| 1024 | ((error))) | 1011 | ((error))) |
| 1025 | i))) | 1012 | i))) |
| 1026 | 1013 | ||
| 1027 | (defun ruby-mark-defun () | ||
| 1028 | "Put mark at end of this Ruby function, point at beginning." | ||
| 1029 | (interactive) | ||
| 1030 | (push-mark (point)) | ||
| 1031 | (ruby-end-of-defun) | ||
| 1032 | (push-mark (point) nil t) | ||
| 1033 | (ruby-beginning-of-defun) | ||
| 1034 | (re-search-backward "^\n" (- (point) 1) t)) | ||
| 1035 | |||
| 1036 | (defun ruby-indent-exp (&optional ignored) | 1014 | (defun ruby-indent-exp (&optional ignored) |
| 1037 | "Indent each line in the balanced expression following the point." | 1015 | "Indent each line in the balanced expression following the point." |
| 1038 | (interactive "*P") | 1016 | (interactive "*P") |
| @@ -1586,6 +1564,10 @@ The variable `ruby-indent-level' controls the amount of indentation. | |||
| 1586 | 'ruby-imenu-create-index) | 1564 | 'ruby-imenu-create-index) |
| 1587 | (set (make-local-variable 'add-log-current-defun-function) | 1565 | (set (make-local-variable 'add-log-current-defun-function) |
| 1588 | 'ruby-add-log-current-method) | 1566 | 'ruby-add-log-current-method) |
| 1567 | (set (make-local-variable 'beginning-of-defun-function) | ||
| 1568 | 'ruby-beginning-of-defun) | ||
| 1569 | (set (make-local-variable 'end-of-defun-function) | ||
| 1570 | 'ruby-end-of-defun) | ||
| 1589 | 1571 | ||
| 1590 | (add-hook | 1572 | (add-hook |
| 1591 | (cond ((boundp 'before-save-hook) 'before-save-hook) | 1573 | (cond ((boundp 'before-save-hook) 'before-save-hook) |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index a6089aabb04..a422462775d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -202,6 +202,11 @@ | |||
| 202 | (require 'comint)) | 202 | (require 'comint)) |
| 203 | (require 'executable) | 203 | (require 'executable) |
| 204 | 204 | ||
| 205 | (autoload 'comint-completion-at-point "comint") | ||
| 206 | (autoload 'comint-filename-completion "comint") | ||
| 207 | (autoload 'shell-command-completion "shell") | ||
| 208 | (autoload 'shell-environment-variable-completion "shell") | ||
| 209 | |||
| 205 | (defvar font-lock-comment-face) | 210 | (defvar font-lock-comment-face) |
| 206 | (defvar font-lock-set-defaults) | 211 | (defvar font-lock-set-defaults) |
| 207 | (defvar font-lock-string-face) | 212 | (defvar font-lock-string-face) |
| @@ -470,7 +475,6 @@ This is buffer-local in every such buffer.") | |||
| 470 | (define-key map "\C-\M-x" 'sh-execute-region) | 475 | (define-key map "\C-\M-x" 'sh-execute-region) |
| 471 | (define-key map "\C-c\C-x" 'executable-interpret) | 476 | (define-key map "\C-c\C-x" 'executable-interpret) |
| 472 | 477 | ||
| 473 | (define-key map [remap complete-tag] 'comint-dynamic-complete) | ||
| 474 | (define-key map [remap delete-backward-char] | 478 | (define-key map [remap delete-backward-char] |
| 475 | 'backward-delete-char-untabify) | 479 | 'backward-delete-char-untabify) |
| 476 | (define-key map "\C-c:" 'sh-set-shell) | 480 | (define-key map "\C-c:" 'sh-set-shell) |
| @@ -553,9 +557,9 @@ This is buffer-local in every such buffer.") | |||
| 553 | "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.") | 557 | "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.") |
| 554 | 558 | ||
| 555 | (defcustom sh-dynamic-complete-functions | 559 | (defcustom sh-dynamic-complete-functions |
| 556 | '(shell-dynamic-complete-environment-variable | 560 | '(shell-environment-variable-completion |
| 557 | shell-dynamic-complete-command | 561 | shell-command-completion |
| 558 | comint-dynamic-complete-filename) | 562 | comint-filename-completion) |
| 559 | "Functions for doing TAB dynamic completion." | 563 | "Functions for doing TAB dynamic completion." |
| 560 | :type '(repeat function) | 564 | :type '(repeat function) |
| 561 | :group 'sh-script) | 565 | :group 'sh-script) |
| @@ -1187,7 +1191,7 @@ This value is used for the `+' and `-' symbols in an indentation variable." | |||
| 1187 | :group 'sh-indentation) | 1191 | :group 'sh-indentation) |
| 1188 | (put 'sh-basic-offset 'safe-local-variable 'integerp) | 1192 | (put 'sh-basic-offset 'safe-local-variable 'integerp) |
| 1189 | 1193 | ||
| 1190 | (defcustom sh-indent-comment nil | 1194 | (defcustom sh-indent-comment t |
| 1191 | "How a comment line is to be indented. | 1195 | "How a comment line is to be indented. |
| 1192 | nil means leave it as it is; | 1196 | nil means leave it as it is; |
| 1193 | t means indent it as a normal line, aligning it to previous non-blank | 1197 | t means indent it as a normal line, aligning it to previous non-blank |
| @@ -1198,6 +1202,7 @@ a number means align to that column, e.g. 0 means first column." | |||
| 1198 | (const :tag "Indent as a normal line." t) | 1202 | (const :tag "Indent as a normal line." t) |
| 1199 | (integer :menu-tag "Indent to this col (0 means first col)." | 1203 | (integer :menu-tag "Indent to this col (0 means first col)." |
| 1200 | :tag "Indent to column number.") ) | 1204 | :tag "Indent to column number.") ) |
| 1205 | :version "24.3" | ||
| 1201 | :group 'sh-indentation) | 1206 | :group 'sh-indentation) |
| 1202 | 1207 | ||
| 1203 | 1208 | ||
| @@ -1485,6 +1490,7 @@ with your script for an edit-interpret-debug cycle." | |||
| 1485 | (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) | 1490 | (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) |
| 1486 | (set (make-local-variable 'comint-dynamic-complete-functions) | 1491 | (set (make-local-variable 'comint-dynamic-complete-functions) |
| 1487 | sh-dynamic-complete-functions) | 1492 | sh-dynamic-complete-functions) |
| 1493 | (add-hook 'completion-at-point-functions 'comint-completion-at-point nil t) | ||
| 1488 | ;; we can't look if previous line ended with `\' | 1494 | ;; we can't look if previous line ended with `\' |
| 1489 | (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") | 1495 | (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") |
| 1490 | (set (make-local-variable 'imenu-case-fold-search) nil) | 1496 | (set (make-local-variable 'imenu-case-fold-search) nil) |
| @@ -4109,20 +4115,6 @@ The document is bounded by `sh-here-document-word'." | |||
| 4109 | 4115 | ||
| 4110 | ;; various other commands | 4116 | ;; various other commands |
| 4111 | 4117 | ||
| 4112 | (autoload 'comint-dynamic-complete "comint" | ||
| 4113 | "Dynamically perform completion at point." t) | ||
| 4114 | |||
| 4115 | (autoload 'shell-dynamic-complete-command "shell" | ||
| 4116 | "Dynamically complete the command at point." t) | ||
| 4117 | |||
| 4118 | (autoload 'comint-dynamic-complete-filename "comint" | ||
| 4119 | "Dynamically complete the filename at point." t) | ||
| 4120 | |||
| 4121 | (autoload 'shell-dynamic-complete-environment-variable "shell" | ||
| 4122 | "Dynamically complete the environment variable at point." t) | ||
| 4123 | |||
| 4124 | |||
| 4125 | |||
| 4126 | (defun sh-beginning-of-command () | 4118 | (defun sh-beginning-of-command () |
| 4127 | ;; FIXME: Redefine using SMIE. | 4119 | ;; FIXME: Redefine using SMIE. |
| 4128 | "Move point to successive beginnings of commands." | 4120 | "Move point to successive beginnings of commands." |
diff --git a/lisp/server.el b/lisp/server.el index 6d34df351ca..4fd55bcf6d1 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -94,7 +94,6 @@ | |||
| 94 | (setq val t) | 94 | (setq val t) |
| 95 | (unless load-in-progress | 95 | (unless load-in-progress |
| 96 | (message "Local sockets unsupported, using TCP sockets"))) | 96 | (message "Local sockets unsupported, using TCP sockets"))) |
| 97 | (when val (random t)) | ||
| 98 | (set-default sym val)) | 97 | (set-default sym val)) |
| 99 | :group 'server | 98 | :group 'server |
| 100 | :type 'boolean | 99 | :type 'boolean |
diff --git a/lisp/simple.el b/lisp/simple.el index 1080757f7d2..b7a24f4f970 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -365,7 +365,6 @@ Other major modes are defined by comparison with this one." | |||
| 365 | (define-key map ">" 'end-of-buffer) | 365 | (define-key map ">" 'end-of-buffer) |
| 366 | (define-key map "<" 'beginning-of-buffer) | 366 | (define-key map "<" 'beginning-of-buffer) |
| 367 | (define-key map "g" 'revert-buffer) | 367 | (define-key map "g" 'revert-buffer) |
| 368 | (define-key map "z" 'kill-this-buffer) | ||
| 369 | map)) | 368 | map)) |
| 370 | 369 | ||
| 371 | (put 'special-mode 'mode-class 'special) | 370 | (put 'special-mode 'mode-class 'special) |
| @@ -1887,9 +1886,10 @@ as an argument limits undo to changes within the current region." | |||
| 1887 | ;; so, ask the user whether she wants to skip the redo/undo pair. | 1886 | ;; so, ask the user whether she wants to skip the redo/undo pair. |
| 1888 | (let ((equiv (gethash pending-undo-list undo-equiv-table))) | 1887 | (let ((equiv (gethash pending-undo-list undo-equiv-table))) |
| 1889 | (or (eq (selected-window) (minibuffer-window)) | 1888 | (or (eq (selected-window) (minibuffer-window)) |
| 1890 | (setq message (if undo-in-region | 1889 | (setq message (format "%s%s!" |
| 1891 | (if equiv "Redo in region!" "Undo in region!") | 1890 | (if (or undo-no-redo (not equiv)) |
| 1892 | (if equiv "Redo!" "Undo!")))) | 1891 | "Undo" "Redo") |
| 1892 | (if undo-in-region " in region" "")))) | ||
| 1893 | (when (and (consp equiv) undo-no-redo) | 1893 | (when (and (consp equiv) undo-no-redo) |
| 1894 | ;; The equiv entry might point to another redo record if we have done | 1894 | ;; The equiv entry might point to another redo record if we have done |
| 1895 | ;; undo-redo-undo-redo-... so skip to the very last equiv. | 1895 | ;; undo-redo-undo-redo-... so skip to the very last equiv. |
| @@ -6961,6 +6961,32 @@ See also `normal-erase-is-backspace'." | |||
| 6961 | (defvar vis-mode-saved-buffer-invisibility-spec nil | 6961 | (defvar vis-mode-saved-buffer-invisibility-spec nil |
| 6962 | "Saved value of `buffer-invisibility-spec' when Visible mode is on.") | 6962 | "Saved value of `buffer-invisibility-spec' when Visible mode is on.") |
| 6963 | 6963 | ||
| 6964 | (define-minor-mode read-only-mode | ||
| 6965 | "Change whether the current buffer is read-only. | ||
| 6966 | With prefix argument ARG, make the buffer read-only if ARG is | ||
| 6967 | positive, otherwise make it writable. If buffer is read-only | ||
| 6968 | and `view-read-only' is non-nil, enter view mode. | ||
| 6969 | |||
| 6970 | Do not call this from a Lisp program unless you really intend to | ||
| 6971 | do the same thing as the \\[toggle-read-only] command, including | ||
| 6972 | possibly enabling or disabling View mode. Also, note that this | ||
| 6973 | command works by setting the variable `buffer-read-only', which | ||
| 6974 | does not affect read-only regions caused by text properties. To | ||
| 6975 | ignore read-only status in a Lisp program (whether due to text | ||
| 6976 | properties or buffer state), bind `inhibit-read-only' temporarily | ||
| 6977 | to a non-nil value." | ||
| 6978 | :variable buffer-read-only | ||
| 6979 | (cond | ||
| 6980 | ((and (not buffer-read-only) view-mode) | ||
| 6981 | (View-exit-and-edit) | ||
| 6982 | (make-local-variable 'view-read-only) | ||
| 6983 | (setq view-read-only t)) ; Must leave view mode. | ||
| 6984 | ((and buffer-read-only view-read-only | ||
| 6985 | ;; If view-mode is already active, `view-mode-enter' is a nop. | ||
| 6986 | (not view-mode) | ||
| 6987 | (not (eq (get major-mode 'mode-class) 'special))) | ||
| 6988 | (view-mode-enter)))) | ||
| 6989 | |||
| 6964 | (define-minor-mode visible-mode | 6990 | (define-minor-mode visible-mode |
| 6965 | "Toggle making all invisible text temporarily visible (Visible mode). | 6991 | "Toggle making all invisible text temporarily visible (Visible mode). |
| 6966 | With a prefix argument ARG, enable Visible mode if ARG is | 6992 | With a prefix argument ARG, enable Visible mode if ARG is |
diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 34d69a74369..b6e1d0a58f2 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el | |||
| @@ -77,7 +77,7 @@ The variables `v1' and `v2' are still set when calling this.") | |||
| 77 | "Function for transforming a skeleton proxy's aliases' variable value.") | 77 | "Function for transforming a skeleton proxy's aliases' variable value.") |
| 78 | (defvaralias 'skeleton-filter 'skeleton-filter-function) | 78 | (defvaralias 'skeleton-filter 'skeleton-filter-function) |
| 79 | 79 | ||
| 80 | (defvar skeleton-untabify t | 80 | (defvar skeleton-untabify nil ; bug#12223 |
| 81 | "When non-nil untabifies when deleting backwards with element -ARG.") | 81 | "When non-nil untabifies when deleting backwards with element -ARG.") |
| 82 | 82 | ||
| 83 | (defvar skeleton-newline-indent-rigidly nil | 83 | (defvar skeleton-newline-indent-rigidly nil |
diff --git a/lisp/term.el b/lisp/term.el index 014adb610b4..d5f35006357 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -615,28 +615,6 @@ executed once when the buffer is created." | |||
| 615 | :type 'hook | 615 | :type 'hook |
| 616 | :group 'term) | 616 | :group 'term) |
| 617 | 617 | ||
| 618 | (defvar term-signals-menu | ||
| 619 | (let ((map (make-sparse-keymap "Signals"))) | ||
| 620 | (define-key map [eof] | ||
| 621 | '(menu-item "EOF" term-send-eof | ||
| 622 | :help "Send an EOF to the current buffer's process")) | ||
| 623 | (define-key map [kill] | ||
| 624 | '(menu-item "KILL" term-kill-subjob | ||
| 625 | :help "Send kill signal to the current subjob")) | ||
| 626 | (define-key map [quit] | ||
| 627 | '(menu-item "QUIT" term-quit-subjob | ||
| 628 | :help "Send quit signal to the current subjob.")) | ||
| 629 | (define-key map [cont] | ||
| 630 | '(menu-item "CONT" term-continue-subjob | ||
| 631 | :help "Send CONT signal to process buffer's process group")) | ||
| 632 | (define-key map [stop] | ||
| 633 | '(menu-item "STOP" term-stop-subjob | ||
| 634 | :help "Stop the current subjob")) | ||
| 635 | (define-key map [brk] | ||
| 636 | '(menu-item "BREAK" term-interrupt-subjob | ||
| 637 | :help "Interrupt the current subjob")) | ||
| 638 | (cons "Signals" map))) | ||
| 639 | |||
| 640 | (defvar term-mode-map | 618 | (defvar term-mode-map |
| 641 | (let ((map (make-sparse-keymap))) | 619 | (let ((map (make-sparse-keymap))) |
| 642 | (define-key map "\ep" 'term-previous-input) | 620 | (define-key map "\ep" 'term-previous-input) |
| @@ -667,69 +645,61 @@ executed once when the buffer is created." | |||
| 667 | (define-key map "\C-c\C-k" 'term-char-mode) | 645 | (define-key map "\C-c\C-k" 'term-char-mode) |
| 668 | (define-key map "\C-c\C-j" 'term-line-mode) | 646 | (define-key map "\C-c\C-j" 'term-line-mode) |
| 669 | (define-key map "\C-c\C-q" 'term-pager-toggle) | 647 | (define-key map "\C-c\C-q" 'term-pager-toggle) |
| 670 | 648 | ;; completion: (line mode only) | |
| 671 | ;; completion: (line mode only) | 649 | (easy-menu-define nil map "Complete menu for Term mode." |
| 672 | (let ((completion-menu (make-sparse-keymap "Complete"))) | 650 | '("Complete" |
| 673 | (define-key map [menu-bar completion] | 651 | ["Complete Before Point" term-dynamic-complete t] |
| 674 | (cons "Complete" completion-menu)) | 652 | ["Complete File Name" term-dynamic-complete-filename t] |
| 675 | (define-key completion-menu [complete-expand] | 653 | ["File Completion Listing" term-dynamic-list-filename-completions t] |
| 676 | '("Expand File Name" . term-replace-by-expanded-filename)) | 654 | ["Expand File Name" term-replace-by-expanded-filename t])) |
| 677 | (define-key completion-menu [complete-listing] | ||
| 678 | '("File Completion Listing" . term-dynamic-list-filename-completions)) | ||
| 679 | (define-key completion-menu [complete-file] | ||
| 680 | '("Complete File Name" . term-dynamic-complete-filename)) | ||
| 681 | (define-key completion-menu [complete] | ||
| 682 | '("Complete Before Point" . term-dynamic-complete))) | ||
| 683 | |||
| 684 | ;; Input history: (line mode only) | 655 | ;; Input history: (line mode only) |
| 685 | (let ((inout-menu (make-sparse-keymap "In/Out"))) | 656 | (easy-menu-define nil map "In/Out menu for Term mode." |
| 686 | (define-key map [menu-bar inout] | 657 | '("In/Out" |
| 687 | (cons "In/Out" inout-menu)) | 658 | ["Expand History Before Point" term-replace-by-expanded-history |
| 688 | (define-key inout-menu [kill-output] | 659 | term-input-autoexpand] |
| 689 | '("Kill Current Output Group" . term-kill-output)) | 660 | ["List Input History" term-dynamic-list-input-ring t] |
| 690 | (define-key inout-menu [next-prompt] | 661 | ["Previous Input" term-previous-input t] |
| 691 | '("Forward Output Group" . term-next-prompt)) | 662 | ["Next Input" term-next-input t] |
| 692 | (define-key inout-menu [previous-prompt] | 663 | ["Previous Matching Current Input" |
| 693 | '("Backward Output Group" . term-previous-prompt)) | 664 | term-previous-matching-input-from-input t] |
| 694 | (define-key inout-menu [show-maximum-output] | 665 | ["Next Matching Current Input" term-next-matching-input-from-input t] |
| 695 | '("Show Maximum Output" . term-show-maximum-output)) | 666 | ["Previous Matching Input..." term-previous-matching-input t] |
| 696 | (define-key inout-menu [show-output] | 667 | ["Next Matching Input..." term-next-matching-input t] |
| 697 | '("Show Current Output Group" . term-show-output)) | 668 | ["Backward Matching Input..." term-backward-matching-input t] |
| 698 | (define-key inout-menu [kill-input] | 669 | ["Forward Matching Input..." term-forward-matching-input t] |
| 699 | '("Kill Current Input" . term-kill-input)) | 670 | ["Copy Old Input" term-copy-old-input t] |
| 700 | (define-key inout-menu [copy-input] | 671 | ["Kill Current Input" term-kill-input t] |
| 701 | '("Copy Old Input" . term-copy-old-input)) | 672 | ["Show Current Output Group" term-show-output t] |
| 702 | (define-key inout-menu [forward-matching-history] | 673 | ["Show Maximum Output" term-show-maximum-output t] |
| 703 | '("Forward Matching Input..." . term-forward-matching-input)) | 674 | ["Backward Output Group" term-previous-prompt t] |
| 704 | (define-key inout-menu [backward-matching-history] | 675 | ["Forward Output Group" term-next-prompt t] |
| 705 | '("Backward Matching Input..." . term-backward-matching-input)) | 676 | ["Kill Current Output Group" term-kill-output t])) |
| 706 | (define-key inout-menu [next-matching-history] | 677 | map) |
| 707 | '("Next Matching Input..." . term-next-matching-input)) | 678 | "Keymap for Term mode.") |
| 708 | (define-key inout-menu [previous-matching-history] | ||
| 709 | '("Previous Matching Input..." . term-previous-matching-input)) | ||
| 710 | (define-key inout-menu [next-matching-history-from-input] | ||
| 711 | '("Next Matching Current Input" . term-next-matching-input-from-input)) | ||
| 712 | (define-key inout-menu [previous-matching-history-from-input] | ||
| 713 | '("Previous Matching Current Input" . | ||
| 714 | term-previous-matching-input-from-input)) | ||
| 715 | (define-key inout-menu [next-history] | ||
| 716 | '("Next Input" . term-next-input)) | ||
| 717 | (define-key inout-menu [previous-history] | ||
| 718 | '("Previous Input" . term-previous-input)) | ||
| 719 | (define-key inout-menu [list-history] | ||
| 720 | '("List Input History" . term-dynamic-list-input-ring)) | ||
| 721 | (define-key inout-menu [expand-history] | ||
| 722 | '("Expand History Before Point" . term-replace-by-expanded-history))) | ||
| 723 | |||
| 724 | (define-key map [menu-bar signals] term-signals-menu) | ||
| 725 | |||
| 726 | map)) | ||
| 727 | 679 | ||
| 728 | (defvar term-escape-char nil | 680 | (defvar term-escape-char nil |
| 729 | "Escape character for char sub-mode of term mode. | 681 | "Escape character for char sub-mode of term mode. |
| 730 | Do not change it directly; use `term-set-escape-char' instead.") | 682 | Do not change it directly; use `term-set-escape-char' instead.") |
| 731 | 683 | ||
| 732 | (defvar term-pager-break-map nil) | 684 | (defvar term-pager-break-map |
| 685 | (let ((map (make-keymap))) | ||
| 686 | ;; (dotimes (i 128) | ||
| 687 | ;; (define-key map (make-string 1 i) 'term-send-raw)) | ||
| 688 | (define-key map "\e" (lookup-key (current-global-map) "\e")) | ||
| 689 | (define-key map "\C-x" (lookup-key (current-global-map) "\C-x")) | ||
| 690 | (define-key map "\C-u" (lookup-key (current-global-map) "\C-u")) | ||
| 691 | (define-key map " " 'term-pager-page) | ||
| 692 | (define-key map "\r" 'term-pager-line) | ||
| 693 | (define-key map "?" 'term-pager-help) | ||
| 694 | (define-key map "h" 'term-pager-help) | ||
| 695 | (define-key map "b" 'term-pager-back-page) | ||
| 696 | (define-key map "\177" 'term-pager-back-line) | ||
| 697 | (define-key map "q" 'term-pager-discard) | ||
| 698 | (define-key map "D" 'term-pager-disable) | ||
| 699 | (define-key map "<" 'term-pager-bob) | ||
| 700 | (define-key map ">" 'term-pager-eob) | ||
| 701 | map) | ||
| 702 | "Keymap used in Term pager mode.") | ||
| 733 | 703 | ||
| 734 | (defvar term-ptyp t | 704 | (defvar term-ptyp t |
| 735 | "True if communications via pty; false if by pipe. Buffer local. | 705 | "True if communications via pty; false if by pipe. Buffer local. |
| @@ -750,7 +720,6 @@ Buffer local variable.") | |||
| 750 | ; assuming this is Emacs 19.20 or newer. | 720 | ; assuming this is Emacs 19.20 or newer. |
| 751 | (defvar term-pager-filter t) | 721 | (defvar term-pager-filter t) |
| 752 | 722 | ||
| 753 | (put 'term-replace-by-expanded-history 'menu-enable 'term-input-autoexpand) | ||
| 754 | (put 'term-input-ring 'permanent-local t) | 723 | (put 'term-input-ring 'permanent-local t) |
| 755 | (put 'term-input-ring-index 'permanent-local t) | 724 | (put 'term-input-ring-index 'permanent-local t) |
| 756 | (put 'term-input-autoexpand 'permanent-local t) | 725 | (put 'term-input-autoexpand 'permanent-local t) |
| @@ -879,28 +848,6 @@ is buffer-local." | |||
| 879 | :group 'term | 848 | :group 'term |
| 880 | :type 'integer) | 849 | :type 'integer) |
| 881 | 850 | ||
| 882 | (defvar term-terminal-menu | ||
| 883 | (if (featurep 'xemacs) | ||
| 884 | '("Terminal" | ||
| 885 | [ "Character mode" term-char-mode (term-in-line-mode)] | ||
| 886 | [ "Line mode" term-line-mode (term-in-char-mode)] | ||
| 887 | [ "Enable paging" term-pager-toggle (not term-pager-count)] | ||
| 888 | [ "Disable paging" term-pager-toggle term-pager-count]) | ||
| 889 | (let ((map (make-sparse-keymap "Terminal"))) | ||
| 890 | (define-key map [terminal-pager-enable] | ||
| 891 | '(menu-item "Enable paging" term-fake-pager-enable | ||
| 892 | :help "Enable paging feature")) | ||
| 893 | (define-key map [terminal-pager-disable] | ||
| 894 | '(menu-item "Disable paging" term-fake-pager-disable | ||
| 895 | :help "Disable paging feature")) | ||
| 896 | (define-key map [terminal-char-mode] | ||
| 897 | '(menu-item "Character mode" term-char-mode | ||
| 898 | :help "Switch to char (raw) sub-mode of term mode")) | ||
| 899 | (define-key map [terminal-line-mode] | ||
| 900 | '(menu-item "Line mode" term-line-mode | ||
| 901 | :help "Switch to line (cooked) sub-mode of term mode")) | ||
| 902 | (cons "Terminal" map)))) | ||
| 903 | |||
| 904 | ;; Set up term-raw-map, etc. | 851 | ;; Set up term-raw-map, etc. |
| 905 | 852 | ||
| 906 | (defvar term-raw-map | 853 | (defvar term-raw-map |
| @@ -920,9 +867,7 @@ is buffer-local." | |||
| 920 | 867 | ||
| 921 | (if (featurep 'xemacs) | 868 | (if (featurep 'xemacs) |
| 922 | (define-key map [button2] 'term-mouse-paste) | 869 | (define-key map [button2] 'term-mouse-paste) |
| 923 | (define-key map [mouse-2] 'term-mouse-paste) | 870 | (define-key map [mouse-2] 'term-mouse-paste)) |
| 924 | (define-key map [menu-bar terminal] term-terminal-menu) | ||
| 925 | (define-key map [menu-bar signals] term-signals-menu)) | ||
| 926 | (define-key map [up] 'term-send-up) | 871 | (define-key map [up] 'term-send-up) |
| 927 | (define-key map [down] 'term-send-down) | 872 | (define-key map [down] 'term-send-down) |
| 928 | (define-key map [right] 'term-send-right) | 873 | (define-key map [right] 'term-send-right) |
| @@ -941,6 +886,46 @@ is buffer-local." | |||
| 941 | map) | 886 | map) |
| 942 | "Keyboard map for sending characters directly to the inferior process.") | 887 | "Keyboard map for sending characters directly to the inferior process.") |
| 943 | 888 | ||
| 889 | (easy-menu-define term-terminal-menu | ||
| 890 | (list term-mode-map term-raw-map term-pager-break-map) | ||
| 891 | "Terminal menu for Term mode." | ||
| 892 | '("Terminal" | ||
| 893 | ["Line mode" term-line-mode :active (term-in-char-mode) | ||
| 894 | :help "Switch to line (cooked) sub-mode of term mode"] | ||
| 895 | ["Character mode" term-char-mode :active (term-in-line-mode) | ||
| 896 | :help "Switch to char (raw) sub-mode of term mode"] | ||
| 897 | ["Paging" term-pager-toggle :style toggle :selected term-pager-count | ||
| 898 | :help "Toggle paging feature"])) | ||
| 899 | |||
| 900 | (easy-menu-define term-signals-menu | ||
| 901 | (list term-mode-map term-raw-map term-pager-break-map) | ||
| 902 | "Signals menu for Term mode." | ||
| 903 | '("Signals" | ||
| 904 | ["BREAK" term-interrupt-subjob :active t | ||
| 905 | :help "Interrupt the current subjob"] | ||
| 906 | ["STOP" term-stop-subjob :active t :help "Stop the current subjob"] | ||
| 907 | ["CONT" term-continue-subjob :active t | ||
| 908 | :help "Send CONT signal to process buffer's process group"] | ||
| 909 | ["QUIT" term-quit-subjob :active t | ||
| 910 | :help "Send quit signal to the current subjob"] | ||
| 911 | ["KILL" term-kill-subjob :active t | ||
| 912 | :help "Send kill signal to the current subjob"] | ||
| 913 | ["EOF" term-send-eof :active t | ||
| 914 | :help "Send an EOF to the current buffer's process"])) | ||
| 915 | |||
| 916 | (easy-menu-define term-pager-menu term-pager-break-map | ||
| 917 | "Menu for Term pager mode." | ||
| 918 | '("More pages?" | ||
| 919 | ["1 page forwards" term-pager-page t] | ||
| 920 | ["1 page backwards" term-pager-back-page t] | ||
| 921 | ["1 line backwards" term-pager-back-line t] | ||
| 922 | ["1 line forwards" term-pager-line t] | ||
| 923 | ["Goto to beginning" term-pager-bob t] | ||
| 924 | ["Goto to end" term-pager-eob t] | ||
| 925 | ["Discard remaining output" term-pager-discard t] | ||
| 926 | ["Disable paging" term-pager-toggle t] | ||
| 927 | ["Help" term-pager-help t])) | ||
| 928 | |||
| 944 | (defvar term-raw-escape-map | 929 | (defvar term-raw-escape-map |
| 945 | (let ((map (make-sparse-keymap))) | 930 | (let ((map (make-sparse-keymap))) |
| 946 | (set-keymap-parent map 'Control-X-prefix) | 931 | (set-keymap-parent map 'Control-X-prefix) |
| @@ -1151,9 +1136,8 @@ Entry to this mode runs the hooks on `term-mode-hook'." | |||
| 1151 | 1136 | ||
| 1152 | (set (make-local-variable 'font-lock-defaults) '(nil t)) | 1137 | (set (make-local-variable 'font-lock-defaults) '(nil t)) |
| 1153 | 1138 | ||
| 1154 | (when (featurep 'xemacs) | 1139 | (easy-menu-add term-terminal-menu) |
| 1155 | (set-buffer-menubar | 1140 | (easy-menu-add term-signals-menu) |
| 1156 | (append current-menubar (list term-terminal-menu)))) | ||
| 1157 | (or term-input-ring | 1141 | (or term-input-ring |
| 1158 | (setq term-input-ring (make-ring term-input-ring-size))) | 1142 | (setq term-input-ring (make-ring term-input-ring-size))) |
| 1159 | (term-update-mode-line)) | 1143 | (term-update-mode-line)) |
| @@ -1291,6 +1275,8 @@ intervention from Emacs, except for the escape character (usually C-c)." | |||
| 1291 | (when (term-in-line-mode) | 1275 | (when (term-in-line-mode) |
| 1292 | (setq term-old-mode-map (current-local-map)) | 1276 | (setq term-old-mode-map (current-local-map)) |
| 1293 | (use-local-map term-raw-map) | 1277 | (use-local-map term-raw-map) |
| 1278 | (easy-menu-add term-terminal-menu) | ||
| 1279 | (easy-menu-add term-signals-menu) | ||
| 1294 | 1280 | ||
| 1295 | ;; Send existing partial line to inferior (without newline). | 1281 | ;; Send existing partial line to inferior (without newline). |
| 1296 | (let ((pmark (process-mark (get-buffer-process (current-buffer)))) | 1282 | (let ((pmark (process-mark (get-buffer-process (current-buffer)))) |
| @@ -1315,8 +1301,31 @@ you type \\[term-send-input] which sends the current line to the inferior." | |||
| 1315 | (term-update-mode-line))) | 1301 | (term-update-mode-line))) |
| 1316 | 1302 | ||
| 1317 | (defun term-update-mode-line () | 1303 | (defun term-update-mode-line () |
| 1318 | (let ((term-mode (if (term-in-char-mode) "char" "line")) | 1304 | (let ((term-mode |
| 1319 | (term-page (when (term-pager-enabled) " page")) | 1305 | (if (term-in-char-mode) |
| 1306 | (propertize "char" | ||
| 1307 | 'help-echo "mouse-1: Switch to line mode" | ||
| 1308 | 'mouse-face 'mode-line-highlight | ||
| 1309 | 'local-map | ||
| 1310 | '(keymap | ||
| 1311 | (mode-line keymap (down-mouse-1 . term-line-mode)))) | ||
| 1312 | (propertize "line" | ||
| 1313 | 'help-echo "mouse-1: Switch to char mode" | ||
| 1314 | 'mouse-face 'mode-line-highlight | ||
| 1315 | 'local-map | ||
| 1316 | '(keymap | ||
| 1317 | (mode-line keymap (down-mouse-1 . term-char-mode)))))) | ||
| 1318 | (term-page | ||
| 1319 | (when (term-pager-enabled) | ||
| 1320 | (concat " " | ||
| 1321 | (propertize | ||
| 1322 | "page" | ||
| 1323 | 'help-echo "mouse-1: Disable paging" | ||
| 1324 | 'mouse-face 'mode-line-highlight | ||
| 1325 | 'local-map | ||
| 1326 | '(keymap | ||
| 1327 | (mode-line keymap (down-mouse-1 . | ||
| 1328 | term-pager-toggle))))))) | ||
| 1320 | (serial-item-speed) | 1329 | (serial-item-speed) |
| 1321 | (serial-item-config) | 1330 | (serial-item-config) |
| 1322 | (proc (get-buffer-process (current-buffer)))) | 1331 | (proc (get-buffer-process (current-buffer)))) |
| @@ -3463,54 +3472,13 @@ The top-most line is line 0." | |||
| 3463 | ;; The page is full, so enter "pager" mode, and wait for input. | 3472 | ;; The page is full, so enter "pager" mode, and wait for input. |
| 3464 | 3473 | ||
| 3465 | (defun term-process-pager () | 3474 | (defun term-process-pager () |
| 3466 | (when (not term-pager-break-map) | ||
| 3467 | (let* ((map (make-keymap)) | ||
| 3468 | ;; (i 0) | ||
| 3469 | tmp) | ||
| 3470 | ;; (while (< i 128) | ||
| 3471 | ;; (define-key map (make-string 1 i) 'term-send-raw) | ||
| 3472 | ;; (setq i (1+ i))) | ||
| 3473 | (define-key map "\e" | ||
| 3474 | (lookup-key (current-global-map) "\e")) | ||
| 3475 | (define-key map "\C-x" | ||
| 3476 | (lookup-key (current-global-map) "\C-x")) | ||
| 3477 | (define-key map "\C-u" | ||
| 3478 | (lookup-key (current-global-map) "\C-u")) | ||
| 3479 | (define-key map " " 'term-pager-page) | ||
| 3480 | (define-key map "\r" 'term-pager-line) | ||
| 3481 | (define-key map "?" 'term-pager-help) | ||
| 3482 | (define-key map "h" 'term-pager-help) | ||
| 3483 | (define-key map "b" 'term-pager-back-page) | ||
| 3484 | (define-key map "\177" 'term-pager-back-line) | ||
| 3485 | (define-key map "q" 'term-pager-discard) | ||
| 3486 | (define-key map "D" 'term-pager-disable) | ||
| 3487 | (define-key map "<" 'term-pager-bob) | ||
| 3488 | (define-key map ">" 'term-pager-eob) | ||
| 3489 | |||
| 3490 | ;; Add menu bar. | ||
| 3491 | (unless (featurep 'xemacs) | ||
| 3492 | (define-key map [menu-bar terminal] term-terminal-menu) | ||
| 3493 | (define-key map [menu-bar signals] term-signals-menu) | ||
| 3494 | (setq tmp (make-sparse-keymap "More pages?")) | ||
| 3495 | (define-key tmp [help] '("Help" . term-pager-help)) | ||
| 3496 | (define-key tmp [disable] | ||
| 3497 | '("Disable paging" . term-fake-pager-disable)) | ||
| 3498 | (define-key tmp [discard] | ||
| 3499 | '("Discard remaining output" . term-pager-discard)) | ||
| 3500 | (define-key tmp [eob] '("Goto to end" . term-pager-eob)) | ||
| 3501 | (define-key tmp [bob] '("Goto to beginning" . term-pager-bob)) | ||
| 3502 | (define-key tmp [line] '("1 line forwards" . term-pager-line)) | ||
| 3503 | (define-key tmp [bline] '("1 line backwards" . term-pager-back-line)) | ||
| 3504 | (define-key tmp [back] '("1 page backwards" . term-pager-back-page)) | ||
| 3505 | (define-key tmp [page] '("1 page forwards" . term-pager-page)) | ||
| 3506 | (define-key map [menu-bar page] (cons "More pages?" tmp)) | ||
| 3507 | ) | ||
| 3508 | |||
| 3509 | (setq term-pager-break-map map))) | ||
| 3510 | ;; (let ((process (get-buffer-process (current-buffer)))) | 3475 | ;; (let ((process (get-buffer-process (current-buffer)))) |
| 3511 | ;; (stop-process process)) | 3476 | ;; (stop-process process)) |
| 3512 | (setq term-pager-old-local-map (current-local-map)) | 3477 | (setq term-pager-old-local-map (current-local-map)) |
| 3513 | (use-local-map term-pager-break-map) | 3478 | (use-local-map term-pager-break-map) |
| 3479 | (easy-menu-add term-terminal-menu) | ||
| 3480 | (easy-menu-add term-signals-menu) | ||
| 3481 | (easy-menu-add term-pager-menu) | ||
| 3514 | (make-local-variable 'term-old-mode-line-format) | 3482 | (make-local-variable 'term-old-mode-line-format) |
| 3515 | (setq term-old-mode-line-format mode-line-format) | 3483 | (setq term-old-mode-line-format mode-line-format) |
| 3516 | (setq mode-line-format | 3484 | (setq mode-line-format |
| @@ -3591,14 +3559,6 @@ The top-most line is line 0." | |||
| 3591 | (interactive) | 3559 | (interactive) |
| 3592 | (if (term-pager-enabled) (term-pager-disable) (term-pager-enable))) | 3560 | (if (term-pager-enabled) (term-pager-disable) (term-pager-enable))) |
| 3593 | 3561 | ||
| 3594 | (unless (featurep 'xemacs) | ||
| 3595 | (defalias 'term-fake-pager-enable 'term-pager-toggle) | ||
| 3596 | (defalias 'term-fake-pager-disable 'term-pager-toggle) | ||
| 3597 | (put 'term-char-mode 'menu-enable '(term-in-line-mode)) | ||
| 3598 | (put 'term-line-mode 'menu-enable '(term-in-char-mode)) | ||
| 3599 | (put 'term-fake-pager-enable 'menu-enable '(not term-pager-count)) | ||
| 3600 | (put 'term-fake-pager-disable 'menu-enable 'term-pager-count)) | ||
| 3601 | |||
| 3602 | (defun term-pager-help () | 3562 | (defun term-pager-help () |
| 3603 | "Provide help on commands available in a terminal-emulator **MORE** break." | 3563 | "Provide help on commands available in a terminal-emulator **MORE** break." |
| 3604 | (interactive) | 3564 | (interactive) |
diff --git a/lisp/type-break.el b/lisp/type-break.el index f0c81125f0c..8a95508d939 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el | |||
| @@ -577,7 +577,6 @@ as per the function `type-break-schedule'." | |||
| 577 | (unless type-break-terse-messages | 577 | (unless type-break-terse-messages |
| 578 | (message "Press any key to resume from typing break.")) | 578 | (message "Press any key to resume from typing break.")) |
| 579 | 579 | ||
| 580 | (random t) | ||
| 581 | (let* ((len (length type-break-demo-functions)) | 580 | (let* ((len (length type-break-demo-functions)) |
| 582 | (idx (random len)) | 581 | (idx (random len)) |
| 583 | (fn (nth idx type-break-demo-functions))) | 582 | (fn (nth idx type-break-demo-functions))) |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 2a672623c01..ae1a3cf92f8 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -394,7 +394,7 @@ REV is the revision to check out." | |||
| 394 | (if vc-cvs-use-edit | 394 | (if vc-cvs-use-edit |
| 395 | (vc-cvs-command nil 0 file "edit") | 395 | (vc-cvs-command nil 0 file "edit") |
| 396 | (set-file-modes file (logior (file-modes file) 128)) | 396 | (set-file-modes file (logior (file-modes file) 128)) |
| 397 | (if (equal file buffer-file-name) (toggle-read-only -1)))) | 397 | (if (equal file buffer-file-name) (read-only-mode -1)))) |
| 398 | ;; Check out a particular revision (or recreate the file). | 398 | ;; Check out a particular revision (or recreate the file). |
| 399 | (vc-file-setprop file 'vc-working-revision nil) | 399 | (vc-file-setprop file 'vc-working-revision nil) |
| 400 | (apply 'vc-cvs-command nil 0 file | 400 | (apply 'vc-cvs-command nil 0 file |
| @@ -1178,7 +1178,11 @@ is non-nil." | |||
| 1178 | (parse-time-string (concat time " +0000"))))) | 1178 | (parse-time-string (concat time " +0000"))))) |
| 1179 | (cond ((and (not (string-match "\\+" time)) | 1179 | (cond ((and (not (string-match "\\+" time)) |
| 1180 | (car parsed-time) | 1180 | (car parsed-time) |
| 1181 | (equal mtime (apply 'encode-time parsed-time))) | 1181 | ;; Compare just the seconds part of the file time, |
| 1182 | ;; since CVS file time stamp resolution is just 1 second. | ||
| 1183 | (let ((ptime (apply 'encode-time parsed-time))) | ||
| 1184 | (and (eq (car mtime) (car ptime)) | ||
| 1185 | (eq (cadr mtime) (cadr ptime))))) | ||
| 1182 | (vc-file-setprop file 'vc-checkout-time mtime) | 1186 | (vc-file-setprop file 'vc-checkout-time mtime) |
| 1183 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) | 1187 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) |
| 1184 | (t | 1188 | (t |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index ddb9565544d..1ef4faaa008 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1133,7 +1133,7 @@ For old-style locking-based version control systems, like RCS: | |||
| 1133 | (let ((visited (get-file-buffer file))) | 1133 | (let ((visited (get-file-buffer file))) |
| 1134 | (when visited | 1134 | (when visited |
| 1135 | (with-current-buffer visited | 1135 | (with-current-buffer visited |
| 1136 | (toggle-read-only -1)))))) | 1136 | (read-only-mode -1)))))) |
| 1137 | ;; Allow user to revert files with no changes | 1137 | ;; Allow user to revert files with no changes |
| 1138 | (save-excursion | 1138 | (save-excursion |
| 1139 | (dolist (file files) | 1139 | (dolist (file files) |
| @@ -1344,7 +1344,7 @@ After check-out, runs the normal hook `vc-checkout-hook'." | |||
| 1344 | ;; Maybe the backend is not installed ;-( | 1344 | ;; Maybe the backend is not installed ;-( |
| 1345 | (when writable | 1345 | (when writable |
| 1346 | (let ((buf (get-file-buffer file))) | 1346 | (let ((buf (get-file-buffer file))) |
| 1347 | (when buf (with-current-buffer buf (toggle-read-only -1))))) | 1347 | (when buf (with-current-buffer buf (read-only-mode -1))))) |
| 1348 | (signal (car err) (cdr err)))) | 1348 | (signal (car err) (cdr err)))) |
| 1349 | `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit) | 1349 | `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit) |
| 1350 | (not writable)) | 1350 | (not writable)) |
diff --git a/lisp/window.el b/lisp/window.el index 142e80e1666..f73c85e991b 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -73,6 +73,108 @@ are not altered by this macro (unless they are altered in BODY)." | |||
| 73 | (when (window-live-p save-selected-window-window) | 73 | (when (window-live-p save-selected-window-window) |
| 74 | (select-window save-selected-window-window 'norecord)))))) | 74 | (select-window save-selected-window-window 'norecord)))))) |
| 75 | 75 | ||
| 76 | (defvar temp-buffer-window-setup-hook nil | ||
| 77 | "Normal hook run by `with-temp-buffer-window' before buffer display. | ||
| 78 | This hook is run by `with-temp-buffer-window' with the buffer to be | ||
| 79 | displayed current.") | ||
| 80 | |||
| 81 | (defvar temp-buffer-window-show-hook nil | ||
| 82 | "Normal hook run by `with-temp-buffer-window' after buffer display. | ||
| 83 | This hook is run by `with-temp-buffer-window' with the buffer | ||
| 84 | displayed and current and its window selected.") | ||
| 85 | |||
| 86 | (defun temp-buffer-window-setup (buffer-or-name) | ||
| 87 | "Set up temporary buffer specified by BUFFER-OR-NAME | ||
| 88 | Return the buffer." | ||
| 89 | (let ((old-dir default-directory) | ||
| 90 | (buffer (get-buffer-create buffer-or-name))) | ||
| 91 | (with-current-buffer buffer | ||
| 92 | (kill-all-local-variables) | ||
| 93 | (setq default-directory old-dir) | ||
| 94 | (delete-all-overlays) | ||
| 95 | (setq buffer-read-only nil) | ||
| 96 | (setq buffer-file-name nil) | ||
| 97 | (setq buffer-undo-list t) | ||
| 98 | (let ((inhibit-read-only t) | ||
| 99 | (inhibit-modification-hooks t)) | ||
| 100 | (erase-buffer) | ||
| 101 | (run-hooks 'temp-buffer-window-setup-hook)) | ||
| 102 | ;; Return the buffer. | ||
| 103 | buffer))) | ||
| 104 | |||
| 105 | (defun temp-buffer-window-show (&optional buffer action) | ||
| 106 | "Show temporary buffer BUFFER in a window. | ||
| 107 | Return the window showing BUFFER. Pass ACTION as action argument | ||
| 108 | to `display-buffer'." | ||
| 109 | (let (window frame) | ||
| 110 | (with-current-buffer buffer | ||
| 111 | (set-buffer-modified-p nil) | ||
| 112 | (setq buffer-read-only t) | ||
| 113 | (goto-char (point-min)) | ||
| 114 | (when (setq window (display-buffer buffer action)) | ||
| 115 | (setq frame (window-frame window)) | ||
| 116 | (unless (eq frame (selected-frame)) | ||
| 117 | (raise-frame frame)) | ||
| 118 | (setq minibuffer-scroll-window window) | ||
| 119 | (set-window-hscroll window 0) | ||
| 120 | (with-selected-window window | ||
| 121 | (run-hooks 'temp-buffer-window-show-hook) | ||
| 122 | (when temp-buffer-resize-mode | ||
| 123 | (resize-temp-buffer-window window))) | ||
| 124 | ;; Return the window. | ||
| 125 | window)))) | ||
| 126 | |||
| 127 | (defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body) | ||
| 128 | "Evaluate BODY and display buffer specified by BUFFER-OR-NAME. | ||
| 129 | BUFFER-OR-NAME must specify either a live buffer or the name of a | ||
| 130 | buffer. If no buffer with such a name exists, create one. | ||
| 131 | |||
| 132 | Make sure the specified buffer is empty before evaluating BODY. | ||
| 133 | Do not make that buffer current for BODY. Instead, bind | ||
| 134 | `standard-output' to that buffer, so that output generated with | ||
| 135 | `prin1' and similar functions in BODY goes into that buffer. | ||
| 136 | |||
| 137 | After evaluating BODY, mark the specified buffer unmodified and | ||
| 138 | read-only, and display it in a window via `display-buffer'. Pass | ||
| 139 | ACTION as action argument to `display-buffer'. Automatically | ||
| 140 | shrink the window used if `temp-buffer-resize-mode' is enabled. | ||
| 141 | |||
| 142 | Return the value returned by BODY unless QUIT-FUNCTION specifies | ||
| 143 | a function. In that case, run the function with two arguments - | ||
| 144 | the window showing the specified buffer and the value returned by | ||
| 145 | BODY - and return the value returned by that function. | ||
| 146 | |||
| 147 | If the buffer is displayed on a new frame, the window manager may | ||
| 148 | decide to select that frame. In that case, it's usually a good | ||
| 149 | strategy if the function specified by QUIT-FUNCTION selects the | ||
| 150 | window showing the buffer before reading a value from the | ||
| 151 | minibuffer, for example, when asking a `yes-or-no-p' question. | ||
| 152 | |||
| 153 | This construct is similar to `with-output-to-temp-buffer' but | ||
| 154 | does neither put the buffer in help mode nor does it call | ||
| 155 | `temp-buffer-show-function'. It also runs different hooks, | ||
| 156 | namely `temp-buffer-window-setup-hook' (with the specified buffer | ||
| 157 | current) and `temp-buffer-window-show-hook' (with the specified | ||
| 158 | buffer current and the window showing it selected). | ||
| 159 | |||
| 160 | Since this macro calls `display-buffer', the window displaying | ||
| 161 | the buffer is usually not selected and the specified buffer | ||
| 162 | usually not made current. QUIT-FUNCTION can override that." | ||
| 163 | (declare (debug t)) | ||
| 164 | (let ((buffer (make-symbol "buffer")) | ||
| 165 | (window (make-symbol "window")) | ||
| 166 | (value (make-symbol "value"))) | ||
| 167 | `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name)) | ||
| 168 | (standard-output ,buffer) | ||
| 169 | ,window ,value) | ||
| 170 | (with-current-buffer ,buffer | ||
| 171 | (setq ,value (progn ,@body)) | ||
| 172 | (setq ,window (temp-buffer-window-show ,buffer ,action))) | ||
| 173 | |||
| 174 | (if (functionp ,quit-function) | ||
| 175 | (funcall ,quit-function ,window ,value) | ||
| 176 | ,value)))) | ||
| 177 | |||
| 76 | ;; The following two functions are like `window-next-sibling' and | 178 | ;; The following two functions are like `window-next-sibling' and |
| 77 | ;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so | 179 | ;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so |
| 78 | ;; they don't substitute the selected window for nil), and they return | 180 | ;; they don't substitute the selected window for nil), and they return |
| @@ -271,19 +373,32 @@ windows horizontally arranged within WINDOW." | |||
| 271 | (setq walk-window-tree-window | 373 | (setq walk-window-tree-window |
| 272 | (window-right walk-window-tree-window)))))) | 374 | (window-right walk-window-tree-window)))))) |
| 273 | 375 | ||
| 274 | (defun walk-window-tree (fun &optional frame any) | 376 | (defun walk-window-tree (fun &optional frame any minibuf) |
| 275 | "Run function FUN on each live window of FRAME. | 377 | "Run function FUN on each live window of FRAME. |
| 276 | FUN must be a function with one argument - a window. FRAME must | 378 | FUN must be a function with one argument - a window. FRAME must |
| 277 | be a live frame and defaults to the selected one. ANY, if | 379 | be a live frame and defaults to the selected one. ANY, if |
| 278 | non-nil means to run FUN on all live and internal windows of | 380 | non-nil, means to run FUN on all live and internal windows of |
| 279 | FRAME. | 381 | FRAME. |
| 280 | 382 | ||
| 383 | Optional argument MINIBUF t means run FUN on FRAME's minibuffer | ||
| 384 | window even if it isn't active. MINIBUF nil or omitted means run | ||
| 385 | FUN on FRAME's minibuffer window only if it's active. In both | ||
| 386 | cases the minibuffer window must be part of FRAME. MINIBUF | ||
| 387 | neither nil nor t means never run FUN on the minibuffer window. | ||
| 388 | |||
| 281 | This function performs a pre-order, depth-first traversal of the | 389 | This function performs a pre-order, depth-first traversal of the |
| 282 | window tree. If FUN changes the window tree, the result is | 390 | window tree. If FUN changes the window tree, the result is |
| 283 | unpredictable." | 391 | unpredictable." |
| 284 | (let ((walk-window-tree-frame (window-normalize-frame frame))) | 392 | (setq frame (window-normalize-frame frame)) |
| 285 | (walk-window-tree-1 | 393 | (walk-window-tree-1 fun (frame-root-window frame) any) |
| 286 | fun (frame-root-window walk-window-tree-frame) any))) | 394 | (when (memq minibuf '(nil t)) |
| 395 | ;; Run FUN on FRAME's minibuffer window if requested. | ||
| 396 | (let ((minibuffer-window (minibuffer-window frame))) | ||
| 397 | (when (and (window-live-p minibuffer-window) | ||
| 398 | (eq (window-frame minibuffer-window) frame) | ||
| 399 | (or (eq minibuf t) | ||
| 400 | (minibuffer-window-active-p minibuffer-window))) | ||
| 401 | (funcall fun minibuffer-window))))) | ||
| 287 | 402 | ||
| 288 | (defun walk-window-subtree (fun &optional window any) | 403 | (defun walk-window-subtree (fun &optional window any) |
| 289 | "Run function FUN on the subtree of windows rooted at WINDOW. | 404 | "Run function FUN on the subtree of windows rooted at WINDOW. |
| @@ -299,13 +414,19 @@ is unpredictable." | |||
| 299 | (setq window (window-normalize-window window)) | 414 | (setq window (window-normalize-window window)) |
| 300 | (walk-window-tree-1 fun window any t)) | 415 | (walk-window-tree-1 fun window any t)) |
| 301 | 416 | ||
| 302 | (defun window-with-parameter (parameter &optional value frame any) | 417 | (defun window-with-parameter (parameter &optional value frame any minibuf) |
| 303 | "Return first window on FRAME with PARAMETER non-nil. | 418 | "Return first window on FRAME with PARAMETER non-nil. |
| 304 | FRAME defaults to the selected frame. Optional argument VALUE | 419 | FRAME defaults to the selected frame. Optional argument VALUE |
| 305 | non-nil means only return a window whose window-parameter value | 420 | non-nil means only return a window whose window-parameter value |
| 306 | for PARAMETER equals VALUE (comparison is done with `equal'). | 421 | for PARAMETER equals VALUE (comparison is done with `equal'). |
| 307 | Optional argument ANY non-nil means consider internal windows | 422 | Optional argument ANY non-nil means consider internal windows |
| 308 | too." | 423 | too. |
| 424 | |||
| 425 | Optional argument MINIBUF t means consider FRAME's minibuffer | ||
| 426 | window even if it isn't active. MINIBUF nil or omitted means | ||
| 427 | consider FRAME's minibuffer window only if it's active. In both | ||
| 428 | cases the minibuffer window must be part of FRAME. MINIBUF | ||
| 429 | neither nil nor t means never consider the minibuffer window." | ||
| 309 | (let (this-value) | 430 | (let (this-value) |
| 310 | (catch 'found | 431 | (catch 'found |
| 311 | (walk-window-tree | 432 | (walk-window-tree |
| @@ -313,7 +434,7 @@ too." | |||
| 313 | (when (and (setq this-value (window-parameter window parameter)) | 434 | (when (and (setq this-value (window-parameter window parameter)) |
| 314 | (or (not value) (equal value this-value))) | 435 | (or (not value) (equal value this-value))) |
| 315 | (throw 'found window))) | 436 | (throw 'found window))) |
| 316 | frame any)))) | 437 | frame any minibuf)))) |
| 317 | 438 | ||
| 318 | ;;; Atomic windows. | 439 | ;;; Atomic windows. |
| 319 | (defun window-atom-root (&optional window) | 440 | (defun window-atom-root (&optional window) |
| @@ -338,6 +459,45 @@ WINDOW must be an internal window. Return WINDOW." | |||
| 338 | window t) | 459 | window t) |
| 339 | window)) | 460 | window)) |
| 340 | 461 | ||
| 462 | (defun display-buffer-in-atom-window (buffer alist) | ||
| 463 | "Display BUFFER in an atomic window. | ||
| 464 | This function displays BUFFER in a new window that will be | ||
| 465 | combined with an existing window to form an atomic window. If | ||
| 466 | the existing window is already part of an atomic window, add the | ||
| 467 | new window to that atomic window. Operations like `split-window' | ||
| 468 | or `delete-window', when applied to a constituent of an atomic | ||
| 469 | window, are applied atomically to the root of that atomic window. | ||
| 470 | |||
| 471 | ALIST is an association list of symbols and values. The | ||
| 472 | following symbols can be used. | ||
| 473 | |||
| 474 | `window' specifies the existing window the new window shall be | ||
| 475 | combined with. Use `window-atom-root' to make the new window a | ||
| 476 | sibling of an atomic window's root. If an internal window is | ||
| 477 | specified here, all children of that window become part of the | ||
| 478 | atomic window too. If no window is specified, the new window | ||
| 479 | becomes a sibling of the selected window. | ||
| 480 | |||
| 481 | `side' denotes the side of the existing window where the new | ||
| 482 | window shall be located. Valid values are `below', `right', | ||
| 483 | `above' and `left'. The default is `below'. | ||
| 484 | |||
| 485 | The return value is the new window, nil when creating that window | ||
| 486 | failed." | ||
| 487 | (let ((ignore-window-parameters t) | ||
| 488 | (window-combination-limit t) | ||
| 489 | (window (cdr (assq 'window alist))) | ||
| 490 | (side (cdr (assq 'side alist))) | ||
| 491 | new) | ||
| 492 | (setq window (window-normalize-window window)) | ||
| 493 | ;; Split off new window | ||
| 494 | (when (setq new (split-window window nil side)) | ||
| 495 | ;; Make sure we have a valid atomic window. | ||
| 496 | (window-make-atom (window-parent window)) | ||
| 497 | ;; Display BUFFER in NEW and return NEW. | ||
| 498 | (window--display-buffer | ||
| 499 | buffer new 'window display-buffer-mark-dedicated)))) | ||
| 500 | |||
| 341 | (defun window--atom-check-1 (window) | 501 | (defun window--atom-check-1 (window) |
| 342 | "Subroutine of `window--atom-check'." | 502 | "Subroutine of `window--atom-check'." |
| 343 | (when window | 503 | (when window |
| @@ -427,23 +587,273 @@ number of slots on that side." | |||
| 427 | (integer :tag "Number" :value 3 :size 5))) | 587 | (integer :tag "Number" :value 3 :size 5))) |
| 428 | :group 'windows) | 588 | :group 'windows) |
| 429 | 589 | ||
| 590 | (defun window--major-non-side-window (&optional frame) | ||
| 591 | "Return the major non-side window of frame FRAME. | ||
| 592 | The optional argument FRAME must be a live frame and defaults to | ||
| 593 | the selected one. | ||
| 594 | |||
| 595 | If FRAME has at least one side window, the major non-side window | ||
| 596 | is either an internal non-side window such that all other | ||
| 597 | non-side windows on FRAME descend from it, or the single live | ||
| 598 | non-side window of FRAME. If FRAME has no side windows, return | ||
| 599 | its root window." | ||
| 600 | (let ((frame (window-normalize-frame frame)) | ||
| 601 | major sibling) | ||
| 602 | ;; Set major to the _last_ window found by `walk-window-tree' that | ||
| 603 | ;; is not a side window but has a side window as its sibling. | ||
| 604 | (walk-window-tree | ||
| 605 | (lambda (window) | ||
| 606 | (and (not (window-parameter window 'window-side)) | ||
| 607 | (or (and (setq sibling (window-prev-sibling window)) | ||
| 608 | (window-parameter sibling 'window-side)) | ||
| 609 | (and (setq sibling (window-next-sibling window)) | ||
| 610 | (window-parameter sibling 'window-side))) | ||
| 611 | (setq major window))) | ||
| 612 | frame t) | ||
| 613 | (or major (frame-root-window frame)))) | ||
| 614 | |||
| 615 | (defun window--major-side-window (side) | ||
| 616 | "Return major side window on SIDE. | ||
| 617 | SIDE must be one of the symbols `left', `top', `right' or | ||
| 618 | `bottom'. Return nil if no such window exists." | ||
| 619 | (let ((root (frame-root-window)) | ||
| 620 | window) | ||
| 621 | ;; (1) If a window on the opposite side exists, return that window's | ||
| 622 | ;; sibling. | ||
| 623 | ;; (2) If the new window shall span the entire side, return the | ||
| 624 | ;; frame's root window. | ||
| 625 | ;; (3) If a window on an orthogonal side exists, return that | ||
| 626 | ;; window's sibling. | ||
| 627 | ;; (4) Otherwise return the frame's root window. | ||
| 628 | (cond | ||
| 629 | ((or (and (eq side 'left) | ||
| 630 | (setq window (window-with-parameter 'window-side 'right nil t))) | ||
| 631 | (and (eq side 'top) | ||
| 632 | (setq window (window-with-parameter 'window-side 'bottom nil t)))) | ||
| 633 | (window-prev-sibling window)) | ||
| 634 | ((or (and (eq side 'right) | ||
| 635 | (setq window (window-with-parameter 'window-side 'left nil t))) | ||
| 636 | (and (eq side 'bottom) | ||
| 637 | (setq window (window-with-parameter 'window-side 'top nil t)))) | ||
| 638 | (window-next-sibling window)) | ||
| 639 | ((memq side '(left right)) | ||
| 640 | (cond | ||
| 641 | (window-sides-vertical | ||
| 642 | root) | ||
| 643 | ((setq window (window-with-parameter 'window-side 'top nil t)) | ||
| 644 | (window-next-sibling window)) | ||
| 645 | ((setq window (window-with-parameter 'window-side 'bottom nil t)) | ||
| 646 | (window-prev-sibling window)) | ||
| 647 | (t root))) | ||
| 648 | ((memq side '(top bottom)) | ||
| 649 | (cond | ||
| 650 | ((not window-sides-vertical) | ||
| 651 | root) | ||
| 652 | ((setq window (window-with-parameter 'window-side 'left nil t)) | ||
| 653 | (window-next-sibling window)) | ||
| 654 | ((setq window (window-with-parameter 'window-side 'right nil t)) | ||
| 655 | (window-prev-sibling window)) | ||
| 656 | (t root)))))) | ||
| 657 | |||
| 658 | (defun display-buffer-in-major-side-window (buffer side slot &optional alist) | ||
| 659 | "Display BUFFER in a new window on SIDE of the selected frame. | ||
| 660 | SIDE must be one of `left', `top', `right' or `bottom'. SLOT | ||
| 661 | specifies the slot to use. ALIST is an association list of | ||
| 662 | symbols and values as passed to `display-buffer-in-side-window'. | ||
| 663 | This function may be called only if no window on SIDE exists yet. | ||
| 664 | The new window automatically becomes the \"major\" side window on | ||
| 665 | SIDE. Return the new window, nil if its creation window failed." | ||
| 666 | (let* ((root (frame-root-window)) | ||
| 667 | (left-or-right (memq side '(left right))) | ||
| 668 | (size (or (assq 'size alist) | ||
| 669 | (/ (window-total-size (frame-root-window) left-or-right) | ||
| 670 | ;; By default use a fourth of the size of the | ||
| 671 | ;; frame's root window. This has to be made | ||
| 672 | ;; customizable via ALIST. | ||
| 673 | 4))) | ||
| 674 | (major (window--major-side-window side)) | ||
| 675 | (selected-window (selected-window)) | ||
| 676 | (on-side (cond | ||
| 677 | ((eq side 'top) 'above) | ||
| 678 | ((eq side 'bottom) 'below) | ||
| 679 | (t side))) | ||
| 680 | ;; The following two bindings will tell `split-window' to take | ||
| 681 | ;; the space for the new window from `major' and not make a new | ||
| 682 | ;; parent window unless needed. | ||
| 683 | (window-combination-resize 'side) | ||
| 684 | (window-combination-limit nil) | ||
| 685 | (new (split-window major (- size) on-side)) | ||
| 686 | fun) | ||
| 687 | (when new | ||
| 688 | ;; Initialize `window-side' parameter of new window to SIDE. | ||
| 689 | (set-window-parameter new 'window-side side) | ||
| 690 | ;; Install `window-slot' parameter of new window. | ||
| 691 | (set-window-parameter new 'window-slot slot) | ||
| 692 | ;; Install `delete-window' parameter thus making sure that when | ||
| 693 | ;; the new window is deleted, a side window on the opposite side | ||
| 694 | ;; does not get resized. | ||
| 695 | (set-window-parameter new 'delete-window 'delete-side-window) | ||
| 696 | ;; Install BUFFER in new window and return NEW. | ||
| 697 | (window--display-buffer buffer new 'window 'side)))) | ||
| 698 | |||
| 699 | (defun delete-side-window (window) | ||
| 700 | "Delete side window WINDOW." | ||
| 701 | (let ((window-combination-resize | ||
| 702 | (window-parameter (window-parent window) 'window-side)) | ||
| 703 | (ignore-window-parameters t)) | ||
| 704 | (delete-window window))) | ||
| 705 | |||
| 706 | (defun display-buffer-in-side-window (buffer alist) | ||
| 707 | "Display BUFFER in a window on side SIDE of the selected frame. | ||
| 708 | ALIST is an association list of symbols and values. The | ||
| 709 | following symbols can be used: | ||
| 710 | |||
| 711 | `side' denotes the side of the existing window where the new | ||
| 712 | window shall be located. Valid values are `bottom', `right', | ||
| 713 | `top' and `left'. The default is `bottom'. | ||
| 714 | |||
| 715 | `slot' if non-nil, specifies the window slot where to display | ||
| 716 | BUFFER. A value of zero or nil means use the middle slot on | ||
| 717 | the specified side. A negative value means use a slot | ||
| 718 | preceding (that is, above or on the left of) the middle slot. | ||
| 719 | A positive value means use a slot following (that is, below or | ||
| 720 | on the right of) the middle slot. The default is zero." | ||
| 721 | (let ((side (or (cdr (assq 'side alist)) 'bottom)) | ||
| 722 | (slot (or (cdr (assq 'slot alist)) 0)) | ||
| 723 | new) | ||
| 724 | (cond | ||
| 725 | ((not (memq side '(top bottom left right))) | ||
| 726 | (error "Invalid side %s specified" side)) | ||
| 727 | ((not (numberp slot)) | ||
| 728 | (error "Invalid slot %s specified" slot))) | ||
| 729 | |||
| 730 | (let* ((major (window-with-parameter 'window-side side nil t)) | ||
| 731 | ;; `major' is the major window on SIDE, `windows' the list of | ||
| 732 | ;; life windows on SIDE. | ||
| 733 | (windows | ||
| 734 | (when major | ||
| 735 | (let (windows) | ||
| 736 | (walk-window-tree | ||
| 737 | (lambda (window) | ||
| 738 | (when (eq (window-parameter window 'window-side) side) | ||
| 739 | (setq windows (cons window windows))))) | ||
| 740 | (nreverse windows)))) | ||
| 741 | (slots (when major (max 1 (window-child-count major)))) | ||
| 742 | (max-slots | ||
| 743 | (nth (cond | ||
| 744 | ((eq side 'left) 0) | ||
| 745 | ((eq side 'top) 1) | ||
| 746 | ((eq side 'right) 2) | ||
| 747 | ((eq side 'bottom) 3)) | ||
| 748 | window-sides-slots)) | ||
| 749 | (selected-window (selected-window)) | ||
| 750 | window this-window this-slot prev-window next-window | ||
| 751 | best-window best-slot abs-slot new-window) | ||
| 752 | |||
| 753 | (cond | ||
| 754 | ((and (numberp max-slots) (<= max-slots 0)) | ||
| 755 | ;; No side-slots available on this side. Don't create an error, | ||
| 756 | ;; just return nil. | ||
| 757 | nil) | ||
| 758 | ((not windows) | ||
| 759 | ;; No major window exists on this side, make one. | ||
| 760 | (display-buffer-in-major-side-window buffer side slot alist)) | ||
| 761 | (t | ||
| 762 | ;; Scan windows on SIDE. | ||
| 763 | (catch 'found | ||
| 764 | (dolist (window windows) | ||
| 765 | (setq this-slot (window-parameter window 'window-slot)) | ||
| 766 | (cond | ||
| 767 | ;; The following should not happen and probably be checked | ||
| 768 | ;; by window--side-check. | ||
| 769 | ((not (numberp this-slot))) | ||
| 770 | ((= this-slot slot) | ||
| 771 | ;; A window with a matching slot has been found. | ||
| 772 | (setq this-window window) | ||
| 773 | (throw 'found t)) | ||
| 774 | (t | ||
| 775 | ;; Check if this window has a better slot value wrt the | ||
| 776 | ;; slot of the window we want. | ||
| 777 | (setq abs-slot | ||
| 778 | (if (or (and (> this-slot 0) (> slot 0)) | ||
| 779 | (and (< this-slot 0) (< slot 0))) | ||
| 780 | (abs (- slot this-slot)) | ||
| 781 | (+ (abs slot) (abs this-slot)))) | ||
| 782 | (unless (and best-slot (<= best-slot abs-slot)) | ||
| 783 | (setq best-window window) | ||
| 784 | (setq best-slot abs-slot)) | ||
| 785 | (cond | ||
| 786 | ((<= this-slot slot) | ||
| 787 | (setq prev-window window)) | ||
| 788 | ((not next-window) | ||
| 789 | (setq next-window window))))))) | ||
| 790 | |||
| 791 | ;; `this-window' is the first window with the same SLOT. | ||
| 792 | ;; `prev-window' is the window with the largest slot < SLOT. A new | ||
| 793 | ;; window will be created after it. | ||
| 794 | ;; `next-window' is the window with the smallest slot > SLOT. A new | ||
| 795 | ;; window will be created before it. | ||
| 796 | ;; `best-window' is the window with the smallest absolute difference | ||
| 797 | ;; of its slot and SLOT. | ||
| 798 | |||
| 799 | ;; Note: We dedicate the window used softly to its buffer to | ||
| 800 | ;; avoid that "other" (non-side) buffer display functions steal | ||
| 801 | ;; it from us. This must eventually become customizable via | ||
| 802 | ;; ALIST (or, better, avoided in the "other" functions). | ||
| 803 | (or (and this-window | ||
| 804 | ;; Reuse `this-window'. | ||
| 805 | (window--display-buffer buffer this-window 'reuse 'side)) | ||
| 806 | (and (or (not max-slots) (< slots max-slots)) | ||
| 807 | (or (and next-window | ||
| 808 | ;; Make new window before `next-window'. | ||
| 809 | (let ((next-side | ||
| 810 | (if (memq side '(left right)) 'above 'left)) | ||
| 811 | (window-combination-resize 'side)) | ||
| 812 | (setq window (split-window next-window nil next-side)) | ||
| 813 | ;; When the new window is deleted, its space | ||
| 814 | ;; is returned to other side windows. | ||
| 815 | (set-window-parameter | ||
| 816 | window 'delete-window 'delete-side-window) | ||
| 817 | window)) | ||
| 818 | (and prev-window | ||
| 819 | ;; Make new window after `prev-window'. | ||
| 820 | (let ((prev-side | ||
| 821 | (if (memq side '(left right)) 'below 'right)) | ||
| 822 | (window-combination-resize 'side)) | ||
| 823 | (setq window (split-window prev-window nil prev-side)) | ||
| 824 | ;; When the new window is deleted, its space | ||
| 825 | ;; is returned to other side windows. | ||
| 826 | (set-window-parameter | ||
| 827 | window 'delete-window 'delete-side-window) | ||
| 828 | window))) | ||
| 829 | (set-window-parameter window 'window-slot slot) | ||
| 830 | (window--display-buffer buffer window 'window 'side)) | ||
| 831 | (and best-window | ||
| 832 | ;; Reuse `best-window'. | ||
| 833 | (progn | ||
| 834 | ;; Give best-window the new slot value. | ||
| 835 | (set-window-parameter best-window 'window-slot slot) | ||
| 836 | (window--display-buffer buffer best-window 'reuse 'side))))))))) | ||
| 837 | |||
| 430 | (defun window--side-check (&optional frame) | 838 | (defun window--side-check (&optional frame) |
| 431 | "Check the window-side parameter of all windows on FRAME. | 839 | "Check the side window configuration of FRAME. |
| 432 | FRAME defaults to the selected frame. If the configuration is | 840 | FRAME defaults to the selected frame. |
| 433 | invalid, reset all window-side parameters to nil. | 841 | |
| 434 | 842 | A valid side window configuration preserves the following two | |
| 435 | A valid configuration has to preserve the following invariant: | 843 | invariants: |
| 436 | 844 | ||
| 437 | - If a window has a non-nil window-side parameter, it must have a | 845 | - If there exists a window whose window-side parameter is |
| 438 | parent window and the parent window's window-side parameter | 846 | non-nil, there must exist at least one live window whose |
| 439 | must be either nil or the same as for window. | 847 | window-side parameter is nil. |
| 440 | 848 | ||
| 441 | - If windows with non-nil window-side parameters exist, there | 849 | - If a window W has a non-nil window-side parameter (i) it must |
| 442 | must be at most one window of each side and non-side with a | 850 | have a parent window and that parent's window-side parameter |
| 443 | parent whose window-side parameter is nil and there must be no | 851 | must be either nil or the same as for W, and (ii) any child |
| 444 | leaf window whose window-side parameter is nil." | 852 | window of W must have the same window-side parameter as W. |
| 445 | (let (normal none left top right bottom | 853 | |
| 446 | side parent parent-side) | 854 | If the configuration is invalid, reset the window-side parameters |
| 855 | of all windows on FRAME to nil." | ||
| 856 | (let (left top right bottom none side parent parent-side) | ||
| 447 | (when (or (catch 'reset | 857 | (when (or (catch 'reset |
| 448 | (walk-window-tree | 858 | (walk-window-tree |
| 449 | (lambda (window) | 859 | (lambda (window) |
| @@ -459,40 +869,34 @@ A valid configuration has to preserve the following invariant: | |||
| 459 | ;; A parent whose window-side is non-nil must | 869 | ;; A parent whose window-side is non-nil must |
| 460 | ;; have a child with the same window-side. | 870 | ;; have a child with the same window-side. |
| 461 | (throw 'reset t))) | 871 | (throw 'reset t))) |
| 462 | ;; Now check that there's more than one main window | 872 | ((not side) |
| 463 | ;; for any of none, left, top, right and bottom. | 873 | (when (window-buffer window) |
| 464 | ((eq side 'none) | 874 | ;; Record that we have at least one non-side, |
| 465 | (if none | 875 | ;; live window. |
| 466 | (throw 'reset t) | ||
| 467 | (setq none t))) | 876 | (setq none t))) |
| 877 | ((if (memq side '(left top)) | ||
| 878 | (window-prev-sibling window) | ||
| 879 | (window-next-sibling window)) | ||
| 880 | ;; Left and top major side windows must not have a | ||
| 881 | ;; previous sibling, right and bottom major side | ||
| 882 | ;; windows must not have a next sibling. | ||
| 883 | (throw 'reset t)) | ||
| 884 | ;; Now check that there's no more than one major | ||
| 885 | ;; window for any of left, top, right and bottom. | ||
| 468 | ((eq side 'left) | 886 | ((eq side 'left) |
| 469 | (if left | 887 | (if left (throw 'reset t) (setq left t))) |
| 470 | (throw 'reset t) | ||
| 471 | (setq left t))) | ||
| 472 | ((eq side 'top) | 888 | ((eq side 'top) |
| 473 | (if top | 889 | (if top (throw 'reset t) (setq top t))) |
| 474 | (throw 'reset t) | ||
| 475 | (setq top t))) | ||
| 476 | ((eq side 'right) | 890 | ((eq side 'right) |
| 477 | (if right | 891 | (if right (throw 'reset t) (setq right t))) |
| 478 | (throw 'reset t) | ||
| 479 | (setq right t))) | ||
| 480 | ((eq side 'bottom) | 892 | ((eq side 'bottom) |
| 481 | (if bottom | 893 | (if bottom (throw 'reset t) (setq bottom t))) |
| 482 | (throw 'reset t) | 894 | (t |
| 483 | (setq bottom t))) | 895 | (throw 'reset t)))) |
| 484 | ((window-buffer window) | ||
| 485 | ;; A leaf window without window-side parameter, | ||
| 486 | ;; record its existence. | ||
| 487 | (setq normal t)))) | ||
| 488 | frame t)) | 896 | frame t)) |
| 489 | (if none | 897 | ;; If there's a side window, there must be at least one |
| 490 | ;; At least one non-side window exists, so there must | 898 | ;; non-side window. |
| 491 | ;; be at least one side-window and no normal window. | 899 | (and (or left top right bottom) (not none))) |
| 492 | (or (not (or left top right bottom)) normal) | ||
| 493 | ;; No non-side window exists, so there must be no side | ||
| 494 | ;; window either. | ||
| 495 | (or left top right bottom))) | ||
| 496 | (walk-window-tree | 900 | (walk-window-tree |
| 497 | (lambda (window) | 901 | (lambda (window) |
| 498 | (set-window-parameter window 'window-side nil)) | 902 | (set-window-parameter window 'window-side nil)) |
| @@ -516,7 +920,7 @@ unless it has no other choice (like when deleting a neighboring | |||
| 516 | window).") | 920 | window).") |
| 517 | (make-variable-buffer-local 'window-size-fixed) | 921 | (make-variable-buffer-local 'window-size-fixed) |
| 518 | 922 | ||
| 519 | (defun window--size-ignore (window ignore) | 923 | (defun window--size-ignore-p (window ignore) |
| 520 | "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." | 924 | "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." |
| 521 | (if (window-valid-p ignore) (eq window ignore) ignore)) | 925 | (if (window-valid-p ignore) (eq window ignore) ignore)) |
| 522 | 926 | ||
| @@ -559,7 +963,7 @@ means ignore all of the above restrictions for all windows." | |||
| 559 | value) | 963 | value) |
| 560 | (with-current-buffer (window-buffer window) | 964 | (with-current-buffer (window-buffer window) |
| 561 | (cond | 965 | (cond |
| 562 | ((and (not (window--size-ignore window ignore)) | 966 | ((and (not (window--size-ignore-p window ignore)) |
| 563 | (window-size-fixed-p window horizontal)) | 967 | (window-size-fixed-p window horizontal)) |
| 564 | ;; The minimum size of a fixed size window is its size. | 968 | ;; The minimum size of a fixed size window is its size. |
| 565 | (window-total-size window horizontal)) | 969 | (window-total-size window horizontal)) |
| @@ -588,7 +992,7 @@ means ignore all of the above restrictions for all windows." | |||
| 588 | (ceiling (or (frame-parameter frame 'scroll-bar-width) 14) | 992 | (ceiling (or (frame-parameter frame 'scroll-bar-width) 14) |
| 589 | (frame-char-width))) | 993 | (frame-char-width))) |
| 590 | (t 0))) | 994 | (t 0))) |
| 591 | (if (and (not (window--size-ignore window ignore)) | 995 | (if (and (not (window--size-ignore-p window ignore)) |
| 592 | (numberp window-min-width)) | 996 | (numberp window-min-width)) |
| 593 | window-min-width | 997 | window-min-width |
| 594 | 0)))) | 998 | 0)))) |
| @@ -598,7 +1002,7 @@ means ignore all of the above restrictions for all windows." | |||
| 598 | (max (+ window-safe-min-height | 1002 | (max (+ window-safe-min-height |
| 599 | (if header-line-format 1 0) | 1003 | (if header-line-format 1 0) |
| 600 | (if mode-line-format 1 0)) | 1004 | (if mode-line-format 1 0)) |
| 601 | (if (and (not (window--size-ignore window ignore)) | 1005 | (if (and (not (window--size-ignore-p window ignore)) |
| 602 | (numberp window-min-height)) | 1006 | (numberp window-min-height)) |
| 603 | window-min-height | 1007 | window-min-height |
| 604 | 0)))))))) | 1008 | 0)))))))) |
| @@ -637,7 +1041,7 @@ ignore all of the above restrictions for all windows." | |||
| 637 | (max (- (window-min-size window horizontal ignore) | 1041 | (max (- (window-min-size window horizontal ignore) |
| 638 | (window-total-size window horizontal)) | 1042 | (window-total-size window horizontal)) |
| 639 | delta)) | 1043 | delta)) |
| 640 | ((window--size-ignore window ignore) | 1044 | ((window--size-ignore-p window ignore) |
| 641 | delta) | 1045 | delta) |
| 642 | ((> delta 0) | 1046 | ((> delta 0) |
| 643 | (if (window-size-fixed-p window horizontal) | 1047 | (if (window-size-fixed-p window horizontal) |
| @@ -719,7 +1123,7 @@ WINDOW can be resized in the desired direction. The function | |||
| 719 | ((eq sub window) | 1123 | ((eq sub window) |
| 720 | (setq skip (eq trail 'before))) | 1124 | (setq skip (eq trail 'before))) |
| 721 | (skip) | 1125 | (skip) |
| 722 | ((and (not (window--size-ignore window ignore)) | 1126 | ((and (not (window--size-ignore-p window ignore)) |
| 723 | (window-size-fixed-p sub horizontal))) | 1127 | (window-size-fixed-p sub horizontal))) |
| 724 | (t | 1128 | (t |
| 725 | ;; We found a non-fixed-size child window. | 1129 | ;; We found a non-fixed-size child window. |
| @@ -809,7 +1213,7 @@ at least one other window can be enlarged appropriately." | |||
| 809 | ;; child window is fixed-size. | 1213 | ;; child window is fixed-size. |
| 810 | (while sub | 1214 | (while sub |
| 811 | (when (and (not (eq sub window)) | 1215 | (when (and (not (eq sub window)) |
| 812 | (not (window--size-ignore sub ignore)) | 1216 | (not (window--size-ignore-p sub ignore)) |
| 813 | (window-size-fixed-p sub horizontal)) | 1217 | (window-size-fixed-p sub horizontal)) |
| 814 | (throw 'fixed delta)) | 1218 | (throw 'fixed delta)) |
| 815 | (setq sub (window-right sub)))) | 1219 | (setq sub (window-right sub)))) |
| @@ -849,7 +1253,7 @@ Optional argument NODOWN non-nil means do not check whether | |||
| 849 | WINDOW itself (and its child windows) can be enlarged; check | 1253 | WINDOW itself (and its child windows) can be enlarged; check |
| 850 | only whether other windows can be shrunk appropriately." | 1254 | only whether other windows can be shrunk appropriately." |
| 851 | (setq window (window-normalize-window window)) | 1255 | (setq window (window-normalize-window window)) |
| 852 | (if (and (not (window--size-ignore window ignore)) | 1256 | (if (and (not (window--size-ignore-p window ignore)) |
| 853 | (not nodown) (window-size-fixed-p window horizontal)) | 1257 | (not nodown) (window-size-fixed-p window horizontal)) |
| 854 | ;; With IGNORE and NOWDON nil return zero if WINDOW has fixed | 1258 | ;; With IGNORE and NOWDON nil return zero if WINDOW has fixed |
| 855 | ;; size. | 1259 | ;; size. |
| @@ -1062,32 +1466,6 @@ windows nor the buffer list." | |||
| 1062 | (dolist (walk-windows-window (window-list-1 nil minibuf all-frames)) | 1466 | (dolist (walk-windows-window (window-list-1 nil minibuf all-frames)) |
| 1063 | (funcall fun walk-windows-window)))) | 1467 | (funcall fun walk-windows-window)))) |
| 1064 | 1468 | ||
| 1065 | (defun window-point-1 (&optional window) | ||
| 1066 | "Return value of WINDOW's point. | ||
| 1067 | WINDOW can be any live window and defaults to the selected one. | ||
| 1068 | |||
| 1069 | This function is like `window-point' with one exception: If | ||
| 1070 | WINDOW is selected, it returns the value of `point' of WINDOW's | ||
| 1071 | buffer regardless of whether that buffer is current or not." | ||
| 1072 | (setq window (window-normalize-window window t)) | ||
| 1073 | (if (eq window (selected-window)) | ||
| 1074 | (with-current-buffer (window-buffer window) | ||
| 1075 | (point)) | ||
| 1076 | (window-point window))) | ||
| 1077 | |||
| 1078 | (defun set-window-point-1 (window pos) | ||
| 1079 | "Set value of WINDOW's point to POS. | ||
| 1080 | WINDOW can be any live window and defaults to the selected one. | ||
| 1081 | |||
| 1082 | This function is like `set-window-point' with one exception: If | ||
| 1083 | WINDOW is selected, it moves `point' of WINDOW's buffer to POS | ||
| 1084 | regardless of whether that buffer is current or not." | ||
| 1085 | (setq window (window-normalize-window window t)) | ||
| 1086 | (if (eq window (selected-window)) | ||
| 1087 | (with-current-buffer (window-buffer window) | ||
| 1088 | (goto-char pos)) | ||
| 1089 | (set-window-point window pos))) | ||
| 1090 | |||
| 1091 | (defun window-at-side-p (&optional window side) | 1469 | (defun window-at-side-p (&optional window side) |
| 1092 | "Return t if WINDOW is at SIDE of its containing frame. | 1470 | "Return t if WINDOW is at SIDE of its containing frame. |
| 1093 | WINDOW must be a valid window and defaults to the selected one. | 1471 | WINDOW must be a valid window and defaults to the selected one. |
| @@ -1114,7 +1492,7 @@ SIDE can be any of the symbols `left', `top', `right' or | |||
| 1114 | (lambda (window) | 1492 | (lambda (window) |
| 1115 | (when (window-at-side-p window side) | 1493 | (when (window-at-side-p window side) |
| 1116 | (setq windows (cons window windows)))) | 1494 | (setq windows (cons window windows)))) |
| 1117 | frame) | 1495 | frame nil 'nomini) |
| 1118 | (nreverse windows))) | 1496 | (nreverse windows))) |
| 1119 | 1497 | ||
| 1120 | (defun window--in-direction-2 (window posn &optional horizontal) | 1498 | (defun window--in-direction-2 (window posn &optional horizontal) |
| @@ -1129,12 +1507,25 @@ SIDE can be any of the symbols `left', `top', `right' or | |||
| 1129 | (- left posn) | 1507 | (- left posn) |
| 1130 | (- posn left (window-total-width window)))))) | 1508 | (- posn left (window-total-width window)))))) |
| 1131 | 1509 | ||
| 1510 | ;; Predecessors to the below have been devised by Julian Assange in | ||
| 1511 | ;; change-windows-intuitively.el and Hovav Shacham in windmove.el. | ||
| 1512 | ;; Neither of these allow to selectively ignore specific windows | ||
| 1513 | ;; (windows whose `no-other-window' parameter is non-nil) as targets of | ||
| 1514 | ;; the movement. | ||
| 1132 | (defun window-in-direction (direction &optional window ignore) | 1515 | (defun window-in-direction (direction &optional window ignore) |
| 1133 | "Return window in DIRECTION as seen from WINDOW. | 1516 | "Return window in DIRECTION as seen from WINDOW. |
| 1517 | More precisely, return the nearest window in direction DIRECTION | ||
| 1518 | as seen from the position of `window-point' in window WINDOW. | ||
| 1134 | DIRECTION must be one of `above', `below', `left' or `right'. | 1519 | DIRECTION must be one of `above', `below', `left' or `right'. |
| 1135 | WINDOW must be a live window and defaults to the selected one. | 1520 | WINDOW must be a live window and defaults to the selected one. |
| 1136 | IGNORE non-nil means a window can be returned even if its | 1521 | |
| 1137 | `no-other-window' parameter is non-nil." | 1522 | Do not return a window whose `no-other-window' parameter is |
| 1523 | non-nil. If the nearest window's `no-other-window' parameter is | ||
| 1524 | non-nil, try to find another window in the indicated direction. | ||
| 1525 | If, however, the optional argument IGNORE is non-nil, return that | ||
| 1526 | window even if its `no-other-window' parameter is non-nil. | ||
| 1527 | |||
| 1528 | Return nil if no suitable window can be found." | ||
| 1138 | (setq window (window-normalize-window window t)) | 1529 | (setq window (window-normalize-window window t)) |
| 1139 | (unless (memq direction '(above below left right)) | 1530 | (unless (memq direction '(above below left right)) |
| 1140 | (error "Wrong direction %s" direction)) | 1531 | (error "Wrong direction %s" direction)) |
| @@ -1146,7 +1537,7 @@ IGNORE non-nil means a window can be returned even if its | |||
| 1146 | (last (+ first (if hor | 1537 | (last (+ first (if hor |
| 1147 | (window-total-width window) | 1538 | (window-total-width window) |
| 1148 | (window-total-height window)))) | 1539 | (window-total-height window)))) |
| 1149 | (posn-cons (nth 6 (posn-at-point (window-point-1 window) window))) | 1540 | (posn-cons (nth 6 (posn-at-point (window-point window) window))) |
| 1150 | ;; The column / row value of `posn-at-point' can be nil for the | 1541 | ;; The column / row value of `posn-at-point' can be nil for the |
| 1151 | ;; mini-window, guard against that. | 1542 | ;; mini-window, guard against that. |
| 1152 | (posn (if hor | 1543 | (posn (if hor |
| @@ -1221,7 +1612,7 @@ IGNORE non-nil means a window can be returned even if its | |||
| 1221 | (setq best-edge-2 w-top) | 1612 | (setq best-edge-2 w-top) |
| 1222 | (setq best-diff-2 best-diff-2-new) | 1613 | (setq best-diff-2 best-diff-2-new) |
| 1223 | (setq best-2 w))))))) | 1614 | (setq best-2 w))))))) |
| 1224 | (window-frame window)) | 1615 | frame) |
| 1225 | (or best best-2))) | 1616 | (or best best-2))) |
| 1226 | 1617 | ||
| 1227 | (defun get-window-with-predicate (predicate &optional minibuf all-frames default) | 1618 | (defun get-window-with-predicate (predicate &optional minibuf all-frames default) |
| @@ -1865,7 +2256,7 @@ preferably only resize windows adjacent to EDGE." | |||
| 1865 | ;; Make sure this sibling is left alone when | 2256 | ;; Make sure this sibling is left alone when |
| 1866 | ;; resizing its siblings. | 2257 | ;; resizing its siblings. |
| 1867 | (set-window-new-normal sub 'ignore)) | 2258 | (set-window-new-normal sub 'ignore)) |
| 1868 | ((or (window--size-ignore sub ignore) | 2259 | ((or (window--size-ignore-p sub ignore) |
| 1869 | (not (window-size-fixed-p sub horizontal))) | 2260 | (not (window-size-fixed-p sub horizontal))) |
| 1870 | ;; Set this-delta to t to signal that we found a sibling | 2261 | ;; Set this-delta to t to signal that we found a sibling |
| 1871 | ;; of WINDOW whose size is not fixed. | 2262 | ;; of WINDOW whose size is not fixed. |
| @@ -2387,8 +2778,7 @@ Return `frame' if deleting WINDOW should also delete its frame." | |||
| 2387 | (when (window-parameter window 'window-atom) | 2778 | (when (window-parameter window 'window-atom) |
| 2388 | (setq window (window-atom-root window)))) | 2779 | (setq window (window-atom-root window)))) |
| 2389 | 2780 | ||
| 2390 | (let ((parent (window-parent window)) | 2781 | (let ((frame (window-frame window))) |
| 2391 | (frame (window-frame window))) | ||
| 2392 | (cond | 2782 | (cond |
| 2393 | ((frame-root-window-p window) | 2783 | ((frame-root-window-p window) |
| 2394 | ;; WINDOW's frame can be deleted only if there are other frames | 2784 | ;; WINDOW's frame can be deleted only if there are other frames |
| @@ -2399,10 +2789,9 @@ Return `frame' if deleting WINDOW should also delete its frame." | |||
| 2399 | (and minibuf (eq frame (window-frame minibuf))))) | 2789 | (and minibuf (eq frame (window-frame minibuf))))) |
| 2400 | 'frame)) | 2790 | 'frame)) |
| 2401 | ((or ignore-window-parameters | 2791 | ((or ignore-window-parameters |
| 2402 | (not (eq (window-parameter window 'window-side) 'none)) | 2792 | (not (eq window (window--major-non-side-window frame)))) |
| 2403 | (and parent (eq (window-parameter parent 'window-side) 'none))) | 2793 | ;; WINDOW can be deleted unless it is the major non-side window of |
| 2404 | ;; WINDOW can be deleted unless it is the main window of its | 2794 | ;; its frame. |
| 2405 | ;; frame. | ||
| 2406 | t)))) | 2795 | t)))) |
| 2407 | 2796 | ||
| 2408 | (defun window--in-subtree-p (window root) | 2797 | (defun window--in-subtree-p (window root) |
| @@ -2453,13 +2842,13 @@ that is its frame's root window." | |||
| 2453 | ((and (window-parameter window 'window-atom) | 2842 | ((and (window-parameter window 'window-atom) |
| 2454 | (setq atom-root (window-atom-root window)) | 2843 | (setq atom-root (window-atom-root window)) |
| 2455 | (not (eq atom-root window))) | 2844 | (not (eq atom-root window))) |
| 2456 | (throw 'done (delete-window atom-root))) | 2845 | (if (eq atom-root (frame-root-window frame)) |
| 2457 | ((and (eq (window-parameter window 'window-side) 'none) | 2846 | (error "Root of atomic window is root window of its frame") |
| 2458 | (or (not parent) | 2847 | (throw 'done (delete-window atom-root)))) |
| 2459 | (not (eq (window-parameter parent 'window-side) 'none)))) | ||
| 2460 | (error "Attempt to delete last non-side window")) | ||
| 2461 | ((not parent) | 2848 | ((not parent) |
| 2462 | (error "Attempt to delete minibuffer or sole ordinary window"))) | 2849 | (error "Attempt to delete minibuffer or sole ordinary window")) |
| 2850 | ((eq window (window--major-non-side-window frame)) | ||
| 2851 | (error "Attempt to delete last non-side window"))) | ||
| 2463 | 2852 | ||
| 2464 | (let* ((horizontal (window-left-child parent)) | 2853 | (let* ((horizontal (window-left-child parent)) |
| 2465 | (size (window-total-size window horizontal)) | 2854 | (size (window-total-size window horizontal)) |
| @@ -2533,13 +2922,19 @@ window signal an error." | |||
| 2533 | ((and (window-parameter window 'window-atom) | 2922 | ((and (window-parameter window 'window-atom) |
| 2534 | (setq atom-root (window-atom-root window)) | 2923 | (setq atom-root (window-atom-root window)) |
| 2535 | (not (eq atom-root window))) | 2924 | (not (eq atom-root window))) |
| 2536 | (throw 'done (delete-other-windows atom-root))) | 2925 | (if (eq atom-root (frame-root-window frame)) |
| 2537 | ((eq window-side 'none) | 2926 | (error "Root of atomic window is root window of its frame") |
| 2538 | ;; Set side-main to the major non-side window. | 2927 | (throw 'done (delete-other-windows atom-root)))) |
| 2539 | (setq side-main (window-with-parameter 'window-side 'none frame t))) | ||
| 2540 | ((memq window-side window-sides) | 2928 | ((memq window-side window-sides) |
| 2541 | (error "Cannot make side window the only window"))) | 2929 | (error "Cannot make side window the only window")) |
| 2542 | ;; If WINDOW is the main non-side window, do nothing. | 2930 | ((and (window-minibuffer-p window) |
| 2931 | (not (eq window (frame-root-window window)))) | ||
| 2932 | (error "Can't expand minibuffer to full frame"))) | ||
| 2933 | |||
| 2934 | ;; If WINDOW is the major non-side window, do nothing. | ||
| 2935 | (if (window-with-parameter 'window-side) | ||
| 2936 | (setq side-main (window--major-non-side-window frame)) | ||
| 2937 | (setq side-main (frame-root-window frame))) | ||
| 2543 | (unless (eq window side-main) | 2938 | (unless (eq window side-main) |
| 2544 | (delete-other-windows-internal window side-main) | 2939 | (delete-other-windows-internal window side-main) |
| 2545 | (run-window-configuration-change-hook frame) | 2940 | (run-window-configuration-change-hook frame) |
| @@ -2613,7 +3008,7 @@ WINDOW must be a live window and defaults to the selected one." | |||
| 2613 | ;; Add an entry for buffer to WINDOW's previous buffers. | 3008 | ;; Add an entry for buffer to WINDOW's previous buffers. |
| 2614 | (with-current-buffer buffer | 3009 | (with-current-buffer buffer |
| 2615 | (let ((start (window-start window)) | 3010 | (let ((start (window-start window)) |
| 2616 | (point (window-point-1 window))) | 3011 | (point (window-point window))) |
| 2617 | (setq entry | 3012 | (setq entry |
| 2618 | (cons buffer | 3013 | (cons buffer |
| 2619 | (if entry | 3014 | (if entry |
| @@ -2657,7 +3052,7 @@ before was current this also makes BUFFER the current buffer." | |||
| 2657 | ;; Don't force window-start here (even if POINT is nil). | 3052 | ;; Don't force window-start here (even if POINT is nil). |
| 2658 | (set-window-start window start t)) | 3053 | (set-window-start window start t)) |
| 2659 | (when point | 3054 | (when point |
| 2660 | (set-window-point-1 window point)))) | 3055 | (set-window-point window point)))) |
| 2661 | 3056 | ||
| 2662 | (defcustom switch-to-visible-buffer t | 3057 | (defcustom switch-to-visible-buffer t |
| 2663 | "If non-nil, allow switching to an already visible buffer. | 3058 | "If non-nil, allow switching to an already visible buffer. |
| @@ -2679,32 +3074,47 @@ found. | |||
| 2679 | 3074 | ||
| 2680 | Optional argument BURY-OR-KILL non-nil means the buffer currently | 3075 | Optional argument BURY-OR-KILL non-nil means the buffer currently |
| 2681 | shown in WINDOW is about to be buried or killed and consequently | 3076 | shown in WINDOW is about to be buried or killed and consequently |
| 2682 | shall not be switched to in future invocations of this command." | 3077 | shall not be switched to in future invocations of this command. |
| 3078 | |||
| 3079 | As a special case, if BURY-OR-KILL equals `append', this means to | ||
| 3080 | move the buffer to the end of WINDOW's previous buffers list so a | ||
| 3081 | future invocation of `switch-to-prev-buffer' less likely switches | ||
| 3082 | to it." | ||
| 2683 | (interactive) | 3083 | (interactive) |
| 2684 | (let* ((window (window-normalize-window window t)) | 3084 | (let* ((window (window-normalize-window window t)) |
| 2685 | (frame (window-frame window)) | 3085 | (frame (window-frame window)) |
| 2686 | (old-buffer (window-buffer window)) | 3086 | (old-buffer (window-buffer window)) |
| 2687 | ;; Save this since it's destroyed by `set-window-buffer'. | 3087 | ;; Save this since it's destroyed by `set-window-buffer'. |
| 2688 | (next-buffers (window-next-buffers window)) | 3088 | (next-buffers (window-next-buffers window)) |
| 2689 | entry buffer new-buffer killed-buffers visible) | 3089 | (pred (frame-parameter frame 'buffer-predicate)) |
| 3090 | entry new-buffer killed-buffers visible) | ||
| 3091 | (when (window-minibuffer-p window) | ||
| 3092 | ;; Don't switch in minibuffer window. | ||
| 3093 | (unless (setq window (minibuffer-selected-window)) | ||
| 3094 | (error "Window %s is a minibuffer window" window))) | ||
| 3095 | |||
| 2690 | (when (window-dedicated-p window) | 3096 | (when (window-dedicated-p window) |
| 3097 | ;; Don't switch in dedicated window. | ||
| 2691 | (error "Window %s is dedicated to buffer %s" window old-buffer)) | 3098 | (error "Window %s is dedicated to buffer %s" window old-buffer)) |
| 2692 | 3099 | ||
| 2693 | (catch 'found | 3100 | (catch 'found |
| 2694 | ;; Scan WINDOW's previous buffers first, skipping entries of next | 3101 | ;; Scan WINDOW's previous buffers first, skipping entries of next |
| 2695 | ;; buffers. | 3102 | ;; buffers. |
| 2696 | (dolist (entry (window-prev-buffers window)) | 3103 | (dolist (entry (window-prev-buffers window)) |
| 2697 | (when (and (setq buffer (car entry)) | 3104 | (when (and (setq new-buffer (car entry)) |
| 2698 | (or (buffer-live-p buffer) | 3105 | (or (buffer-live-p new-buffer) |
| 2699 | (not (setq killed-buffers | 3106 | (not (setq killed-buffers |
| 2700 | (cons buffer killed-buffers)))) | 3107 | (cons new-buffer killed-buffers)))) |
| 2701 | (not (eq buffer old-buffer)) | 3108 | (not (eq new-buffer old-buffer)) |
| 2702 | (or bury-or-kill (not (memq buffer next-buffers)))) | 3109 | (or (null pred) (funcall pred new-buffer)) |
| 3110 | ;; When BURY-OR-KILL is nil, avoid switching to a | ||
| 3111 | ;; buffer in WINDOW's next buffers list. | ||
| 3112 | (or bury-or-kill (not (memq new-buffer next-buffers)))) | ||
| 2703 | (if (and (not switch-to-visible-buffer) | 3113 | (if (and (not switch-to-visible-buffer) |
| 2704 | (get-buffer-window buffer frame)) | 3114 | (get-buffer-window new-buffer frame)) |
| 2705 | ;; Try to avoid showing a buffer visible in some other window. | 3115 | ;; Try to avoid showing a buffer visible in some other |
| 2706 | (setq visible buffer) | 3116 | ;; window. |
| 2707 | (setq new-buffer buffer) | 3117 | (setq visible new-buffer) |
| 2708 | (set-window-buffer-start-and-point | 3118 | (set-window-buffer-start-and-point |
| 2709 | window new-buffer (nth 1 entry) (nth 2 entry)) | 3119 | window new-buffer (nth 1 entry) (nth 2 entry)) |
| 2710 | (throw 'found t)))) | 3120 | (throw 'found t)))) |
| @@ -2719,6 +3129,7 @@ shall not be switched to in future invocations of this command." | |||
| 2719 | (nreverse (buffer-list frame)))) | 3129 | (nreverse (buffer-list frame)))) |
| 2720 | (when (and (buffer-live-p buffer) | 3130 | (when (and (buffer-live-p buffer) |
| 2721 | (not (eq buffer old-buffer)) | 3131 | (not (eq buffer old-buffer)) |
| 3132 | (or (null pred) (funcall pred buffer)) | ||
| 2722 | (not (eq (aref (buffer-name buffer) 0) ?\s)) | 3133 | (not (eq (aref (buffer-name buffer) 0) ?\s)) |
| 2723 | (or bury-or-kill (not (memq buffer next-buffers)))) | 3134 | (or bury-or-kill (not (memq buffer next-buffers)))) |
| 2724 | (if (get-buffer-window buffer frame) | 3135 | (if (get-buffer-window buffer frame) |
| @@ -2738,6 +3149,7 @@ shall not be switched to in future invocations of this command." | |||
| 2738 | (not (setq killed-buffers | 3149 | (not (setq killed-buffers |
| 2739 | (cons buffer killed-buffers)))) | 3150 | (cons buffer killed-buffers)))) |
| 2740 | (not (eq buffer old-buffer)) | 3151 | (not (eq buffer old-buffer)) |
| 3152 | (or (null pred) (funcall pred buffer)) | ||
| 2741 | (setq entry (assq buffer (window-prev-buffers window)))) | 3153 | (setq entry (assq buffer (window-prev-buffers window)))) |
| 2742 | (setq new-buffer buffer) | 3154 | (setq new-buffer buffer) |
| 2743 | (set-window-buffer-start-and-point | 3155 | (set-window-buffer-start-and-point |
| @@ -2750,12 +3162,20 @@ shall not be switched to in future invocations of this command." | |||
| 2750 | (set-window-buffer-start-and-point window new-buffer))) | 3162 | (set-window-buffer-start-and-point window new-buffer))) |
| 2751 | 3163 | ||
| 2752 | (if bury-or-kill | 3164 | (if bury-or-kill |
| 2753 | ;; Remove `old-buffer' from WINDOW's previous and (restored list | 3165 | (let ((entry (and (eq bury-or-kill 'append) |
| 2754 | ;; of) next buffers. | 3166 | (assq old-buffer (window-prev-buffers window))))) |
| 2755 | (progn | 3167 | ;; Remove `old-buffer' from WINDOW's previous and (restored list |
| 3168 | ;; of) next buffers. | ||
| 2756 | (set-window-prev-buffers | 3169 | (set-window-prev-buffers |
| 2757 | window (assq-delete-all old-buffer (window-prev-buffers window))) | 3170 | window (assq-delete-all old-buffer (window-prev-buffers window))) |
| 2758 | (set-window-next-buffers window (delq old-buffer next-buffers))) | 3171 | (set-window-next-buffers window (delq old-buffer next-buffers)) |
| 3172 | (when entry | ||
| 3173 | ;; Append old-buffer's entry to list of WINDOW's previous | ||
| 3174 | ;; buffers so it's less likely to get switched to soon but | ||
| 3175 | ;; `display-buffer-in-previous-window' can nevertheless find | ||
| 3176 | ;; it. | ||
| 3177 | (set-window-prev-buffers | ||
| 3178 | window (append (window-prev-buffers window) (list entry))))) | ||
| 2759 | ;; Move `old-buffer' to head of WINDOW's restored list of next | 3179 | ;; Move `old-buffer' to head of WINDOW's restored list of next |
| 2760 | ;; buffers. | 3180 | ;; buffers. |
| 2761 | (set-window-next-buffers | 3181 | (set-window-next-buffers |
| @@ -2782,8 +3202,15 @@ found." | |||
| 2782 | (frame (window-frame window)) | 3202 | (frame (window-frame window)) |
| 2783 | (old-buffer (window-buffer window)) | 3203 | (old-buffer (window-buffer window)) |
| 2784 | (next-buffers (window-next-buffers window)) | 3204 | (next-buffers (window-next-buffers window)) |
| 2785 | buffer new-buffer entry killed-buffers visible) | 3205 | (pred (frame-parameter frame 'buffer-predicate)) |
| 3206 | new-buffer entry killed-buffers visible) | ||
| 3207 | (when (window-minibuffer-p window) | ||
| 3208 | ;; Don't switch in minibuffer window. | ||
| 3209 | (unless (setq window (minibuffer-selected-window)) | ||
| 3210 | (error "Window %s is a minibuffer window" window))) | ||
| 3211 | |||
| 2786 | (when (window-dedicated-p window) | 3212 | (when (window-dedicated-p window) |
| 3213 | ;; Don't switch in dedicated window. | ||
| 2787 | (error "Window %s is dedicated to buffer %s" window old-buffer)) | 3214 | (error "Window %s is dedicated to buffer %s" window old-buffer)) |
| 2788 | 3215 | ||
| 2789 | (catch 'found | 3216 | (catch 'found |
| @@ -2793,6 +3220,7 @@ found." | |||
| 2793 | (not (setq killed-buffers | 3220 | (not (setq killed-buffers |
| 2794 | (cons buffer killed-buffers)))) | 3221 | (cons buffer killed-buffers)))) |
| 2795 | (not (eq buffer old-buffer)) | 3222 | (not (eq buffer old-buffer)) |
| 3223 | (or (null pred) (funcall pred buffer)) | ||
| 2796 | (setq entry (assq buffer (window-prev-buffers window)))) | 3224 | (setq entry (assq buffer (window-prev-buffers window)))) |
| 2797 | (setq new-buffer buffer) | 3225 | (setq new-buffer buffer) |
| 2798 | (set-window-buffer-start-and-point | 3226 | (set-window-buffer-start-and-point |
| @@ -2801,7 +3229,9 @@ found." | |||
| 2801 | ;; Scan the buffer list of WINDOW's frame next, skipping previous | 3229 | ;; Scan the buffer list of WINDOW's frame next, skipping previous |
| 2802 | ;; buffers entries. | 3230 | ;; buffers entries. |
| 2803 | (dolist (buffer (buffer-list frame)) | 3231 | (dolist (buffer (buffer-list frame)) |
| 2804 | (when (and (buffer-live-p buffer) (not (eq buffer old-buffer)) | 3232 | (when (and (buffer-live-p buffer) |
| 3233 | (not (eq buffer old-buffer)) | ||
| 3234 | (or (null pred) (funcall pred buffer)) | ||
| 2805 | (not (eq (aref (buffer-name buffer) 0) ?\s)) | 3235 | (not (eq (aref (buffer-name buffer) 0) ?\s)) |
| 2806 | (not (assq buffer (window-prev-buffers window)))) | 3236 | (not (assq buffer (window-prev-buffers window)))) |
| 2807 | (if (get-buffer-window buffer frame) | 3237 | (if (get-buffer-window buffer frame) |
| @@ -2813,17 +3243,17 @@ found." | |||
| 2813 | ;; Scan WINDOW's reverted previous buffers last (must not use | 3243 | ;; Scan WINDOW's reverted previous buffers last (must not use |
| 2814 | ;; nreverse here!) | 3244 | ;; nreverse here!) |
| 2815 | (dolist (entry (reverse (window-prev-buffers window))) | 3245 | (dolist (entry (reverse (window-prev-buffers window))) |
| 2816 | (when (and (setq buffer (car entry)) | 3246 | (when (and (setq new-buffer (car entry)) |
| 2817 | (or (buffer-live-p buffer) | 3247 | (or (buffer-live-p new-buffer) |
| 2818 | (not (setq killed-buffers | 3248 | (not (setq killed-buffers |
| 2819 | (cons buffer killed-buffers)))) | 3249 | (cons new-buffer killed-buffers)))) |
| 2820 | (not (eq buffer old-buffer))) | 3250 | (not (eq new-buffer old-buffer)) |
| 3251 | (or (null pred) (funcall pred new-buffer))) | ||
| 2821 | (if (and (not switch-to-visible-buffer) | 3252 | (if (and (not switch-to-visible-buffer) |
| 2822 | (get-buffer-window buffer frame)) | 3253 | (get-buffer-window new-buffer frame)) |
| 2823 | ;; Try to avoid showing a buffer visible in some other window. | 3254 | ;; Try to avoid showing a buffer visible in some other window. |
| 2824 | (unless visible | 3255 | (unless visible |
| 2825 | (setq visible buffer)) | 3256 | (setq visible new-buffer)) |
| 2826 | (setq new-buffer buffer) | ||
| 2827 | (set-window-buffer-start-and-point | 3257 | (set-window-buffer-start-and-point |
| 2828 | window new-buffer (nth 1 entry) (nth 2 entry)) | 3258 | window new-buffer (nth 1 entry) (nth 2 entry)) |
| 2829 | (throw 'found t)))) | 3259 | (throw 'found t)))) |
| @@ -3050,18 +3480,35 @@ all window-local buffer lists." | |||
| 3050 | ;; Unrecord BUFFER in WINDOW. | 3480 | ;; Unrecord BUFFER in WINDOW. |
| 3051 | (unrecord-window-buffer window buffer))))) | 3481 | (unrecord-window-buffer window buffer))))) |
| 3052 | 3482 | ||
| 3053 | (defun quit-window (&optional kill window) | 3483 | (defun quit-restore-window (&optional window bury-or-kill) |
| 3054 | "Quit WINDOW and bury its buffer. | 3484 | "Quit WINDOW and deal with its buffer. |
| 3055 | WINDOW must be a live window and defaults to the selected one. | 3485 | WINDOW must be a live window and defaults to the selected one. |
| 3056 | With prefix argument KILL non-nil, kill the buffer instead of | ||
| 3057 | burying it. | ||
| 3058 | 3486 | ||
| 3059 | According to information stored in WINDOW's `quit-restore' window | 3487 | According to information stored in WINDOW's `quit-restore' window |
| 3060 | parameter either (1) delete WINDOW and its frame, (2) delete | 3488 | parameter either (1) delete WINDOW and its frame, (2) delete |
| 3061 | WINDOW, (3) restore the buffer previously displayed in WINDOW, | 3489 | WINDOW, (3) restore the buffer previously displayed in WINDOW, |
| 3062 | or (4) make WINDOW display some other buffer than the present | 3490 | or (4) make WINDOW display some other buffer than the present |
| 3063 | one. If non-nil, reset `quit-restore' parameter to nil." | 3491 | one. If non-nil, reset `quit-restore' parameter to nil. |
| 3064 | (interactive "P") | 3492 | |
| 3493 | Optional second argument BURY-OR-KILL tells how to proceed with | ||
| 3494 | the buffer of WINDOW. The following values are handled: | ||
| 3495 | |||
| 3496 | `nil' means to not handle the buffer in a particular way. This | ||
| 3497 | means that if WINDOW is not deleted by this function, invoking | ||
| 3498 | `switch-to-prev-buffer' will usually show the buffer again. | ||
| 3499 | |||
| 3500 | `append' means that if WINDOW is not deleted, move its buffer to | ||
| 3501 | the end of WINDOW's previous buffers so it's less likely that a | ||
| 3502 | future invocation of `switch-to-prev-buffer' will switch to it. | ||
| 3503 | Also, move the buffer to the end of the frame's buffer list. | ||
| 3504 | |||
| 3505 | `bury' means that if WINDOW is not deleted, remove its buffer | ||
| 3506 | from WINDOW'S list of previous buffers. Also, move the buffer | ||
| 3507 | to the end of the frame's buffer list. This value provides the | ||
| 3508 | most reliable remedy to not have `switch-to-prev-buffer' switch | ||
| 3509 | to this buffer again without killing the buffer. | ||
| 3510 | |||
| 3511 | `kill' means to kill WINDOW's buffer." | ||
| 3065 | (setq window (window-normalize-window window t)) | 3512 | (setq window (window-normalize-window window t)) |
| 3066 | (let* ((buffer (window-buffer window)) | 3513 | (let* ((buffer (window-buffer window)) |
| 3067 | (quit-restore (window-parameter window 'quit-restore)) | 3514 | (quit-restore (window-parameter window 'quit-restore)) |
| @@ -3073,13 +3520,13 @@ one. If non-nil, reset `quit-restore' parameter to nil." | |||
| 3073 | (not (eq (setq prev-buffer (cadr prev-buffers)) | 3520 | (not (eq (setq prev-buffer (cadr prev-buffers)) |
| 3074 | buffer)))) | 3521 | buffer)))) |
| 3075 | prev-buffer))) | 3522 | prev-buffer))) |
| 3076 | quad resize) | 3523 | quad entry) |
| 3077 | (cond | 3524 | (cond |
| 3078 | ((and (not prev-buffer) | 3525 | ((and (not prev-buffer) |
| 3079 | (memq (nth 1 quit-restore) '(window frame)) | 3526 | (memq (nth 1 quit-restore) '(window frame)) |
| 3080 | (eq (nth 3 quit-restore) buffer) | 3527 | (eq (nth 3 quit-restore) buffer) |
| 3081 | ;; Delete WINDOW if possible. | 3528 | ;; Delete WINDOW if possible. |
| 3082 | (window--delete window nil kill)) | 3529 | (window--delete window nil (eq bury-or-kill 'kill))) |
| 3083 | ;; If the previously selected window is still alive, select it. | 3530 | ;; If the previously selected window is still alive, select it. |
| 3084 | (when (window-live-p (nth 2 quit-restore)) | 3531 | (when (window-live-p (nth 2 quit-restore)) |
| 3085 | (select-window (nth 2 quit-restore)))) | 3532 | (select-window (nth 2 quit-restore)))) |
| @@ -3087,21 +3534,32 @@ one. If non-nil, reset `quit-restore' parameter to nil." | |||
| 3087 | (buffer-live-p (car quad)) | 3534 | (buffer-live-p (car quad)) |
| 3088 | (eq (nth 3 quit-restore) buffer)) | 3535 | (eq (nth 3 quit-restore) buffer)) |
| 3089 | ;; Show another buffer stored in quit-restore parameter. | 3536 | ;; Show another buffer stored in quit-restore parameter. |
| 3090 | (setq resize (and (integerp (nth 3 quad)) | 3537 | (when (and (integerp (nth 3 quad)) |
| 3091 | (/= (nth 3 quad) (window-total-size window)))) | 3538 | (/= (nth 3 quad) (window-total-size window))) |
| 3092 | (set-window-dedicated-p window nil) | ||
| 3093 | (when resize | ||
| 3094 | ;; Try to resize WINDOW to its old height but don't signal an | 3539 | ;; Try to resize WINDOW to its old height but don't signal an |
| 3095 | ;; error. | 3540 | ;; error. |
| 3096 | (condition-case nil | 3541 | (condition-case nil |
| 3097 | (window-resize window (- (nth 3 quad) (window-total-size window))) | 3542 | (window-resize window (- (nth 3 quad) (window-total-size window))) |
| 3098 | (error nil))) | 3543 | (error nil))) |
| 3544 | (set-window-dedicated-p window nil) | ||
| 3099 | ;; Restore WINDOW's previous buffer, start and point position. | 3545 | ;; Restore WINDOW's previous buffer, start and point position. |
| 3100 | (set-window-buffer-start-and-point | 3546 | (set-window-buffer-start-and-point |
| 3101 | window (nth 0 quad) (nth 1 quad) (nth 2 quad)) | 3547 | window (nth 0 quad) (nth 1 quad) (nth 2 quad)) |
| 3102 | ;; Unrecord WINDOW's buffer here (Bug#9937) to make sure it's not | 3548 | ;; Deal with the buffer we just removed from WINDOW. |
| 3103 | ;; re-recorded by `set-window-buffer'. | 3549 | (setq entry (and (eq bury-or-kill 'append) |
| 3104 | (unrecord-window-buffer window buffer) | 3550 | (assq buffer (window-prev-buffers window)))) |
| 3551 | (when bury-or-kill | ||
| 3552 | ;; Remove buffer from WINDOW's previous and next buffers. | ||
| 3553 | (set-window-prev-buffers | ||
| 3554 | window (assq-delete-all buffer (window-prev-buffers window))) | ||
| 3555 | (set-window-next-buffers | ||
| 3556 | window (delq buffer (window-next-buffers window)))) | ||
| 3557 | (when entry | ||
| 3558 | ;; Append old buffer's entry to list of WINDOW's previous | ||
| 3559 | ;; buffers so it's less likely to get switched to soon but | ||
| 3560 | ;; `display-buffer-in-previous-window' can nevertheless find it. | ||
| 3561 | (set-window-prev-buffers | ||
| 3562 | window (append (window-prev-buffers window) (list entry)))) | ||
| 3105 | ;; Reset the quit-restore parameter. | 3563 | ;; Reset the quit-restore parameter. |
| 3106 | (set-window-parameter window 'quit-restore nil) | 3564 | (set-window-parameter window 'quit-restore nil) |
| 3107 | ;; Select old window. | 3565 | ;; Select old window. |
| @@ -3113,12 +3571,29 @@ one. If non-nil, reset `quit-restore' parameter to nil." | |||
| 3113 | (set-window-parameter window 'quit-restore nil) | 3571 | (set-window-parameter window 'quit-restore nil) |
| 3114 | ;; Make sure that WINDOW is no more dedicated. | 3572 | ;; Make sure that WINDOW is no more dedicated. |
| 3115 | (set-window-dedicated-p window nil) | 3573 | (set-window-dedicated-p window nil) |
| 3116 | (switch-to-prev-buffer window 'bury-or-kill))) | 3574 | (switch-to-prev-buffer window bury-or-kill))) |
| 3117 | 3575 | ||
| 3118 | ;; Kill WINDOW's old-buffer if requested | 3576 | ;; Deal with the buffer. |
| 3119 | (if kill | 3577 | (cond |
| 3120 | (kill-buffer buffer) | 3578 | ((not (buffer-live-p buffer))) |
| 3121 | (bury-buffer-internal buffer)))) | 3579 | ((eq bury-or-kill 'kill) |
| 3580 | (kill-buffer buffer)) | ||
| 3581 | (bury-or-kill | ||
| 3582 | (bury-buffer-internal buffer))))) | ||
| 3583 | |||
| 3584 | (defun quit-window (&optional kill window) | ||
| 3585 | "Quit WINDOW and bury its buffer. | ||
| 3586 | WINDOW must be a live window and defaults to the selected one. | ||
| 3587 | With prefix argument KILL non-nil, kill the buffer instead of | ||
| 3588 | burying it. | ||
| 3589 | |||
| 3590 | According to information stored in WINDOW's `quit-restore' window | ||
| 3591 | parameter either (1) delete WINDOW and its frame, (2) delete | ||
| 3592 | WINDOW, (3) restore the buffer previously displayed in WINDOW, | ||
| 3593 | or (4) make WINDOW display some other buffer than the present | ||
| 3594 | one. If non-nil, reset `quit-restore' parameter to nil." | ||
| 3595 | (interactive "P") | ||
| 3596 | (quit-restore-window window (if kill 'kill 'bury))) | ||
| 3122 | 3597 | ||
| 3123 | (defun quit-windows-on (&optional buffer-or-name kill frame) | 3598 | (defun quit-windows-on (&optional buffer-or-name kill frame) |
| 3124 | "Quit all windows showing BUFFER-OR-NAME. | 3599 | "Quit all windows showing BUFFER-OR-NAME. |
| @@ -3198,14 +3673,16 @@ frame. The selected window is not changed by this function." | |||
| 3198 | ((not side) 'below) | 3673 | ((not side) 'below) |
| 3199 | ((memq side '(below above right left)) side) | 3674 | ((memq side '(below above right left)) side) |
| 3200 | (t 'right))) | 3675 | (t 'right))) |
| 3201 | (horizontal (not (memq side '(nil below above)))) | 3676 | (horizontal (not (memq side '(below above)))) |
| 3202 | (frame (window-frame window)) | 3677 | (frame (window-frame window)) |
| 3203 | (parent (window-parent window)) | 3678 | (parent (window-parent window)) |
| 3204 | (function (window-parameter window 'split-window)) | 3679 | (function (window-parameter window 'split-window)) |
| 3205 | (window-side (window-parameter window 'window-side)) | 3680 | (window-side (window-parameter window 'window-side)) |
| 3206 | ;; Rebind `window-combination-limit' since in some cases we may | 3681 | ;; Rebind `window-combination-limit' and |
| 3207 | ;; have to override its value. | 3682 | ;; `window-combination-resize' since in some cases we may have |
| 3683 | ;; to override their value. | ||
| 3208 | (window-combination-limit window-combination-limit) | 3684 | (window-combination-limit window-combination-limit) |
| 3685 | (window-combination-resize window-combination-resize) | ||
| 3209 | atom-root) | 3686 | atom-root) |
| 3210 | 3687 | ||
| 3211 | (window--check frame) | 3688 | (window--check frame) |
| @@ -3223,20 +3700,32 @@ frame. The selected window is not changed by this function." | |||
| 3223 | ((and (window-parameter window 'window-atom) | 3700 | ((and (window-parameter window 'window-atom) |
| 3224 | (setq atom-root (window-atom-root window)) | 3701 | (setq atom-root (window-atom-root window)) |
| 3225 | (not (eq atom-root window))) | 3702 | (not (eq atom-root window))) |
| 3226 | (throw 'done (split-window atom-root size side)))) | 3703 | (throw 'done (split-window atom-root size side))) |
| 3227 | 3704 | ;; If WINDOW is a side window or its first or last child is a | |
| 3228 | (when (and window-side | 3705 | ;; side window, throw an error unless `window-combination-resize' |
| 3229 | (or (not parent) | 3706 | ;; equals 'side. |
| 3230 | (not (window-parameter parent 'window-side)))) | 3707 | ((and (not (eq window-combination-resize 'side)) |
| 3231 | ;; WINDOW is a side root window. To make sure that a new parent | 3708 | (or (window-parameter window 'window-side) |
| 3232 | ;; window gets created set `window-combination-limit' to t. | 3709 | (and (window-child window) |
| 3233 | (setq window-combination-limit t)) | 3710 | (or (window-parameter |
| 3234 | 3711 | (window-child window) 'window-side) | |
| 3235 | (when (and window-combination-resize size (> size 0)) | 3712 | (window-parameter |
| 3236 | ;; If `window-combination-resize' is non-nil and SIZE is a | 3713 | (window-last-child window) 'window-side))))) |
| 3237 | ;; non-negative integer, we cannot reasonably resize other | 3714 | (error "Cannot split side window or parent of side window")) |
| 3238 | ;; windows. Rather bind `window-combination-limit' to t to make | 3715 | ;; If `window-combination-resize' is 'side and window has a side |
| 3239 | ;; sure that subsequent window deletions are handled correctly. | 3716 | ;; window sibling, bind `window-combination-limit' to t. |
| 3717 | ((and (not (eq window-combination-resize 'side)) | ||
| 3718 | (or (and (window-prev-sibling window) | ||
| 3719 | (window-parameter | ||
| 3720 | (window-prev-sibling window) 'window-side)) | ||
| 3721 | (and (window-next-sibling window) | ||
| 3722 | (window-parameter | ||
| 3723 | (window-next-sibling window) 'window-side)))) | ||
| 3724 | (setq window-combination-limit t))) | ||
| 3725 | |||
| 3726 | ;; If `window-combination-resize' is t and SIZE is non-negative, | ||
| 3727 | ;; bind `window-combination-limit' to t. | ||
| 3728 | (when (and (eq window-combination-resize t) size (> size 0)) | ||
| 3240 | (setq window-combination-limit t)) | 3729 | (setq window-combination-limit t)) |
| 3241 | 3730 | ||
| 3242 | (let* ((parent-size | 3731 | (let* ((parent-size |
| @@ -3246,7 +3735,10 @@ frame. The selected window is not changed by this function." | |||
| 3246 | ;; `resize' non-nil means we are supposed to resize other | 3735 | ;; `resize' non-nil means we are supposed to resize other |
| 3247 | ;; windows in WINDOW's combination. | 3736 | ;; windows in WINDOW's combination. |
| 3248 | (resize | 3737 | (resize |
| 3249 | (and window-combination-resize (not window-combination-limit) | 3738 | (and window-combination-resize |
| 3739 | (or (window-parameter window 'window-side) | ||
| 3740 | (not (eq window-combination-resize 'side))) | ||
| 3741 | (not window-combination-limit) | ||
| 3250 | ;; Resize makes sense in iso-combinations only. | 3742 | ;; Resize makes sense in iso-combinations only. |
| 3251 | (window-combined-p window horizontal))) | 3743 | (window-combined-p window horizontal))) |
| 3252 | ;; `old-size' is the current size of WINDOW. | 3744 | ;; `old-size' is the current size of WINDOW. |
| @@ -3357,10 +3849,21 @@ frame. The selected window is not changed by this function." | |||
| 3357 | new-normal))) | 3849 | new-normal))) |
| 3358 | 3850 | ||
| 3359 | (let* ((new (split-window-internal window new-size side new-normal))) | 3851 | (let* ((new (split-window-internal window new-size side new-normal))) |
| 3360 | ;; Inherit window-side parameters, if any. | 3852 | ;; Assign window-side parameters, if any. |
| 3361 | (when (and window-side new-parent) | 3853 | (when (eq window-combination-resize 'side) |
| 3362 | (set-window-parameter (window-parent new) 'window-side window-side) | 3854 | (let ((window-side |
| 3363 | (set-window-parameter new 'window-side window-side)) | 3855 | (cond |
| 3856 | (window-side window-side) | ||
| 3857 | ((eq side 'above) 'top) | ||
| 3858 | ((eq side 'below) 'bottom) | ||
| 3859 | (t side)))) | ||
| 3860 | ;; We made a new side window. | ||
| 3861 | (set-window-parameter new 'window-side window-side) | ||
| 3862 | (when (and new-parent (window-parameter window 'window-side)) | ||
| 3863 | ;; We've been splitting a side root window. Give the | ||
| 3864 | ;; new parent the same window-side parameter. | ||
| 3865 | (set-window-parameter | ||
| 3866 | (window-parent new) 'window-side window-side)))) | ||
| 3364 | 3867 | ||
| 3365 | (run-window-configuration-change-hook frame) | 3868 | (run-window-configuration-change-hook frame) |
| 3366 | (window--check frame) | 3869 | (window--check frame) |
| @@ -3393,7 +3896,7 @@ Otherwise, the window starts are chosen so as to minimize the | |||
| 3393 | amount of redisplay; this is convenient on slow terminals." | 3896 | amount of redisplay; this is convenient on slow terminals." |
| 3394 | (interactive "P") | 3897 | (interactive "P") |
| 3395 | (let ((old-window (selected-window)) | 3898 | (let ((old-window (selected-window)) |
| 3396 | (old-point (window-point-1)) | 3899 | (old-point (window-point)) |
| 3397 | (size (and size (prefix-numeric-value size))) | 3900 | (size (and size (prefix-numeric-value size))) |
| 3398 | moved-by-window-height moved new-window bottom) | 3901 | moved-by-window-height moved new-window bottom) |
| 3399 | (when (and size (< size 0) (< (- size) window-min-height)) | 3902 | (when (and size (< size 0) (< (- size) window-min-height)) |
| @@ -3418,7 +3921,7 @@ amount of redisplay; this is convenient on slow terminals." | |||
| 3418 | (setq bottom (point))) | 3921 | (setq bottom (point))) |
| 3419 | (and moved-by-window-height | 3922 | (and moved-by-window-height |
| 3420 | (<= bottom (point)) | 3923 | (<= bottom (point)) |
| 3421 | (set-window-point-1 old-window (1- bottom))) | 3924 | (set-window-point old-window (1- bottom))) |
| 3422 | (and moved-by-window-height | 3925 | (and moved-by-window-height |
| 3423 | (<= (window-start new-window) old-point) | 3926 | (<= (window-start new-window) old-point) |
| 3424 | (set-window-point new-window old-point) | 3927 | (set-window-point new-window old-point) |
| @@ -3727,7 +4230,7 @@ specific buffers." | |||
| 3727 | `((parameters . ,list)))) | 4230 | `((parameters . ,list)))) |
| 3728 | ,@(when buffer | 4231 | ,@(when buffer |
| 3729 | ;; All buffer related things go in here. | 4232 | ;; All buffer related things go in here. |
| 3730 | (let ((point (window-point-1 window)) | 4233 | (let ((point (window-point window)) |
| 3731 | (start (window-start window))) | 4234 | (start (window-start window))) |
| 3732 | `((buffer | 4235 | `((buffer |
| 3733 | ,(buffer-name buffer) | 4236 | ,(buffer-name buffer) |
| @@ -4020,7 +4523,7 @@ element is BUFFER." | |||
| 4020 | (list 'other | 4523 | (list 'other |
| 4021 | ;; A quadruple of WINDOW's buffer, start, point and height. | 4524 | ;; A quadruple of WINDOW's buffer, start, point and height. |
| 4022 | (list (window-buffer window) (window-start window) | 4525 | (list (window-buffer window) (window-start window) |
| 4023 | (window-point-1 window) (window-total-size window)) | 4526 | (window-point window) (window-total-size window)) |
| 4024 | (selected-window) buffer)))) | 4527 | (selected-window) buffer)))) |
| 4025 | ((eq type 'window) | 4528 | ((eq type 'window) |
| 4026 | ;; WINDOW has been created on an existing frame. | 4529 | ;; WINDOW has been created on an existing frame. |
| @@ -4048,12 +4551,11 @@ of the window used." | |||
| 4048 | (function :tag "function")) | 4551 | (function :tag "function")) |
| 4049 | :group 'windows) | 4552 | :group 'windows) |
| 4050 | 4553 | ||
| 4554 | ;; Eventually, we want to turn this into a defvar; instead of | ||
| 4555 | ;; customizing this, the user should use a `pop-up-frame-parameters' | ||
| 4556 | ;; alist entry in `display-buffer-base-action'. | ||
| 4051 | (defcustom pop-up-frame-alist nil | 4557 | (defcustom pop-up-frame-alist nil |
| 4052 | "Alist of parameters for automatically generated new frames. | 4558 | "Alist of parameters for automatically generated new frames. |
| 4053 | You can set this in your init file; for example, | ||
| 4054 | |||
| 4055 | (setq pop-up-frame-alist '((width . 80) (height . 20))) | ||
| 4056 | |||
| 4057 | If non-nil, the value you specify here is used by the default | 4559 | If non-nil, the value you specify here is used by the default |
| 4058 | `pop-up-frame-function' for the creation of new frames. | 4560 | `pop-up-frame-function' for the creation of new frames. |
| 4059 | 4561 | ||
| @@ -4140,8 +4642,7 @@ See also `special-display-regexps'." | |||
| 4140 | (repeat :tag "Arguments" (sexp))))) | 4642 | (repeat :tag "Arguments" (sexp))))) |
| 4141 | :group 'windows | 4643 | :group 'windows |
| 4142 | :group 'frames) | 4644 | :group 'frames) |
| 4143 | 4645 | (make-obsolete-variable 'special-display-buffer-names 'display-buffer-alist "24.3") | |
| 4144 | ;;;###autoload | ||
| 4145 | (put 'special-display-buffer-names 'risky-local-variable t) | 4646 | (put 'special-display-buffer-names 'risky-local-variable t) |
| 4146 | 4647 | ||
| 4147 | (defcustom special-display-regexps nil | 4648 | (defcustom special-display-regexps nil |
| @@ -4208,6 +4709,8 @@ See also `special-display-buffer-names'." | |||
| 4208 | (repeat :tag "Arguments" (sexp))))) | 4709 | (repeat :tag "Arguments" (sexp))))) |
| 4209 | :group 'windows | 4710 | :group 'windows |
| 4210 | :group 'frames) | 4711 | :group 'frames) |
| 4712 | (make-obsolete-variable 'special-display-regexps 'display-buffer-alist "24.3") | ||
| 4713 | (put 'special-display-regexps 'risky-local-variable t) | ||
| 4211 | 4714 | ||
| 4212 | (defun special-display-p (buffer-name) | 4715 | (defun special-display-p (buffer-name) |
| 4213 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. | 4716 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. |
| @@ -4249,6 +4752,7 @@ These supersede the values given in `default-frame-alist'." | |||
| 4249 | (symbol :tag "Parameter") | 4752 | (symbol :tag "Parameter") |
| 4250 | (sexp :tag "Value"))) | 4753 | (sexp :tag "Value"))) |
| 4251 | :group 'frames) | 4754 | :group 'frames) |
| 4755 | (make-obsolete-variable 'special-display-frame-alist 'display-buffer-alist "24.3") | ||
| 4252 | 4756 | ||
| 4253 | (defun special-display-popup-frame (buffer &optional args) | 4757 | (defun special-display-popup-frame (buffer &optional args) |
| 4254 | "Pop up a frame displaying BUFFER and return its window. | 4758 | "Pop up a frame displaying BUFFER and return its window. |
| @@ -4294,6 +4798,9 @@ and (cdr ARGS) as second." | |||
| 4294 | (make-frame (append args special-display-frame-alist)))) | 4798 | (make-frame (append args special-display-frame-alist)))) |
| 4295 | (window (frame-selected-window frame))) | 4799 | (window (frame-selected-window frame))) |
| 4296 | (display-buffer-record-window 'frame window buffer) | 4800 | (display-buffer-record-window 'frame window buffer) |
| 4801 | (unless (eq buffer (window-buffer window)) | ||
| 4802 | (set-window-buffer window buffer) | ||
| 4803 | (set-window-prev-buffers window nil)) | ||
| 4297 | (set-window-dedicated-p window t) | 4804 | (set-window-dedicated-p window t) |
| 4298 | window))))) | 4805 | window))))) |
| 4299 | 4806 | ||
| @@ -4315,6 +4822,7 @@ with corresponding arguments to set up the quit-restore parameter | |||
| 4315 | of the window used." | 4822 | of the window used." |
| 4316 | :type 'function | 4823 | :type 'function |
| 4317 | :group 'frames) | 4824 | :group 'frames) |
| 4825 | (make-obsolete-variable 'special-display-function 'display-buffer-alist "24.3") | ||
| 4318 | 4826 | ||
| 4319 | (defcustom same-window-buffer-names nil | 4827 | (defcustom same-window-buffer-names nil |
| 4320 | "List of names of buffers that should appear in the \"same\" window. | 4828 | "List of names of buffers that should appear in the \"same\" window. |
| @@ -4388,6 +4896,11 @@ that frame." | |||
| 4388 | :version "21.1" | 4896 | :version "21.1" |
| 4389 | :group 'windows) | 4897 | :group 'windows) |
| 4390 | 4898 | ||
| 4899 | (make-obsolete-variable | ||
| 4900 | 'display-buffer-reuse-frames | ||
| 4901 | "use a `reusable-frames' alist entry in `display-buffer-alist'." | ||
| 4902 | "24.3") | ||
| 4903 | |||
| 4391 | (defcustom pop-up-windows t | 4904 | (defcustom pop-up-windows t |
| 4392 | "Non-nil means `display-buffer' should make a new window." | 4905 | "Non-nil means `display-buffer' should make a new window." |
| 4393 | :type 'boolean | 4906 | :type 'boolean |
| @@ -4590,23 +5103,19 @@ Do this only if these windows are vertically adjacent to each | |||
| 4590 | other, `even-window-heights' is non-nil, and the selected window | 5103 | other, `even-window-heights' is non-nil, and the selected window |
| 4591 | is higher than WINDOW." | 5104 | is higher than WINDOW." |
| 4592 | (when (and even-window-heights | 5105 | (when (and even-window-heights |
| 4593 | (not (eq window (selected-window))) | 5106 | ;; Even iff WINDOW forms a vertical combination with the |
| 4594 | ;; Don't resize minibuffer windows. | 5107 | ;; selected window, and WINDOW's height exceeds that of the |
| 4595 | (not (window-minibuffer-p (selected-window))) | 5108 | ;; selected window, see also bug#11880. |
| 4596 | (> (window-height (selected-window)) (window-height window)) | 5109 | (window-combined-p window) |
| 4597 | (eq (window-frame window) (window-frame (selected-window))) | 5110 | (= (window-child-count (window-parent window)) 2) |
| 4598 | (let ((sel-edges (window-edges (selected-window))) | 5111 | (eq (window-parent) (window-parent window)) |
| 4599 | (win-edges (window-edges window))) | 5112 | (> (window-total-height) (window-total-height window))) |
| 4600 | (and (= (nth 0 sel-edges) (nth 0 win-edges)) | 5113 | ;; Don't throw an error if we can't even window heights for |
| 4601 | (= (nth 2 sel-edges) (nth 2 win-edges)) | 5114 | ;; whatever reason. |
| 4602 | (or (= (nth 1 sel-edges) (nth 3 win-edges)) | 5115 | (condition-case nil |
| 4603 | (= (nth 3 sel-edges) (nth 1 win-edges)))))) | 5116 | (enlarge-window |
| 4604 | (let ((window-min-height 1)) | 5117 | (/ (- (window-total-height window) (window-total-height)) 2)) |
| 4605 | ;; Don't throw an error if we can't even window heights for | 5118 | (error nil)))) |
| 4606 | ;; whatever reason. | ||
| 4607 | (condition-case nil | ||
| 4608 | (enlarge-window (/ (- (window-height window) (window-height)) 2)) | ||
| 4609 | (error nil))))) | ||
| 4610 | 5119 | ||
| 4611 | (defun window--display-buffer (buffer window type &optional dedicated) | 5120 | (defun window--display-buffer (buffer window type &optional dedicated) |
| 4612 | "Display BUFFER in WINDOW and make its frame visible. | 5121 | "Display BUFFER in WINDOW and make its frame visible. |
| @@ -4615,9 +5124,9 @@ is passed unaltered to `display-buffer-record-window'. Set | |||
| 4615 | `window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if | 5124 | `window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if |
| 4616 | BUFFER and WINDOW are live." | 5125 | BUFFER and WINDOW are live." |
| 4617 | (when (and (buffer-live-p buffer) (window-live-p window)) | 5126 | (when (and (buffer-live-p buffer) (window-live-p window)) |
| 5127 | (display-buffer-record-window type window buffer) | ||
| 4618 | (unless (eq buffer (window-buffer window)) | 5128 | (unless (eq buffer (window-buffer window)) |
| 4619 | (set-window-dedicated-p window nil) | 5129 | (set-window-dedicated-p window nil) |
| 4620 | (display-buffer-record-window type window buffer) | ||
| 4621 | (set-window-buffer window buffer) | 5130 | (set-window-buffer window buffer) |
| 4622 | (when dedicated | 5131 | (when dedicated |
| 4623 | (set-window-dedicated-p window dedicated)) | 5132 | (set-window-dedicated-p window dedicated)) |
| @@ -4791,6 +5300,10 @@ Recognized alist entries include: | |||
| 4791 | window that already displays the buffer. | 5300 | window that already displays the buffer. |
| 4792 | See `display-buffer-reuse-window'. | 5301 | See `display-buffer-reuse-window'. |
| 4793 | 5302 | ||
| 5303 | `pop-up-frame-parameters' -- Value specifies an alist of frame | ||
| 5304 | parameters to give a new frame, if | ||
| 5305 | one is created. | ||
| 5306 | |||
| 4794 | The ACTION argument to `display-buffer' can also have a non-nil | 5307 | The ACTION argument to `display-buffer' can also have a non-nil |
| 4795 | and non-list value. This means to display the buffer in a window | 5308 | and non-list value. This means to display the buffer in a window |
| 4796 | other than the selected one, even if it is already displayed in | 5309 | other than the selected one, even if it is already displayed in |
| @@ -4933,9 +5446,15 @@ This works by calling `pop-up-frame-function'. If successful, | |||
| 4933 | return the window used; otherwise return nil. | 5446 | return the window used; otherwise return nil. |
| 4934 | 5447 | ||
| 4935 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid | 5448 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid |
| 4936 | raising the new frame." | 5449 | raising the new frame. |
| 4937 | (let ((fun pop-up-frame-function) | 5450 | |
| 4938 | frame window) | 5451 | If ALIST has a non-nil `pop-up-frame-parameters' entry, the |
| 5452 | corresponding value is an alist of frame parameters to give the | ||
| 5453 | new frame." | ||
| 5454 | (let* ((params (cdr (assq 'pop-up-frame-parameters alist))) | ||
| 5455 | (pop-up-frame-alist (append params pop-up-frame-alist)) | ||
| 5456 | (fun pop-up-frame-function) | ||
| 5457 | frame window) | ||
| 4939 | (when (and fun | 5458 | (when (and fun |
| 4940 | (setq frame (funcall fun)) | 5459 | (setq frame (funcall fun)) |
| 4941 | (setq window (frame-selected-window frame))) | 5460 | (setq window (frame-selected-window frame))) |
| @@ -4988,6 +5507,20 @@ again with `display-buffer-pop-up-window'." | |||
| 4988 | (and pop-up-windows | 5507 | (and pop-up-windows |
| 4989 | (display-buffer-pop-up-window buffer alist)))) | 5508 | (display-buffer-pop-up-window buffer alist)))) |
| 4990 | 5509 | ||
| 5510 | (defun display-buffer-below-selected (buffer _alist) | ||
| 5511 | "Try displaying BUFFER in a window below the selected window. | ||
| 5512 | This either splits the selected window or reuses the window below | ||
| 5513 | the selected one." | ||
| 5514 | (let (window) | ||
| 5515 | (or (and (not (frame-parameter nil 'unsplittable)) | ||
| 5516 | (setq window (window--try-to-split-window (selected-window))) | ||
| 5517 | (window--display-buffer | ||
| 5518 | buffer window 'window display-buffer-mark-dedicated)) | ||
| 5519 | (and (setq window (window-in-direction 'below)) | ||
| 5520 | (not (window-dedicated-p window)) | ||
| 5521 | (window--display-buffer | ||
| 5522 | buffer window 'reuse display-buffer-mark-dedicated))))) | ||
| 5523 | |||
| 4991 | (defun display-buffer-use-some-window (buffer alist) | 5524 | (defun display-buffer-use-some-window (buffer alist) |
| 4992 | "Display BUFFER in an existing window. | 5525 | "Display BUFFER in an existing window. |
| 4993 | Search for a usable window, set that window to the buffer, and | 5526 | Search for a usable window, set that window to the buffer, and |
| @@ -5013,8 +5546,9 @@ that frame." | |||
| 5013 | window)) | 5546 | window)) |
| 5014 | (get-largest-window 0 not-this-window)))) | 5547 | (get-largest-window 0 not-this-window)))) |
| 5015 | (when (window-live-p window) | 5548 | (when (window-live-p window) |
| 5016 | (window--even-window-heights window) | 5549 | (prog1 |
| 5017 | (prog1 (window--display-buffer buffer window 'reuse) | 5550 | (window--display-buffer buffer window 'reuse) |
| 5551 | (window--even-window-heights window) | ||
| 5018 | (unless (cdr (assq 'inhibit-switch-frame alist)) | 5552 | (unless (cdr (assq 'inhibit-switch-frame alist)) |
| 5019 | (window--maybe-raise-frame (window-frame window))))))) | 5553 | (window--maybe-raise-frame (window-frame window))))))) |
| 5020 | 5554 | ||
| @@ -5281,7 +5815,7 @@ WINDOW must be a live window and defaults to the selected one." | |||
| 5281 | window)))) | 5815 | window)))) |
| 5282 | 5816 | ||
| 5283 | ;;; Resizing buffers to fit their contents exactly. | 5817 | ;;; Resizing buffers to fit their contents exactly. |
| 5284 | (defun fit-window-to-buffer (&optional window max-height min-height override) | 5818 | (defun fit-window-to-buffer (&optional window max-height min-height) |
| 5285 | "Adjust height of WINDOW to display its buffer's contents exactly. | 5819 | "Adjust height of WINDOW to display its buffer's contents exactly. |
| 5286 | WINDOW must be a live window and defaults to the selected one. | 5820 | WINDOW must be a live window and defaults to the selected one. |
| 5287 | 5821 | ||
| @@ -5292,10 +5826,6 @@ defaults to `window-min-height'. Both MAX-HEIGHT and MIN-HEIGHT | |||
| 5292 | are specified in lines and include the mode line and header line, | 5826 | are specified in lines and include the mode line and header line, |
| 5293 | if any. | 5827 | if any. |
| 5294 | 5828 | ||
| 5295 | Optional argument OVERRIDE non-nil means override restrictions | ||
| 5296 | imposed by `window-min-height' and `window-min-width' on the size | ||
| 5297 | of WINDOW. | ||
| 5298 | |||
| 5299 | Return the number of lines by which WINDOW was enlarged or | 5829 | Return the number of lines by which WINDOW was enlarged or |
| 5300 | shrunk. If an error occurs during resizing, return nil but don't | 5830 | shrunk. If an error occurs during resizing, return nil but don't |
| 5301 | signal an error. | 5831 | signal an error. |
| @@ -5304,28 +5834,27 @@ Note that even if this function makes WINDOW large enough to show | |||
| 5304 | _all_ lines of its buffer you might not see the first lines when | 5834 | _all_ lines of its buffer you might not see the first lines when |
| 5305 | WINDOW was scrolled." | 5835 | WINDOW was scrolled." |
| 5306 | (interactive) | 5836 | (interactive) |
| 5307 | ;; Do all the work in WINDOW and its buffer and restore the selected | ||
| 5308 | ;; window and the current buffer when we're done. | ||
| 5309 | (setq window (window-normalize-window window t)) | 5837 | (setq window (window-normalize-window window t)) |
| 5310 | ;; Can't resize a full height or fixed-size window. | 5838 | ;; Can't resize a full height or fixed-size window. |
| 5311 | (unless (or (window-size-fixed-p window) | 5839 | (unless (or (window-size-fixed-p window) |
| 5312 | (window-full-height-p window)) | 5840 | (window-full-height-p window)) |
| 5313 | ;; `with-selected-window' should orderly restore the current buffer. | ||
| 5314 | (with-selected-window window | 5841 | (with-selected-window window |
| 5315 | ;; We are in WINDOW's buffer now. | 5842 | (let* ((height (window-total-size)) |
| 5316 | (let* (;; Adjust MIN-HEIGHT. | ||
| 5317 | (min-height | 5843 | (min-height |
| 5318 | (if override | 5844 | ;; Adjust MIN-HEIGHT. |
| 5319 | (window-min-size window nil window) | 5845 | (if (numberp min-height) |
| 5320 | (max (or min-height window-min-height) | 5846 | ;; Can't get smaller than `window-safe-min-height'. |
| 5321 | window-safe-min-height))) | 5847 | (max min-height window-safe-min-height) |
| 5322 | (max-window-height | 5848 | ;; Preserve header and mode line if present. |
| 5323 | (window-total-size (frame-root-window window))) | 5849 | (window-min-size nil nil t))) |
| 5324 | ;; Adjust MAX-HEIGHT. | ||
| 5325 | (max-height | 5850 | (max-height |
| 5326 | (if (or override (not max-height)) | 5851 | ;; Adjust MAX-HEIGHT. |
| 5327 | max-window-height | 5852 | (if (numberp max-height) |
| 5328 | (min max-height max-window-height))) | 5853 | ;; Can't get larger than height of frame. |
| 5854 | (min max-height | ||
| 5855 | (window-total-size (frame-root-window window))) | ||
| 5856 | ;, Don't delete other windows. | ||
| 5857 | (+ height (window-max-delta nil nil window)))) | ||
| 5329 | ;; Make `desired-height' the height necessary to show | 5858 | ;; Make `desired-height' the height necessary to show |
| 5330 | ;; all of WINDOW's buffer, constrained by MIN-HEIGHT | 5859 | ;; all of WINDOW's buffer, constrained by MIN-HEIGHT |
| 5331 | ;; and MAX-HEIGHT. | 5860 | ;; and MAX-HEIGHT. |
| @@ -5350,7 +5879,6 @@ WINDOW was scrolled." | |||
| 5350 | (window-max-delta window nil window)) | 5879 | (window-max-delta window nil window)) |
| 5351 | (max desired-delta | 5880 | (max desired-delta |
| 5352 | (- (window-min-delta window nil window)))))) | 5881 | (- (window-min-delta window nil window)))))) |
| 5353 | ;; This `condition-case' shouldn't be necessary, but who knows? | ||
| 5354 | (condition-case nil | 5882 | (condition-case nil |
| 5355 | (if (zerop delta) | 5883 | (if (zerop delta) |
| 5356 | ;; Return zero if DELTA became zero in the process. | 5884 | ;; Return zero if DELTA became zero in the process. |
diff --git a/lisp/woman.el b/lisp/woman.el index 5933d593aa5..c8cc7ea6766 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -2531,7 +2531,7 @@ REQUEST is the invoking directive without the leading dot." | |||
| 2531 | (cond | 2531 | (cond |
| 2532 | ;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page) | 2532 | ;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page) |
| 2533 | ;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page) | 2533 | ;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page) |
| 2534 | ;; Per groff ".if v" is recognised as false (it means -Tversatec). | 2534 | ;; Per groff ".if v" is recognized as false (it means -Tversatec). |
| 2535 | ((looking-at "[ntoev]") | 2535 | ((looking-at "[ntoev]") |
| 2536 | (setq c (memq (following-char) woman-if-conditions-true))) | 2536 | (setq c (memq (following-char) woman-if-conditions-true))) |
| 2537 | ;; Unrecognized letter so reject: | 2537 | ;; Unrecognized letter so reject: |
diff --git a/m4/execinfo.m4 b/m4/execinfo.m4 new file mode 100644 index 00000000000..f1f3cd91638 --- /dev/null +++ b/m4/execinfo.m4 | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | # Check for GNU-style execinfo.h. | ||
| 2 | |||
| 3 | dnl Copyright 2012 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | AC_DEFUN([gl_EXECINFO_H], | ||
| 9 | [ | ||
| 10 | AC_CHECK_HEADERS_ONCE([execinfo.h]) | ||
| 11 | |||
| 12 | LIB_EXECINFO='' | ||
| 13 | EXECINFO_H='execinfo.h' | ||
| 14 | |||
| 15 | if test $ac_cv_header_execinfo_h = yes; then | ||
| 16 | gl_saved_libs=$LIBS | ||
| 17 | AC_SEARCH_LIBS([backtrace_symbols_fd], [execinfo], | ||
| 18 | [test "$ac_cv_search_backtrace_symbols_fd" = "none required" || | ||
| 19 | LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd]) | ||
| 20 | LIBS=$gl_saved_libs | ||
| 21 | test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H='' | ||
| 22 | fi | ||
| 23 | |||
| 24 | if test -n "$EXECINFO_H"; then | ||
| 25 | AC_LIBOBJ([execinfo]) | ||
| 26 | fi | ||
| 27 | |||
| 28 | AC_SUBST([EXECINFO_H]) | ||
| 29 | AC_SUBST([LIB_EXECINFO]) | ||
| 30 | AM_CONDITIONAL([GL_GENERATE_EXECINFO_H], [test -n "$EXECINFO_H"]) | ||
| 31 | ]) | ||
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 187a33599a3..12f24fab95f 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 | |||
| @@ -21,20 +21,34 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
| 21 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ | 21 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ |
| 22 | # define _GL_INLINE inline | 22 | # define _GL_INLINE inline |
| 23 | # define _GL_EXTERN_INLINE extern inline | 23 | # define _GL_EXTERN_INLINE extern inline |
| 24 | # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | 24 | #elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) |
| 25 | # define _GL_INLINE_HEADER_BEGIN \ | 25 | # if __GNUC_GNU_INLINE__ |
| 26 | _Pragma ("GCC diagnostic push") \ | 26 | /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ |
| 27 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | 27 | # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) |
| 28 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") | 28 | # else |
| 29 | # define _GL_INLINE_HEADER_END \ | 29 | # define _GL_INLINE extern inline |
| 30 | _Pragma ("GCC diagnostic pop") | ||
| 31 | # endif | 30 | # endif |
| 31 | # define _GL_EXTERN_INLINE extern | ||
| 32 | #else | 32 | #else |
| 33 | # define _GL_INLINE static inline | 33 | # define _GL_INLINE static inline |
| 34 | # define _GL_EXTERN_INLINE static inline | 34 | # define _GL_EXTERN_INLINE static inline |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #ifndef _GL_INLINE_HEADER_BEGIN | 37 | #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) |
| 38 | # if __GNUC_STDC_INLINE__ | ||
| 39 | # define _GL_INLINE_HEADER_CONST_PRAGMA | ||
| 40 | # else | ||
| 41 | # define _GL_INLINE_HEADER_CONST_PRAGMA \ | ||
| 42 | _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") | ||
| 43 | # endif | ||
| 44 | # define _GL_INLINE_HEADER_BEGIN \ | ||
| 45 | _Pragma ("GCC diagnostic push") \ | ||
| 46 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | ||
| 47 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ | ||
| 48 | _GL_INLINE_HEADER_CONST_PRAGMA | ||
| 49 | # define _GL_INLINE_HEADER_END \ | ||
| 50 | _Pragma ("GCC diagnostic pop") | ||
| 51 | #else | ||
| 38 | # define _GL_INLINE_HEADER_BEGIN | 52 | # define _GL_INLINE_HEADER_BEGIN |
| 39 | # define _GL_INLINE_HEADER_END | 53 | # define _GL_INLINE_HEADER_END |
| 40 | #endif]) | 54 | #endif]) |
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 12c8ca8734b..0d73faee8d1 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 | |||
| @@ -53,6 +53,7 @@ AC_DEFUN([gl_EARLY], | |||
| 53 | # Code from module dtotimespec: | 53 | # Code from module dtotimespec: |
| 54 | # Code from module dup2: | 54 | # Code from module dup2: |
| 55 | # Code from module environ: | 55 | # Code from module environ: |
| 56 | # Code from module execinfo: | ||
| 56 | # Code from module extensions: | 57 | # Code from module extensions: |
| 57 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | 58 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| 58 | # Code from module extern-inline: | 59 | # Code from module extern-inline: |
| @@ -152,6 +153,7 @@ AC_DEFUN([gl_INIT], | |||
| 152 | gl_UNISTD_MODULE_INDICATOR([dup2]) | 153 | gl_UNISTD_MODULE_INDICATOR([dup2]) |
| 153 | gl_ENVIRON | 154 | gl_ENVIRON |
| 154 | gl_UNISTD_MODULE_INDICATOR([environ]) | 155 | gl_UNISTD_MODULE_INDICATOR([environ]) |
| 156 | gl_EXECINFO_H | ||
| 155 | AC_REQUIRE([gl_EXTERN_INLINE]) | 157 | AC_REQUIRE([gl_EXTERN_INLINE]) |
| 156 | gl_FILEMODE | 158 | gl_FILEMODE |
| 157 | gl_GETLOADAVG | 159 | gl_GETLOADAVG |
| @@ -534,6 +536,8 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 534 | lib/dtoastr.c | 536 | lib/dtoastr.c |
| 535 | lib/dtotimespec.c | 537 | lib/dtotimespec.c |
| 536 | lib/dup2.c | 538 | lib/dup2.c |
| 539 | lib/execinfo.c | ||
| 540 | lib/execinfo.in.h | ||
| 537 | lib/filemode.c | 541 | lib/filemode.c |
| 538 | lib/filemode.h | 542 | lib/filemode.h |
| 539 | lib/ftoastr.c | 543 | lib/ftoastr.c |
| @@ -605,6 +609,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 605 | m4/clock_time.m4 | 609 | m4/clock_time.m4 |
| 606 | m4/dup2.m4 | 610 | m4/dup2.m4 |
| 607 | m4/environ.m4 | 611 | m4/environ.m4 |
| 612 | m4/execinfo.m4 | ||
| 608 | m4/extensions.m4 | 613 | m4/extensions.m4 |
| 609 | m4/extern-inline.m4 | 614 | m4/extern-inline.m4 |
| 610 | m4/filemode.m4 | 615 | m4/filemode.m4 |
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index 864fc851982..2760efb3f27 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 | |||
| @@ -81,95 +81,118 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], | |||
| 81 | 81 | ||
| 82 | gl_manywarn_set= | 82 | gl_manywarn_set= |
| 83 | for gl_manywarn_item in \ | 83 | for gl_manywarn_item in \ |
| 84 | -Wall \ | ||
| 85 | -W \ | 84 | -W \ |
| 86 | -Wformat-y2k \ | 85 | -Wabi \ |
| 87 | -Wformat-nonliteral \ | 86 | -Waddress \ |
| 88 | -Wformat-security \ | 87 | -Wall \ |
| 89 | -Winit-self \ | 88 | -Warray-bounds \ |
| 90 | -Wmissing-include-dirs \ | 89 | -Wattributes \ |
| 91 | -Wswitch-default \ | ||
| 92 | -Wswitch-enum \ | ||
| 93 | -Wunused \ | ||
| 94 | -Wunknown-pragmas \ | ||
| 95 | -Wstrict-aliasing \ | ||
| 96 | -Wstrict-overflow \ | ||
| 97 | -Wsystem-headers \ | ||
| 98 | -Wfloat-equal \ | ||
| 99 | -Wtraditional \ | ||
| 100 | -Wtraditional-conversion \ | ||
| 101 | -Wdeclaration-after-statement \ | ||
| 102 | -Wundef \ | ||
| 103 | -Wshadow \ | ||
| 104 | -Wunsafe-loop-optimizations \ | ||
| 105 | -Wpointer-arith \ | ||
| 106 | -Wbad-function-cast \ | 90 | -Wbad-function-cast \ |
| 107 | -Wc++-compat \ | ||
| 108 | -Wcast-qual \ | ||
| 109 | -Wcast-align \ | ||
| 110 | -Wwrite-strings \ | ||
| 111 | -Wconversion \ | ||
| 112 | -Wsign-conversion \ | ||
| 113 | -Wlogical-op \ | ||
| 114 | -Waggregate-return \ | ||
| 115 | -Wstrict-prototypes \ | ||
| 116 | -Wold-style-definition \ | ||
| 117 | -Wmissing-prototypes \ | ||
| 118 | -Wmissing-declarations \ | ||
| 119 | -Wmissing-noreturn \ | ||
| 120 | -Wmissing-format-attribute \ | ||
| 121 | -Wpacked \ | ||
| 122 | -Wpadded \ | ||
| 123 | -Wredundant-decls \ | ||
| 124 | -Wnested-externs \ | ||
| 125 | -Wunreachable-code \ | ||
| 126 | -Winline \ | ||
| 127 | -Winvalid-pch \ | ||
| 128 | -Wlong-long \ | ||
| 129 | -Wvla \ | ||
| 130 | -Wvolatile-register-var \ | ||
| 131 | -Wdisabled-optimization \ | ||
| 132 | -Wstack-protector \ | ||
| 133 | -Woverlength-strings \ | ||
| 134 | -Wbuiltin-macro-redefined \ | 91 | -Wbuiltin-macro-redefined \ |
| 135 | -Wmudflap \ | 92 | -Wcast-align \ |
| 136 | -Wpacked-bitfield-compat \ | 93 | -Wchar-subscripts \ |
| 137 | -Wsync-nand \ | 94 | -Wclobbered \ |
| 138 | ; do | 95 | -Wcomment \ |
| 139 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | 96 | -Wcomments \ |
| 140 | done | ||
| 141 | # The following are not documented in the manual but are included in | ||
| 142 | # output from gcc --help=warnings. | ||
| 143 | for gl_manywarn_item in \ | ||
| 144 | -Wattributes \ | ||
| 145 | -Wcoverage-mismatch \ | 97 | -Wcoverage-mismatch \ |
| 146 | -Wunused-macros \ | ||
| 147 | ; do | ||
| 148 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | ||
| 149 | done | ||
| 150 | # More warnings from gcc 4.6.2 --help=warnings. | ||
| 151 | for gl_manywarn_item in \ | ||
| 152 | -Wabi \ | ||
| 153 | -Wcpp \ | 98 | -Wcpp \ |
| 154 | -Wdeprecated \ | 99 | -Wdeprecated \ |
| 155 | -Wdeprecated-declarations \ | 100 | -Wdeprecated-declarations \ |
| 101 | -Wdisabled-optimization \ | ||
| 156 | -Wdiv-by-zero \ | 102 | -Wdiv-by-zero \ |
| 157 | -Wdouble-promotion \ | 103 | -Wdouble-promotion \ |
| 104 | -Wempty-body \ | ||
| 158 | -Wendif-labels \ | 105 | -Wendif-labels \ |
| 106 | -Wenum-compare \ | ||
| 159 | -Wextra \ | 107 | -Wextra \ |
| 160 | -Wformat-contains-nul \ | 108 | -Wformat-contains-nul \ |
| 161 | -Wformat-extra-args \ | 109 | -Wformat-extra-args \ |
| 110 | -Wformat-nonliteral \ | ||
| 111 | -Wformat-security \ | ||
| 112 | -Wformat-y2k \ | ||
| 162 | -Wformat-zero-length \ | 113 | -Wformat-zero-length \ |
| 163 | -Wformat=2 \ | 114 | -Wformat=2 \ |
| 115 | -Wfree-nonheap-object \ | ||
| 116 | -Wignored-qualifiers \ | ||
| 117 | -Wimplicit \ | ||
| 118 | -Wimplicit-function-declaration \ | ||
| 119 | -Wimplicit-int \ | ||
| 120 | -Winit-self \ | ||
| 121 | -Winline \ | ||
| 122 | -Wint-to-pointer-cast \ | ||
| 123 | -Winvalid-memory-model \ | ||
| 124 | -Winvalid-pch \ | ||
| 125 | -Wjump-misses-init \ | ||
| 126 | -Wlogical-op \ | ||
| 127 | -Wmain \ | ||
| 128 | -Wmaybe-uninitialized \ | ||
| 129 | -Wmissing-braces \ | ||
| 130 | -Wmissing-declarations \ | ||
| 131 | -Wmissing-field-initializers \ | ||
| 132 | -Wmissing-format-attribute \ | ||
| 133 | -Wmissing-include-dirs \ | ||
| 134 | -Wmissing-noreturn \ | ||
| 135 | -Wmissing-parameter-type \ | ||
| 136 | -Wmissing-prototypes \ | ||
| 137 | -Wmudflap \ | ||
| 164 | -Wmultichar \ | 138 | -Wmultichar \ |
| 139 | -Wnarrowing \ | ||
| 140 | -Wnested-externs \ | ||
| 141 | -Wnonnull \ | ||
| 165 | -Wnormalized=nfc \ | 142 | -Wnormalized=nfc \ |
| 143 | -Wold-style-declaration \ | ||
| 144 | -Wold-style-definition \ | ||
| 166 | -Woverflow \ | 145 | -Woverflow \ |
| 146 | -Woverlength-strings \ | ||
| 147 | -Woverride-init \ | ||
| 148 | -Wpacked \ | ||
| 149 | -Wpacked-bitfield-compat \ | ||
| 150 | -Wparentheses \ | ||
| 151 | -Wpointer-arith \ | ||
| 152 | -Wpointer-sign \ | ||
| 167 | -Wpointer-to-int-cast \ | 153 | -Wpointer-to-int-cast \ |
| 168 | -Wpragmas \ | 154 | -Wpragmas \ |
| 155 | -Wreturn-type \ | ||
| 156 | -Wsequence-point \ | ||
| 157 | -Wshadow \ | ||
| 158 | -Wsizeof-pointer-memaccess \ | ||
| 159 | -Wstack-protector \ | ||
| 160 | -Wstrict-aliasing \ | ||
| 161 | -Wstrict-overflow \ | ||
| 162 | -Wstrict-prototypes \ | ||
| 169 | -Wsuggest-attribute=const \ | 163 | -Wsuggest-attribute=const \ |
| 164 | -Wsuggest-attribute=format \ | ||
| 170 | -Wsuggest-attribute=noreturn \ | 165 | -Wsuggest-attribute=noreturn \ |
| 171 | -Wsuggest-attribute=pure \ | 166 | -Wsuggest-attribute=pure \ |
| 167 | -Wswitch \ | ||
| 168 | -Wswitch-default \ | ||
| 169 | -Wsync-nand \ | ||
| 170 | -Wsystem-headers \ | ||
| 172 | -Wtrampolines \ | 171 | -Wtrampolines \ |
| 172 | -Wtrigraphs \ | ||
| 173 | -Wtype-limits \ | ||
| 174 | -Wuninitialized \ | ||
| 175 | -Wunknown-pragmas \ | ||
| 176 | -Wunreachable-code \ | ||
| 177 | -Wunsafe-loop-optimizations \ | ||
| 178 | -Wunused \ | ||
| 179 | -Wunused-but-set-parameter \ | ||
| 180 | -Wunused-but-set-variable \ | ||
| 181 | -Wunused-function \ | ||
| 182 | -Wunused-label \ | ||
| 183 | -Wunused-local-typedefs \ | ||
| 184 | -Wunused-macros \ | ||
| 185 | -Wunused-parameter \ | ||
| 186 | -Wunused-result \ | ||
| 187 | -Wunused-value \ | ||
| 188 | -Wunused-variable \ | ||
| 189 | -Wvarargs \ | ||
| 190 | -Wvariadic-macros \ | ||
| 191 | -Wvector-operation-performance \ | ||
| 192 | -Wvla \ | ||
| 193 | -Wvolatile-register-var \ | ||
| 194 | -Wwrite-strings \ | ||
| 195 | \ | ||
| 173 | ; do | 196 | ; do |
| 174 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | 197 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" |
| 175 | done | 198 | done |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 12273ec7853..4ceb74ed0b5 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2012-09-02 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * config.nt: Sync with autogen/config.in. | ||
| 4 | (HAVE_EXECINFO_H, TERM_HEADER): New macros. | ||
| 5 | |||
| 6 | 2012-09-01 Daniel Colascione <dancol@dancol.org> | ||
| 7 | |||
| 8 | * inc/ms-w32.h (TERM_HEADER): Add for refactoring | ||
| 9 | |||
| 10 | 2012-08-22 Juanma Barranquero <lekktu@gmail.com> | ||
| 11 | |||
| 12 | * config.nt: Sync with autogen/config.in. | ||
| 13 | |||
| 1 | 2012-08-17 Juanma Barranquero <lekktu@gmail.com> | 14 | 2012-08-17 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 15 | ||
| 3 | * config.nt: Sync with autogen/config.in. | 16 | * config.nt: Sync with autogen/config.in. |
diff --git a/nt/config.nt b/nt/config.nt index 5181e09e64e..7658275f2d6 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -364,6 +364,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 364 | /* Define to 1 if you have the `euidaccess' function. */ | 364 | /* Define to 1 if you have the `euidaccess' function. */ |
| 365 | #undef HAVE_EUIDACCESS | 365 | #undef HAVE_EUIDACCESS |
| 366 | 366 | ||
| 367 | /* Define to 1 if you have the <execinfo.h> header file. */ | ||
| 368 | #define HAVE_EXECINFO_H 1 | ||
| 369 | |||
| 367 | /* Define to 1 if you have the <fcntl.h> header file. */ | 370 | /* Define to 1 if you have the <fcntl.h> header file. */ |
| 368 | #undef HAVE_FCNTL_H | 371 | #undef HAVE_FCNTL_H |
| 369 | 372 | ||
| @@ -1352,6 +1355,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1352 | /* Define to 1 if you use terminfo instead of termcap. */ | 1355 | /* Define to 1 if you use terminfo instead of termcap. */ |
| 1353 | #undef TERMINFO | 1356 | #undef TERMINFO |
| 1354 | 1357 | ||
| 1358 | /* Define to the header for the built-in window system. */ | ||
| 1359 | #undef TERM_HEADER | ||
| 1360 | |||
| 1355 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | 1361 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ |
| 1356 | #define TIME_WITH_SYS_TIME 1 | 1362 | #define TIME_WITH_SYS_TIME 1 |
| 1357 | 1363 | ||
| @@ -1563,20 +1569,34 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1563 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ | 1569 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ |
| 1564 | # define _GL_INLINE inline | 1570 | # define _GL_INLINE inline |
| 1565 | # define _GL_EXTERN_INLINE extern inline | 1571 | # define _GL_EXTERN_INLINE extern inline |
| 1566 | # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | 1572 | #elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) |
| 1567 | # define _GL_INLINE_HEADER_BEGIN \ | 1573 | # if __GNUC_GNU_INLINE__ |
| 1568 | _Pragma ("GCC diagnostic push") \ | 1574 | /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ |
| 1569 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | 1575 | # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) |
| 1570 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") | 1576 | # else |
| 1571 | # define _GL_INLINE_HEADER_END \ | 1577 | # define _GL_INLINE extern inline |
| 1572 | _Pragma ("GCC diagnostic pop") | ||
| 1573 | # endif | 1578 | # endif |
| 1579 | # define _GL_EXTERN_INLINE extern | ||
| 1574 | #else | 1580 | #else |
| 1575 | # define _GL_INLINE static inline | 1581 | # define _GL_INLINE static inline |
| 1576 | # define _GL_EXTERN_INLINE static inline | 1582 | # define _GL_EXTERN_INLINE static inline |
| 1577 | #endif | 1583 | #endif |
| 1578 | 1584 | ||
| 1579 | #ifndef _GL_INLINE_HEADER_BEGIN | 1585 | #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) |
| 1586 | # if __GNUC_STDC_INLINE__ | ||
| 1587 | # define _GL_INLINE_HEADER_CONST_PRAGMA | ||
| 1588 | # else | ||
| 1589 | # define _GL_INLINE_HEADER_CONST_PRAGMA \ | ||
| 1590 | _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") | ||
| 1591 | # endif | ||
| 1592 | # define _GL_INLINE_HEADER_BEGIN \ | ||
| 1593 | _Pragma ("GCC diagnostic push") \ | ||
| 1594 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ | ||
| 1595 | _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ | ||
| 1596 | _GL_INLINE_HEADER_CONST_PRAGMA | ||
| 1597 | # define _GL_INLINE_HEADER_END \ | ||
| 1598 | _Pragma ("GCC diagnostic pop") | ||
| 1599 | #else | ||
| 1580 | # define _GL_INLINE_HEADER_BEGIN | 1600 | # define _GL_INLINE_HEADER_BEGIN |
| 1581 | # define _GL_INLINE_HEADER_END | 1601 | # define _GL_INLINE_HEADER_END |
| 1582 | #endif | 1602 | #endif |
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 022b168c0b8..8945fb7be4d 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h | |||
| @@ -424,4 +424,7 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 424 | #define DebPrint(stuff) | 424 | #define DebPrint(stuff) |
| 425 | #endif | 425 | #endif |
| 426 | 426 | ||
| 427 | #define TERM_HEADER "w32term.h" | ||
| 428 | |||
| 429 | |||
| 427 | /* ============================================================ */ | 430 | /* ============================================================ */ |
diff --git a/src/.gdbinit b/src/.gdbinit index b703842f4cf..de980c6345f 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -18,9 +18,9 @@ | |||
| 18 | # Boston, MA 02110-1301, USA. | 18 | # Boston, MA 02110-1301, USA. |
| 19 | 19 | ||
| 20 | # Force loading of symbols, enough to give us VALBITS etc. | 20 | # Force loading of symbols, enough to give us VALBITS etc. |
| 21 | set main | 21 | set $dummy = main + 8 |
| 22 | # With some compilers, we need this to give us struct Lisp_Symbol etc.: | 22 | # With some compilers, we need this to give us struct Lisp_Symbol etc.: |
| 23 | set Fmake_symbol | 23 | set $dummy = Fmake_symbol + 8 |
| 24 | 24 | ||
| 25 | # Find lwlib source files too. | 25 | # Find lwlib source files too. |
| 26 | dir ../lwlib | 26 | dir ../lwlib |
diff --git a/src/ChangeLog b/src/ChangeLog index 1e25015da20..a8d6a4026a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,738 @@ | |||
| 1 | 2012-09-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Be more systematic about _setjmp vs setjmp. | ||
| 4 | * alloc.c (test_setjmp, mark_stack): | ||
| 5 | * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]: | ||
| 6 | (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]: | ||
| 7 | (png_load, my_error_exit, jpeg_load): | ||
| 8 | * process.c (send_process_trap, send_process): | ||
| 9 | Uniformly prefer _setjmp and _longjmp to setjmp and longjmp. | ||
| 10 | The underscored versions are up to 30x faster on some hosts. | ||
| 11 | Formerly, the code used setjmp+longjmp sometimes and | ||
| 12 | _setjmp+_longjmp at other times, with no particular reason to | ||
| 13 | prefer setjmp+longjmp. | ||
| 14 | |||
| 15 | 2012-09-03 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Fix minor problem found by static checking. | ||
| 18 | * buffer.c (Fdelete_all_overlays): Return nil. | ||
| 19 | |||
| 20 | 2012-09-03 Martin Rudalics <rudalics@gmx.at> | ||
| 21 | |||
| 22 | * buffer.c (Fdelete_all_overlays): New function. | ||
| 23 | |||
| 24 | 2012-09-03 Chong Yidong <cyd@gnu.org> | ||
| 25 | |||
| 26 | * gtkutil.c: Add extern decl for Qxft. | ||
| 27 | |||
| 28 | 2012-09-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 29 | |||
| 30 | * emacs.c, eval.c: Use bool for boolean. | ||
| 31 | * emacs.c (initialized, inhibit_window_system, running_asynch_code): | ||
| 32 | (malloc_using_checking) [DOUG_LEA_MALLOC]: | ||
| 33 | (display_arg) [HAVE_X_WINDOWS || HAVE_NS]: | ||
| 34 | (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch) | ||
| 35 | (main, decode_env_path, Fdaemon_initialized): | ||
| 36 | * eval.c (call_debugger, Finteractive_p, interactive_p): | ||
| 37 | (unwind_to_catch, Fsignal, wants_debugger, skip_debugger) | ||
| 38 | (maybe_call_debugger, Fbacktrace): | ||
| 39 | * process.c (read_process_output, exec_sentinel): | ||
| 40 | Use bool for booleans. | ||
| 41 | * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X. | ||
| 42 | All callers changed. | ||
| 43 | * eval.c (interactive_p): Omit always-true boolean argument | ||
| 44 | EXCLUDE_SUBRS_P. All callers changed. | ||
| 45 | * dispextern.h, lisp.h: Reflect above API changes. | ||
| 46 | * firstfile.c (dummy): Use the address of 'main', whose signature | ||
| 47 | won't change, instead of the address of 'initialize', whose | ||
| 48 | signature just changed from int to bool. | ||
| 49 | * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ... | ||
| 50 | * msdos.c (fatal_error_in_progress): ... from here. | ||
| 51 | * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead | ||
| 52 | of incrementing it. | ||
| 53 | (redisplay_internal, unwind_redisplay): Simply clear | ||
| 54 | REDISPLAYING_P when unwinding, instead of saving its previous, | ||
| 55 | always-false value and then restoring it. | ||
| 56 | |||
| 57 | Clean up some extern decls. | ||
| 58 | Mostly, this hoists extern decls out of .c files and into .h files. | ||
| 59 | That way, we're more likely to catch errors if the interfaces change. | ||
| 60 | * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not | ||
| 61 | declare xg_mark_data. | ||
| 62 | * dispextern.h (x_frame_parm_handlers): | ||
| 63 | * font.h (Qxft): | ||
| 64 | * lisp.h (Qlexical_binding, Qinternal_interpreter_environment) | ||
| 65 | (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold) | ||
| 66 | (Qultra_bold, Qoblique, Qitalic): | ||
| 67 | Move extern decl here from .c file. | ||
| 68 | * alloc.c (xg_mark_data) [USE_GTK]: | ||
| 69 | * doc.c (Qclosure): | ||
| 70 | * eval.c (Qlexical_binding): | ||
| 71 | * fns.c (time) [!HAVE_UNISTD_H]: | ||
| 72 | * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light) | ||
| 73 | (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic): | ||
| 74 | * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]: | ||
| 75 | * lread.c (Qinternal_interpreter_environment): | ||
| 76 | * minibuf.c (Qbuffer): | ||
| 77 | * process.c (QCfamily, QCfilter): | ||
| 78 | * widget.c (free_frame_faces): | ||
| 79 | * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]: | ||
| 80 | * xfont.c (x_clear_errors): | ||
| 81 | * xterm.c (x_frame_parm_handlers): | ||
| 82 | Remove now-redundant extern decls. | ||
| 83 | * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]: | ||
| 84 | * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic): | ||
| 85 | Now static. | ||
| 86 | * xfaces.c: Remove unnecessary static decls. | ||
| 87 | * xterm.c (updating_frame): Remove decl of nonexistent object. | ||
| 88 | |||
| 89 | * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS) | ||
| 90 | when building globals.h, as the objects that are not built on | ||
| 91 | this host are not needed to compile C files on this host. | ||
| 92 | |||
| 93 | 2012-09-02 Jan Djärv <jan.h.d@swipnet.se> | ||
| 94 | |||
| 95 | * gtkutil.h: Remove prototype for x_wm_set_size_hint. | ||
| 96 | |||
| 97 | * frame.h: Add missing prototype for x_wm_set_size_hint. | ||
| 98 | |||
| 99 | 2012-09-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 100 | |||
| 101 | * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean. | ||
| 102 | * doc.c (read_bytecode_char, get_doc_string, reread_doc_file) | ||
| 103 | (Fdocumentation, Fdocumentation_property, Fsnarf_documentation) | ||
| 104 | (Fsubstitute_command_keys): | ||
| 105 | * editfns.c (region_limit, find_field, Fconstrain_to_field) | ||
| 106 | (save_excursion_save, save_excursion_restore) | ||
| 107 | (disassemble_lisp_time, decode_time_components, emacs_nmemftime) | ||
| 108 | (format_time_string, general_insert_function) | ||
| 109 | (make_buffer_string, make_buffer_string_both) | ||
| 110 | (Fsubst_char_in_region, Ftranslate_region_internal, Fformat): | ||
| 111 | * insdel.c (check_markers, gap_left, adjust_markers_for_insert) | ||
| 112 | (copy_text, insert_1, insert_1_both, insert_from_string) | ||
| 113 | (insert_from_string_before_markers, insert_from_string_1) | ||
| 114 | (insert_from_buffer, insert_from_buffer_1, replace_range) | ||
| 115 | (replace_range_2, del_range_1, del_range_byte, del_range_both) | ||
| 116 | (del_range_2, modify_region): | ||
| 117 | * intervals.c (intervals_equal, balance_possible_root_interval) | ||
| 118 | (adjust_intervals_for_insertion, merge_properties_sticky) | ||
| 119 | (graft_intervals_into_buffer, lookup_char_property) | ||
| 120 | (adjust_for_invis_intang, set_point_both) | ||
| 121 | (get_property_and_range, compare_string_intervals) | ||
| 122 | (set_intervals_multibyte_1, set_intervals_multibyte): | ||
| 123 | * keyboard.c (decode_timer): | ||
| 124 | Use bool for boolean. | ||
| 125 | * intervals.h, lisp.h, systime.h: Reflect above API changes. | ||
| 126 | * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans. | ||
| 127 | |||
| 128 | 2012-09-02 Chong Yidong <cyd@gnu.org> | ||
| 129 | |||
| 130 | * keymap.c (push_key_description): Print M-TAB as C-M-i | ||
| 131 | (Bug#11758). | ||
| 132 | |||
| 133 | 2012-09-02 Juanma Barranquero <lekktu@gmail.com> | ||
| 134 | |||
| 135 | * makefile.w32-in (CCL_H, W32FONT_H): New macros. | ||
| 136 | (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O)) | ||
| 137 | ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O)) | ||
| 138 | ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O)) | ||
| 139 | ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O)) | ||
| 140 | ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O)) | ||
| 141 | ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies. | ||
| 142 | |||
| 143 | 2012-09-01 Eli Zaretskii <eliz@gnu.org> | ||
| 144 | |||
| 145 | * w32uniscribe.c (uniscribe_shape): Handle correctly the case of | ||
| 146 | more than one grapheme cluster passed to the shaper: compute the | ||
| 147 | offset adjustment values separately for each cluster. (Bug#11860) | ||
| 148 | |||
| 149 | * image.c: Restore mistakenly removed inclusion of w32.h. Without | ||
| 150 | it, GCC doesn't see prototypes of w32_delayed_load, and complains | ||
| 151 | about implicit conversions from integer to pointer. | ||
| 152 | |||
| 153 | 2012-09-01 Daniel Colascione <dancol@dancol.org> | ||
| 154 | |||
| 155 | * w32fns.c (x_display_info_for_name): Prevent crash if w32 window | ||
| 156 | system used too early. | ||
| 157 | |||
| 158 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | ||
| 159 | |||
| 160 | Better seed support for (random). | ||
| 161 | * emacs.c (main): Call init_random. | ||
| 162 | * fns.c (Frandom): Set the seed from a string argument, if given. | ||
| 163 | Remove long-obsolete Gentzel cruft. | ||
| 164 | * lisp.h, sysdep.c (seed_random): Now takes address and size, not long. | ||
| 165 | (init_random): New function. | ||
| 166 | |||
| 167 | 2012-09-01 Daniel Colascione <dancol@dancol.org> | ||
| 168 | |||
| 169 | * xterm.h: Add header guards. Declare x_menubar_window_to_frame. | ||
| 170 | Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible, | ||
| 171 | x_make_frame_invisible, x_iconify_frame, x_free_frame_resources, | ||
| 172 | x_wm_set_size_hint, x_query_colors, x_real_positions, | ||
| 173 | x_set_menu_bar_lines, x_char_width, x_char_height, x_sync, | ||
| 174 | x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar, | ||
| 175 | all of which have been moved to common code. | ||
| 176 | |||
| 177 | * xfaces.c: Include TERM_HEADER instead of listing all possible | ||
| 178 | window-system headers. | ||
| 179 | |||
| 180 | * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here) | ||
| 181 | to match header. | ||
| 182 | |||
| 183 | * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of | ||
| 184 | directly accessing frame internals. | ||
| 185 | |||
| 186 | * w32font.h: Include font.h. Define syms_of_w32font and | ||
| 187 | globals_of_w32font. | ||
| 188 | |||
| 189 | * process.c: Include TERM_HEADER instead of listing all possible | ||
| 190 | window-system headers. | ||
| 191 | |||
| 192 | * nsterm.h: Remove declarations now in frame.h. Define | ||
| 193 | FRAME_X_SCREEN, FRAME_X_VISUAL. | ||
| 194 | |||
| 195 | * menu.c: Include TERM_HEADER instead of listing all possible | ||
| 196 | window-system headers. | ||
| 197 | |||
| 198 | * keyboard.h: Declare ignore_mouse_drag_p whenever we have a | ||
| 199 | window system. | ||
| 200 | |||
| 201 | * keyboard.c: Include TERM_HEADER instead of listing all possible | ||
| 202 | window-system headers. | ||
| 203 | |||
| 204 | * image.c: Include TERM_HEADER instead of listing all possible | ||
| 205 | window-system headers. Declare Vlibrary_cache when compiling for | ||
| 206 | Windows. | ||
| 207 | |||
| 208 | * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed | ||
| 209 | window system declarations. | ||
| 210 | |||
| 211 | * frame.h: Move common functions here: set_frame_menubar, | ||
| 212 | x_set_window_size, x_sync, x_get_focus_frame, | ||
| 213 | x_set_mouse_position, x_set_mouse_pixel_position, | ||
| 214 | x_make_frame_visible, x_make_frame_invisible, x_iconify_frame, | ||
| 215 | x_char_width, x_char_height, x_pixel_width, x_pixel_height, | ||
| 216 | x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines, | ||
| 217 | x_activate_menubar, x_real_positions, x_bitmap_icon, | ||
| 218 | x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources, | ||
| 219 | and x_query_colors. | ||
| 220 | |||
| 221 | * frame.c: Include TERM_HEADER instead of listing all possible | ||
| 222 | window-system headers. | ||
| 223 | |||
| 224 | * font.c: Include TERM_HEADER instead of listing all possible | ||
| 225 | window-system headers. | ||
| 226 | |||
| 227 | * emacs.c: Include TERM_HEADER. | ||
| 228 | |||
| 229 | * dispnew.c: Include TERM_HEADER instead of listing all possible | ||
| 230 | window-system headers. | ||
| 231 | |||
| 232 | * ccl.h: Include character.h. | ||
| 233 | |||
| 234 | * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for | ||
| 235 | the current window system; include in list of objects to link into | ||
| 236 | Emacs. | ||
| 237 | |||
| 238 | 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 239 | |||
| 240 | Remove mark_ttys function and fix tty_display_info initialization. | ||
| 241 | * lisp.h (mark_ttys): Remove prototype. | ||
| 242 | * alloc.c (Fgarbage_collect): Remove redundant (and the only) call | ||
| 243 | to mark_ttys because all possible values of 'top_frame' slot are | ||
| 244 | the frames which are reachable from Vframe_list. | ||
| 245 | * term.c (mark_ttys): Remove. | ||
| 246 | (init_tty): Safely initialize 'top_frame' slot with Qnil. | ||
| 247 | |||
| 248 | 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 249 | |||
| 250 | Change struct frame bitfields from unsigned char to unsigned. | ||
| 251 | * frame.h (struct frame): Change type of 'display_preempted', | ||
| 252 | 'visible', 'iconified', 'has_minibuffer', 'wants_modeline', | ||
| 253 | 'auto_raise', 'auto_lower', 'no_split', 'explicit_name', | ||
| 254 | 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible' | ||
| 255 | bitfields from unsigned char to unsigned. | ||
| 256 | |||
| 257 | 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 258 | |||
| 259 | Remove unused member of struct x_output and struct w32_output. | ||
| 260 | * xterm.h (struct x_output): Remove unused field 'needs_exposure'. | ||
| 261 | * w32term.h (struct w32_output): Likewise. | ||
| 262 | |||
| 263 | 2012-08-30 Jan Djärv <jan.h.d@swipnet.se> | ||
| 264 | |||
| 265 | * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it | ||
| 266 | does not become zero (Bug#12234). | ||
| 267 | |||
| 268 | 2012-08-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 269 | |||
| 270 | * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow | ||
| 271 | for GCC 4.7.1 x86-64. | ||
| 272 | |||
| 273 | 2012-08-30 Glenn Morris <rgm@gnu.org> | ||
| 274 | |||
| 275 | * lread.c (init_lread): For out-of-tree builds, only add the | ||
| 276 | source directory's site-lisp dir to the load-path if it exists, | ||
| 277 | consistent with in-tree builds. (Bug#12302) | ||
| 278 | |||
| 279 | 2012-08-28 Jan Djärv <jan.h.d@swipnet.se> | ||
| 280 | |||
| 281 | * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize | ||
| 282 | button_values to NULL. Call setStykeMask so dialogs get a close button. | ||
| 283 | (windowShouldClose:): Set window_closed. | ||
| 284 | (dealloc): New member, free button_values. | ||
| 285 | (process_dialog:): Make member function. Remove window argument, | ||
| 286 | replace window with self. Count buttons and allocate and store values | ||
| 287 | in button_values. | ||
| 288 | (addButton:value:row:): value is int with the name tag. Call setTag | ||
| 289 | with tag. Remove return self, declare return value as void. | ||
| 290 | (addString:row:): Remove return self, declare return value as void. | ||
| 291 | (addSplit): Remove return self, declare return value as void. | ||
| 292 | (clicked:): Remove return self, declare return value as void. | ||
| 293 | Set dialog_return to button_values[seltag]. Code formatting change. | ||
| 294 | (initFromContents:isQuestion:): Adjust call to process_dialog. | ||
| 295 | Code formatting change. | ||
| 296 | (timeout_handler:): Set timer_fired to YES. | ||
| 297 | (runDialogAt:): Set timer_fired to NO. | ||
| 298 | Handle click on close button as quit. | ||
| 299 | |||
| 300 | * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL. | ||
| 301 | Add window_closed and button_values. Add void as return value for | ||
| 302 | add(Button|String|Split). addButton takes int instead of Lisp_Object. | ||
| 303 | Add process_dialog as new member. | ||
| 304 | |||
| 305 | 2012-08-28 Eli Zaretskii <eliz@gnu.org> | ||
| 306 | |||
| 307 | * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it | ||
| 308 | is not one of the heaps we manage. (Bug#12242) | ||
| 309 | |||
| 310 | 2012-08-28 Glenn Morris <rgm@gnu.org> | ||
| 311 | |||
| 312 | * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747) | ||
| 313 | |||
| 314 | 2012-08-28 Martin Rudalics <rudalics@gmx.at> | ||
| 315 | |||
| 316 | * window.c (Fset_window_configuration): Remove handling of | ||
| 317 | auto-buffer-name window parameter. Install revision of reverted | ||
| 318 | fix. | ||
| 319 | |||
| 320 | 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 321 | |||
| 322 | Do not allow to set major mode for a dead buffer. | ||
| 323 | * buffer.c (Fset_buffer_major_mode): Signal an error | ||
| 324 | if the buffer is dead. | ||
| 325 | (Fother_buffer, other_buffer_safely): Remove redundant | ||
| 326 | nested declaration. | ||
| 327 | |||
| 328 | 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 329 | |||
| 330 | Always use set_buffer_if_live to restore original buffer at unwind. | ||
| 331 | * buffer.h (record_unwind_current_buffer): New function. | ||
| 332 | * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c: | ||
| 333 | * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c: | ||
| 334 | * undo.c, window.c: Adjust users. | ||
| 335 | * buffer.c (set_buffer_if_live): Fix comment. | ||
| 336 | |||
| 337 | 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 338 | |||
| 339 | Fix usage of set_buffer_internal. | ||
| 340 | * buffer.h (set_buffer_internal): Make it BUFFER_INLINE. | ||
| 341 | * buffer.c (set_buffer_if_live): Use set_buffer_internal. | ||
| 342 | * coding.c (decode_coding): Omit redundant test. | ||
| 343 | * fileio.c (decide_coding_unwind): Likewise. | ||
| 344 | * fns.c (secure_hash): Likewise. | ||
| 345 | * insdel.c (modify_region): Likewise. | ||
| 346 | * keyboard.c (command_loop_1): Likewise. | ||
| 347 | * print.c (PRINTFINISH): Likewise. | ||
| 348 | * xdisp.c (run_window_scroll_functions): Use set_buffer_internal. | ||
| 349 | |||
| 350 | 2012-08-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 351 | |||
| 352 | * dispnew.c: Use bool for boolean. | ||
| 353 | (frame_garbaged, display_completed, delayed_size_change) | ||
| 354 | (fonts_changed_p, add_window_display_history) | ||
| 355 | (add_frame_display_history, verify_row_hash) | ||
| 356 | (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p) | ||
| 357 | (row_equal_p, realloc_glyph_pool) | ||
| 358 | (allocate_matrices_for_frame_redisplay) | ||
| 359 | (showing_window_margins_p) | ||
| 360 | (adjust_frame_glyphs_for_frame_redisplay) | ||
| 361 | (build_frame_matrix_from_leaf_window, make_current) | ||
| 362 | (mirrored_line_dance, mirror_line_dance, update_frame) | ||
| 363 | (update_window_tree, update_single_window) | ||
| 364 | (check_current_matrix_flags, update_window, update_text_area) | ||
| 365 | (update_window_line, set_window_update_flags, scrolling_window) | ||
| 366 | (update_frame_1, scrolling, buffer_posn_from_coords) | ||
| 367 | (do_pending_window_change, change_frame_size) | ||
| 368 | (change_frame_size_1, sit_for): | ||
| 369 | Use bool for boolean. | ||
| 370 | (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows, | ||
| 371 | and remove last int (actually boolean) argument, which was always 0. | ||
| 372 | All callers changed. | ||
| 373 | * dispextern.h, frame.h, lisp.h: Reflect above API changes. | ||
| 374 | * dispextern.h (struct composition_it): Use bool for boolean. | ||
| 375 | (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'. | ||
| 376 | (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf. | ||
| 377 | * dired.c (file_name_completion): | ||
| 378 | Use bool for boolean. (This was missed in an earlier change.) | ||
| 379 | |||
| 380 | 2012-08-27 Martin Rudalics <rudalics@gmx.at> | ||
| 381 | |||
| 382 | * window.c (Fset_window_configuration): Revert first part of | ||
| 383 | last change. | ||
| 384 | |||
| 385 | 2012-08-27 Jan Djärv <jan.h.d@swipnet.se> | ||
| 386 | |||
| 387 | * nsterm.h (NSPanel): New class variable dialog_return. | ||
| 388 | |||
| 389 | * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize | ||
| 390 | dialog_return. | ||
| 391 | (windowShouldClose:): Use stop instead of stopModalWithCode. | ||
| 392 | (clicked:): Ditto, and also set dialog_return (Bug#12258). | ||
| 393 | (timeout_handler:): Use stop instead of abortModal. Send a dummy | ||
| 394 | event. | ||
| 395 | (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when | ||
| 396 | modal loop returns. | ||
| 397 | |||
| 398 | 2012-08-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 399 | |||
| 400 | * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans. | ||
| 401 | * composite.c (find_composition, composition_gstring_p) | ||
| 402 | (composition_reseat_it, find_automatic_composition): | ||
| 403 | * data.c (let_shadows_buffer_binding_p) | ||
| 404 | (let_shadows_global_binding_p, set_internal, make_blv) | ||
| 405 | (Fmake_variable_buffer_local, Fmake_local_variable) | ||
| 406 | (Fmake_variable_frame_local, arithcompare, cons_to_unsigned) | ||
| 407 | (cons_to_signed, arith_driver): | ||
| 408 | * dbusbind.c (xd_in_read_queued_messages): | ||
| 409 | * dired.c (directory_files_internal, file_name_completion): | ||
| 410 | Use bool for booleans. | ||
| 411 | * dired.c (file_name_completion): | ||
| 412 | * process.h (fd_callback): | ||
| 413 | Omit int (actually boolean) argument. It wasn't being used. | ||
| 414 | All uses changed. | ||
| 415 | * composite.h, lisp.h: Reflect above API changes. | ||
| 416 | |||
| 417 | * cmds.c, coding.c: Use bool for booleans. | ||
| 418 | * cmds.c (move_point, Fself_insert_command): | ||
| 419 | * coding.h (struct composition status, struct coding_system): | ||
| 420 | * coding.c (detect_coding_utf_8, encode_coding_utf_8) | ||
| 421 | (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule) | ||
| 422 | (emacs_mule_char, decode_coding_emacs_mule) | ||
| 423 | (encode_coding_emacs_mule, detect_coding_iso_2022) | ||
| 424 | (decode_coding_iso_2022, encode_invocation_designation) | ||
| 425 | (encode_designation_at_bol, encode_coding_iso_2022) | ||
| 426 | (detect_coding_sjis, detect_coding_big5, decode_coding_sjis) | ||
| 427 | (decode_coding_big5, encode_coding_sjis, encode_coding_big5) | ||
| 428 | (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text) | ||
| 429 | (encode_coding_raw_text, detect_coding_charset) | ||
| 430 | (decode_coding_charset, encode_coding_charset, detect_eol) | ||
| 431 | (detect_coding, get_translation_table, produce_chars) | ||
| 432 | (consume_chars, reused_workbuf_in_use) | ||
| 433 | (make_conversion_work_buffer, code_conversion_save) | ||
| 434 | (decode_coding_object, encode_coding_object) | ||
| 435 | (detect_coding_system, char_encodable_p) | ||
| 436 | (Funencodable_char_position, code_convert_region) | ||
| 437 | (code_convert_string, code_convert_string_norecord) | ||
| 438 | (Fset_coding_system_priority): | ||
| 439 | * fileio.c (Finsert_file_contents): | ||
| 440 | Use bool for booleans. | ||
| 441 | * coding.h, lisp.h: Reflect above API changes. | ||
| 442 | * coding.c: Remove unnecessary static function decls. | ||
| 443 | (detect_coding): Use unsigned, not signed, to copy an unsigned field. | ||
| 444 | (decode_coding, encode_coding, decode_coding_gap): Return 'void', | ||
| 445 | not a boolean 'int', since callers never look at the return value. | ||
| 446 | (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'. | ||
| 447 | * coding.h (decoding_buffer_size, encoding_buffer_size) | ||
| 448 | (emacs_mule_string_char): Remove unused extern decls. | ||
| 449 | (struct iso_2022_spec, struct coding_system): | ||
| 450 | Use 'unsigned int : 1' for boolean fields, since there's more than one. | ||
| 451 | (struct emacs_mule_spec): Remove unused field 'full_support'. | ||
| 452 | All initializations removed. | ||
| 453 | * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'. | ||
| 454 | |||
| 455 | 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 456 | |||
| 457 | Fix spare memory change (Bug#12286). | ||
| 458 | * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE. | ||
| 459 | (valid_lisp_object_p): Likewise. | ||
| 460 | |||
| 461 | 2012-08-27 Martin Rudalics <rudalics@gmx.at> | ||
| 462 | |||
| 463 | * window.c (Fset_window_configuration): Record any window's old | ||
| 464 | buffer if it's replaced (see Bug#8789). If the new current | ||
| 465 | buffer doesn't appear in the selected window, go to its old | ||
| 466 | point (Bug#12208). | ||
| 467 | |||
| 468 | 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 469 | |||
| 470 | Special MEM_TYPE_SPARE to denote reserved memory. | ||
| 471 | * alloc.c (enum mem_type): New memory type. | ||
| 472 | (refill_memory_reserve): Use new type for spare memory. | ||
| 473 | This prevents live_cons_p and live_string_p from incorrect | ||
| 474 | detection of uninitialized objects from spare memory as live. | ||
| 475 | |||
| 476 | 2012-08-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 477 | |||
| 478 | Spelling fixes. | ||
| 479 | * Makefile.in (.PHONY): versioclean -> versionclean. | ||
| 480 | |||
| 481 | Remove unused external symbols. | ||
| 482 | * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector): | ||
| 483 | * window.c (Qwindow_valid_p, decode_valid_window): | ||
| 484 | Now static, not extern. | ||
| 485 | * data.c (Qinterval): Remove; unused. | ||
| 486 | (syms_of_data): Do not define 'interval'. | ||
| 487 | * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons): | ||
| 488 | * window.h (decode_valid_window): | ||
| 489 | Remove decls. | ||
| 490 | |||
| 491 | * character.c, charset.c, chartab.c: Use bool for booleans. | ||
| 492 | * character.c (lisp_string_width, string_count_byte8) | ||
| 493 | (string_escape_byte8): | ||
| 494 | * charset.c (charset_map_loaded, load_charset_map, read_hex): | ||
| 495 | (load_charset_map_from_file, map_charset_chars) | ||
| 496 | (Fdefine_charset_internal, define_charset_internal) | ||
| 497 | (Fdeclare_equiv_charset, find_charsets_in_text) | ||
| 498 | (Ffind_charset_region, char_charset, Fiso_charset): | ||
| 499 | * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range) | ||
| 500 | (sub_char_table_set, sub_char_table_set_range) | ||
| 501 | (char_table_set_range, optimize_sub_char_table) | ||
| 502 | (map_sub_char_table): | ||
| 503 | Use bool for boolean. | ||
| 504 | * character.c (str_to_unibyte): Omit last boolean argument; it was | ||
| 505 | always 0. All callers changed. | ||
| 506 | * character.h, charset.h: Adjust to match previous changes. | ||
| 507 | * character.h (char_printable_p): Remove decl of nonexistent function. | ||
| 508 | * charset.h (struct charset): Members code_linear_p, iso_chars_96, | ||
| 509 | ascii_compatible_p, supplementary_p, compact_codes_p, unified_p | ||
| 510 | are all boolean, so make them single-bit bitfields. | ||
| 511 | |||
| 512 | * lisp.h (ASET): Remove attempt to detect side effects. | ||
| 513 | It was meant to be temporary and it often doesn't work, | ||
| 514 | because when IDX has side effects the behavior of IDX==IDX | ||
| 515 | is undefined. See Stefan Monnier in | ||
| 516 | <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>. | ||
| 517 | |||
| 518 | 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change) | ||
| 519 | |||
| 520 | * lisp.h (functionp): New function (extracted from Ffunctionp). | ||
| 521 | (FUNCTIONP): Use it. | ||
| 522 | * eval.c (Ffunctionp): Use it. | ||
| 523 | |||
| 524 | 2012-08-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 525 | |||
| 526 | * xgselect.c (xg_select): Use auto storage for the GPollFD buffer | ||
| 527 | as that's faster and simpler than static storage. Don't bother | ||
| 528 | with the g_main_context_query overhead if g_main_context_pending | ||
| 529 | says no events are pending. | ||
| 530 | (gfds, gfds_size): Remove these static vars. | ||
| 531 | (xgselect_initialize): Remove; no longer needed. | ||
| 532 | All uses and decls removed. | ||
| 533 | |||
| 534 | * emacs.c (fatal_error_signal_hook): Remove. | ||
| 535 | All uses removed. This leftover from old code was always 0. | ||
| 536 | |||
| 537 | * casefiddle.c, casetab.c, category.c: Use bool for boolean. | ||
| 538 | * casefiddle.c (casify_object, casify_region): | ||
| 539 | * casetab.c (set_case_table): | ||
| 540 | * category.c, category.h (word_boundary_p): | ||
| 541 | * category.h (CHAR_HAS_CATEGORY): | ||
| 542 | Use bool for booleans, instead of int. | ||
| 543 | |||
| 544 | 2012-08-25 Eli Zaretskii <eliz@gnu.org> | ||
| 545 | |||
| 546 | * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h. | ||
| 547 | |||
| 548 | 2012-08-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 549 | |||
| 550 | On assertion failure, print backtrace if available. | ||
| 551 | * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>. | ||
| 552 | (die) [ENABLE_CHECKING]: Print a backtrace if available. | ||
| 553 | * Makefile.in (LIB_EXECINFO): New macro. | ||
| 554 | (LIBES): Use it. | ||
| 555 | |||
| 556 | * bytecode.c, callint.c, callproc.c: Use bool for boolean. | ||
| 557 | * bytecode.c (exec_byte_code): | ||
| 558 | * callint.c (check_mark, Fcall_interactively): | ||
| 559 | * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1) | ||
| 560 | (getenv_internal, sync_process_alive, call_process_exited): | ||
| 561 | * lisp.h (USE_SAFE_ALLOCA): | ||
| 562 | Use bool for booleans, instead of int. | ||
| 563 | * lisp.h, process.h: Adjust prototypes to match above changes. | ||
| 564 | * callint.c (Fcall_interactively): Don't assume the mark's | ||
| 565 | offset fits in 'int'. | ||
| 566 | |||
| 567 | 2012-08-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 568 | |||
| 569 | * buffer.c, buffer.h: Use bool for boolean. | ||
| 570 | * buffer.c (reset_buffer_local_variables) | ||
| 571 | (buffer_lisp_local_variables, Fset_buffer_modified_p) | ||
| 572 | (Frestore_buffer_modified_p, Fset_buffer_multibyte): | ||
| 573 | (overlays_at, overlays_in, mouse_face_overlay_overlaps) | ||
| 574 | (overlay_touches_p, overlay_strings, Foverlay_put) | ||
| 575 | (report_overlay_modification, call_overlay_mod_hooks): | ||
| 576 | (mmap_enlarge, mmap_set_vars): | ||
| 577 | * buffer.h (buffer_has_overlays, uppercasep, lowercasep): | ||
| 578 | Use bool for booleans, instead of int. | ||
| 579 | * buffer.c (compact_buffer, mmap_free_1): Return void, not int, | ||
| 580 | since the 1-or-0 return value is always ignored anyway. | ||
| 581 | (mmap_initialized_p): | ||
| 582 | * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int. | ||
| 583 | * buffer.h, lisp.h: Adjust prototypes to match above changes. | ||
| 584 | |||
| 585 | 2012-08-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 586 | |||
| 587 | * bidi.c: Use bool for boolean. | ||
| 588 | This is a bit more readable, and makes the text segment of bidi.o | ||
| 589 | 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15). | ||
| 590 | Presumably it's faster too. | ||
| 591 | (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level): | ||
| 592 | Now bool. | ||
| 593 | (bidi_cache_find_level_change, bidi_cache_iterator_state) | ||
| 594 | (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes) | ||
| 595 | (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init) | ||
| 596 | (bidi_explicit_dir_char, bidi_level_of_next_char) | ||
| 597 | (bidi_find_other_level_edge, bidi_move_to_visually_next): | ||
| 598 | Use bool for booleans, instead of int. | ||
| 599 | * dispextern.h (bidi_init_it, bidi_paragraph_init) | ||
| 600 | (bidi_unshelve_cache): Adjust decls to match code. | ||
| 601 | |||
| 602 | 2012-08-23 Martin Rudalics <rudalics@gmx.at> | ||
| 603 | |||
| 604 | * keyboard.c (Fposn_at_x_y): Do not allow internal window as | ||
| 605 | argument. | ||
| 606 | |||
| 607 | 2012-08-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 608 | |||
| 609 | * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean. | ||
| 610 | * atimer.h: Include <stdbool.h>. | ||
| 611 | |||
| 612 | 2012-08-22 Dan Nicolaescu <dann@gnu.org> | ||
| 613 | |||
| 614 | * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to | ||
| 615 | compile time tests instead of run time tests on systems that do | ||
| 616 | not use them. | ||
| 617 | (FRAME_MAC_P): Remove leftover from deleted code. | ||
| 618 | * frame.c (syms_of_frame): Remove leftover from deleted code. | ||
| 619 | |||
| 620 | 2012-08-22 Jan Djärv <jan.h.d@swipnet.se> | ||
| 621 | |||
| 622 | * nsterm.m (insertText:): Don't clear modifiers if code is space. | ||
| 623 | |||
| 624 | 2012-08-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 625 | |||
| 626 | * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. | ||
| 627 | Otherwise, the compiler complains about (A?B:C) where B is void | ||
| 628 | and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. | ||
| 629 | (fontset_add): Return void, for FONTSET_ADD. | ||
| 630 | |||
| 631 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> | ||
| 632 | |||
| 633 | * alloc.c: Use bool for booleans. | ||
| 634 | (gc_in_progress, abort_on_gc) | ||
| 635 | (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]: | ||
| 636 | (dont_register_blocks) [GC_MALLOC_CHECK]: | ||
| 637 | (suppress_checking) [ENABLE_CHECKING]: Now bool, not int. | ||
| 638 | (check_string_bytes, make_specified_string, memory_full) | ||
| 639 | (live_string_p, live_cons_p, live_symbol_p, live_float_p) | ||
| 640 | (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object) | ||
| 641 | (mark_stack, valid_pointer_p, make_pure_string) | ||
| 642 | (Fgarbage_collect, survives_gc_p, gc_sweep): | ||
| 643 | Use bool for booleans, instead of int. | ||
| 644 | (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]: | ||
| 645 | Remove unused local. | ||
| 646 | * alloc.c (PURE_POINTER_P): | ||
| 647 | * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean. | ||
| 648 | * editfns.c (Fformat): | ||
| 649 | * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name) | ||
| 650 | (Fdo_auto_save): | ||
| 651 | * fns.c (sweep_weak_table): | ||
| 652 | * lisp.h (suppress_checking, push_message, survives_gc_p) | ||
| 653 | (make_pure_string, gc_in_progress, abort_on_gc): | ||
| 654 | * lread.c (readchar, read1): | ||
| 655 | * print.c (Fprin1_to_string): | ||
| 656 | * xdisp.c (push_message): | ||
| 657 | Use bool for booleans affected directly or indirectly by | ||
| 658 | alloc.c's changes. | ||
| 659 | |||
| 660 | Make recently-introduced setters macros. | ||
| 661 | * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii) | ||
| 662 | (set_fontset_base, set_fontset_frame, set_fontset_nofont_face) | ||
| 663 | (set_fontset_default, set_fontset_fallback): Rename from their | ||
| 664 | upper-case counterparts, and make them functions rather than macros. | ||
| 665 | This is more consistent with the other recently-introduced setters. | ||
| 666 | These don't need to be inline, since they're local. | ||
| 667 | |||
| 668 | 2012-08-21 Jan Djärv <jan.h.d@swipnet.se> | ||
| 669 | |||
| 670 | * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in | ||
| 671 | the loop (Bug#12247). | ||
| 672 | |||
| 673 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> | ||
| 674 | |||
| 675 | * lisp.h (vcopy): Use memcpy rather than our own loop. | ||
| 676 | This fixes a performance regression introduced by the recent | ||
| 677 | addition of vcopy. This means 'vcopy' will need to be modified | ||
| 678 | for a copying collector, but that's OK. Also, tighten the | ||
| 679 | checking in the assertion. | ||
| 680 | |||
| 681 | 2012-08-21 Eli Zaretskii <eliz@gnu.org> | ||
| 682 | |||
| 683 | * w32uniscribe.c (uniscribe_shape): Fix producing gstring | ||
| 684 | components for RTL text (Bug#11860). Adjust X-OFFSET of each | ||
| 685 | non-base glyph for the width of the base character, according to | ||
| 686 | what x_draw_composite_glyph_string_foreground expects. | ||
| 687 | Generate WADJUST value according to composition_gstring_width's | ||
| 688 | expectations, to produce correct width of the composed character. | ||
| 689 | Reverse the sign of the DU offset produced by ScriptPlace. | ||
| 690 | |||
| 691 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> | ||
| 692 | |||
| 693 | * dbusbind.c (xd_remove_watch): Do not assume C99 comments. | ||
| 694 | |||
| 695 | 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 696 | |||
| 697 | Avoid direct writes to contents member of struct Lisp_Vector. | ||
| 698 | * lisp.h (vcopy): New function to copy data into vector. | ||
| 699 | * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET. | ||
| 700 | * fns.c (Ffillarray): Use ASET. | ||
| 701 | * keyboard.c (timer_check_2): Use AREF and ASET. | ||
| 702 | (append_tool_bar_item, Frecent_keys): Use vcopy. | ||
| 703 | * lread.c (read_vector): Use ASET. | ||
| 704 | * msdos.c (Frecent_doskeys): Use vcopy. | ||
| 705 | * xface.c (Finternal_copy_lisp_face): Use vcopy. | ||
| 706 | (Finternal_merge_in_global_face): Use ASET and vcopy. | ||
| 707 | * xfont.c (xfont_list_pattern): Likewise. | ||
| 708 | |||
| 709 | 2012-08-21 Martin Rudalics <rudalics@gmx.at> | ||
| 710 | |||
| 711 | * window.c (Fwindow_point): For the selected window always return | ||
| 712 | the position of its buffer's point. | ||
| 713 | (Fset_window_point): For the selected window always go in its | ||
| 714 | buffer to the specified position. | ||
| 715 | |||
| 716 | 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 717 | |||
| 718 | Setter macros for fontsets. | ||
| 719 | * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII) | ||
| 720 | (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE) | ||
| 721 | (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros. | ||
| 722 | Adjust users. | ||
| 723 | |||
| 724 | 2012-08-20 Glenn Morris <rgm@gnu.org> | ||
| 725 | |||
| 726 | * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): | ||
| 727 | Don't assume that `ln -f' works. | ||
| 728 | |||
| 729 | 2012-08-20 Eli Zaretskii <eliz@gnu.org> | ||
| 730 | |||
| 731 | * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5 | ||
| 732 | and later about non-assignments with no effect. See discussion at | ||
| 733 | http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for | ||
| 734 | details. | ||
| 735 | |||
| 1 | 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru> | 736 | 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 737 | ||
| 3 | Inline setter functions for Lisp_Objects slots of struct specbinding. | 738 | Inline setter functions for Lisp_Objects slots of struct specbinding. |
| @@ -42,6 +777,8 @@ | |||
| 42 | Rely on <config.h> + <unistd.h> to declare 'environ', | 777 | Rely on <config.h> + <unistd.h> to declare 'environ', |
| 43 | as gnulib does this if the system doesn't. | 778 | as gnulib does this if the system doesn't. |
| 44 | * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]: | 779 | * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]: |
| 780 | Remove declaration. MS-Windows declares it on stdlib.h which is | ||
| 781 | included by conf_post.h. | ||
| 45 | * emacs.c (environ) [DOUG_LEA_MALLOC]: | 782 | * emacs.c (environ) [DOUG_LEA_MALLOC]: |
| 46 | * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl. | 783 | * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl. |
| 47 | * vm-limit.c: Include <unistd.h>, for 'environ'. | 784 | * vm-limit.c: Include <unistd.h>, for 'environ'. |
diff --git a/src/Makefile.in b/src/Makefile.in index 01034ca98d5..24c8b94b590 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -159,6 +159,8 @@ DBUS_LIBS = @DBUS_LIBS@ | |||
| 159 | ## dbusbind.o if HAVE_DBUS, else empty. | 159 | ## dbusbind.o if HAVE_DBUS, else empty. |
| 160 | DBUS_OBJ = @DBUS_OBJ@ | 160 | DBUS_OBJ = @DBUS_OBJ@ |
| 161 | 161 | ||
| 162 | LIB_EXECINFO=@LIB_EXECINFO@ | ||
| 163 | |||
| 162 | SETTINGS_CFLAGS = @SETTINGS_CFLAGS@ | 164 | SETTINGS_CFLAGS = @SETTINGS_CFLAGS@ |
| 163 | SETTINGS_LIBS = @SETTINGS_LIBS@ | 165 | SETTINGS_LIBS = @SETTINGS_LIBS@ |
| 164 | 166 | ||
| @@ -209,8 +211,8 @@ LIBXMENU=@LIBXMENU@ | |||
| 209 | 211 | ||
| 210 | ## xmenu.o if HAVE_X_WINDOWS, else empty. | 212 | ## xmenu.o if HAVE_X_WINDOWS, else empty. |
| 211 | XMENU_OBJ=@XMENU_OBJ@ | 213 | XMENU_OBJ=@XMENU_OBJ@ |
| 212 | ## xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o | 214 | ## xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o if |
| 213 | ## xsettings.o xgselect.o if HAVE_X_WINDOWS, else empty. | 215 | ## HAVE_X_WINDOWS, else empty. |
| 214 | XOBJ=@XOBJ@ | 216 | XOBJ=@XOBJ@ |
| 215 | 217 | ||
| 216 | TOOLKIT_LIBW=@TOOLKIT_LIBW@ | 218 | TOOLKIT_LIBW=@TOOLKIT_LIBW@ |
| @@ -245,6 +247,9 @@ WIDGET_OBJ=@WIDGET_OBJ@ | |||
| 245 | ## sheap.o if CYGWIN, otherwise empty. | 247 | ## sheap.o if CYGWIN, otherwise empty. |
| 246 | CYGWIN_OBJ=@CYGWIN_OBJ@ | 248 | CYGWIN_OBJ=@CYGWIN_OBJ@ |
| 247 | 249 | ||
| 250 | ## fontset.o fringe.o image.o if we have any window system | ||
| 251 | WINDOW_SYSTEM_OBJ=@WINDOW_SYSTEM_OBJ@ | ||
| 252 | |||
| 248 | ## dosfns.o msdos.o w16select.o if MSDOS. | 253 | ## dosfns.o msdos.o w16select.o if MSDOS. |
| 249 | MSDOS_OBJ = | 254 | MSDOS_OBJ = |
| 250 | ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. | 255 | ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. |
| @@ -253,7 +258,6 @@ MSDOS_X_OBJ = | |||
| 253 | ns_appdir=@ns_appdir@ | 258 | ns_appdir=@ns_appdir@ |
| 254 | ns_appbindir=@ns_appbindir@ | 259 | ns_appbindir=@ns_appbindir@ |
| 255 | ns_appsrc=@ns_appsrc@ | 260 | ns_appsrc=@ns_appsrc@ |
| 256 | ## fontset.o fringe.o image.o if HAVE_NS, else empty. | ||
| 257 | NS_OBJ=@NS_OBJ@ | 261 | NS_OBJ=@NS_OBJ@ |
| 258 | ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS. | 262 | ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS. |
| 259 | NS_OBJC_OBJ=@NS_OBJC_OBJ@ | 263 | NS_OBJC_OBJ=@NS_OBJC_OBJ@ |
| @@ -338,7 +342,8 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ | |||
| 338 | process.o gnutls.o callproc.o \ | 342 | process.o gnutls.o callproc.o \ |
| 339 | region-cache.o sound.o atimer.o thread.o systhread.o \ | 343 | region-cache.o sound.o atimer.o thread.o systhread.o \ |
| 340 | doprnt.o intervals.o textprop.o composite.o xml.o \ | 344 | doprnt.o intervals.o textprop.o composite.o xml.o \ |
| 341 | $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) | 345 | $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ |
| 346 | $(WINDOW_SYSTEM_OBJ) | ||
| 342 | obj = $(base_obj) $(NS_OBJC_OBJ) | 347 | obj = $(base_obj) $(NS_OBJC_OBJ) |
| 343 | 348 | ||
| 344 | ## Object files used on some machine or other. | 349 | ## Object files used on some machine or other. |
| @@ -383,6 +388,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ | |||
| 383 | ## with GCC, we might need LIB_GCC again after them. | 388 | ## with GCC, we might need LIB_GCC again after them. |
| 384 | LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ | 389 | LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ |
| 385 | $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) \ | 390 | $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) \ |
| 391 | $(LIB_EXECINFO) \ | ||
| 386 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ | 392 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ |
| 387 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ | 393 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ |
| 388 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ | 394 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ |
| @@ -402,11 +408,13 @@ $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) | |||
| 402 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. | 408 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. |
| 403 | emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el | 409 | emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el |
| 404 | if test "$(CANNOT_DUMP)" = "yes"; then \ | 410 | if test "$(CANNOT_DUMP)" = "yes"; then \ |
| 405 | ln -f temacs$(EXEEXT) emacs$(EXEEXT); \ | 411 | rm -f emacs$(EXEEXT); \ |
| 412 | ln temacs$(EXEEXT) emacs$(EXEEXT); \ | ||
| 406 | else \ | 413 | else \ |
| 407 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \ | 414 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \ |
| 408 | test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ | 415 | test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ |
| 409 | ln -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ | 416 | rm -f bootstrap-emacs$(EXEEXT); \ |
| 417 | ln emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ | ||
| 410 | fi | 418 | fi |
| 411 | 419 | ||
| 412 | ## We run make-docfile twice because the command line may get too long | 420 | ## We run make-docfile twice because the command line may get too long |
| @@ -440,7 +448,7 @@ GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) | |||
| 440 | 448 | ||
| 441 | gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) | 449 | gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) |
| 442 | @rm -f gl-tmp | 450 | @rm -f gl-tmp |
| 443 | $(libsrc)/make-docfile -d $(srcdir) -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp | 451 | $(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl-tmp |
| 444 | $(srcdir)/../build-aux/move-if-change gl-tmp globals.h | 452 | $(srcdir)/../build-aux/move-if-change gl-tmp globals.h |
| 445 | echo timestamp > $@ | 453 | echo timestamp > $@ |
| 446 | 454 | ||
| @@ -497,7 +505,7 @@ doc.o: buildobj.h | |||
| 497 | @ns_frag@ | 505 | @ns_frag@ |
| 498 | 506 | ||
| 499 | .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean | 507 | .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean |
| 500 | .PHONY: versioclean extraclean frc | 508 | .PHONY: versionclean extraclean frc |
| 501 | 509 | ||
| 502 | mostlyclean: | 510 | mostlyclean: |
| 503 | rm -f temacs$(EXEEXT) core *.core \#* *.o libXMenu11.a liblw.a | 511 | rm -f temacs$(EXEEXT) core *.core \#* *.o libXMenu11.a liblw.a |
| @@ -600,7 +608,8 @@ $(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) | |||
| 600 | bootstrap-emacs$(EXEEXT): temacs$(EXEEXT) | 608 | bootstrap-emacs$(EXEEXT): temacs$(EXEEXT) |
| 601 | cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs | 609 | cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs |
| 602 | if test "$(CANNOT_DUMP)" = "yes"; then \ | 610 | if test "$(CANNOT_DUMP)" = "yes"; then \ |
| 603 | ln -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ | 611 | rm -f bootstrap-emacs$(EXEEXT); \ |
| 612 | ln temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ | ||
| 604 | else \ | 613 | else \ |
| 605 | $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \ | 614 | $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \ |
| 606 | test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ | 615 | test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ |
diff --git a/src/alloc.c b/src/alloc.c index a8830684580..859961781e0 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -69,6 +69,9 @@ extern void *sbrk (); | |||
| 69 | 69 | ||
| 70 | #include <fcntl.h> | 70 | #include <fcntl.h> |
| 71 | 71 | ||
| 72 | #ifdef USE_GTK | ||
| 73 | # include "gtkutil.h" | ||
| 74 | #endif | ||
| 72 | #ifdef WINDOWSNT | 75 | #ifdef WINDOWSNT |
| 73 | #include "w32.h" | 76 | #include "w32.h" |
| 74 | #endif | 77 | #endif |
| @@ -173,15 +176,15 @@ EMACS_INT gc_relative_threshold; | |||
| 173 | 176 | ||
| 174 | EMACS_INT memory_full_cons_threshold; | 177 | EMACS_INT memory_full_cons_threshold; |
| 175 | 178 | ||
| 176 | /* Nonzero during GC. */ | 179 | /* True during GC. */ |
| 177 | 180 | ||
| 178 | int gc_in_progress; | 181 | bool gc_in_progress; |
| 179 | 182 | ||
| 180 | /* Nonzero means abort if try to GC. | 183 | /* True means abort if try to GC. |
| 181 | This is for code which is written on the assumption that | 184 | This is for code which is written on the assumption that |
| 182 | no GC will happen, so as to verify that assumption. */ | 185 | no GC will happen, so as to verify that assumption. */ |
| 183 | 186 | ||
| 184 | int abort_on_gc; | 187 | bool abort_on_gc; |
| 185 | 188 | ||
| 186 | /* Number of live and free conses etc. */ | 189 | /* Number of live and free conses etc. */ |
| 187 | 190 | ||
| @@ -223,7 +226,7 @@ static ptrdiff_t pure_size; | |||
| 223 | 226 | ||
| 224 | static ptrdiff_t pure_bytes_used_before_overflow; | 227 | static ptrdiff_t pure_bytes_used_before_overflow; |
| 225 | 228 | ||
| 226 | /* Value is non-zero if P points into pure space. */ | 229 | /* True if P points into pure space. */ |
| 227 | 230 | ||
| 228 | #define PURE_POINTER_P(P) \ | 231 | #define PURE_POINTER_P(P) \ |
| 229 | ((uintptr_t) (P) - (uintptr_t) purebeg <= pure_size) | 232 | ((uintptr_t) (P) - (uintptr_t) purebeg <= pure_size) |
| @@ -305,7 +308,9 @@ enum mem_type | |||
| 305 | and runtime slowdown. Minor but pointless. */ | 308 | and runtime slowdown. Minor but pointless. */ |
| 306 | MEM_TYPE_VECTORLIKE, | 309 | MEM_TYPE_VECTORLIKE, |
| 307 | /* Special type to denote vector blocks. */ | 310 | /* Special type to denote vector blocks. */ |
| 308 | MEM_TYPE_VECTOR_BLOCK | 311 | MEM_TYPE_VECTOR_BLOCK, |
| 312 | /* Special type to denote reserved memory. */ | ||
| 313 | MEM_TYPE_SPARE | ||
| 309 | }; | 314 | }; |
| 310 | 315 | ||
| 311 | static void *lisp_malloc (size_t, enum mem_type); | 316 | static void *lisp_malloc (size_t, enum mem_type); |
| @@ -387,13 +392,13 @@ static struct mem_node mem_z; | |||
| 387 | 392 | ||
| 388 | static struct Lisp_Vector *allocate_vectorlike (ptrdiff_t); | 393 | static struct Lisp_Vector *allocate_vectorlike (ptrdiff_t); |
| 389 | static void lisp_free (void *); | 394 | static void lisp_free (void *); |
| 390 | static int live_vector_p (struct mem_node *, void *); | 395 | static bool live_vector_p (struct mem_node *, void *); |
| 391 | static int live_buffer_p (struct mem_node *, void *); | 396 | static bool live_buffer_p (struct mem_node *, void *); |
| 392 | static int live_string_p (struct mem_node *, void *); | 397 | static bool live_string_p (struct mem_node *, void *); |
| 393 | static int live_cons_p (struct mem_node *, void *); | 398 | static bool live_cons_p (struct mem_node *, void *); |
| 394 | static int live_symbol_p (struct mem_node *, void *); | 399 | static bool live_symbol_p (struct mem_node *, void *); |
| 395 | static int live_float_p (struct mem_node *, void *); | 400 | static bool live_float_p (struct mem_node *, void *); |
| 396 | static int live_misc_p (struct mem_node *, void *); | 401 | static bool live_misc_p (struct mem_node *, void *); |
| 397 | static void mark_maybe_object (Lisp_Object); | 402 | static void mark_maybe_object (Lisp_Object); |
| 398 | static void mark_memory (void *, void *); | 403 | static void mark_memory (void *, void *); |
| 399 | #if GC_MARK_STACK || defined GC_MALLOC_CHECK | 404 | #if GC_MARK_STACK || defined GC_MALLOC_CHECK |
| @@ -1232,7 +1237,7 @@ static void (*old_free_hook) (void*, const void*); | |||
| 1232 | #endif | 1237 | #endif |
| 1233 | 1238 | ||
| 1234 | #ifdef GC_MALLOC_CHECK | 1239 | #ifdef GC_MALLOC_CHECK |
| 1235 | static int dont_register_blocks; | 1240 | static bool dont_register_blocks; |
| 1236 | #endif | 1241 | #endif |
| 1237 | 1242 | ||
| 1238 | static size_t bytes_used_when_reconsidered; | 1243 | static size_t bytes_used_when_reconsidered; |
| @@ -1819,11 +1824,11 @@ check_sblock (struct sblock *b) | |||
| 1819 | 1824 | ||
| 1820 | 1825 | ||
| 1821 | /* Check validity of Lisp strings' string_bytes member. ALL_P | 1826 | /* Check validity of Lisp strings' string_bytes member. ALL_P |
| 1822 | non-zero means check all strings, otherwise check only most | 1827 | means check all strings, otherwise check only most |
| 1823 | recently allocated strings. Used for hunting a bug. */ | 1828 | recently allocated strings. Used for hunting a bug. */ |
| 1824 | 1829 | ||
| 1825 | static void | 1830 | static void |
| 1826 | check_string_bytes (int all_p) | 1831 | check_string_bytes (bool all_p) |
| 1827 | { | 1832 | { |
| 1828 | if (all_p) | 1833 | if (all_p) |
| 1829 | { | 1834 | { |
| @@ -2428,9 +2433,9 @@ make_string_from_bytes (const char *contents, | |||
| 2428 | 2433 | ||
| 2429 | Lisp_Object | 2434 | Lisp_Object |
| 2430 | make_specified_string (const char *contents, | 2435 | make_specified_string (const char *contents, |
| 2431 | ptrdiff_t nchars, ptrdiff_t nbytes, int multibyte) | 2436 | ptrdiff_t nchars, ptrdiff_t nbytes, bool multibyte) |
| 2432 | { | 2437 | { |
| 2433 | register Lisp_Object val; | 2438 | Lisp_Object val; |
| 2434 | 2439 | ||
| 2435 | if (nchars < 0) | 2440 | if (nchars < 0) |
| 2436 | { | 2441 | { |
| @@ -3085,7 +3090,7 @@ sweep_vectors (void) | |||
| 3085 | 3090 | ||
| 3086 | for (block = vector_blocks; block; block = *bprev) | 3091 | for (block = vector_blocks; block; block = *bprev) |
| 3087 | { | 3092 | { |
| 3088 | int free_this_block = 0; | 3093 | bool free_this_block = 0; |
| 3089 | 3094 | ||
| 3090 | for (vector = (struct Lisp_Vector *) block->data; | 3095 | for (vector = (struct Lisp_Vector *) block->data; |
| 3091 | VECTOR_IN_BLOCK (vector, block); vector = next) | 3096 | VECTOR_IN_BLOCK (vector, block); vector = next) |
| @@ -3751,7 +3756,7 @@ void | |||
| 3751 | memory_full (size_t nbytes) | 3756 | memory_full (size_t nbytes) |
| 3752 | { | 3757 | { |
| 3753 | /* Do not go into hysterics merely because a large request failed. */ | 3758 | /* Do not go into hysterics merely because a large request failed. */ |
| 3754 | int enough_free_memory = 0; | 3759 | bool enough_free_memory = 0; |
| 3755 | if (SPARE_MEMORY < nbytes) | 3760 | if (SPARE_MEMORY < nbytes) |
| 3756 | { | 3761 | { |
| 3757 | void *p; | 3762 | void *p; |
| @@ -3814,22 +3819,22 @@ refill_memory_reserve (void) | |||
| 3814 | spare_memory[0] = malloc (SPARE_MEMORY); | 3819 | spare_memory[0] = malloc (SPARE_MEMORY); |
| 3815 | if (spare_memory[1] == 0) | 3820 | if (spare_memory[1] == 0) |
| 3816 | spare_memory[1] = lisp_align_malloc (sizeof (struct cons_block), | 3821 | spare_memory[1] = lisp_align_malloc (sizeof (struct cons_block), |
| 3817 | MEM_TYPE_CONS); | 3822 | MEM_TYPE_SPARE); |
| 3818 | if (spare_memory[2] == 0) | 3823 | if (spare_memory[2] == 0) |
| 3819 | spare_memory[2] = lisp_align_malloc (sizeof (struct cons_block), | 3824 | spare_memory[2] = lisp_align_malloc (sizeof (struct cons_block), |
| 3820 | MEM_TYPE_CONS); | 3825 | MEM_TYPE_SPARE); |
| 3821 | if (spare_memory[3] == 0) | 3826 | if (spare_memory[3] == 0) |
| 3822 | spare_memory[3] = lisp_align_malloc (sizeof (struct cons_block), | 3827 | spare_memory[3] = lisp_align_malloc (sizeof (struct cons_block), |
| 3823 | MEM_TYPE_CONS); | 3828 | MEM_TYPE_SPARE); |
| 3824 | if (spare_memory[4] == 0) | 3829 | if (spare_memory[4] == 0) |
| 3825 | spare_memory[4] = lisp_align_malloc (sizeof (struct cons_block), | 3830 | spare_memory[4] = lisp_align_malloc (sizeof (struct cons_block), |
| 3826 | MEM_TYPE_CONS); | 3831 | MEM_TYPE_SPARE); |
| 3827 | if (spare_memory[5] == 0) | 3832 | if (spare_memory[5] == 0) |
| 3828 | spare_memory[5] = lisp_malloc (sizeof (struct string_block), | 3833 | spare_memory[5] = lisp_malloc (sizeof (struct string_block), |
| 3829 | MEM_TYPE_STRING); | 3834 | MEM_TYPE_SPARE); |
| 3830 | if (spare_memory[6] == 0) | 3835 | if (spare_memory[6] == 0) |
| 3831 | spare_memory[6] = lisp_malloc (sizeof (struct string_block), | 3836 | spare_memory[6] = lisp_malloc (sizeof (struct string_block), |
| 3832 | MEM_TYPE_STRING); | 3837 | MEM_TYPE_SPARE); |
| 3833 | if (spare_memory[0] && spare_memory[1] && spare_memory[5]) | 3838 | if (spare_memory[0] && spare_memory[1] && spare_memory[5]) |
| 3834 | Vmemory_full = Qnil; | 3839 | Vmemory_full = Qnil; |
| 3835 | #endif | 3840 | #endif |
| @@ -4244,7 +4249,7 @@ mem_delete_fixup (struct mem_node *x) | |||
| 4244 | /* Value is non-zero if P is a pointer to a live Lisp string on | 4249 | /* Value is non-zero if P is a pointer to a live Lisp string on |
| 4245 | the heap. M is a pointer to the mem_block for P. */ | 4250 | the heap. M is a pointer to the mem_block for P. */ |
| 4246 | 4251 | ||
| 4247 | static inline int | 4252 | static inline bool |
| 4248 | live_string_p (struct mem_node *m, void *p) | 4253 | live_string_p (struct mem_node *m, void *p) |
| 4249 | { | 4254 | { |
| 4250 | if (m->type == MEM_TYPE_STRING) | 4255 | if (m->type == MEM_TYPE_STRING) |
| @@ -4267,7 +4272,7 @@ live_string_p (struct mem_node *m, void *p) | |||
| 4267 | /* Value is non-zero if P is a pointer to a live Lisp cons on | 4272 | /* Value is non-zero if P is a pointer to a live Lisp cons on |
| 4268 | the heap. M is a pointer to the mem_block for P. */ | 4273 | the heap. M is a pointer to the mem_block for P. */ |
| 4269 | 4274 | ||
| 4270 | static inline int | 4275 | static inline bool |
| 4271 | live_cons_p (struct mem_node *m, void *p) | 4276 | live_cons_p (struct mem_node *m, void *p) |
| 4272 | { | 4277 | { |
| 4273 | if (m->type == MEM_TYPE_CONS) | 4278 | if (m->type == MEM_TYPE_CONS) |
| @@ -4293,7 +4298,7 @@ live_cons_p (struct mem_node *m, void *p) | |||
| 4293 | /* Value is non-zero if P is a pointer to a live Lisp symbol on | 4298 | /* Value is non-zero if P is a pointer to a live Lisp symbol on |
| 4294 | the heap. M is a pointer to the mem_block for P. */ | 4299 | the heap. M is a pointer to the mem_block for P. */ |
| 4295 | 4300 | ||
| 4296 | static inline int | 4301 | static inline bool |
| 4297 | live_symbol_p (struct mem_node *m, void *p) | 4302 | live_symbol_p (struct mem_node *m, void *p) |
| 4298 | { | 4303 | { |
| 4299 | if (m->type == MEM_TYPE_SYMBOL) | 4304 | if (m->type == MEM_TYPE_SYMBOL) |
| @@ -4319,7 +4324,7 @@ live_symbol_p (struct mem_node *m, void *p) | |||
| 4319 | /* Value is non-zero if P is a pointer to a live Lisp float on | 4324 | /* Value is non-zero if P is a pointer to a live Lisp float on |
| 4320 | the heap. M is a pointer to the mem_block for P. */ | 4325 | the heap. M is a pointer to the mem_block for P. */ |
| 4321 | 4326 | ||
| 4322 | static inline int | 4327 | static inline bool |
| 4323 | live_float_p (struct mem_node *m, void *p) | 4328 | live_float_p (struct mem_node *m, void *p) |
| 4324 | { | 4329 | { |
| 4325 | if (m->type == MEM_TYPE_FLOAT) | 4330 | if (m->type == MEM_TYPE_FLOAT) |
| @@ -4343,7 +4348,7 @@ live_float_p (struct mem_node *m, void *p) | |||
| 4343 | /* Value is non-zero if P is a pointer to a live Lisp Misc on | 4348 | /* Value is non-zero if P is a pointer to a live Lisp Misc on |
| 4344 | the heap. M is a pointer to the mem_block for P. */ | 4349 | the heap. M is a pointer to the mem_block for P. */ |
| 4345 | 4350 | ||
| 4346 | static inline int | 4351 | static inline bool |
| 4347 | live_misc_p (struct mem_node *m, void *p) | 4352 | live_misc_p (struct mem_node *m, void *p) |
| 4348 | { | 4353 | { |
| 4349 | if (m->type == MEM_TYPE_MISC) | 4354 | if (m->type == MEM_TYPE_MISC) |
| @@ -4369,7 +4374,7 @@ live_misc_p (struct mem_node *m, void *p) | |||
| 4369 | /* Value is non-zero if P is a pointer to a live vector-like object. | 4374 | /* Value is non-zero if P is a pointer to a live vector-like object. |
| 4370 | M is a pointer to the mem_block for P. */ | 4375 | M is a pointer to the mem_block for P. */ |
| 4371 | 4376 | ||
| 4372 | static inline int | 4377 | static inline bool |
| 4373 | live_vector_p (struct mem_node *m, void *p) | 4378 | live_vector_p (struct mem_node *m, void *p) |
| 4374 | { | 4379 | { |
| 4375 | if (m->type == MEM_TYPE_VECTOR_BLOCK) | 4380 | if (m->type == MEM_TYPE_VECTOR_BLOCK) |
| @@ -4405,7 +4410,7 @@ live_vector_p (struct mem_node *m, void *p) | |||
| 4405 | /* Value is non-zero if P is a pointer to a live buffer. M is a | 4410 | /* Value is non-zero if P is a pointer to a live buffer. M is a |
| 4406 | pointer to the mem_block for P. */ | 4411 | pointer to the mem_block for P. */ |
| 4407 | 4412 | ||
| 4408 | static inline int | 4413 | static inline bool |
| 4409 | live_buffer_p (struct mem_node *m, void *p) | 4414 | live_buffer_p (struct mem_node *m, void *p) |
| 4410 | { | 4415 | { |
| 4411 | /* P must point to the start of the block, and the buffer | 4416 | /* P must point to the start of the block, and the buffer |
| @@ -4485,7 +4490,7 @@ mark_maybe_object (Lisp_Object obj) | |||
| 4485 | 4490 | ||
| 4486 | if (m != MEM_NIL) | 4491 | if (m != MEM_NIL) |
| 4487 | { | 4492 | { |
| 4488 | int mark_p = 0; | 4493 | bool mark_p = 0; |
| 4489 | 4494 | ||
| 4490 | switch (XTYPE (obj)) | 4495 | switch (XTYPE (obj)) |
| 4491 | { | 4496 | { |
| @@ -4559,6 +4564,7 @@ mark_maybe_pointer (void *p) | |||
| 4559 | switch (m->type) | 4564 | switch (m->type) |
| 4560 | { | 4565 | { |
| 4561 | case MEM_TYPE_NON_LISP: | 4566 | case MEM_TYPE_NON_LISP: |
| 4567 | case MEM_TYPE_SPARE: | ||
| 4562 | /* Nothing to do; not a pointer to Lisp memory. */ | 4568 | /* Nothing to do; not a pointer to Lisp memory. */ |
| 4563 | break; | 4569 | break; |
| 4564 | 4570 | ||
| @@ -4705,7 +4711,8 @@ mark_memory (void *start, void *end) | |||
| 4705 | 4711 | ||
| 4706 | #if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS | 4712 | #if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS |
| 4707 | 4713 | ||
| 4708 | static int setjmp_tested_p, longjmps_done; | 4714 | static bool setjmp_tested_p; |
| 4715 | static int longjmps_done; | ||
| 4709 | 4716 | ||
| 4710 | #define SETJMP_WILL_LIKELY_WORK "\ | 4717 | #define SETJMP_WILL_LIKELY_WORK "\ |
| 4711 | \n\ | 4718 | \n\ |
| @@ -4749,14 +4756,13 @@ test_setjmp (void) | |||
| 4749 | char buf[10]; | 4756 | char buf[10]; |
| 4750 | register int x; | 4757 | register int x; |
| 4751 | jmp_buf jbuf; | 4758 | jmp_buf jbuf; |
| 4752 | int result = 0; | ||
| 4753 | 4759 | ||
| 4754 | /* Arrange for X to be put in a register. */ | 4760 | /* Arrange for X to be put in a register. */ |
| 4755 | sprintf (buf, "1"); | 4761 | sprintf (buf, "1"); |
| 4756 | x = strlen (buf); | 4762 | x = strlen (buf); |
| 4757 | x = 2 * x - 1; | 4763 | x = 2 * x - 1; |
| 4758 | 4764 | ||
| 4759 | setjmp (jbuf); | 4765 | _setjmp (jbuf); |
| 4760 | if (longjmps_done == 1) | 4766 | if (longjmps_done == 1) |
| 4761 | { | 4767 | { |
| 4762 | /* Came here after the longjmp at the end of the function. | 4768 | /* Came here after the longjmp at the end of the function. |
| @@ -4781,7 +4787,7 @@ test_setjmp (void) | |||
| 4781 | ++longjmps_done; | 4787 | ++longjmps_done; |
| 4782 | x = 2; | 4788 | x = 2; |
| 4783 | if (longjmps_done == 1) | 4789 | if (longjmps_done == 1) |
| 4784 | longjmp (jbuf, 1); | 4790 | _longjmp (jbuf, 1); |
| 4785 | } | 4791 | } |
| 4786 | 4792 | ||
| 4787 | #endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */ | 4793 | #endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */ |
| @@ -4908,7 +4914,7 @@ flush_stack_call_func (void (*func) (void *arg), void *arg) | |||
| 4908 | Lisp_Object o; | 4914 | Lisp_Object o; |
| 4909 | jmp_buf j; | 4915 | jmp_buf j; |
| 4910 | } j; | 4916 | } j; |
| 4911 | volatile int stack_grows_down_p = (char *) &j > (char *) stack_bottom; | 4917 | volatile bool stack_grows_down_p = (char *) &j > (char *) stack_bottom; |
| 4912 | #endif | 4918 | #endif |
| 4913 | /* This trick flushes the register windows so that all the state of | 4919 | /* This trick flushes the register windows so that all the state of |
| 4914 | the process is contained in the stack. */ | 4920 | the process is contained in the stack. */ |
| @@ -4942,7 +4948,7 @@ flush_stack_call_func (void (*func) (void *arg), void *arg) | |||
| 4942 | } | 4948 | } |
| 4943 | #endif /* GC_SETJMP_WORKS */ | 4949 | #endif /* GC_SETJMP_WORKS */ |
| 4944 | 4950 | ||
| 4945 | setjmp (j.j); | 4951 | _setjmp (j.j); |
| 4946 | end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; | 4952 | end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; |
| 4947 | #endif /* not GC_SAVE_REGISTERS_ON_STACK */ | 4953 | #endif /* not GC_SAVE_REGISTERS_ON_STACK */ |
| 4948 | #endif /* not HAVE___BUILTIN_UNWIND_INIT */ | 4954 | #endif /* not HAVE___BUILTIN_UNWIND_INIT */ |
| @@ -4970,7 +4976,7 @@ valid_pointer_p (void *p) | |||
| 4970 | 4976 | ||
| 4971 | if (pipe (fd) == 0) | 4977 | if (pipe (fd) == 0) |
| 4972 | { | 4978 | { |
| 4973 | int valid = (emacs_write (fd[1], (char *) p, 16) == 16); | 4979 | bool valid = emacs_write (fd[1], (char *) p, 16) == 16; |
| 4974 | emacs_close (fd[1]); | 4980 | emacs_close (fd[1]); |
| 4975 | emacs_close (fd[0]); | 4981 | emacs_close (fd[0]); |
| 4976 | return valid; | 4982 | return valid; |
| @@ -5022,6 +5028,7 @@ valid_lisp_object_p (Lisp_Object obj) | |||
| 5022 | switch (m->type) | 5028 | switch (m->type) |
| 5023 | { | 5029 | { |
| 5024 | case MEM_TYPE_NON_LISP: | 5030 | case MEM_TYPE_NON_LISP: |
| 5031 | case MEM_TYPE_SPARE: | ||
| 5025 | return 0; | 5032 | return 0; |
| 5026 | 5033 | ||
| 5027 | case MEM_TYPE_BUFFER: | 5034 | case MEM_TYPE_BUFFER: |
| @@ -5191,7 +5198,7 @@ find_string_data_in_pure (const char *data, ptrdiff_t nbytes) | |||
| 5191 | 5198 | ||
| 5192 | /* Return a string allocated in pure space. DATA is a buffer holding | 5199 | /* Return a string allocated in pure space. DATA is a buffer holding |
| 5193 | NCHARS characters, and NBYTES bytes of string data. MULTIBYTE | 5200 | NCHARS characters, and NBYTES bytes of string data. MULTIBYTE |
| 5194 | non-zero means make the result string multibyte. | 5201 | means make the result string multibyte. |
| 5195 | 5202 | ||
| 5196 | Must get an error if pure storage is full, since if it cannot hold | 5203 | Must get an error if pure storage is full, since if it cannot hold |
| 5197 | a large string it may be able to hold conses that point to that | 5204 | a large string it may be able to hold conses that point to that |
| @@ -5199,7 +5206,7 @@ find_string_data_in_pure (const char *data, ptrdiff_t nbytes) | |||
| 5199 | 5206 | ||
| 5200 | Lisp_Object | 5207 | Lisp_Object |
| 5201 | make_pure_string (const char *data, | 5208 | make_pure_string (const char *data, |
| 5202 | ptrdiff_t nchars, ptrdiff_t nbytes, int multibyte) | 5209 | ptrdiff_t nchars, ptrdiff_t nbytes, bool multibyte) |
| 5203 | { | 5210 | { |
| 5204 | Lisp_Object string; | 5211 | Lisp_Object string; |
| 5205 | struct Lisp_String *s = pure_alloc (sizeof *s, Lisp_String); | 5212 | struct Lisp_String *s = pure_alloc (sizeof *s, Lisp_String); |
| @@ -5394,11 +5401,11 @@ returns nil, because real GC can't be done. | |||
| 5394 | See Info node `(elisp)Garbage Collection'. */) | 5401 | See Info node `(elisp)Garbage Collection'. */) |
| 5395 | (void) | 5402 | (void) |
| 5396 | { | 5403 | { |
| 5397 | register struct specbinding *bind; | 5404 | struct specbinding *bind; |
| 5398 | register struct buffer *nextb; | 5405 | struct buffer *nextb; |
| 5399 | char stack_top_variable; | 5406 | char stack_top_variable; |
| 5400 | ptrdiff_t i; | 5407 | ptrdiff_t i; |
| 5401 | int message_p; | 5408 | bool message_p; |
| 5402 | ptrdiff_t count = SPECPDL_INDEX (); | 5409 | ptrdiff_t count = SPECPDL_INDEX (); |
| 5403 | EMACS_TIME start; | 5410 | EMACS_TIME start; |
| 5404 | Lisp_Object retval = Qnil; | 5411 | Lisp_Object retval = Qnil; |
| @@ -5473,13 +5480,9 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5473 | mark_threads (); | 5480 | mark_threads (); |
| 5474 | mark_terminals (); | 5481 | mark_terminals (); |
| 5475 | mark_kboards (); | 5482 | mark_kboards (); |
| 5476 | mark_ttys (); | ||
| 5477 | 5483 | ||
| 5478 | #ifdef USE_GTK | 5484 | #ifdef USE_GTK |
| 5479 | { | 5485 | xg_mark_data (); |
| 5480 | extern void xg_mark_data (void); | ||
| 5481 | xg_mark_data (); | ||
| 5482 | } | ||
| 5483 | #endif | 5486 | #endif |
| 5484 | 5487 | ||
| 5485 | #ifdef HAVE_WINDOW_SYSTEM | 5488 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -6181,10 +6184,10 @@ mark_terminals (void) | |||
| 6181 | /* Value is non-zero if OBJ will survive the current GC because it's | 6184 | /* Value is non-zero if OBJ will survive the current GC because it's |
| 6182 | either marked or does not need to be marked to survive. */ | 6185 | either marked or does not need to be marked to survive. */ |
| 6183 | 6186 | ||
| 6184 | int | 6187 | bool |
| 6185 | survives_gc_p (Lisp_Object obj) | 6188 | survives_gc_p (Lisp_Object obj) |
| 6186 | { | 6189 | { |
| 6187 | int survives_p; | 6190 | bool survives_p; |
| 6188 | 6191 | ||
| 6189 | switch (XTYPE (obj)) | 6192 | switch (XTYPE (obj)) |
| 6190 | { | 6193 | { |
| @@ -6429,7 +6432,7 @@ gc_sweep (void) | |||
| 6429 | /* Check if the symbol was created during loadup. In such a case | 6432 | /* Check if the symbol was created during loadup. In such a case |
| 6430 | it might be pointed to by pure bytecode which we don't trace, | 6433 | it might be pointed to by pure bytecode which we don't trace, |
| 6431 | so we conservatively assume that it is live. */ | 6434 | so we conservatively assume that it is live. */ |
| 6432 | int pure_p = PURE_POINTER_P (XSTRING (sym->s.name)); | 6435 | bool pure_p = PURE_POINTER_P (XSTRING (sym->s.name)); |
| 6433 | 6436 | ||
| 6434 | if (!sym->s.gcmarkbit && !pure_p) | 6437 | if (!sym->s.gcmarkbit && !pure_p) |
| 6435 | { | 6438 | { |
| @@ -6654,13 +6657,21 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) | |||
| 6654 | } | 6657 | } |
| 6655 | 6658 | ||
| 6656 | #ifdef ENABLE_CHECKING | 6659 | #ifdef ENABLE_CHECKING |
| 6657 | int suppress_checking; | 6660 | |
| 6661 | # include <execinfo.h> | ||
| 6662 | |||
| 6663 | bool suppress_checking; | ||
| 6658 | 6664 | ||
| 6659 | void | 6665 | void |
| 6660 | die (const char *msg, const char *file, int line) | 6666 | die (const char *msg, const char *file, int line) |
| 6661 | { | 6667 | { |
| 6668 | enum { NPOINTERS_MAX = 500 }; | ||
| 6669 | void *buffer[NPOINTERS_MAX]; | ||
| 6670 | int npointers; | ||
| 6662 | fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", | 6671 | fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", |
| 6663 | file, line, msg); | 6672 | file, line, msg); |
| 6673 | npointers = backtrace (buffer, NPOINTERS_MAX); | ||
| 6674 | backtrace_symbols_fd (buffer, npointers, STDERR_FILENO); | ||
| 6664 | abort (); | 6675 | abort (); |
| 6665 | } | 6676 | } |
| 6666 | #endif | 6677 | #endif |
diff --git a/src/atimer.c b/src/atimer.c index d67e1375f9a..eb3136ae55d 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -408,7 +408,7 @@ do_pending_atimers (void) | |||
| 408 | some systems like HPUX (see process.c). */ | 408 | some systems like HPUX (see process.c). */ |
| 409 | 409 | ||
| 410 | void | 410 | void |
| 411 | turn_on_atimers (int on) | 411 | turn_on_atimers (bool on) |
| 412 | { | 412 | { |
| 413 | if (on) | 413 | if (on) |
| 414 | { | 414 | { |
diff --git a/src/atimer.h b/src/atimer.h index 4282bab49ba..6d441d71641 100644 --- a/src/atimer.h +++ b/src/atimer.h | |||
| @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #define EMACS_ATIMER_H | 20 | #define EMACS_ATIMER_H |
| 21 | 21 | ||
| 22 | #include "systime.h" /* for EMACS_TIME */ | 22 | #include "systime.h" /* for EMACS_TIME */ |
| 23 | #include <stdbool.h> | ||
| 23 | 24 | ||
| 24 | /* Forward declaration. */ | 25 | /* Forward declaration. */ |
| 25 | 26 | ||
| @@ -74,7 +75,7 @@ struct atimer *start_atimer (enum atimer_type, EMACS_TIME, | |||
| 74 | void cancel_atimer (struct atimer *); | 75 | void cancel_atimer (struct atimer *); |
| 75 | void do_pending_atimers (void); | 76 | void do_pending_atimers (void); |
| 76 | void init_atimer (void); | 77 | void init_atimer (void); |
| 77 | void turn_on_atimers (int); | 78 | void turn_on_atimers (bool); |
| 78 | void stop_other_atimers (struct atimer *); | 79 | void stop_other_atimers (struct atimer *); |
| 79 | Lisp_Object unwind_stop_other_atimers (Lisp_Object); | 80 | Lisp_Object unwind_stop_other_atimers (Lisp_Object); |
| 80 | 81 | ||
diff --git a/src/bidi.c b/src/bidi.c index 4df585d4f48..6b3ac53d318 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -63,7 +63,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 63 | #include "buffer.h" | 63 | #include "buffer.h" |
| 64 | #include "dispextern.h" | 64 | #include "dispextern.h" |
| 65 | 65 | ||
| 66 | static int bidi_initialized = 0; | 66 | static bool bidi_initialized = 0; |
| 67 | 67 | ||
| 68 | static Lisp_Object bidi_type_table, bidi_mirror_table; | 68 | static Lisp_Object bidi_type_table, bidi_mirror_table; |
| 69 | 69 | ||
| @@ -82,10 +82,10 @@ typedef enum { | |||
| 82 | /* UAX#9 says to search only for L, AL, or R types of characters, and | 82 | /* UAX#9 says to search only for L, AL, or R types of characters, and |
| 83 | ignore RLE, RLO, LRE, and LRO, when determining the base paragraph | 83 | ignore RLE, RLO, LRE, and LRO, when determining the base paragraph |
| 84 | level. Yudit indeed ignores them. This variable is therefore set | 84 | level. Yudit indeed ignores them. This variable is therefore set |
| 85 | by default to ignore them, but setting it to zero will take them | 85 | by default to ignore them, but clearing it will take them into |
| 86 | into account. */ | 86 | account. */ |
| 87 | extern int bidi_ignore_explicit_marks_for_paragraph_level EXTERNALLY_VISIBLE; | 87 | extern bool bidi_ignore_explicit_marks_for_paragraph_level EXTERNALLY_VISIBLE; |
| 88 | int bidi_ignore_explicit_marks_for_paragraph_level = 1; | 88 | bool bidi_ignore_explicit_marks_for_paragraph_level = 1; |
| 89 | 89 | ||
| 90 | static Lisp_Object paragraph_start_re, paragraph_separate_re; | 90 | static Lisp_Object paragraph_start_re, paragraph_separate_re; |
| 91 | static Lisp_Object Qparagraph_start, Qparagraph_separate; | 91 | static Lisp_Object Qparagraph_start, Qparagraph_separate; |
| @@ -438,7 +438,7 @@ bidi_cache_search (ptrdiff_t charpos, int level, int dir) | |||
| 438 | that is lower than LEVEL, and return its cache slot index. DIR is | 438 | that is lower than LEVEL, and return its cache slot index. DIR is |
| 439 | the direction to search, starting with the last used cache slot. | 439 | the direction to search, starting with the last used cache slot. |
| 440 | If DIR is zero, we search backwards from the last occupied cache | 440 | If DIR is zero, we search backwards from the last occupied cache |
| 441 | slot. BEFORE, if non-zero, means return the index of the slot that | 441 | slot. BEFORE means return the index of the slot that |
| 442 | is ``before'' the level change in the search direction. That is, | 442 | is ``before'' the level change in the search direction. That is, |
| 443 | given the cached levels like this: | 443 | given the cached levels like this: |
| 444 | 444 | ||
| @@ -448,9 +448,9 @@ bidi_cache_search (ptrdiff_t charpos, int level, int dir) | |||
| 448 | and assuming we are at the position cached at the slot marked with | 448 | and assuming we are at the position cached at the slot marked with |
| 449 | C, searching backwards (DIR = -1) for LEVEL = 2 will return the | 449 | C, searching backwards (DIR = -1) for LEVEL = 2 will return the |
| 450 | index of slot B or A, depending whether BEFORE is, respectively, | 450 | index of slot B or A, depending whether BEFORE is, respectively, |
| 451 | non-zero or zero. */ | 451 | true or false. */ |
| 452 | static ptrdiff_t | 452 | static ptrdiff_t |
| 453 | bidi_cache_find_level_change (int level, int dir, int before) | 453 | bidi_cache_find_level_change (int level, int dir, bool before) |
| 454 | { | 454 | { |
| 455 | if (bidi_cache_idx) | 455 | if (bidi_cache_idx) |
| 456 | { | 456 | { |
| @@ -512,7 +512,7 @@ bidi_cache_ensure_space (ptrdiff_t idx) | |||
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | static inline void | 514 | static inline void |
| 515 | bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved) | 515 | bidi_cache_iterator_state (struct bidi_it *bidi_it, bool resolved) |
| 516 | { | 516 | { |
| 517 | ptrdiff_t idx; | 517 | ptrdiff_t idx; |
| 518 | 518 | ||
| @@ -690,11 +690,11 @@ bidi_shelve_cache (void) | |||
| 690 | 690 | ||
| 691 | /* Restore the cache state from a copy stashed away by | 691 | /* Restore the cache state from a copy stashed away by |
| 692 | bidi_shelve_cache, and free the buffer used to stash that copy. | 692 | bidi_shelve_cache, and free the buffer used to stash that copy. |
| 693 | JUST_FREE non-zero means free the buffer, but don't restore the | 693 | JUST_FREE means free the buffer, but don't restore the |
| 694 | cache; used when the corresponding iterator is discarded instead of | 694 | cache; used when the corresponding iterator is discarded instead of |
| 695 | being restored. */ | 695 | being restored. */ |
| 696 | void | 696 | void |
| 697 | bidi_unshelve_cache (void *databuf, int just_free) | 697 | bidi_unshelve_cache (void *databuf, bool just_free) |
| 698 | { | 698 | { |
| 699 | unsigned char *p = databuf; | 699 | unsigned char *p = databuf; |
| 700 | 700 | ||
| @@ -802,7 +802,7 @@ bidi_set_paragraph_end (struct bidi_it *bidi_it) | |||
| 802 | 802 | ||
| 803 | /* Initialize the bidi iterator from buffer/string position CHARPOS. */ | 803 | /* Initialize the bidi iterator from buffer/string position CHARPOS. */ |
| 804 | void | 804 | void |
| 805 | bidi_init_it (ptrdiff_t charpos, ptrdiff_t bytepos, int frame_window_p, | 805 | bidi_init_it (ptrdiff_t charpos, ptrdiff_t bytepos, bool frame_window_p, |
| 806 | struct bidi_it *bidi_it) | 806 | struct bidi_it *bidi_it) |
| 807 | { | 807 | { |
| 808 | if (! bidi_initialized) | 808 | if (! bidi_initialized) |
| @@ -872,11 +872,10 @@ bidi_line_init (struct bidi_it *bidi_it) | |||
| 872 | 872 | ||
| 873 | /* Count bytes in string S between BEG/BEGBYTE and END. BEG and END | 873 | /* Count bytes in string S between BEG/BEGBYTE and END. BEG and END |
| 874 | are zero-based character positions in S, BEGBYTE is byte position | 874 | are zero-based character positions in S, BEGBYTE is byte position |
| 875 | corresponding to BEG. UNIBYTE, if non-zero, means S is a unibyte | 875 | corresponding to BEG. UNIBYTE means S is a unibyte string. */ |
| 876 | string. */ | ||
| 877 | static inline ptrdiff_t | 876 | static inline ptrdiff_t |
| 878 | bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg, | 877 | bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg, |
| 879 | const ptrdiff_t begbyte, const ptrdiff_t end, int unibyte) | 878 | const ptrdiff_t begbyte, const ptrdiff_t end, bool unibyte) |
| 880 | { | 879 | { |
| 881 | ptrdiff_t pos = beg; | 880 | ptrdiff_t pos = beg; |
| 882 | const unsigned char *p = s + begbyte, *start = p; | 881 | const unsigned char *p = s + begbyte, *start = p; |
| @@ -900,10 +899,10 @@ bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg, | |||
| 900 | 899 | ||
| 901 | /* Fetch and returns the character at byte position BYTEPOS. If S is | 900 | /* Fetch and returns the character at byte position BYTEPOS. If S is |
| 902 | non-NULL, fetch the character from string S; otherwise fetch the | 901 | non-NULL, fetch the character from string S; otherwise fetch the |
| 903 | character from the current buffer. UNIBYTE non-zero means S is a | 902 | character from the current buffer. UNIBYTE means S is a |
| 904 | unibyte string. */ | 903 | unibyte string. */ |
| 905 | static inline int | 904 | static inline int |
| 906 | bidi_char_at_pos (ptrdiff_t bytepos, const unsigned char *s, int unibyte) | 905 | bidi_char_at_pos (ptrdiff_t bytepos, const unsigned char *s, bool unibyte) |
| 907 | { | 906 | { |
| 908 | if (s) | 907 | if (s) |
| 909 | { | 908 | { |
| @@ -923,9 +922,9 @@ bidi_char_at_pos (ptrdiff_t bytepos, const unsigned char *s, int unibyte) | |||
| 923 | specifies the character position of the next display string, or -1 | 922 | specifies the character position of the next display string, or -1 |
| 924 | if not yet computed. When the next character is at or beyond that | 923 | if not yet computed. When the next character is at or beyond that |
| 925 | position, the function updates DISP_POS with the position of the | 924 | position, the function updates DISP_POS with the position of the |
| 926 | next display string. DISP_PROP non-zero means that there's really | 925 | next display string. *DISP_PROP non-zero means that there's really |
| 927 | a display string at DISP_POS, as opposed to when we searched till | 926 | a display string at DISP_POS, as opposed to when we searched till |
| 928 | DISP_POS without finding one. If DISP_PROP is 2, it means the | 927 | DISP_POS without finding one. If *DISP_PROP is 2, it means the |
| 929 | display spec is of the form `(space ...)', which is replaced with | 928 | display spec is of the form `(space ...)', which is replaced with |
| 930 | u+2029 to handle it as a paragraph separator. STRING->s is the C | 929 | u+2029 to handle it as a paragraph separator. STRING->s is the C |
| 931 | string to iterate, or NULL if iterating over a buffer or a Lisp | 930 | string to iterate, or NULL if iterating over a buffer or a Lisp |
| @@ -933,7 +932,7 @@ bidi_char_at_pos (ptrdiff_t bytepos, const unsigned char *s, int unibyte) | |||
| 933 | static inline int | 932 | static inline int |
| 934 | bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | 933 | bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, |
| 935 | int *disp_prop, struct bidi_string_data *string, | 934 | int *disp_prop, struct bidi_string_data *string, |
| 936 | int frame_window_p, ptrdiff_t *ch_len, ptrdiff_t *nchars) | 935 | bool frame_window_p, ptrdiff_t *ch_len, ptrdiff_t *nchars) |
| 937 | { | 936 | { |
| 938 | int ch; | 937 | int ch; |
| 939 | ptrdiff_t endpos | 938 | ptrdiff_t endpos |
| @@ -1134,7 +1133,7 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte) | |||
| 1134 | R2L, just use that. Otherwise, determine the paragraph direction | 1133 | R2L, just use that. Otherwise, determine the paragraph direction |
| 1135 | from the first strong directional character of the paragraph. | 1134 | from the first strong directional character of the paragraph. |
| 1136 | 1135 | ||
| 1137 | NO_DEFAULT_P non-zero means don't default to L2R if the paragraph | 1136 | NO_DEFAULT_P means don't default to L2R if the paragraph |
| 1138 | has no strong directional characters and both DIR and | 1137 | has no strong directional characters and both DIR and |
| 1139 | bidi_it->paragraph_dir are NEUTRAL_DIR. In that case, search back | 1138 | bidi_it->paragraph_dir are NEUTRAL_DIR. In that case, search back |
| 1140 | in the buffer until a paragraph is found with a strong character, | 1139 | in the buffer until a paragraph is found with a strong character, |
| @@ -1145,10 +1144,10 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte) | |||
| 1145 | direction as the preceding paragraph, even though Emacs generally | 1144 | direction as the preceding paragraph, even though Emacs generally |
| 1146 | views the separator as not belonging to any paragraph. */ | 1145 | views the separator as not belonging to any paragraph. */ |
| 1147 | void | 1146 | void |
| 1148 | bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) | 1147 | bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, bool no_default_p) |
| 1149 | { | 1148 | { |
| 1150 | ptrdiff_t bytepos = bidi_it->bytepos; | 1149 | ptrdiff_t bytepos = bidi_it->bytepos; |
| 1151 | int string_p = bidi_it->string.s != NULL || STRINGP (bidi_it->string.lstring); | 1150 | bool string_p = bidi_it->string.s || STRINGP (bidi_it->string.lstring); |
| 1152 | ptrdiff_t pstartbyte; | 1151 | ptrdiff_t pstartbyte; |
| 1153 | /* Note that begbyte is a byte position, while end is a character | 1152 | /* Note that begbyte is a byte position, while end is a character |
| 1154 | position. Yes, this is ugly, but we are trying to avoid costly | 1153 | position. Yes, this is ugly, but we are trying to avoid costly |
| @@ -1221,8 +1220,8 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) | |||
| 1221 | bidi_it->separator_limit = -1; | 1220 | bidi_it->separator_limit = -1; |
| 1222 | bidi_it->new_paragraph = 0; | 1221 | bidi_it->new_paragraph = 0; |
| 1223 | 1222 | ||
| 1224 | /* The following loop is run more than once only if NO_DEFAULT_P | 1223 | /* The following loop is run more than once only if NO_DEFAULT_P, |
| 1225 | is non-zero, and only if we are iterating on a buffer. */ | 1224 | and only if we are iterating on a buffer. */ |
| 1226 | do { | 1225 | do { |
| 1227 | ptrdiff_t pos1; | 1226 | ptrdiff_t pos1; |
| 1228 | 1227 | ||
| @@ -1320,7 +1319,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) | |||
| 1320 | The rest of this file constitutes the core of the UBA implementation. | 1319 | The rest of this file constitutes the core of the UBA implementation. |
| 1321 | ***********************************************************************/ | 1320 | ***********************************************************************/ |
| 1322 | 1321 | ||
| 1323 | static inline int | 1322 | static inline bool |
| 1324 | bidi_explicit_dir_char (int ch) | 1323 | bidi_explicit_dir_char (int ch) |
| 1325 | { | 1324 | { |
| 1326 | bidi_type_t ch_type; | 1325 | bidi_type_t ch_type; |
| @@ -1345,7 +1344,7 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it) | |||
| 1345 | int current_level; | 1344 | int current_level; |
| 1346 | int new_level; | 1345 | int new_level; |
| 1347 | bidi_dir_t override; | 1346 | bidi_dir_t override; |
| 1348 | int string_p = bidi_it->string.s != NULL || STRINGP (bidi_it->string.lstring); | 1347 | bool string_p = bidi_it->string.s || STRINGP (bidi_it->string.lstring); |
| 1349 | 1348 | ||
| 1350 | /* If reseat()'ed, don't advance, so as to start iteration from the | 1349 | /* If reseat()'ed, don't advance, so as to start iteration from the |
| 1351 | position where we were reseated. bidi_it->bytepos can be less | 1350 | position where we were reseated. bidi_it->bytepos can be less |
| @@ -2189,7 +2188,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 2189 | ptrdiff_t nc = bidi_it->nchars; | 2188 | ptrdiff_t nc = bidi_it->nchars; |
| 2190 | struct bidi_string_data bs = bidi_it->string; | 2189 | struct bidi_string_data bs = bidi_it->string; |
| 2191 | bidi_type_t chtype; | 2190 | bidi_type_t chtype; |
| 2192 | int fwp = bidi_it->frame_window_p; | 2191 | bool fwp = bidi_it->frame_window_p; |
| 2193 | int dpp = bidi_it->disp_prop; | 2192 | int dpp = bidi_it->disp_prop; |
| 2194 | 2193 | ||
| 2195 | if (bidi_it->nchars <= 0) | 2194 | if (bidi_it->nchars <= 0) |
| @@ -2268,8 +2267,8 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 2268 | return level; | 2267 | return level; |
| 2269 | } | 2268 | } |
| 2270 | 2269 | ||
| 2271 | /* Move to the other edge of a level given by LEVEL. If END_FLAG is | 2270 | /* Move to the other edge of a level given by LEVEL. If END_FLAG, |
| 2272 | non-zero, we are at the end of a level, and we need to prepare to | 2271 | we are at the end of a level, and we need to prepare to |
| 2273 | resume the scan of the lower level. | 2272 | resume the scan of the lower level. |
| 2274 | 2273 | ||
| 2275 | If this level's other edge is cached, we simply jump to it, filling | 2274 | If this level's other edge is cached, we simply jump to it, filling |
| @@ -2289,7 +2288,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 2289 | function moves to point C, whereas the UAX#9 ``level 2 run'' ends | 2288 | function moves to point C, whereas the UAX#9 ``level 2 run'' ends |
| 2290 | at point B. */ | 2289 | at point B. */ |
| 2291 | static void | 2290 | static void |
| 2292 | bidi_find_other_level_edge (struct bidi_it *bidi_it, int level, int end_flag) | 2291 | bidi_find_other_level_edge (struct bidi_it *bidi_it, int level, bool end_flag) |
| 2293 | { | 2292 | { |
| 2294 | int dir = end_flag ? -bidi_it->scan_dir : bidi_it->scan_dir; | 2293 | int dir = end_flag ? -bidi_it->scan_dir : bidi_it->scan_dir; |
| 2295 | ptrdiff_t idx; | 2294 | ptrdiff_t idx; |
| @@ -2363,7 +2362,7 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it) | |||
| 2363 | scanning the text whenever we find a level change. */ | 2362 | scanning the text whenever we find a level change. */ |
| 2364 | if (new_level != old_level) | 2363 | if (new_level != old_level) |
| 2365 | { | 2364 | { |
| 2366 | int ascending = new_level > old_level; | 2365 | bool ascending = new_level > old_level; |
| 2367 | int level_to_search = ascending ? old_level + 1 : old_level; | 2366 | int level_to_search = ascending ? old_level + 1 : old_level; |
| 2368 | int incr = ascending ? 1 : -1; | 2367 | int incr = ascending ? 1 : -1; |
| 2369 | int expected_next_level = old_level + incr; | 2368 | int expected_next_level = old_level + incr; |
diff --git a/src/buffer.c b/src/buffer.c index 6f748158e21..ef87f40e81a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -108,10 +108,10 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS]; | |||
| 108 | int last_per_buffer_idx; | 108 | int last_per_buffer_idx; |
| 109 | 109 | ||
| 110 | static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, | 110 | static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, |
| 111 | int after, Lisp_Object arg1, | 111 | bool after, Lisp_Object arg1, |
| 112 | Lisp_Object arg2, Lisp_Object arg3); | 112 | Lisp_Object arg2, Lisp_Object arg3); |
| 113 | static void swap_out_buffer_local_variables (struct buffer *b); | 113 | static void swap_out_buffer_local_variables (struct buffer *b); |
| 114 | static void reset_buffer_local_variables (struct buffer *b, int permanent_too); | 114 | static void reset_buffer_local_variables (struct buffer *, bool); |
| 115 | 115 | ||
| 116 | /* Alist of all buffer names vs the buffers. */ | 116 | /* Alist of all buffer names vs the buffers. */ |
| 117 | /* This used to be a variable, but is no longer, | 117 | /* This used to be a variable, but is no longer, |
| @@ -153,7 +153,7 @@ static void alloc_buffer_text (struct buffer *, ptrdiff_t); | |||
| 153 | static void free_buffer_text (struct buffer *b); | 153 | static void free_buffer_text (struct buffer *b); |
| 154 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); | 154 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); |
| 155 | static void modify_overlay (struct buffer *, ptrdiff_t, ptrdiff_t); | 155 | static void modify_overlay (struct buffer *, ptrdiff_t, ptrdiff_t); |
| 156 | static Lisp_Object buffer_lisp_local_variables (struct buffer *, int); | 156 | static Lisp_Object buffer_lisp_local_variables (struct buffer *, bool); |
| 157 | 157 | ||
| 158 | /* These setters are used only in this file, so they can be private. */ | 158 | /* These setters are used only in this file, so they can be private. */ |
| 159 | static inline void | 159 | static inline void |
| @@ -977,15 +977,13 @@ reset_buffer (register struct buffer *b) | |||
| 977 | it does not treat permanent locals consistently. | 977 | it does not treat permanent locals consistently. |
| 978 | Instead, use Fkill_all_local_variables. | 978 | Instead, use Fkill_all_local_variables. |
| 979 | 979 | ||
| 980 | If PERMANENT_TOO is 1, then we reset permanent | 980 | If PERMANENT_TOO, reset permanent buffer-local variables. |
| 981 | buffer-local variables. If PERMANENT_TOO is 0, | 981 | If not, preserve those. */ |
| 982 | we preserve those. */ | ||
| 983 | 982 | ||
| 984 | static void | 983 | static void |
| 985 | reset_buffer_local_variables (register struct buffer *b, int permanent_too) | 984 | reset_buffer_local_variables (struct buffer *b, bool permanent_too) |
| 986 | { | 985 | { |
| 987 | register int offset; | 986 | int offset, i; |
| 988 | int i; | ||
| 989 | 987 | ||
| 990 | /* Reset the major mode to Fundamental, together with all the | 988 | /* Reset the major mode to Fundamental, together with all the |
| 991 | things that depend on the major mode. | 989 | things that depend on the major mode. |
| @@ -1251,14 +1249,14 @@ buffer_local_value_1 (Lisp_Object variable, Lisp_Object buffer) | |||
| 1251 | /* Return an alist of the Lisp-level buffer-local bindings of | 1249 | /* Return an alist of the Lisp-level buffer-local bindings of |
| 1252 | buffer BUF. That is, don't include the variables maintained | 1250 | buffer BUF. That is, don't include the variables maintained |
| 1253 | in special slots in the buffer object. | 1251 | in special slots in the buffer object. |
| 1254 | If CLONE is zero elements of the form (VAR . unbound) are replaced | 1252 | If not CLONE, replace elements of the form (VAR . unbound) |
| 1255 | by VAR. */ | 1253 | by VAR. */ |
| 1256 | 1254 | ||
| 1257 | static Lisp_Object | 1255 | static Lisp_Object |
| 1258 | buffer_lisp_local_variables (struct buffer *buf, int clone) | 1256 | buffer_lisp_local_variables (struct buffer *buf, bool clone) |
| 1259 | { | 1257 | { |
| 1260 | Lisp_Object result = Qnil; | 1258 | Lisp_Object result = Qnil; |
| 1261 | register Lisp_Object tail; | 1259 | Lisp_Object tail; |
| 1262 | for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) | 1260 | for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) |
| 1263 | { | 1261 | { |
| 1264 | Lisp_Object val, elt; | 1262 | Lisp_Object val, elt; |
| @@ -1349,11 +1347,9 @@ DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, | |||
| 1349 | 1, 1, 0, | 1347 | 1, 1, 0, |
| 1350 | doc: /* Mark current buffer as modified or unmodified according to FLAG. | 1348 | doc: /* Mark current buffer as modified or unmodified according to FLAG. |
| 1351 | A non-nil FLAG means mark the buffer modified. */) | 1349 | A non-nil FLAG means mark the buffer modified. */) |
| 1352 | (register Lisp_Object flag) | 1350 | (Lisp_Object flag) |
| 1353 | { | 1351 | { |
| 1354 | register int already; | 1352 | Lisp_Object fn, buffer, window; |
| 1355 | register Lisp_Object fn; | ||
| 1356 | Lisp_Object buffer, window; | ||
| 1357 | 1353 | ||
| 1358 | #ifdef CLASH_DETECTION | 1354 | #ifdef CLASH_DETECTION |
| 1359 | /* If buffer becoming modified, lock the file. | 1355 | /* If buffer becoming modified, lock the file. |
| @@ -1363,7 +1359,7 @@ A non-nil FLAG means mark the buffer modified. */) | |||
| 1363 | /* Test buffer-file-name so that binding it to nil is effective. */ | 1359 | /* Test buffer-file-name so that binding it to nil is effective. */ |
| 1364 | if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) | 1360 | if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) |
| 1365 | { | 1361 | { |
| 1366 | already = SAVE_MODIFF < MODIFF; | 1362 | bool already = SAVE_MODIFF < MODIFF; |
| 1367 | if (!already && !NILP (flag)) | 1363 | if (!already && !NILP (flag)) |
| 1368 | lock_file (fn); | 1364 | lock_file (fn); |
| 1369 | else if (already && NILP (flag)) | 1365 | else if (already && NILP (flag)) |
| @@ -1430,7 +1426,7 @@ state of the current buffer. Use with care. */) | |||
| 1430 | /* Test buffer-file-name so that binding it to nil is effective. */ | 1426 | /* Test buffer-file-name so that binding it to nil is effective. */ |
| 1431 | if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) | 1427 | if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) |
| 1432 | { | 1428 | { |
| 1433 | int already = SAVE_MODIFF < MODIFF; | 1429 | bool already = SAVE_MODIFF < MODIFF; |
| 1434 | if (!already && !NILP (flag)) | 1430 | if (!already && !NILP (flag)) |
| 1435 | lock_file (fn); | 1431 | lock_file (fn); |
| 1436 | else if (already && NILP (flag)) | 1432 | else if (already && NILP (flag)) |
| @@ -1555,7 +1551,6 @@ list first, followed by the list of all buffers. If no other buffer | |||
| 1555 | exists, return the buffer `*scratch*' (creating it if necessary). */) | 1551 | exists, return the buffer `*scratch*' (creating it if necessary). */) |
| 1556 | (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame) | 1552 | (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame) |
| 1557 | { | 1553 | { |
| 1558 | Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer); | ||
| 1559 | Lisp_Object tail, buf, pred; | 1554 | Lisp_Object tail, buf, pred; |
| 1560 | Lisp_Object notsogood = Qnil; | 1555 | Lisp_Object notsogood = Qnil; |
| 1561 | 1556 | ||
| @@ -1626,7 +1621,6 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) | |||
| 1626 | Lisp_Object | 1621 | Lisp_Object |
| 1627 | other_buffer_safely (Lisp_Object buffer) | 1622 | other_buffer_safely (Lisp_Object buffer) |
| 1628 | { | 1623 | { |
| 1629 | Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer); | ||
| 1630 | Lisp_Object tail, buf; | 1624 | Lisp_Object tail, buf; |
| 1631 | 1625 | ||
| 1632 | tail = Vbuffer_alist; | 1626 | tail = Vbuffer_alist; |
| @@ -1674,7 +1668,7 @@ No argument or nil as argument means do this for the current buffer. */) | |||
| 1674 | 1668 | ||
| 1675 | /* Truncate undo list and shrink the gap of BUFFER. */ | 1669 | /* Truncate undo list and shrink the gap of BUFFER. */ |
| 1676 | 1670 | ||
| 1677 | int | 1671 | void |
| 1678 | compact_buffer (struct buffer *buffer) | 1672 | compact_buffer (struct buffer *buffer) |
| 1679 | { | 1673 | { |
| 1680 | /* Verify indirection counters. */ | 1674 | /* Verify indirection counters. */ |
| @@ -1716,9 +1710,7 @@ compact_buffer (struct buffer *buffer) | |||
| 1716 | } | 1710 | } |
| 1717 | } | 1711 | } |
| 1718 | buffer->text->compact = buffer->text->modiff; | 1712 | buffer->text->compact = buffer->text->modiff; |
| 1719 | return 1; | ||
| 1720 | } | 1713 | } |
| 1721 | return 0; | ||
| 1722 | } | 1714 | } |
| 1723 | 1715 | ||
| 1724 | DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ", | 1716 | DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ", |
| @@ -2068,8 +2060,10 @@ the current buffer's major mode. */) | |||
| 2068 | 2060 | ||
| 2069 | CHECK_BUFFER (buffer); | 2061 | CHECK_BUFFER (buffer); |
| 2070 | 2062 | ||
| 2071 | if (STRINGP (BVAR (XBUFFER (buffer), name)) | 2063 | if (NILP (BVAR (XBUFFER (buffer), name))) |
| 2072 | && strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0) | 2064 | error ("Attempt to set major mode for a dead buffer"); |
| 2065 | |||
| 2066 | if (strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0) | ||
| 2073 | function = find_symbol_value (intern ("initial-major-mode")); | 2067 | function = find_symbol_value (intern ("initial-major-mode")); |
| 2074 | else | 2068 | else |
| 2075 | { | 2069 | { |
| @@ -2103,22 +2097,6 @@ DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, | |||
| 2103 | XSETBUFFER (buf, current_buffer); | 2097 | XSETBUFFER (buf, current_buffer); |
| 2104 | return buf; | 2098 | return buf; |
| 2105 | } | 2099 | } |
| 2106 | |||
| 2107 | /* Set the current buffer to B. | ||
| 2108 | |||
| 2109 | We previously set windows_or_buffers_changed here to invalidate | ||
| 2110 | global unchanged information in beg_unchanged and end_unchanged. | ||
| 2111 | This is no longer necessary because we now compute unchanged | ||
| 2112 | information on a buffer-basis. Every action affecting other | ||
| 2113 | windows than the selected one requires a select_window at some | ||
| 2114 | time, and that increments windows_or_buffers_changed. */ | ||
| 2115 | |||
| 2116 | void | ||
| 2117 | set_buffer_internal (register struct buffer *b) | ||
| 2118 | { | ||
| 2119 | if (current_buffer != b) | ||
| 2120 | set_buffer_internal_1 (b); | ||
| 2121 | } | ||
| 2122 | 2100 | ||
| 2123 | /* Set the current buffer to B, and do not set windows_or_buffers_changed. | 2101 | /* Set the current buffer to B, and do not set windows_or_buffers_changed. |
| 2124 | This is used by redisplay. */ | 2102 | This is used by redisplay. */ |
| @@ -2224,13 +2202,13 @@ ends when the current command terminates. Use `switch-to-buffer' or | |||
| 2224 | return buffer; | 2202 | return buffer; |
| 2225 | } | 2203 | } |
| 2226 | 2204 | ||
| 2227 | /* Set the current buffer to BUFFER provided it is alive. */ | 2205 | /* Set the current buffer to BUFFER provided if it is alive. */ |
| 2228 | 2206 | ||
| 2229 | Lisp_Object | 2207 | Lisp_Object |
| 2230 | set_buffer_if_live (Lisp_Object buffer) | 2208 | set_buffer_if_live (Lisp_Object buffer) |
| 2231 | { | 2209 | { |
| 2232 | if (! NILP (BVAR (XBUFFER (buffer), name))) | 2210 | if (! NILP (BVAR (XBUFFER (buffer), name))) |
| 2233 | Fset_buffer (buffer); | 2211 | set_buffer_internal (XBUFFER (buffer)); |
| 2234 | return Qnil; | 2212 | return Qnil; |
| 2235 | } | 2213 | } |
| 2236 | 2214 | ||
| @@ -2469,8 +2447,8 @@ current buffer is cleared. */) | |||
| 2469 | struct Lisp_Marker *tail, *markers; | 2447 | struct Lisp_Marker *tail, *markers; |
| 2470 | struct buffer *other; | 2448 | struct buffer *other; |
| 2471 | ptrdiff_t begv, zv; | 2449 | ptrdiff_t begv, zv; |
| 2472 | int narrowed = (BEG != BEGV || Z != ZV); | 2450 | bool narrowed = (BEG != BEGV || Z != ZV); |
| 2473 | int modified_p = !NILP (Fbuffer_modified_p (Qnil)); | 2451 | bool modified_p = !NILP (Fbuffer_modified_p (Qnil)); |
| 2474 | Lisp_Object old_undo = BVAR (current_buffer, undo_list); | 2452 | Lisp_Object old_undo = BVAR (current_buffer, undo_list); |
| 2475 | struct gcpro gcpro1; | 2453 | struct gcpro gcpro1; |
| 2476 | 2454 | ||
| @@ -2819,19 +2797,19 @@ swap_out_buffer_local_variables (struct buffer *b) | |||
| 2819 | *VEC_PTR and *LEN_PTR should contain a valid vector and size | 2797 | *VEC_PTR and *LEN_PTR should contain a valid vector and size |
| 2820 | when this function is called. | 2798 | when this function is called. |
| 2821 | 2799 | ||
| 2822 | If EXTEND is non-zero, we make the vector bigger if necessary. | 2800 | If EXTEND, make the vector bigger if necessary. |
| 2823 | If EXTEND is zero, we never extend the vector, | 2801 | If not, never extend the vector, |
| 2824 | and we store only as many overlays as will fit. | 2802 | and store only as many overlays as will fit. |
| 2825 | But we still return the total number of overlays. | 2803 | But still return the total number of overlays. |
| 2826 | 2804 | ||
| 2827 | If CHANGE_REQ is true, then any position written into *PREV_PTR or | 2805 | If CHANGE_REQ, any position written into *PREV_PTR or |
| 2828 | *NEXT_PTR is guaranteed to be not equal to POS, unless it is the | 2806 | *NEXT_PTR is guaranteed to be not equal to POS, unless it is the |
| 2829 | default (BEGV or ZV). */ | 2807 | default (BEGV or ZV). */ |
| 2830 | 2808 | ||
| 2831 | ptrdiff_t | 2809 | ptrdiff_t |
| 2832 | overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, | 2810 | overlays_at (EMACS_INT pos, bool extend, Lisp_Object **vec_ptr, |
| 2833 | ptrdiff_t *len_ptr, | 2811 | ptrdiff_t *len_ptr, |
| 2834 | ptrdiff_t *next_ptr, ptrdiff_t *prev_ptr, int change_req) | 2812 | ptrdiff_t *next_ptr, ptrdiff_t *prev_ptr, bool change_req) |
| 2835 | { | 2813 | { |
| 2836 | Lisp_Object overlay, start, end; | 2814 | Lisp_Object overlay, start, end; |
| 2837 | struct Lisp_Overlay *tail; | 2815 | struct Lisp_Overlay *tail; |
| @@ -2840,7 +2818,7 @@ overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, | |||
| 2840 | Lisp_Object *vec = *vec_ptr; | 2818 | Lisp_Object *vec = *vec_ptr; |
| 2841 | ptrdiff_t next = ZV; | 2819 | ptrdiff_t next = ZV; |
| 2842 | ptrdiff_t prev = BEGV; | 2820 | ptrdiff_t prev = BEGV; |
| 2843 | int inhibit_storing = 0; | 2821 | bool inhibit_storing = 0; |
| 2844 | 2822 | ||
| 2845 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 2823 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 2846 | { | 2824 | { |
| @@ -2957,13 +2935,13 @@ overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, | |||
| 2957 | *VEC_PTR and *LEN_PTR should contain a valid vector and size | 2935 | *VEC_PTR and *LEN_PTR should contain a valid vector and size |
| 2958 | when this function is called. | 2936 | when this function is called. |
| 2959 | 2937 | ||
| 2960 | If EXTEND is non-zero, we make the vector bigger if necessary. | 2938 | If EXTEND, make the vector bigger if necessary. |
| 2961 | If EXTEND is zero, we never extend the vector, | 2939 | If not, never extend the vector, |
| 2962 | and we store only as many overlays as will fit. | 2940 | and store only as many overlays as will fit. |
| 2963 | But we still return the total number of overlays. */ | 2941 | But still return the total number of overlays. */ |
| 2964 | 2942 | ||
| 2965 | static ptrdiff_t | 2943 | static ptrdiff_t |
| 2966 | overlays_in (EMACS_INT beg, EMACS_INT end, int extend, | 2944 | overlays_in (EMACS_INT beg, EMACS_INT end, bool extend, |
| 2967 | Lisp_Object **vec_ptr, ptrdiff_t *len_ptr, | 2945 | Lisp_Object **vec_ptr, ptrdiff_t *len_ptr, |
| 2968 | ptrdiff_t *next_ptr, ptrdiff_t *prev_ptr) | 2946 | ptrdiff_t *next_ptr, ptrdiff_t *prev_ptr) |
| 2969 | { | 2947 | { |
| @@ -2974,8 +2952,8 @@ overlays_in (EMACS_INT beg, EMACS_INT end, int extend, | |||
| 2974 | Lisp_Object *vec = *vec_ptr; | 2952 | Lisp_Object *vec = *vec_ptr; |
| 2975 | ptrdiff_t next = ZV; | 2953 | ptrdiff_t next = ZV; |
| 2976 | ptrdiff_t prev = BEGV; | 2954 | ptrdiff_t prev = BEGV; |
| 2977 | int inhibit_storing = 0; | 2955 | bool inhibit_storing = 0; |
| 2978 | int end_is_Z = end == Z; | 2956 | bool end_is_Z = end == Z; |
| 2979 | 2957 | ||
| 2980 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 2958 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 2981 | { | 2959 | { |
| @@ -3076,10 +3054,10 @@ overlays_in (EMACS_INT beg, EMACS_INT end, int extend, | |||
| 3076 | } | 3054 | } |
| 3077 | 3055 | ||
| 3078 | 3056 | ||
| 3079 | /* Return non-zero if there exists an overlay with a non-nil | 3057 | /* Return true if there exists an overlay with a non-nil |
| 3080 | `mouse-face' property overlapping OVERLAY. */ | 3058 | `mouse-face' property overlapping OVERLAY. */ |
| 3081 | 3059 | ||
| 3082 | int | 3060 | bool |
| 3083 | mouse_face_overlay_overlaps (Lisp_Object overlay) | 3061 | mouse_face_overlay_overlaps (Lisp_Object overlay) |
| 3084 | { | 3062 | { |
| 3085 | ptrdiff_t start = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3063 | ptrdiff_t start = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| @@ -3108,7 +3086,7 @@ mouse_face_overlay_overlaps (Lisp_Object overlay) | |||
| 3108 | 3086 | ||
| 3109 | 3087 | ||
| 3110 | /* Fast function to just test if we're at an overlay boundary. */ | 3088 | /* Fast function to just test if we're at an overlay boundary. */ |
| 3111 | int | 3089 | bool |
| 3112 | overlay_touches_p (ptrdiff_t pos) | 3090 | overlay_touches_p (ptrdiff_t pos) |
| 3113 | { | 3091 | { |
| 3114 | Lisp_Object overlay; | 3092 | Lisp_Object overlay; |
| @@ -3325,7 +3303,7 @@ overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr) | |||
| 3325 | Lisp_Object overlay, window, str; | 3303 | Lisp_Object overlay, window, str; |
| 3326 | struct Lisp_Overlay *ov; | 3304 | struct Lisp_Overlay *ov; |
| 3327 | ptrdiff_t startpos, endpos; | 3305 | ptrdiff_t startpos, endpos; |
| 3328 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 3306 | bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 3329 | 3307 | ||
| 3330 | overlay_heads.used = overlay_heads.bytes = 0; | 3308 | overlay_heads.used = overlay_heads.bytes = 0; |
| 3331 | overlay_tails.used = overlay_tails.bytes = 0; | 3309 | overlay_tails.used = overlay_tails.bytes = 0; |
| @@ -4093,6 +4071,26 @@ DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, | |||
| 4093 | 4071 | ||
| 4094 | return unbind_to (count, Qnil); | 4072 | return unbind_to (count, Qnil); |
| 4095 | } | 4073 | } |
| 4074 | |||
| 4075 | DEFUN ("delete-all-overlays", Fdelete_all_overlays, Sdelete_all_overlays, 0, 1, 0, | ||
| 4076 | doc: /* Delete all overlays of BUFFER. | ||
| 4077 | BUFFER omitted or nil means delete all overlays of the current | ||
| 4078 | buffer. */) | ||
| 4079 | (Lisp_Object buffer) | ||
| 4080 | { | ||
| 4081 | register struct buffer *buf; | ||
| 4082 | |||
| 4083 | if (NILP (buffer)) | ||
| 4084 | buf = current_buffer; | ||
| 4085 | else | ||
| 4086 | { | ||
| 4087 | CHECK_BUFFER (buffer); | ||
| 4088 | buf = XBUFFER (buffer); | ||
| 4089 | } | ||
| 4090 | |||
| 4091 | delete_all_overlays (buf); | ||
| 4092 | return Qnil; | ||
| 4093 | } | ||
| 4096 | 4094 | ||
| 4097 | /* Overlay dissection functions. */ | 4095 | /* Overlay dissection functions. */ |
| 4098 | 4096 | ||
| @@ -4319,7 +4317,7 @@ VALUE will be returned.*/) | |||
| 4319 | (Lisp_Object overlay, Lisp_Object prop, Lisp_Object value) | 4317 | (Lisp_Object overlay, Lisp_Object prop, Lisp_Object value) |
| 4320 | { | 4318 | { |
| 4321 | Lisp_Object tail, buffer; | 4319 | Lisp_Object tail, buffer; |
| 4322 | int changed; | 4320 | bool changed; |
| 4323 | 4321 | ||
| 4324 | CHECK_OVERLAY (overlay); | 4322 | CHECK_OVERLAY (overlay); |
| 4325 | 4323 | ||
| @@ -4394,7 +4392,7 @@ add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay) | |||
| 4394 | and the insert-after-hooks of overlay ending at START. | 4392 | and the insert-after-hooks of overlay ending at START. |
| 4395 | 4393 | ||
| 4396 | This is called both before and after the modification. | 4394 | This is called both before and after the modification. |
| 4397 | AFTER is nonzero when we call after the modification. | 4395 | AFTER is true when we call after the modification. |
| 4398 | 4396 | ||
| 4399 | ARG1, ARG2, ARG3 are arguments to pass to the hook functions. | 4397 | ARG1, ARG2, ARG3 are arguments to pass to the hook functions. |
| 4400 | When AFTER is nonzero, they are the start position, | 4398 | When AFTER is nonzero, they are the start position, |
| @@ -4402,13 +4400,13 @@ add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay) | |||
| 4402 | and the length of deleted or replaced old text. */ | 4400 | and the length of deleted or replaced old text. */ |
| 4403 | 4401 | ||
| 4404 | void | 4402 | void |
| 4405 | report_overlay_modification (Lisp_Object start, Lisp_Object end, int after, | 4403 | report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, |
| 4406 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) | 4404 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| 4407 | { | 4405 | { |
| 4408 | Lisp_Object prop, overlay; | 4406 | Lisp_Object prop, overlay; |
| 4409 | struct Lisp_Overlay *tail; | 4407 | struct Lisp_Overlay *tail; |
| 4410 | /* 1 if this change is an insertion. */ | 4408 | /* True if this change is an insertion. */ |
| 4411 | int insertion = (after ? XFASTINT (arg3) == 0 : EQ (start, end)); | 4409 | bool insertion = (after ? XFASTINT (arg3) == 0 : EQ (start, end)); |
| 4412 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 4410 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 4413 | 4411 | ||
| 4414 | overlay = Qnil; | 4412 | overlay = Qnil; |
| @@ -4528,7 +4526,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, int after, | |||
| 4528 | } | 4526 | } |
| 4529 | 4527 | ||
| 4530 | static void | 4528 | static void |
| 4531 | call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after, | 4529 | call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, bool after, |
| 4532 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) | 4530 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| 4533 | { | 4531 | { |
| 4534 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 4532 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| @@ -4687,7 +4685,7 @@ static int mmap_page_size; | |||
| 4687 | 4685 | ||
| 4688 | /* 1 means mmap has been initialized. */ | 4686 | /* 1 means mmap has been initialized. */ |
| 4689 | 4687 | ||
| 4690 | static int mmap_initialized_p; | 4688 | static bool mmap_initialized_p; |
| 4691 | 4689 | ||
| 4692 | /* Value is X rounded up to the next multiple of N. */ | 4690 | /* Value is X rounded up to the next multiple of N. */ |
| 4693 | 4691 | ||
| @@ -4783,9 +4781,9 @@ mmap_find (void *start, void *end) | |||
| 4783 | 4781 | ||
| 4784 | 4782 | ||
| 4785 | /* Unmap a region. P is a pointer to the start of the user-araa of | 4783 | /* Unmap a region. P is a pointer to the start of the user-araa of |
| 4786 | the region. Value is non-zero if successful. */ | 4784 | the region. */ |
| 4787 | 4785 | ||
| 4788 | static int | 4786 | static void |
| 4789 | mmap_free_1 (struct mmap_region *r) | 4787 | mmap_free_1 (struct mmap_region *r) |
| 4790 | { | 4788 | { |
| 4791 | if (r->next) | 4789 | if (r->next) |
| @@ -4796,24 +4794,19 @@ mmap_free_1 (struct mmap_region *r) | |||
| 4796 | mmap_regions = r->next; | 4794 | mmap_regions = r->next; |
| 4797 | 4795 | ||
| 4798 | if (munmap (r, r->nbytes_mapped) == -1) | 4796 | if (munmap (r, r->nbytes_mapped) == -1) |
| 4799 | { | 4797 | fprintf (stderr, "munmap: %s\n", emacs_strerror (errno)); |
| 4800 | fprintf (stderr, "munmap: %s\n", emacs_strerror (errno)); | ||
| 4801 | return 0; | ||
| 4802 | } | ||
| 4803 | |||
| 4804 | return 1; | ||
| 4805 | } | 4798 | } |
| 4806 | 4799 | ||
| 4807 | 4800 | ||
| 4808 | /* Enlarge region R by NPAGES pages. NPAGES < 0 means shrink R. | 4801 | /* Enlarge region R by NPAGES pages. NPAGES < 0 means shrink R. |
| 4809 | Value is non-zero if successful. */ | 4802 | Value is true if successful. */ |
| 4810 | 4803 | ||
| 4811 | static int | 4804 | static bool |
| 4812 | mmap_enlarge (struct mmap_region *r, int npages) | 4805 | mmap_enlarge (struct mmap_region *r, int npages) |
| 4813 | { | 4806 | { |
| 4814 | char *region_end = (char *) r + r->nbytes_mapped; | 4807 | char *region_end = (char *) r + r->nbytes_mapped; |
| 4815 | size_t nbytes; | 4808 | size_t nbytes; |
| 4816 | int success = 0; | 4809 | bool success = 0; |
| 4817 | 4810 | ||
| 4818 | if (npages < 0) | 4811 | if (npages < 0) |
| 4819 | { | 4812 | { |
| @@ -4863,17 +4856,16 @@ mmap_enlarge (struct mmap_region *r, int npages) | |||
| 4863 | } | 4856 | } |
| 4864 | 4857 | ||
| 4865 | 4858 | ||
| 4866 | /* Set or reset variables holding references to mapped regions. If | 4859 | /* Set or reset variables holding references to mapped regions. |
| 4867 | RESTORE_P is zero, set all variables to null. If RESTORE_P is | 4860 | If not RESTORE_P, set all variables to null. If RESTORE_P, set all |
| 4868 | non-zero, set all variables to the start of the user-areas | 4861 | variables to the start of the user-areas of mapped regions. |
| 4869 | of mapped regions. | ||
| 4870 | 4862 | ||
| 4871 | This function is called from Fdump_emacs to ensure that the dumped | 4863 | This function is called from Fdump_emacs to ensure that the dumped |
| 4872 | Emacs doesn't contain references to memory that won't be mapped | 4864 | Emacs doesn't contain references to memory that won't be mapped |
| 4873 | when Emacs starts. */ | 4865 | when Emacs starts. */ |
| 4874 | 4866 | ||
| 4875 | void | 4867 | void |
| 4876 | mmap_set_vars (int restore_p) | 4868 | mmap_set_vars (bool restore_p) |
| 4877 | { | 4869 | { |
| 4878 | struct mmap_region *r; | 4870 | struct mmap_region *r; |
| 4879 | 4871 | ||
| @@ -6312,6 +6304,7 @@ and `bury-buffer-internal'. */); | |||
| 6312 | defsubr (&Soverlayp); | 6304 | defsubr (&Soverlayp); |
| 6313 | defsubr (&Smake_overlay); | 6305 | defsubr (&Smake_overlay); |
| 6314 | defsubr (&Sdelete_overlay); | 6306 | defsubr (&Sdelete_overlay); |
| 6307 | defsubr (&Sdelete_all_overlays); | ||
| 6315 | defsubr (&Smove_overlay); | 6308 | defsubr (&Smove_overlay); |
| 6316 | defsubr (&Soverlay_start); | 6309 | defsubr (&Soverlay_start); |
| 6317 | defsubr (&Soverlay_end); | 6310 | defsubr (&Soverlay_end); |
diff --git a/src/buffer.h b/src/buffer.h index de7ca7eb2e7..e603486418b 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -471,7 +471,7 @@ struct buffer_text | |||
| 471 | /* Usually 0. Temporarily set to 1 in decode_coding_gap to | 471 | /* Usually 0. Temporarily set to 1 in decode_coding_gap to |
| 472 | prevent Fgarbage_collect from shrinking the gap and losing | 472 | prevent Fgarbage_collect from shrinking the gap and losing |
| 473 | not-yet-decoded bytes. */ | 473 | not-yet-decoded bytes. */ |
| 474 | int inhibit_shrinking; | 474 | bool inhibit_shrinking; |
| 475 | }; | 475 | }; |
| 476 | 476 | ||
| 477 | /* Most code should use this macro to access Lisp fields in struct buffer. */ | 477 | /* Most code should use this macro to access Lisp fields in struct buffer. */ |
| @@ -1002,23 +1002,46 @@ extern struct buffer buffer_local_symbols; | |||
| 1002 | 1002 | ||
| 1003 | extern void delete_all_overlays (struct buffer *); | 1003 | extern void delete_all_overlays (struct buffer *); |
| 1004 | extern void reset_buffer (struct buffer *); | 1004 | extern void reset_buffer (struct buffer *); |
| 1005 | extern int compact_buffer (struct buffer *); | 1005 | extern void compact_buffer (struct buffer *); |
| 1006 | extern void evaporate_overlays (ptrdiff_t); | 1006 | extern void evaporate_overlays (ptrdiff_t); |
| 1007 | extern ptrdiff_t overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, | 1007 | extern ptrdiff_t overlays_at (EMACS_INT, bool, Lisp_Object **, |
| 1008 | ptrdiff_t *len_ptr, ptrdiff_t *next_ptr, | 1008 | ptrdiff_t *, ptrdiff_t *, ptrdiff_t *, bool); |
| 1009 | ptrdiff_t *prev_ptr, int change_req); | ||
| 1010 | extern ptrdiff_t sort_overlays (Lisp_Object *, ptrdiff_t, struct window *); | 1009 | extern ptrdiff_t sort_overlays (Lisp_Object *, ptrdiff_t, struct window *); |
| 1011 | extern void recenter_overlay_lists (struct buffer *, ptrdiff_t); | 1010 | extern void recenter_overlay_lists (struct buffer *, ptrdiff_t); |
| 1012 | extern ptrdiff_t overlay_strings (ptrdiff_t, struct window *, unsigned char **); | 1011 | extern ptrdiff_t overlay_strings (ptrdiff_t, struct window *, unsigned char **); |
| 1013 | extern void validate_region (Lisp_Object *, Lisp_Object *); | 1012 | extern void validate_region (Lisp_Object *, Lisp_Object *); |
| 1014 | extern void set_buffer_internal (struct buffer *); | ||
| 1015 | extern void set_buffer_internal_1 (struct buffer *); | 1013 | extern void set_buffer_internal_1 (struct buffer *); |
| 1016 | extern void set_buffer_temp (struct buffer *); | 1014 | extern void set_buffer_temp (struct buffer *); |
| 1017 | extern Lisp_Object buffer_local_value_1 (Lisp_Object, Lisp_Object); | 1015 | extern Lisp_Object buffer_local_value_1 (Lisp_Object, Lisp_Object); |
| 1018 | extern void record_buffer (Lisp_Object); | 1016 | extern void record_buffer (Lisp_Object); |
| 1019 | extern _Noreturn void buffer_slot_type_mismatch (Lisp_Object, int); | 1017 | extern _Noreturn void buffer_slot_type_mismatch (Lisp_Object, int); |
| 1020 | extern void fix_overlays_before (struct buffer *, ptrdiff_t, ptrdiff_t); | 1018 | extern void fix_overlays_before (struct buffer *, ptrdiff_t, ptrdiff_t); |
| 1021 | extern void mmap_set_vars (int); | 1019 | extern void mmap_set_vars (bool); |
| 1020 | |||
| 1021 | /* Set the current buffer to B. | ||
| 1022 | |||
| 1023 | We previously set windows_or_buffers_changed here to invalidate | ||
| 1024 | global unchanged information in beg_unchanged and end_unchanged. | ||
| 1025 | This is no longer necessary because we now compute unchanged | ||
| 1026 | information on a buffer-basis. Every action affecting other | ||
| 1027 | windows than the selected one requires a select_window at some | ||
| 1028 | time, and that increments windows_or_buffers_changed. */ | ||
| 1029 | |||
| 1030 | BUFFER_INLINE void | ||
| 1031 | set_buffer_internal (struct buffer *b) | ||
| 1032 | { | ||
| 1033 | if (current_buffer != b) | ||
| 1034 | set_buffer_internal_1 (b); | ||
| 1035 | } | ||
| 1036 | |||
| 1037 | /* Arrange to go back to the original buffer after the next | ||
| 1038 | call to unbind_to if the original buffer is still alive. */ | ||
| 1039 | |||
| 1040 | BUFFER_INLINE void | ||
| 1041 | record_unwind_current_buffer (void) | ||
| 1042 | { | ||
| 1043 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | ||
| 1044 | } | ||
| 1022 | 1045 | ||
| 1023 | /* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements. | 1046 | /* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements. |
| 1024 | If NEXTP is non-NULL, return next overlay there. | 1047 | If NEXTP is non-NULL, return next overlay there. |
| @@ -1063,7 +1086,7 @@ set_buffer_intervals (struct buffer *b, INTERVAL i) | |||
| 1063 | 1086 | ||
| 1064 | /* Non-zero if current buffer has overlays. */ | 1087 | /* Non-zero if current buffer has overlays. */ |
| 1065 | 1088 | ||
| 1066 | BUFFER_INLINE int | 1089 | BUFFER_INLINE bool |
| 1067 | buffer_has_overlays (void) | 1090 | buffer_has_overlays (void) |
| 1068 | { | 1091 | { |
| 1069 | return current_buffer->overlays_before || current_buffer->overlays_after; | 1092 | return current_buffer->overlays_before || current_buffer->overlays_after; |
| @@ -1239,7 +1262,7 @@ downcase (int c) | |||
| 1239 | } | 1262 | } |
| 1240 | 1263 | ||
| 1241 | /* 1 if C is upper case. */ | 1264 | /* 1 if C is upper case. */ |
| 1242 | BUFFER_INLINE int uppercasep (int c) { return downcase (c) != c; } | 1265 | BUFFER_INLINE bool uppercasep (int c) { return downcase (c) != c; } |
| 1243 | 1266 | ||
| 1244 | /* Upcase a character C known to be not upper case. */ | 1267 | /* Upcase a character C known to be not upper case. */ |
| 1245 | BUFFER_INLINE int | 1268 | BUFFER_INLINE int |
| @@ -1251,8 +1274,11 @@ upcase1 (int c) | |||
| 1251 | } | 1274 | } |
| 1252 | 1275 | ||
| 1253 | /* 1 if C is lower case. */ | 1276 | /* 1 if C is lower case. */ |
| 1254 | BUFFER_INLINE int lowercasep (int c) | 1277 | BUFFER_INLINE bool |
| 1255 | { return !uppercasep (c) && upcase1 (c) != c; } | 1278 | lowercasep (int c) |
| 1279 | { | ||
| 1280 | return !uppercasep (c) && upcase1 (c) != c; | ||
| 1281 | } | ||
| 1256 | 1282 | ||
| 1257 | /* Upcase a character C, or make no change if that cannot be done. */ | 1283 | /* Upcase a character C, or make no change if that cannot be done. */ |
| 1258 | BUFFER_INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); } | 1284 | BUFFER_INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); } |
diff --git a/src/bytecode.c b/src/bytecode.c index d61e37d7886..be5b7ea6137 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -550,7 +550,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 550 | if (INTEGERP (args_template)) | 550 | if (INTEGERP (args_template)) |
| 551 | { | 551 | { |
| 552 | ptrdiff_t at = XINT (args_template); | 552 | ptrdiff_t at = XINT (args_template); |
| 553 | int rest = at & 128; | 553 | bool rest = (at & 128) != 0; |
| 554 | int mandatory = at & 127; | 554 | int mandatory = at & 127; |
| 555 | ptrdiff_t nonrest = at >> 8; | 555 | ptrdiff_t nonrest = at >> 8; |
| 556 | eassert (mandatory <= nonrest); | 556 | eassert (mandatory <= nonrest); |
| @@ -1048,7 +1048,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1048 | 1048 | ||
| 1049 | CASE (Bsave_current_buffer): /* Obsolete since ??. */ | 1049 | CASE (Bsave_current_buffer): /* Obsolete since ??. */ |
| 1050 | CASE (Bsave_current_buffer_1): | 1050 | CASE (Bsave_current_buffer_1): |
| 1051 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 1051 | record_unwind_current_buffer (); |
| 1052 | NEXT; | 1052 | NEXT; |
| 1053 | 1053 | ||
| 1054 | CASE (Bsave_window_excursion): /* Obsolete since 24.1. */ | 1054 | CASE (Bsave_window_excursion): /* Obsolete since 24.1. */ |
diff --git a/src/callint.c b/src/callint.c index 36a59e812f2..b11545ddea2 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -150,7 +150,7 @@ static const char *callint_argfuns[] | |||
| 150 | = {"", "point", "mark", "region-beginning", "region-end"}; | 150 | = {"", "point", "mark", "region-beginning", "region-end"}; |
| 151 | 151 | ||
| 152 | static void | 152 | static void |
| 153 | check_mark (int for_region) | 153 | check_mark (bool for_region) |
| 154 | { | 154 | { |
| 155 | Lisp_Object tem; | 155 | Lisp_Object tem; |
| 156 | tem = Fmarker_buffer (BVAR (current_buffer, mark)); | 156 | tem = Fmarker_buffer (BVAR (current_buffer, mark)); |
| @@ -273,11 +273,11 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 273 | signed char *varies; | 273 | signed char *varies; |
| 274 | 274 | ||
| 275 | ptrdiff_t i, nargs; | 275 | ptrdiff_t i, nargs; |
| 276 | int foo; | 276 | ptrdiff_t mark; |
| 277 | int arg_from_tty = 0; | 277 | bool arg_from_tty = 0; |
| 278 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 278 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 279 | ptrdiff_t key_count; | 279 | ptrdiff_t key_count; |
| 280 | int record_then_fail = 0; | 280 | bool record_then_fail = 0; |
| 281 | 281 | ||
| 282 | Lisp_Object save_this_command, save_last_command; | 282 | Lisp_Object save_this_command, save_last_command; |
| 283 | Lisp_Object save_this_original_command, save_real_this_command; | 283 | Lisp_Object save_this_original_command, save_real_this_command; |
| @@ -685,7 +685,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 685 | goto have_prefix_arg; | 685 | goto have_prefix_arg; |
| 686 | case 'n': /* Read number from minibuffer. */ | 686 | case 'n': /* Read number from minibuffer. */ |
| 687 | { | 687 | { |
| 688 | int first = 1; | 688 | bool first = 1; |
| 689 | do | 689 | do |
| 690 | { | 690 | { |
| 691 | Lisp_Object str; | 691 | Lisp_Object str; |
| @@ -726,11 +726,11 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 726 | check_mark (1); | 726 | check_mark (1); |
| 727 | set_marker_both (point_marker, Qnil, PT, PT_BYTE); | 727 | set_marker_both (point_marker, Qnil, PT, PT_BYTE); |
| 728 | /* visargs[i+1] = Qnil; */ | 728 | /* visargs[i+1] = Qnil; */ |
| 729 | foo = marker_position (BVAR (current_buffer, mark)); | 729 | mark = marker_position (BVAR (current_buffer, mark)); |
| 730 | /* visargs[i] = Qnil; */ | 730 | /* visargs[i] = Qnil; */ |
| 731 | args[i] = PT < foo ? point_marker : BVAR (current_buffer, mark); | 731 | args[i] = PT < mark ? point_marker : BVAR (current_buffer, mark); |
| 732 | varies[i] = 3; | 732 | varies[i] = 3; |
| 733 | args[++i] = PT > foo ? point_marker : BVAR (current_buffer, mark); | 733 | args[++i] = PT > mark ? point_marker : BVAR (current_buffer, mark); |
| 734 | varies[i] = 4; | 734 | varies[i] = 4; |
| 735 | break; | 735 | break; |
| 736 | 736 | ||
diff --git a/src/callproc.c b/src/callproc.c index 4bf1da04e1a..2e9a8950700 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -77,7 +77,7 @@ static Lisp_Object Vtemp_file_name_pattern; | |||
| 77 | 77 | ||
| 78 | /* True if we are about to fork off a synchronous process or if we | 78 | /* True if we are about to fork off a synchronous process or if we |
| 79 | are waiting for it. */ | 79 | are waiting for it. */ |
| 80 | int synch_process_alive; | 80 | bool synch_process_alive; |
| 81 | 81 | ||
| 82 | /* Nonzero => this is a string explaining death of synchronous subprocess. */ | 82 | /* Nonzero => this is a string explaining death of synchronous subprocess. */ |
| 83 | const char *synch_process_death; | 83 | const char *synch_process_death; |
| @@ -94,8 +94,8 @@ int synch_process_retcode; | |||
| 94 | On MSDOS, delete the temporary file on any kind of termination. | 94 | On MSDOS, delete the temporary file on any kind of termination. |
| 95 | On Unix, kill the process and any children on termination by signal. */ | 95 | On Unix, kill the process and any children on termination by signal. */ |
| 96 | 96 | ||
| 97 | /* Nonzero if this is termination due to exit. */ | 97 | /* True if this is termination due to exit. */ |
| 98 | static int call_process_exited; | 98 | static bool call_process_exited; |
| 99 | 99 | ||
| 100 | static Lisp_Object | 100 | static Lisp_Object |
| 101 | call_process_kill (Lisp_Object fdpid) | 101 | call_process_kill (Lisp_Object fdpid) |
| @@ -190,7 +190,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 190 | (ptrdiff_t nargs, Lisp_Object *args) | 190 | (ptrdiff_t nargs, Lisp_Object *args) |
| 191 | { | 191 | { |
| 192 | Lisp_Object infile, buffer, current_dir, path, cleanup_info_tail; | 192 | Lisp_Object infile, buffer, current_dir, path, cleanup_info_tail; |
| 193 | int display_p; | 193 | bool display_p; |
| 194 | int fd[2]; | 194 | int fd[2]; |
| 195 | int filefd; | 195 | int filefd; |
| 196 | #define CALLPROC_BUFFER_SIZE_MIN (16 * 1024) | 196 | #define CALLPROC_BUFFER_SIZE_MIN (16 * 1024) |
| @@ -217,7 +217,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 217 | struct coding_system argument_coding; /* coding-system of arguments */ | 217 | struct coding_system argument_coding; /* coding-system of arguments */ |
| 218 | /* Set to the return value of Ffind_operation_coding_system. */ | 218 | /* Set to the return value of Ffind_operation_coding_system. */ |
| 219 | Lisp_Object coding_systems; | 219 | Lisp_Object coding_systems; |
| 220 | int output_to_buffer = 1; | 220 | bool output_to_buffer = 1; |
| 221 | 221 | ||
| 222 | /* Qt denotes that Ffind_operation_coding_system is not yet called. */ | 222 | /* Qt denotes that Ffind_operation_coding_system is not yet called. */ |
| 223 | coding_systems = Qt; | 223 | coding_systems = Qt; |
| @@ -241,7 +241,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 241 | /* If arguments are supplied, we may have to encode them. */ | 241 | /* If arguments are supplied, we may have to encode them. */ |
| 242 | if (nargs >= 5) | 242 | if (nargs >= 5) |
| 243 | { | 243 | { |
| 244 | int must_encode = 0; | 244 | bool must_encode = 0; |
| 245 | Lisp_Object coding_attrs; | 245 | Lisp_Object coding_attrs; |
| 246 | 246 | ||
| 247 | for (i = 4; i < nargs; i++) | 247 | for (i = 4; i < nargs; i++) |
| @@ -610,12 +610,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 610 | Lisp_Object volatile buffer_volatile = buffer; | 610 | Lisp_Object volatile buffer_volatile = buffer; |
| 611 | Lisp_Object volatile coding_systems_volatile = coding_systems; | 611 | Lisp_Object volatile coding_systems_volatile = coding_systems; |
| 612 | Lisp_Object volatile current_dir_volatile = current_dir; | 612 | Lisp_Object volatile current_dir_volatile = current_dir; |
| 613 | int volatile display_p_volatile = display_p; | 613 | bool volatile display_p_volatile = display_p; |
| 614 | bool volatile output_to_buffer_volatile = output_to_buffer; | ||
| 615 | bool volatile sa_must_free_volatile = sa_must_free; | ||
| 614 | int volatile fd1_volatile = fd1; | 616 | int volatile fd1_volatile = fd1; |
| 615 | int volatile fd_error_volatile = fd_error; | 617 | int volatile fd_error_volatile = fd_error; |
| 616 | int volatile fd_output_volatile = fd_output; | 618 | int volatile fd_output_volatile = fd_output; |
| 617 | int volatile output_to_buffer_volatile = output_to_buffer; | ||
| 618 | int volatile sa_must_free_volatile = sa_must_free; | ||
| 619 | ptrdiff_t volatile sa_count_volatile = sa_count; | 619 | ptrdiff_t volatile sa_count_volatile = sa_count; |
| 620 | unsigned char const **volatile new_argv_volatile = new_argv; | 620 | unsigned char const **volatile new_argv_volatile = new_argv; |
| 621 | 621 | ||
| @@ -766,11 +766,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 766 | 766 | ||
| 767 | if (output_to_buffer) | 767 | if (output_to_buffer) |
| 768 | { | 768 | { |
| 769 | register int nread; | 769 | int nread; |
| 770 | int first = 1; | 770 | bool first = 1; |
| 771 | EMACS_INT total_read = 0; | 771 | EMACS_INT total_read = 0; |
| 772 | int carryover = 0; | 772 | int carryover = 0; |
| 773 | int display_on_the_fly = display_p; | 773 | bool display_on_the_fly = display_p; |
| 774 | struct coding_system saved_coding; | 774 | struct coding_system saved_coding; |
| 775 | 775 | ||
| 776 | saved_coding = process_coding; | 776 | saved_coding = process_coding; |
| @@ -1086,7 +1086,7 @@ static char ** | |||
| 1086 | add_env (char **env, char **new_env, char *string) | 1086 | add_env (char **env, char **new_env, char *string) |
| 1087 | { | 1087 | { |
| 1088 | char **ep; | 1088 | char **ep; |
| 1089 | int ok = 1; | 1089 | bool ok = 1; |
| 1090 | if (string == NULL) | 1090 | if (string == NULL) |
| 1091 | return new_env; | 1091 | return new_env; |
| 1092 | 1092 | ||
| @@ -1126,8 +1126,7 @@ add_env (char **env, char **new_env, char *string) | |||
| 1126 | Therefore, the superior process must save and restore the value | 1126 | Therefore, the superior process must save and restore the value |
| 1127 | of environ around the vfork and the call to this function. | 1127 | of environ around the vfork and the call to this function. |
| 1128 | 1128 | ||
| 1129 | SET_PGRP is nonzero if we should put the subprocess into a separate | 1129 | If SET_PGRP, put the subprocess into a separate process group. |
| 1130 | process group. | ||
| 1131 | 1130 | ||
| 1132 | CURRENT_DIR is an elisp string giving the path of the current | 1131 | CURRENT_DIR is an elisp string giving the path of the current |
| 1133 | directory the subprocess should have. Since we can't really signal | 1132 | directory the subprocess should have. Since we can't really signal |
| @@ -1135,7 +1134,8 @@ add_env (char **env, char **new_env, char *string) | |||
| 1135 | executable directory by the parent. */ | 1134 | executable directory by the parent. */ |
| 1136 | 1135 | ||
| 1137 | int | 1136 | int |
| 1138 | child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, Lisp_Object current_dir) | 1137 | child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, |
| 1138 | Lisp_Object current_dir) | ||
| 1139 | { | 1139 | { |
| 1140 | char **env; | 1140 | char **env; |
| 1141 | char *pwd_var; | 1141 | char *pwd_var; |
| @@ -1394,7 +1394,7 @@ relocate_fd (int fd, int minfd) | |||
| 1394 | } | 1394 | } |
| 1395 | #endif /* not WINDOWSNT */ | 1395 | #endif /* not WINDOWSNT */ |
| 1396 | 1396 | ||
| 1397 | static int | 1397 | static bool |
| 1398 | getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value, | 1398 | getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value, |
| 1399 | ptrdiff_t *valuelen, Lisp_Object env) | 1399 | ptrdiff_t *valuelen, Lisp_Object env) |
| 1400 | { | 1400 | { |
| @@ -1429,7 +1429,7 @@ getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value, | |||
| 1429 | return 0; | 1429 | return 0; |
| 1430 | } | 1430 | } |
| 1431 | 1431 | ||
| 1432 | static int | 1432 | static bool |
| 1433 | getenv_internal (const char *var, ptrdiff_t varlen, char **value, | 1433 | getenv_internal (const char *var, ptrdiff_t varlen, char **value, |
| 1434 | ptrdiff_t *valuelen, Lisp_Object frame) | 1434 | ptrdiff_t *valuelen, Lisp_Object frame) |
| 1435 | { | 1435 | { |
diff --git a/src/casefiddle.c b/src/casefiddle.c index 81e84252b72..1102054b153 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -35,8 +35,8 @@ Lisp_Object Qidentity; | |||
| 35 | static Lisp_Object | 35 | static Lisp_Object |
| 36 | casify_object (enum case_action flag, Lisp_Object obj) | 36 | casify_object (enum case_action flag, Lisp_Object obj) |
| 37 | { | 37 | { |
| 38 | register int c, c1; | 38 | int c, c1; |
| 39 | register int inword = flag == CASE_DOWN; | 39 | bool inword = flag == CASE_DOWN; |
| 40 | 40 | ||
| 41 | /* If the case table is flagged as modified, rescan it. */ | 41 | /* If the case table is flagged as modified, rescan it. */ |
| 42 | if (NILP (XCHAR_TABLE (BVAR (current_buffer, downcase_table))->extras[1])) | 42 | if (NILP (XCHAR_TABLE (BVAR (current_buffer, downcase_table))->extras[1])) |
| @@ -47,7 +47,8 @@ casify_object (enum case_action flag, Lisp_Object obj) | |||
| 47 | int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER | 47 | int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER |
| 48 | | CHAR_SHIFT | CHAR_CTL | CHAR_META); | 48 | | CHAR_SHIFT | CHAR_CTL | CHAR_META); |
| 49 | int flags = XINT (obj) & flagbits; | 49 | int flags = XINT (obj) & flagbits; |
| 50 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 50 | bool multibyte = ! NILP (BVAR (current_buffer, |
| 51 | enable_multibyte_characters)); | ||
| 51 | 52 | ||
| 52 | /* If the character has higher bits set | 53 | /* If the character has higher bits set |
| 53 | above the flags, return it unchanged. | 54 | above the flags, return it unchanged. |
| @@ -189,9 +190,9 @@ The argument object is not altered--the value is a copy. */) | |||
| 189 | static void | 190 | static void |
| 190 | casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) | 191 | casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) |
| 191 | { | 192 | { |
| 192 | register int c; | 193 | int c; |
| 193 | register int inword = flag == CASE_DOWN; | 194 | bool inword = flag == CASE_DOWN; |
| 194 | register int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | 195 | bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 195 | ptrdiff_t start, end; | 196 | ptrdiff_t start, end; |
| 196 | ptrdiff_t start_byte; | 197 | ptrdiff_t start_byte; |
| 197 | 198 | ||
diff --git a/src/casetab.c b/src/casetab.c index a163d5204f8..3e22d0d0b77 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -79,7 +79,7 @@ This is the one used for new buffers. */) | |||
| 79 | return Vascii_downcase_table; | 79 | return Vascii_downcase_table; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static Lisp_Object set_case_table (Lisp_Object table, int standard); | 82 | static Lisp_Object set_case_table (Lisp_Object, bool); |
| 83 | 83 | ||
| 84 | DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, | 84 | DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, |
| 85 | doc: /* Select a new case table for the current buffer. | 85 | doc: /* Select a new case table for the current buffer. |
| @@ -113,7 +113,7 @@ See `set-case-table' for more info on case tables. */) | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | static Lisp_Object | 115 | static Lisp_Object |
| 116 | set_case_table (Lisp_Object table, int standard) | 116 | set_case_table (Lisp_Object table, bool standard) |
| 117 | { | 117 | { |
| 118 | Lisp_Object up, canon, eqv; | 118 | Lisp_Object up, canon, eqv; |
| 119 | 119 | ||
diff --git a/src/category.c b/src/category.c index 1c9085fd558..80dc6938d8b 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -406,17 +406,17 @@ then delete CATEGORY from the category set instead of adding it. */) | |||
| 406 | return Qnil; | 406 | return Qnil; |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | /* Return 1 if there is a word boundary between two word-constituent | 409 | /* Return true if there is a word boundary between two word-constituent |
| 410 | characters C1 and C2 if they appear in this order, else return 0. | 410 | characters C1 and C2 if they appear in this order. |
| 411 | Use the macro WORD_BOUNDARY_P instead of calling this function | 411 | Use the macro WORD_BOUNDARY_P instead of calling this function |
| 412 | directly. */ | 412 | directly. */ |
| 413 | 413 | ||
| 414 | int | 414 | bool |
| 415 | word_boundary_p (int c1, int c2) | 415 | word_boundary_p (int c1, int c2) |
| 416 | { | 416 | { |
| 417 | Lisp_Object category_set1, category_set2; | 417 | Lisp_Object category_set1, category_set2; |
| 418 | Lisp_Object tail; | 418 | Lisp_Object tail; |
| 419 | int default_result; | 419 | bool default_result; |
| 420 | 420 | ||
| 421 | if (EQ (CHAR_TABLE_REF (Vchar_script_table, c1), | 421 | if (EQ (CHAR_TABLE_REF (Vchar_script_table, c1), |
| 422 | CHAR_TABLE_REF (Vchar_script_table, c2))) | 422 | CHAR_TABLE_REF (Vchar_script_table, c2))) |
diff --git a/src/category.h b/src/category.h index 9fb981ed383..17cd203db45 100644 --- a/src/category.h +++ b/src/category.h | |||
| @@ -77,14 +77,14 @@ INLINE_HEADER_BEGIN | |||
| 77 | /* Return the category set of character C in the current category table. */ | 77 | /* Return the category set of character C in the current category table. */ |
| 78 | #define CATEGORY_SET(c) char_category_set (c) | 78 | #define CATEGORY_SET(c) char_category_set (c) |
| 79 | 79 | ||
| 80 | /* Return 1 if CATEGORY_SET contains CATEGORY, else return 0. | 80 | /* Return true if CATEGORY_SET contains CATEGORY. |
| 81 | The faster version of `!NILP (Faref (category_set, category))'. */ | 81 | The faster version of `!NILP (Faref (category_set, category))'. */ |
| 82 | #define CATEGORY_MEMBER(category, category_set) \ | 82 | #define CATEGORY_MEMBER(category, category_set) \ |
| 83 | ((XCATEGORY_SET (category_set)->data[(category) / 8] \ | 83 | ((XCATEGORY_SET (category_set)->data[(category) / 8] \ |
| 84 | >> ((category) % 8)) & 1) | 84 | >> ((category) % 8)) & 1) |
| 85 | 85 | ||
| 86 | /* Return 1 if category set of CH contains CATEGORY, else return 0. */ | 86 | /* Return true if category set of CH contains CATEGORY. */ |
| 87 | CATEGORY_INLINE int | 87 | CATEGORY_INLINE bool |
| 88 | CHAR_HAS_CATEGORY (int ch, int category) | 88 | CHAR_HAS_CATEGORY (int ch, int category) |
| 89 | { | 89 | { |
| 90 | Lisp_Object category_set = CATEGORY_SET (ch); | 90 | Lisp_Object category_set = CATEGORY_SET (ch); |
| @@ -108,14 +108,14 @@ CHAR_HAS_CATEGORY (int ch, int category) | |||
| 108 | #define CATEGORY_TABLE_VERSION (table) \ | 108 | #define CATEGORY_TABLE_VERSION (table) \ |
| 109 | Fchar_table_extra_slot (table, make_number (1)) | 109 | Fchar_table_extra_slot (table, make_number (1)) |
| 110 | 110 | ||
| 111 | /* Return 1 if there is a word boundary between two word-constituent | 111 | /* Return true if there is a word boundary between two |
| 112 | characters C1 and C2 if they appear in this order, else return 0. | 112 | word-constituent characters C1 and C2 if they appear in this order. |
| 113 | There is no word boundary between two word-constituent ASCII and | 113 | There is no word boundary between two word-constituent ASCII and |
| 114 | Latin-1 characters. */ | 114 | Latin-1 characters. */ |
| 115 | #define WORD_BOUNDARY_P(c1, c2) \ | 115 | #define WORD_BOUNDARY_P(c1, c2) \ |
| 116 | (!(SINGLE_BYTE_CHAR_P (c1) && SINGLE_BYTE_CHAR_P (c2)) \ | 116 | (!(SINGLE_BYTE_CHAR_P (c1) && SINGLE_BYTE_CHAR_P (c2)) \ |
| 117 | && word_boundary_p (c1, c2)) | 117 | && word_boundary_p (c1, c2)) |
| 118 | 118 | ||
| 119 | extern int word_boundary_p (int, int); | 119 | extern bool word_boundary_p (int, int); |
| 120 | 120 | ||
| 121 | INLINE_HEADER_END | 121 | INLINE_HEADER_END |
| @@ -26,6 +26,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #ifndef EMACS_CCL_H | 26 | #ifndef EMACS_CCL_H |
| 27 | #define EMACS_CCL_H | 27 | #define EMACS_CCL_H |
| 28 | 28 | ||
| 29 | #include "character.h" /* For MAX_MULTIBYTE_LENGTH */ | ||
| 30 | |||
| 29 | /* Macros for exit status of CCL program. */ | 31 | /* Macros for exit status of CCL program. */ |
| 30 | #define CCL_STAT_SUCCESS 0 /* Terminated successfully. */ | 32 | #define CCL_STAT_SUCCESS 0 /* Terminated successfully. */ |
| 31 | #define CCL_STAT_SUSPEND_BY_SRC 1 /* Terminated by empty input. */ | 33 | #define CCL_STAT_SUSPEND_BY_SRC 1 /* Terminated by empty input. */ |
diff --git a/src/character.c b/src/character.c index b2acf36ec15..cfaaf8eeca9 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -427,7 +427,7 @@ lisp_string_width (Lisp_Object string, ptrdiff_t precision, | |||
| 427 | /* This set multibyte to 0 even if STRING is multibyte when it | 427 | /* This set multibyte to 0 even if STRING is multibyte when it |
| 428 | contains only ascii and eight-bit-graphic, but that's | 428 | contains only ascii and eight-bit-graphic, but that's |
| 429 | intentional. */ | 429 | intentional. */ |
| 430 | int multibyte = len < SBYTES (string); | 430 | bool multibyte = len < SBYTES (string); |
| 431 | unsigned char *str = SDATA (string); | 431 | unsigned char *str = SDATA (string); |
| 432 | ptrdiff_t i = 0, i_byte = 0; | 432 | ptrdiff_t i = 0, i_byte = 0; |
| 433 | ptrdiff_t width = 0; | 433 | ptrdiff_t width = 0; |
| @@ -765,13 +765,10 @@ str_as_unibyte (unsigned char *str, ptrdiff_t bytes) | |||
| 765 | corresponding byte and store in DST. CHARS is the number of | 765 | corresponding byte and store in DST. CHARS is the number of |
| 766 | characters in SRC. The value is the number of bytes stored in DST. | 766 | characters in SRC. The value is the number of bytes stored in DST. |
| 767 | Usually, the value is the same as CHARS, but is less than it if SRC | 767 | Usually, the value is the same as CHARS, but is less than it if SRC |
| 768 | contains a non-ASCII, non-eight-bit character. If ACCEPT_LATIN_1 | 768 | contains a non-ASCII, non-eight-bit character. */ |
| 769 | is nonzero, a Latin-1 character is accepted and converted to a byte | ||
| 770 | of that character code. | ||
| 771 | Note: Currently the arg ACCEPT_LATIN_1 is not used. */ | ||
| 772 | 769 | ||
| 773 | ptrdiff_t | 770 | ptrdiff_t |
| 774 | str_to_unibyte (const unsigned char *src, unsigned char *dst, ptrdiff_t chars, int accept_latin_1) | 771 | str_to_unibyte (const unsigned char *src, unsigned char *dst, ptrdiff_t chars) |
| 775 | { | 772 | { |
| 776 | ptrdiff_t i; | 773 | ptrdiff_t i; |
| 777 | 774 | ||
| @@ -781,8 +778,7 @@ str_to_unibyte (const unsigned char *src, unsigned char *dst, ptrdiff_t chars, i | |||
| 781 | 778 | ||
| 782 | if (CHAR_BYTE8_P (c)) | 779 | if (CHAR_BYTE8_P (c)) |
| 783 | c = CHAR_TO_BYTE8 (c); | 780 | c = CHAR_TO_BYTE8 (c); |
| 784 | else if (! ASCII_CHAR_P (c) | 781 | else if (! ASCII_CHAR_P (c)) |
| 785 | && (! accept_latin_1 || c >= 0x100)) | ||
| 786 | return i; | 782 | return i; |
| 787 | *dst++ = c; | 783 | *dst++ = c; |
| 788 | } | 784 | } |
| @@ -793,7 +789,7 @@ str_to_unibyte (const unsigned char *src, unsigned char *dst, ptrdiff_t chars, i | |||
| 793 | static ptrdiff_t | 789 | static ptrdiff_t |
| 794 | string_count_byte8 (Lisp_Object string) | 790 | string_count_byte8 (Lisp_Object string) |
| 795 | { | 791 | { |
| 796 | int multibyte = STRING_MULTIBYTE (string); | 792 | bool multibyte = STRING_MULTIBYTE (string); |
| 797 | ptrdiff_t nbytes = SBYTES (string); | 793 | ptrdiff_t nbytes = SBYTES (string); |
| 798 | unsigned char *p = SDATA (string); | 794 | unsigned char *p = SDATA (string); |
| 799 | unsigned char *pend = p + nbytes; | 795 | unsigned char *pend = p + nbytes; |
| @@ -825,7 +821,7 @@ string_escape_byte8 (Lisp_Object string) | |||
| 825 | { | 821 | { |
| 826 | ptrdiff_t nchars = SCHARS (string); | 822 | ptrdiff_t nchars = SCHARS (string); |
| 827 | ptrdiff_t nbytes = SBYTES (string); | 823 | ptrdiff_t nbytes = SBYTES (string); |
| 828 | int multibyte = STRING_MULTIBYTE (string); | 824 | bool multibyte = STRING_MULTIBYTE (string); |
| 829 | ptrdiff_t byte8_count; | 825 | ptrdiff_t byte8_count; |
| 830 | const unsigned char *src, *src_end; | 826 | const unsigned char *src, *src_end; |
| 831 | unsigned char *dst; | 827 | unsigned char *dst; |
diff --git a/src/character.h b/src/character.h index 332dfee373a..70d4e67a978 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -676,7 +676,6 @@ extern int string_char (const unsigned char *, | |||
| 676 | const unsigned char **, int *); | 676 | const unsigned char **, int *); |
| 677 | 677 | ||
| 678 | extern int translate_char (Lisp_Object, int c); | 678 | extern int translate_char (Lisp_Object, int c); |
| 679 | extern int char_printable_p (int c); | ||
| 680 | extern void parse_str_as_multibyte (const unsigned char *, | 679 | extern void parse_str_as_multibyte (const unsigned char *, |
| 681 | ptrdiff_t, ptrdiff_t *, ptrdiff_t *); | 680 | ptrdiff_t, ptrdiff_t *, ptrdiff_t *); |
| 682 | extern ptrdiff_t count_size_as_multibyte (const unsigned char *, ptrdiff_t); | 681 | extern ptrdiff_t count_size_as_multibyte (const unsigned char *, ptrdiff_t); |
| @@ -685,7 +684,7 @@ extern ptrdiff_t str_as_multibyte (unsigned char *, ptrdiff_t, ptrdiff_t, | |||
| 685 | extern ptrdiff_t str_to_multibyte (unsigned char *, ptrdiff_t, ptrdiff_t); | 684 | extern ptrdiff_t str_to_multibyte (unsigned char *, ptrdiff_t, ptrdiff_t); |
| 686 | extern ptrdiff_t str_as_unibyte (unsigned char *, ptrdiff_t); | 685 | extern ptrdiff_t str_as_unibyte (unsigned char *, ptrdiff_t); |
| 687 | extern ptrdiff_t str_to_unibyte (const unsigned char *, unsigned char *, | 686 | extern ptrdiff_t str_to_unibyte (const unsigned char *, unsigned char *, |
| 688 | ptrdiff_t, int); | 687 | ptrdiff_t); |
| 689 | extern ptrdiff_t strwidth (const char *, ptrdiff_t); | 688 | extern ptrdiff_t strwidth (const char *, ptrdiff_t); |
| 690 | extern ptrdiff_t c_string_width (const unsigned char *, ptrdiff_t, int, | 689 | extern ptrdiff_t c_string_width (const unsigned char *, ptrdiff_t, int, |
| 691 | ptrdiff_t *, ptrdiff_t *); | 690 | ptrdiff_t *, ptrdiff_t *); |
diff --git a/src/charset.c b/src/charset.c index 3e286fa947d..0673790e91c 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -215,7 +215,7 @@ static struct | |||
| 215 | 215 | ||
| 216 | /* Set to 1 to warn that a charset map is loaded and thus a buffer | 216 | /* Set to 1 to warn that a charset map is loaded and thus a buffer |
| 217 | text and a string data may be relocated. */ | 217 | text and a string data may be relocated. */ |
| 218 | int charset_map_loaded; | 218 | bool charset_map_loaded; |
| 219 | 219 | ||
| 220 | struct charset_map_entries | 220 | struct charset_map_entries |
| 221 | { | 221 | { |
| @@ -256,7 +256,7 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries, | |||
| 256 | { | 256 | { |
| 257 | Lisp_Object vec IF_LINT (= Qnil), table IF_LINT (= Qnil); | 257 | Lisp_Object vec IF_LINT (= Qnil), table IF_LINT (= Qnil); |
| 258 | unsigned max_code = CHARSET_MAX_CODE (charset); | 258 | unsigned max_code = CHARSET_MAX_CODE (charset); |
| 259 | int ascii_compatible_p = charset->ascii_compatible_p; | 259 | bool ascii_compatible_p = charset->ascii_compatible_p; |
| 260 | int min_char, max_char, nonascii_min_char; | 260 | int min_char, max_char, nonascii_min_char; |
| 261 | int i; | 261 | int i; |
| 262 | unsigned char *fast_map = charset->fast_map; | 262 | unsigned char *fast_map = charset->fast_map; |
| @@ -423,7 +423,7 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries, | |||
| 423 | paying attention to comment character '#'. */ | 423 | paying attention to comment character '#'. */ |
| 424 | 424 | ||
| 425 | static inline unsigned | 425 | static inline unsigned |
| 426 | read_hex (FILE *fp, int *eof, int *overflow) | 426 | read_hex (FILE *fp, bool *eof, bool *overflow) |
| 427 | { | 427 | { |
| 428 | int c; | 428 | int c; |
| 429 | unsigned n; | 429 | unsigned n; |
| @@ -512,7 +512,7 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int co | |||
| 512 | { | 512 | { |
| 513 | unsigned from, to, c; | 513 | unsigned from, to, c; |
| 514 | int idx; | 514 | int idx; |
| 515 | int eof = 0, overflow = 0; | 515 | bool eof = 0, overflow = 0; |
| 516 | 516 | ||
| 517 | from = read_hex (fp, &eof, &overflow); | 517 | from = read_hex (fp, &eof, &overflow); |
| 518 | if (eof) | 518 | if (eof) |
| @@ -717,10 +717,8 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun | |||
| 717 | Lisp_Object arg, struct charset *charset, unsigned from, unsigned to) | 717 | Lisp_Object arg, struct charset *charset, unsigned from, unsigned to) |
| 718 | { | 718 | { |
| 719 | Lisp_Object range; | 719 | Lisp_Object range; |
| 720 | int partial; | 720 | bool partial = (from > CHARSET_MIN_CODE (charset) |
| 721 | 721 | || to < CHARSET_MAX_CODE (charset)); | |
| 722 | partial = (from > CHARSET_MIN_CODE (charset) | ||
| 723 | || to < CHARSET_MAX_CODE (charset)); | ||
| 724 | 722 | ||
| 725 | if (CHARSET_METHOD (charset) == CHARSET_METHOD_OFFSET) | 723 | if (CHARSET_METHOD (charset) == CHARSET_METHOD_OFFSET) |
| 726 | { | 724 | { |
| @@ -855,7 +853,7 @@ usage: (define-charset-internal ...) */) | |||
| 855 | struct charset charset; | 853 | struct charset charset; |
| 856 | int id; | 854 | int id; |
| 857 | int dimension; | 855 | int dimension; |
| 858 | int new_definition_p; | 856 | bool new_definition_p; |
| 859 | int nchars; | 857 | int nchars; |
| 860 | 858 | ||
| 861 | if (nargs != charset_arg_max) | 859 | if (nargs != charset_arg_max) |
| @@ -1250,7 +1248,7 @@ define_charset_internal (Lisp_Object name, | |||
| 1250 | const char *code_space_chars, | 1248 | const char *code_space_chars, |
| 1251 | unsigned min_code, unsigned max_code, | 1249 | unsigned min_code, unsigned max_code, |
| 1252 | int iso_final, int iso_revision, int emacs_mule_id, | 1250 | int iso_final, int iso_revision, int emacs_mule_id, |
| 1253 | int ascii_compatible, int supplementary, | 1251 | bool ascii_compatible, bool supplementary, |
| 1254 | int code_offset) | 1252 | int code_offset) |
| 1255 | { | 1253 | { |
| 1256 | const unsigned char *code_space = (const unsigned char *) code_space_chars; | 1254 | const unsigned char *code_space = (const unsigned char *) code_space_chars; |
| @@ -1448,7 +1446,7 @@ if CHARSET is designated instead. */) | |||
| 1448 | (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char, Lisp_Object charset) | 1446 | (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char, Lisp_Object charset) |
| 1449 | { | 1447 | { |
| 1450 | int id; | 1448 | int id; |
| 1451 | int chars_flag; | 1449 | bool chars_flag; |
| 1452 | 1450 | ||
| 1453 | CHECK_CHARSET_GET_ID (charset, id); | 1451 | CHECK_CHARSET_GET_ID (charset, id); |
| 1454 | check_iso_charset_parameter (dimension, chars, final_char); | 1452 | check_iso_charset_parameter (dimension, chars, final_char); |
| @@ -1499,7 +1497,9 @@ string_xstring_p (Lisp_Object string) | |||
| 1499 | It may lookup a translation table TABLE if supplied. */ | 1497 | It may lookup a translation table TABLE if supplied. */ |
| 1500 | 1498 | ||
| 1501 | static void | 1499 | static void |
| 1502 | find_charsets_in_text (const unsigned char *ptr, ptrdiff_t nchars, ptrdiff_t nbytes, Lisp_Object charsets, Lisp_Object table, int multibyte) | 1500 | find_charsets_in_text (const unsigned char *ptr, ptrdiff_t nchars, |
| 1501 | ptrdiff_t nbytes, Lisp_Object charsets, | ||
| 1502 | Lisp_Object table, bool multibyte) | ||
| 1503 | { | 1503 | { |
| 1504 | const unsigned char *pend = ptr + nbytes; | 1504 | const unsigned char *pend = ptr + nbytes; |
| 1505 | 1505 | ||
| @@ -1549,7 +1549,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) | |||
| 1549 | ptrdiff_t from, from_byte, to, stop, stop_byte; | 1549 | ptrdiff_t from, from_byte, to, stop, stop_byte; |
| 1550 | int i; | 1550 | int i; |
| 1551 | Lisp_Object val; | 1551 | Lisp_Object val; |
| 1552 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 1552 | bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 1553 | 1553 | ||
| 1554 | validate_region (&beg, &end); | 1554 | validate_region (&beg, &end); |
| 1555 | from = XFASTINT (beg); | 1555 | from = XFASTINT (beg); |
| @@ -1735,7 +1735,7 @@ decode_char (struct charset *charset, unsigned int code) | |||
| 1735 | /* Variable used temporarily by the macro ENCODE_CHAR. */ | 1735 | /* Variable used temporarily by the macro ENCODE_CHAR. */ |
| 1736 | Lisp_Object charset_work; | 1736 | Lisp_Object charset_work; |
| 1737 | 1737 | ||
| 1738 | /* Return a code-point of CHAR in CHARSET. If CHAR doesn't belong to | 1738 | /* Return a code-point of C in CHARSET. If C doesn't belong to |
| 1739 | CHARSET, return CHARSET_INVALID_CODE (CHARSET). If STRICT is true, | 1739 | CHARSET, return CHARSET_INVALID_CODE (CHARSET). If STRICT is true, |
| 1740 | use CHARSET's strict_max_char instead of max_char. */ | 1740 | use CHARSET's strict_max_char instead of max_char. */ |
| 1741 | 1741 | ||
| @@ -1978,7 +1978,7 @@ is specified. */) | |||
| 1978 | struct charset * | 1978 | struct charset * |
| 1979 | char_charset (int c, Lisp_Object charset_list, unsigned int *code_return) | 1979 | char_charset (int c, Lisp_Object charset_list, unsigned int *code_return) |
| 1980 | { | 1980 | { |
| 1981 | int maybe_null = 0; | 1981 | bool maybe_null = 0; |
| 1982 | 1982 | ||
| 1983 | if (NILP (charset_list)) | 1983 | if (NILP (charset_list)) |
| 1984 | charset_list = Vcharset_ordered_list; | 1984 | charset_list = Vcharset_ordered_list; |
| @@ -2106,7 +2106,7 @@ DIMENSION, CHARS, and FINAL-CHAR. */) | |||
| 2106 | (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char) | 2106 | (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char) |
| 2107 | { | 2107 | { |
| 2108 | int id; | 2108 | int id; |
| 2109 | int chars_flag; | 2109 | bool chars_flag; |
| 2110 | 2110 | ||
| 2111 | check_iso_charset_parameter (dimension, chars, final_char); | 2111 | check_iso_charset_parameter (dimension, chars, final_char); |
| 2112 | chars_flag = XFASTINT (chars) == 96; | 2112 | chars_flag = XFASTINT (chars) == 96; |
diff --git a/src/charset.h b/src/charset.h index 4ef8ddc2c33..50d230489fe 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -173,12 +173,24 @@ struct charset | |||
| 173 | check if a code-point is in a valid range. */ | 173 | check if a code-point is in a valid range. */ |
| 174 | unsigned char *code_space_mask; | 174 | unsigned char *code_space_mask; |
| 175 | 175 | ||
| 176 | /* 1 if there's no gap in code-points. */ | 176 | /* True if there's no gap in code-points. */ |
| 177 | int code_linear_p; | 177 | unsigned code_linear_p : 1; |
| 178 | 178 | ||
| 179 | /* If the charset is treated as 94-chars in ISO-2022, the value is 0. | 179 | /* True if the charset is treated as 96 chars in ISO-2022 |
| 180 | If the charset is treated as 96-chars in ISO-2022, the value is 1. */ | 180 | as opposed to 94 chars. */ |
| 181 | int iso_chars_96; | 181 | unsigned iso_chars_96 : 1; |
| 182 | |||
| 183 | /* True if the charset is compatible with ASCII. */ | ||
| 184 | unsigned ascii_compatible_p : 1; | ||
| 185 | |||
| 186 | /* True if the charset is supplementary. */ | ||
| 187 | unsigned supplementary_p : 1; | ||
| 188 | |||
| 189 | /* True if all the code points are representable by Lisp_Int. */ | ||
| 190 | unsigned compact_codes_p : 1; | ||
| 191 | |||
| 192 | /* True if the charset is unified with Unicode. */ | ||
| 193 | unsigned unified_p : 1; | ||
| 182 | 194 | ||
| 183 | /* ISO final byte of the charset: 48..127. It may be -1 if the | 195 | /* ISO final byte of the charset: 48..127. It may be -1 if the |
| 184 | charset doesn't conform to ISO-2022. */ | 196 | charset doesn't conform to ISO-2022. */ |
| @@ -192,15 +204,6 @@ struct charset | |||
| 192 | version. Otherwise, -1. */ | 204 | version. Otherwise, -1. */ |
| 193 | int emacs_mule_id; | 205 | int emacs_mule_id; |
| 194 | 206 | ||
| 195 | /* Nonzero if the charset is compatible with ASCII. */ | ||
| 196 | int ascii_compatible_p; | ||
| 197 | |||
| 198 | /* Nonzero if the charset is supplementary. */ | ||
| 199 | int supplementary_p; | ||
| 200 | |||
| 201 | /* Nonzero if all the code points are representable by Lisp_Int. */ | ||
| 202 | int compact_codes_p; | ||
| 203 | |||
| 204 | /* The method for encoding/decoding characters of the charset. */ | 207 | /* The method for encoding/decoding characters of the charset. */ |
| 205 | enum charset_method method; | 208 | enum charset_method method; |
| 206 | 209 | ||
| @@ -239,8 +242,6 @@ struct charset | |||
| 239 | /* Offset value to calculate a character code from code-point, and | 242 | /* Offset value to calculate a character code from code-point, and |
| 240 | visa versa. */ | 243 | visa versa. */ |
| 241 | int code_offset; | 244 | int code_offset; |
| 242 | |||
| 243 | int unified_p; | ||
| 244 | }; | 245 | }; |
| 245 | 246 | ||
| 246 | /* Hash table of charset symbols vs. the corresponding attribute | 247 | /* Hash table of charset symbols vs. the corresponding attribute |
| @@ -456,7 +457,7 @@ extern Lisp_Object charset_work; | |||
| 456 | 457 | ||
| 457 | /* Set to 1 when a charset map is loaded to warn that a buffer text | 458 | /* Set to 1 when a charset map is loaded to warn that a buffer text |
| 458 | and a string data may be relocated. */ | 459 | and a string data may be relocated. */ |
| 459 | extern int charset_map_loaded; | 460 | extern bool charset_map_loaded; |
| 460 | 461 | ||
| 461 | 462 | ||
| 462 | /* Set CHARSET to the charset highest priority of C, CODE to the | 463 | /* Set CHARSET to the charset highest priority of C, CODE to the |
| @@ -474,10 +475,10 @@ extern int charset_map_loaded; | |||
| 474 | macro ISO_CHARSET_TABLE (DIMENSION, CHARS, FINAL_CHAR). */ | 475 | macro ISO_CHARSET_TABLE (DIMENSION, CHARS, FINAL_CHAR). */ |
| 475 | extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; | 476 | extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; |
| 476 | 477 | ||
| 477 | /* A charset of type iso2022 who has DIMENSION, CHARS, and FINAL | 478 | /* A charset of type iso2022 who has DIMENSION, CHARS_96, and FINAL |
| 478 | (final character). */ | 479 | (final character). */ |
| 479 | #define ISO_CHARSET_TABLE(dimension, chars_96, final) \ | 480 | #define ISO_CHARSET_TABLE(dimension, chars_96, final) \ |
| 480 | iso_charset_table[(dimension) - 1][(chars_96)][(final)] | 481 | iso_charset_table[(dimension) - 1][chars_96][final] |
| 481 | 482 | ||
| 482 | /* Nonzero if the charset who has FAST_MAP may contain C. */ | 483 | /* Nonzero if the charset who has FAST_MAP may contain C. */ |
| 483 | #define CHARSET_FAST_MAP_REF(c, fast_map) \ | 484 | #define CHARSET_FAST_MAP_REF(c, fast_map) \ |
| @@ -495,7 +496,7 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; | |||
| 495 | 496 | ||
| 496 | 497 | ||
| 497 | 498 | ||
| 498 | /* 1 if CHARSET may contain the character C. */ | 499 | /* True if CHARSET may contain the character C. */ |
| 499 | #define CHAR_CHARSET_P(c, charset) \ | 500 | #define CHAR_CHARSET_P(c, charset) \ |
| 500 | ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \ | 501 | ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \ |
| 501 | || ((CHARSET_UNIFIED_P (charset) \ | 502 | || ((CHARSET_UNIFIED_P (charset) \ |
diff --git a/src/chartab.c b/src/chartab.c index 711a49ed397..c14df0ebac6 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -200,7 +200,7 @@ copy_char_table (Lisp_Object table) | |||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | static Lisp_Object | 202 | static Lisp_Object |
| 203 | sub_char_table_ref (Lisp_Object table, int c, int is_uniprop) | 203 | sub_char_table_ref (Lisp_Object table, int c, bool is_uniprop) |
| 204 | { | 204 | { |
| 205 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 205 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 206 | int depth = XINT (tbl->depth); | 206 | int depth = XINT (tbl->depth); |
| @@ -245,7 +245,7 @@ char_table_ref (Lisp_Object table, int c) | |||
| 245 | 245 | ||
| 246 | static Lisp_Object | 246 | static Lisp_Object |
| 247 | sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, | 247 | sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, |
| 248 | Lisp_Object defalt, int is_uniprop) | 248 | Lisp_Object defalt, bool is_uniprop) |
| 249 | { | 249 | { |
| 250 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 250 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 251 | int depth = XINT (tbl->depth); | 251 | int depth = XINT (tbl->depth); |
| @@ -320,7 +320,7 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) | |||
| 320 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); | 320 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); |
| 321 | int chartab_idx = CHARTAB_IDX (c, 0, 0), idx; | 321 | int chartab_idx = CHARTAB_IDX (c, 0, 0), idx; |
| 322 | Lisp_Object val; | 322 | Lisp_Object val; |
| 323 | int is_uniprop = UNIPROP_TABLE_P (table); | 323 | bool is_uniprop = UNIPROP_TABLE_P (table); |
| 324 | 324 | ||
| 325 | val = tbl->contents[chartab_idx]; | 325 | val = tbl->contents[chartab_idx]; |
| 326 | if (*from < 0) | 326 | if (*from < 0) |
| @@ -382,7 +382,7 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) | |||
| 382 | 382 | ||
| 383 | 383 | ||
| 384 | static void | 384 | static void |
| 385 | sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, int is_uniprop) | 385 | sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, bool is_uniprop) |
| 386 | { | 386 | { |
| 387 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 387 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 388 | int depth = XINT ((tbl)->depth); | 388 | int depth = XINT ((tbl)->depth); |
| @@ -438,7 +438,7 @@ char_table_set (Lisp_Object table, int c, Lisp_Object val) | |||
| 438 | 438 | ||
| 439 | static void | 439 | static void |
| 440 | sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val, | 440 | sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val, |
| 441 | int is_uniprop) | 441 | bool is_uniprop) |
| 442 | { | 442 | { |
| 443 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 443 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 444 | int depth = XINT ((tbl)->depth); | 444 | int depth = XINT ((tbl)->depth); |
| @@ -484,7 +484,7 @@ char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) | |||
| 484 | char_table_set (table, from, val); | 484 | char_table_set (table, from, val); |
| 485 | else | 485 | else |
| 486 | { | 486 | { |
| 487 | int is_uniprop = UNIPROP_TABLE_P (table); | 487 | bool is_uniprop = UNIPROP_TABLE_P (table); |
| 488 | int lim = CHARTAB_IDX (to, 0, 0); | 488 | int lim = CHARTAB_IDX (to, 0, 0); |
| 489 | int i, c; | 489 | int i, c; |
| 490 | 490 | ||
| @@ -683,7 +683,8 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) | |||
| 683 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 683 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 684 | int depth = XINT (tbl->depth); | 684 | int depth = XINT (tbl->depth); |
| 685 | Lisp_Object elt, this; | 685 | Lisp_Object elt, this; |
| 686 | int i, optimizable; | 686 | int i; |
| 687 | bool optimizable; | ||
| 687 | 688 | ||
| 688 | elt = XSUB_CHAR_TABLE (table)->contents[0]; | 689 | elt = XSUB_CHAR_TABLE (table)->contents[0]; |
| 689 | if (SUB_CHAR_TABLE_P (elt)) | 690 | if (SUB_CHAR_TABLE_P (elt)) |
| @@ -762,7 +763,7 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), | |||
| 762 | int chars_in_block; | 763 | int chars_in_block; |
| 763 | int from = XINT (XCAR (range)), to = XINT (XCDR (range)); | 764 | int from = XINT (XCAR (range)), to = XINT (XCDR (range)); |
| 764 | int i, c; | 765 | int i, c; |
| 765 | int is_uniprop = UNIPROP_TABLE_P (top); | 766 | bool is_uniprop = UNIPROP_TABLE_P (top); |
| 766 | uniprop_decoder_t decoder = UNIPROP_GET_DECODER (top); | 767 | uniprop_decoder_t decoder = UNIPROP_GET_DECODER (top); |
| 767 | 768 | ||
| 768 | if (SUB_CHAR_TABLE_P (table)) | 769 | if (SUB_CHAR_TABLE_P (table)) |
| @@ -811,7 +812,7 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), | |||
| 811 | this = XCHAR_TABLE (top)->defalt; | 812 | this = XCHAR_TABLE (top)->defalt; |
| 812 | if (!EQ (val, this)) | 813 | if (!EQ (val, this)) |
| 813 | { | 814 | { |
| 814 | int different_value = 1; | 815 | bool different_value = 1; |
| 815 | 816 | ||
| 816 | if (NILP (val)) | 817 | if (NILP (val)) |
| 817 | { | 818 | { |
diff --git a/src/cmds.c b/src/cmds.c index b416135ee9e..90d3cd6dced 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -47,10 +47,10 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, | |||
| 47 | return make_number (PT + XINT (n)); | 47 | return make_number (PT + XINT (n)); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | /* Add N to point; or subtract N if FORWARD is zero. N defaults to 1. | 50 | /* Add N to point; or subtract N if FORWARD is false. N defaults to 1. |
| 51 | Validate the new location. Return nil. */ | 51 | Validate the new location. Return nil. */ |
| 52 | static Lisp_Object | 52 | static Lisp_Object |
| 53 | move_point (Lisp_Object n, int forward) | 53 | move_point (Lisp_Object n, bool forward) |
| 54 | { | 54 | { |
| 55 | /* This used to just set point to point + XINT (n), and then check | 55 | /* This used to just set point to point + XINT (n), and then check |
| 56 | to see if it was within boundaries. But now that SET_PT can | 56 | to see if it was within boundaries. But now that SET_PT can |
| @@ -277,7 +277,7 @@ After insertion, the value of `auto-fill-function' is called if the | |||
| 277 | At the end, it runs `post-self-insert-hook'. */) | 277 | At the end, it runs `post-self-insert-hook'. */) |
| 278 | (Lisp_Object n) | 278 | (Lisp_Object n) |
| 279 | { | 279 | { |
| 280 | int remove_boundary = 1; | 280 | bool remove_boundary = 1; |
| 281 | CHECK_NATNUM (n); | 281 | CHECK_NATNUM (n); |
| 282 | 282 | ||
| 283 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) | 283 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) |
| @@ -438,7 +438,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 438 | : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) | 438 | : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) |
| 439 | == Sword)) | 439 | == Sword)) |
| 440 | { | 440 | { |
| 441 | int modiff = MODIFF; | 441 | EMACS_INT modiff = MODIFF; |
| 442 | Lisp_Object sym; | 442 | Lisp_Object sym; |
| 443 | 443 | ||
| 444 | sym = call0 (Qexpand_abbrev); | 444 | sym = call0 (Qexpand_abbrev); |
diff --git a/src/coding.c b/src/coding.c index 971686dc180..02e7b34695e 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -147,18 +147,18 @@ STRUCT CODING_SYSTEM | |||
| 147 | CODING conforms to the format of XXX, and update the members of | 147 | CODING conforms to the format of XXX, and update the members of |
| 148 | DETECT_INFO. | 148 | DETECT_INFO. |
| 149 | 149 | ||
| 150 | Return 1 if the byte sequence conforms to XXX, otherwise return 0. | 150 | Return true if the byte sequence conforms to XXX. |
| 151 | 151 | ||
| 152 | Below is the template of these functions. */ | 152 | Below is the template of these functions. */ |
| 153 | 153 | ||
| 154 | #if 0 | 154 | #if 0 |
| 155 | static int | 155 | static bool |
| 156 | detect_coding_XXX (struct coding_system *coding, | 156 | detect_coding_XXX (struct coding_system *coding, |
| 157 | struct coding_detection_info *detect_info) | 157 | struct coding_detection_info *detect_info) |
| 158 | { | 158 | { |
| 159 | const unsigned char *src = coding->source; | 159 | const unsigned char *src = coding->source; |
| 160 | const unsigned char *src_end = coding->source + coding->src_bytes; | 160 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 161 | int multibytep = coding->src_multibyte; | 161 | bool multibytep = coding->src_multibyte; |
| 162 | ptrdiff_t consumed_chars = 0; | 162 | ptrdiff_t consumed_chars = 0; |
| 163 | int found = 0; | 163 | int found = 0; |
| 164 | ...; | 164 | ...; |
| @@ -212,7 +212,7 @@ decode_coding_XXXX (struct coding_system *coding) | |||
| 212 | /* A buffer to produce decoded characters. */ | 212 | /* A buffer to produce decoded characters. */ |
| 213 | int *charbuf = coding->charbuf + coding->charbuf_used; | 213 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 214 | int *charbuf_end = coding->charbuf + coding->charbuf_size; | 214 | int *charbuf_end = coding->charbuf + coding->charbuf_size; |
| 215 | int multibytep = coding->src_multibyte; | 215 | bool multibytep = coding->src_multibyte; |
| 216 | 216 | ||
| 217 | while (1) | 217 | while (1) |
| 218 | { | 218 | { |
| @@ -260,7 +260,7 @@ decode_coding_XXXX (struct coding_system *coding) | |||
| 260 | static void | 260 | static void |
| 261 | encode_coding_XXX (struct coding_system *coding) | 261 | encode_coding_XXX (struct coding_system *coding) |
| 262 | { | 262 | { |
| 263 | int multibytep = coding->dst_multibyte; | 263 | bool multibytep = coding->dst_multibyte; |
| 264 | int *charbuf = coding->charbuf; | 264 | int *charbuf = coding->charbuf; |
| 265 | int *charbuf_end = charbuf->charbuf + coding->charbuf_used; | 265 | int *charbuf_end = charbuf->charbuf + coding->charbuf_used; |
| 266 | unsigned char *dst = coding->destination + coding->produced; | 266 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -651,8 +651,8 @@ static struct coding_system coding_categories[coding_category_max]; | |||
| 651 | 651 | ||
| 652 | /* Safely get one byte from the source text pointed by SRC which ends | 652 | /* Safely get one byte from the source text pointed by SRC which ends |
| 653 | at SRC_END, and set C to that byte. If there are not enough bytes | 653 | at SRC_END, and set C to that byte. If there are not enough bytes |
| 654 | in the source, it jumps to `no_more_source'. If multibytep is | 654 | in the source, it jumps to 'no_more_source'. If MULTIBYTEP, |
| 655 | nonzero, and a multibyte character is found at SRC, set C to the | 655 | and a multibyte character is found at SRC, set C to the |
| 656 | negative value of the character code. The caller should declare | 656 | negative value of the character code. The caller should declare |
| 657 | and set these variables appropriately in advance: | 657 | and set these variables appropriately in advance: |
| 658 | src, src_end, multibytep */ | 658 | src, src_end, multibytep */ |
| @@ -685,7 +685,7 @@ static struct coding_system coding_categories[coding_category_max]; | |||
| 685 | /* Safely get two bytes from the source text pointed by SRC which ends | 685 | /* Safely get two bytes from the source text pointed by SRC which ends |
| 686 | at SRC_END, and set C1 and C2 to those bytes while skipping the | 686 | at SRC_END, and set C1 and C2 to those bytes while skipping the |
| 687 | heading multibyte characters. If there are not enough bytes in the | 687 | heading multibyte characters. If there are not enough bytes in the |
| 688 | source, it jumps to `no_more_source'. If multibytep is nonzero and | 688 | source, it jumps to 'no_more_source'. If MULTIBYTEP and |
| 689 | a multibyte character is found for C2, set C2 to the negative value | 689 | a multibyte character is found for C2, set C2 to the negative value |
| 690 | of the character code. The caller should declare and set these | 690 | of the character code. The caller should declare and set these |
| 691 | variables appropriately in advance: | 691 | variables appropriately in advance: |
| @@ -746,8 +746,8 @@ static struct coding_system coding_categories[coding_category_max]; | |||
| 746 | 746 | ||
| 747 | 747 | ||
| 748 | /* Store a byte C in the place pointed by DST and increment DST to the | 748 | /* Store a byte C in the place pointed by DST and increment DST to the |
| 749 | next free point, and increment PRODUCED_CHARS. If MULTIBYTEP is | 749 | next free point, and increment PRODUCED_CHARS. If MULTIBYTEP, |
| 750 | nonzero, store in an appropriate multibyte from. The caller should | 750 | store in an appropriate multibyte form. The caller should |
| 751 | declare and set the variables `dst' and `multibytep' appropriately | 751 | declare and set the variables `dst' and `multibytep' appropriately |
| 752 | in advance. */ | 752 | in advance. */ |
| 753 | 753 | ||
| @@ -806,83 +806,6 @@ static struct coding_system coding_categories[coding_category_max]; | |||
| 806 | } while (0) | 806 | } while (0) |
| 807 | 807 | ||
| 808 | 808 | ||
| 809 | /* Prototypes for static functions. */ | ||
| 810 | static void record_conversion_result (struct coding_system *coding, | ||
| 811 | enum coding_result_code result); | ||
| 812 | static int detect_coding_utf_8 (struct coding_system *, | ||
| 813 | struct coding_detection_info *info); | ||
| 814 | static void decode_coding_utf_8 (struct coding_system *); | ||
| 815 | static int encode_coding_utf_8 (struct coding_system *); | ||
| 816 | |||
| 817 | static int detect_coding_utf_16 (struct coding_system *, | ||
| 818 | struct coding_detection_info *info); | ||
| 819 | static void decode_coding_utf_16 (struct coding_system *); | ||
| 820 | static int encode_coding_utf_16 (struct coding_system *); | ||
| 821 | |||
| 822 | static int detect_coding_iso_2022 (struct coding_system *, | ||
| 823 | struct coding_detection_info *info); | ||
| 824 | static void decode_coding_iso_2022 (struct coding_system *); | ||
| 825 | static int encode_coding_iso_2022 (struct coding_system *); | ||
| 826 | |||
| 827 | static int detect_coding_emacs_mule (struct coding_system *, | ||
| 828 | struct coding_detection_info *info); | ||
| 829 | static void decode_coding_emacs_mule (struct coding_system *); | ||
| 830 | static int encode_coding_emacs_mule (struct coding_system *); | ||
| 831 | |||
| 832 | static int detect_coding_sjis (struct coding_system *, | ||
| 833 | struct coding_detection_info *info); | ||
| 834 | static void decode_coding_sjis (struct coding_system *); | ||
| 835 | static int encode_coding_sjis (struct coding_system *); | ||
| 836 | |||
| 837 | static int detect_coding_big5 (struct coding_system *, | ||
| 838 | struct coding_detection_info *info); | ||
| 839 | static void decode_coding_big5 (struct coding_system *); | ||
| 840 | static int encode_coding_big5 (struct coding_system *); | ||
| 841 | |||
| 842 | static int detect_coding_ccl (struct coding_system *, | ||
| 843 | struct coding_detection_info *info); | ||
| 844 | static void decode_coding_ccl (struct coding_system *); | ||
| 845 | static int encode_coding_ccl (struct coding_system *); | ||
| 846 | |||
| 847 | static void decode_coding_raw_text (struct coding_system *); | ||
| 848 | static int encode_coding_raw_text (struct coding_system *); | ||
| 849 | |||
| 850 | static void coding_set_source (struct coding_system *); | ||
| 851 | static ptrdiff_t coding_change_source (struct coding_system *); | ||
| 852 | static void coding_set_destination (struct coding_system *); | ||
| 853 | static ptrdiff_t coding_change_destination (struct coding_system *); | ||
| 854 | static void coding_alloc_by_realloc (struct coding_system *, ptrdiff_t); | ||
| 855 | static void coding_alloc_by_making_gap (struct coding_system *, | ||
| 856 | ptrdiff_t, ptrdiff_t); | ||
| 857 | static unsigned char *alloc_destination (struct coding_system *, | ||
| 858 | ptrdiff_t, unsigned char *); | ||
| 859 | static void setup_iso_safe_charsets (Lisp_Object); | ||
| 860 | static ptrdiff_t encode_designation_at_bol (struct coding_system *, | ||
| 861 | int *, int *, unsigned char *); | ||
| 862 | static int detect_eol (const unsigned char *, | ||
| 863 | ptrdiff_t, enum coding_category); | ||
| 864 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); | ||
| 865 | static void decode_eol (struct coding_system *); | ||
| 866 | static Lisp_Object get_translation_table (Lisp_Object, int, int *); | ||
| 867 | static Lisp_Object get_translation (Lisp_Object, int *, int *); | ||
| 868 | static int produce_chars (struct coding_system *, Lisp_Object, int); | ||
| 869 | static inline void produce_charset (struct coding_system *, int *, | ||
| 870 | ptrdiff_t); | ||
| 871 | static void produce_annotation (struct coding_system *, ptrdiff_t); | ||
| 872 | static int decode_coding (struct coding_system *); | ||
| 873 | static inline int *handle_composition_annotation (ptrdiff_t, ptrdiff_t, | ||
| 874 | struct coding_system *, | ||
| 875 | int *, ptrdiff_t *); | ||
| 876 | static inline int *handle_charset_annotation (ptrdiff_t, ptrdiff_t, | ||
| 877 | struct coding_system *, | ||
| 878 | int *, ptrdiff_t *); | ||
| 879 | static void consume_chars (struct coding_system *, Lisp_Object, int); | ||
| 880 | static int encode_coding (struct coding_system *); | ||
| 881 | static Lisp_Object make_conversion_work_buffer (int); | ||
| 882 | static Lisp_Object code_conversion_restore (Lisp_Object); | ||
| 883 | static inline int char_encodable_p (int, Lisp_Object); | ||
| 884 | static Lisp_Object make_subsidiaries (Lisp_Object); | ||
| 885 | |||
| 886 | static void | 809 | static void |
| 887 | record_conversion_result (struct coding_system *coding, | 810 | record_conversion_result (struct coding_system *coding, |
| 888 | enum coding_result_code result) | 811 | enum coding_result_code result) |
| @@ -1264,8 +1187,7 @@ alloc_destination (struct coding_system *coding, ptrdiff_t nbytes, | |||
| 1264 | /*** 3. UTF-8 ***/ | 1187 | /*** 3. UTF-8 ***/ |
| 1265 | 1188 | ||
| 1266 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 1189 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 1267 | Check if a text is encoded in UTF-8. If it is, return 1, else | 1190 | Return true if a text is encoded in UTF-8. */ |
| 1268 | return 0. */ | ||
| 1269 | 1191 | ||
| 1270 | #define UTF_8_1_OCTET_P(c) ((c) < 0x80) | 1192 | #define UTF_8_1_OCTET_P(c) ((c) < 0x80) |
| 1271 | #define UTF_8_EXTRA_OCTET_P(c) (((c) & 0xC0) == 0x80) | 1193 | #define UTF_8_EXTRA_OCTET_P(c) (((c) & 0xC0) == 0x80) |
| @@ -1278,16 +1200,16 @@ alloc_destination (struct coding_system *coding, ptrdiff_t nbytes, | |||
| 1278 | #define UTF_8_BOM_2 0xBB | 1200 | #define UTF_8_BOM_2 0xBB |
| 1279 | #define UTF_8_BOM_3 0xBF | 1201 | #define UTF_8_BOM_3 0xBF |
| 1280 | 1202 | ||
| 1281 | static int | 1203 | static bool |
| 1282 | detect_coding_utf_8 (struct coding_system *coding, | 1204 | detect_coding_utf_8 (struct coding_system *coding, |
| 1283 | struct coding_detection_info *detect_info) | 1205 | struct coding_detection_info *detect_info) |
| 1284 | { | 1206 | { |
| 1285 | const unsigned char *src = coding->source, *src_base; | 1207 | const unsigned char *src = coding->source, *src_base; |
| 1286 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1208 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 1287 | int multibytep = coding->src_multibyte; | 1209 | bool multibytep = coding->src_multibyte; |
| 1288 | ptrdiff_t consumed_chars = 0; | 1210 | ptrdiff_t consumed_chars = 0; |
| 1289 | int bom_found = 0; | 1211 | bool bom_found = 0; |
| 1290 | int found = 0; | 1212 | bool found = 0; |
| 1291 | 1213 | ||
| 1292 | detect_info->checked |= CATEGORY_MASK_UTF_8; | 1214 | detect_info->checked |= CATEGORY_MASK_UTF_8; |
| 1293 | /* A coding system of this category is always ASCII compatible. */ | 1215 | /* A coding system of this category is always ASCII compatible. */ |
| @@ -1371,10 +1293,10 @@ decode_coding_utf_8 (struct coding_system *coding) | |||
| 1371 | int *charbuf = coding->charbuf + coding->charbuf_used; | 1293 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 1372 | int *charbuf_end = coding->charbuf + coding->charbuf_size; | 1294 | int *charbuf_end = coding->charbuf + coding->charbuf_size; |
| 1373 | ptrdiff_t consumed_chars = 0, consumed_chars_base = 0; | 1295 | ptrdiff_t consumed_chars = 0, consumed_chars_base = 0; |
| 1374 | int multibytep = coding->src_multibyte; | 1296 | bool multibytep = coding->src_multibyte; |
| 1375 | enum utf_bom_type bom = CODING_UTF_8_BOM (coding); | 1297 | enum utf_bom_type bom = CODING_UTF_8_BOM (coding); |
| 1376 | int eol_dos = | 1298 | bool eol_dos |
| 1377 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 1299 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 1378 | int byte_after_cr = -1; | 1300 | int byte_after_cr = -1; |
| 1379 | 1301 | ||
| 1380 | if (bom != utf_without_bom) | 1302 | if (bom != utf_without_bom) |
| @@ -1513,10 +1435,10 @@ decode_coding_utf_8 (struct coding_system *coding) | |||
| 1513 | } | 1435 | } |
| 1514 | 1436 | ||
| 1515 | 1437 | ||
| 1516 | static int | 1438 | static bool |
| 1517 | encode_coding_utf_8 (struct coding_system *coding) | 1439 | encode_coding_utf_8 (struct coding_system *coding) |
| 1518 | { | 1440 | { |
| 1519 | int multibytep = coding->dst_multibyte; | 1441 | bool multibytep = coding->dst_multibyte; |
| 1520 | int *charbuf = coding->charbuf; | 1442 | int *charbuf = coding->charbuf; |
| 1521 | int *charbuf_end = charbuf + coding->charbuf_used; | 1443 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 1522 | unsigned char *dst = coding->destination + coding->produced; | 1444 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -1577,8 +1499,7 @@ encode_coding_utf_8 (struct coding_system *coding) | |||
| 1577 | 1499 | ||
| 1578 | 1500 | ||
| 1579 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 1501 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 1580 | Check if a text is encoded in one of UTF-16 based coding systems. | 1502 | Return true if a text is encoded in one of UTF-16 based coding systems. */ |
| 1581 | If it is, return 1, else return 0. */ | ||
| 1582 | 1503 | ||
| 1583 | #define UTF_16_HIGH_SURROGATE_P(val) \ | 1504 | #define UTF_16_HIGH_SURROGATE_P(val) \ |
| 1584 | (((val) & 0xFC00) == 0xD800) | 1505 | (((val) & 0xFC00) == 0xD800) |
| @@ -1587,13 +1508,13 @@ encode_coding_utf_8 (struct coding_system *coding) | |||
| 1587 | (((val) & 0xFC00) == 0xDC00) | 1508 | (((val) & 0xFC00) == 0xDC00) |
| 1588 | 1509 | ||
| 1589 | 1510 | ||
| 1590 | static int | 1511 | static bool |
| 1591 | detect_coding_utf_16 (struct coding_system *coding, | 1512 | detect_coding_utf_16 (struct coding_system *coding, |
| 1592 | struct coding_detection_info *detect_info) | 1513 | struct coding_detection_info *detect_info) |
| 1593 | { | 1514 | { |
| 1594 | const unsigned char *src = coding->source; | 1515 | const unsigned char *src = coding->source; |
| 1595 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1516 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 1596 | int multibytep = coding->src_multibyte; | 1517 | bool multibytep = coding->src_multibyte; |
| 1597 | int c1, c2; | 1518 | int c1, c2; |
| 1598 | 1519 | ||
| 1599 | detect_info->checked |= CATEGORY_MASK_UTF_16; | 1520 | detect_info->checked |= CATEGORY_MASK_UTF_16; |
| @@ -1680,12 +1601,12 @@ decode_coding_utf_16 (struct coding_system *coding) | |||
| 1680 | /* We may produces at most 3 chars in one loop. */ | 1601 | /* We may produces at most 3 chars in one loop. */ |
| 1681 | int *charbuf_end = coding->charbuf + coding->charbuf_size - 2; | 1602 | int *charbuf_end = coding->charbuf + coding->charbuf_size - 2; |
| 1682 | ptrdiff_t consumed_chars = 0, consumed_chars_base = 0; | 1603 | ptrdiff_t consumed_chars = 0, consumed_chars_base = 0; |
| 1683 | int multibytep = coding->src_multibyte; | 1604 | bool multibytep = coding->src_multibyte; |
| 1684 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); | 1605 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); |
| 1685 | enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); | 1606 | enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); |
| 1686 | int surrogate = CODING_UTF_16_SURROGATE (coding); | 1607 | int surrogate = CODING_UTF_16_SURROGATE (coding); |
| 1687 | int eol_dos = | 1608 | bool eol_dos |
| 1688 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 1609 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 1689 | int byte_after_cr1 = -1, byte_after_cr2 = -1; | 1610 | int byte_after_cr1 = -1, byte_after_cr2 = -1; |
| 1690 | 1611 | ||
| 1691 | if (bom == utf_with_bom) | 1612 | if (bom == utf_with_bom) |
| @@ -1795,17 +1716,17 @@ decode_coding_utf_16 (struct coding_system *coding) | |||
| 1795 | coding->charbuf_used = charbuf - coding->charbuf; | 1716 | coding->charbuf_used = charbuf - coding->charbuf; |
| 1796 | } | 1717 | } |
| 1797 | 1718 | ||
| 1798 | static int | 1719 | static bool |
| 1799 | encode_coding_utf_16 (struct coding_system *coding) | 1720 | encode_coding_utf_16 (struct coding_system *coding) |
| 1800 | { | 1721 | { |
| 1801 | int multibytep = coding->dst_multibyte; | 1722 | bool multibytep = coding->dst_multibyte; |
| 1802 | int *charbuf = coding->charbuf; | 1723 | int *charbuf = coding->charbuf; |
| 1803 | int *charbuf_end = charbuf + coding->charbuf_used; | 1724 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 1804 | unsigned char *dst = coding->destination + coding->produced; | 1725 | unsigned char *dst = coding->destination + coding->produced; |
| 1805 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 1726 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 1806 | int safe_room = 8; | 1727 | int safe_room = 8; |
| 1807 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); | 1728 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); |
| 1808 | int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian; | 1729 | bool big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian; |
| 1809 | ptrdiff_t produced_chars = 0; | 1730 | ptrdiff_t produced_chars = 0; |
| 1810 | int c; | 1731 | int c; |
| 1811 | 1732 | ||
| @@ -1930,16 +1851,15 @@ char emacs_mule_bytes[256]; | |||
| 1930 | 1851 | ||
| 1931 | 1852 | ||
| 1932 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 1853 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 1933 | Check if a text is encoded in `emacs-mule'. If it is, return 1, | 1854 | Return true if a text is encoded in 'emacs-mule'. */ |
| 1934 | else return 0. */ | ||
| 1935 | 1855 | ||
| 1936 | static int | 1856 | static bool |
| 1937 | detect_coding_emacs_mule (struct coding_system *coding, | 1857 | detect_coding_emacs_mule (struct coding_system *coding, |
| 1938 | struct coding_detection_info *detect_info) | 1858 | struct coding_detection_info *detect_info) |
| 1939 | { | 1859 | { |
| 1940 | const unsigned char *src = coding->source, *src_base; | 1860 | const unsigned char *src = coding->source, *src_base; |
| 1941 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1861 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 1942 | int multibytep = coding->src_multibyte; | 1862 | bool multibytep = coding->src_multibyte; |
| 1943 | ptrdiff_t consumed_chars = 0; | 1863 | ptrdiff_t consumed_chars = 0; |
| 1944 | int c; | 1864 | int c; |
| 1945 | int found = 0; | 1865 | int found = 0; |
| @@ -2029,12 +1949,12 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, | |||
| 2029 | { | 1949 | { |
| 2030 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1950 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 2031 | const unsigned char *src_base = src; | 1951 | const unsigned char *src_base = src; |
| 2032 | int multibytep = coding->src_multibyte; | 1952 | bool multibytep = coding->src_multibyte; |
| 2033 | int charset_ID; | 1953 | int charset_ID; |
| 2034 | unsigned code; | 1954 | unsigned code; |
| 2035 | int c; | 1955 | int c; |
| 2036 | int consumed_chars = 0; | 1956 | int consumed_chars = 0; |
| 2037 | int mseq_found = 0; | 1957 | bool mseq_found = 0; |
| 2038 | 1958 | ||
| 2039 | ONE_MORE_BYTE (c); | 1959 | ONE_MORE_BYTE (c); |
| 2040 | if (c < 0) | 1960 | if (c < 0) |
| @@ -2411,12 +2331,12 @@ decode_coding_emacs_mule (struct coding_system *coding) | |||
| 2411 | /* We can produce up to 2 characters in a loop. */ | 2331 | /* We can produce up to 2 characters in a loop. */ |
| 2412 | - 1; | 2332 | - 1; |
| 2413 | ptrdiff_t consumed_chars = 0, consumed_chars_base; | 2333 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 2414 | int multibytep = coding->src_multibyte; | 2334 | bool multibytep = coding->src_multibyte; |
| 2415 | ptrdiff_t char_offset = coding->produced_char; | 2335 | ptrdiff_t char_offset = coding->produced_char; |
| 2416 | ptrdiff_t last_offset = char_offset; | 2336 | ptrdiff_t last_offset = char_offset; |
| 2417 | int last_id = charset_ascii; | 2337 | int last_id = charset_ascii; |
| 2418 | int eol_dos = | 2338 | bool eol_dos |
| 2419 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 2339 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 2420 | int byte_after_cr = -1; | 2340 | int byte_after_cr = -1; |
| 2421 | struct composition_status *cmp_status = &coding->spec.emacs_mule.cmp_status; | 2341 | struct composition_status *cmp_status = &coding->spec.emacs_mule.cmp_status; |
| 2422 | 2342 | ||
| @@ -2657,10 +2577,10 @@ decode_coding_emacs_mule (struct coding_system *coding) | |||
| 2657 | } while (0); | 2577 | } while (0); |
| 2658 | 2578 | ||
| 2659 | 2579 | ||
| 2660 | static int | 2580 | static bool |
| 2661 | encode_coding_emacs_mule (struct coding_system *coding) | 2581 | encode_coding_emacs_mule (struct coding_system *coding) |
| 2662 | { | 2582 | { |
| 2663 | int multibytep = coding->dst_multibyte; | 2583 | bool multibytep = coding->dst_multibyte; |
| 2664 | int *charbuf = coding->charbuf; | 2584 | int *charbuf = coding->charbuf; |
| 2665 | int *charbuf_end = charbuf + coding->charbuf_used; | 2585 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 2666 | unsigned char *dst = coding->destination + coding->produced; | 2586 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -2722,7 +2642,7 @@ encode_coding_emacs_mule (struct coding_system *coding) | |||
| 2722 | 2642 | ||
| 2723 | if (preferred_charset_id >= 0) | 2643 | if (preferred_charset_id >= 0) |
| 2724 | { | 2644 | { |
| 2725 | int result; | 2645 | bool result; |
| 2726 | 2646 | ||
| 2727 | charset = CHARSET_FROM_ID (preferred_charset_id); | 2647 | charset = CHARSET_FROM_ID (preferred_charset_id); |
| 2728 | CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result); | 2648 | CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result); |
| @@ -3017,17 +2937,17 @@ setup_iso_safe_charsets (Lisp_Object attrs) | |||
| 3017 | 2937 | ||
| 3018 | 2938 | ||
| 3019 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 2939 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 3020 | Check if a text is encoded in one of ISO-2022 based coding systems. | 2940 | Return true if a text is encoded in one of ISO-2022 based coding |
| 3021 | If it is, return 1, else return 0. */ | 2941 | systems. */ |
| 3022 | 2942 | ||
| 3023 | static int | 2943 | static bool |
| 3024 | detect_coding_iso_2022 (struct coding_system *coding, | 2944 | detect_coding_iso_2022 (struct coding_system *coding, |
| 3025 | struct coding_detection_info *detect_info) | 2945 | struct coding_detection_info *detect_info) |
| 3026 | { | 2946 | { |
| 3027 | const unsigned char *src = coding->source, *src_base = src; | 2947 | const unsigned char *src = coding->source, *src_base = src; |
| 3028 | const unsigned char *src_end = coding->source + coding->src_bytes; | 2948 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 3029 | int multibytep = coding->src_multibyte; | 2949 | bool multibytep = coding->src_multibyte; |
| 3030 | int single_shifting = 0; | 2950 | bool single_shifting = 0; |
| 3031 | int id; | 2951 | int id; |
| 3032 | int c, c1; | 2952 | int c, c1; |
| 3033 | ptrdiff_t consumed_chars = 0; | 2953 | ptrdiff_t consumed_chars = 0; |
| @@ -3390,8 +3310,6 @@ detect_coding_iso_2022 (struct coding_system *coding, | |||
| 3390 | 3310 | ||
| 3391 | /* Finish the current composition as invalid. */ | 3311 | /* Finish the current composition as invalid. */ |
| 3392 | 3312 | ||
| 3393 | static int finish_composition (int *, struct composition_status *); | ||
| 3394 | |||
| 3395 | static int | 3313 | static int |
| 3396 | finish_composition (int *charbuf, struct composition_status *cmp_status) | 3314 | finish_composition (int *charbuf, struct composition_status *cmp_status) |
| 3397 | { | 3315 | { |
| @@ -3541,7 +3459,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3541 | int *charbuf_end | 3459 | int *charbuf_end |
| 3542 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); | 3460 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); |
| 3543 | ptrdiff_t consumed_chars = 0, consumed_chars_base; | 3461 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 3544 | int multibytep = coding->src_multibyte; | 3462 | bool multibytep = coding->src_multibyte; |
| 3545 | /* Charsets invoked to graphic plane 0 and 1 respectively. */ | 3463 | /* Charsets invoked to graphic plane 0 and 1 respectively. */ |
| 3546 | int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0); | 3464 | int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0); |
| 3547 | int charset_id_1 = CODING_ISO_INVOKED_CHARSET (coding, 1); | 3465 | int charset_id_1 = CODING_ISO_INVOKED_CHARSET (coding, 1); |
| @@ -3553,8 +3471,8 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3553 | ptrdiff_t char_offset = coding->produced_char; | 3471 | ptrdiff_t char_offset = coding->produced_char; |
| 3554 | ptrdiff_t last_offset = char_offset; | 3472 | ptrdiff_t last_offset = char_offset; |
| 3555 | int last_id = charset_ascii; | 3473 | int last_id = charset_ascii; |
| 3556 | int eol_dos = | 3474 | bool eol_dos |
| 3557 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 3475 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 3558 | int byte_after_cr = -1; | 3476 | int byte_after_cr = -1; |
| 3559 | int i; | 3477 | int i; |
| 3560 | 3478 | ||
| @@ -4282,7 +4200,7 @@ encode_invocation_designation (struct charset *charset, | |||
| 4282 | struct coding_system *coding, | 4200 | struct coding_system *coding, |
| 4283 | unsigned char *dst, ptrdiff_t *p_nchars) | 4201 | unsigned char *dst, ptrdiff_t *p_nchars) |
| 4284 | { | 4202 | { |
| 4285 | int multibytep = coding->dst_multibyte; | 4203 | bool multibytep = coding->dst_multibyte; |
| 4286 | ptrdiff_t produced_chars = *p_nchars; | 4204 | ptrdiff_t produced_chars = *p_nchars; |
| 4287 | int reg; /* graphic register number */ | 4205 | int reg; /* graphic register number */ |
| 4288 | int id = CHARSET_ID (charset); | 4206 | int id = CHARSET_ID (charset); |
| @@ -4380,7 +4298,7 @@ encode_designation_at_bol (struct coding_system *coding, | |||
| 4380 | int r[4]; | 4298 | int r[4]; |
| 4381 | int c, found = 0, reg; | 4299 | int c, found = 0, reg; |
| 4382 | ptrdiff_t produced_chars = 0; | 4300 | ptrdiff_t produced_chars = 0; |
| 4383 | int multibytep = coding->dst_multibyte; | 4301 | bool multibytep = coding->dst_multibyte; |
| 4384 | Lisp_Object attrs; | 4302 | Lisp_Object attrs; |
| 4385 | Lisp_Object charset_list; | 4303 | Lisp_Object charset_list; |
| 4386 | 4304 | ||
| @@ -4422,21 +4340,21 @@ encode_designation_at_bol (struct coding_system *coding, | |||
| 4422 | 4340 | ||
| 4423 | /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ | 4341 | /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ |
| 4424 | 4342 | ||
| 4425 | static int | 4343 | static bool |
| 4426 | encode_coding_iso_2022 (struct coding_system *coding) | 4344 | encode_coding_iso_2022 (struct coding_system *coding) |
| 4427 | { | 4345 | { |
| 4428 | int multibytep = coding->dst_multibyte; | 4346 | bool multibytep = coding->dst_multibyte; |
| 4429 | int *charbuf = coding->charbuf; | 4347 | int *charbuf = coding->charbuf; |
| 4430 | int *charbuf_end = charbuf + coding->charbuf_used; | 4348 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 4431 | unsigned char *dst = coding->destination + coding->produced; | 4349 | unsigned char *dst = coding->destination + coding->produced; |
| 4432 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 4350 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 4433 | int safe_room = 16; | 4351 | int safe_room = 16; |
| 4434 | int bol_designation | 4352 | bool bol_designation |
| 4435 | = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL | 4353 | = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL |
| 4436 | && CODING_ISO_BOL (coding)); | 4354 | && CODING_ISO_BOL (coding)); |
| 4437 | ptrdiff_t produced_chars = 0; | 4355 | ptrdiff_t produced_chars = 0; |
| 4438 | Lisp_Object attrs, eol_type, charset_list; | 4356 | Lisp_Object attrs, eol_type, charset_list; |
| 4439 | int ascii_compatible; | 4357 | bool ascii_compatible; |
| 4440 | int c; | 4358 | int c; |
| 4441 | int preferred_charset_id = -1; | 4359 | int preferred_charset_id = -1; |
| 4442 | 4360 | ||
| @@ -4523,8 +4441,9 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4523 | CODING_ISO_DESIGNATION (coding, i) | 4441 | CODING_ISO_DESIGNATION (coding, i) |
| 4524 | = CODING_ISO_INITIAL (coding, i); | 4442 | = CODING_ISO_INITIAL (coding, i); |
| 4525 | } | 4443 | } |
| 4526 | bol_designation | 4444 | bol_designation = ((CODING_ISO_FLAGS (coding) |
| 4527 | = CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL; | 4445 | & CODING_ISO_FLAG_DESIGNATE_AT_BOL) |
| 4446 | != 0); | ||
| 4528 | } | 4447 | } |
| 4529 | else if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_RESET_AT_CNTL) | 4448 | else if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_RESET_AT_CNTL) |
| 4530 | ENCODE_RESET_PLANE_AND_REGISTER (); | 4449 | ENCODE_RESET_PLANE_AND_REGISTER (); |
| @@ -4551,7 +4470,7 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4551 | 4470 | ||
| 4552 | if (preferred_charset_id >= 0) | 4471 | if (preferred_charset_id >= 0) |
| 4553 | { | 4472 | { |
| 4554 | int result; | 4473 | bool result; |
| 4555 | 4474 | ||
| 4556 | charset = CHARSET_FROM_ID (preferred_charset_id); | 4475 | charset = CHARSET_FROM_ID (preferred_charset_id); |
| 4557 | CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result); | 4476 | CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result); |
| @@ -4631,16 +4550,15 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4631 | */ | 4550 | */ |
| 4632 | 4551 | ||
| 4633 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 4552 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 4634 | Check if a text is encoded in SJIS. If it is, return | 4553 | Return true if a text is encoded in SJIS. */ |
| 4635 | CATEGORY_MASK_SJIS, else return 0. */ | ||
| 4636 | 4554 | ||
| 4637 | static int | 4555 | static bool |
| 4638 | detect_coding_sjis (struct coding_system *coding, | 4556 | detect_coding_sjis (struct coding_system *coding, |
| 4639 | struct coding_detection_info *detect_info) | 4557 | struct coding_detection_info *detect_info) |
| 4640 | { | 4558 | { |
| 4641 | const unsigned char *src = coding->source, *src_base; | 4559 | const unsigned char *src = coding->source, *src_base; |
| 4642 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4560 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 4643 | int multibytep = coding->src_multibyte; | 4561 | bool multibytep = coding->src_multibyte; |
| 4644 | ptrdiff_t consumed_chars = 0; | 4562 | ptrdiff_t consumed_chars = 0; |
| 4645 | int found = 0; | 4563 | int found = 0; |
| 4646 | int c; | 4564 | int c; |
| @@ -4688,16 +4606,15 @@ detect_coding_sjis (struct coding_system *coding, | |||
| 4688 | } | 4606 | } |
| 4689 | 4607 | ||
| 4690 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 4608 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 4691 | Check if a text is encoded in BIG5. If it is, return | 4609 | Return true if a text is encoded in BIG5. */ |
| 4692 | CATEGORY_MASK_BIG5, else return 0. */ | ||
| 4693 | 4610 | ||
| 4694 | static int | 4611 | static bool |
| 4695 | detect_coding_big5 (struct coding_system *coding, | 4612 | detect_coding_big5 (struct coding_system *coding, |
| 4696 | struct coding_detection_info *detect_info) | 4613 | struct coding_detection_info *detect_info) |
| 4697 | { | 4614 | { |
| 4698 | const unsigned char *src = coding->source, *src_base; | 4615 | const unsigned char *src = coding->source, *src_base; |
| 4699 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4616 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 4700 | int multibytep = coding->src_multibyte; | 4617 | bool multibytep = coding->src_multibyte; |
| 4701 | ptrdiff_t consumed_chars = 0; | 4618 | ptrdiff_t consumed_chars = 0; |
| 4702 | int found = 0; | 4619 | int found = 0; |
| 4703 | int c; | 4620 | int c; |
| @@ -4735,8 +4652,7 @@ detect_coding_big5 (struct coding_system *coding, | |||
| 4735 | return 1; | 4652 | return 1; |
| 4736 | } | 4653 | } |
| 4737 | 4654 | ||
| 4738 | /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions". | 4655 | /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions". */ |
| 4739 | If SJIS_P is 1, decode SJIS text, else decode BIG5 test. */ | ||
| 4740 | 4656 | ||
| 4741 | static void | 4657 | static void |
| 4742 | decode_coding_sjis (struct coding_system *coding) | 4658 | decode_coding_sjis (struct coding_system *coding) |
| @@ -4750,15 +4666,15 @@ decode_coding_sjis (struct coding_system *coding) | |||
| 4750 | int *charbuf_end | 4666 | int *charbuf_end |
| 4751 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 4667 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| 4752 | ptrdiff_t consumed_chars = 0, consumed_chars_base; | 4668 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 4753 | int multibytep = coding->src_multibyte; | 4669 | bool multibytep = coding->src_multibyte; |
| 4754 | struct charset *charset_roman, *charset_kanji, *charset_kana; | 4670 | struct charset *charset_roman, *charset_kanji, *charset_kana; |
| 4755 | struct charset *charset_kanji2; | 4671 | struct charset *charset_kanji2; |
| 4756 | Lisp_Object attrs, charset_list, val; | 4672 | Lisp_Object attrs, charset_list, val; |
| 4757 | ptrdiff_t char_offset = coding->produced_char; | 4673 | ptrdiff_t char_offset = coding->produced_char; |
| 4758 | ptrdiff_t last_offset = char_offset; | 4674 | ptrdiff_t last_offset = char_offset; |
| 4759 | int last_id = charset_ascii; | 4675 | int last_id = charset_ascii; |
| 4760 | int eol_dos = | 4676 | bool eol_dos |
| 4761 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 4677 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 4762 | int byte_after_cr = -1; | 4678 | int byte_after_cr = -1; |
| 4763 | 4679 | ||
| 4764 | CODING_GET_INFO (coding, attrs, charset_list); | 4680 | CODING_GET_INFO (coding, attrs, charset_list); |
| @@ -4868,14 +4784,14 @@ decode_coding_big5 (struct coding_system *coding) | |||
| 4868 | int *charbuf_end | 4784 | int *charbuf_end |
| 4869 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 4785 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| 4870 | ptrdiff_t consumed_chars = 0, consumed_chars_base; | 4786 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 4871 | int multibytep = coding->src_multibyte; | 4787 | bool multibytep = coding->src_multibyte; |
| 4872 | struct charset *charset_roman, *charset_big5; | 4788 | struct charset *charset_roman, *charset_big5; |
| 4873 | Lisp_Object attrs, charset_list, val; | 4789 | Lisp_Object attrs, charset_list, val; |
| 4874 | ptrdiff_t char_offset = coding->produced_char; | 4790 | ptrdiff_t char_offset = coding->produced_char; |
| 4875 | ptrdiff_t last_offset = char_offset; | 4791 | ptrdiff_t last_offset = char_offset; |
| 4876 | int last_id = charset_ascii; | 4792 | int last_id = charset_ascii; |
| 4877 | int eol_dos = | 4793 | bool eol_dos |
| 4878 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 4794 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 4879 | int byte_after_cr = -1; | 4795 | int byte_after_cr = -1; |
| 4880 | 4796 | ||
| 4881 | CODING_GET_INFO (coding, attrs, charset_list); | 4797 | CODING_GET_INFO (coding, attrs, charset_list); |
| @@ -4957,13 +4873,12 @@ decode_coding_big5 (struct coding_system *coding) | |||
| 4957 | `japanese-jisx0208', `chinese-big5-1', and `chinese-big5-2'. We | 4873 | `japanese-jisx0208', `chinese-big5-1', and `chinese-big5-2'. We |
| 4958 | are sure that all these charsets are registered as official charset | 4874 | are sure that all these charsets are registered as official charset |
| 4959 | (i.e. do not have extended leading-codes). Characters of other | 4875 | (i.e. do not have extended leading-codes). Characters of other |
| 4960 | charsets are produced without any encoding. If SJIS_P is 1, encode | 4876 | charsets are produced without any encoding. */ |
| 4961 | SJIS text, else encode BIG5 text. */ | ||
| 4962 | 4877 | ||
| 4963 | static int | 4878 | static bool |
| 4964 | encode_coding_sjis (struct coding_system *coding) | 4879 | encode_coding_sjis (struct coding_system *coding) |
| 4965 | { | 4880 | { |
| 4966 | int multibytep = coding->dst_multibyte; | 4881 | bool multibytep = coding->dst_multibyte; |
| 4967 | int *charbuf = coding->charbuf; | 4882 | int *charbuf = coding->charbuf; |
| 4968 | int *charbuf_end = charbuf + coding->charbuf_used; | 4883 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 4969 | unsigned char *dst = coding->destination + coding->produced; | 4884 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -4971,7 +4886,7 @@ encode_coding_sjis (struct coding_system *coding) | |||
| 4971 | int safe_room = 4; | 4886 | int safe_room = 4; |
| 4972 | ptrdiff_t produced_chars = 0; | 4887 | ptrdiff_t produced_chars = 0; |
| 4973 | Lisp_Object attrs, charset_list, val; | 4888 | Lisp_Object attrs, charset_list, val; |
| 4974 | int ascii_compatible; | 4889 | bool ascii_compatible; |
| 4975 | struct charset *charset_kanji, *charset_kana; | 4890 | struct charset *charset_kanji, *charset_kana; |
| 4976 | struct charset *charset_kanji2; | 4891 | struct charset *charset_kanji2; |
| 4977 | int c; | 4892 | int c; |
| @@ -5054,10 +4969,10 @@ encode_coding_sjis (struct coding_system *coding) | |||
| 5054 | return 0; | 4969 | return 0; |
| 5055 | } | 4970 | } |
| 5056 | 4971 | ||
| 5057 | static int | 4972 | static bool |
| 5058 | encode_coding_big5 (struct coding_system *coding) | 4973 | encode_coding_big5 (struct coding_system *coding) |
| 5059 | { | 4974 | { |
| 5060 | int multibytep = coding->dst_multibyte; | 4975 | bool multibytep = coding->dst_multibyte; |
| 5061 | int *charbuf = coding->charbuf; | 4976 | int *charbuf = coding->charbuf; |
| 5062 | int *charbuf_end = charbuf + coding->charbuf_used; | 4977 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 5063 | unsigned char *dst = coding->destination + coding->produced; | 4978 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -5065,7 +4980,7 @@ encode_coding_big5 (struct coding_system *coding) | |||
| 5065 | int safe_room = 4; | 4980 | int safe_room = 4; |
| 5066 | ptrdiff_t produced_chars = 0; | 4981 | ptrdiff_t produced_chars = 0; |
| 5067 | Lisp_Object attrs, charset_list, val; | 4982 | Lisp_Object attrs, charset_list, val; |
| 5068 | int ascii_compatible; | 4983 | bool ascii_compatible; |
| 5069 | struct charset *charset_big5; | 4984 | struct charset *charset_big5; |
| 5070 | int c; | 4985 | int c; |
| 5071 | 4986 | ||
| @@ -5130,17 +5045,16 @@ encode_coding_big5 (struct coding_system *coding) | |||
| 5130 | /*** 10. CCL handlers ***/ | 5045 | /*** 10. CCL handlers ***/ |
| 5131 | 5046 | ||
| 5132 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 5047 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 5133 | Check if a text is encoded in a coding system of which | 5048 | Return true if a text is encoded in a coding system of which |
| 5134 | encoder/decoder are written in CCL program. If it is, return | 5049 | encoder/decoder are written in CCL program. */ |
| 5135 | CATEGORY_MASK_CCL, else return 0. */ | ||
| 5136 | 5050 | ||
| 5137 | static int | 5051 | static bool |
| 5138 | detect_coding_ccl (struct coding_system *coding, | 5052 | detect_coding_ccl (struct coding_system *coding, |
| 5139 | struct coding_detection_info *detect_info) | 5053 | struct coding_detection_info *detect_info) |
| 5140 | { | 5054 | { |
| 5141 | const unsigned char *src = coding->source, *src_base; | 5055 | const unsigned char *src = coding->source, *src_base; |
| 5142 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5056 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 5143 | int multibytep = coding->src_multibyte; | 5057 | bool multibytep = coding->src_multibyte; |
| 5144 | ptrdiff_t consumed_chars = 0; | 5058 | ptrdiff_t consumed_chars = 0; |
| 5145 | int found = 0; | 5059 | int found = 0; |
| 5146 | unsigned char *valids; | 5060 | unsigned char *valids; |
| @@ -5182,7 +5096,7 @@ decode_coding_ccl (struct coding_system *coding) | |||
| 5182 | int *charbuf = coding->charbuf + coding->charbuf_used; | 5096 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 5183 | int *charbuf_end = coding->charbuf + coding->charbuf_size; | 5097 | int *charbuf_end = coding->charbuf + coding->charbuf_size; |
| 5184 | ptrdiff_t consumed_chars = 0; | 5098 | ptrdiff_t consumed_chars = 0; |
| 5185 | int multibytep = coding->src_multibyte; | 5099 | bool multibytep = coding->src_multibyte; |
| 5186 | struct ccl_program *ccl = &coding->spec.ccl->ccl; | 5100 | struct ccl_program *ccl = &coding->spec.ccl->ccl; |
| 5187 | int source_charbuf[1024]; | 5101 | int source_charbuf[1024]; |
| 5188 | int source_byteidx[1025]; | 5102 | int source_byteidx[1025]; |
| @@ -5243,11 +5157,11 @@ decode_coding_ccl (struct coding_system *coding) | |||
| 5243 | coding->charbuf_used = charbuf - coding->charbuf; | 5157 | coding->charbuf_used = charbuf - coding->charbuf; |
| 5244 | } | 5158 | } |
| 5245 | 5159 | ||
| 5246 | static int | 5160 | static bool |
| 5247 | encode_coding_ccl (struct coding_system *coding) | 5161 | encode_coding_ccl (struct coding_system *coding) |
| 5248 | { | 5162 | { |
| 5249 | struct ccl_program *ccl = &coding->spec.ccl->ccl; | 5163 | struct ccl_program *ccl = &coding->spec.ccl->ccl; |
| 5250 | int multibytep = coding->dst_multibyte; | 5164 | bool multibytep = coding->dst_multibyte; |
| 5251 | int *charbuf = coding->charbuf; | 5165 | int *charbuf = coding->charbuf; |
| 5252 | int *charbuf_end = charbuf + coding->charbuf_used; | 5166 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 5253 | unsigned char *dst = coding->destination + coding->produced; | 5167 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -5308,7 +5222,6 @@ encode_coding_ccl (struct coding_system *coding) | |||
| 5308 | return 0; | 5222 | return 0; |
| 5309 | } | 5223 | } |
| 5310 | 5224 | ||
| 5311 | |||
| 5312 | 5225 | ||
| 5313 | /*** 10, 11. no-conversion handlers ***/ | 5226 | /*** 10, 11. no-conversion handlers ***/ |
| 5314 | 5227 | ||
| @@ -5317,8 +5230,8 @@ encode_coding_ccl (struct coding_system *coding) | |||
| 5317 | static void | 5230 | static void |
| 5318 | decode_coding_raw_text (struct coding_system *coding) | 5231 | decode_coding_raw_text (struct coding_system *coding) |
| 5319 | { | 5232 | { |
| 5320 | int eol_dos = | 5233 | bool eol_dos |
| 5321 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 5234 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 5322 | 5235 | ||
| 5323 | coding->chars_at_source = 1; | 5236 | coding->chars_at_source = 1; |
| 5324 | coding->consumed_char = coding->src_chars; | 5237 | coding->consumed_char = coding->src_chars; |
| @@ -5333,10 +5246,10 @@ decode_coding_raw_text (struct coding_system *coding) | |||
| 5333 | record_conversion_result (coding, CODING_RESULT_SUCCESS); | 5246 | record_conversion_result (coding, CODING_RESULT_SUCCESS); |
| 5334 | } | 5247 | } |
| 5335 | 5248 | ||
| 5336 | static int | 5249 | static bool |
| 5337 | encode_coding_raw_text (struct coding_system *coding) | 5250 | encode_coding_raw_text (struct coding_system *coding) |
| 5338 | { | 5251 | { |
| 5339 | int multibytep = coding->dst_multibyte; | 5252 | bool multibytep = coding->dst_multibyte; |
| 5340 | int *charbuf = coding->charbuf; | 5253 | int *charbuf = coding->charbuf; |
| 5341 | int *charbuf_end = coding->charbuf + coding->charbuf_used; | 5254 | int *charbuf_end = coding->charbuf + coding->charbuf_used; |
| 5342 | unsigned char *dst = coding->destination + coding->produced; | 5255 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -5414,21 +5327,20 @@ encode_coding_raw_text (struct coding_system *coding) | |||
| 5414 | } | 5327 | } |
| 5415 | 5328 | ||
| 5416 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 5329 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 5417 | Check if a text is encoded in a charset-based coding system. If it | 5330 | Return true if a text is encoded in a charset-based coding system. */ |
| 5418 | is, return 1, else return 0. */ | ||
| 5419 | 5331 | ||
| 5420 | static int | 5332 | static bool |
| 5421 | detect_coding_charset (struct coding_system *coding, | 5333 | detect_coding_charset (struct coding_system *coding, |
| 5422 | struct coding_detection_info *detect_info) | 5334 | struct coding_detection_info *detect_info) |
| 5423 | { | 5335 | { |
| 5424 | const unsigned char *src = coding->source, *src_base; | 5336 | const unsigned char *src = coding->source, *src_base; |
| 5425 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5337 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 5426 | int multibytep = coding->src_multibyte; | 5338 | bool multibytep = coding->src_multibyte; |
| 5427 | ptrdiff_t consumed_chars = 0; | 5339 | ptrdiff_t consumed_chars = 0; |
| 5428 | Lisp_Object attrs, valids, name; | 5340 | Lisp_Object attrs, valids, name; |
| 5429 | int found = 0; | 5341 | int found = 0; |
| 5430 | ptrdiff_t head_ascii = coding->head_ascii; | 5342 | ptrdiff_t head_ascii = coding->head_ascii; |
| 5431 | int check_latin_extra = 0; | 5343 | bool check_latin_extra = 0; |
| 5432 | 5344 | ||
| 5433 | detect_info->checked |= CATEGORY_MASK_CHARSET; | 5345 | detect_info->checked |= CATEGORY_MASK_CHARSET; |
| 5434 | 5346 | ||
| @@ -5532,14 +5444,14 @@ decode_coding_charset (struct coding_system *coding) | |||
| 5532 | int *charbuf_end | 5444 | int *charbuf_end |
| 5533 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 5445 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| 5534 | ptrdiff_t consumed_chars = 0, consumed_chars_base; | 5446 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 5535 | int multibytep = coding->src_multibyte; | 5447 | bool multibytep = coding->src_multibyte; |
| 5536 | Lisp_Object attrs = CODING_ID_ATTRS (coding->id); | 5448 | Lisp_Object attrs = CODING_ID_ATTRS (coding->id); |
| 5537 | Lisp_Object valids; | 5449 | Lisp_Object valids; |
| 5538 | ptrdiff_t char_offset = coding->produced_char; | 5450 | ptrdiff_t char_offset = coding->produced_char; |
| 5539 | ptrdiff_t last_offset = char_offset; | 5451 | ptrdiff_t last_offset = char_offset; |
| 5540 | int last_id = charset_ascii; | 5452 | int last_id = charset_ascii; |
| 5541 | int eol_dos = | 5453 | bool eol_dos |
| 5542 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 5454 | = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| 5543 | int byte_after_cr = -1; | 5455 | int byte_after_cr = -1; |
| 5544 | 5456 | ||
| 5545 | valids = AREF (attrs, coding_attr_charset_valids); | 5457 | valids = AREF (attrs, coding_attr_charset_valids); |
| @@ -5648,10 +5560,10 @@ decode_coding_charset (struct coding_system *coding) | |||
| 5648 | coding->charbuf_used = charbuf - coding->charbuf; | 5560 | coding->charbuf_used = charbuf - coding->charbuf; |
| 5649 | } | 5561 | } |
| 5650 | 5562 | ||
| 5651 | static int | 5563 | static bool |
| 5652 | encode_coding_charset (struct coding_system *coding) | 5564 | encode_coding_charset (struct coding_system *coding) |
| 5653 | { | 5565 | { |
| 5654 | int multibytep = coding->dst_multibyte; | 5566 | bool multibytep = coding->dst_multibyte; |
| 5655 | int *charbuf = coding->charbuf; | 5567 | int *charbuf = coding->charbuf; |
| 5656 | int *charbuf_end = charbuf + coding->charbuf_used; | 5568 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 5657 | unsigned char *dst = coding->destination + coding->produced; | 5569 | unsigned char *dst = coding->destination + coding->produced; |
| @@ -5659,7 +5571,7 @@ encode_coding_charset (struct coding_system *coding) | |||
| 5659 | int safe_room = MAX_MULTIBYTE_LENGTH; | 5571 | int safe_room = MAX_MULTIBYTE_LENGTH; |
| 5660 | ptrdiff_t produced_chars = 0; | 5572 | ptrdiff_t produced_chars = 0; |
| 5661 | Lisp_Object attrs, charset_list; | 5573 | Lisp_Object attrs, charset_list; |
| 5662 | int ascii_compatible; | 5574 | bool ascii_compatible; |
| 5663 | int c; | 5575 | int c; |
| 5664 | 5576 | ||
| 5665 | CODING_GET_INFO (coding, attrs, charset_list); | 5577 | CODING_GET_INFO (coding, attrs, charset_list); |
| @@ -5865,7 +5777,6 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding) | |||
| 5865 | coding->encoder = encode_coding_emacs_mule; | 5777 | coding->encoder = encode_coding_emacs_mule; |
| 5866 | coding->common_flags | 5778 | coding->common_flags |
| 5867 | |= (CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK); | 5779 | |= (CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK); |
| 5868 | coding->spec.emacs_mule.full_support = 1; | ||
| 5869 | if (! NILP (AREF (attrs, coding_attr_emacs_mule_full)) | 5780 | if (! NILP (AREF (attrs, coding_attr_emacs_mule_full)) |
| 5870 | && ! EQ (CODING_ATTR_CHARSET_LIST (attrs), Vemacs_mule_charset_list)) | 5781 | && ! EQ (CODING_ATTR_CHARSET_LIST (attrs), Vemacs_mule_charset_list)) |
| 5871 | { | 5782 | { |
| @@ -5883,7 +5794,6 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding) | |||
| 5883 | SSET (safe_charsets, XFASTINT (XCAR (tail)), 0); | 5794 | SSET (safe_charsets, XFASTINT (XCAR (tail)), 0); |
| 5884 | coding->max_charset_id = max_charset_id; | 5795 | coding->max_charset_id = max_charset_id; |
| 5885 | coding->safe_charsets = SDATA (safe_charsets); | 5796 | coding->safe_charsets = SDATA (safe_charsets); |
| 5886 | coding->spec.emacs_mule.full_support = 1; | ||
| 5887 | } | 5797 | } |
| 5888 | coding->spec.emacs_mule.cmp_status.state = COMPOSING_NO; | 5798 | coding->spec.emacs_mule.cmp_status.state = COMPOSING_NO; |
| 5889 | coding->spec.emacs_mule.cmp_status.method = COMPOSITION_NO; | 5799 | coding->spec.emacs_mule.cmp_status.method = COMPOSITION_NO; |
| @@ -6216,11 +6126,9 @@ detect_eol (const unsigned char *source, ptrdiff_t src_bytes, | |||
| 6216 | 6126 | ||
| 6217 | if ((1 << category) & CATEGORY_MASK_UTF_16) | 6127 | if ((1 << category) & CATEGORY_MASK_UTF_16) |
| 6218 | { | 6128 | { |
| 6219 | int msb, lsb; | 6129 | bool msb = category == (coding_category_utf_16_le |
| 6220 | 6130 | | coding_category_utf_16_le_nosig); | |
| 6221 | msb = category == (coding_category_utf_16_le | 6131 | bool lsb = !msb; |
| 6222 | | coding_category_utf_16_le_nosig); | ||
| 6223 | lsb = 1 - msb; | ||
| 6224 | 6132 | ||
| 6225 | while (src + 1 < src_end) | 6133 | while (src + 1 < src_end) |
| 6226 | { | 6134 | { |
| @@ -6335,7 +6243,7 @@ static void | |||
| 6335 | detect_coding (struct coding_system *coding) | 6243 | detect_coding (struct coding_system *coding) |
| 6336 | { | 6244 | { |
| 6337 | const unsigned char *src, *src_end; | 6245 | const unsigned char *src, *src_end; |
| 6338 | int saved_mode = coding->mode; | 6246 | unsigned int saved_mode = coding->mode; |
| 6339 | 6247 | ||
| 6340 | coding->consumed = coding->consumed_char = 0; | 6248 | coding->consumed = coding->consumed_char = 0; |
| 6341 | coding->produced = coding->produced_char = 0; | 6249 | coding->produced = coding->produced_char = 0; |
| @@ -6350,7 +6258,7 @@ detect_coding (struct coding_system *coding) | |||
| 6350 | { | 6258 | { |
| 6351 | int c, i; | 6259 | int c, i; |
| 6352 | struct coding_detection_info detect_info; | 6260 | struct coding_detection_info detect_info; |
| 6353 | int null_byte_found = 0, eight_bit_found = 0; | 6261 | bool null_byte_found = 0, eight_bit_found = 0; |
| 6354 | 6262 | ||
| 6355 | detect_info.checked = detect_info.found = detect_info.rejected = 0; | 6263 | detect_info.checked = detect_info.found = detect_info.rejected = 0; |
| 6356 | for (src = coding->source; src < src_end; src++) | 6264 | for (src = coding->source; src < src_end; src++) |
| @@ -6609,11 +6517,11 @@ decode_eol (struct coding_system *coding) | |||
| 6609 | 6517 | ||
| 6610 | 6518 | ||
| 6611 | /* Return a translation table (or list of them) from coding system | 6519 | /* Return a translation table (or list of them) from coding system |
| 6612 | attribute vector ATTRS for encoding (ENCODEP is nonzero) or | 6520 | attribute vector ATTRS for encoding (if ENCODEP) or decoding (if |
| 6613 | decoding (ENCODEP is zero). */ | 6521 | not ENCODEP). */ |
| 6614 | 6522 | ||
| 6615 | static Lisp_Object | 6523 | static Lisp_Object |
| 6616 | get_translation_table (Lisp_Object attrs, int encodep, int *max_lookup) | 6524 | get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup) |
| 6617 | { | 6525 | { |
| 6618 | Lisp_Object standard, translation_table; | 6526 | Lisp_Object standard, translation_table; |
| 6619 | Lisp_Object val; | 6527 | Lisp_Object val; |
| @@ -6743,7 +6651,7 @@ get_translation (Lisp_Object trans, int *buf, int *buf_end) | |||
| 6743 | 6651 | ||
| 6744 | static int | 6652 | static int |
| 6745 | produce_chars (struct coding_system *coding, Lisp_Object translation_table, | 6653 | produce_chars (struct coding_system *coding, Lisp_Object translation_table, |
| 6746 | int last_block) | 6654 | bool last_block) |
| 6747 | { | 6655 | { |
| 6748 | unsigned char *dst = coding->destination + coding->produced; | 6656 | unsigned char *dst = coding->destination + coding->produced; |
| 6749 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 6657 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| @@ -6846,7 +6754,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6846 | { | 6754 | { |
| 6847 | if (coding->src_multibyte) | 6755 | if (coding->src_multibyte) |
| 6848 | { | 6756 | { |
| 6849 | int multibytep = 1; | 6757 | bool multibytep = 1; |
| 6850 | ptrdiff_t consumed_chars = 0; | 6758 | ptrdiff_t consumed_chars = 0; |
| 6851 | 6759 | ||
| 6852 | while (1) | 6760 | while (1) |
| @@ -6882,7 +6790,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6882 | else | 6790 | else |
| 6883 | while (src < src_end) | 6791 | while (src < src_end) |
| 6884 | { | 6792 | { |
| 6885 | int multibytep = 1; | 6793 | bool multibytep = 1; |
| 6886 | int c = *src++; | 6794 | int c = *src++; |
| 6887 | 6795 | ||
| 6888 | if (dst >= dst_end - 1) | 6796 | if (dst >= dst_end - 1) |
| @@ -7018,7 +6926,7 @@ produce_charset (struct coding_system *coding, int *charbuf, ptrdiff_t pos) | |||
| 7018 | if (! coding->charbuf) \ | 6926 | if (! coding->charbuf) \ |
| 7019 | { \ | 6927 | { \ |
| 7020 | record_conversion_result (coding, CODING_RESULT_INSUFFICIENT_MEM); \ | 6928 | record_conversion_result (coding, CODING_RESULT_INSUFFICIENT_MEM); \ |
| 7021 | return coding->result; \ | 6929 | return; \ |
| 7022 | } \ | 6930 | } \ |
| 7023 | coding->charbuf_size = size; \ | 6931 | coding->charbuf_size = size; \ |
| 7024 | } while (0) | 6932 | } while (0) |
| @@ -7079,7 +6987,7 @@ produce_annotation (struct coding_system *coding, ptrdiff_t pos) | |||
| 7079 | CODING->dst_object. | 6987 | CODING->dst_object. |
| 7080 | */ | 6988 | */ |
| 7081 | 6989 | ||
| 7082 | static int | 6990 | static void |
| 7083 | decode_coding (struct coding_system *coding) | 6991 | decode_coding (struct coding_system *coding) |
| 7084 | { | 6992 | { |
| 7085 | Lisp_Object attrs; | 6993 | Lisp_Object attrs; |
| @@ -7098,8 +7006,7 @@ decode_coding (struct coding_system *coding) | |||
| 7098 | undo_list = Qt; | 7006 | undo_list = Qt; |
| 7099 | if (BUFFERP (coding->dst_object)) | 7007 | if (BUFFERP (coding->dst_object)) |
| 7100 | { | 7008 | { |
| 7101 | if (current_buffer != XBUFFER (coding->dst_object)) | 7009 | set_buffer_internal (XBUFFER (coding->dst_object)); |
| 7102 | set_buffer_internal (XBUFFER (coding->dst_object)); | ||
| 7103 | if (GPT != PT) | 7010 | if (GPT != PT) |
| 7104 | move_gap_both (PT, PT_BYTE); | 7011 | move_gap_both (PT, PT_BYTE); |
| 7105 | 7012 | ||
| @@ -7212,7 +7119,6 @@ decode_coding (struct coding_system *coding) | |||
| 7212 | bset_undo_list (current_buffer, undo_list); | 7119 | bset_undo_list (current_buffer, undo_list); |
| 7213 | record_insert (coding->dst_pos, coding->produced_char); | 7120 | record_insert (coding->dst_pos, coding->produced_char); |
| 7214 | } | 7121 | } |
| 7215 | return coding->result; | ||
| 7216 | } | 7122 | } |
| 7217 | 7123 | ||
| 7218 | 7124 | ||
| @@ -7341,7 +7247,7 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 7341 | const unsigned char *src_end = coding->source + coding->src_bytes; | 7247 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 7342 | ptrdiff_t pos = coding->src_pos + coding->consumed_char; | 7248 | ptrdiff_t pos = coding->src_pos + coding->consumed_char; |
| 7343 | ptrdiff_t end_pos = coding->src_pos + coding->src_chars; | 7249 | ptrdiff_t end_pos = coding->src_pos + coding->src_chars; |
| 7344 | int multibytep = coding->src_multibyte; | 7250 | bool multibytep = coding->src_multibyte; |
| 7345 | Lisp_Object eol_type; | 7251 | Lisp_Object eol_type; |
| 7346 | int c; | 7252 | int c; |
| 7347 | ptrdiff_t stop, stop_composition, stop_charset; | 7253 | ptrdiff_t stop, stop_composition, stop_charset; |
| @@ -7488,7 +7394,7 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 7488 | If CODING->dst_object is nil, the encoded data is placed at the | 7394 | If CODING->dst_object is nil, the encoded data is placed at the |
| 7489 | memory area specified by CODING->destination. */ | 7395 | memory area specified by CODING->destination. */ |
| 7490 | 7396 | ||
| 7491 | static int | 7397 | static void |
| 7492 | encode_coding (struct coding_system *coding) | 7398 | encode_coding (struct coding_system *coding) |
| 7493 | { | 7399 | { |
| 7494 | Lisp_Object attrs; | 7400 | Lisp_Object attrs; |
| @@ -7530,8 +7436,6 @@ encode_coding (struct coding_system *coding) | |||
| 7530 | 7436 | ||
| 7531 | if (BUFFERP (coding->dst_object) && coding->produced_char > 0) | 7437 | if (BUFFERP (coding->dst_object) && coding->produced_char > 0) |
| 7532 | insert_from_gap (coding->produced_char, coding->produced); | 7438 | insert_from_gap (coding->produced_char, coding->produced); |
| 7533 | |||
| 7534 | return (coding->result); | ||
| 7535 | } | 7439 | } |
| 7536 | 7440 | ||
| 7537 | 7441 | ||
| @@ -7545,26 +7449,27 @@ static Lisp_Object Vcode_conversion_workbuf_name; | |||
| 7545 | versions of Vcode_conversion_workbuf_name. */ | 7449 | versions of Vcode_conversion_workbuf_name. */ |
| 7546 | static Lisp_Object Vcode_conversion_reused_workbuf; | 7450 | static Lisp_Object Vcode_conversion_reused_workbuf; |
| 7547 | 7451 | ||
| 7548 | /* 1 iff Vcode_conversion_reused_workbuf is already in use. */ | 7452 | /* True iff Vcode_conversion_reused_workbuf is already in use. */ |
| 7549 | static int reused_workbuf_in_use; | 7453 | static bool reused_workbuf_in_use; |
| 7550 | 7454 | ||
| 7551 | 7455 | ||
| 7552 | /* Return a working buffer of code conversion. MULTIBYTE specifies the | 7456 | /* Return a working buffer of code conversion. MULTIBYTE specifies the |
| 7553 | multibyteness of returning buffer. */ | 7457 | multibyteness of returning buffer. */ |
| 7554 | 7458 | ||
| 7555 | static Lisp_Object | 7459 | static Lisp_Object |
| 7556 | make_conversion_work_buffer (int multibyte) | 7460 | make_conversion_work_buffer (bool multibyte) |
| 7557 | { | 7461 | { |
| 7558 | Lisp_Object name, workbuf; | 7462 | Lisp_Object name, workbuf; |
| 7559 | struct buffer *current; | 7463 | struct buffer *current; |
| 7560 | 7464 | ||
| 7561 | if (reused_workbuf_in_use++) | 7465 | if (reused_workbuf_in_use) |
| 7562 | { | 7466 | { |
| 7563 | name = Fgenerate_new_buffer_name (Vcode_conversion_workbuf_name, Qnil); | 7467 | name = Fgenerate_new_buffer_name (Vcode_conversion_workbuf_name, Qnil); |
| 7564 | workbuf = Fget_buffer_create (name); | 7468 | workbuf = Fget_buffer_create (name); |
| 7565 | } | 7469 | } |
| 7566 | else | 7470 | else |
| 7567 | { | 7471 | { |
| 7472 | reused_workbuf_in_use = 1; | ||
| 7568 | if (NILP (Fbuffer_live_p (Vcode_conversion_reused_workbuf))) | 7473 | if (NILP (Fbuffer_live_p (Vcode_conversion_reused_workbuf))) |
| 7569 | Vcode_conversion_reused_workbuf | 7474 | Vcode_conversion_reused_workbuf |
| 7570 | = Fget_buffer_create (Vcode_conversion_workbuf_name); | 7475 | = Fget_buffer_create (Vcode_conversion_workbuf_name); |
| @@ -7606,7 +7511,7 @@ code_conversion_restore (Lisp_Object arg) | |||
| 7606 | } | 7511 | } |
| 7607 | 7512 | ||
| 7608 | Lisp_Object | 7513 | Lisp_Object |
| 7609 | code_conversion_save (int with_work_buf, int multibyte) | 7514 | code_conversion_save (bool with_work_buf, bool multibyte) |
| 7610 | { | 7515 | { |
| 7611 | Lisp_Object workbuf = Qnil; | 7516 | Lisp_Object workbuf = Qnil; |
| 7612 | 7517 | ||
| @@ -7617,7 +7522,7 @@ code_conversion_save (int with_work_buf, int multibyte) | |||
| 7617 | return workbuf; | 7522 | return workbuf; |
| 7618 | } | 7523 | } |
| 7619 | 7524 | ||
| 7620 | int | 7525 | void |
| 7621 | decode_coding_gap (struct coding_system *coding, | 7526 | decode_coding_gap (struct coding_system *coding, |
| 7622 | ptrdiff_t chars, ptrdiff_t bytes) | 7527 | ptrdiff_t chars, ptrdiff_t bytes) |
| 7623 | { | 7528 | { |
| @@ -7660,7 +7565,6 @@ decode_coding_gap (struct coding_system *coding, | |||
| 7660 | } | 7565 | } |
| 7661 | 7566 | ||
| 7662 | unbind_to (count, Qnil); | 7567 | unbind_to (count, Qnil); |
| 7663 | return coding->result; | ||
| 7664 | } | 7568 | } |
| 7665 | 7569 | ||
| 7666 | 7570 | ||
| @@ -7706,8 +7610,8 @@ decode_coding_object (struct coding_system *coding, | |||
| 7706 | ptrdiff_t chars = to - from; | 7610 | ptrdiff_t chars = to - from; |
| 7707 | ptrdiff_t bytes = to_byte - from_byte; | 7611 | ptrdiff_t bytes = to_byte - from_byte; |
| 7708 | Lisp_Object attrs; | 7612 | Lisp_Object attrs; |
| 7709 | int saved_pt = -1, saved_pt_byte IF_LINT (= 0); | 7613 | ptrdiff_t saved_pt = -1, saved_pt_byte IF_LINT (= 0); |
| 7710 | int need_marker_adjustment = 0; | 7614 | bool need_marker_adjustment = 0; |
| 7711 | Lisp_Object old_deactivate_mark; | 7615 | Lisp_Object old_deactivate_mark; |
| 7712 | 7616 | ||
| 7713 | old_deactivate_mark = Vdeactivate_mark; | 7617 | old_deactivate_mark = Vdeactivate_mark; |
| @@ -7894,9 +7798,9 @@ encode_coding_object (struct coding_system *coding, | |||
| 7894 | ptrdiff_t chars = to - from; | 7798 | ptrdiff_t chars = to - from; |
| 7895 | ptrdiff_t bytes = to_byte - from_byte; | 7799 | ptrdiff_t bytes = to_byte - from_byte; |
| 7896 | Lisp_Object attrs; | 7800 | Lisp_Object attrs; |
| 7897 | int saved_pt = -1, saved_pt_byte IF_LINT (= 0); | 7801 | ptrdiff_t saved_pt = -1, saved_pt_byte IF_LINT (= 0); |
| 7898 | int need_marker_adjustment = 0; | 7802 | bool need_marker_adjustment = 0; |
| 7899 | int kill_src_buffer = 0; | 7803 | bool kill_src_buffer = 0; |
| 7900 | Lisp_Object old_deactivate_mark; | 7804 | Lisp_Object old_deactivate_mark; |
| 7901 | 7805 | ||
| 7902 | old_deactivate_mark = Vdeactivate_mark; | 7806 | old_deactivate_mark = Vdeactivate_mark; |
| @@ -8172,10 +8076,10 @@ function `define-coding-system'. */) | |||
| 8172 | 8076 | ||
| 8173 | 8077 | ||
| 8174 | /* Detect how the bytes at SRC of length SRC_BYTES are encoded. If | 8078 | /* Detect how the bytes at SRC of length SRC_BYTES are encoded. If |
| 8175 | HIGHEST is nonzero, return the coding system of the highest | 8079 | HIGHEST, return the coding system of the highest |
| 8176 | priority among the detected coding systems. Otherwise return a | 8080 | priority among the detected coding systems. Otherwise return a |
| 8177 | list of detected coding systems sorted by their priorities. If | 8081 | list of detected coding systems sorted by their priorities. If |
| 8178 | MULTIBYTEP is nonzero, it is assumed that the bytes are in correct | 8082 | MULTIBYTEP, it is assumed that the bytes are in correct |
| 8179 | multibyte form but contains only ASCII and eight-bit chars. | 8083 | multibyte form but contains only ASCII and eight-bit chars. |
| 8180 | Otherwise, the bytes are raw bytes. | 8084 | Otherwise, the bytes are raw bytes. |
| 8181 | 8085 | ||
| @@ -8190,7 +8094,7 @@ function `define-coding-system'. */) | |||
| 8190 | Lisp_Object | 8094 | Lisp_Object |
| 8191 | detect_coding_system (const unsigned char *src, | 8095 | detect_coding_system (const unsigned char *src, |
| 8192 | ptrdiff_t src_chars, ptrdiff_t src_bytes, | 8096 | ptrdiff_t src_chars, ptrdiff_t src_bytes, |
| 8193 | int highest, int multibytep, | 8097 | bool highest, bool multibytep, |
| 8194 | Lisp_Object coding_system) | 8098 | Lisp_Object coding_system) |
| 8195 | { | 8099 | { |
| 8196 | const unsigned char *src_end = src + src_bytes; | 8100 | const unsigned char *src_end = src + src_bytes; |
| @@ -8200,7 +8104,7 @@ detect_coding_system (const unsigned char *src, | |||
| 8200 | ptrdiff_t id; | 8104 | ptrdiff_t id; |
| 8201 | struct coding_detection_info detect_info; | 8105 | struct coding_detection_info detect_info; |
| 8202 | enum coding_category base_category; | 8106 | enum coding_category base_category; |
| 8203 | int null_byte_found = 0, eight_bit_found = 0; | 8107 | bool null_byte_found = 0, eight_bit_found = 0; |
| 8204 | 8108 | ||
| 8205 | if (NILP (coding_system)) | 8109 | if (NILP (coding_system)) |
| 8206 | coding_system = Qundecided; | 8110 | coding_system = Qundecided; |
| @@ -8556,7 +8460,7 @@ highest priority. */) | |||
| 8556 | } | 8460 | } |
| 8557 | 8461 | ||
| 8558 | 8462 | ||
| 8559 | static inline int | 8463 | static inline bool |
| 8560 | char_encodable_p (int c, Lisp_Object attrs) | 8464 | char_encodable_p (int c, Lisp_Object attrs) |
| 8561 | { | 8465 | { |
| 8562 | Lisp_Object tail; | 8466 | Lisp_Object tail; |
| @@ -8728,7 +8632,7 @@ to the string. */) | |||
| 8728 | Lisp_Object positions; | 8632 | Lisp_Object positions; |
| 8729 | ptrdiff_t from, to; | 8633 | ptrdiff_t from, to; |
| 8730 | const unsigned char *p, *stop, *pend; | 8634 | const unsigned char *p, *stop, *pend; |
| 8731 | int ascii_compatible; | 8635 | bool ascii_compatible; |
| 8732 | 8636 | ||
| 8733 | setup_coding_system (Fcheck_coding_system (coding_system), &coding); | 8637 | setup_coding_system (Fcheck_coding_system (coding_system), &coding); |
| 8734 | attrs = CODING_ID_ATTRS (coding.id); | 8638 | attrs = CODING_ID_ATTRS (coding.id); |
| @@ -8952,7 +8856,7 @@ is nil. */) | |||
| 8952 | static Lisp_Object | 8856 | static Lisp_Object |
| 8953 | code_convert_region (Lisp_Object start, Lisp_Object end, | 8857 | code_convert_region (Lisp_Object start, Lisp_Object end, |
| 8954 | Lisp_Object coding_system, Lisp_Object dst_object, | 8858 | Lisp_Object coding_system, Lisp_Object dst_object, |
| 8955 | int encodep, int norecord) | 8859 | bool encodep, bool norecord) |
| 8956 | { | 8860 | { |
| 8957 | struct coding_system coding; | 8861 | struct coding_system coding; |
| 8958 | ptrdiff_t from, from_byte, to, to_byte; | 8862 | ptrdiff_t from, from_byte, to, to_byte; |
| @@ -9040,7 +8944,8 @@ not fully specified.) */) | |||
| 9040 | 8944 | ||
| 9041 | Lisp_Object | 8945 | Lisp_Object |
| 9042 | code_convert_string (Lisp_Object string, Lisp_Object coding_system, | 8946 | code_convert_string (Lisp_Object string, Lisp_Object coding_system, |
| 9043 | Lisp_Object dst_object, int encodep, int nocopy, int norecord) | 8947 | Lisp_Object dst_object, bool encodep, bool nocopy, |
| 8948 | bool norecord) | ||
| 9044 | { | 8949 | { |
| 9045 | struct coding_system coding; | 8950 | struct coding_system coding; |
| 9046 | ptrdiff_t chars, bytes; | 8951 | ptrdiff_t chars, bytes; |
| @@ -9088,7 +8993,7 @@ code_convert_string (Lisp_Object string, Lisp_Object coding_system, | |||
| 9088 | 8993 | ||
| 9089 | Lisp_Object | 8994 | Lisp_Object |
| 9090 | code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system, | 8995 | code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system, |
| 9091 | int encodep) | 8996 | bool encodep) |
| 9092 | { | 8997 | { |
| 9093 | return code_convert_string (string, coding_system, Qt, encodep, 0, 1); | 8998 | return code_convert_string (string, coding_system, Qt, encodep, 0, 1); |
| 9094 | } | 8999 | } |
| @@ -9489,7 +9394,7 @@ usage: (set-coding-system-priority &rest coding-systems) */) | |||
| 9489 | (ptrdiff_t nargs, Lisp_Object *args) | 9394 | (ptrdiff_t nargs, Lisp_Object *args) |
| 9490 | { | 9395 | { |
| 9491 | ptrdiff_t i, j; | 9396 | ptrdiff_t i, j; |
| 9492 | int changed[coding_category_max]; | 9397 | bool changed[coding_category_max]; |
| 9493 | enum coding_category priorities[coding_category_max]; | 9398 | enum coding_category priorities[coding_category_max]; |
| 9494 | 9399 | ||
| 9495 | memset (changed, 0, sizeof changed); | 9400 | memset (changed, 0, sizeof changed); |
diff --git a/src/coding.h b/src/coding.h index 2987f19607b..c45d2ef86e2 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -321,7 +321,7 @@ struct composition_status | |||
| 321 | { | 321 | { |
| 322 | enum composition_state state; | 322 | enum composition_state state; |
| 323 | enum composition_method method; | 323 | enum composition_method method; |
| 324 | int old_form; /* 0:pre-21 form, 1:post-21 form */ | 324 | bool old_form; /* true if pre-21 form */ |
| 325 | int length; /* number of elements produced in charbuf */ | 325 | int length; /* number of elements produced in charbuf */ |
| 326 | int nchars; /* number of characters composed */ | 326 | int nchars; /* number of characters composed */ |
| 327 | int ncomps; /* number of composition components */ | 327 | int ncomps; /* number of composition components */ |
| @@ -350,18 +350,18 @@ struct iso_2022_spec | |||
| 350 | there was an invalid designation previously. */ | 350 | there was an invalid designation previously. */ |
| 351 | int current_designation[4]; | 351 | int current_designation[4]; |
| 352 | 352 | ||
| 353 | /* Set to 1 temporarily only when graphic register 2 or 3 is invoked | ||
| 354 | by single-shift while encoding. */ | ||
| 355 | int single_shifting; | ||
| 356 | |||
| 357 | /* Set to 1 temporarily only when processing at beginning of line. */ | ||
| 358 | int bol; | ||
| 359 | |||
| 360 | /* If positive, we are now scanning CTEXT extended segment. */ | 353 | /* If positive, we are now scanning CTEXT extended segment. */ |
| 361 | int ctext_extended_segment_len; | 354 | int ctext_extended_segment_len; |
| 362 | 355 | ||
| 363 | /* If nonzero, we are now scanning embedded UTF-8 sequence. */ | 356 | /* True temporarily only when graphic register 2 or 3 is invoked by |
| 364 | int embedded_utf_8; | 357 | single-shift while encoding. */ |
| 358 | unsigned single_shifting : 1; | ||
| 359 | |||
| 360 | /* True temporarily only when processing at beginning of line. */ | ||
| 361 | unsigned bol : 1; | ||
| 362 | |||
| 363 | /* If true, we are now scanning embedded UTF-8 sequence. */ | ||
| 364 | unsigned embedded_utf_8 : 1; | ||
| 365 | 365 | ||
| 366 | /* The current composition. */ | 366 | /* The current composition. */ |
| 367 | struct composition_status cmp_status; | 367 | struct composition_status cmp_status; |
| @@ -369,7 +369,6 @@ struct iso_2022_spec | |||
| 369 | 369 | ||
| 370 | struct emacs_mule_spec | 370 | struct emacs_mule_spec |
| 371 | { | 371 | { |
| 372 | int full_support; | ||
| 373 | struct composition_status cmp_status; | 372 | struct composition_status cmp_status; |
| 374 | }; | 373 | }; |
| 375 | 374 | ||
| @@ -470,10 +469,6 @@ struct coding_system | |||
| 470 | Lisp_Object dst_object; | 469 | Lisp_Object dst_object; |
| 471 | unsigned char *destination; | 470 | unsigned char *destination; |
| 472 | 471 | ||
| 473 | /* Set to 1 if the source of conversion is not in the member | ||
| 474 | `charbuf', but at `src_object'. */ | ||
| 475 | int chars_at_source; | ||
| 476 | |||
| 477 | /* If an element is non-negative, it is a character code. | 472 | /* If an element is non-negative, it is a character code. |
| 478 | 473 | ||
| 479 | If it is in the range -128..-1, it is a 8-bit character code | 474 | If it is in the range -128..-1, it is a 8-bit character code |
| @@ -489,18 +484,21 @@ struct coding_system | |||
| 489 | int *charbuf; | 484 | int *charbuf; |
| 490 | int charbuf_size, charbuf_used; | 485 | int charbuf_size, charbuf_used; |
| 491 | 486 | ||
| 487 | /* True if the source of conversion is not in the member | ||
| 488 | `charbuf', but at `src_object'. */ | ||
| 489 | unsigned chars_at_source : 1; | ||
| 490 | |||
| 492 | /* Set to 1 if charbuf contains an annotation. */ | 491 | /* Set to 1 if charbuf contains an annotation. */ |
| 493 | int annotated; | 492 | unsigned annotated : 1; |
| 494 | 493 | ||
| 495 | unsigned char carryover[64]; | 494 | unsigned char carryover[64]; |
| 496 | int carryover_bytes; | 495 | int carryover_bytes; |
| 497 | 496 | ||
| 498 | int default_char; | 497 | int default_char; |
| 499 | 498 | ||
| 500 | int (*detector) (struct coding_system *, | 499 | bool (*detector) (struct coding_system *, struct coding_detection_info *); |
| 501 | struct coding_detection_info *); | ||
| 502 | void (*decoder) (struct coding_system *); | 500 | void (*decoder) (struct coding_system *); |
| 503 | int (*encoder) (struct coding_system *); | 501 | bool (*encoder) (struct coding_system *); |
| 504 | }; | 502 | }; |
| 505 | 503 | ||
| 506 | /* Meanings of bits in the member `common_flags' of the structure | 504 | /* Meanings of bits in the member `common_flags' of the structure |
| @@ -688,22 +686,20 @@ struct coding_system | |||
| 688 | #define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1) | 686 | #define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1) |
| 689 | 687 | ||
| 690 | /* Extern declarations. */ | 688 | /* Extern declarations. */ |
| 691 | extern Lisp_Object code_conversion_save (int, int); | 689 | extern Lisp_Object code_conversion_save (bool, bool); |
| 692 | extern int decoding_buffer_size (struct coding_system *, int); | ||
| 693 | extern int encoding_buffer_size (struct coding_system *, int); | ||
| 694 | extern void setup_coding_system (Lisp_Object, struct coding_system *); | 690 | extern void setup_coding_system (Lisp_Object, struct coding_system *); |
| 695 | extern Lisp_Object coding_charset_list (struct coding_system *); | 691 | extern Lisp_Object coding_charset_list (struct coding_system *); |
| 696 | extern Lisp_Object coding_system_charset_list (Lisp_Object); | 692 | extern Lisp_Object coding_system_charset_list (Lisp_Object); |
| 697 | extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, | 693 | extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, |
| 698 | Lisp_Object, int, int, int); | 694 | Lisp_Object, bool, bool, bool); |
| 699 | extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, | 695 | extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, |
| 700 | int); | 696 | bool); |
| 701 | extern Lisp_Object raw_text_coding_system (Lisp_Object); | 697 | extern Lisp_Object raw_text_coding_system (Lisp_Object); |
| 702 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); | 698 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); |
| 703 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); | 699 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); |
| 704 | 700 | ||
| 705 | extern int decode_coding_gap (struct coding_system *, | 701 | extern void decode_coding_gap (struct coding_system *, |
| 706 | ptrdiff_t, ptrdiff_t); | 702 | ptrdiff_t, ptrdiff_t); |
| 707 | extern void decode_coding_object (struct coding_system *, | 703 | extern void decode_coding_object (struct coding_system *, |
| 708 | Lisp_Object, ptrdiff_t, ptrdiff_t, | 704 | Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 709 | ptrdiff_t, ptrdiff_t, Lisp_Object); | 705 | ptrdiff_t, ptrdiff_t, Lisp_Object); |
| @@ -778,6 +774,5 @@ extern struct coding_system safe_terminal_coding; | |||
| 778 | extern Lisp_Object Qcoding_system_error; | 774 | extern Lisp_Object Qcoding_system_error; |
| 779 | 775 | ||
| 780 | extern char emacs_mule_bytes[256]; | 776 | extern char emacs_mule_bytes[256]; |
| 781 | extern int emacs_mule_string_char (unsigned char *); | ||
| 782 | 777 | ||
| 783 | #endif /* EMACS_CODING_H */ | 778 | #endif /* EMACS_CODING_H */ |
diff --git a/src/composite.c b/src/composite.c index 4e90e9bb914..eddabb66d33 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -428,7 +428,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 428 | 428 | ||
| 429 | This doesn't check the validity of composition. */ | 429 | This doesn't check the validity of composition. */ |
| 430 | 430 | ||
| 431 | int | 431 | bool |
| 432 | find_composition (ptrdiff_t pos, ptrdiff_t limit, | 432 | find_composition (ptrdiff_t pos, ptrdiff_t limit, |
| 433 | ptrdiff_t *start, ptrdiff_t *end, | 433 | ptrdiff_t *start, ptrdiff_t *end, |
| 434 | Lisp_Object *prop, Lisp_Object object) | 434 | Lisp_Object *prop, Lisp_Object object) |
| @@ -709,7 +709,7 @@ static Lisp_Object fill_gstring_header (Lisp_Object, Lisp_Object, | |||
| 709 | Lisp_Object, Lisp_Object, | 709 | Lisp_Object, Lisp_Object, |
| 710 | Lisp_Object); | 710 | Lisp_Object); |
| 711 | 711 | ||
| 712 | int | 712 | bool |
| 713 | composition_gstring_p (Lisp_Object gstring) | 713 | composition_gstring_p (Lisp_Object gstring) |
| 714 | { | 714 | { |
| 715 | Lisp_Object header; | 715 | Lisp_Object header; |
| @@ -1212,11 +1212,13 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos, | |||
| 1212 | string. In that case, FACE must not be NULL. | 1212 | string. In that case, FACE must not be NULL. |
| 1213 | 1213 | ||
| 1214 | If the character is composed, setup members of CMP_IT (id, nglyphs, | 1214 | If the character is composed, setup members of CMP_IT (id, nglyphs, |
| 1215 | from, to, reversed_p), and return 1. Otherwise, update | 1215 | from, to, reversed_p), and return true. Otherwise, update |
| 1216 | CMP_IT->stop_pos, and return 0. */ | 1216 | CMP_IT->stop_pos, and return false. */ |
| 1217 | 1217 | ||
| 1218 | int | 1218 | bool |
| 1219 | composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t endpos, struct window *w, struct face *face, Lisp_Object string) | 1219 | composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos, |
| 1220 | ptrdiff_t bytepos, ptrdiff_t endpos, struct window *w, | ||
| 1221 | struct face *face, Lisp_Object string) | ||
| 1220 | { | 1222 | { |
| 1221 | if (endpos < 0) | 1223 | if (endpos < 0) |
| 1222 | endpos = NILP (string) ? BEGV : 0; | 1224 | endpos = NILP (string) ? BEGV : 0; |
| @@ -1482,10 +1484,10 @@ struct position_record | |||
| 1482 | /* This is like find_composition, but find an automatic composition | 1484 | /* This is like find_composition, but find an automatic composition |
| 1483 | instead. It is assured that POS is not within a static | 1485 | instead. It is assured that POS is not within a static |
| 1484 | composition. If found, set *GSTRING to the glyph-string | 1486 | composition. If found, set *GSTRING to the glyph-string |
| 1485 | representing the composition, and return 1. Otherwise, *GSTRING to | 1487 | representing the composition, and return true. Otherwise, *GSTRING to |
| 1486 | Qnil, and return 0. */ | 1488 | Qnil, and return false. */ |
| 1487 | 1489 | ||
| 1488 | static int | 1490 | static bool |
| 1489 | find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit, | 1491 | find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit, |
| 1490 | ptrdiff_t *start, ptrdiff_t *end, | 1492 | ptrdiff_t *start, ptrdiff_t *end, |
| 1491 | Lisp_Object *gstring, Lisp_Object string) | 1493 | Lisp_Object *gstring, Lisp_Object string) |
| @@ -1498,7 +1500,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit, | |||
| 1498 | int c; | 1500 | int c; |
| 1499 | Lisp_Object window; | 1501 | Lisp_Object window; |
| 1500 | struct window *w; | 1502 | struct window *w; |
| 1501 | int need_adjustment = 0; | 1503 | bool need_adjustment = 0; |
| 1502 | 1504 | ||
| 1503 | window = Fget_buffer_window (Fcurrent_buffer (), Qnil); | 1505 | window = Fget_buffer_window (Fcurrent_buffer (), Qnil); |
| 1504 | if (NILP (window)) | 1506 | if (NILP (window)) |
diff --git a/src/composite.h b/src/composite.h index 6a7e0a5e2c7..68f5b27ee42 100644 --- a/src/composite.h +++ b/src/composite.h | |||
| @@ -223,8 +223,8 @@ extern Lisp_Object Qcomposition; | |||
| 223 | extern Lisp_Object composition_hash_table; | 223 | extern Lisp_Object composition_hash_table; |
| 224 | extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t, | 224 | extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 225 | Lisp_Object, Lisp_Object); | 225 | Lisp_Object, Lisp_Object); |
| 226 | extern int find_composition (ptrdiff_t, ptrdiff_t, ptrdiff_t *, ptrdiff_t *, | 226 | extern bool find_composition (ptrdiff_t, ptrdiff_t, ptrdiff_t *, ptrdiff_t *, |
| 227 | Lisp_Object *, Lisp_Object); | 227 | Lisp_Object *, Lisp_Object); |
| 228 | extern void update_compositions (ptrdiff_t, ptrdiff_t, int); | 228 | extern void update_compositions (ptrdiff_t, ptrdiff_t, int); |
| 229 | extern void make_composition_value_copy (Lisp_Object); | 229 | extern void make_composition_value_copy (Lisp_Object); |
| 230 | extern void compose_region (int, int, Lisp_Object, Lisp_Object, | 230 | extern void compose_region (int, int, Lisp_Object, Lisp_Object, |
| @@ -310,17 +310,16 @@ struct font_metrics; | |||
| 310 | 310 | ||
| 311 | extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t); | 311 | extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t); |
| 312 | extern Lisp_Object composition_gstring_from_id (ptrdiff_t); | 312 | extern Lisp_Object composition_gstring_from_id (ptrdiff_t); |
| 313 | extern int composition_gstring_p (Lisp_Object); | 313 | extern bool composition_gstring_p (Lisp_Object); |
| 314 | extern int composition_gstring_width (Lisp_Object, ptrdiff_t, ptrdiff_t, | 314 | extern int composition_gstring_width (Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 315 | struct font_metrics *); | 315 | struct font_metrics *); |
| 316 | 316 | ||
| 317 | extern void composition_compute_stop_pos (struct composition_it *, | 317 | extern void composition_compute_stop_pos (struct composition_it *, |
| 318 | ptrdiff_t, ptrdiff_t, ptrdiff_t, | 318 | ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 319 | Lisp_Object); | 319 | Lisp_Object); |
| 320 | extern int composition_reseat_it (struct composition_it *, | 320 | extern bool composition_reseat_it (struct composition_it *, ptrdiff_t, |
| 321 | ptrdiff_t, ptrdiff_t, ptrdiff_t, | 321 | ptrdiff_t, ptrdiff_t, struct window *, |
| 322 | struct window *, struct face *, | 322 | struct face *, Lisp_Object); |
| 323 | Lisp_Object); | ||
| 324 | extern int composition_update_it (struct composition_it *, | 323 | extern int composition_update_it (struct composition_it *, |
| 325 | ptrdiff_t, ptrdiff_t, Lisp_Object); | 324 | ptrdiff_t, ptrdiff_t, Lisp_Object); |
| 326 | 325 | ||
diff --git a/src/conf_post.h b/src/conf_post.h index ead7298e98d..f90ef90fb83 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -178,6 +178,9 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 178 | #endif | 178 | #endif |
| 179 | 179 | ||
| 180 | #include <string.h> | 180 | #include <string.h> |
| 181 | /* If you think about removing the line below, note that the | ||
| 182 | MS-Windows build relies on it for declaration of 'environ' needed | ||
| 183 | by a few source files. */ | ||
| 181 | #include <stdlib.h> | 184 | #include <stdlib.h> |
| 182 | 185 | ||
| 183 | #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ | 186 | #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ |
diff --git a/src/data.c b/src/data.c index ac6c7af9d3c..a93cd169bf5 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -83,8 +83,8 @@ Lisp_Object Qoverflow_error, Qunderflow_error; | |||
| 83 | Lisp_Object Qfloatp; | 83 | Lisp_Object Qfloatp; |
| 84 | Lisp_Object Qnumberp, Qnumber_or_marker_p; | 84 | Lisp_Object Qnumberp, Qnumber_or_marker_p; |
| 85 | 85 | ||
| 86 | Lisp_Object Qinteger, Qinterval, Qfloat, Qvector; | 86 | Lisp_Object Qinteger, Qsymbol; |
| 87 | Lisp_Object Qsymbol, Qstring, Qcons, Qmisc; | 87 | static Lisp_Object Qcons, Qfloat, Qmisc, Qstring, Qvector; |
| 88 | Lisp_Object Qwindow; | 88 | Lisp_Object Qwindow; |
| 89 | static Lisp_Object Qoverlay, Qwindow_configuration; | 89 | static Lisp_Object Qoverlay, Qwindow_configuration; |
| 90 | static Lisp_Object Qprocess, Qmarker; | 90 | static Lisp_Object Qprocess, Qmarker; |
| @@ -1117,10 +1117,10 @@ DEFUN ("set", Fset, Sset, 2, 2, 0, | |||
| 1117 | return newval; | 1117 | return newval; |
| 1118 | } | 1118 | } |
| 1119 | 1119 | ||
| 1120 | /* Return 1 if SYMBOL currently has a let-binding | 1120 | /* Return true if SYMBOL currently has a let-binding |
| 1121 | which was made in the buffer that is now current. */ | 1121 | which was made in the buffer that is now current. */ |
| 1122 | 1122 | ||
| 1123 | static int | 1123 | static bool |
| 1124 | let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | 1124 | let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) |
| 1125 | { | 1125 | { |
| 1126 | struct specbinding *p; | 1126 | struct specbinding *p; |
| @@ -1139,7 +1139,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | |||
| 1139 | return 0; | 1139 | return 0; |
| 1140 | } | 1140 | } |
| 1141 | 1141 | ||
| 1142 | static int | 1142 | static bool |
| 1143 | let_shadows_global_binding_p (Lisp_Object symbol) | 1143 | let_shadows_global_binding_p (Lisp_Object symbol) |
| 1144 | { | 1144 | { |
| 1145 | struct specbinding *p; | 1145 | struct specbinding *p; |
| @@ -1155,14 +1155,15 @@ let_shadows_global_binding_p (Lisp_Object symbol) | |||
| 1155 | If buffer/frame-locality is an issue, WHERE specifies which context to use. | 1155 | If buffer/frame-locality is an issue, WHERE specifies which context to use. |
| 1156 | (nil stands for the current buffer/frame). | 1156 | (nil stands for the current buffer/frame). |
| 1157 | 1157 | ||
| 1158 | If BINDFLAG is zero, then if this symbol is supposed to become | 1158 | If BINDFLAG is false, then if this symbol is supposed to become |
| 1159 | local in every buffer where it is set, then we make it local. | 1159 | local in every buffer where it is set, then we make it local. |
| 1160 | If BINDFLAG is nonzero, we don't do that. */ | 1160 | If BINDFLAG is true, we don't do that. */ |
| 1161 | 1161 | ||
| 1162 | void | 1162 | void |
| 1163 | set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag) | 1163 | set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, |
| 1164 | bool bindflag) | ||
| 1164 | { | 1165 | { |
| 1165 | int voide = EQ (newval, Qunbound); | 1166 | bool voide = EQ (newval, Qunbound); |
| 1166 | struct Lisp_Symbol *sym; | 1167 | struct Lisp_Symbol *sym; |
| 1167 | Lisp_Object tem1; | 1168 | Lisp_Object tem1; |
| 1168 | 1169 | ||
| @@ -1501,7 +1502,8 @@ union Lisp_Val_Fwd | |||
| 1501 | }; | 1502 | }; |
| 1502 | 1503 | ||
| 1503 | static struct Lisp_Buffer_Local_Value * | 1504 | static struct Lisp_Buffer_Local_Value * |
| 1504 | make_blv (struct Lisp_Symbol *sym, int forwarded, union Lisp_Val_Fwd valcontents) | 1505 | make_blv (struct Lisp_Symbol *sym, bool forwarded, |
| 1506 | union Lisp_Val_Fwd valcontents) | ||
| 1505 | { | 1507 | { |
| 1506 | struct Lisp_Buffer_Local_Value *blv = xmalloc (sizeof *blv); | 1508 | struct Lisp_Buffer_Local_Value *blv = xmalloc (sizeof *blv); |
| 1507 | Lisp_Object symbol; | 1509 | Lisp_Object symbol; |
| @@ -1545,7 +1547,7 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1545 | struct Lisp_Symbol *sym; | 1547 | struct Lisp_Symbol *sym; |
| 1546 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1548 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| 1547 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); | 1549 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); |
| 1548 | int forwarded IF_LINT (= 0); | 1550 | bool forwarded IF_LINT (= 0); |
| 1549 | 1551 | ||
| 1550 | CHECK_SYMBOL (variable); | 1552 | CHECK_SYMBOL (variable); |
| 1551 | sym = XSYMBOL (variable); | 1553 | sym = XSYMBOL (variable); |
| @@ -1617,10 +1619,10 @@ See also `make-variable-buffer-local'. | |||
| 1617 | 1619 | ||
| 1618 | Do not use `make-local-variable' to make a hook variable buffer-local. | 1620 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 1619 | Instead, use `add-hook' and specify t for the LOCAL argument. */) | 1621 | Instead, use `add-hook' and specify t for the LOCAL argument. */) |
| 1620 | (register Lisp_Object variable) | 1622 | (Lisp_Object variable) |
| 1621 | { | 1623 | { |
| 1622 | register Lisp_Object tem; | 1624 | Lisp_Object tem; |
| 1623 | int forwarded IF_LINT (= 0); | 1625 | bool forwarded IF_LINT (= 0); |
| 1624 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); | 1626 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); |
| 1625 | struct Lisp_Symbol *sym; | 1627 | struct Lisp_Symbol *sym; |
| 1626 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1628 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| @@ -1804,9 +1806,9 @@ is to set the VARIABLE frame parameter of that frame. See | |||
| 1804 | Note that since Emacs 23.1, variables cannot be both buffer-local and | 1806 | Note that since Emacs 23.1, variables cannot be both buffer-local and |
| 1805 | frame-local any more (buffer-local bindings used to take precedence over | 1807 | frame-local any more (buffer-local bindings used to take precedence over |
| 1806 | frame-local bindings). */) | 1808 | frame-local bindings). */) |
| 1807 | (register Lisp_Object variable) | 1809 | (Lisp_Object variable) |
| 1808 | { | 1810 | { |
| 1809 | int forwarded; | 1811 | bool forwarded; |
| 1810 | union Lisp_Val_Fwd valcontents; | 1812 | union Lisp_Val_Fwd valcontents; |
| 1811 | struct Lisp_Symbol *sym; | 1813 | struct Lisp_Symbol *sym; |
| 1812 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1814 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| @@ -2262,7 +2264,7 @@ static Lisp_Object | |||
| 2262 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | 2264 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) |
| 2263 | { | 2265 | { |
| 2264 | double f1 = 0, f2 = 0; | 2266 | double f1 = 0, f2 = 0; |
| 2265 | int floatp = 0; | 2267 | bool floatp = 0; |
| 2266 | 2268 | ||
| 2267 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1); | 2269 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1); |
| 2268 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); | 2270 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); |
| @@ -2379,7 +2381,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | |||
| 2379 | uintmax_t | 2381 | uintmax_t |
| 2380 | cons_to_unsigned (Lisp_Object c, uintmax_t max) | 2382 | cons_to_unsigned (Lisp_Object c, uintmax_t max) |
| 2381 | { | 2383 | { |
| 2382 | int valid = 0; | 2384 | bool valid = 0; |
| 2383 | uintmax_t val IF_LINT (= 0); | 2385 | uintmax_t val IF_LINT (= 0); |
| 2384 | if (INTEGERP (c)) | 2386 | if (INTEGERP (c)) |
| 2385 | { | 2387 | { |
| @@ -2432,7 +2434,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max) | |||
| 2432 | intmax_t | 2434 | intmax_t |
| 2433 | cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) | 2435 | cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) |
| 2434 | { | 2436 | { |
| 2435 | int valid = 0; | 2437 | bool valid = 0; |
| 2436 | intmax_t val IF_LINT (= 0); | 2438 | intmax_t val IF_LINT (= 0); |
| 2437 | if (INTEGERP (c)) | 2439 | if (INTEGERP (c)) |
| 2438 | { | 2440 | { |
| @@ -2550,14 +2552,11 @@ static Lisp_Object float_arith_driver (double, ptrdiff_t, enum arithop, | |||
| 2550 | static Lisp_Object | 2552 | static Lisp_Object |
| 2551 | arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) | 2553 | arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) |
| 2552 | { | 2554 | { |
| 2553 | register Lisp_Object val; | 2555 | Lisp_Object val; |
| 2554 | ptrdiff_t argnum; | 2556 | ptrdiff_t argnum, ok_args; |
| 2555 | register EMACS_INT accum = 0; | 2557 | EMACS_INT accum = 0; |
| 2556 | register EMACS_INT next; | 2558 | EMACS_INT next, ok_accum; |
| 2557 | 2559 | bool overflow = 0; | |
| 2558 | int overflow = 0; | ||
| 2559 | ptrdiff_t ok_args; | ||
| 2560 | EMACS_INT ok_accum; | ||
| 2561 | 2560 | ||
| 2562 | switch (code) | 2561 | switch (code) |
| 2563 | { | 2562 | { |
| @@ -3130,8 +3129,6 @@ syms_of_data (void) | |||
| 3130 | DEFSYM (Qthread, "thread"); | 3129 | DEFSYM (Qthread, "thread"); |
| 3131 | DEFSYM (Qmutex, "mutex"); | 3130 | DEFSYM (Qmutex, "mutex"); |
| 3132 | DEFSYM (Qcondition_variable, "condition-variable"); | 3131 | DEFSYM (Qcondition_variable, "condition-variable"); |
| 3133 | /* Used by Fgarbage_collect. */ | ||
| 3134 | DEFSYM (Qinterval, "interval"); | ||
| 3135 | DEFSYM (Qmisc, "misc"); | 3132 | DEFSYM (Qmisc, "misc"); |
| 3136 | 3133 | ||
| 3137 | DEFSYM (Qdefun, "defun"); | 3134 | DEFSYM (Qdefun, "defun"); |
diff --git a/src/dbusbind.c b/src/dbusbind.c index c1b1310454c..901820648cb 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -70,7 +70,7 @@ static Lisp_Object QCdbus_registered_signal; | |||
| 70 | static Lisp_Object xd_registered_buses; | 70 | static Lisp_Object xd_registered_buses; |
| 71 | 71 | ||
| 72 | /* Whether we are reading a D-Bus event. */ | 72 | /* Whether we are reading a D-Bus event. */ |
| 73 | static int xd_in_read_queued_messages = 0; | 73 | static bool xd_in_read_queued_messages = 0; |
| 74 | 74 | ||
| 75 | 75 | ||
| 76 | /* We use "xd_" and "XD_" as prefix for all internal symbols, because | 76 | /* We use "xd_" and "XD_" as prefix for all internal symbols, because |
| @@ -997,8 +997,7 @@ xd_find_watch_fd (DBusWatch *watch) | |||
| 997 | } | 997 | } |
| 998 | 998 | ||
| 999 | /* Prototype. */ | 999 | /* Prototype. */ |
| 1000 | static void | 1000 | static void xd_read_queued_messages (int fd, void *data); |
| 1001 | xd_read_queued_messages (int fd, void *data, int for_read); | ||
| 1002 | 1001 | ||
| 1003 | /* Start monitoring WATCH for possible I/O. */ | 1002 | /* Start monitoring WATCH for possible I/O. */ |
| 1004 | static dbus_bool_t | 1003 | static dbus_bool_t |
| @@ -1039,11 +1038,13 @@ xd_remove_watch (DBusWatch *watch, void *data) | |||
| 1039 | return; | 1038 | return; |
| 1040 | 1039 | ||
| 1041 | /* Unset session environment. */ | 1040 | /* Unset session environment. */ |
| 1041 | #if 0 | ||
| 1042 | if (XSYMBOL (QCdbus_session_bus) == data) | 1042 | if (XSYMBOL (QCdbus_session_bus) == data) |
| 1043 | { | 1043 | { |
| 1044 | // XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); | 1044 | XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); |
| 1045 | // unsetenv ("DBUS_SESSION_BUS_ADDRESS"); | 1045 | unsetenv ("DBUS_SESSION_BUS_ADDRESS"); |
| 1046 | } | 1046 | } |
| 1047 | #endif | ||
| 1047 | 1048 | ||
| 1048 | if (flags & DBUS_WATCH_WRITABLE) | 1049 | if (flags & DBUS_WATCH_WRITABLE) |
| 1049 | delete_write_fd (fd); | 1050 | delete_write_fd (fd); |
| @@ -1684,7 +1685,7 @@ xd_read_message (Lisp_Object bus) | |||
| 1684 | 1685 | ||
| 1685 | /* Callback called when something is ready to read or write. */ | 1686 | /* Callback called when something is ready to read or write. */ |
| 1686 | static void | 1687 | static void |
| 1687 | xd_read_queued_messages (int fd, void *data, int for_read) | 1688 | xd_read_queued_messages (int fd, void *data) |
| 1688 | { | 1689 | { |
| 1689 | Lisp_Object busp = xd_registered_buses; | 1690 | Lisp_Object busp = xd_registered_buses; |
| 1690 | Lisp_Object bus = Qnil; | 1691 | Lisp_Object bus = Qnil; |
diff --git a/src/dired.c b/src/dired.c index 771230717e3..fa293258107 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -109,18 +109,20 @@ directory_files_internal_unwind (Lisp_Object dh) | |||
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | /* Function shared by Fdirectory_files and Fdirectory_files_and_attributes. | 111 | /* Function shared by Fdirectory_files and Fdirectory_files_and_attributes. |
| 112 | When ATTRS is zero, return a list of directory filenames; when | 112 | If not ATTRS, return a list of directory filenames; |
| 113 | non-zero, return a list of directory filenames and their attributes. | 113 | if ATTRS, return a list of directory filenames and their attributes. |
| 114 | In the latter case, ID_FORMAT is passed to Ffile_attributes. */ | 114 | In the latter case, ID_FORMAT is passed to Ffile_attributes. */ |
| 115 | 115 | ||
| 116 | Lisp_Object | 116 | Lisp_Object |
| 117 | directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object match, Lisp_Object nosort, int attrs, Lisp_Object id_format) | 117 | directory_files_internal (Lisp_Object directory, Lisp_Object full, |
| 118 | Lisp_Object match, Lisp_Object nosort, bool attrs, | ||
| 119 | Lisp_Object id_format) | ||
| 118 | { | 120 | { |
| 119 | DIR *d; | 121 | DIR *d; |
| 120 | ptrdiff_t directory_nbytes; | 122 | ptrdiff_t directory_nbytes; |
| 121 | Lisp_Object list, dirfilename, encoded_directory; | 123 | Lisp_Object list, dirfilename, encoded_directory; |
| 122 | struct re_pattern_buffer *bufp = NULL; | 124 | struct re_pattern_buffer *bufp = NULL; |
| 123 | int needsep = 0; | 125 | bool needsep = 0; |
| 124 | ptrdiff_t count = SPECPDL_INDEX (); | 126 | ptrdiff_t count = SPECPDL_INDEX (); |
| 125 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 127 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 126 | DIRENTRY *dp; | 128 | DIRENTRY *dp; |
| @@ -227,7 +229,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m | |||
| 227 | if (DIRENTRY_NONEMPTY (dp)) | 229 | if (DIRENTRY_NONEMPTY (dp)) |
| 228 | { | 230 | { |
| 229 | ptrdiff_t len; | 231 | ptrdiff_t len; |
| 230 | int wanted = 0; | 232 | bool wanted = 0; |
| 231 | Lisp_Object name, finalname; | 233 | Lisp_Object name, finalname; |
| 232 | struct gcpro gcpro1, gcpro2; | 234 | struct gcpro gcpro1, gcpro2; |
| 233 | 235 | ||
| @@ -381,9 +383,8 @@ which see. */) | |||
| 381 | } | 383 | } |
| 382 | 384 | ||
| 383 | 385 | ||
| 384 | static Lisp_Object file_name_completion | 386 | static Lisp_Object file_name_completion (Lisp_Object, Lisp_Object, bool, |
| 385 | (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, | 387 | Lisp_Object); |
| 386 | Lisp_Object predicate); | ||
| 387 | 388 | ||
| 388 | DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, | 389 | DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, |
| 389 | 2, 3, 0, | 390 | 2, 3, 0, |
| @@ -415,7 +416,7 @@ determined by the variable `completion-ignored-extensions', which see. */) | |||
| 415 | if (!NILP (handler)) | 416 | if (!NILP (handler)) |
| 416 | return call4 (handler, Qfile_name_completion, file, directory, predicate); | 417 | return call4 (handler, Qfile_name_completion, file, directory, predicate); |
| 417 | 418 | ||
| 418 | return file_name_completion (file, directory, 0, 0, predicate); | 419 | return file_name_completion (file, directory, 0, predicate); |
| 419 | } | 420 | } |
| 420 | 421 | ||
| 421 | DEFUN ("file-name-all-completions", Ffile_name_all_completions, | 422 | DEFUN ("file-name-all-completions", Ffile_name_all_completions, |
| @@ -439,14 +440,15 @@ These are all file names in directory DIRECTORY which begin with FILE. */) | |||
| 439 | if (!NILP (handler)) | 440 | if (!NILP (handler)) |
| 440 | return call3 (handler, Qfile_name_all_completions, file, directory); | 441 | return call3 (handler, Qfile_name_all_completions, file, directory); |
| 441 | 442 | ||
| 442 | return file_name_completion (file, directory, 1, 0, Qnil); | 443 | return file_name_completion (file, directory, 1, Qnil); |
| 443 | } | 444 | } |
| 444 | 445 | ||
| 445 | static int file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_addr); | 446 | static int file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_addr); |
| 446 | static Lisp_Object Qdefault_directory; | 447 | static Lisp_Object Qdefault_directory; |
| 447 | 448 | ||
| 448 | static Lisp_Object | 449 | static Lisp_Object |
| 449 | file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate) | 450 | file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, |
| 451 | Lisp_Object predicate) | ||
| 450 | { | 452 | { |
| 451 | DIR *d; | 453 | DIR *d; |
| 452 | ptrdiff_t bestmatchsize = 0; | 454 | ptrdiff_t bestmatchsize = 0; |
| @@ -458,11 +460,11 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 458 | Lisp_Object encoded_file; | 460 | Lisp_Object encoded_file; |
| 459 | Lisp_Object encoded_dir; | 461 | Lisp_Object encoded_dir; |
| 460 | struct stat st; | 462 | struct stat st; |
| 461 | int directoryp; | 463 | bool directoryp; |
| 462 | /* If includeall is zero, exclude files in completion-ignored-extensions as | 464 | /* If not INCLUDEALL, exclude files in completion-ignored-extensions as |
| 463 | well as "." and "..". Until shown otherwise, assume we can't exclude | 465 | well as "." and "..". Until shown otherwise, assume we can't exclude |
| 464 | anything. */ | 466 | anything. */ |
| 465 | int includeall = 1; | 467 | bool includeall = 1; |
| 466 | ptrdiff_t count = SPECPDL_INDEX (); | 468 | ptrdiff_t count = SPECPDL_INDEX (); |
| 467 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 469 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 468 | 470 | ||
| @@ -500,7 +502,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 500 | { | 502 | { |
| 501 | DIRENTRY *dp; | 503 | DIRENTRY *dp; |
| 502 | ptrdiff_t len; | 504 | ptrdiff_t len; |
| 503 | int canexclude = 0; | 505 | bool canexclude = 0; |
| 504 | 506 | ||
| 505 | errno = 0; | 507 | errno = 0; |
| 506 | dp = readdir (d); | 508 | dp = readdir (d); |
| @@ -528,7 +530,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 528 | if (file_name_completion_stat (encoded_dir, dp, &st) < 0) | 530 | if (file_name_completion_stat (encoded_dir, dp, &st) < 0) |
| 529 | continue; | 531 | continue; |
| 530 | 532 | ||
| 531 | directoryp = S_ISDIR (st.st_mode); | 533 | directoryp = S_ISDIR (st.st_mode) != 0; |
| 532 | tem = Qnil; | 534 | tem = Qnil; |
| 533 | /* If all_flag is set, always include all. | 535 | /* If all_flag is set, always include all. |
| 534 | It would not actually be helpful to the user to ignore any possible | 536 | It would not actually be helpful to the user to ignore any possible |
| @@ -716,7 +718,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 716 | /* This tests that the current file is an exact match | 718 | /* This tests that the current file is an exact match |
| 717 | but BESTMATCH is not (it is too long). */ | 719 | but BESTMATCH is not (it is too long). */ |
| 718 | if ((matchsize == SCHARS (name) | 720 | if ((matchsize == SCHARS (name) |
| 719 | && matchsize + !!directoryp < SCHARS (bestmatch)) | 721 | && matchsize + directoryp < SCHARS (bestmatch)) |
| 720 | || | 722 | || |
| 721 | /* If there is no exact match ignoring case, | 723 | /* If there is no exact match ignoring case, |
| 722 | prefer a match that does not change the case | 724 | prefer a match that does not change the case |
| @@ -728,7 +730,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 728 | either both or neither are exact. */ | 730 | either both or neither are exact. */ |
| 729 | (((matchsize == SCHARS (name)) | 731 | (((matchsize == SCHARS (name)) |
| 730 | == | 732 | == |
| 731 | (matchsize + !!directoryp == SCHARS (bestmatch))) | 733 | (matchsize + directoryp == SCHARS (bestmatch))) |
| 732 | && (cmp = Fcompare_strings (name, zero, | 734 | && (cmp = Fcompare_strings (name, zero, |
| 733 | make_number (SCHARS (file)), | 735 | make_number (SCHARS (file)), |
| 734 | file, zero, | 736 | file, zero, |
diff --git a/src/dispextern.h b/src/dispextern.h index a25aac96df9..73f3350713f 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -671,7 +671,7 @@ struct glyph_matrix | |||
| 671 | 671 | ||
| 672 | /* Values of BEGV and ZV as of last redisplay. Set in | 672 | /* Values of BEGV and ZV as of last redisplay. Set in |
| 673 | mark_window_display_accurate_1. */ | 673 | mark_window_display_accurate_1. */ |
| 674 | int begv, zv; | 674 | ptrdiff_t begv, zv; |
| 675 | }; | 675 | }; |
| 676 | 676 | ||
| 677 | 677 | ||
| @@ -1126,11 +1126,11 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int); | |||
| 1126 | ((ROW)->phys_height - (ROW)->phys_ascent \ | 1126 | ((ROW)->phys_height - (ROW)->phys_ascent \ |
| 1127 | > (ROW)->height - (ROW)->ascent) | 1127 | > (ROW)->height - (ROW)->ascent) |
| 1128 | 1128 | ||
| 1129 | /* Non-zero means that fonts have been loaded since the last glyph | 1129 | /* True means that fonts have been loaded since the last glyph |
| 1130 | matrix adjustments. The function redisplay_internal adjusts glyph | 1130 | matrix adjustments. The function redisplay_internal adjusts glyph |
| 1131 | matrices when this flag is non-zero. */ | 1131 | matrices when this flag is true. */ |
| 1132 | 1132 | ||
| 1133 | extern int fonts_changed_p; | 1133 | extern bool fonts_changed_p; |
| 1134 | 1134 | ||
| 1135 | /* A glyph for a space. */ | 1135 | /* A glyph for a space. */ |
| 1136 | 1136 | ||
| @@ -1149,7 +1149,7 @@ extern int updated_area; | |||
| 1149 | /* Non-zero means last display completed. Zero means it was | 1149 | /* Non-zero means last display completed. Zero means it was |
| 1150 | preempted. */ | 1150 | preempted. */ |
| 1151 | 1151 | ||
| 1152 | extern int display_completed; | 1152 | extern bool display_completed; |
| 1153 | 1153 | ||
| 1154 | 1154 | ||
| 1155 | 1155 | ||
| @@ -1415,7 +1415,7 @@ struct glyph_string | |||
| 1415 | && !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)) \ | 1415 | && !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)) \ |
| 1416 | && WINDOW_TOTAL_LINES (W) > 1) | 1416 | && WINDOW_TOTAL_LINES (W) > 1) |
| 1417 | 1417 | ||
| 1418 | /* Value is non-zero if window W wants a header line. */ | 1418 | /* Value is true if window W wants a header line. */ |
| 1419 | 1419 | ||
| 1420 | #define WINDOW_WANTS_HEADER_LINE_P(W) \ | 1420 | #define WINDOW_WANTS_HEADER_LINE_P(W) \ |
| 1421 | (!MINI_WINDOW_P ((W)) \ | 1421 | (!MINI_WINDOW_P ((W)) \ |
| @@ -1856,7 +1856,6 @@ struct bidi_it { | |||
| 1856 | int resolved_level; /* final resolved level of this character */ | 1856 | int resolved_level; /* final resolved level of this character */ |
| 1857 | int invalid_levels; /* how many PDFs to ignore */ | 1857 | int invalid_levels; /* how many PDFs to ignore */ |
| 1858 | int invalid_rl_levels; /* how many PDFs from RLE/RLO to ignore */ | 1858 | int invalid_rl_levels; /* how many PDFs from RLE/RLO to ignore */ |
| 1859 | int prev_was_pdf; /* if non-zero, previous char was PDF */ | ||
| 1860 | struct bidi_saved_info prev; /* info about previous character */ | 1859 | struct bidi_saved_info prev; /* info about previous character */ |
| 1861 | struct bidi_saved_info last_strong; /* last-seen strong directional char */ | 1860 | struct bidi_saved_info last_strong; /* last-seen strong directional char */ |
| 1862 | struct bidi_saved_info next_for_neutral; /* surrounding characters for... */ | 1861 | struct bidi_saved_info next_for_neutral; /* surrounding characters for... */ |
| @@ -1879,6 +1878,7 @@ struct bidi_it { | |||
| 1879 | struct bidi_string_data string; /* string to reorder */ | 1878 | struct bidi_string_data string; /* string to reorder */ |
| 1880 | bidi_dir_t paragraph_dir; /* current paragraph direction */ | 1879 | bidi_dir_t paragraph_dir; /* current paragraph direction */ |
| 1881 | ptrdiff_t separator_limit; /* where paragraph separator should end */ | 1880 | ptrdiff_t separator_limit; /* where paragraph separator should end */ |
| 1881 | unsigned prev_was_pdf : 1; /* if non-zero, previous char was PDF */ | ||
| 1882 | unsigned first_elt : 1; /* if non-zero, examine current char first */ | 1882 | unsigned first_elt : 1; /* if non-zero, examine current char first */ |
| 1883 | unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ | 1883 | unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ |
| 1884 | unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ | 1884 | unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ |
| @@ -2085,10 +2085,10 @@ struct composition_it | |||
| 2085 | ptrdiff_t lookback; | 2085 | ptrdiff_t lookback; |
| 2086 | /* If non-negative, number of glyphs of the glyph-string. */ | 2086 | /* If non-negative, number of glyphs of the glyph-string. */ |
| 2087 | int nglyphs; | 2087 | int nglyphs; |
| 2088 | /* Nonzero iff the composition is created while buffer is scanned in | 2088 | /* True iff the composition is created while buffer is scanned in |
| 2089 | reverse order, and thus the grapheme clusters must be rendered | 2089 | reverse order, and thus the grapheme clusters must be rendered |
| 2090 | from the last to the first. */ | 2090 | from the last to the first. */ |
| 2091 | int reversed_p; | 2091 | bool reversed_p; |
| 2092 | 2092 | ||
| 2093 | /** The following members contain information about the current | 2093 | /** The following members contain information about the current |
| 2094 | grapheme cluster. */ | 2094 | grapheme cluster. */ |
| @@ -3002,14 +3002,14 @@ enum tool_bar_item_image | |||
| 3002 | 3002 | ||
| 3003 | /* Defined in bidi.c */ | 3003 | /* Defined in bidi.c */ |
| 3004 | 3004 | ||
| 3005 | extern void bidi_init_it (ptrdiff_t, ptrdiff_t, int, struct bidi_it *); | 3005 | extern void bidi_init_it (ptrdiff_t, ptrdiff_t, bool, struct bidi_it *); |
| 3006 | extern void bidi_move_to_visually_next (struct bidi_it *); | 3006 | extern void bidi_move_to_visually_next (struct bidi_it *); |
| 3007 | extern void bidi_paragraph_init (bidi_dir_t, struct bidi_it *, int); | 3007 | extern void bidi_paragraph_init (bidi_dir_t, struct bidi_it *, bool); |
| 3008 | extern int bidi_mirror_char (int); | 3008 | extern int bidi_mirror_char (int); |
| 3009 | extern void bidi_push_it (struct bidi_it *); | 3009 | extern void bidi_push_it (struct bidi_it *); |
| 3010 | extern void bidi_pop_it (struct bidi_it *); | 3010 | extern void bidi_pop_it (struct bidi_it *); |
| 3011 | extern void *bidi_shelve_cache (void); | 3011 | extern void *bidi_shelve_cache (void); |
| 3012 | extern void bidi_unshelve_cache (void *, int); | 3012 | extern void bidi_unshelve_cache (void *, bool); |
| 3013 | 3013 | ||
| 3014 | /* Defined in xdisp.c */ | 3014 | /* Defined in xdisp.c */ |
| 3015 | 3015 | ||
| @@ -3055,7 +3055,7 @@ void move_it_in_display_line (struct it *it, | |||
| 3055 | int in_display_vector_p (struct it *); | 3055 | int in_display_vector_p (struct it *); |
| 3056 | int frame_mode_line_height (struct frame *); | 3056 | int frame_mode_line_height (struct frame *); |
| 3057 | extern Lisp_Object Qtool_bar; | 3057 | extern Lisp_Object Qtool_bar; |
| 3058 | extern int redisplaying_p; | 3058 | extern bool redisplaying_p; |
| 3059 | extern int help_echo_showing_p; | 3059 | extern int help_echo_showing_p; |
| 3060 | extern int current_mode_line_height, current_header_line_height; | 3060 | extern int current_mode_line_height, current_header_line_height; |
| 3061 | extern Lisp_Object help_echo_string, help_echo_window; | 3061 | extern Lisp_Object help_echo_string, help_echo_window; |
| @@ -3251,9 +3251,12 @@ void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); | |||
| 3251 | 3251 | ||
| 3252 | extern Lisp_Object tip_frame; | 3252 | extern Lisp_Object tip_frame; |
| 3253 | extern Window tip_window; | 3253 | extern Window tip_window; |
| 3254 | extern frame_parm_handler x_frame_parm_handlers[]; | ||
| 3255 | |||
| 3254 | extern void start_hourglass (void); | 3256 | extern void start_hourglass (void); |
| 3255 | extern void cancel_hourglass (void); | 3257 | extern void cancel_hourglass (void); |
| 3256 | extern int hourglass_shown_p; | 3258 | extern int hourglass_shown_p; |
| 3259 | |||
| 3257 | struct atimer; /* Defined in atimer.h. */ | 3260 | struct atimer; /* Defined in atimer.h. */ |
| 3258 | /* If non-null, an asynchronous timer that, when it expires, displays | 3261 | /* If non-null, an asynchronous timer that, when it expires, displays |
| 3259 | an hourglass cursor on all frames. */ | 3262 | an hourglass cursor on all frames. */ |
| @@ -3304,7 +3307,7 @@ extern Lisp_Object marginal_area_string (struct window *, enum window_part, | |||
| 3304 | extern void redraw_frame (struct frame *); | 3307 | extern void redraw_frame (struct frame *); |
| 3305 | extern void cancel_line (int, struct frame *); | 3308 | extern void cancel_line (int, struct frame *); |
| 3306 | extern void init_desired_glyphs (struct frame *); | 3309 | extern void init_desired_glyphs (struct frame *); |
| 3307 | extern int update_frame (struct frame *, int, int); | 3310 | extern bool update_frame (struct frame *, bool, bool); |
| 3308 | extern void bitch_at_user (void); | 3311 | extern void bitch_at_user (void); |
| 3309 | void adjust_glyphs (struct frame *); | 3312 | void adjust_glyphs (struct frame *); |
| 3310 | void free_glyphs (struct frame *); | 3313 | void free_glyphs (struct frame *); |
| @@ -3320,13 +3323,13 @@ void rotate_matrix (struct glyph_matrix *, int, int, int); | |||
| 3320 | void increment_matrix_positions (struct glyph_matrix *, | 3323 | void increment_matrix_positions (struct glyph_matrix *, |
| 3321 | int, int, ptrdiff_t, ptrdiff_t); | 3324 | int, int, ptrdiff_t, ptrdiff_t); |
| 3322 | void blank_row (struct window *, struct glyph_row *, int); | 3325 | void blank_row (struct window *, struct glyph_row *, int); |
| 3323 | void enable_glyph_matrix_rows (struct glyph_matrix *, int, int, int); | 3326 | void clear_glyph_matrix_rows (struct glyph_matrix *, int, int); |
| 3324 | void clear_glyph_row (struct glyph_row *); | 3327 | void clear_glyph_row (struct glyph_row *); |
| 3325 | void prepare_desired_row (struct glyph_row *); | 3328 | void prepare_desired_row (struct glyph_row *); |
| 3326 | void set_window_update_flags (struct window *, int); | 3329 | void set_window_update_flags (struct window *, bool); |
| 3327 | void update_single_window (struct window *, int); | 3330 | void update_single_window (struct window *, bool); |
| 3328 | void do_pending_window_change (int); | 3331 | void do_pending_window_change (bool); |
| 3329 | void change_frame_size (struct frame *, int, int, int, int, int); | 3332 | void change_frame_size (struct frame *, int, int, bool, bool, bool); |
| 3330 | void init_display (void); | 3333 | void init_display (void); |
| 3331 | void syms_of_display (void); | 3334 | void syms_of_display (void); |
| 3332 | extern Lisp_Object Qredisplay_dont_pause; | 3335 | extern Lisp_Object Qredisplay_dont_pause; |
diff --git a/src/dispnew.c b/src/dispnew.c index 8db4f93dc70..cac4c2da4c4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -47,17 +47,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 47 | 47 | ||
| 48 | #include "syssignal.h" | 48 | #include "syssignal.h" |
| 49 | 49 | ||
| 50 | #ifdef HAVE_X_WINDOWS | 50 | #ifdef HAVE_WINDOW_SYSTEM |
| 51 | #include "xterm.h" | 51 | #include TERM_HEADER |
| 52 | #endif /* HAVE_X_WINDOWS */ | 52 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 53 | |||
| 54 | #ifdef HAVE_NTGUI | ||
| 55 | #include "w32term.h" | ||
| 56 | #endif /* HAVE_NTGUI */ | ||
| 57 | |||
| 58 | #ifdef HAVE_NS | ||
| 59 | #include "nsterm.h" | ||
| 60 | #endif | ||
| 61 | 53 | ||
| 62 | /* Include systime.h after xterm.h to avoid double inclusion of time.h. */ | 54 | /* Include systime.h after xterm.h to avoid double inclusion of time.h. */ |
| 63 | 55 | ||
| @@ -88,7 +80,7 @@ static void update_frame_line (struct frame *, int); | |||
| 88 | static int required_matrix_height (struct window *); | 80 | static int required_matrix_height (struct window *); |
| 89 | static int required_matrix_width (struct window *); | 81 | static int required_matrix_width (struct window *); |
| 90 | static void adjust_frame_glyphs (struct frame *); | 82 | static void adjust_frame_glyphs (struct frame *); |
| 91 | static void change_frame_size_1 (struct frame *, int, int, int, int, int); | 83 | static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool); |
| 92 | static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); | 84 | static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); |
| 93 | static void fill_up_frame_row_with_spaces (struct glyph_row *, int); | 85 | static void fill_up_frame_row_with_spaces (struct glyph_row *, int); |
| 94 | static void build_frame_matrix_from_window_tree (struct glyph_matrix *, | 86 | static void build_frame_matrix_from_window_tree (struct glyph_matrix *, |
| @@ -98,20 +90,20 @@ static void build_frame_matrix_from_leaf_window (struct glyph_matrix *, | |||
| 98 | static void adjust_frame_message_buffer (struct frame *); | 90 | static void adjust_frame_message_buffer (struct frame *); |
| 99 | static void adjust_decode_mode_spec_buffer (struct frame *); | 91 | static void adjust_decode_mode_spec_buffer (struct frame *); |
| 100 | static void fill_up_glyph_row_with_spaces (struct glyph_row *); | 92 | static void fill_up_glyph_row_with_spaces (struct glyph_row *); |
| 101 | static void clear_window_matrices (struct window *, int); | 93 | static void clear_window_matrices (struct window *, bool); |
| 102 | static void fill_up_glyph_row_area_with_spaces (struct glyph_row *, int); | 94 | static void fill_up_glyph_row_area_with_spaces (struct glyph_row *, int); |
| 103 | static int scrolling_window (struct window *, int); | 95 | static int scrolling_window (struct window *, bool); |
| 104 | static int update_window_line (struct window *, int, int *); | 96 | static bool update_window_line (struct window *, int, bool *); |
| 105 | static void mirror_make_current (struct window *, int); | 97 | static void mirror_make_current (struct window *, int); |
| 106 | #ifdef GLYPH_DEBUG | 98 | #ifdef GLYPH_DEBUG |
| 107 | static void check_matrix_pointers (struct glyph_matrix *, | 99 | static void check_matrix_pointers (struct glyph_matrix *, |
| 108 | struct glyph_matrix *); | 100 | struct glyph_matrix *); |
| 109 | #endif | 101 | #endif |
| 110 | static void mirror_line_dance (struct window *, int, int, int *, char *); | 102 | static void mirror_line_dance (struct window *, int, int, int *, char *); |
| 111 | static int update_window_tree (struct window *, int); | 103 | static bool update_window_tree (struct window *, bool); |
| 112 | static int update_window (struct window *, int); | 104 | static bool update_window (struct window *, bool); |
| 113 | static int update_frame_1 (struct frame *, int, int); | 105 | static bool update_frame_1 (struct frame *, bool, bool); |
| 114 | static int scrolling (struct frame *); | 106 | static bool scrolling (struct frame *); |
| 115 | static void set_window_cursor_after_update (struct window *); | 107 | static void set_window_cursor_after_update (struct window *); |
| 116 | static void adjust_frame_glyphs_for_window_redisplay (struct frame *); | 108 | static void adjust_frame_glyphs_for_window_redisplay (struct frame *); |
| 117 | static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); | 109 | static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); |
| @@ -122,14 +114,14 @@ static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); | |||
| 122 | static EMACS_TIME preemption_period; | 114 | static EMACS_TIME preemption_period; |
| 123 | static EMACS_TIME preemption_next_check; | 115 | static EMACS_TIME preemption_next_check; |
| 124 | 116 | ||
| 125 | /* Nonzero upon entry to redisplay means do not assume anything about | 117 | /* True upon entry to redisplay means do not assume anything about |
| 126 | current contents of actual terminal frame; clear and redraw it. */ | 118 | current contents of actual terminal frame; clear and redraw it. */ |
| 127 | 119 | ||
| 128 | int frame_garbaged; | 120 | bool frame_garbaged; |
| 129 | 121 | ||
| 130 | /* Nonzero means last display completed. Zero means it was preempted. */ | 122 | /* True means last display completed. False means it was preempted. */ |
| 131 | 123 | ||
| 132 | int display_completed; | 124 | bool display_completed; |
| 133 | 125 | ||
| 134 | Lisp_Object Qdisplay_table, Qredisplay_dont_pause; | 126 | Lisp_Object Qdisplay_table, Qredisplay_dont_pause; |
| 135 | 127 | ||
| @@ -146,13 +138,13 @@ Lisp_Object selected_frame; | |||
| 146 | 138 | ||
| 147 | struct frame *last_nonminibuf_frame; | 139 | struct frame *last_nonminibuf_frame; |
| 148 | 140 | ||
| 149 | /* 1 means SIGWINCH happened when not safe. */ | 141 | /* True means SIGWINCH happened when not safe. */ |
| 150 | 142 | ||
| 151 | static int delayed_size_change; | 143 | static bool delayed_size_change; |
| 152 | 144 | ||
| 153 | /* 1 means glyph initialization has been completed at startup. */ | 145 | /* 1 means glyph initialization has been completed at startup. */ |
| 154 | 146 | ||
| 155 | static int glyphs_initialized_initially_p; | 147 | static bool glyphs_initialized_initially_p; |
| 156 | 148 | ||
| 157 | /* Updated window if != 0. Set by update_window. */ | 149 | /* Updated window if != 0. Set by update_window. */ |
| 158 | 150 | ||
| @@ -178,15 +170,15 @@ static int glyph_pool_count; | |||
| 178 | 170 | ||
| 179 | static struct frame *frame_matrix_frame; | 171 | static struct frame *frame_matrix_frame; |
| 180 | 172 | ||
| 181 | /* Non-zero means that fonts have been loaded since the last glyph | 173 | /* True means that fonts have been loaded since the last glyph |
| 182 | matrix adjustments. Redisplay must stop, and glyph matrices must | 174 | matrix adjustments. Redisplay must stop, and glyph matrices must |
| 183 | be adjusted when this flag becomes non-zero during display. The | 175 | be adjusted when this flag becomes true during display. The |
| 184 | reason fonts can be loaded so late is that fonts of fontsets are | 176 | reason fonts can be loaded so late is that fonts of fontsets are |
| 185 | loaded on demand. Another reason is that a line contains many | 177 | loaded on demand. Another reason is that a line contains many |
| 186 | characters displayed by zero width or very narrow glyphs of | 178 | characters displayed by zero width or very narrow glyphs of |
| 187 | variable-width fonts. */ | 179 | variable-width fonts. */ |
| 188 | 180 | ||
| 189 | int fonts_changed_p; | 181 | bool fonts_changed_p; |
| 190 | 182 | ||
| 191 | /* Convert vpos and hpos from frame to window and vice versa. | 183 | /* Convert vpos and hpos from frame to window and vice versa. |
| 192 | This may only be used for terminal frames. */ | 184 | This may only be used for terminal frames. */ |
| @@ -222,16 +214,14 @@ static int history_idx; | |||
| 222 | history. */ | 214 | history. */ |
| 223 | 215 | ||
| 224 | static uprintmax_t history_tick; | 216 | static uprintmax_t history_tick; |
| 225 | |||
| 226 | static void add_frame_display_history (struct frame *, int); | ||
| 227 | 217 | ||
| 228 | /* Add to the redisplay history how window W has been displayed. | 218 | /* Add to the redisplay history how window W has been displayed. |
| 229 | MSG is a trace containing the information how W's glyph matrix | 219 | MSG is a trace containing the information how W's glyph matrix |
| 230 | has been constructed. PAUSED_P non-zero means that the update | 220 | has been constructed. PAUSED_P means that the update |
| 231 | has been interrupted for pending input. */ | 221 | has been interrupted for pending input. */ |
| 232 | 222 | ||
| 233 | static void | 223 | static void |
| 234 | add_window_display_history (struct window *w, const char *msg, int paused_p) | 224 | add_window_display_history (struct window *w, const char *msg, bool paused_p) |
| 235 | { | 225 | { |
| 236 | char *buf; | 226 | char *buf; |
| 237 | 227 | ||
| @@ -254,11 +244,11 @@ add_window_display_history (struct window *w, const char *msg, int paused_p) | |||
| 254 | 244 | ||
| 255 | 245 | ||
| 256 | /* Add to the redisplay history that frame F has been displayed. | 246 | /* Add to the redisplay history that frame F has been displayed. |
| 257 | PAUSED_P non-zero means that the update has been interrupted for | 247 | PAUSED_P means that the update has been interrupted for |
| 258 | pending input. */ | 248 | pending input. */ |
| 259 | 249 | ||
| 260 | static void | 250 | static void |
| 261 | add_frame_display_history (struct frame *f, int paused_p) | 251 | add_frame_display_history (struct frame *f, bool paused_p) |
| 262 | { | 252 | { |
| 263 | char *buf; | 253 | char *buf; |
| 264 | 254 | ||
| @@ -395,10 +385,10 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin | |||
| 395 | return n; | 385 | return n; |
| 396 | } | 386 | } |
| 397 | 387 | ||
| 398 | /* Return non-zero if ROW's hash value is correct, zero if not. | 388 | /* Return true if ROW's hash value is correct. |
| 399 | Optimized away if ENABLE_CHECKING is not defined. */ | 389 | Optimized away if ENABLE_CHECKING is not defined. */ |
| 400 | 390 | ||
| 401 | static int | 391 | static bool |
| 402 | verify_row_hash (struct glyph_row *row) | 392 | verify_row_hash (struct glyph_row *row) |
| 403 | { | 393 | { |
| 404 | return row->hash == row_hash (row); | 394 | return row->hash == row_hash (row); |
| @@ -431,9 +421,9 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 431 | { | 421 | { |
| 432 | int i; | 422 | int i; |
| 433 | int new_rows; | 423 | int new_rows; |
| 434 | int marginal_areas_changed_p = 0; | 424 | bool marginal_areas_changed_p = 0; |
| 435 | int header_line_changed_p = 0; | 425 | bool header_line_changed_p = 0; |
| 436 | int header_line_p = 0; | 426 | bool header_line_p = 0; |
| 437 | int left = -1, right = -1; | 427 | int left = -1, right = -1; |
| 438 | int window_width = -1, window_height = -1; | 428 | int window_width = -1, window_height = -1; |
| 439 | 429 | ||
| @@ -736,30 +726,28 @@ increment_matrix_positions (struct glyph_matrix *matrix, int start, int end, | |||
| 736 | } | 726 | } |
| 737 | 727 | ||
| 738 | 728 | ||
| 739 | /* Enable a range of rows in glyph matrix MATRIX. START and END are | 729 | /* Clear the enable_p flags in a range of rows in glyph matrix MATRIX. |
| 740 | the row indices of the first and last + 1 row to enable. If | 730 | START and END are the row indices of the first and last + 1 row to clear. */ |
| 741 | ENABLED_P is non-zero, enabled_p flags in rows will be set to 1. */ | ||
| 742 | 731 | ||
| 743 | void | 732 | void |
| 744 | enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p) | 733 | clear_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end) |
| 745 | { | 734 | { |
| 746 | eassert (start <= end); | 735 | eassert (start <= end); |
| 747 | eassert (start >= 0 && start < matrix->nrows); | 736 | eassert (start >= 0 && start < matrix->nrows); |
| 748 | eassert (end >= 0 && end <= matrix->nrows); | 737 | eassert (end >= 0 && end <= matrix->nrows); |
| 749 | 738 | ||
| 750 | for (; start < end; ++start) | 739 | for (; start < end; ++start) |
| 751 | matrix->rows[start].enabled_p = enabled_p != 0; | 740 | matrix->rows[start].enabled_p = 0; |
| 752 | } | 741 | } |
| 753 | 742 | ||
| 754 | 743 | ||
| 755 | /* Clear MATRIX. | 744 | /* Clear MATRIX. |
| 756 | 745 | ||
| 757 | This empties all rows in MATRIX by setting the enabled_p flag for | 746 | Empty all rows in MATRIX by clearing their enabled_p flags. |
| 758 | all rows of the matrix to zero. The function prepare_desired_row | 747 | The function prepare_desired_row will eventually really clear a row |
| 759 | will eventually really clear a row when it sees one with a zero | 748 | when it sees one with a false enabled_p flag. |
| 760 | enabled_p flag. | ||
| 761 | 749 | ||
| 762 | Resets update hints to defaults value. The only update hint | 750 | Reset update hints to default values. The only update hint |
| 763 | currently present is the flag MATRIX->no_scrolling_p. */ | 751 | currently present is the flag MATRIX->no_scrolling_p. */ |
| 764 | 752 | ||
| 765 | void | 753 | void |
| @@ -767,7 +755,7 @@ clear_glyph_matrix (struct glyph_matrix *matrix) | |||
| 767 | { | 755 | { |
| 768 | if (matrix) | 756 | if (matrix) |
| 769 | { | 757 | { |
| 770 | enable_glyph_matrix_rows (matrix, 0, matrix->nrows, 0); | 758 | clear_glyph_matrix_rows (matrix, 0, matrix->nrows); |
| 771 | matrix->no_scrolling_p = 0; | 759 | matrix->no_scrolling_p = 0; |
| 772 | } | 760 | } |
| 773 | } | 761 | } |
| @@ -853,11 +841,11 @@ clear_desired_matrices (register struct frame *f) | |||
| 853 | } | 841 | } |
| 854 | 842 | ||
| 855 | 843 | ||
| 856 | /* Clear matrices in window tree rooted in W. If DESIRED_P is | 844 | /* Clear matrices in window tree rooted in W. If DESIRED_P, |
| 857 | non-zero clear desired matrices, otherwise clear current matrices. */ | 845 | clear desired matrices, otherwise clear current matrices. */ |
| 858 | 846 | ||
| 859 | static void | 847 | static void |
| 860 | clear_window_matrices (struct window *w, int desired_p) | 848 | clear_window_matrices (struct window *w, bool desired_p) |
| 861 | { | 849 | { |
| 862 | while (w) | 850 | while (w) |
| 863 | { | 851 | { |
| @@ -1109,12 +1097,12 @@ assign_row (struct glyph_row *to, struct glyph_row *from) | |||
| 1109 | /* Test whether the glyph memory of the glyph row WINDOW_ROW, which is | 1097 | /* Test whether the glyph memory of the glyph row WINDOW_ROW, which is |
| 1110 | a row in a window matrix, is a slice of the glyph memory of the | 1098 | a row in a window matrix, is a slice of the glyph memory of the |
| 1111 | glyph row FRAME_ROW which is a row in a frame glyph matrix. Value | 1099 | glyph row FRAME_ROW which is a row in a frame glyph matrix. Value |
| 1112 | is non-zero if the glyph memory of WINDOW_ROW is part of the glyph | 1100 | is true if the glyph memory of WINDOW_ROW is part of the glyph |
| 1113 | memory of FRAME_ROW. */ | 1101 | memory of FRAME_ROW. */ |
| 1114 | 1102 | ||
| 1115 | #ifdef GLYPH_DEBUG | 1103 | #ifdef GLYPH_DEBUG |
| 1116 | 1104 | ||
| 1117 | static int | 1105 | static bool |
| 1118 | glyph_row_slice_p (struct glyph_row *window_row, struct glyph_row *frame_row) | 1106 | glyph_row_slice_p (struct glyph_row *window_row, struct glyph_row *frame_row) |
| 1119 | { | 1107 | { |
| 1120 | struct glyph *window_glyph_start = window_row->glyphs[0]; | 1108 | struct glyph *window_glyph_start = window_row->glyphs[0]; |
| @@ -1161,7 +1149,7 @@ prepare_desired_row (struct glyph_row *row) | |||
| 1161 | { | 1149 | { |
| 1162 | if (!row->enabled_p) | 1150 | if (!row->enabled_p) |
| 1163 | { | 1151 | { |
| 1164 | int rp = row->reversed_p; | 1152 | bool rp = row->reversed_p; |
| 1165 | 1153 | ||
| 1166 | clear_glyph_row (row); | 1154 | clear_glyph_row (row); |
| 1167 | row->enabled_p = 1; | 1155 | row->enabled_p = 1; |
| @@ -1260,12 +1248,11 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos) | |||
| 1260 | } | 1248 | } |
| 1261 | 1249 | ||
| 1262 | 1250 | ||
| 1263 | /* Test two glyph rows A and B for equality. Value is non-zero if A | 1251 | /* Return true if the glyph rows A and B have equal contents. |
| 1264 | and B have equal contents. MOUSE_FACE_P non-zero means compare the | 1252 | MOUSE_FACE_P means compare the mouse_face_p flags of A and B, too. */ |
| 1265 | mouse_face_p flags of A and B, too. */ | ||
| 1266 | 1253 | ||
| 1267 | static inline int | 1254 | static inline bool |
| 1268 | row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p) | 1255 | row_equal_p (struct glyph_row *a, struct glyph_row *b, bool mouse_face_p) |
| 1269 | { | 1256 | { |
| 1270 | eassert (verify_row_hash (a)); | 1257 | eassert (verify_row_hash (a)); |
| 1271 | eassert (verify_row_hash (b)); | 1258 | eassert (verify_row_hash (b)); |
| @@ -1380,14 +1367,14 @@ free_glyph_pool (struct glyph_pool *pool) | |||
| 1380 | is changed from a large value to a smaller one. But, if someone | 1367 | is changed from a large value to a smaller one. But, if someone |
| 1381 | does it once, we can expect that he will do it again. | 1368 | does it once, we can expect that he will do it again. |
| 1382 | 1369 | ||
| 1383 | Value is non-zero if the pool changed in a way which makes | 1370 | Return true if the pool changed in a way which makes |
| 1384 | re-adjusting window glyph matrices necessary. */ | 1371 | re-adjusting window glyph matrices necessary. */ |
| 1385 | 1372 | ||
| 1386 | static int | 1373 | static bool |
| 1387 | realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim) | 1374 | realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim) |
| 1388 | { | 1375 | { |
| 1389 | ptrdiff_t needed; | 1376 | ptrdiff_t needed; |
| 1390 | int changed_p; | 1377 | bool changed_p; |
| 1391 | 1378 | ||
| 1392 | changed_p = (pool->glyphs == 0 | 1379 | changed_p = (pool->glyphs == 0 |
| 1393 | || matrix_dim.height != pool->nrows | 1380 | || matrix_dim.height != pool->nrows |
| @@ -1561,7 +1548,7 @@ check_matrix_invariants (struct window *w) | |||
| 1561 | 1548 | ||
| 1562 | X and Y are column/row within the frame glyph matrix where | 1549 | X and Y are column/row within the frame glyph matrix where |
| 1563 | sub-matrices for the window tree rooted at WINDOW must be | 1550 | sub-matrices for the window tree rooted at WINDOW must be |
| 1564 | allocated. DIM_ONLY_P non-zero means that the caller of this | 1551 | allocated. DIM_ONLY_P means that the caller of this |
| 1565 | function is only interested in the result matrix dimension, and | 1552 | function is only interested in the result matrix dimension, and |
| 1566 | matrix adjustments should not be performed. | 1553 | matrix adjustments should not be performed. |
| 1567 | 1554 | ||
| @@ -1638,7 +1625,7 @@ check_matrix_invariants (struct window *w) | |||
| 1638 | 1625 | ||
| 1639 | static struct dim | 1626 | static struct dim |
| 1640 | allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y, | 1627 | allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y, |
| 1641 | int dim_only_p, int *window_change_flags) | 1628 | bool dim_only_p, int *window_change_flags) |
| 1642 | { | 1629 | { |
| 1643 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (window))); | 1630 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (window))); |
| 1644 | int x0 = x, y0 = y; | 1631 | int x0 = x, y0 = y; |
| @@ -1646,7 +1633,7 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y, | |||
| 1646 | struct dim total; | 1633 | struct dim total; |
| 1647 | struct dim dim; | 1634 | struct dim dim; |
| 1648 | struct window *w; | 1635 | struct window *w; |
| 1649 | int in_horz_combination_p; | 1636 | bool in_horz_combination_p; |
| 1650 | 1637 | ||
| 1651 | /* What combination is WINDOW part of? Compute this once since the | 1638 | /* What combination is WINDOW part of? Compute this once since the |
| 1652 | result is the same for all windows in the `next' chain. The | 1639 | result is the same for all windows in the `next' chain. The |
| @@ -1704,7 +1691,7 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y, | |||
| 1704 | /* Actually change matrices, if allowed. Do not consider | 1691 | /* Actually change matrices, if allowed. Do not consider |
| 1705 | CHANGED_LEAF_MATRIX computed above here because the pool | 1692 | CHANGED_LEAF_MATRIX computed above here because the pool |
| 1706 | may have been changed which we don't now here. We trust | 1693 | may have been changed which we don't now here. We trust |
| 1707 | that we only will be called with DIM_ONLY_P != 0 when | 1694 | that we only will be called with DIM_ONLY_P when |
| 1708 | necessary. */ | 1695 | necessary. */ |
| 1709 | if (!dim_only_p) | 1696 | if (!dim_only_p) |
| 1710 | { | 1697 | { |
| @@ -1919,9 +1906,9 @@ adjust_frame_glyphs (struct frame *f) | |||
| 1919 | f->glyphs_initialized_p = 1; | 1906 | f->glyphs_initialized_p = 1; |
| 1920 | } | 1907 | } |
| 1921 | 1908 | ||
| 1922 | /* Return 1 if any window in the tree has nonzero window margins. See | 1909 | /* Return true if any window in the tree has nonzero window margins. See |
| 1923 | the hack at the end of adjust_frame_glyphs_for_frame_redisplay. */ | 1910 | the hack at the end of adjust_frame_glyphs_for_frame_redisplay. */ |
| 1924 | static int | 1911 | static bool |
| 1925 | showing_window_margins_p (struct window *w) | 1912 | showing_window_margins_p (struct window *w) |
| 1926 | { | 1913 | { |
| 1927 | while (w) | 1914 | while (w) |
| @@ -2052,7 +2039,7 @@ static void | |||
| 2052 | adjust_frame_glyphs_for_frame_redisplay (struct frame *f) | 2039 | adjust_frame_glyphs_for_frame_redisplay (struct frame *f) |
| 2053 | { | 2040 | { |
| 2054 | struct dim matrix_dim; | 2041 | struct dim matrix_dim; |
| 2055 | int pool_changed_p; | 2042 | bool pool_changed_p; |
| 2056 | int window_change_flags; | 2043 | int window_change_flags; |
| 2057 | int top_window_y; | 2044 | int top_window_y; |
| 2058 | 2045 | ||
| @@ -2468,7 +2455,7 @@ build_frame_matrix_from_window_tree (struct glyph_matrix *matrix, struct window | |||
| 2468 | desired frame matrix built. W is a leaf window whose desired or | 2455 | desired frame matrix built. W is a leaf window whose desired or |
| 2469 | current matrix is to be added to FRAME_MATRIX. W's flag | 2456 | current matrix is to be added to FRAME_MATRIX. W's flag |
| 2470 | must_be_updated_p determines which matrix it contributes to | 2457 | must_be_updated_p determines which matrix it contributes to |
| 2471 | FRAME_MATRIX. If must_be_updated_p is non-zero, W's desired matrix | 2458 | FRAME_MATRIX. If W->must_be_updated_p, W's desired matrix |
| 2472 | is added to FRAME_MATRIX, otherwise W's current matrix is added. | 2459 | is added to FRAME_MATRIX, otherwise W's current matrix is added. |
| 2473 | Adding a desired matrix means setting up used counters and such in | 2460 | Adding a desired matrix means setting up used counters and such in |
| 2474 | frame rows, while adding a current window matrix to FRAME_MATRIX | 2461 | frame rows, while adding a current window matrix to FRAME_MATRIX |
| @@ -2519,7 +2506,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w | |||
| 2519 | { | 2506 | { |
| 2520 | struct glyph_row *frame_row = frame_matrix->rows + frame_y; | 2507 | struct glyph_row *frame_row = frame_matrix->rows + frame_y; |
| 2521 | struct glyph_row *window_row = window_matrix->rows + window_y; | 2508 | struct glyph_row *window_row = window_matrix->rows + window_y; |
| 2522 | int current_row_p = window_matrix == w->current_matrix; | 2509 | bool current_row_p = window_matrix == w->current_matrix; |
| 2523 | 2510 | ||
| 2524 | /* Fill up the frame row with spaces up to the left margin of the | 2511 | /* Fill up the frame row with spaces up to the left margin of the |
| 2525 | window row. */ | 2512 | window row. */ |
| @@ -2692,7 +2679,7 @@ make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_ | |||
| 2692 | { | 2679 | { |
| 2693 | struct glyph_row *current_row = MATRIX_ROW (current_matrix, row); | 2680 | struct glyph_row *current_row = MATRIX_ROW (current_matrix, row); |
| 2694 | struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row); | 2681 | struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row); |
| 2695 | int mouse_face_p = current_row->mouse_face_p; | 2682 | bool mouse_face_p = current_row->mouse_face_p; |
| 2696 | 2683 | ||
| 2697 | /* Do current_row = desired_row. This exchanges glyph pointers | 2684 | /* Do current_row = desired_row. This exchanges glyph pointers |
| 2698 | between both rows, and does a structure assignment otherwise. */ | 2685 | between both rows, and does a structure assignment otherwise. */ |
| @@ -2789,7 +2776,7 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin | |||
| 2789 | /* Assign new rows, maybe clear lines. */ | 2776 | /* Assign new rows, maybe clear lines. */ |
| 2790 | for (i = 0; i < nlines; ++i) | 2777 | for (i = 0; i < nlines; ++i) |
| 2791 | { | 2778 | { |
| 2792 | int enabled_before_p = new_rows[i].enabled_p; | 2779 | bool enabled_before_p = new_rows[i].enabled_p; |
| 2793 | 2780 | ||
| 2794 | eassert (i + unchanged_at_top < matrix->nrows); | 2781 | eassert (i + unchanged_at_top < matrix->nrows); |
| 2795 | eassert (unchanged_at_top + copy_from[i] < matrix->nrows); | 2782 | eassert (unchanged_at_top + copy_from[i] < matrix->nrows); |
| @@ -2897,7 +2884,8 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy | |||
| 2897 | /* W is a leaf window, and we are working on its current | 2884 | /* W is a leaf window, and we are working on its current |
| 2898 | matrix m. */ | 2885 | matrix m. */ |
| 2899 | struct glyph_matrix *m = w->current_matrix; | 2886 | struct glyph_matrix *m = w->current_matrix; |
| 2900 | int i, sync_p = 0; | 2887 | int i; |
| 2888 | bool sync_p = 0; | ||
| 2901 | struct glyph_row *old_rows; | 2889 | struct glyph_row *old_rows; |
| 2902 | 2890 | ||
| 2903 | /* Make a copy of the original rows of matrix m. */ | 2891 | /* Make a copy of the original rows of matrix m. */ |
| @@ -2919,22 +2907,19 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy | |||
| 2919 | int window_from = frame_from - m->matrix_y; | 2907 | int window_from = frame_from - m->matrix_y; |
| 2920 | 2908 | ||
| 2921 | /* Is assigned line inside window? */ | 2909 | /* Is assigned line inside window? */ |
| 2922 | int from_inside_window_p | 2910 | bool from_inside_window_p |
| 2923 | = window_from >= 0 && window_from < m->matrix_h; | 2911 | = window_from >= 0 && window_from < m->matrix_h; |
| 2924 | 2912 | ||
| 2925 | /* Is assigned to line inside window? */ | 2913 | /* Is assigned to line inside window? */ |
| 2926 | int to_inside_window_p | 2914 | bool to_inside_window_p |
| 2927 | = window_to >= 0 && window_to < m->matrix_h; | 2915 | = window_to >= 0 && window_to < m->matrix_h; |
| 2928 | 2916 | ||
| 2929 | if (from_inside_window_p && to_inside_window_p) | 2917 | if (from_inside_window_p && to_inside_window_p) |
| 2930 | { | 2918 | { |
| 2931 | /* Enabled setting before assignment. */ | ||
| 2932 | int enabled_before_p; | ||
| 2933 | |||
| 2934 | /* Do the assignment. The enabled_p flag is saved | 2919 | /* Do the assignment. The enabled_p flag is saved |
| 2935 | over the assignment because the old redisplay did | 2920 | over the assignment because the old redisplay did |
| 2936 | that. */ | 2921 | that. */ |
| 2937 | enabled_before_p = m->rows[window_to].enabled_p; | 2922 | bool enabled_before_p = m->rows[window_to].enabled_p; |
| 2938 | m->rows[window_to] = old_rows[window_from]; | 2923 | m->rows[window_to] = old_rows[window_from]; |
| 2939 | m->rows[window_to].enabled_p = enabled_before_p; | 2924 | m->rows[window_to].enabled_p = enabled_before_p; |
| 2940 | 2925 | ||
| @@ -3155,17 +3140,16 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", | |||
| 3155 | 3140 | ||
| 3156 | /* Update frame F based on the data in desired matrices. | 3141 | /* Update frame F based on the data in desired matrices. |
| 3157 | 3142 | ||
| 3158 | If FORCE_P is non-zero, don't let redisplay be stopped by detecting | 3143 | If FORCE_P, don't let redisplay be stopped by detecting pending input. |
| 3159 | pending input. If INHIBIT_HAIRY_ID_P is non-zero, don't try | 3144 | If INHIBIT_HAIRY_ID_P, don't try scrolling. |
| 3160 | scrolling. | ||
| 3161 | 3145 | ||
| 3162 | Value is non-zero if redisplay was stopped due to pending input. */ | 3146 | Value is true if redisplay was stopped due to pending input. */ |
| 3163 | 3147 | ||
| 3164 | int | 3148 | bool |
| 3165 | update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p) | 3149 | update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) |
| 3166 | { | 3150 | { |
| 3167 | /* 1 means display has been paused because of pending input. */ | 3151 | /* True means display has been paused because of pending input. */ |
| 3168 | int paused_p; | 3152 | bool paused_p; |
| 3169 | struct window *root_window = XWINDOW (f->root_window); | 3153 | struct window *root_window = XWINDOW (f->root_window); |
| 3170 | 3154 | ||
| 3171 | if (redisplay_dont_pause) | 3155 | if (redisplay_dont_pause) |
| @@ -3283,13 +3267,13 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p) | |||
| 3283 | Window-based updates | 3267 | Window-based updates |
| 3284 | ************************************************************************/ | 3268 | ************************************************************************/ |
| 3285 | 3269 | ||
| 3286 | /* Perform updates in window tree rooted at W. FORCE_P non-zero means | 3270 | /* Perform updates in window tree rooted at W. |
| 3287 | don't stop updating when input is pending. */ | 3271 | If FORCE_P, don't stop updating if input is pending. */ |
| 3288 | 3272 | ||
| 3289 | static int | 3273 | static bool |
| 3290 | update_window_tree (struct window *w, int force_p) | 3274 | update_window_tree (struct window *w, bool force_p) |
| 3291 | { | 3275 | { |
| 3292 | int paused_p = 0; | 3276 | bool paused_p = 0; |
| 3293 | 3277 | ||
| 3294 | while (w && !paused_p) | 3278 | while (w && !paused_p) |
| 3295 | { | 3279 | { |
| @@ -3307,11 +3291,11 @@ update_window_tree (struct window *w, int force_p) | |||
| 3307 | } | 3291 | } |
| 3308 | 3292 | ||
| 3309 | 3293 | ||
| 3310 | /* Update window W if its flag must_be_updated_p is non-zero. If | 3294 | /* Update window W if its flag must_be_updated_p is set. |
| 3311 | FORCE_P is non-zero, don't stop updating if input is pending. */ | 3295 | If FORCE_P, don't stop updating if input is pending. */ |
| 3312 | 3296 | ||
| 3313 | void | 3297 | void |
| 3314 | update_single_window (struct window *w, int force_p) | 3298 | update_single_window (struct window *w, bool force_p) |
| 3315 | { | 3299 | { |
| 3316 | if (w->must_be_updated_p) | 3300 | if (w->must_be_updated_p) |
| 3317 | { | 3301 | { |
| @@ -3460,7 +3444,7 @@ redraw_overlapping_rows (struct window *w, int yb) | |||
| 3460 | static void | 3444 | static void |
| 3461 | check_current_matrix_flags (struct window *w) | 3445 | check_current_matrix_flags (struct window *w) |
| 3462 | { | 3446 | { |
| 3463 | int last_seen_p = 0; | 3447 | bool last_seen_p = 0; |
| 3464 | int i, yb = window_text_bottom_y (w); | 3448 | int i, yb = window_text_bottom_y (w); |
| 3465 | 3449 | ||
| 3466 | for (i = 0; i < w->current_matrix->nrows - 1; ++i) | 3450 | for (i = 0; i < w->current_matrix->nrows - 1; ++i) |
| @@ -3476,14 +3460,14 @@ check_current_matrix_flags (struct window *w) | |||
| 3476 | #endif /* GLYPH_DEBUG */ | 3460 | #endif /* GLYPH_DEBUG */ |
| 3477 | 3461 | ||
| 3478 | 3462 | ||
| 3479 | /* Update display of window W. FORCE_P non-zero means that we should | 3463 | /* Update display of window W. |
| 3480 | not stop when detecting pending input. */ | 3464 | If FORCE_P, don't stop updating when input is pending. */ |
| 3481 | 3465 | ||
| 3482 | static int | 3466 | static bool |
| 3483 | update_window (struct window *w, int force_p) | 3467 | update_window (struct window *w, bool force_p) |
| 3484 | { | 3468 | { |
| 3485 | struct glyph_matrix *desired_matrix = w->desired_matrix; | 3469 | struct glyph_matrix *desired_matrix = w->desired_matrix; |
| 3486 | int paused_p; | 3470 | bool paused_p; |
| 3487 | #if !PERIODIC_PREEMPTION_CHECKING | 3471 | #if !PERIODIC_PREEMPTION_CHECKING |
| 3488 | int preempt_count = baud_rate / 2400 + 1; | 3472 | int preempt_count = baud_rate / 2400 + 1; |
| 3489 | #endif | 3473 | #endif |
| @@ -3506,7 +3490,8 @@ update_window (struct window *w, int force_p) | |||
| 3506 | struct glyph_row *row, *end; | 3490 | struct glyph_row *row, *end; |
| 3507 | struct glyph_row *mode_line_row; | 3491 | struct glyph_row *mode_line_row; |
| 3508 | struct glyph_row *header_line_row; | 3492 | struct glyph_row *header_line_row; |
| 3509 | int yb, changed_p = 0, mouse_face_overwritten_p = 0; | 3493 | int yb; |
| 3494 | bool changed_p = 0, mouse_face_overwritten_p = 0; | ||
| 3510 | #if ! PERIODIC_PREEMPTION_CHECKING | 3495 | #if ! PERIODIC_PREEMPTION_CHECKING |
| 3511 | int n_updated = 0; | 3496 | int n_updated = 0; |
| 3512 | #endif | 3497 | #endif |
| @@ -3693,15 +3678,15 @@ update_marginal_area (struct window *w, int area, int vpos) | |||
| 3693 | 3678 | ||
| 3694 | 3679 | ||
| 3695 | /* Update the display of the text area of row VPOS in window W. | 3680 | /* Update the display of the text area of row VPOS in window W. |
| 3696 | Value is non-zero if display has changed. */ | 3681 | Value is true if display has changed. */ |
| 3697 | 3682 | ||
| 3698 | static int | 3683 | static bool |
| 3699 | update_text_area (struct window *w, int vpos) | 3684 | update_text_area (struct window *w, int vpos) |
| 3700 | { | 3685 | { |
| 3701 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); | 3686 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); |
| 3702 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); | 3687 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); |
| 3703 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); | 3688 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); |
| 3704 | int changed_p = 0; | 3689 | bool changed_p = 0; |
| 3705 | 3690 | ||
| 3706 | /* Let functions in xterm.c know what area subsequent X positions | 3691 | /* Let functions in xterm.c know what area subsequent X positions |
| 3707 | will be relative to. */ | 3692 | will be relative to. */ |
| @@ -3751,9 +3736,9 @@ update_text_area (struct window *w, int vpos) | |||
| 3751 | int stop, i, x; | 3736 | int stop, i, x; |
| 3752 | struct glyph *current_glyph = current_row->glyphs[TEXT_AREA]; | 3737 | struct glyph *current_glyph = current_row->glyphs[TEXT_AREA]; |
| 3753 | struct glyph *desired_glyph = desired_row->glyphs[TEXT_AREA]; | 3738 | struct glyph *desired_glyph = desired_row->glyphs[TEXT_AREA]; |
| 3754 | int overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p; | 3739 | bool overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p; |
| 3755 | int desired_stop_pos = desired_row->used[TEXT_AREA]; | 3740 | int desired_stop_pos = desired_row->used[TEXT_AREA]; |
| 3756 | int abort_skipping = 0; | 3741 | bool abort_skipping = 0; |
| 3757 | 3742 | ||
| 3758 | /* If the desired row extends its face to the text area end, and | 3743 | /* If the desired row extends its face to the text area end, and |
| 3759 | unless the current row also does so at the same position, | 3744 | unless the current row also does so at the same position, |
| @@ -3773,7 +3758,7 @@ update_text_area (struct window *w, int vpos) | |||
| 3773 | in common. */ | 3758 | in common. */ |
| 3774 | while (i < stop) | 3759 | while (i < stop) |
| 3775 | { | 3760 | { |
| 3776 | int can_skip_p = !abort_skipping; | 3761 | bool can_skip_p = !abort_skipping; |
| 3777 | 3762 | ||
| 3778 | /* Skip over glyphs that both rows have in common. These | 3763 | /* Skip over glyphs that both rows have in common. These |
| 3779 | don't have to be written. We can't skip if the last | 3764 | don't have to be written. We can't skip if the last |
| @@ -3847,7 +3832,7 @@ update_text_area (struct window *w, int vpos) | |||
| 3847 | int start_x = x, start_hpos = i; | 3832 | int start_x = x, start_hpos = i; |
| 3848 | struct glyph *start = desired_glyph; | 3833 | struct glyph *start = desired_glyph; |
| 3849 | int current_x = x; | 3834 | int current_x = x; |
| 3850 | int skip_first_p = !can_skip_p; | 3835 | bool skip_first_p = !can_skip_p; |
| 3851 | 3836 | ||
| 3852 | /* Find the next glyph that's equal again. */ | 3837 | /* Find the next glyph that's equal again. */ |
| 3853 | while (i < stop | 3838 | while (i < stop |
| @@ -3938,16 +3923,15 @@ update_text_area (struct window *w, int vpos) | |||
| 3938 | } | 3923 | } |
| 3939 | 3924 | ||
| 3940 | 3925 | ||
| 3941 | /* Update row VPOS in window W. Value is non-zero if display has been | 3926 | /* Update row VPOS in window W. Value is true if display has been changed. */ |
| 3942 | changed. */ | ||
| 3943 | 3927 | ||
| 3944 | static int | 3928 | static bool |
| 3945 | update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p) | 3929 | update_window_line (struct window *w, int vpos, bool *mouse_face_overwritten_p) |
| 3946 | { | 3930 | { |
| 3947 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); | 3931 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); |
| 3948 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); | 3932 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); |
| 3949 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); | 3933 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); |
| 3950 | int changed_p = 0; | 3934 | bool changed_p = 0; |
| 3951 | 3935 | ||
| 3952 | /* Set the row being updated. This is important to let xterm.c | 3936 | /* Set the row being updated. This is important to let xterm.c |
| 3953 | know what line height values are in effect. */ | 3937 | know what line height values are in effect. */ |
| @@ -4095,7 +4079,7 @@ set_window_cursor_after_update (struct window *w) | |||
| 4095 | tree rooted at W. */ | 4079 | tree rooted at W. */ |
| 4096 | 4080 | ||
| 4097 | void | 4081 | void |
| 4098 | set_window_update_flags (struct window *w, int on_p) | 4082 | set_window_update_flags (struct window *w, bool on_p) |
| 4099 | { | 4083 | { |
| 4100 | while (w) | 4084 | while (w) |
| 4101 | { | 4085 | { |
| @@ -4198,7 +4182,7 @@ add_row_entry (struct glyph_row *row) | |||
| 4198 | 4182 | ||
| 4199 | 4183 | ||
| 4200 | /* Try to reuse part of the current display of W by scrolling lines. | 4184 | /* Try to reuse part of the current display of W by scrolling lines. |
| 4201 | HEADER_LINE_P non-zero means W has a header line. | 4185 | HEADER_LINE_P means W has a header line. |
| 4202 | 4186 | ||
| 4203 | The algorithm is taken from Communications of the ACM, Apr78 "A | 4187 | The algorithm is taken from Communications of the ACM, Apr78 "A |
| 4204 | Technique for Isolating Differences Between Files." It should take | 4188 | Technique for Isolating Differences Between Files." It should take |
| @@ -4224,7 +4208,7 @@ add_row_entry (struct glyph_row *row) | |||
| 4224 | 1 if we did scroll. */ | 4208 | 1 if we did scroll. */ |
| 4225 | 4209 | ||
| 4226 | static int | 4210 | static int |
| 4227 | scrolling_window (struct window *w, int header_line_p) | 4211 | scrolling_window (struct window *w, bool header_line_p) |
| 4228 | { | 4212 | { |
| 4229 | struct glyph_matrix *desired_matrix = w->desired_matrix; | 4213 | struct glyph_matrix *desired_matrix = w->desired_matrix; |
| 4230 | struct glyph_matrix *current_matrix = w->current_matrix; | 4214 | struct glyph_matrix *current_matrix = w->current_matrix; |
| @@ -4237,7 +4221,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4237 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); | 4221 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); |
| 4238 | 4222 | ||
| 4239 | /* Skip over rows equal at the start. */ | 4223 | /* Skip over rows equal at the start. */ |
| 4240 | for (i = header_line_p ? 1 : 0; i < current_matrix->nrows - 1; ++i) | 4224 | for (i = header_line_p; i < current_matrix->nrows - 1; ++i) |
| 4241 | { | 4225 | { |
| 4242 | struct glyph_row *d = MATRIX_ROW (desired_matrix, i); | 4226 | struct glyph_row *d = MATRIX_ROW (desired_matrix, i); |
| 4243 | struct glyph_row *c = MATRIX_ROW (current_matrix, i); | 4227 | struct glyph_row *c = MATRIX_ROW (current_matrix, i); |
| @@ -4496,7 +4480,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4496 | for (j = nruns - 1; j > i; --j) | 4480 | for (j = nruns - 1; j > i; --j) |
| 4497 | { | 4481 | { |
| 4498 | struct run *p = runs[j]; | 4482 | struct run *p = runs[j]; |
| 4499 | int truncated_p = 0; | 4483 | bool truncated_p = 0; |
| 4500 | 4484 | ||
| 4501 | if (p->nrows > 0 | 4485 | if (p->nrows > 0 |
| 4502 | && p->desired_y < r->desired_y + r->height | 4486 | && p->desired_y < r->desired_y + r->height |
| @@ -4559,7 +4543,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4559 | for (j = 0; j < r->nrows; ++j) | 4543 | for (j = 0; j < r->nrows; ++j) |
| 4560 | { | 4544 | { |
| 4561 | struct glyph_row *from, *to; | 4545 | struct glyph_row *from, *to; |
| 4562 | int to_overlapped_p; | 4546 | bool to_overlapped_p; |
| 4563 | 4547 | ||
| 4564 | to = MATRIX_ROW (current_matrix, r->desired_vpos + j); | 4548 | to = MATRIX_ROW (current_matrix, r->desired_vpos + j); |
| 4565 | from = MATRIX_ROW (desired_matrix, r->desired_vpos + j); | 4549 | from = MATRIX_ROW (desired_matrix, r->desired_vpos + j); |
| @@ -4594,20 +4578,19 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4594 | 4578 | ||
| 4595 | /* Update the desired frame matrix of frame F. | 4579 | /* Update the desired frame matrix of frame F. |
| 4596 | 4580 | ||
| 4597 | FORCE_P non-zero means that the update should not be stopped by | 4581 | FORCE_P means that the update should not be stopped by pending input. |
| 4598 | pending input. INHIBIT_HAIRY_ID_P non-zero means that scrolling | 4582 | INHIBIT_HAIRY_ID_P means that scrolling should not be tried. |
| 4599 | should not be tried. | ||
| 4600 | 4583 | ||
| 4601 | Value is non-zero if update was stopped due to pending input. */ | 4584 | Value is true if update was stopped due to pending input. */ |
| 4602 | 4585 | ||
| 4603 | static int | 4586 | static bool |
| 4604 | update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | 4587 | update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p) |
| 4605 | { | 4588 | { |
| 4606 | /* Frame matrices to work on. */ | 4589 | /* Frame matrices to work on. */ |
| 4607 | struct glyph_matrix *current_matrix = f->current_matrix; | 4590 | struct glyph_matrix *current_matrix = f->current_matrix; |
| 4608 | struct glyph_matrix *desired_matrix = f->desired_matrix; | 4591 | struct glyph_matrix *desired_matrix = f->desired_matrix; |
| 4609 | int i; | 4592 | int i; |
| 4610 | int pause_p; | 4593 | bool pause_p; |
| 4611 | int preempt_count = baud_rate / 2400 + 1; | 4594 | int preempt_count = baud_rate / 2400 + 1; |
| 4612 | 4595 | ||
| 4613 | eassert (current_matrix && desired_matrix); | 4596 | eassert (current_matrix && desired_matrix); |
| @@ -4699,7 +4682,8 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4699 | } | 4682 | } |
| 4700 | } | 4683 | } |
| 4701 | 4684 | ||
| 4702 | pause_p = (i < FRAME_LINES (f) - 1) ? i : 0; | 4685 | lint_assume (0 <= FRAME_LINES (f)); |
| 4686 | pause_p = 0 < i && i < FRAME_LINES (f) - 1; | ||
| 4703 | 4687 | ||
| 4704 | /* Now just clean up termcap drivers and set cursor, etc. */ | 4688 | /* Now just clean up termcap drivers and set cursor, etc. */ |
| 4705 | if (!pause_p) | 4689 | if (!pause_p) |
| @@ -4809,7 +4793,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4809 | 4793 | ||
| 4810 | /* Do line insertions/deletions on frame F for frame-based redisplay. */ | 4794 | /* Do line insertions/deletions on frame F for frame-based redisplay. */ |
| 4811 | 4795 | ||
| 4812 | static int | 4796 | static bool |
| 4813 | scrolling (struct frame *frame) | 4797 | scrolling (struct frame *frame) |
| 4814 | { | 4798 | { |
| 4815 | int unchanged_at_top, unchanged_at_bottom; | 4799 | int unchanged_at_top, unchanged_at_bottom; |
| @@ -4952,10 +4936,10 @@ update_frame_line (struct frame *f, int vpos) | |||
| 4952 | struct glyph_matrix *desired_matrix = f->desired_matrix; | 4936 | struct glyph_matrix *desired_matrix = f->desired_matrix; |
| 4953 | struct glyph_row *current_row = MATRIX_ROW (current_matrix, vpos); | 4937 | struct glyph_row *current_row = MATRIX_ROW (current_matrix, vpos); |
| 4954 | struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, vpos); | 4938 | struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, vpos); |
| 4955 | int must_write_whole_line_p; | 4939 | bool must_write_whole_line_p; |
| 4956 | int write_spaces_p = FRAME_MUST_WRITE_SPACES (f); | 4940 | bool write_spaces_p = FRAME_MUST_WRITE_SPACES (f); |
| 4957 | int colored_spaces_p = (FACE_FROM_ID (f, DEFAULT_FACE_ID)->background | 4941 | bool colored_spaces_p = (FACE_FROM_ID (f, DEFAULT_FACE_ID)->background |
| 4958 | != FACE_TTY_DEFAULT_BG_COLOR); | 4942 | != FACE_TTY_DEFAULT_BG_COLOR); |
| 4959 | 4943 | ||
| 4960 | if (colored_spaces_p) | 4944 | if (colored_spaces_p) |
| 4961 | write_spaces_p = 1; | 4945 | write_spaces_p = 1; |
| @@ -5289,7 +5273,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5289 | /* start_display takes into account the header-line row, but IT's | 5273 | /* start_display takes into account the header-line row, but IT's |
| 5290 | vpos still counts from the glyph row that includes the window's | 5274 | vpos still counts from the glyph row that includes the window's |
| 5291 | start position. Adjust for a possible header-line row. */ | 5275 | start position. Adjust for a possible header-line row. */ |
| 5292 | it.vpos += WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; | 5276 | it.vpos += WINDOW_WANTS_HEADER_LINE_P (w); |
| 5293 | 5277 | ||
| 5294 | x0 = *x; | 5278 | x0 = *x; |
| 5295 | 5279 | ||
| @@ -5613,12 +5597,12 @@ window_change_signal (int signalnum) /* If we don't have an argument, */ | |||
| 5613 | #endif /* SIGWINCH */ | 5597 | #endif /* SIGWINCH */ |
| 5614 | 5598 | ||
| 5615 | 5599 | ||
| 5616 | /* Do any change in frame size that was requested by a signal. SAFE | 5600 | /* Do any change in frame size that was requested by a signal. |
| 5617 | non-zero means this function is called from a place where it is | 5601 | SAFE means this function is called from a place where it is |
| 5618 | safe to change frame sizes while a redisplay is in progress. */ | 5602 | safe to change frame sizes while a redisplay is in progress. */ |
| 5619 | 5603 | ||
| 5620 | void | 5604 | void |
| 5621 | do_pending_window_change (int safe) | 5605 | do_pending_window_change (bool safe) |
| 5622 | { | 5606 | { |
| 5623 | /* If window_change_signal should have run before, run it now. */ | 5607 | /* If window_change_signal should have run before, run it now. */ |
| 5624 | if (redisplaying_p && !safe) | 5608 | if (redisplaying_p && !safe) |
| @@ -5645,16 +5629,17 @@ do_pending_window_change (int safe) | |||
| 5645 | /* Change the frame height and/or width. Values may be given as zero to | 5629 | /* Change the frame height and/or width. Values may be given as zero to |
| 5646 | indicate no change is to take place. | 5630 | indicate no change is to take place. |
| 5647 | 5631 | ||
| 5648 | If DELAY is non-zero, then assume we're being called from a signal | 5632 | If DELAY, assume we're being called from a signal handler, and |
| 5649 | handler, and queue the change for later - perhaps the next | 5633 | queue the change for later - perhaps the next redisplay. |
| 5650 | redisplay. Since this tries to resize windows, we can't call it | 5634 | Since this tries to resize windows, we can't call it |
| 5651 | from a signal handler. | 5635 | from a signal handler. |
| 5652 | 5636 | ||
| 5653 | SAFE non-zero means this function is called from a place where it's | 5637 | SAFE means this function is called from a place where it's |
| 5654 | safe to change frame sizes while a redisplay is in progress. */ | 5638 | safe to change frame sizes while a redisplay is in progress. */ |
| 5655 | 5639 | ||
| 5656 | void | 5640 | void |
| 5657 | change_frame_size (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe) | 5641 | change_frame_size (struct frame *f, int newheight, int newwidth, |
| 5642 | bool pretend, bool delay, bool safe) | ||
| 5658 | { | 5643 | { |
| 5659 | Lisp_Object tail, frame; | 5644 | Lisp_Object tail, frame; |
| 5660 | 5645 | ||
| @@ -5673,7 +5658,8 @@ change_frame_size (register struct frame *f, int newheight, int newwidth, int pr | |||
| 5673 | } | 5658 | } |
| 5674 | 5659 | ||
| 5675 | static void | 5660 | static void |
| 5676 | change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe) | 5661 | change_frame_size_1 (struct frame *f, int newheight, int newwidth, |
| 5662 | bool pretend, bool delay, bool safe) | ||
| 5677 | { | 5663 | { |
| 5678 | int new_frame_total_cols; | 5664 | int new_frame_total_cols; |
| 5679 | ptrdiff_t count = SPECPDL_INDEX (); | 5665 | ptrdiff_t count = SPECPDL_INDEX (); |
| @@ -5769,7 +5755,7 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int | |||
| 5769 | 5755 | ||
| 5770 | UNBLOCK_INPUT; | 5756 | UNBLOCK_INPUT; |
| 5771 | 5757 | ||
| 5772 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 5758 | record_unwind_current_buffer (); |
| 5773 | 5759 | ||
| 5774 | run_window_configuration_change_hook (f); | 5760 | run_window_configuration_change_hook (f); |
| 5775 | 5761 | ||
| @@ -5929,13 +5915,13 @@ additional wait period, in milliseconds; this is for backwards compatibility. | |||
| 5929 | 5915 | ||
| 5930 | TIMEOUT is number of seconds to wait (float or integer), | 5916 | TIMEOUT is number of seconds to wait (float or integer), |
| 5931 | or t to wait forever. | 5917 | or t to wait forever. |
| 5932 | READING is 1 if reading input. | 5918 | READING is true if reading input. |
| 5933 | If DO_DISPLAY is >0 display process output while waiting. | 5919 | If DO_DISPLAY is >0 display process output while waiting. |
| 5934 | If DO_DISPLAY is >1 perform an initial redisplay before waiting. | 5920 | If DO_DISPLAY is >1 perform an initial redisplay before waiting. |
| 5935 | */ | 5921 | */ |
| 5936 | 5922 | ||
| 5937 | Lisp_Object | 5923 | Lisp_Object |
| 5938 | sit_for (Lisp_Object timeout, int reading, int do_display) | 5924 | sit_for (Lisp_Object timeout, bool reading, int do_display) |
| 5939 | { | 5925 | { |
| 5940 | intmax_t sec; | 5926 | intmax_t sec; |
| 5941 | int nsec; | 5927 | int nsec; |
| @@ -6044,8 +6030,7 @@ pass nil for VARIABLE. */) | |||
| 6044 | (Lisp_Object variable) | 6030 | (Lisp_Object variable) |
| 6045 | { | 6031 | { |
| 6046 | Lisp_Object state, tail, frame, buf; | 6032 | Lisp_Object state, tail, frame, buf; |
| 6047 | Lisp_Object *vecp, *end; | 6033 | ptrdiff_t n, idx; |
| 6048 | ptrdiff_t n; | ||
| 6049 | 6034 | ||
| 6050 | if (! NILP (variable)) | 6035 | if (! NILP (variable)) |
| 6051 | { | 6036 | { |
| @@ -6057,18 +6042,16 @@ pass nil for VARIABLE. */) | |||
| 6057 | else | 6042 | else |
| 6058 | state = frame_and_buffer_state; | 6043 | state = frame_and_buffer_state; |
| 6059 | 6044 | ||
| 6060 | vecp = XVECTOR (state)->contents; | 6045 | idx = 0; |
| 6061 | end = vecp + ASIZE (state); | ||
| 6062 | |||
| 6063 | FOR_EACH_FRAME (tail, frame) | 6046 | FOR_EACH_FRAME (tail, frame) |
| 6064 | { | 6047 | { |
| 6065 | if (vecp == end) | 6048 | if (idx == ASIZE (state)) |
| 6066 | goto changed; | 6049 | goto changed; |
| 6067 | if (!EQ (*vecp++, frame)) | 6050 | if (!EQ (AREF (state, idx++), frame)) |
| 6068 | goto changed; | 6051 | goto changed; |
| 6069 | if (vecp == end) | 6052 | if (idx == ASIZE (state)) |
| 6070 | goto changed; | 6053 | goto changed; |
| 6071 | if (!EQ (*vecp++, XFRAME (frame)->name)) | 6054 | if (!EQ (AREF (state, idx++), XFRAME (frame)->name)) |
| 6072 | goto changed; | 6055 | goto changed; |
| 6073 | } | 6056 | } |
| 6074 | /* Check that the buffer info matches. */ | 6057 | /* Check that the buffer info matches. */ |
| @@ -6078,23 +6061,23 @@ pass nil for VARIABLE. */) | |||
| 6078 | /* Ignore buffers that aren't included in buffer lists. */ | 6061 | /* Ignore buffers that aren't included in buffer lists. */ |
| 6079 | if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') | 6062 | if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') |
| 6080 | continue; | 6063 | continue; |
| 6081 | if (vecp == end) | 6064 | if (idx == ASIZE (state)) |
| 6082 | goto changed; | 6065 | goto changed; |
| 6083 | if (!EQ (*vecp++, buf)) | 6066 | if (!EQ (AREF (state, idx++), buf)) |
| 6084 | goto changed; | 6067 | goto changed; |
| 6085 | if (vecp == end) | 6068 | if (idx == ASIZE (state)) |
| 6086 | goto changed; | 6069 | goto changed; |
| 6087 | if (!EQ (*vecp++, BVAR (XBUFFER (buf), read_only))) | 6070 | if (!EQ (AREF (state, idx++), BVAR (XBUFFER (buf), read_only))) |
| 6088 | goto changed; | 6071 | goto changed; |
| 6089 | if (vecp == end) | 6072 | if (idx == ASIZE (state)) |
| 6090 | goto changed; | 6073 | goto changed; |
| 6091 | if (!EQ (*vecp++, Fbuffer_modified_p (buf))) | 6074 | if (!EQ (AREF (state, idx++), Fbuffer_modified_p (buf))) |
| 6092 | goto changed; | 6075 | goto changed; |
| 6093 | } | 6076 | } |
| 6094 | if (vecp == end) | 6077 | if (idx == ASIZE (state)) |
| 6095 | goto changed; | 6078 | goto changed; |
| 6096 | /* Detect deletion of a buffer at the end of the list. */ | 6079 | /* Detect deletion of a buffer at the end of the list. */ |
| 6097 | if (EQ (*vecp, Qlambda)) | 6080 | if (EQ (AREF (state, idx), Qlambda)) |
| 6098 | return Qnil; | 6081 | return Qnil; |
| 6099 | 6082 | ||
| 6100 | /* Come here if we decide the data has changed. */ | 6083 | /* Come here if we decide the data has changed. */ |
| @@ -6121,11 +6104,13 @@ pass nil for VARIABLE. */) | |||
| 6121 | } | 6104 | } |
| 6122 | 6105 | ||
| 6123 | /* Record the new data in the (possibly reallocated) vector. */ | 6106 | /* Record the new data in the (possibly reallocated) vector. */ |
| 6124 | vecp = XVECTOR (state)->contents; | 6107 | idx = 0; |
| 6125 | FOR_EACH_FRAME (tail, frame) | 6108 | FOR_EACH_FRAME (tail, frame) |
| 6126 | { | 6109 | { |
| 6127 | *vecp++ = frame; | 6110 | ASET (state, idx, frame); |
| 6128 | *vecp++ = XFRAME (frame)->name; | 6111 | idx++; |
| 6112 | ASET (state, idx, XFRAME (frame)->name); | ||
| 6113 | idx++; | ||
| 6129 | } | 6114 | } |
| 6130 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) | 6115 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) |
| 6131 | { | 6116 | { |
| @@ -6133,19 +6118,23 @@ pass nil for VARIABLE. */) | |||
| 6133 | /* Ignore buffers that aren't included in buffer lists. */ | 6118 | /* Ignore buffers that aren't included in buffer lists. */ |
| 6134 | if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') | 6119 | if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') |
| 6135 | continue; | 6120 | continue; |
| 6136 | *vecp++ = buf; | 6121 | ASET (state, idx, buf); |
| 6137 | *vecp++ = BVAR (XBUFFER (buf), read_only); | 6122 | idx++; |
| 6138 | *vecp++ = Fbuffer_modified_p (buf); | 6123 | ASET (state, idx, BVAR (XBUFFER (buf), read_only)); |
| 6124 | idx++; | ||
| 6125 | ASET (state, idx, Fbuffer_modified_p (buf)); | ||
| 6126 | idx++; | ||
| 6139 | } | 6127 | } |
| 6140 | /* Fill up the vector with lambdas (always at least one). */ | 6128 | /* Fill up the vector with lambdas (always at least one). */ |
| 6141 | *vecp++ = Qlambda; | 6129 | ASET (state, idx, Qlambda); |
| 6142 | while (vecp - XVECTOR (state)->contents | 6130 | idx++; |
| 6143 | < ASIZE (state)) | 6131 | while (idx < ASIZE (state)) |
| 6144 | *vecp++ = Qlambda; | 6132 | { |
| 6133 | ASET (state, idx, Qlambda); | ||
| 6134 | idx++; | ||
| 6135 | } | ||
| 6145 | /* Make sure we didn't overflow the vector. */ | 6136 | /* Make sure we didn't overflow the vector. */ |
| 6146 | if (vecp - XVECTOR (state)->contents | 6137 | eassert (idx <= ASIZE (state)); |
| 6147 | > ASIZE (state)) | ||
| 6148 | abort (); | ||
| 6149 | return Qt; | 6138 | return Qt; |
| 6150 | } | 6139 | } |
| 6151 | 6140 | ||
| @@ -37,7 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | 37 | ||
| 38 | Lisp_Object Qfunction_documentation; | 38 | Lisp_Object Qfunction_documentation; |
| 39 | 39 | ||
| 40 | extern Lisp_Object Qclosure; | ||
| 41 | /* Buffer used for reading from documentation file. */ | 40 | /* Buffer used for reading from documentation file. */ |
| 42 | static char *get_doc_string_buffer; | 41 | static char *get_doc_string_buffer; |
| 43 | static ptrdiff_t get_doc_string_buffer_size; | 42 | static ptrdiff_t get_doc_string_buffer_size; |
| @@ -48,7 +47,7 @@ static unsigned char *read_bytecode_pointer; | |||
| 48 | If UNREADFLAG is 1, we unread a byte. */ | 47 | If UNREADFLAG is 1, we unread a byte. */ |
| 49 | 48 | ||
| 50 | int | 49 | int |
| 51 | read_bytecode_char (int unreadflag) | 50 | read_bytecode_char (bool unreadflag) |
| 52 | { | 51 | { |
| 53 | if (unreadflag) | 52 | if (unreadflag) |
| 54 | { | 53 | { |
| @@ -70,20 +69,18 @@ read_bytecode_char (int unreadflag) | |||
| 70 | (e.g. because the file has been modified and the location is stale), | 69 | (e.g. because the file has been modified and the location is stale), |
| 71 | return nil. | 70 | return nil. |
| 72 | 71 | ||
| 73 | If UNIBYTE is nonzero, always make a unibyte string. | 72 | If UNIBYTE, always make a unibyte string. |
| 74 | 73 | ||
| 75 | If DEFINITION is nonzero, assume this is for reading | 74 | If DEFINITION, assume this is for reading |
| 76 | a dynamic function definition; convert the bytestring | 75 | a dynamic function definition; convert the bytestring |
| 77 | and the constants vector with appropriate byte handling, | 76 | and the constants vector with appropriate byte handling, |
| 78 | and return a cons cell. */ | 77 | and return a cons cell. */ |
| 79 | 78 | ||
| 80 | Lisp_Object | 79 | Lisp_Object |
| 81 | get_doc_string (Lisp_Object filepos, int unibyte, int definition) | 80 | get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) |
| 82 | { | 81 | { |
| 83 | char *from, *to; | 82 | char *from, *to, *name, *p, *p1; |
| 84 | register int fd; | 83 | int fd; |
| 85 | register char *name; | ||
| 86 | register char *p, *p1; | ||
| 87 | ptrdiff_t minsize; | 84 | ptrdiff_t minsize; |
| 88 | int offset; | 85 | int offset; |
| 89 | EMACS_INT position; | 86 | EMACS_INT position; |
| @@ -302,7 +299,7 @@ read_doc_string (Lisp_Object filepos) | |||
| 302 | return get_doc_string (filepos, 0, 1); | 299 | return get_doc_string (filepos, 0, 1); |
| 303 | } | 300 | } |
| 304 | 301 | ||
| 305 | static int | 302 | static bool |
| 306 | reread_doc_file (Lisp_Object file) | 303 | reread_doc_file (Lisp_Object file) |
| 307 | { | 304 | { |
| 308 | #if 0 | 305 | #if 0 |
| @@ -335,7 +332,7 @@ string is passed through `substitute-command-keys'. */) | |||
| 335 | Lisp_Object fun; | 332 | Lisp_Object fun; |
| 336 | Lisp_Object funcar; | 333 | Lisp_Object funcar; |
| 337 | Lisp_Object doc; | 334 | Lisp_Object doc; |
| 338 | int try_reload = 1; | 335 | bool try_reload = 1; |
| 339 | 336 | ||
| 340 | documentation: | 337 | documentation: |
| 341 | 338 | ||
| @@ -467,7 +464,7 @@ This differs from `get' in that it can refer to strings stored in the | |||
| 467 | aren't strings. */) | 464 | aren't strings. */) |
| 468 | (Lisp_Object symbol, Lisp_Object prop, Lisp_Object raw) | 465 | (Lisp_Object symbol, Lisp_Object prop, Lisp_Object raw) |
| 469 | { | 466 | { |
| 470 | int try_reload = 1; | 467 | bool try_reload = 1; |
| 471 | Lisp_Object tem; | 468 | Lisp_Object tem; |
| 472 | 469 | ||
| 473 | documentation_property: | 470 | documentation_property: |
| @@ -562,12 +559,11 @@ the same file name is found in the `doc-directory'. */) | |||
| 562 | { | 559 | { |
| 563 | int fd; | 560 | int fd; |
| 564 | char buf[1024 + 1]; | 561 | char buf[1024 + 1]; |
| 565 | register int filled; | 562 | int filled; |
| 566 | register EMACS_INT pos; | 563 | EMACS_INT pos; |
| 567 | register char *p; | ||
| 568 | Lisp_Object sym; | 564 | Lisp_Object sym; |
| 569 | char *name; | 565 | char *p, *name; |
| 570 | int skip_file = 0; | 566 | bool skip_file = 0; |
| 571 | 567 | ||
| 572 | CHECK_STRING (filename); | 568 | CHECK_STRING (filename); |
| 573 | 569 | ||
| @@ -722,9 +718,9 @@ Otherwise, return a new string, without any text properties. */) | |||
| 722 | (Lisp_Object string) | 718 | (Lisp_Object string) |
| 723 | { | 719 | { |
| 724 | char *buf; | 720 | char *buf; |
| 725 | int changed = 0; | 721 | bool changed = 0; |
| 726 | register unsigned char *strp; | 722 | unsigned char *strp; |
| 727 | register char *bufp; | 723 | char *bufp; |
| 728 | ptrdiff_t idx; | 724 | ptrdiff_t idx; |
| 729 | ptrdiff_t bsize; | 725 | ptrdiff_t bsize; |
| 730 | Lisp_Object tem; | 726 | Lisp_Object tem; |
| @@ -733,7 +729,7 @@ Otherwise, return a new string, without any text properties. */) | |||
| 733 | ptrdiff_t length, length_byte; | 729 | ptrdiff_t length, length_byte; |
| 734 | Lisp_Object name; | 730 | Lisp_Object name; |
| 735 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 731 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 736 | int multibyte; | 732 | bool multibyte; |
| 737 | ptrdiff_t nchars; | 733 | ptrdiff_t nchars; |
| 738 | 734 | ||
| 739 | if (NILP (string)) | 735 | if (NILP (string)) |
| @@ -787,7 +783,7 @@ Otherwise, return a new string, without any text properties. */) | |||
| 787 | else if (strp[0] == '\\' && strp[1] == '[') | 783 | else if (strp[0] == '\\' && strp[1] == '[') |
| 788 | { | 784 | { |
| 789 | ptrdiff_t start_idx; | 785 | ptrdiff_t start_idx; |
| 790 | int follow_remap = 1; | 786 | bool follow_remap = 1; |
| 791 | 787 | ||
| 792 | changed = 1; | 788 | changed = 1; |
| 793 | strp += 2; /* skip \[ */ | 789 | strp += 2; /* skip \[ */ |
diff --git a/src/editfns.c b/src/editfns.c index fa57edead28..a14e043c1bf 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -65,7 +65,7 @@ extern Lisp_Object w32_get_internal_run_time (void); | |||
| 65 | #endif | 65 | #endif |
| 66 | 66 | ||
| 67 | static Lisp_Object format_time_string (char const *, ptrdiff_t, EMACS_TIME, | 67 | static Lisp_Object format_time_string (char const *, ptrdiff_t, EMACS_TIME, |
| 68 | int, struct tm *); | 68 | bool, struct tm *); |
| 69 | static int tm_diff (struct tm *, struct tm *); | 69 | static int tm_diff (struct tm *, struct tm *); |
| 70 | static void update_buffer_properties (ptrdiff_t, ptrdiff_t); | 70 | static void update_buffer_properties (ptrdiff_t, ptrdiff_t); |
| 71 | 71 | ||
| @@ -246,11 +246,11 @@ The return value is POSITION. */) | |||
| 246 | 246 | ||
| 247 | 247 | ||
| 248 | /* Return the start or end position of the region. | 248 | /* Return the start or end position of the region. |
| 249 | BEGINNINGP non-zero means return the start. | 249 | BEGINNINGP means return the start. |
| 250 | If there is no region active, signal an error. */ | 250 | If there is no region active, signal an error. */ |
| 251 | 251 | ||
| 252 | static Lisp_Object | 252 | static Lisp_Object |
| 253 | region_limit (int beginningp) | 253 | region_limit (bool beginningp) |
| 254 | { | 254 | { |
| 255 | Lisp_Object m; | 255 | Lisp_Object m; |
| 256 | 256 | ||
| @@ -264,7 +264,7 @@ region_limit (int beginningp) | |||
| 264 | error ("The mark is not set now, so there is no region"); | 264 | error ("The mark is not set now, so there is no region"); |
| 265 | 265 | ||
| 266 | /* Clip to the current narrowing (bug#11770). */ | 266 | /* Clip to the current narrowing (bug#11770). */ |
| 267 | return make_number ((PT < XFASTINT (m)) == (beginningp != 0) | 267 | return make_number ((PT < XFASTINT (m)) == beginningp |
| 268 | ? PT | 268 | ? PT |
| 269 | : clip_to_bounds (BEGV, XFASTINT (m), ZV)); | 269 | : clip_to_bounds (BEGV, XFASTINT (m), ZV)); |
| 270 | } | 270 | } |
| @@ -435,12 +435,12 @@ get_pos_property (Lisp_Object position, register Lisp_Object prop, Lisp_Object o | |||
| 435 | BEG_LIMIT and END_LIMIT serve to limit the ranged of the returned | 435 | BEG_LIMIT and END_LIMIT serve to limit the ranged of the returned |
| 436 | results; they do not effect boundary behavior. | 436 | results; they do not effect boundary behavior. |
| 437 | 437 | ||
| 438 | If MERGE_AT_BOUNDARY is nonzero, then if POS is at the very first | 438 | If MERGE_AT_BOUNDARY is non-nil, then if POS is at the very first |
| 439 | position of a field, then the beginning of the previous field is | 439 | position of a field, then the beginning of the previous field is |
| 440 | returned instead of the beginning of POS's field (since the end of a | 440 | returned instead of the beginning of POS's field (since the end of a |
| 441 | field is actually also the beginning of the next input field, this | 441 | field is actually also the beginning of the next input field, this |
| 442 | behavior is sometimes useful). Additionally in the MERGE_AT_BOUNDARY | 442 | behavior is sometimes useful). Additionally in the MERGE_AT_BOUNDARY |
| 443 | true case, if two fields are separated by a field with the special | 443 | non-nil case, if two fields are separated by a field with the special |
| 444 | value `boundary', and POS lies within it, then the two separated | 444 | value `boundary', and POS lies within it, then the two separated |
| 445 | fields are considered to be adjacent, and POS between them, when | 445 | fields are considered to be adjacent, and POS between them, when |
| 446 | finding the beginning and ending of the "merged" field. | 446 | finding the beginning and ending of the "merged" field. |
| @@ -455,10 +455,10 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 455 | { | 455 | { |
| 456 | /* Fields right before and after the point. */ | 456 | /* Fields right before and after the point. */ |
| 457 | Lisp_Object before_field, after_field; | 457 | Lisp_Object before_field, after_field; |
| 458 | /* 1 if POS counts as the start of a field. */ | 458 | /* True if POS counts as the start of a field. */ |
| 459 | int at_field_start = 0; | 459 | bool at_field_start = 0; |
| 460 | /* 1 if POS counts as the end of a field. */ | 460 | /* True if POS counts as the end of a field. */ |
| 461 | int at_field_end = 0; | 461 | bool at_field_end = 0; |
| 462 | 462 | ||
| 463 | if (NILP (pos)) | 463 | if (NILP (pos)) |
| 464 | XSETFASTINT (pos, PT); | 464 | XSETFASTINT (pos, PT); |
| @@ -502,19 +502,19 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 502 | 502 | ||
| 503 | xxxx.yyyy | 503 | xxxx.yyyy |
| 504 | 504 | ||
| 505 | In this situation, if merge_at_boundary is true, we consider the | 505 | In this situation, if merge_at_boundary is non-nil, consider the |
| 506 | `x' and `y' fields as forming one big merged field, and so the end | 506 | `x' and `y' fields as forming one big merged field, and so the end |
| 507 | of the field is the end of `y'. | 507 | of the field is the end of `y'. |
| 508 | 508 | ||
| 509 | However, if `x' and `y' are separated by a special `boundary' field | 509 | However, if `x' and `y' are separated by a special `boundary' field |
| 510 | (a field with a `field' char-property of 'boundary), then we ignore | 510 | (a field with a `field' char-property of 'boundary), then ignore |
| 511 | this special field when merging adjacent fields. Here's the same | 511 | this special field when merging adjacent fields. Here's the same |
| 512 | situation, but with a `boundary' field between the `x' and `y' fields: | 512 | situation, but with a `boundary' field between the `x' and `y' fields: |
| 513 | 513 | ||
| 514 | xxx.BBBByyyy | 514 | xxx.BBBByyyy |
| 515 | 515 | ||
| 516 | Here, if point is at the end of `x', the beginning of `y', or | 516 | Here, if point is at the end of `x', the beginning of `y', or |
| 517 | anywhere in-between (within the `boundary' field), we merge all | 517 | anywhere in-between (within the `boundary' field), merge all |
| 518 | three fields and consider the beginning as being the beginning of | 518 | three fields and consider the beginning as being the beginning of |
| 519 | the `x' field, and the end as being the end of the `y' field. */ | 519 | the `x' field, and the end as being the end of the `y' field. */ |
| 520 | 520 | ||
| @@ -658,7 +658,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 658 | { | 658 | { |
| 659 | /* If non-zero, then the original point, before re-positioning. */ | 659 | /* If non-zero, then the original point, before re-positioning. */ |
| 660 | ptrdiff_t orig_point = 0; | 660 | ptrdiff_t orig_point = 0; |
| 661 | int fwd; | 661 | bool fwd; |
| 662 | Lisp_Object prev_old, prev_new; | 662 | Lisp_Object prev_old, prev_new; |
| 663 | 663 | ||
| 664 | if (NILP (new_pos)) | 664 | if (NILP (new_pos)) |
| @@ -816,8 +816,8 @@ This function does not move point. */) | |||
| 816 | Lisp_Object | 816 | Lisp_Object |
| 817 | save_excursion_save (void) | 817 | save_excursion_save (void) |
| 818 | { | 818 | { |
| 819 | int visible = (XBUFFER (XWINDOW (selected_window)->buffer) | 819 | bool visible = (XBUFFER (XWINDOW (selected_window)->buffer) |
| 820 | == current_buffer); | 820 | == current_buffer); |
| 821 | 821 | ||
| 822 | return Fcons (Fpoint_marker (), | 822 | return Fcons (Fpoint_marker (), |
| 823 | Fcons (Fcopy_marker (BVAR (current_buffer, mark), Qnil), | 823 | Fcons (Fcopy_marker (BVAR (current_buffer, mark), Qnil), |
| @@ -831,7 +831,7 @@ save_excursion_restore (Lisp_Object info) | |||
| 831 | { | 831 | { |
| 832 | Lisp_Object tem, tem1, omark, nmark; | 832 | Lisp_Object tem, tem1, omark, nmark; |
| 833 | struct gcpro gcpro1, gcpro2, gcpro3; | 833 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 834 | int visible_p; | 834 | bool visible_p; |
| 835 | 835 | ||
| 836 | tem = Fmarker_buffer (XCAR (info)); | 836 | tem = Fmarker_buffer (XCAR (info)); |
| 837 | /* If buffer being returned to is now deleted, avoid error */ | 837 | /* If buffer being returned to is now deleted, avoid error */ |
| @@ -946,13 +946,10 @@ BODY is executed just like `progn'. | |||
| 946 | usage: (save-current-buffer &rest BODY) */) | 946 | usage: (save-current-buffer &rest BODY) */) |
| 947 | (Lisp_Object args) | 947 | (Lisp_Object args) |
| 948 | { | 948 | { |
| 949 | Lisp_Object val; | ||
| 950 | ptrdiff_t count = SPECPDL_INDEX (); | 949 | ptrdiff_t count = SPECPDL_INDEX (); |
| 951 | 950 | ||
| 952 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 951 | record_unwind_current_buffer (); |
| 953 | 952 | return unbind_to (count, Fprogn (args)); | |
| 954 | val = Fprogn (args); | ||
| 955 | return unbind_to (count, val); | ||
| 956 | } | 953 | } |
| 957 | 954 | ||
| 958 | DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, | 955 | DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, |
| @@ -1470,8 +1467,8 @@ make_lisp_time (EMACS_TIME t) | |||
| 1470 | 1467 | ||
| 1471 | /* Decode a Lisp list SPECIFIED_TIME that represents a time. | 1468 | /* Decode a Lisp list SPECIFIED_TIME that represents a time. |
| 1472 | Set *PHIGH, *PLOW, *PUSEC, *PPSEC to its parts; do not check their values. | 1469 | Set *PHIGH, *PLOW, *PUSEC, *PPSEC to its parts; do not check their values. |
| 1473 | Return nonzero if successful. */ | 1470 | Return true if successful. */ |
| 1474 | static int | 1471 | static bool |
| 1475 | disassemble_lisp_time (Lisp_Object specified_time, Lisp_Object *phigh, | 1472 | disassemble_lisp_time (Lisp_Object specified_time, Lisp_Object *phigh, |
| 1476 | Lisp_Object *plow, Lisp_Object *pusec, | 1473 | Lisp_Object *plow, Lisp_Object *pusec, |
| 1477 | Lisp_Object *ppsec) | 1474 | Lisp_Object *ppsec) |
| @@ -1514,8 +1511,8 @@ disassemble_lisp_time (Lisp_Object specified_time, Lisp_Object *phigh, | |||
| 1514 | If *DRESULT is not null, store into *DRESULT the number of | 1511 | If *DRESULT is not null, store into *DRESULT the number of |
| 1515 | seconds since the start of the POSIX Epoch. | 1512 | seconds since the start of the POSIX Epoch. |
| 1516 | 1513 | ||
| 1517 | Return nonzero if successful. */ | 1514 | Return true if successful. */ |
| 1518 | int | 1515 | bool |
| 1519 | decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec, | 1516 | decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec, |
| 1520 | Lisp_Object psec, | 1517 | Lisp_Object psec, |
| 1521 | EMACS_TIME *result, double *dresult) | 1518 | EMACS_TIME *result, double *dresult) |
| @@ -1635,7 +1632,7 @@ or (if you need time as a string) `format-time-string'. */) | |||
| 1635 | 1632 | ||
| 1636 | /* Write information into buffer S of size MAXSIZE, according to the | 1633 | /* Write information into buffer S of size MAXSIZE, according to the |
| 1637 | FORMAT of length FORMAT_LEN, using time information taken from *TP. | 1634 | FORMAT of length FORMAT_LEN, using time information taken from *TP. |
| 1638 | Default to Universal Time if UT is nonzero, local time otherwise. | 1635 | Default to Universal Time if UT, local time otherwise. |
| 1639 | Use NS as the number of nanoseconds in the %N directive. | 1636 | Use NS as the number of nanoseconds in the %N directive. |
| 1640 | Return the number of bytes written, not including the terminating | 1637 | Return the number of bytes written, not including the terminating |
| 1641 | '\0'. If S is NULL, nothing will be written anywhere; so to | 1638 | '\0'. If S is NULL, nothing will be written anywhere; so to |
| @@ -1646,7 +1643,7 @@ or (if you need time as a string) `format-time-string'. */) | |||
| 1646 | bytes in FORMAT and it does not support nanoseconds. */ | 1643 | bytes in FORMAT and it does not support nanoseconds. */ |
| 1647 | static size_t | 1644 | static size_t |
| 1648 | emacs_nmemftime (char *s, size_t maxsize, const char *format, | 1645 | emacs_nmemftime (char *s, size_t maxsize, const char *format, |
| 1649 | size_t format_len, const struct tm *tp, int ut, int ns) | 1646 | size_t format_len, const struct tm *tp, bool ut, int ns) |
| 1650 | { | 1647 | { |
| 1651 | size_t total = 0; | 1648 | size_t total = 0; |
| 1652 | 1649 | ||
| @@ -1751,7 +1748,7 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */) | |||
| 1751 | 1748 | ||
| 1752 | static Lisp_Object | 1749 | static Lisp_Object |
| 1753 | format_time_string (char const *format, ptrdiff_t formatlen, | 1750 | format_time_string (char const *format, ptrdiff_t formatlen, |
| 1754 | EMACS_TIME t, int ut, struct tm *tmp) | 1751 | EMACS_TIME t, bool ut, struct tm *tmp) |
| 1755 | { | 1752 | { |
| 1756 | char buffer[4000]; | 1753 | char buffer[4000]; |
| 1757 | char *buf = buffer; | 1754 | char *buf = buffer; |
| @@ -2231,11 +2228,11 @@ general_insert_function (void (*insert_func) | |||
| 2231 | (const char *, ptrdiff_t), | 2228 | (const char *, ptrdiff_t), |
| 2232 | void (*insert_from_string_func) | 2229 | void (*insert_from_string_func) |
| 2233 | (Lisp_Object, ptrdiff_t, ptrdiff_t, | 2230 | (Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 2234 | ptrdiff_t, ptrdiff_t, int), | 2231 | ptrdiff_t, ptrdiff_t, bool), |
| 2235 | int inherit, ptrdiff_t nargs, Lisp_Object *args) | 2232 | bool inherit, ptrdiff_t nargs, Lisp_Object *args) |
| 2236 | { | 2233 | { |
| 2237 | ptrdiff_t argnum; | 2234 | ptrdiff_t argnum; |
| 2238 | register Lisp_Object val; | 2235 | Lisp_Object val; |
| 2239 | 2236 | ||
| 2240 | for (argnum = 0; argnum < nargs; argnum++) | 2237 | for (argnum = 0; argnum < nargs; argnum++) |
| 2241 | { | 2238 | { |
| @@ -2458,7 +2455,7 @@ from adjoining text, if those properties are sticky. */) | |||
| 2458 | /* Return a Lisp_String containing the text of the current buffer from | 2455 | /* Return a Lisp_String containing the text of the current buffer from |
| 2459 | START to END. If text properties are in use and the current buffer | 2456 | START to END. If text properties are in use and the current buffer |
| 2460 | has properties in the range specified, the resulting string will also | 2457 | has properties in the range specified, the resulting string will also |
| 2461 | have them, if PROPS is nonzero. | 2458 | have them, if PROPS is true. |
| 2462 | 2459 | ||
| 2463 | We don't want to use plain old make_string here, because it calls | 2460 | We don't want to use plain old make_string here, because it calls |
| 2464 | make_uninit_string, which can cause the buffer arena to be | 2461 | make_uninit_string, which can cause the buffer arena to be |
| @@ -2469,7 +2466,7 @@ from adjoining text, if those properties are sticky. */) | |||
| 2469 | buffer substrings. */ | 2466 | buffer substrings. */ |
| 2470 | 2467 | ||
| 2471 | Lisp_Object | 2468 | Lisp_Object |
| 2472 | make_buffer_string (ptrdiff_t start, ptrdiff_t end, int props) | 2469 | make_buffer_string (ptrdiff_t start, ptrdiff_t end, bool props) |
| 2473 | { | 2470 | { |
| 2474 | ptrdiff_t start_byte = CHAR_TO_BYTE (start); | 2471 | ptrdiff_t start_byte = CHAR_TO_BYTE (start); |
| 2475 | ptrdiff_t end_byte = CHAR_TO_BYTE (end); | 2472 | ptrdiff_t end_byte = CHAR_TO_BYTE (end); |
| @@ -2482,7 +2479,7 @@ make_buffer_string (ptrdiff_t start, ptrdiff_t end, int props) | |||
| 2482 | 2479 | ||
| 2483 | If text properties are in use and the current buffer | 2480 | If text properties are in use and the current buffer |
| 2484 | has properties in the range specified, the resulting string will also | 2481 | has properties in the range specified, the resulting string will also |
| 2485 | have them, if PROPS is nonzero. | 2482 | have them, if PROPS is true. |
| 2486 | 2483 | ||
| 2487 | We don't want to use plain old make_string here, because it calls | 2484 | We don't want to use plain old make_string here, because it calls |
| 2488 | make_uninit_string, which can cause the buffer arena to be | 2485 | make_uninit_string, which can cause the buffer arena to be |
| @@ -2494,7 +2491,7 @@ make_buffer_string (ptrdiff_t start, ptrdiff_t end, int props) | |||
| 2494 | 2491 | ||
| 2495 | Lisp_Object | 2492 | Lisp_Object |
| 2496 | make_buffer_string_both (ptrdiff_t start, ptrdiff_t start_byte, | 2493 | make_buffer_string_both (ptrdiff_t start, ptrdiff_t start_byte, |
| 2497 | ptrdiff_t end, ptrdiff_t end_byte, int props) | 2494 | ptrdiff_t end, ptrdiff_t end_byte, bool props) |
| 2498 | { | 2495 | { |
| 2499 | Lisp_Object result, tem, tem1; | 2496 | Lisp_Object result, tem, tem1; |
| 2500 | 2497 | ||
| @@ -2845,7 +2842,8 @@ Both characters must have the same length of multi-byte form. */) | |||
| 2845 | #define COMBINING_BOTH (COMBINING_BEFORE | COMBINING_AFTER) | 2842 | #define COMBINING_BOTH (COMBINING_BEFORE | COMBINING_AFTER) |
| 2846 | int maybe_byte_combining = COMBINING_NO; | 2843 | int maybe_byte_combining = COMBINING_NO; |
| 2847 | ptrdiff_t last_changed = 0; | 2844 | ptrdiff_t last_changed = 0; |
| 2848 | int multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | 2845 | bool multibyte_p |
| 2846 | = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | ||
| 2849 | int fromc, toc; | 2847 | int fromc, toc; |
| 2850 | 2848 | ||
| 2851 | restart: | 2849 | restart: |
| @@ -3081,8 +3079,8 @@ It returns the number of characters changed. */) | |||
| 3081 | int cnt; /* Number of changes made. */ | 3079 | int cnt; /* Number of changes made. */ |
| 3082 | ptrdiff_t size; /* Size of translate table. */ | 3080 | ptrdiff_t size; /* Size of translate table. */ |
| 3083 | ptrdiff_t pos, pos_byte, end_pos; | 3081 | ptrdiff_t pos, pos_byte, end_pos; |
| 3084 | int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | 3082 | bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 3085 | int string_multibyte IF_LINT (= 0); | 3083 | bool string_multibyte IF_LINT (= 0); |
| 3086 | 3084 | ||
| 3087 | validate_region (&start, &end); | 3085 | validate_region (&start, &end); |
| 3088 | if (CHAR_TABLE_P (table)) | 3086 | if (CHAR_TABLE_P (table)) |
| @@ -3642,20 +3640,20 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3642 | ptrdiff_t max_bufsize = STRING_BYTES_BOUND + 1; | 3640 | ptrdiff_t max_bufsize = STRING_BYTES_BOUND + 1; |
| 3643 | char *p; | 3641 | char *p; |
| 3644 | Lisp_Object buf_save_value IF_LINT (= {0}); | 3642 | Lisp_Object buf_save_value IF_LINT (= {0}); |
| 3645 | register char *format, *end, *format_start; | 3643 | char *format, *end, *format_start; |
| 3646 | ptrdiff_t formatlen, nchars; | 3644 | ptrdiff_t formatlen, nchars; |
| 3647 | /* Nonzero if the format is multibyte. */ | 3645 | /* True if the format is multibyte. */ |
| 3648 | int multibyte_format = 0; | 3646 | bool multibyte_format = 0; |
| 3649 | /* Nonzero if the output should be a multibyte string, | 3647 | /* True if the output should be a multibyte string, |
| 3650 | which is true if any of the inputs is one. */ | 3648 | which is true if any of the inputs is one. */ |
| 3651 | int multibyte = 0; | 3649 | bool multibyte = 0; |
| 3652 | /* When we make a multibyte string, we must pay attention to the | 3650 | /* When we make a multibyte string, we must pay attention to the |
| 3653 | byte combining problem, i.e., a byte may be combined with a | 3651 | byte combining problem, i.e., a byte may be combined with a |
| 3654 | multibyte character of the previous string. This flag tells if we | 3652 | multibyte character of the previous string. This flag tells if we |
| 3655 | must consider such a situation or not. */ | 3653 | must consider such a situation or not. */ |
| 3656 | int maybe_combine_byte; | 3654 | bool maybe_combine_byte; |
| 3657 | Lisp_Object val; | 3655 | Lisp_Object val; |
| 3658 | int arg_intervals = 0; | 3656 | bool arg_intervals = 0; |
| 3659 | USE_SAFE_ALLOCA; | 3657 | USE_SAFE_ALLOCA; |
| 3660 | 3658 | ||
| 3661 | /* discarded[I] is 1 if byte I of the format | 3659 | /* discarded[I] is 1 if byte I of the format |
| @@ -3671,8 +3669,8 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3671 | struct info | 3669 | struct info |
| 3672 | { | 3670 | { |
| 3673 | ptrdiff_t start, end; | 3671 | ptrdiff_t start, end; |
| 3674 | int converted_to_string; | 3672 | unsigned converted_to_string : 1; |
| 3675 | int intervals; | 3673 | unsigned intervals : 1; |
| 3676 | } *info = 0; | 3674 | } *info = 0; |
| 3677 | 3675 | ||
| 3678 | /* It should not be necessary to GCPRO ARGS, because | 3676 | /* It should not be necessary to GCPRO ARGS, because |
| @@ -3749,13 +3747,13 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3749 | digits to print after the '.' for floats, or the max. | 3747 | digits to print after the '.' for floats, or the max. |
| 3750 | number of chars to print from a string. */ | 3748 | number of chars to print from a string. */ |
| 3751 | 3749 | ||
| 3752 | int minus_flag = 0; | 3750 | bool minus_flag = 0; |
| 3753 | int plus_flag = 0; | 3751 | bool plus_flag = 0; |
| 3754 | int space_flag = 0; | 3752 | bool space_flag = 0; |
| 3755 | int sharp_flag = 0; | 3753 | bool sharp_flag = 0; |
| 3756 | int zero_flag = 0; | 3754 | bool zero_flag = 0; |
| 3757 | ptrdiff_t field_width; | 3755 | ptrdiff_t field_width; |
| 3758 | int precision_given; | 3756 | bool precision_given; |
| 3759 | uintmax_t precision = UINTMAX_MAX; | 3757 | uintmax_t precision = UINTMAX_MAX; |
| 3760 | char *num_end; | 3758 | char *num_end; |
| 3761 | char conversion; | 3759 | char conversion; |
| @@ -4135,7 +4133,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 4135 | char *src = sprintf_buf; | 4133 | char *src = sprintf_buf; |
| 4136 | char src0 = src[0]; | 4134 | char src0 = src[0]; |
| 4137 | int exponent_bytes = 0; | 4135 | int exponent_bytes = 0; |
| 4138 | int signedp = src0 == '-' || src0 == '+' || src0 == ' '; | 4136 | bool signedp = src0 == '-' || src0 == '+' || src0 == ' '; |
| 4139 | int significand_bytes; | 4137 | int significand_bytes; |
| 4140 | if (zero_flag | 4138 | if (zero_flag |
| 4141 | && ((src[signedp] >= '0' && src[signedp] <= '9') | 4139 | && ((src[signedp] >= '0' && src[signedp] <= '9') |
diff --git a/src/emacs.c b/src/emacs.c index a039e89d48f..3c814a36043 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -31,6 +31,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | 31 | ||
| 32 | #include "lisp.h" | 32 | #include "lisp.h" |
| 33 | 33 | ||
| 34 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 35 | #include TERM_HEADER | ||
| 36 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 37 | |||
| 34 | #ifdef WINDOWSNT | 38 | #ifdef WINDOWSNT |
| 35 | #include <fcntl.h> | 39 | #include <fcntl.h> |
| 36 | #include <windows.h> /* just for w32.h */ | 40 | #include <windows.h> /* just for w32.h */ |
| @@ -62,20 +66,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 62 | #include "gnutls.h" | 66 | #include "gnutls.h" |
| 63 | #endif | 67 | #endif |
| 64 | 68 | ||
| 65 | #ifdef HAVE_NS | ||
| 66 | #include "nsterm.h" | ||
| 67 | #endif | ||
| 68 | |||
| 69 | #if (defined PROFILING \ | 69 | #if (defined PROFILING \ |
| 70 | && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) | 70 | && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) |
| 71 | # include <sys/gmon.h> | 71 | # include <sys/gmon.h> |
| 72 | extern void moncontrol (int mode); | 72 | extern void moncontrol (int mode); |
| 73 | #endif | 73 | #endif |
| 74 | 74 | ||
| 75 | #ifdef HAVE_X_WINDOWS | ||
| 76 | #include "xterm.h" | ||
| 77 | #endif | ||
| 78 | |||
| 79 | #ifdef HAVE_SETLOCALE | 75 | #ifdef HAVE_SETLOCALE |
| 80 | #include <locale.h> | 76 | #include <locale.h> |
| 81 | #endif | 77 | #endif |
| @@ -99,10 +95,10 @@ static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundati | |||
| 99 | /* Empty lisp strings. To avoid having to build any others. */ | 95 | /* Empty lisp strings. To avoid having to build any others. */ |
| 100 | Lisp_Object empty_unibyte_string, empty_multibyte_string; | 96 | Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| 101 | 97 | ||
| 102 | /* Set nonzero after Emacs has started up the first time. | 98 | /* Set after Emacs has started up the first time. |
| 103 | Prevents reinitialization of the Lisp world and keymaps | 99 | Prevents reinitialization of the Lisp world and keymaps |
| 104 | on subsequent starts. */ | 100 | on subsequent starts. */ |
| 105 | int initialized; | 101 | bool initialized; |
| 106 | 102 | ||
| 107 | #ifdef DARWIN_OS | 103 | #ifdef DARWIN_OS |
| 108 | extern void unexec_init_emacs_zone (void); | 104 | extern void unexec_init_emacs_zone (void); |
| @@ -116,9 +112,9 @@ static void *malloc_state_ptr; | |||
| 116 | extern void *malloc_get_state (void); | 112 | extern void *malloc_get_state (void); |
| 117 | /* From glibc, a routine that overwrites the malloc internal state. */ | 113 | /* From glibc, a routine that overwrites the malloc internal state. */ |
| 118 | extern int malloc_set_state (void*); | 114 | extern int malloc_set_state (void*); |
| 119 | /* Non-zero if the MALLOC_CHECK_ environment variable was set while | 115 | /* True if the MALLOC_CHECK_ environment variable was set while |
| 120 | dumping. Used to work around a bug in glibc's malloc. */ | 116 | dumping. Used to work around a bug in glibc's malloc. */ |
| 121 | static int malloc_using_checking; | 117 | static bool malloc_using_checking; |
| 122 | #endif | 118 | #endif |
| 123 | 119 | ||
| 124 | Lisp_Object Qfile_name_handler_alist; | 120 | Lisp_Object Qfile_name_handler_alist; |
| @@ -127,17 +123,17 @@ Lisp_Object Qrisky_local_variable; | |||
| 127 | 123 | ||
| 128 | Lisp_Object Qkill_emacs; | 124 | Lisp_Object Qkill_emacs; |
| 129 | 125 | ||
| 130 | /* If non-zero, Emacs should not attempt to use a window-specific code, | 126 | /* If true, Emacs should not attempt to use a window-specific code, |
| 131 | but instead should use the virtual terminal under which it was started. */ | 127 | but instead should use the virtual terminal under which it was started. */ |
| 132 | int inhibit_window_system; | 128 | bool inhibit_window_system; |
| 133 | 129 | ||
| 134 | /* If non-zero, a filter or a sentinel is running. Tested to save the match | 130 | /* If true, a filter or a sentinel is running. Tested to save the match |
| 135 | data on the first attempt to change it inside asynchronous code. */ | 131 | data on the first attempt to change it inside asynchronous code. */ |
| 136 | int running_asynch_code; | 132 | bool running_asynch_code; |
| 137 | 133 | ||
| 138 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) | 134 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) |
| 139 | /* If non-zero, -d was specified, meaning we're using some window system. */ | 135 | /* If true, -d was specified, meaning we're using some window system. */ |
| 140 | int display_arg; | 136 | bool display_arg; |
| 141 | #endif | 137 | #endif |
| 142 | 138 | ||
| 143 | #if defined (DOUG_LEA_MALLOC) || defined (GNU_LINUX) | 139 | #if defined (DOUG_LEA_MALLOC) || defined (GNU_LINUX) |
| @@ -150,11 +146,11 @@ static void *my_heap_start; | |||
| 150 | static uprintmax_t heap_bss_diff; | 146 | static uprintmax_t heap_bss_diff; |
| 151 | #endif | 147 | #endif |
| 152 | 148 | ||
| 153 | /* Nonzero means running Emacs without interactive terminal. */ | 149 | /* True means running Emacs without interactive terminal. */ |
| 154 | int noninteractive; | 150 | bool noninteractive; |
| 155 | 151 | ||
| 156 | /* Nonzero means remove site-lisp directories from load-path. */ | 152 | /* True means remove site-lisp directories from load-path. */ |
| 157 | int no_site_lisp; | 153 | bool no_site_lisp; |
| 158 | 154 | ||
| 159 | /* Name for the server started by the daemon.*/ | 155 | /* Name for the server started by the daemon.*/ |
| 160 | static char *daemon_name; | 156 | static char *daemon_name; |
| @@ -272,13 +268,8 @@ section of the Emacs manual or the file BUGS.\n" | |||
| 272 | /* Signal code for the fatal signal that was received. */ | 268 | /* Signal code for the fatal signal that was received. */ |
| 273 | static int fatal_error_code; | 269 | static int fatal_error_code; |
| 274 | 270 | ||
| 275 | /* Nonzero if handling a fatal error already. */ | 271 | /* True if handling a fatal error already. */ |
| 276 | int fatal_error_in_progress; | 272 | bool fatal_error_in_progress; |
| 277 | |||
| 278 | /* If non-null, call this function from fatal_error_signal before | ||
| 279 | committing suicide. */ | ||
| 280 | |||
| 281 | static void (*fatal_error_signal_hook) (void); | ||
| 282 | 273 | ||
| 283 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD | 274 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 284 | /* When compiled with GTK and running under Gnome, | 275 | /* When compiled with GTK and running under Gnome, |
| @@ -316,7 +307,7 @@ fatal_error_signal (int sig) | |||
| 316 | if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) | 307 | if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) |
| 317 | Fkill_emacs (make_number (sig)); | 308 | Fkill_emacs (make_number (sig)); |
| 318 | 309 | ||
| 319 | shut_down_emacs (sig, 0, Qnil); | 310 | shut_down_emacs (sig, Qnil); |
| 320 | } | 311 | } |
| 321 | 312 | ||
| 322 | /* Signal the same code; this time it will really be fatal. | 313 | /* Signal the same code; this time it will really be fatal. |
| @@ -327,9 +318,6 @@ fatal_error_signal (int sig) | |||
| 327 | sigunblock (sigmask (fatal_error_code)); | 318 | sigunblock (sigmask (fatal_error_code)); |
| 328 | #endif | 319 | #endif |
| 329 | 320 | ||
| 330 | if (fatal_error_signal_hook) | ||
| 331 | fatal_error_signal_hook (); | ||
| 332 | |||
| 333 | kill (getpid (), fatal_error_code); | 321 | kill (getpid (), fatal_error_code); |
| 334 | } | 322 | } |
| 335 | 323 | ||
| @@ -576,7 +564,7 @@ DEFINE_DUMMY_FUNCTION (__main) | |||
| 576 | Too bad we can't just use getopt for all of this, but we don't have | 564 | Too bad we can't just use getopt for all of this, but we don't have |
| 577 | enough information to do it right. */ | 565 | enough information to do it right. */ |
| 578 | 566 | ||
| 579 | static int | 567 | static bool |
| 580 | argmatch (char **argv, int argc, const char *sstr, const char *lstr, | 568 | argmatch (char **argv, int argc, const char *sstr, const char *lstr, |
| 581 | int minlen, char **valptr, int *skipptr) | 569 | int minlen, char **valptr, int *skipptr) |
| 582 | { | 570 | { |
| @@ -680,12 +668,12 @@ int | |||
| 680 | main (int argc, char **argv) | 668 | main (int argc, char **argv) |
| 681 | { | 669 | { |
| 682 | char stack_bottom_variable; | 670 | char stack_bottom_variable; |
| 683 | int do_initial_setlocale; | 671 | bool do_initial_setlocale; |
| 684 | int skip_args = 0; | 672 | int skip_args = 0; |
| 685 | #ifdef HAVE_SETRLIMIT | 673 | #ifdef HAVE_SETRLIMIT |
| 686 | struct rlimit rlim; | 674 | struct rlimit rlim; |
| 687 | #endif | 675 | #endif |
| 688 | int no_loadup = 0; | 676 | bool no_loadup = 0; |
| 689 | char *junk = 0; | 677 | char *junk = 0; |
| 690 | char *dname_arg = 0; | 678 | char *dname_arg = 0; |
| 691 | #ifdef NS_IMPL_COCOA | 679 | #ifdef NS_IMPL_COCOA |
| @@ -1280,6 +1268,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1280 | init_data (); | 1268 | init_data (); |
| 1281 | init_atimer (); | 1269 | init_atimer (); |
| 1282 | running_asynch_code = 0; | 1270 | running_asynch_code = 0; |
| 1271 | init_random (); | ||
| 1283 | 1272 | ||
| 1284 | no_loadup | 1273 | no_loadup |
| 1285 | = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); | 1274 | = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); |
| @@ -1959,7 +1948,7 @@ all of which are called before Emacs is actually killed. */) | |||
| 1959 | x_clipboard_manager_save_all (); | 1948 | x_clipboard_manager_save_all (); |
| 1960 | #endif | 1949 | #endif |
| 1961 | 1950 | ||
| 1962 | shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); | 1951 | shut_down_emacs (0, STRINGP (arg) ? arg : Qnil); |
| 1963 | 1952 | ||
| 1964 | #ifdef HAVE_NS | 1953 | #ifdef HAVE_NS |
| 1965 | ns_release_autorelease_pool (ns_pool); | 1954 | ns_release_autorelease_pool (ns_pool); |
| @@ -1995,7 +1984,7 @@ all of which are called before Emacs is actually killed. */) | |||
| 1995 | and Fkill_emacs. */ | 1984 | and Fkill_emacs. */ |
| 1996 | 1985 | ||
| 1997 | void | 1986 | void |
| 1998 | shut_down_emacs (int sig, int no_x, Lisp_Object stuff) | 1987 | shut_down_emacs (int sig, Lisp_Object stuff) |
| 1999 | { | 1988 | { |
| 2000 | /* Prevent running of hooks from now on. */ | 1989 | /* Prevent running of hooks from now on. */ |
| 2001 | Vrun_hooks = Qnil; | 1990 | Vrun_hooks = Qnil; |
| @@ -2030,17 +2019,6 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff) | |||
| 2030 | unlock_all_files (); | 2019 | unlock_all_files (); |
| 2031 | #endif | 2020 | #endif |
| 2032 | 2021 | ||
| 2033 | #if 0 /* This triggers a bug in XCloseDisplay and is not needed. */ | ||
| 2034 | #ifdef HAVE_X_WINDOWS | ||
| 2035 | /* It's not safe to call intern here. Maybe we are crashing. */ | ||
| 2036 | if (!noninteractive && SYMBOLP (Vinitial_window_system) | ||
| 2037 | && SCHARS (SYMBOL_NAME (Vinitial_window_system)) == 1 | ||
| 2038 | && SREF (SYMBOL_NAME (Vinitial_window_system), 0) == 'x' | ||
| 2039 | && ! no_x) | ||
| 2040 | Fx_close_current_connection (); | ||
| 2041 | #endif /* HAVE_X_WINDOWS */ | ||
| 2042 | #endif | ||
| 2043 | |||
| 2044 | #ifdef SIGIO | 2022 | #ifdef SIGIO |
| 2045 | /* There is a tendency for a SIGIO signal to arrive within exit, | 2023 | /* There is a tendency for a SIGIO signal to arrive within exit, |
| 2046 | and cause a SIGHUP because the input descriptor is already closed. */ | 2024 | and cause a SIGHUP because the input descriptor is already closed. */ |
| @@ -2232,7 +2210,7 @@ decode_env_path (const char *evarname, const char *defalt) | |||
| 2232 | const char *path, *p; | 2210 | const char *path, *p; |
| 2233 | Lisp_Object lpath, element, tem; | 2211 | Lisp_Object lpath, element, tem; |
| 2234 | #ifdef WINDOWSNT | 2212 | #ifdef WINDOWSNT |
| 2235 | int defaulted = 0; | 2213 | bool defaulted = 0; |
| 2236 | const char *emacs_dir = egetenv ("emacs_dir"); | 2214 | const char *emacs_dir = egetenv ("emacs_dir"); |
| 2237 | static const char *emacs_dir_env = "%emacs_dir%/"; | 2215 | static const char *emacs_dir_env = "%emacs_dir%/"; |
| 2238 | const size_t emacs_dir_len = strlen (emacs_dir_env); | 2216 | const size_t emacs_dir_len = strlen (emacs_dir_env); |
| @@ -2328,7 +2306,7 @@ from the parent process and its tty file descriptors. */) | |||
| 2328 | (void) | 2306 | (void) |
| 2329 | { | 2307 | { |
| 2330 | int nfd; | 2308 | int nfd; |
| 2331 | int err = 0; | 2309 | bool err = 0; |
| 2332 | 2310 | ||
| 2333 | if (!IS_DAEMON) | 2311 | if (!IS_DAEMON) |
| 2334 | error ("This function can only be called if emacs is run as a daemon"); | 2312 | error ("This function can only be called if emacs is run as a daemon"); |
diff --git a/src/eval.c b/src/eval.c index c7a35fc91af..ecdbe960a8a 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -131,7 +131,7 @@ int handling_signal; | |||
| 131 | Lisp_Object inhibit_lisp_code; | 131 | Lisp_Object inhibit_lisp_code; |
| 132 | 132 | ||
| 133 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); | 133 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 134 | static int interactive_p (int); | 134 | static bool interactive_p (void); |
| 135 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); | 135 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); |
| 136 | 136 | ||
| 137 | /* Functions to set Lisp_Object slots of struct specbinding. */ | 137 | /* Functions to set Lisp_Object slots of struct specbinding. */ |
| @@ -213,7 +213,7 @@ restore_stack_limits (Lisp_Object data) | |||
| 213 | static Lisp_Object | 213 | static Lisp_Object |
| 214 | call_debugger (Lisp_Object arg) | 214 | call_debugger (Lisp_Object arg) |
| 215 | { | 215 | { |
| 216 | int debug_while_redisplaying; | 216 | bool debug_while_redisplaying; |
| 217 | ptrdiff_t count = SPECPDL_INDEX (); | 217 | ptrdiff_t count = SPECPDL_INDEX (); |
| 218 | Lisp_Object val; | 218 | Lisp_Object val; |
| 219 | EMACS_INT old_max = max_specpdl_size; | 219 | EMACS_INT old_max = max_specpdl_size; |
| @@ -544,7 +544,7 @@ spec that specifies non-nil unconditionally (such as \"p\"); or (ii) | |||
| 544 | use `called-interactively-p'. */) | 544 | use `called-interactively-p'. */) |
| 545 | (void) | 545 | (void) |
| 546 | { | 546 | { |
| 547 | return interactive_p (1) ? Qt : Qnil; | 547 | return interactive_p () ? Qt : Qnil; |
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | 550 | ||
| @@ -563,26 +563,23 @@ thinking of using it for any other purpose, it is quite likely that | |||
| 563 | you're making a mistake. Think: what do you want to do when the | 563 | you're making a mistake. Think: what do you want to do when the |
| 564 | command is called from a keyboard macro? | 564 | command is called from a keyboard macro? |
| 565 | 565 | ||
| 566 | This function is meant for implementing advice and other | 566 | Instead of using this function, it is sometimes cleaner to give your |
| 567 | function-modifying features. Instead of using this, it is sometimes | 567 | function an extra optional argument whose `interactive' spec specifies |
| 568 | cleaner to give your function an extra optional argument whose | 568 | non-nil unconditionally (\"p\" is a good way to do this), or via |
| 569 | `interactive' spec specifies non-nil unconditionally (\"p\" is a good | 569 | \(not (or executing-kbd-macro noninteractive)). */) |
| 570 | way to do this), or via (not (or executing-kbd-macro noninteractive)). */) | ||
| 571 | (Lisp_Object kind) | 570 | (Lisp_Object kind) |
| 572 | { | 571 | { |
| 573 | return ((INTERACTIVE || !EQ (kind, intern ("interactive"))) | 572 | return (((INTERACTIVE || !EQ (kind, intern ("interactive"))) |
| 574 | && interactive_p (1)) ? Qt : Qnil; | 573 | && interactive_p ()) |
| 574 | ? Qt : Qnil); | ||
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | 577 | ||
| 578 | /* Return 1 if function in which this appears was called using | 578 | /* Return true if function in which this appears was called using |
| 579 | call-interactively. | 579 | call-interactively and is not a built-in. */ |
| 580 | 580 | ||
| 581 | EXCLUDE_SUBRS_P non-zero means always return 0 if the function | 581 | static bool |
| 582 | called is a built-in. */ | 582 | interactive_p (void) |
| 583 | |||
| 584 | static int | ||
| 585 | interactive_p (int exclude_subrs_p) | ||
| 586 | { | 583 | { |
| 587 | struct backtrace *btp; | 584 | struct backtrace *btp; |
| 588 | Lisp_Object fun; | 585 | Lisp_Object fun; |
| @@ -611,9 +608,9 @@ interactive_p (int exclude_subrs_p) | |||
| 611 | /* `btp' now points at the frame of the innermost function that isn't | 608 | /* `btp' now points at the frame of the innermost function that isn't |
| 612 | a special form, ignoring frames for Finteractive_p and/or | 609 | a special form, ignoring frames for Finteractive_p and/or |
| 613 | Fbytecode at the top. If this frame is for a built-in function | 610 | Fbytecode at the top. If this frame is for a built-in function |
| 614 | (such as load or eval-region) return nil. */ | 611 | (such as load or eval-region) return false. */ |
| 615 | fun = Findirect_function (*btp->function, Qnil); | 612 | fun = Findirect_function (*btp->function, Qnil); |
| 616 | if (exclude_subrs_p && SUBRP (fun)) | 613 | if (SUBRP (fun)) |
| 617 | return 0; | 614 | return 0; |
| 618 | 615 | ||
| 619 | /* `btp' points to the frame of a Lisp function that called interactive-p. | 616 | /* `btp' points to the frame of a Lisp function that called interactive-p. |
| @@ -1121,7 +1118,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object | |||
| 1121 | static _Noreturn void | 1118 | static _Noreturn void |
| 1122 | unwind_to_catch (struct catchtag *catch, Lisp_Object value) | 1119 | unwind_to_catch (struct catchtag *catch, Lisp_Object value) |
| 1123 | { | 1120 | { |
| 1124 | int last_time; | 1121 | bool last_time; |
| 1125 | 1122 | ||
| 1126 | /* Save the value in the tag. */ | 1123 | /* Save the value in the tag. */ |
| 1127 | catch->val = value; | 1124 | catch->val = value; |
| @@ -1470,8 +1467,8 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), | |||
| 1470 | 1467 | ||
| 1471 | 1468 | ||
| 1472 | static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object); | 1469 | static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object); |
| 1473 | static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, | 1470 | static bool maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, |
| 1474 | Lisp_Object data); | 1471 | Lisp_Object data); |
| 1475 | 1472 | ||
| 1476 | void | 1473 | void |
| 1477 | process_quit_flag (void) | 1474 | process_quit_flag (void) |
| @@ -1576,7 +1573,7 @@ See also the function `condition-case'. */) | |||
| 1576 | if requested". */ | 1573 | if requested". */ |
| 1577 | || EQ (h->handler, Qerror))) | 1574 | || EQ (h->handler, Qerror))) |
| 1578 | { | 1575 | { |
| 1579 | int debugger_called | 1576 | bool debugger_called |
| 1580 | = maybe_call_debugger (conditions, error_symbol, data); | 1577 | = maybe_call_debugger (conditions, error_symbol, data); |
| 1581 | /* We can't return values to code which signaled an error, but we | 1578 | /* We can't return values to code which signaled an error, but we |
| 1582 | can continue code which has signaled a quit. */ | 1579 | can continue code which has signaled a quit. */ |
| @@ -1670,10 +1667,10 @@ signal_error (const char *s, Lisp_Object arg) | |||
| 1670 | } | 1667 | } |
| 1671 | 1668 | ||
| 1672 | 1669 | ||
| 1673 | /* Return nonzero if LIST is a non-nil atom or | 1670 | /* Return true if LIST is a non-nil atom or |
| 1674 | a list containing one of CONDITIONS. */ | 1671 | a list containing one of CONDITIONS. */ |
| 1675 | 1672 | ||
| 1676 | static int | 1673 | static bool |
| 1677 | wants_debugger (Lisp_Object list, Lisp_Object conditions) | 1674 | wants_debugger (Lisp_Object list, Lisp_Object conditions) |
| 1678 | { | 1675 | { |
| 1679 | if (NILP (list)) | 1676 | if (NILP (list)) |
| @@ -1693,15 +1690,15 @@ wants_debugger (Lisp_Object list, Lisp_Object conditions) | |||
| 1693 | return 0; | 1690 | return 0; |
| 1694 | } | 1691 | } |
| 1695 | 1692 | ||
| 1696 | /* Return 1 if an error with condition-symbols CONDITIONS, | 1693 | /* Return true if an error with condition-symbols CONDITIONS, |
| 1697 | and described by SIGNAL-DATA, should skip the debugger | 1694 | and described by SIGNAL-DATA, should skip the debugger |
| 1698 | according to debugger-ignored-errors. */ | 1695 | according to debugger-ignored-errors. */ |
| 1699 | 1696 | ||
| 1700 | static int | 1697 | static bool |
| 1701 | skip_debugger (Lisp_Object conditions, Lisp_Object data) | 1698 | skip_debugger (Lisp_Object conditions, Lisp_Object data) |
| 1702 | { | 1699 | { |
| 1703 | Lisp_Object tail; | 1700 | Lisp_Object tail; |
| 1704 | int first_string = 1; | 1701 | bool first_string = 1; |
| 1705 | Lisp_Object error_message; | 1702 | Lisp_Object error_message; |
| 1706 | 1703 | ||
| 1707 | error_message = Qnil; | 1704 | error_message = Qnil; |
| @@ -1736,7 +1733,7 @@ skip_debugger (Lisp_Object conditions, Lisp_Object data) | |||
| 1736 | = SIG is the error symbol, and DATA is the rest of the data. | 1733 | = SIG is the error symbol, and DATA is the rest of the data. |
| 1737 | = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). | 1734 | = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). |
| 1738 | This is for memory-full errors only. */ | 1735 | This is for memory-full errors only. */ |
| 1739 | static int | 1736 | static bool |
| 1740 | maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) | 1737 | maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) |
| 1741 | { | 1738 | { |
| 1742 | Lisp_Object combined_data; | 1739 | Lisp_Object combined_data; |
| @@ -2252,7 +2249,6 @@ eval_sub (Lisp_Object form) | |||
| 2252 | if (EQ (funcar, Qmacro)) | 2249 | if (EQ (funcar, Qmacro)) |
| 2253 | { | 2250 | { |
| 2254 | ptrdiff_t count = SPECPDL_INDEX (); | 2251 | ptrdiff_t count = SPECPDL_INDEX (); |
| 2255 | extern Lisp_Object Qlexical_binding; | ||
| 2256 | Lisp_Object exp; | 2252 | Lisp_Object exp; |
| 2257 | /* Bind lexical-binding during expansion of the macro, so the | 2253 | /* Bind lexical-binding during expansion of the macro, so the |
| 2258 | macro can know reliably if the code it outputs will be | 2254 | macro can know reliably if the code it outputs will be |
| @@ -2741,33 +2737,9 @@ DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, | |||
| 2741 | doc: /* Non-nil if OBJECT is a function. */) | 2737 | doc: /* Non-nil if OBJECT is a function. */) |
| 2742 | (Lisp_Object object) | 2738 | (Lisp_Object object) |
| 2743 | { | 2739 | { |
| 2744 | if (SYMBOLP (object) && !NILP (Ffboundp (object))) | 2740 | if (FUNCTIONP (object)) |
| 2745 | { | ||
| 2746 | object = Findirect_function (object, Qt); | ||
| 2747 | |||
| 2748 | if (CONSP (object) && EQ (XCAR (object), Qautoload)) | ||
| 2749 | { | ||
| 2750 | /* Autoloaded symbols are functions, except if they load | ||
| 2751 | macros or keymaps. */ | ||
| 2752 | int i; | ||
| 2753 | for (i = 0; i < 4 && CONSP (object); i++) | ||
| 2754 | object = XCDR (object); | ||
| 2755 | |||
| 2756 | return (CONSP (object) && !NILP (XCAR (object))) ? Qnil : Qt; | ||
| 2757 | } | ||
| 2758 | } | ||
| 2759 | |||
| 2760 | if (SUBRP (object)) | ||
| 2761 | return (XSUBR (object)->max_args != UNEVALLED) ? Qt : Qnil; | ||
| 2762 | else if (COMPILEDP (object)) | ||
| 2763 | return Qt; | 2741 | return Qt; |
| 2764 | else if (CONSP (object)) | 2742 | return Qnil; |
| 2765 | { | ||
| 2766 | Lisp_Object car = XCAR (object); | ||
| 2767 | return (EQ (car, Qlambda) || EQ (car, Qclosure)) ? Qt : Qnil; | ||
| 2768 | } | ||
| 2769 | else | ||
| 2770 | return Qnil; | ||
| 2771 | } | 2743 | } |
| 2772 | 2744 | ||
| 2773 | DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, | 2745 | DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, |
| @@ -2984,7 +2956,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, | |||
| 2984 | Lisp_Object val, syms_left, next, lexenv; | 2956 | Lisp_Object val, syms_left, next, lexenv; |
| 2985 | ptrdiff_t count = SPECPDL_INDEX (); | 2957 | ptrdiff_t count = SPECPDL_INDEX (); |
| 2986 | ptrdiff_t i; | 2958 | ptrdiff_t i; |
| 2987 | int optional, rest; | 2959 | bool optional, rest; |
| 2988 | 2960 | ||
| 2989 | if (CONSP (fun)) | 2961 | if (CONSP (fun)) |
| 2990 | { | 2962 | { |
| @@ -3470,13 +3442,13 @@ Output stream used is value of `standard-output'. */) | |||
| 3470 | write_string ("(", -1); | 3442 | write_string ("(", -1); |
| 3471 | if (backlist->nargs == MANY) | 3443 | if (backlist->nargs == MANY) |
| 3472 | { /* FIXME: Can this happen? */ | 3444 | { /* FIXME: Can this happen? */ |
| 3473 | int i; | 3445 | bool later_arg = 0; |
| 3474 | for (tail = *backlist->args, i = 0; | 3446 | for (tail = *backlist->args; !NILP (tail); tail = Fcdr (tail)) |
| 3475 | !NILP (tail); | ||
| 3476 | tail = Fcdr (tail), i = 1) | ||
| 3477 | { | 3447 | { |
| 3478 | if (i) write_string (" ", -1); | 3448 | if (later_arg) |
| 3449 | write_string (" ", -1); | ||
| 3479 | Fprin1 (Fcar (tail), Qnil); | 3450 | Fprin1 (Fcar (tail), Qnil); |
| 3451 | later_arg = 1; | ||
| 3480 | } | 3452 | } |
| 3481 | } | 3453 | } |
| 3482 | else | 3454 | else |
diff --git a/src/fileio.c b/src/fileio.c index 2f4a2ad2314..7466914af1c 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -766,7 +766,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) | |||
| 766 | #endif /* DOS_NT */ | 766 | #endif /* DOS_NT */ |
| 767 | ptrdiff_t length; | 767 | ptrdiff_t length; |
| 768 | Lisp_Object handler, result, handled_name; | 768 | Lisp_Object handler, result, handled_name; |
| 769 | int multibyte; | 769 | bool multibyte; |
| 770 | Lisp_Object hdir; | 770 | Lisp_Object hdir; |
| 771 | 771 | ||
| 772 | CHECK_STRING (name); | 772 | CHECK_STRING (name); |
| @@ -1566,7 +1566,7 @@ those `/' is discarded. */) | |||
| 1566 | char *target = NULL; | 1566 | char *target = NULL; |
| 1567 | int total = 0; | 1567 | int total = 0; |
| 1568 | int substituted = 0; | 1568 | int substituted = 0; |
| 1569 | int multibyte; | 1569 | bool multibyte; |
| 1570 | char *xnm; | 1570 | char *xnm; |
| 1571 | Lisp_Object handler; | 1571 | Lisp_Object handler; |
| 1572 | 1572 | ||
| @@ -3142,8 +3142,7 @@ decide_coding_unwind (Lisp_Object unwind_data) | |||
| 3142 | undo_list = XCAR (unwind_data); | 3142 | undo_list = XCAR (unwind_data); |
| 3143 | buffer = XCDR (unwind_data); | 3143 | buffer = XCDR (unwind_data); |
| 3144 | 3144 | ||
| 3145 | if (current_buffer != XBUFFER (buffer)) | 3145 | set_buffer_internal (XBUFFER (buffer)); |
| 3146 | set_buffer_internal (XBUFFER (buffer)); | ||
| 3147 | adjust_markers_for_delete (BEG, BEG_BYTE, Z, Z_BYTE); | 3146 | adjust_markers_for_delete (BEG, BEG_BYTE, Z, Z_BYTE); |
| 3148 | adjust_overlays_for_delete (BEG, Z - BEG); | 3147 | adjust_overlays_for_delete (BEG, Z - BEG); |
| 3149 | set_buffer_intervals (current_buffer, NULL); | 3148 | set_buffer_intervals (current_buffer, NULL); |
| @@ -3481,7 +3480,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3481 | Lisp_Object workbuf; | 3480 | Lisp_Object workbuf; |
| 3482 | struct buffer *buf; | 3481 | struct buffer *buf; |
| 3483 | 3482 | ||
| 3484 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 3483 | record_unwind_current_buffer (); |
| 3485 | 3484 | ||
| 3486 | workbuf = Fget_buffer_create (build_string (" *code-converting-work*")); | 3485 | workbuf = Fget_buffer_create (build_string (" *code-converting-work*")); |
| 3487 | buf = XBUFFER (workbuf); | 3486 | buf = XBUFFER (workbuf); |
| @@ -3760,7 +3759,8 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3760 | ptrdiff_t temp; | 3759 | ptrdiff_t temp; |
| 3761 | ptrdiff_t this = 0; | 3760 | ptrdiff_t this = 0; |
| 3762 | ptrdiff_t this_count = SPECPDL_INDEX (); | 3761 | ptrdiff_t this_count = SPECPDL_INDEX (); |
| 3763 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 3762 | bool multibyte |
| 3763 | = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | ||
| 3764 | Lisp_Object conversion_buffer; | 3764 | Lisp_Object conversion_buffer; |
| 3765 | struct gcpro gcpro1; | 3765 | struct gcpro gcpro1; |
| 3766 | 3766 | ||
| @@ -5306,7 +5306,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5306 | FILE *stream = NULL; | 5306 | FILE *stream = NULL; |
| 5307 | ptrdiff_t count = SPECPDL_INDEX (); | 5307 | ptrdiff_t count = SPECPDL_INDEX (); |
| 5308 | int orig_minibuffer_auto_raise = minibuffer_auto_raise; | 5308 | int orig_minibuffer_auto_raise = minibuffer_auto_raise; |
| 5309 | int old_message_p = 0; | 5309 | bool old_message_p = 0; |
| 5310 | struct gcpro gcpro1, gcpro2; | 5310 | struct gcpro gcpro1, gcpro2; |
| 5311 | 5311 | ||
| 5312 | if (max_specpdl_size < specpdl_size + 40) | 5312 | if (max_specpdl_size < specpdl_size + 40) |
diff --git a/src/firstfile.c b/src/firstfile.c index 84511cfe0ad..444fb71b55d 100644 --- a/src/firstfile.c +++ b/src/firstfile.c | |||
| @@ -27,7 +27,6 @@ static char _my_begbss[1]; | |||
| 27 | char * my_begbss_static = _my_begbss; | 27 | char * my_begbss_static = _my_begbss; |
| 28 | 28 | ||
| 29 | /* Add a dummy reference to ensure emacs.obj is linked in. */ | 29 | /* Add a dummy reference to ensure emacs.obj is linked in. */ |
| 30 | extern int initialized; | 30 | extern int main (int, char **); |
| 31 | static int * dummy = &initialized; | 31 | static int (*dummy) (int, char **) = main; |
| 32 | #endif | 32 | #endif |
| 33 | |||
| @@ -52,10 +52,6 @@ static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; | |||
| 52 | static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512; | 52 | static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512; |
| 53 | 53 | ||
| 54 | static int internal_equal (Lisp_Object , Lisp_Object, int, int); | 54 | static int internal_equal (Lisp_Object , Lisp_Object, int, int); |
| 55 | |||
| 56 | #ifndef HAVE_UNISTD_H | ||
| 57 | extern long time (); | ||
| 58 | #endif | ||
| 59 | 55 | ||
| 60 | DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, | 56 | DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, |
| 61 | doc: /* Return the argument unchanged. */) | 57 | doc: /* Return the argument unchanged. */) |
| @@ -74,32 +70,16 @@ Other values of LIMIT are ignored. */) | |||
| 74 | (Lisp_Object limit) | 70 | (Lisp_Object limit) |
| 75 | { | 71 | { |
| 76 | EMACS_INT val; | 72 | EMACS_INT val; |
| 77 | Lisp_Object lispy_val; | ||
| 78 | 73 | ||
| 79 | if (EQ (limit, Qt)) | 74 | if (EQ (limit, Qt)) |
| 80 | { | 75 | init_random (); |
| 81 | EMACS_TIME t = current_emacs_time (); | 76 | else if (STRINGP (limit)) |
| 82 | seed_random (getpid () ^ EMACS_SECS (t) ^ EMACS_NSECS (t)); | 77 | seed_random (SSDATA (limit), SBYTES (limit)); |
| 83 | } | ||
| 84 | 78 | ||
| 79 | val = get_random (); | ||
| 85 | if (NATNUMP (limit) && XFASTINT (limit) != 0) | 80 | if (NATNUMP (limit) && XFASTINT (limit) != 0) |
| 86 | { | 81 | val %= XFASTINT (limit); |
| 87 | /* Try to take our random number from the higher bits of VAL, | 82 | return make_number (val); |
| 88 | not the lower, since (says Gentzel) the low bits of `random' | ||
| 89 | are less random than the higher ones. We do this by using the | ||
| 90 | quotient rather than the remainder. At the high end of the RNG | ||
| 91 | it's possible to get a quotient larger than n; discarding | ||
| 92 | these values eliminates the bias that would otherwise appear | ||
| 93 | when using a large n. */ | ||
| 94 | EMACS_INT denominator = (INTMASK + 1) / XFASTINT (limit); | ||
| 95 | do | ||
| 96 | val = get_random () / denominator; | ||
| 97 | while (val >= XFASTINT (limit)); | ||
| 98 | } | ||
| 99 | else | ||
| 100 | val = get_random (); | ||
| 101 | XSETINT (lispy_val, val); | ||
| 102 | return lispy_val; | ||
| 103 | } | 83 | } |
| 104 | 84 | ||
| 105 | /* Heuristic on how many iterations of a tight loop can be safely done | 85 | /* Heuristic on how many iterations of a tight loop can be safely done |
| @@ -1100,7 +1080,7 @@ an error is signaled. */) | |||
| 1100 | { | 1080 | { |
| 1101 | ptrdiff_t chars = SCHARS (string); | 1081 | ptrdiff_t chars = SCHARS (string); |
| 1102 | unsigned char *str = xmalloc (chars); | 1082 | unsigned char *str = xmalloc (chars); |
| 1103 | ptrdiff_t converted = str_to_unibyte (SDATA (string), str, chars, 0); | 1083 | ptrdiff_t converted = str_to_unibyte (SDATA (string), str, chars); |
| 1104 | 1084 | ||
| 1105 | if (converted < chars) | 1085 | if (converted < chars) |
| 1106 | error ("Can't convert the %"pD"dth character to unibyte", converted); | 1086 | error ("Can't convert the %"pD"dth character to unibyte", converted); |
| @@ -2139,12 +2119,8 @@ ARRAY is a vector, string, char-table, or bool-vector. */) | |||
| 2139 | register ptrdiff_t size, idx; | 2119 | register ptrdiff_t size, idx; |
| 2140 | 2120 | ||
| 2141 | if (VECTORP (array)) | 2121 | if (VECTORP (array)) |
| 2142 | { | 2122 | for (idx = 0, size = ASIZE (array); idx < size; idx++) |
| 2143 | register Lisp_Object *p = XVECTOR (array)->contents; | 2123 | ASET (array, idx, item); |
| 2144 | size = ASIZE (array); | ||
| 2145 | for (idx = 0; idx < size; idx++) | ||
| 2146 | p[idx] = item; | ||
| 2147 | } | ||
| 2148 | else if (CHAR_TABLE_P (array)) | 2124 | else if (CHAR_TABLE_P (array)) |
| 2149 | { | 2125 | { |
| 2150 | int i; | 2126 | int i; |
| @@ -3971,8 +3947,8 @@ sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p) | |||
| 3971 | for (idx = HASH_INDEX (h, bucket); !NILP (idx); idx = next) | 3947 | for (idx = HASH_INDEX (h, bucket); !NILP (idx); idx = next) |
| 3972 | { | 3948 | { |
| 3973 | ptrdiff_t i = XFASTINT (idx); | 3949 | ptrdiff_t i = XFASTINT (idx); |
| 3974 | int key_known_to_survive_p = survives_gc_p (HASH_KEY (h, i)); | 3950 | bool key_known_to_survive_p = survives_gc_p (HASH_KEY (h, i)); |
| 3975 | int value_known_to_survive_p = survives_gc_p (HASH_VALUE (h, i)); | 3951 | bool value_known_to_survive_p = survives_gc_p (HASH_VALUE (h, i)); |
| 3976 | int remove_p; | 3952 | int remove_p; |
| 3977 | 3953 | ||
| 3978 | if (EQ (h->weak, Qkey)) | 3954 | if (EQ (h->weak, Qkey)) |
| @@ -4660,13 +4636,12 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_ | |||
| 4660 | { | 4636 | { |
| 4661 | struct buffer *prev = current_buffer; | 4637 | struct buffer *prev = current_buffer; |
| 4662 | 4638 | ||
| 4663 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 4639 | record_unwind_current_buffer (); |
| 4664 | 4640 | ||
| 4665 | CHECK_BUFFER (object); | 4641 | CHECK_BUFFER (object); |
| 4666 | 4642 | ||
| 4667 | bp = XBUFFER (object); | 4643 | bp = XBUFFER (object); |
| 4668 | if (bp != current_buffer) | 4644 | set_buffer_internal (bp); |
| 4669 | set_buffer_internal (bp); | ||
| 4670 | 4645 | ||
| 4671 | if (NILP (start)) | 4646 | if (NILP (start)) |
| 4672 | b = BEGV; | 4647 | b = BEGV; |
| @@ -4753,8 +4728,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_ | |||
| 4753 | } | 4728 | } |
| 4754 | 4729 | ||
| 4755 | object = make_buffer_string (b, e, 0); | 4730 | object = make_buffer_string (b, e, 0); |
| 4756 | if (prev != current_buffer) | 4731 | set_buffer_internal (prev); |
| 4757 | set_buffer_internal (prev); | ||
| 4758 | /* Discard the unwind protect for recovering the current | 4732 | /* Discard the unwind protect for recovering the current |
| 4759 | buffer. */ | 4733 | buffer. */ |
| 4760 | specpdl_ptr--; | 4734 | specpdl_ptr--; |
diff --git a/src/font.c b/src/font.c index 5b9e4f1cfcf..cf9964f08f3 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -38,17 +38,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | #include "fontset.h" | 38 | #include "fontset.h" |
| 39 | #include "font.h" | 39 | #include "font.h" |
| 40 | 40 | ||
| 41 | #ifdef HAVE_X_WINDOWS | 41 | #ifdef HAVE_WINDOW_SYSTEM |
| 42 | #include "xterm.h" | 42 | #include TERM_HEADER |
| 43 | #endif /* HAVE_X_WINDOWS */ | 43 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 44 | |||
| 45 | #ifdef HAVE_NTGUI | ||
| 46 | #include "w32term.h" | ||
| 47 | #endif /* HAVE_NTGUI */ | ||
| 48 | |||
| 49 | #ifdef HAVE_NS | ||
| 50 | #include "nsterm.h" | ||
| 51 | #endif /* HAVE_NS */ | ||
| 52 | 44 | ||
| 53 | Lisp_Object Qopentype; | 45 | Lisp_Object Qopentype; |
| 54 | 46 | ||
diff --git a/src/font.h b/src/font.h index 6e9387f7632..3b90bc2ab8a 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -817,6 +817,7 @@ extern struct font_driver xfont_driver; | |||
| 817 | extern void syms_of_xfont (void); | 817 | extern void syms_of_xfont (void); |
| 818 | extern void syms_of_ftxfont (void); | 818 | extern void syms_of_ftxfont (void); |
| 819 | #ifdef HAVE_XFT | 819 | #ifdef HAVE_XFT |
| 820 | extern Lisp_Object Qxft; | ||
| 820 | extern struct font_driver xftfont_driver; | 821 | extern struct font_driver xftfont_driver; |
| 821 | extern void syms_of_xftfont (void); | 822 | extern void syms_of_xftfont (void); |
| 822 | #elif defined HAVE_FREETYPE | 823 | #elif defined HAVE_FREETYPE |
diff --git a/src/fontset.c b/src/fontset.c index c39d68a8ecf..01e38fe45e5 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -185,8 +185,7 @@ void (*check_window_system_func) (void); | |||
| 185 | 185 | ||
| 186 | 186 | ||
| 187 | /* Prototype declarations for static functions. */ | 187 | /* Prototype declarations for static functions. */ |
| 188 | static Lisp_Object fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, | 188 | static void fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 189 | Lisp_Object); | ||
| 190 | static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *, | 189 | static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *, |
| 191 | int, int); | 190 | int, int); |
| 192 | static void reorder_font_vector (Lisp_Object, struct font *); | 191 | static void reorder_font_vector (Lisp_Object, struct font *); |
| @@ -213,27 +212,71 @@ fontset_id_valid_p (int id) | |||
| 213 | /* Return the fontset with ID. No check of ID's validness. */ | 212 | /* Return the fontset with ID. No check of ID's validness. */ |
| 214 | #define FONTSET_FROM_ID(id) AREF (Vfontset_table, id) | 213 | #define FONTSET_FROM_ID(id) AREF (Vfontset_table, id) |
| 215 | 214 | ||
| 216 | /* Macros to access special values of FONTSET. */ | 215 | /* Access special values of FONTSET. */ |
| 217 | #define FONTSET_ID(fontset) XCHAR_TABLE (fontset)->extras[0] | ||
| 218 | 216 | ||
| 219 | /* Macros to access special values of (base) FONTSET. */ | 217 | #define FONTSET_ID(fontset) XCHAR_TABLE (fontset)->extras[0] |
| 220 | #define FONTSET_NAME(fontset) XCHAR_TABLE (fontset)->extras[1] | 218 | static void |
| 221 | #define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[4] | 219 | set_fontset_id (Lisp_Object fontset, Lisp_Object id) |
| 222 | /* #define FONTSET_SPEC(fontset) XCHAR_TABLE (fontset)->extras[5] */ | 220 | { |
| 221 | set_char_table_extras (fontset, 0, id); | ||
| 222 | } | ||
| 223 | |||
| 224 | /* Access special values of (base) FONTSET. */ | ||
| 225 | |||
| 226 | #define FONTSET_NAME(fontset) XCHAR_TABLE (fontset)->extras[1] | ||
| 227 | static void | ||
| 228 | set_fontset_name (Lisp_Object fontset, Lisp_Object name) | ||
| 229 | { | ||
| 230 | set_char_table_extras (fontset, 1, name); | ||
| 231 | } | ||
| 232 | |||
| 233 | #define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[4] | ||
| 234 | static void | ||
| 235 | set_fontset_ascii (Lisp_Object fontset, Lisp_Object ascii) | ||
| 236 | { | ||
| 237 | set_char_table_extras (fontset, 4, ascii); | ||
| 238 | } | ||
| 239 | |||
| 240 | /* Access special values of (realized) FONTSET. */ | ||
| 241 | |||
| 242 | #define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] | ||
| 243 | static void | ||
| 244 | set_fontset_base (Lisp_Object fontset, Lisp_Object base) | ||
| 245 | { | ||
| 246 | set_char_table_extras (fontset, 2, base); | ||
| 247 | } | ||
| 248 | |||
| 249 | #define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] | ||
| 250 | static void | ||
| 251 | set_fontset_frame (Lisp_Object fontset, Lisp_Object frame) | ||
| 252 | { | ||
| 253 | set_char_table_extras (fontset, 3, frame); | ||
| 254 | } | ||
| 223 | 255 | ||
| 224 | /* Macros to access special values of (realized) FONTSET. */ | 256 | #define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5] |
| 225 | #define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] | 257 | static void |
| 226 | #define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] | 258 | set_fontset_nofont_face (Lisp_Object fontset, Lisp_Object face) |
| 227 | /* #define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] */ | 259 | { |
| 228 | #define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5] | 260 | set_char_table_extras (fontset, 5, face); |
| 229 | /* #define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] */ | 261 | } |
| 230 | #define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7] | 262 | |
| 263 | #define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7] | ||
| 264 | static void | ||
| 265 | set_fontset_default (Lisp_Object fontset, Lisp_Object def) | ||
| 266 | { | ||
| 267 | set_char_table_extras (fontset, 7, def); | ||
| 268 | } | ||
| 231 | 269 | ||
| 232 | /* For both base and realized fontset. */ | 270 | /* For both base and realized fontset. */ |
| 233 | #define FONTSET_FALLBACK(fontset) XCHAR_TABLE (fontset)->extras[8] | ||
| 234 | 271 | ||
| 235 | #define BASE_FONTSET_P(fontset) (NILP (FONTSET_BASE (fontset))) | 272 | #define FONTSET_FALLBACK(fontset) XCHAR_TABLE (fontset)->extras[8] |
| 273 | static void | ||
| 274 | set_fontset_fallback (Lisp_Object fontset, Lisp_Object fallback) | ||
| 275 | { | ||
| 276 | set_char_table_extras (fontset, 8, fallback); | ||
| 277 | } | ||
| 236 | 278 | ||
| 279 | #define BASE_FONTSET_P(fontset) (NILP (FONTSET_BASE (fontset))) | ||
| 237 | 280 | ||
| 238 | /* Macros for FONT-DEF and RFONT-DEF of fontset. */ | 281 | /* Macros for FONT-DEF and RFONT-DEF of fontset. */ |
| 239 | #define FONT_DEF_NEW(font_def, font_spec, encoding, repertory) \ | 282 | #define FONT_DEF_NEW(font_def, font_spec, encoding, repertory) \ |
| @@ -265,7 +308,7 @@ fontset_id_valid_p (int id) | |||
| 265 | #define RFONT_DEF_NEW(rfont_def, font_def) \ | 308 | #define RFONT_DEF_NEW(rfont_def, font_def) \ |
| 266 | do { \ | 309 | do { \ |
| 267 | (rfont_def) = Fmake_vector (make_number (4), Qnil); \ | 310 | (rfont_def) = Fmake_vector (make_number (4), Qnil); \ |
| 268 | ASET ((rfont_def), 1, (font_def)); \ | 311 | ASET ((rfont_def), 1, (font_def)); \ |
| 269 | RFONT_DEF_SET_SCORE ((rfont_def), 0); \ | 312 | RFONT_DEF_SET_SCORE ((rfont_def), 0); \ |
| 270 | } while (0) | 313 | } while (0) |
| 271 | 314 | ||
| @@ -307,15 +350,17 @@ fontset_ref (Lisp_Object fontset, int c) | |||
| 307 | replace with ELT, if ADD is `prepend', prepend ELT, otherwise, | 350 | replace with ELT, if ADD is `prepend', prepend ELT, otherwise, |
| 308 | append ELT. */ | 351 | append ELT. */ |
| 309 | 352 | ||
| 310 | #define FONTSET_ADD(fontset, range, elt, add) \ | 353 | #define FONTSET_ADD(fontset, range, elt, add) \ |
| 311 | (NILP (add) \ | 354 | (NILP (add) \ |
| 312 | ? (NILP (range) \ | 355 | ? (NILP (range) \ |
| 313 | ? (FONTSET_FALLBACK (fontset) = Fmake_vector (make_number (1), (elt))) \ | 356 | ? (set_fontset_fallback \ |
| 314 | : Fset_char_table_range ((fontset), (range), \ | 357 | (fontset, Fmake_vector (make_number (1), (elt)))) \ |
| 315 | Fmake_vector (make_number (1), (elt)))) \ | 358 | : ((void) \ |
| 359 | Fset_char_table_range (fontset, range, \ | ||
| 360 | Fmake_vector (make_number (1), elt)))) \ | ||
| 316 | : fontset_add ((fontset), (range), (elt), (add))) | 361 | : fontset_add ((fontset), (range), (elt), (add))) |
| 317 | 362 | ||
| 318 | static Lisp_Object | 363 | static void |
| 319 | fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add) | 364 | fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add) |
| 320 | { | 365 | { |
| 321 | Lisp_Object args[2]; | 366 | Lisp_Object args[2]; |
| @@ -341,10 +386,9 @@ fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Objec | |||
| 341 | else | 386 | else |
| 342 | { | 387 | { |
| 343 | args[idx] = FONTSET_FALLBACK (fontset); | 388 | args[idx] = FONTSET_FALLBACK (fontset); |
| 344 | FONTSET_FALLBACK (fontset) | 389 | set_fontset_fallback |
| 345 | = NILP (args[idx]) ? args[1 - idx] : Fvconcat (2, args); | 390 | (fontset, NILP (args[idx]) ? args[1 - idx] : Fvconcat (2, args)); |
| 346 | } | 391 | } |
| 347 | return Qnil; | ||
| 348 | } | 392 | } |
| 349 | 393 | ||
| 350 | static int | 394 | static int |
| @@ -485,7 +529,7 @@ fontset_get_font_group (Lisp_Object fontset, int c) | |||
| 485 | if (c >= 0) | 529 | if (c >= 0) |
| 486 | char_table_set_range (fontset, from, to, font_group); | 530 | char_table_set_range (fontset, from, to, font_group); |
| 487 | else | 531 | else |
| 488 | FONTSET_FALLBACK (fontset) = font_group; | 532 | set_fontset_fallback (fontset, font_group); |
| 489 | return font_group; | 533 | return font_group; |
| 490 | } | 534 | } |
| 491 | 535 | ||
| @@ -720,8 +764,9 @@ fontset_font (Lisp_Object fontset, int c, struct face *face, int id) | |||
| 720 | if (! EQ (base_fontset, Vdefault_fontset)) | 764 | if (! EQ (base_fontset, Vdefault_fontset)) |
| 721 | { | 765 | { |
| 722 | if (NILP (FONTSET_DEFAULT (fontset))) | 766 | if (NILP (FONTSET_DEFAULT (fontset))) |
| 723 | FONTSET_DEFAULT (fontset) | 767 | set_fontset_default |
| 724 | = make_fontset (FONTSET_FRAME (fontset), Qnil, Vdefault_fontset); | 768 | (fontset, |
| 769 | make_fontset (FONTSET_FRAME (fontset), Qnil, Vdefault_fontset)); | ||
| 725 | FONT_DEFERRED_LOG ("default fontset: font for", make_number (c), Qnil); | 770 | FONT_DEFERRED_LOG ("default fontset: font for", make_number (c), Qnil); |
| 726 | default_rfont_def | 771 | default_rfont_def |
| 727 | = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 0); | 772 | = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 0); |
| @@ -781,16 +826,14 @@ make_fontset (Lisp_Object frame, Lisp_Object name, Lisp_Object base) | |||
| 781 | 826 | ||
| 782 | fontset = Fmake_char_table (Qfontset, Qnil); | 827 | fontset = Fmake_char_table (Qfontset, Qnil); |
| 783 | 828 | ||
| 784 | FONTSET_ID (fontset) = make_number (id); | 829 | set_fontset_id (fontset, make_number (id)); |
| 785 | if (NILP (base)) | 830 | if (NILP (base)) |
| 786 | { | 831 | set_fontset_name (fontset, name); |
| 787 | FONTSET_NAME (fontset) = name; | ||
| 788 | } | ||
| 789 | else | 832 | else |
| 790 | { | 833 | { |
| 791 | FONTSET_NAME (fontset) = Qnil; | 834 | set_fontset_name (fontset, Qnil); |
| 792 | FONTSET_FRAME (fontset) = frame; | 835 | set_fontset_frame (fontset, frame); |
| 793 | FONTSET_BASE (fontset) = base; | 836 | set_fontset_base (fontset, base); |
| 794 | } | 837 | } |
| 795 | 838 | ||
| 796 | ASET (Vfontset_table, id, fontset); | 839 | ASET (Vfontset_table, id, fontset); |
| @@ -958,7 +1001,7 @@ face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object objec | |||
| 958 | else | 1001 | else |
| 959 | { | 1002 | { |
| 960 | face_id = face_for_font (f, Qnil, face); | 1003 | face_id = face_for_font (f, Qnil, face); |
| 961 | FONTSET_NOFONT_FACE (fontset) = make_number (face_id); | 1004 | set_fontset_nofont_face (fontset, make_number (face_id)); |
| 962 | } | 1005 | } |
| 963 | } | 1006 | } |
| 964 | eassert (face_id >= 0); | 1007 | eassert (face_id >= 0); |
| @@ -1580,7 +1623,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) | |||
| 1580 | Lisp_Object tail, fr, alist; | 1623 | Lisp_Object tail, fr, alist; |
| 1581 | int fontset_id = XINT (FONTSET_ID (fontset)); | 1624 | int fontset_id = XINT (FONTSET_ID (fontset)); |
| 1582 | 1625 | ||
| 1583 | FONTSET_ASCII (fontset) = fontname; | 1626 | set_fontset_ascii (fontset, fontname); |
| 1584 | name = FONTSET_NAME (fontset); | 1627 | name = FONTSET_NAME (fontset); |
| 1585 | FOR_EACH_FRAME (tail, fr) | 1628 | FOR_EACH_FRAME (tail, fr) |
| 1586 | { | 1629 | { |
| @@ -1658,7 +1701,7 @@ FONT-SPEC is a vector, a cons, or a string. See the documentation of | |||
| 1658 | len = font_unparse_xlfd (font_spec, 0, xlfd, 256); | 1701 | len = font_unparse_xlfd (font_spec, 0, xlfd, 256); |
| 1659 | if (len < 0) | 1702 | if (len < 0) |
| 1660 | error ("Invalid fontset name (perhaps too long): %s", SDATA (name)); | 1703 | error ("Invalid fontset name (perhaps too long): %s", SDATA (name)); |
| 1661 | FONTSET_ASCII (fontset) = make_unibyte_string (xlfd, len); | 1704 | set_fontset_ascii (fontset, make_unibyte_string (xlfd, len)); |
| 1662 | } | 1705 | } |
| 1663 | else | 1706 | else |
| 1664 | { | 1707 | { |
| @@ -1744,7 +1787,7 @@ fontset_from_font (Lisp_Object font_object) | |||
| 1744 | Fset_fontset_font (name, Qnil, font_spec, Qnil, Qnil); | 1787 | Fset_fontset_font (name, Qnil, font_spec, Qnil, Qnil); |
| 1745 | } | 1788 | } |
| 1746 | 1789 | ||
| 1747 | FONTSET_ASCII (fontset) = font_name; | 1790 | set_fontset_ascii (fontset, font_name); |
| 1748 | 1791 | ||
| 1749 | return XINT (FONTSET_ID (fontset)); | 1792 | return XINT (FONTSET_ID (fontset)); |
| 1750 | } | 1793 | } |
| @@ -2161,9 +2204,10 @@ syms_of_fontset (void) | |||
| 2161 | 2204 | ||
| 2162 | Vdefault_fontset = Fmake_char_table (Qfontset, Qnil); | 2205 | Vdefault_fontset = Fmake_char_table (Qfontset, Qnil); |
| 2163 | staticpro (&Vdefault_fontset); | 2206 | staticpro (&Vdefault_fontset); |
| 2164 | FONTSET_ID (Vdefault_fontset) = make_number (0); | 2207 | set_fontset_id (Vdefault_fontset, make_number (0)); |
| 2165 | FONTSET_NAME (Vdefault_fontset) | 2208 | set_fontset_name |
| 2166 | = build_pure_c_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); | 2209 | (Vdefault_fontset, |
| 2210 | build_pure_c_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default")); | ||
| 2167 | ASET (Vfontset_table, 0, Vdefault_fontset); | 2211 | ASET (Vfontset_table, 0, Vdefault_fontset); |
| 2168 | next_fontset_id = 1; | 2212 | next_fontset_id = 1; |
| 2169 | 2213 | ||
diff --git a/src/frame.c b/src/frame.c index a00f44a1e5a..968cb4905a2 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -30,15 +30,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | 30 | ||
| 31 | #include "lisp.h" | 31 | #include "lisp.h" |
| 32 | #include "character.h" | 32 | #include "character.h" |
| 33 | #ifdef HAVE_X_WINDOWS | 33 | |
| 34 | #include "xterm.h" | 34 | #ifdef HAVE_WINDOW_SYSTEM |
| 35 | #endif | 35 | #include TERM_HEADER |
| 36 | #ifdef WINDOWSNT | 36 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 37 | #include "w32term.h" | 37 | |
| 38 | #endif | ||
| 39 | #ifdef HAVE_NS | ||
| 40 | #include "nsterm.h" | ||
| 41 | #endif | ||
| 42 | #include "buffer.h" | 38 | #include "buffer.h" |
| 43 | /* These help us bind and responding to switch-frame events. */ | 39 | /* These help us bind and responding to switch-frame events. */ |
| 44 | #include "commands.h" | 40 | #include "commands.h" |
| @@ -58,11 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | #include "dosfns.h" | 54 | #include "dosfns.h" |
| 59 | #endif | 55 | #endif |
| 60 | 56 | ||
| 61 | |||
| 62 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 63 | |||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef HAVE_NS | 57 | #ifdef HAVE_NS |
| 67 | Lisp_Object Qns_parse_geometry; | 58 | Lisp_Object Qns_parse_geometry; |
| 68 | #endif | 59 | #endif |
| @@ -4247,7 +4238,6 @@ syms_of_frame (void) | |||
| 4247 | DEFSYM (Qx, "x"); | 4238 | DEFSYM (Qx, "x"); |
| 4248 | DEFSYM (Qw32, "w32"); | 4239 | DEFSYM (Qw32, "w32"); |
| 4249 | DEFSYM (Qpc, "pc"); | 4240 | DEFSYM (Qpc, "pc"); |
| 4250 | DEFSYM (Qmac, "mac"); | ||
| 4251 | DEFSYM (Qns, "ns"); | 4241 | DEFSYM (Qns, "ns"); |
| 4252 | DEFSYM (Qvisible, "visible"); | 4242 | DEFSYM (Qvisible, "visible"); |
| 4253 | DEFSYM (Qbuffer_predicate, "buffer-predicate"); | 4243 | DEFSYM (Qbuffer_predicate, "buffer-predicate"); |
diff --git a/src/frame.h b/src/frame.h index 92fbda42c70..1fe3ebd9182 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -34,7 +34,7 @@ INLINE_HEADER_BEGIN | |||
| 34 | /* Miscellanea. */ | 34 | /* Miscellanea. */ |
| 35 | 35 | ||
| 36 | /* Nonzero means there is at least one garbaged frame. */ | 36 | /* Nonzero means there is at least one garbaged frame. */ |
| 37 | extern int frame_garbaged; | 37 | extern bool frame_garbaged; |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | /* The structure representing a frame. */ | 40 | /* The structure representing a frame. */ |
| @@ -361,7 +361,7 @@ struct frame | |||
| 361 | #endif | 361 | #endif |
| 362 | 362 | ||
| 363 | /* Nonzero if last attempt at redisplay on this frame was preempted. */ | 363 | /* Nonzero if last attempt at redisplay on this frame was preempted. */ |
| 364 | unsigned char display_preempted : 1; | 364 | unsigned display_preempted : 1; |
| 365 | 365 | ||
| 366 | /* visible is nonzero if the frame is currently displayed; we check | 366 | /* visible is nonzero if the frame is currently displayed; we check |
| 367 | it to see if we should bother updating the frame's contents. | 367 | it to see if we should bother updating the frame's contents. |
| @@ -391,8 +391,8 @@ struct frame | |||
| 391 | 391 | ||
| 392 | These two are mutually exclusive. They might both be zero, if the | 392 | These two are mutually exclusive. They might both be zero, if the |
| 393 | frame has been made invisible without an icon. */ | 393 | frame has been made invisible without an icon. */ |
| 394 | unsigned char visible : 2; | 394 | unsigned visible : 2; |
| 395 | unsigned char iconified : 1; | 395 | unsigned iconified : 1; |
| 396 | 396 | ||
| 397 | /* Let's not use bitfields for volatile variables. */ | 397 | /* Let's not use bitfields for volatile variables. */ |
| 398 | 398 | ||
| @@ -406,40 +406,40 @@ struct frame | |||
| 406 | 406 | ||
| 407 | /* True if frame actually has a minibuffer window on it. | 407 | /* True if frame actually has a minibuffer window on it. |
| 408 | 0 if using a minibuffer window that isn't on this frame. */ | 408 | 0 if using a minibuffer window that isn't on this frame. */ |
| 409 | unsigned char has_minibuffer : 1; | 409 | unsigned has_minibuffer : 1; |
| 410 | 410 | ||
| 411 | /* 0 means, if this frame has just one window, | 411 | /* 0 means, if this frame has just one window, |
| 412 | show no modeline for that window. */ | 412 | show no modeline for that window. */ |
| 413 | unsigned char wants_modeline : 1; | 413 | unsigned wants_modeline : 1; |
| 414 | 414 | ||
| 415 | /* Non-zero if the hardware device this frame is displaying on can | 415 | /* Non-zero if the hardware device this frame is displaying on can |
| 416 | support scroll bars. */ | 416 | support scroll bars. */ |
| 417 | char can_have_scroll_bars; | 417 | char can_have_scroll_bars; |
| 418 | 418 | ||
| 419 | /* Non-0 means raise this frame to the top of the heap when selected. */ | 419 | /* Non-0 means raise this frame to the top of the heap when selected. */ |
| 420 | unsigned char auto_raise : 1; | 420 | unsigned auto_raise : 1; |
| 421 | 421 | ||
| 422 | /* Non-0 means lower this frame to the bottom of the stack when left. */ | 422 | /* Non-0 means lower this frame to the bottom of the stack when left. */ |
| 423 | unsigned char auto_lower : 1; | 423 | unsigned auto_lower : 1; |
| 424 | 424 | ||
| 425 | /* True if frame's root window can't be split. */ | 425 | /* True if frame's root window can't be split. */ |
| 426 | unsigned char no_split : 1; | 426 | unsigned no_split : 1; |
| 427 | 427 | ||
| 428 | /* If this is set, then Emacs won't change the frame name to indicate | 428 | /* If this is set, then Emacs won't change the frame name to indicate |
| 429 | the current buffer, etcetera. If the user explicitly sets the frame | 429 | the current buffer, etcetera. If the user explicitly sets the frame |
| 430 | name, this gets set. If the user sets the name to Qnil, this is | 430 | name, this gets set. If the user sets the name to Qnil, this is |
| 431 | cleared. */ | 431 | cleared. */ |
| 432 | unsigned char explicit_name : 1; | 432 | unsigned explicit_name : 1; |
| 433 | 433 | ||
| 434 | /* Nonzero if size of some window on this frame has changed. */ | 434 | /* Nonzero if size of some window on this frame has changed. */ |
| 435 | unsigned char window_sizes_changed : 1; | 435 | unsigned window_sizes_changed : 1; |
| 436 | 436 | ||
| 437 | /* Nonzero if the mouse has moved on this display device | 437 | /* Nonzero if the mouse has moved on this display device |
| 438 | since the last time we checked. */ | 438 | since the last time we checked. */ |
| 439 | unsigned char mouse_moved :1; | 439 | unsigned mouse_moved :1; |
| 440 | 440 | ||
| 441 | /* Nonzero means that the pointer is invisible. */ | 441 | /* Nonzero means that the pointer is invisible. */ |
| 442 | unsigned char pointer_invisible :1; | 442 | unsigned pointer_invisible :1; |
| 443 | 443 | ||
| 444 | /* If can_have_scroll_bars is non-zero, this is non-zero if we should | 444 | /* If can_have_scroll_bars is non-zero, this is non-zero if we should |
| 445 | actually display them on this frame. */ | 445 | actually display them on this frame. */ |
| @@ -621,11 +621,21 @@ typedef struct frame *FRAME_PTR; | |||
| 621 | #define FRAME_INITIAL_P(f) ((f)->output_method == output_initial) | 621 | #define FRAME_INITIAL_P(f) ((f)->output_method == output_initial) |
| 622 | #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap) | 622 | #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap) |
| 623 | #define FRAME_X_P(f) ((f)->output_method == output_x_window) | 623 | #define FRAME_X_P(f) ((f)->output_method == output_x_window) |
| 624 | #ifndef WINDOWSNT | ||
| 625 | #define FRAME_W32_P(f) (0) | ||
| 626 | #else | ||
| 624 | #define FRAME_W32_P(f) ((f)->output_method == output_w32) | 627 | #define FRAME_W32_P(f) ((f)->output_method == output_w32) |
| 628 | #endif | ||
| 629 | #ifndef MSDOS | ||
| 630 | #define FRAME_MSDOS_P(f) (0) | ||
| 631 | #else | ||
| 625 | #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw) | 632 | #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw) |
| 626 | #define FRAME_MAC_P(f) ((f)->output_method == output_mac) | 633 | #endif |
| 634 | #ifndef HAVE_NS | ||
| 635 | #define FRAME_NS_P(f) (0) | ||
| 636 | #else | ||
| 627 | #define FRAME_NS_P(f) ((f)->output_method == output_ns) | 637 | #define FRAME_NS_P(f) ((f)->output_method == output_ns) |
| 628 | 638 | #endif | |
| 629 | /* FRAME_WINDOW_P tests whether the frame is a window, and is | 639 | /* FRAME_WINDOW_P tests whether the frame is a window, and is |
| 630 | defined to be the predicate for the window system being used. */ | 640 | defined to be the predicate for the window system being used. */ |
| 631 | 641 | ||
| @@ -1196,6 +1206,7 @@ extern Lisp_Object Qrun_hook_with_args; | |||
| 1196 | extern void x_set_scroll_bar_default_width (struct frame *); | 1206 | extern void x_set_scroll_bar_default_width (struct frame *); |
| 1197 | extern void x_set_offset (struct frame *, int, int, int); | 1207 | extern void x_set_offset (struct frame *, int, int, int); |
| 1198 | extern void x_wm_set_icon_position (struct frame *, int, int); | 1208 | extern void x_wm_set_icon_position (struct frame *, int, int); |
| 1209 | extern void x_wm_set_size_hint (FRAME_PTR f, long flags, int user_position); | ||
| 1199 | 1210 | ||
| 1200 | extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); | 1211 | extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); |
| 1201 | 1212 | ||
| @@ -1241,10 +1252,40 @@ extern Lisp_Object display_x_get_resource (Display_Info *, | |||
| 1241 | Lisp_Object component, | 1252 | Lisp_Object component, |
| 1242 | Lisp_Object subclass); | 1253 | Lisp_Object subclass); |
| 1243 | 1254 | ||
| 1255 | extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); | ||
| 1256 | extern void x_set_window_size (struct frame *f, int change_grav, | ||
| 1257 | int cols, int rows); | ||
| 1258 | extern void x_sync (struct frame *); | ||
| 1259 | extern Lisp_Object x_get_focus_frame (struct frame *); | ||
| 1260 | extern void x_set_mouse_position (struct frame *f, int h, int v); | ||
| 1261 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | ||
| 1262 | extern void x_make_frame_visible (struct frame *f); | ||
| 1263 | extern void x_make_frame_invisible (struct frame *f); | ||
| 1264 | extern void x_iconify_frame (struct frame *f); | ||
| 1265 | extern int x_char_width (struct frame *f); | ||
| 1266 | extern int x_char_height (struct frame *f); | ||
| 1267 | extern int x_pixel_width (struct frame *f); | ||
| 1268 | extern int x_pixel_height (struct frame *f); | ||
| 1269 | extern void x_set_frame_alpha (struct frame *f); | ||
| 1270 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1271 | extern void x_set_tool_bar_lines (struct frame *f, | ||
| 1272 | Lisp_Object value, | ||
| 1273 | Lisp_Object oldval); | ||
| 1274 | extern void x_activate_menubar (struct frame *); | ||
| 1275 | extern void x_real_positions (struct frame *, int *, int *); | ||
| 1276 | extern int x_bitmap_icon (struct frame *, Lisp_Object); | ||
| 1277 | extern void x_set_menu_bar_lines (struct frame *, | ||
| 1278 | Lisp_Object, | ||
| 1279 | Lisp_Object); | ||
| 1280 | extern void free_frame_menubar (struct frame *); | ||
| 1281 | extern void x_free_frame_resources (struct frame *); | ||
| 1282 | |||
| 1244 | #if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT | 1283 | #if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT |
| 1245 | extern char *x_get_resource_string (const char *, const char *); | 1284 | extern char *x_get_resource_string (const char *, const char *); |
| 1246 | #endif | 1285 | #endif |
| 1247 | 1286 | ||
| 1287 | extern void x_query_colors (struct frame *f, XColor *, int); | ||
| 1288 | |||
| 1248 | /* In xmenu.c */ | 1289 | /* In xmenu.c */ |
| 1249 | extern void set_frame_menubar (FRAME_PTR, int, int); | 1290 | extern void set_frame_menubar (FRAME_PTR, int, int); |
| 1250 | 1291 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 2941605d448..f0d2c022f0c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1348,13 +1348,14 @@ x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position) | |||
| 1348 | size_hints.height_inc = FRAME_LINE_HEIGHT (f); | 1348 | size_hints.height_inc = FRAME_LINE_HEIGHT (f); |
| 1349 | 1349 | ||
| 1350 | hint_flags |= GDK_HINT_BASE_SIZE; | 1350 | hint_flags |= GDK_HINT_BASE_SIZE; |
| 1351 | base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f); | 1351 | /* Use one row/col here so base_height/width does not become zero. |
| 1352 | /* Use one row here so base_height does not become zero. | ||
| 1353 | Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. */ | 1352 | Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. */ |
| 1353 | base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f); | ||
| 1354 | base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1) | 1354 | base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1) |
| 1355 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); | 1355 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); |
| 1356 | 1356 | ||
| 1357 | check_frame_size (f, &min_rows, &min_cols); | 1357 | check_frame_size (f, &min_rows, &min_cols); |
| 1358 | if (min_cols > 0) --min_cols; /* We used one col in base_width = ... 1); */ | ||
| 1358 | if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */ | 1359 | if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */ |
| 1359 | 1360 | ||
| 1360 | size_hints.base_width = base_width; | 1361 | size_hints.base_width = base_width; |
| @@ -2018,11 +2019,6 @@ xg_get_file_name (FRAME_PTR f, | |||
| 2018 | 2019 | ||
| 2019 | #if USE_NEW_GTK_FONT_CHOOSER | 2020 | #if USE_NEW_GTK_FONT_CHOOSER |
| 2020 | 2021 | ||
| 2021 | extern Lisp_Object Qxft, Qnormal; | ||
| 2022 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; | ||
| 2023 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; | ||
| 2024 | extern Lisp_Object Qoblique, Qitalic; | ||
| 2025 | |||
| 2026 | #define XG_WEIGHT_TO_SYMBOL(w) \ | 2022 | #define XG_WEIGHT_TO_SYMBOL(w) \ |
| 2027 | (w <= PANGO_WEIGHT_THIN ? Qextra_light \ | 2023 | (w <= PANGO_WEIGHT_THIN ? Qextra_light \ |
| 2028 | : w <= PANGO_WEIGHT_ULTRALIGHT ? Qlight \ | 2024 | : w <= PANGO_WEIGHT_ULTRALIGHT ? Qlight \ |
| @@ -2042,6 +2038,7 @@ extern Lisp_Object Qoblique, Qitalic; | |||
| 2042 | 2038 | ||
| 2043 | 2039 | ||
| 2044 | static char *x_last_font_name; | 2040 | static char *x_last_font_name; |
| 2041 | extern Lisp_Object Qxft; | ||
| 2045 | 2042 | ||
| 2046 | /* Pop up a GTK font selector and return the name of the font the user | 2043 | /* Pop up a GTK font selector and return the name of the font the user |
| 2047 | selects, as a C string. The returned font name follows GTK's own | 2044 | selects, as a C string. The returned font name follows GTK's own |
diff --git a/src/gtkutil.h b/src/gtkutil.h index 462e879d3e7..926478dd728 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h | |||
| @@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | 25 | ||
| 26 | #include <gtk/gtk.h> | 26 | #include <gtk/gtk.h> |
| 27 | #include "frame.h" | 27 | #include "frame.h" |
| 28 | #include "xterm.h" | ||
| 28 | 29 | ||
| 29 | /* Minimum and maximum values used for GTK scroll bars */ | 30 | /* Minimum and maximum values used for GTK scroll bars */ |
| 30 | 31 | ||
| @@ -149,9 +150,6 @@ extern GdkCursor * xg_create_default_cursor (Display *dpy); | |||
| 149 | 150 | ||
| 150 | extern int xg_create_frame_widgets (FRAME_PTR f); | 151 | extern int xg_create_frame_widgets (FRAME_PTR f); |
| 151 | extern void xg_free_frame_widgets (FRAME_PTR f); | 152 | extern void xg_free_frame_widgets (FRAME_PTR f); |
| 152 | extern void x_wm_set_size_hint (FRAME_PTR f, | ||
| 153 | long flags, | ||
| 154 | int user_position); | ||
| 155 | extern void xg_set_background_color (FRAME_PTR f, unsigned long bg); | 153 | extern void xg_set_background_color (FRAME_PTR f, unsigned long bg); |
| 156 | extern int xg_check_special_colors (struct frame *f, | 154 | extern int xg_check_special_colors (struct frame *f, |
| 157 | const char *color_name, | 155 | const char *color_name, |
diff --git a/src/image.c b/src/image.c index f2778165ece..3e021677e09 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -50,11 +50,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 50 | #include "termhooks.h" | 50 | #include "termhooks.h" |
| 51 | #include "font.h" | 51 | #include "font.h" |
| 52 | 52 | ||
| 53 | #ifdef HAVE_X_WINDOWS | 53 | #ifdef HAVE_SYS_STAT_H |
| 54 | #include "xterm.h" | ||
| 55 | #include <sys/types.h> | ||
| 56 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
| 55 | #endif /* HAVE_SYS_STAT_H */ | ||
| 56 | |||
| 57 | #ifdef HAVE_SYS_TYPES_H | ||
| 58 | #include <sys/types.h> | ||
| 59 | #endif /* HAVE_SYS_TYPES_H */ | ||
| 60 | |||
| 61 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 62 | #include TERM_HEADER | ||
| 63 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 57 | 64 | ||
| 65 | #ifdef HAVE_X_WINDOWS | ||
| 58 | #define COLOR_TABLE_SUPPORT 1 | 66 | #define COLOR_TABLE_SUPPORT 1 |
| 59 | 67 | ||
| 60 | typedef struct x_bitmap_record Bitmap_Record; | 68 | typedef struct x_bitmap_record Bitmap_Record; |
| @@ -67,11 +75,8 @@ typedef struct x_bitmap_record Bitmap_Record; | |||
| 67 | #define PIX_MASK_DRAW 1 | 75 | #define PIX_MASK_DRAW 1 |
| 68 | #endif /* HAVE_X_WINDOWS */ | 76 | #endif /* HAVE_X_WINDOWS */ |
| 69 | 77 | ||
| 70 | |||
| 71 | #ifdef HAVE_NTGUI | 78 | #ifdef HAVE_NTGUI |
| 72 | #include "w32.h" | 79 | #include "w32.h" |
| 73 | #include "w32term.h" | ||
| 74 | |||
| 75 | /* W32_TODO : Color tables on W32. */ | 80 | /* W32_TODO : Color tables on W32. */ |
| 76 | #undef COLOR_TABLE_SUPPORT | 81 | #undef COLOR_TABLE_SUPPORT |
| 77 | 82 | ||
| @@ -84,15 +89,9 @@ typedef struct w32_bitmap_record Bitmap_Record; | |||
| 84 | #define PIX_MASK_RETAIN 0 | 89 | #define PIX_MASK_RETAIN 0 |
| 85 | #define PIX_MASK_DRAW 1 | 90 | #define PIX_MASK_DRAW 1 |
| 86 | 91 | ||
| 87 | #define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual | ||
| 88 | #define x_defined_color w32_defined_color | 92 | #define x_defined_color w32_defined_color |
| 89 | #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) | 93 | #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) |
| 90 | 94 | ||
| 91 | /* Functions from w32term.c that depend on XColor (so can't go in w32term.h | ||
| 92 | without modifying lots of files). */ | ||
| 93 | extern void x_query_colors (struct frame *f, XColor *colors, int ncolors); | ||
| 94 | extern void x_query_color (struct frame *f, XColor *color); | ||
| 95 | |||
| 96 | /* Version of libpng that we were compiled with, or -1 if no PNG | 95 | /* Version of libpng that we were compiled with, or -1 if no PNG |
| 97 | support was compiled in. This is tested by w32-win.el to correctly | 96 | support was compiled in. This is tested by w32-win.el to correctly |
| 98 | set up the alist used to search for PNG libraries. */ | 97 | set up the alist used to search for PNG libraries. */ |
| @@ -100,10 +99,6 @@ Lisp_Object Qlibpng_version; | |||
| 100 | #endif /* HAVE_NTGUI */ | 99 | #endif /* HAVE_NTGUI */ |
| 101 | 100 | ||
| 102 | #ifdef HAVE_NS | 101 | #ifdef HAVE_NS |
| 103 | #include "nsterm.h" | ||
| 104 | #include <sys/types.h> | ||
| 105 | #include <sys/stat.h> | ||
| 106 | |||
| 107 | #undef COLOR_TABLE_SUPPORT | 102 | #undef COLOR_TABLE_SUPPORT |
| 108 | 103 | ||
| 109 | typedef struct ns_bitmap_record Bitmap_Record; | 104 | typedef struct ns_bitmap_record Bitmap_Record; |
| @@ -117,10 +112,8 @@ typedef struct ns_bitmap_record Bitmap_Record; | |||
| 117 | #define PIX_MASK_RETAIN 0 | 112 | #define PIX_MASK_RETAIN 0 |
| 118 | #define PIX_MASK_DRAW 1 | 113 | #define PIX_MASK_DRAW 1 |
| 119 | 114 | ||
| 120 | #define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO (f)->visual | ||
| 121 | #define x_defined_color(f, name, color_def, alloc) \ | 115 | #define x_defined_color(f, name, color_def, alloc) \ |
| 122 | ns_defined_color (f, name, color_def, alloc, 0) | 116 | ns_defined_color (f, name, color_def, alloc, 0) |
| 123 | #define FRAME_X_SCREEN(f) 0 | ||
| 124 | #define DefaultDepthOfScreen(screen) x_display_list->n_planes | 117 | #define DefaultDepthOfScreen(screen) x_display_list->n_planes |
| 125 | #endif /* HAVE_NS */ | 118 | #endif /* HAVE_NS */ |
| 126 | 119 | ||
| @@ -5524,13 +5517,13 @@ init_png_functions (Lisp_Object libraries) | |||
| 5524 | 5517 | ||
| 5525 | 5518 | ||
| 5526 | #if (PNG_LIBPNG_VER < 10500) | 5519 | #if (PNG_LIBPNG_VER < 10500) |
| 5527 | #define PNG_LONGJMP(ptr) (longjmp ((ptr)->jmpbuf, 1)) | 5520 | #define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1)) |
| 5528 | #define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) | 5521 | #define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) |
| 5529 | #else | 5522 | #else |
| 5530 | /* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ | 5523 | /* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ |
| 5531 | #define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) | 5524 | #define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) |
| 5532 | #define PNG_JMPBUF(ptr) \ | 5525 | #define PNG_JMPBUF(ptr) \ |
| 5533 | (*fn_png_set_longjmp_fn ((ptr), longjmp, sizeof (jmp_buf))) | 5526 | (*fn_png_set_longjmp_fn ((ptr), _longjmp, sizeof (jmp_buf))) |
| 5534 | #endif | 5527 | #endif |
| 5535 | 5528 | ||
| 5536 | /* Error and warning handlers installed when the PNG library | 5529 | /* Error and warning handlers installed when the PNG library |
| @@ -5703,7 +5696,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5703 | 5696 | ||
| 5704 | /* Set error jump-back. We come back here when the PNG library | 5697 | /* Set error jump-back. We come back here when the PNG library |
| 5705 | detects an error. */ | 5698 | detects an error. */ |
| 5706 | if (setjmp (PNG_JMPBUF (png_ptr))) | 5699 | if (_setjmp (PNG_JMPBUF (png_ptr))) |
| 5707 | { | 5700 | { |
| 5708 | error: | 5701 | error: |
| 5709 | if (png_ptr) | 5702 | if (png_ptr) |
| @@ -6121,7 +6114,7 @@ static _Noreturn void | |||
| 6121 | my_error_exit (j_common_ptr cinfo) | 6114 | my_error_exit (j_common_ptr cinfo) |
| 6122 | { | 6115 | { |
| 6123 | struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; | 6116 | struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; |
| 6124 | longjmp (mgr->setjmp_buffer, 1); | 6117 | _longjmp (mgr->setjmp_buffer, 1); |
| 6125 | } | 6118 | } |
| 6126 | 6119 | ||
| 6127 | 6120 | ||
| @@ -6372,7 +6365,7 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6372 | cinfo.err = fn_jpeg_std_error (&mgr.pub); | 6365 | cinfo.err = fn_jpeg_std_error (&mgr.pub); |
| 6373 | mgr.pub.error_exit = my_error_exit; | 6366 | mgr.pub.error_exit = my_error_exit; |
| 6374 | 6367 | ||
| 6375 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) | 6368 | if ((rc = _setjmp (mgr.setjmp_buffer)) != 0) |
| 6376 | { | 6369 | { |
| 6377 | if (rc == 1) | 6370 | if (rc == 1) |
| 6378 | { | 6371 | { |
| @@ -6418,12 +6411,12 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6418 | if (!check_image_size (f, width, height)) | 6411 | if (!check_image_size (f, width, height)) |
| 6419 | { | 6412 | { |
| 6420 | image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); | 6413 | image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); |
| 6421 | longjmp (mgr.setjmp_buffer, 2); | 6414 | _longjmp (mgr.setjmp_buffer, 2); |
| 6422 | } | 6415 | } |
| 6423 | 6416 | ||
| 6424 | /* Create X image and pixmap. */ | 6417 | /* Create X image and pixmap. */ |
| 6425 | if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) | 6418 | if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) |
| 6426 | longjmp (mgr.setjmp_buffer, 2); | 6419 | _longjmp (mgr.setjmp_buffer, 2); |
| 6427 | 6420 | ||
| 6428 | /* Allocate colors. When color quantization is used, | 6421 | /* Allocate colors. When color quantization is used, |
| 6429 | cinfo.actual_number_of_colors has been set with the number of | 6422 | cinfo.actual_number_of_colors has been set with the number of |
diff --git a/src/insdel.c b/src/insdel.c index 1dceb67bffa..da258c19a1e 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -31,19 +31,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include "blockinput.h" | 31 | #include "blockinput.h" |
| 32 | #include "region-cache.h" | 32 | #include "region-cache.h" |
| 33 | 33 | ||
| 34 | static void insert_from_string_1 (Lisp_Object string, | 34 | static void insert_from_string_1 (Lisp_Object, ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 35 | ptrdiff_t pos, ptrdiff_t pos_byte, | 35 | ptrdiff_t, bool, bool); |
| 36 | ptrdiff_t nchars, ptrdiff_t nbytes, | 36 | static void insert_from_buffer_1 (struct buffer *, ptrdiff_t, ptrdiff_t, bool); |
| 37 | int inherit, int before_markers); | 37 | static void gap_left (ptrdiff_t, ptrdiff_t, bool); |
| 38 | static void insert_from_buffer_1 (struct buffer *buf, | 38 | static void gap_right (ptrdiff_t, ptrdiff_t); |
| 39 | ptrdiff_t from, ptrdiff_t nchars, | ||
| 40 | int inherit); | ||
| 41 | static void gap_left (ptrdiff_t charpos, ptrdiff_t bytepos, int newgap); | ||
| 42 | static void gap_right (ptrdiff_t charpos, ptrdiff_t bytepos); | ||
| 43 | 39 | ||
| 44 | /* List of elements of the form (BEG-UNCHANGED END-UNCHANGED CHANGE-AMOUNT) | 40 | /* List of elements of the form (BEG-UNCHANGED END-UNCHANGED CHANGE-AMOUNT) |
| 45 | describing changes which happened while combine_after_change_calls | 41 | describing changes which happened while combine_after_change_calls |
| 46 | was nonzero. We use this to decide how to call them | 42 | was non-nil. We use this to decide how to call them |
| 47 | once the deferral ends. | 43 | once the deferral ends. |
| 48 | 44 | ||
| 49 | In each element. | 45 | In each element. |
| @@ -67,8 +63,8 @@ static void signal_before_change (ptrdiff_t, ptrdiff_t, ptrdiff_t *); | |||
| 67 | static void | 63 | static void |
| 68 | check_markers (void) | 64 | check_markers (void) |
| 69 | { | 65 | { |
| 70 | register struct Lisp_Marker *tail; | 66 | struct Lisp_Marker *tail; |
| 71 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 67 | bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 72 | 68 | ||
| 73 | for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) | 69 | for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) |
| 74 | { | 70 | { |
| @@ -113,13 +109,13 @@ move_gap_both (ptrdiff_t charpos, ptrdiff_t bytepos) | |||
| 113 | /* Move the gap to a position less than the current GPT. | 109 | /* Move the gap to a position less than the current GPT. |
| 114 | BYTEPOS describes the new position as a byte position, | 110 | BYTEPOS describes the new position as a byte position, |
| 115 | and CHARPOS is the corresponding char position. | 111 | and CHARPOS is the corresponding char position. |
| 116 | If NEWGAP is nonzero, then don't update beg_unchanged and end_unchanged. */ | 112 | If NEWGAP, then don't update beg_unchanged and end_unchanged. */ |
| 117 | 113 | ||
| 118 | static void | 114 | static void |
| 119 | gap_left (ptrdiff_t charpos, ptrdiff_t bytepos, int newgap) | 115 | gap_left (ptrdiff_t charpos, ptrdiff_t bytepos, bool newgap) |
| 120 | { | 116 | { |
| 121 | register unsigned char *to, *from; | 117 | unsigned char *to, *from; |
| 122 | register ptrdiff_t i; | 118 | ptrdiff_t i; |
| 123 | ptrdiff_t new_s1; | 119 | ptrdiff_t new_s1; |
| 124 | 120 | ||
| 125 | if (!newgap) | 121 | if (!newgap) |
| @@ -287,10 +283,10 @@ adjust_markers_for_delete (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 287 | 283 | ||
| 288 | static void | 284 | static void |
| 289 | adjust_markers_for_insert (ptrdiff_t from, ptrdiff_t from_byte, | 285 | adjust_markers_for_insert (ptrdiff_t from, ptrdiff_t from_byte, |
| 290 | ptrdiff_t to, ptrdiff_t to_byte, int before_markers) | 286 | ptrdiff_t to, ptrdiff_t to_byte, bool before_markers) |
| 291 | { | 287 | { |
| 292 | struct Lisp_Marker *m; | 288 | struct Lisp_Marker *m; |
| 293 | int adjusted = 0; | 289 | bool adjusted = 0; |
| 294 | ptrdiff_t nchars = to - from; | 290 | ptrdiff_t nchars = to - from; |
| 295 | ptrdiff_t nbytes = to_byte - from_byte; | 291 | ptrdiff_t nbytes = to_byte - from_byte; |
| 296 | 292 | ||
| @@ -515,7 +511,7 @@ make_gap (ptrdiff_t nbytes_added) | |||
| 515 | 511 | ||
| 516 | ptrdiff_t | 512 | ptrdiff_t |
| 517 | copy_text (const unsigned char *from_addr, unsigned char *to_addr, | 513 | copy_text (const unsigned char *from_addr, unsigned char *to_addr, |
| 518 | ptrdiff_t nbytes, int from_multibyte, int to_multibyte) | 514 | ptrdiff_t nbytes, bool from_multibyte, bool to_multibyte) |
| 519 | { | 515 | { |
| 520 | if (from_multibyte == to_multibyte) | 516 | if (from_multibyte == to_multibyte) |
| 521 | { | 517 | { |
| @@ -664,7 +660,7 @@ insert_before_markers_and_inherit (const char *string, | |||
| 664 | 660 | ||
| 665 | void | 661 | void |
| 666 | insert_1 (const char *string, ptrdiff_t nbytes, | 662 | insert_1 (const char *string, ptrdiff_t nbytes, |
| 667 | int inherit, int prepare, int before_markers) | 663 | bool inherit, bool prepare, bool before_markers) |
| 668 | { | 664 | { |
| 669 | insert_1_both (string, chars_in_text ((unsigned char *) string, nbytes), | 665 | insert_1_both (string, chars_in_text ((unsigned char *) string, nbytes), |
| 670 | nbytes, inherit, prepare, before_markers); | 666 | nbytes, inherit, prepare, before_markers); |
| @@ -790,7 +786,7 @@ count_combining_after (const unsigned char *string, | |||
| 790 | void | 786 | void |
| 791 | insert_1_both (const char *string, | 787 | insert_1_both (const char *string, |
| 792 | ptrdiff_t nchars, ptrdiff_t nbytes, | 788 | ptrdiff_t nchars, ptrdiff_t nbytes, |
| 793 | int inherit, int prepare, int before_markers) | 789 | bool inherit, bool prepare, bool before_markers) |
| 794 | { | 790 | { |
| 795 | if (nchars == 0) | 791 | if (nchars == 0) |
| 796 | return; | 792 | return; |
| @@ -867,7 +863,7 @@ insert_1_both (const char *string, | |||
| 867 | 863 | ||
| 868 | void | 864 | void |
| 869 | insert_from_string (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | 865 | insert_from_string (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, |
| 870 | ptrdiff_t length, ptrdiff_t length_byte, int inherit) | 866 | ptrdiff_t length, ptrdiff_t length_byte, bool inherit) |
| 871 | { | 867 | { |
| 872 | ptrdiff_t opoint = PT; | 868 | ptrdiff_t opoint = PT; |
| 873 | 869 | ||
| @@ -887,7 +883,7 @@ void | |||
| 887 | insert_from_string_before_markers (Lisp_Object string, | 883 | insert_from_string_before_markers (Lisp_Object string, |
| 888 | ptrdiff_t pos, ptrdiff_t pos_byte, | 884 | ptrdiff_t pos, ptrdiff_t pos_byte, |
| 889 | ptrdiff_t length, ptrdiff_t length_byte, | 885 | ptrdiff_t length, ptrdiff_t length_byte, |
| 890 | int inherit) | 886 | bool inherit) |
| 891 | { | 887 | { |
| 892 | ptrdiff_t opoint = PT; | 888 | ptrdiff_t opoint = PT; |
| 893 | 889 | ||
| @@ -905,7 +901,7 @@ insert_from_string_before_markers (Lisp_Object string, | |||
| 905 | static void | 901 | static void |
| 906 | insert_from_string_1 (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | 902 | insert_from_string_1 (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, |
| 907 | ptrdiff_t nchars, ptrdiff_t nbytes, | 903 | ptrdiff_t nchars, ptrdiff_t nbytes, |
| 908 | int inherit, int before_markers) | 904 | bool inherit, bool before_markers) |
| 909 | { | 905 | { |
| 910 | struct gcpro gcpro1; | 906 | struct gcpro gcpro1; |
| 911 | ptrdiff_t outgoing_nbytes = nbytes; | 907 | ptrdiff_t outgoing_nbytes = nbytes; |
| @@ -1039,7 +1035,7 @@ insert_from_gap (ptrdiff_t nchars, ptrdiff_t nbytes) | |||
| 1039 | 1035 | ||
| 1040 | void | 1036 | void |
| 1041 | insert_from_buffer (struct buffer *buf, | 1037 | insert_from_buffer (struct buffer *buf, |
| 1042 | ptrdiff_t charpos, ptrdiff_t nchars, int inherit) | 1038 | ptrdiff_t charpos, ptrdiff_t nchars, bool inherit) |
| 1043 | { | 1039 | { |
| 1044 | ptrdiff_t opoint = PT; | 1040 | ptrdiff_t opoint = PT; |
| 1045 | 1041 | ||
| @@ -1050,7 +1046,7 @@ insert_from_buffer (struct buffer *buf, | |||
| 1050 | 1046 | ||
| 1051 | static void | 1047 | static void |
| 1052 | insert_from_buffer_1 (struct buffer *buf, | 1048 | insert_from_buffer_1 (struct buffer *buf, |
| 1053 | ptrdiff_t from, ptrdiff_t nchars, int inherit) | 1049 | ptrdiff_t from, ptrdiff_t nchars, bool inherit) |
| 1054 | { | 1050 | { |
| 1055 | ptrdiff_t chunk, chunk_expanded; | 1051 | ptrdiff_t chunk, chunk_expanded; |
| 1056 | ptrdiff_t from_byte = buf_charpos_to_bytepos (buf, from); | 1052 | ptrdiff_t from_byte = buf_charpos_to_bytepos (buf, from); |
| @@ -1265,7 +1261,7 @@ adjust_after_insert (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1265 | } | 1261 | } |
| 1266 | 1262 | ||
| 1267 | /* Replace the text from character positions FROM to TO with NEW, | 1263 | /* Replace the text from character positions FROM to TO with NEW, |
| 1268 | If PREPARE is nonzero, call prepare_to_modify_buffer. | 1264 | If PREPARE, call prepare_to_modify_buffer. |
| 1269 | If INHERIT, the newly inserted text should inherit text properties | 1265 | If INHERIT, the newly inserted text should inherit text properties |
| 1270 | from the surrounding non-deleted text. */ | 1266 | from the surrounding non-deleted text. */ |
| 1271 | 1267 | ||
| @@ -1278,7 +1274,7 @@ adjust_after_insert (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1278 | 1274 | ||
| 1279 | void | 1275 | void |
| 1280 | replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, | 1276 | replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, |
| 1281 | int prepare, int inherit, int markers) | 1277 | bool prepare, bool inherit, bool markers) |
| 1282 | { | 1278 | { |
| 1283 | ptrdiff_t inschars = SCHARS (new); | 1279 | ptrdiff_t inschars = SCHARS (new); |
| 1284 | ptrdiff_t insbytes = SBYTES (new); | 1280 | ptrdiff_t insbytes = SBYTES (new); |
| @@ -1443,7 +1439,7 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, | |||
| 1443 | 1439 | ||
| 1444 | Note that this does not yet handle markers quite right. | 1440 | Note that this does not yet handle markers quite right. |
| 1445 | 1441 | ||
| 1446 | If MARKERS is nonzero, relocate markers. | 1442 | If MARKERS, relocate markers. |
| 1447 | 1443 | ||
| 1448 | Unlike most functions at this level, never call | 1444 | Unlike most functions at this level, never call |
| 1449 | prepare_to_modify_buffer and never call signal_after_change. */ | 1445 | prepare_to_modify_buffer and never call signal_after_change. */ |
| @@ -1452,7 +1448,7 @@ void | |||
| 1452 | replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | 1448 | replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, |
| 1453 | ptrdiff_t to, ptrdiff_t to_byte, | 1449 | ptrdiff_t to, ptrdiff_t to_byte, |
| 1454 | const char *ins, ptrdiff_t inschars, ptrdiff_t insbytes, | 1450 | const char *ins, ptrdiff_t inschars, ptrdiff_t insbytes, |
| 1455 | int markers) | 1451 | bool markers) |
| 1456 | { | 1452 | { |
| 1457 | ptrdiff_t nbytes_del, nchars_del; | 1453 | ptrdiff_t nbytes_del, nchars_del; |
| 1458 | 1454 | ||
| @@ -1563,7 +1559,7 @@ del_range (ptrdiff_t from, ptrdiff_t to) | |||
| 1563 | RET_STRING says to return the deleted text. */ | 1559 | RET_STRING says to return the deleted text. */ |
| 1564 | 1560 | ||
| 1565 | Lisp_Object | 1561 | Lisp_Object |
| 1566 | del_range_1 (ptrdiff_t from, ptrdiff_t to, int prepare, int ret_string) | 1562 | del_range_1 (ptrdiff_t from, ptrdiff_t to, bool prepare, bool ret_string) |
| 1567 | { | 1563 | { |
| 1568 | ptrdiff_t from_byte, to_byte; | 1564 | ptrdiff_t from_byte, to_byte; |
| 1569 | Lisp_Object deletion; | 1565 | Lisp_Object deletion; |
| @@ -1599,7 +1595,7 @@ del_range_1 (ptrdiff_t from, ptrdiff_t to, int prepare, int ret_string) | |||
| 1599 | /* Like del_range_1 but args are byte positions, not char positions. */ | 1595 | /* Like del_range_1 but args are byte positions, not char positions. */ |
| 1600 | 1596 | ||
| 1601 | void | 1597 | void |
| 1602 | del_range_byte (ptrdiff_t from_byte, ptrdiff_t to_byte, int prepare) | 1598 | del_range_byte (ptrdiff_t from_byte, ptrdiff_t to_byte, bool prepare) |
| 1603 | { | 1599 | { |
| 1604 | ptrdiff_t from, to; | 1600 | ptrdiff_t from, to; |
| 1605 | 1601 | ||
| @@ -1643,7 +1639,7 @@ del_range_byte (ptrdiff_t from_byte, ptrdiff_t to_byte, int prepare) | |||
| 1643 | 1639 | ||
| 1644 | void | 1640 | void |
| 1645 | del_range_both (ptrdiff_t from, ptrdiff_t from_byte, | 1641 | del_range_both (ptrdiff_t from, ptrdiff_t from_byte, |
| 1646 | ptrdiff_t to, ptrdiff_t to_byte, int prepare) | 1642 | ptrdiff_t to, ptrdiff_t to_byte, bool prepare) |
| 1647 | { | 1643 | { |
| 1648 | /* Make args be valid */ | 1644 | /* Make args be valid */ |
| 1649 | if (from_byte < BEGV_BYTE) | 1645 | if (from_byte < BEGV_BYTE) |
| @@ -1685,13 +1681,13 @@ del_range_both (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1685 | /* Delete a range of text, specified both as character positions | 1681 | /* Delete a range of text, specified both as character positions |
| 1686 | and byte positions. FROM and TO are character positions, | 1682 | and byte positions. FROM and TO are character positions, |
| 1687 | while FROM_BYTE and TO_BYTE are byte positions. | 1683 | while FROM_BYTE and TO_BYTE are byte positions. |
| 1688 | If RET_STRING is true, the deleted area is returned as a string. */ | 1684 | If RET_STRING, the deleted area is returned as a string. */ |
| 1689 | 1685 | ||
| 1690 | Lisp_Object | 1686 | Lisp_Object |
| 1691 | del_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | 1687 | del_range_2 (ptrdiff_t from, ptrdiff_t from_byte, |
| 1692 | ptrdiff_t to, ptrdiff_t to_byte, int ret_string) | 1688 | ptrdiff_t to, ptrdiff_t to_byte, bool ret_string) |
| 1693 | { | 1689 | { |
| 1694 | register ptrdiff_t nbytes_del, nchars_del; | 1690 | ptrdiff_t nbytes_del, nchars_del; |
| 1695 | Lisp_Object deletion; | 1691 | Lisp_Object deletion; |
| 1696 | 1692 | ||
| 1697 | check_markers (); | 1693 | check_markers (); |
| @@ -1770,17 +1766,16 @@ del_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1770 | and warns the next redisplay that it should pay attention to that | 1766 | and warns the next redisplay that it should pay attention to that |
| 1771 | area. | 1767 | area. |
| 1772 | 1768 | ||
| 1773 | If PRESERVE_CHARS_MODIFF is non-zero, do not update CHARS_MODIFF. | 1769 | If PRESERVE_CHARS_MODIFF, do not update CHARS_MODIFF. |
| 1774 | Otherwise set CHARS_MODIFF to the new value of MODIFF. */ | 1770 | Otherwise set CHARS_MODIFF to the new value of MODIFF. */ |
| 1775 | 1771 | ||
| 1776 | void | 1772 | void |
| 1777 | modify_region (struct buffer *buffer, ptrdiff_t start, ptrdiff_t end, | 1773 | modify_region (struct buffer *buffer, ptrdiff_t start, ptrdiff_t end, |
| 1778 | int preserve_chars_modiff) | 1774 | bool preserve_chars_modiff) |
| 1779 | { | 1775 | { |
| 1780 | struct buffer *old_buffer = current_buffer; | 1776 | struct buffer *old_buffer = current_buffer; |
| 1781 | 1777 | ||
| 1782 | if (buffer != old_buffer) | 1778 | set_buffer_internal (buffer); |
| 1783 | set_buffer_internal (buffer); | ||
| 1784 | 1779 | ||
| 1785 | prepare_to_modify_buffer (start, end, NULL); | 1780 | prepare_to_modify_buffer (start, end, NULL); |
| 1786 | 1781 | ||
| @@ -1794,8 +1789,7 @@ modify_region (struct buffer *buffer, ptrdiff_t start, ptrdiff_t end, | |||
| 1794 | 1789 | ||
| 1795 | bset_point_before_scroll (buffer, Qnil); | 1790 | bset_point_before_scroll (buffer, Qnil); |
| 1796 | 1791 | ||
| 1797 | if (buffer != old_buffer) | 1792 | set_buffer_internal (old_buffer); |
| 1798 | set_buffer_internal (old_buffer); | ||
| 1799 | } | 1793 | } |
| 1800 | 1794 | ||
| 1801 | /* Check that it is okay to modify the buffer between START and END, | 1795 | /* Check that it is okay to modify the buffer between START and END, |
| @@ -2119,7 +2113,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, | |||
| 2119 | return Qnil; | 2113 | return Qnil; |
| 2120 | } | 2114 | } |
| 2121 | 2115 | ||
| 2122 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 2116 | record_unwind_current_buffer (); |
| 2123 | 2117 | ||
| 2124 | Fset_buffer (combine_after_change_buffer); | 2118 | Fset_buffer (combine_after_change_buffer); |
| 2125 | 2119 | ||
diff --git a/src/intervals.c b/src/intervals.c index 0a85e20e5d9..49d61b2f9b0 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -178,14 +178,13 @@ merge_properties (register INTERVAL source, register INTERVAL target) | |||
| 178 | } | 178 | } |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | /* Return 1 if the two intervals have the same properties, | 181 | /* Return true if the two intervals have the same properties. */ |
| 182 | 0 otherwise. */ | ||
| 183 | 182 | ||
| 184 | int | 183 | bool |
| 185 | intervals_equal (INTERVAL i0, INTERVAL i1) | 184 | intervals_equal (INTERVAL i0, INTERVAL i1) |
| 186 | { | 185 | { |
| 187 | register Lisp_Object i0_cdr, i0_sym; | 186 | Lisp_Object i0_cdr, i0_sym; |
| 188 | register Lisp_Object i1_cdr, i1_val; | 187 | Lisp_Object i1_cdr, i1_val; |
| 189 | 188 | ||
| 190 | if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1)) | 189 | if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1)) |
| 191 | return 1; | 190 | return 1; |
| @@ -469,10 +468,10 @@ balance_an_interval (INTERVAL i) | |||
| 469 | Lisp Object. */ | 468 | Lisp Object. */ |
| 470 | 469 | ||
| 471 | static inline INTERVAL | 470 | static inline INTERVAL |
| 472 | balance_possible_root_interval (register INTERVAL interval) | 471 | balance_possible_root_interval (INTERVAL interval) |
| 473 | { | 472 | { |
| 474 | Lisp_Object parent; | 473 | Lisp_Object parent; |
| 475 | int have_parent = 0; | 474 | bool have_parent = 0; |
| 476 | 475 | ||
| 477 | if (!INTERVAL_HAS_OBJECT (interval) && !INTERVAL_HAS_PARENT (interval)) | 476 | if (!INTERVAL_HAS_OBJECT (interval) && !INTERVAL_HAS_PARENT (interval)) |
| 478 | return interval; | 477 | return interval; |
| @@ -845,9 +844,9 @@ static INTERVAL | |||
| 845 | adjust_intervals_for_insertion (INTERVAL tree, | 844 | adjust_intervals_for_insertion (INTERVAL tree, |
| 846 | ptrdiff_t position, ptrdiff_t length) | 845 | ptrdiff_t position, ptrdiff_t length) |
| 847 | { | 846 | { |
| 848 | register INTERVAL i; | 847 | INTERVAL i; |
| 849 | register INTERVAL temp; | 848 | INTERVAL temp; |
| 850 | int eobp = 0; | 849 | bool eobp = 0; |
| 851 | Lisp_Object parent; | 850 | Lisp_Object parent; |
| 852 | ptrdiff_t offset; | 851 | ptrdiff_t offset; |
| 853 | 852 | ||
| @@ -1068,11 +1067,10 @@ FR 8 9 A B | |||
| 1068 | static Lisp_Object | 1067 | static Lisp_Object |
| 1069 | merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright) | 1068 | merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright) |
| 1070 | { | 1069 | { |
| 1071 | register Lisp_Object props, front, rear; | 1070 | Lisp_Object props, front, rear; |
| 1072 | Lisp_Object lfront, lrear, rfront, rrear; | 1071 | Lisp_Object lfront, lrear, rfront, rrear; |
| 1073 | register Lisp_Object tail1, tail2, sym, lval, rval, cat; | 1072 | Lisp_Object tail1, tail2, sym, lval, rval, cat; |
| 1074 | int use_left, use_right; | 1073 | bool use_left, use_right, lpresent; |
| 1075 | int lpresent; | ||
| 1076 | 1074 | ||
| 1077 | props = Qnil; | 1075 | props = Qnil; |
| 1078 | front = Qnil; | 1076 | front = Qnil; |
| @@ -1610,7 +1608,7 @@ reproduce_tree_obj (INTERVAL source, Lisp_Object parent) | |||
| 1610 | void | 1608 | void |
| 1611 | graft_intervals_into_buffer (INTERVAL source, ptrdiff_t position, | 1609 | graft_intervals_into_buffer (INTERVAL source, ptrdiff_t position, |
| 1612 | ptrdiff_t length, struct buffer *buffer, | 1610 | ptrdiff_t length, struct buffer *buffer, |
| 1613 | int inherit) | 1611 | bool inherit) |
| 1614 | { | 1612 | { |
| 1615 | INTERVAL tree = buffer_intervals (buffer); | 1613 | INTERVAL tree = buffer_intervals (buffer); |
| 1616 | INTERVAL under, over, this; | 1614 | INTERVAL under, over, this; |
| @@ -1753,9 +1751,9 @@ textget (Lisp_Object plist, register Lisp_Object prop) | |||
| 1753 | } | 1751 | } |
| 1754 | 1752 | ||
| 1755 | Lisp_Object | 1753 | Lisp_Object |
| 1756 | lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop) | 1754 | lookup_char_property (Lisp_Object plist, Lisp_Object prop, bool textprop) |
| 1757 | { | 1755 | { |
| 1758 | register Lisp_Object tail, fallback = Qnil; | 1756 | Lisp_Object tail, fallback = Qnil; |
| 1759 | 1757 | ||
| 1760 | for (tail = plist; CONSP (tail); tail = Fcdr (XCDR (tail))) | 1758 | for (tail = plist; CONSP (tail); tail = Fcdr (XCDR (tail))) |
| 1761 | { | 1759 | { |
| @@ -1826,8 +1824,8 @@ set_point (ptrdiff_t charpos) | |||
| 1826 | /* If there's an invisible character at position POS + TEST_OFFS in the | 1824 | /* If there's an invisible character at position POS + TEST_OFFS in the |
| 1827 | current buffer, and the invisible property has a `stickiness' such that | 1825 | current buffer, and the invisible property has a `stickiness' such that |
| 1828 | inserting a character at position POS would inherit the property it, | 1826 | inserting a character at position POS would inherit the property it, |
| 1829 | return POS + ADJ, otherwise return POS. If TEST_INTANG is non-zero, | 1827 | return POS + ADJ, otherwise return POS. If TEST_INTANG, intangibility |
| 1830 | then intangibility is required as well as invisibility. | 1828 | is required as well as invisibility. |
| 1831 | 1829 | ||
| 1832 | TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1. | 1830 | TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1. |
| 1833 | 1831 | ||
| @@ -1836,7 +1834,7 @@ set_point (ptrdiff_t charpos) | |||
| 1836 | 1834 | ||
| 1837 | static ptrdiff_t | 1835 | static ptrdiff_t |
| 1838 | adjust_for_invis_intang (ptrdiff_t pos, ptrdiff_t test_offs, ptrdiff_t adj, | 1836 | adjust_for_invis_intang (ptrdiff_t pos, ptrdiff_t test_offs, ptrdiff_t adj, |
| 1839 | int test_intang) | 1837 | bool test_intang) |
| 1840 | { | 1838 | { |
| 1841 | Lisp_Object invis_propval, invis_overlay; | 1839 | Lisp_Object invis_propval, invis_overlay; |
| 1842 | Lisp_Object test_pos; | 1840 | Lisp_Object test_pos; |
| @@ -1883,8 +1881,8 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos) | |||
| 1883 | initial position is the same as the destination, in the rare | 1881 | initial position is the same as the destination, in the rare |
| 1884 | instances where this is important, e.g. in line-move-finish | 1882 | instances where this is important, e.g. in line-move-finish |
| 1885 | (simple.el). */ | 1883 | (simple.el). */ |
| 1886 | int backwards = (charpos < old_position ? 1 : 0); | 1884 | bool backwards = charpos < old_position; |
| 1887 | int have_overlays; | 1885 | bool have_overlays; |
| 1888 | ptrdiff_t original_position; | 1886 | ptrdiff_t original_position; |
| 1889 | 1887 | ||
| 1890 | bset_point_before_scroll (current_buffer, Qnil); | 1888 | bset_point_before_scroll (current_buffer, Qnil); |
| @@ -2154,12 +2152,12 @@ move_if_not_intangible (ptrdiff_t position) | |||
| 2154 | 2152 | ||
| 2155 | /* If text at position POS has property PROP, set *VAL to the property | 2153 | /* If text at position POS has property PROP, set *VAL to the property |
| 2156 | value, *START and *END to the beginning and end of a region that | 2154 | value, *START and *END to the beginning and end of a region that |
| 2157 | has the same property, and return 1. Otherwise return 0. | 2155 | has the same property, and return true. Otherwise return false. |
| 2158 | 2156 | ||
| 2159 | OBJECT is the string or buffer to look for the property in; | 2157 | OBJECT is the string or buffer to look for the property in; |
| 2160 | nil means the current buffer. */ | 2158 | nil means the current buffer. */ |
| 2161 | 2159 | ||
| 2162 | int | 2160 | bool |
| 2163 | get_property_and_range (ptrdiff_t pos, Lisp_Object prop, Lisp_Object *val, | 2161 | get_property_and_range (ptrdiff_t pos, Lisp_Object prop, Lisp_Object *val, |
| 2164 | ptrdiff_t *start, ptrdiff_t *end, Lisp_Object object) | 2162 | ptrdiff_t *start, ptrdiff_t *end, Lisp_Object object) |
| 2165 | { | 2163 | { |
| @@ -2306,10 +2304,10 @@ copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, | |||
| 2306 | set_string_intervals (string, interval_copy); | 2304 | set_string_intervals (string, interval_copy); |
| 2307 | } | 2305 | } |
| 2308 | 2306 | ||
| 2309 | /* Return 1 if strings S1 and S2 have identical properties; 0 otherwise. | 2307 | /* Return true if strings S1 and S2 have identical properties. |
| 2310 | Assume they have identical characters. */ | 2308 | Assume they have identical characters. */ |
| 2311 | 2309 | ||
| 2312 | int | 2310 | bool |
| 2313 | compare_string_intervals (Lisp_Object s1, Lisp_Object s2) | 2311 | compare_string_intervals (Lisp_Object s1, Lisp_Object s2) |
| 2314 | { | 2312 | { |
| 2315 | INTERVAL i1, i2; | 2313 | INTERVAL i1, i2; |
| @@ -2348,7 +2346,7 @@ compare_string_intervals (Lisp_Object s1, Lisp_Object s2) | |||
| 2348 | START_BYTE ... END_BYTE in bytes. */ | 2346 | START_BYTE ... END_BYTE in bytes. */ |
| 2349 | 2347 | ||
| 2350 | static void | 2348 | static void |
| 2351 | set_intervals_multibyte_1 (INTERVAL i, int multi_flag, | 2349 | set_intervals_multibyte_1 (INTERVAL i, bool multi_flag, |
| 2352 | ptrdiff_t start, ptrdiff_t start_byte, | 2350 | ptrdiff_t start, ptrdiff_t start_byte, |
| 2353 | ptrdiff_t end, ptrdiff_t end_byte) | 2351 | ptrdiff_t end, ptrdiff_t end_byte) |
| 2354 | { | 2352 | { |
| @@ -2456,11 +2454,11 @@ set_intervals_multibyte_1 (INTERVAL i, int multi_flag, | |||
| 2456 | } | 2454 | } |
| 2457 | 2455 | ||
| 2458 | /* Update the intervals of the current buffer | 2456 | /* Update the intervals of the current buffer |
| 2459 | to fit the contents as multibyte (if MULTI_FLAG is 1) | 2457 | to fit the contents as multibyte (if MULTI_FLAG) |
| 2460 | or to fit them as non-multibyte (if MULTI_FLAG is 0). */ | 2458 | or to fit them as non-multibyte (if not MULTI_FLAG). */ |
| 2461 | 2459 | ||
| 2462 | void | 2460 | void |
| 2463 | set_intervals_multibyte (int multi_flag) | 2461 | set_intervals_multibyte (bool multi_flag) |
| 2464 | { | 2462 | { |
| 2465 | INTERVAL i = buffer_intervals (current_buffer); | 2463 | INTERVAL i = buffer_intervals (current_buffer); |
| 2466 | 2464 | ||
diff --git a/src/intervals.h b/src/intervals.h index 01e72d7c9db..2b30101d0fa 100644 --- a/src/intervals.h +++ b/src/intervals.h | |||
| @@ -227,7 +227,7 @@ extern INTERVAL make_interval (void); | |||
| 227 | 227 | ||
| 228 | extern INTERVAL create_root_interval (Lisp_Object); | 228 | extern INTERVAL create_root_interval (Lisp_Object); |
| 229 | extern void copy_properties (INTERVAL, INTERVAL); | 229 | extern void copy_properties (INTERVAL, INTERVAL); |
| 230 | extern int intervals_equal (INTERVAL, INTERVAL); | 230 | extern bool intervals_equal (INTERVAL, INTERVAL); |
| 231 | extern void traverse_intervals (INTERVAL, ptrdiff_t, | 231 | extern void traverse_intervals (INTERVAL, ptrdiff_t, |
| 232 | void (*) (INTERVAL, Lisp_Object), | 232 | void (*) (INTERVAL, Lisp_Object), |
| 233 | Lisp_Object); | 233 | Lisp_Object); |
| @@ -242,22 +242,22 @@ extern INTERVAL previous_interval (INTERVAL); | |||
| 242 | extern INTERVAL merge_interval_left (INTERVAL); | 242 | extern INTERVAL merge_interval_left (INTERVAL); |
| 243 | extern void offset_intervals (struct buffer *, ptrdiff_t, ptrdiff_t); | 243 | extern void offset_intervals (struct buffer *, ptrdiff_t, ptrdiff_t); |
| 244 | extern void graft_intervals_into_buffer (INTERVAL, ptrdiff_t, ptrdiff_t, | 244 | extern void graft_intervals_into_buffer (INTERVAL, ptrdiff_t, ptrdiff_t, |
| 245 | struct buffer *, int); | 245 | struct buffer *, bool); |
| 246 | extern void verify_interval_modification (struct buffer *, | 246 | extern void verify_interval_modification (struct buffer *, |
| 247 | ptrdiff_t, ptrdiff_t); | 247 | ptrdiff_t, ptrdiff_t); |
| 248 | extern INTERVAL balance_intervals (INTERVAL); | 248 | extern INTERVAL balance_intervals (INTERVAL); |
| 249 | extern void copy_intervals_to_string (Lisp_Object, struct buffer *, | 249 | extern void copy_intervals_to_string (Lisp_Object, struct buffer *, |
| 250 | ptrdiff_t, ptrdiff_t); | 250 | ptrdiff_t, ptrdiff_t); |
| 251 | extern INTERVAL copy_intervals (INTERVAL, ptrdiff_t, ptrdiff_t); | 251 | extern INTERVAL copy_intervals (INTERVAL, ptrdiff_t, ptrdiff_t); |
| 252 | extern int compare_string_intervals (Lisp_Object, Lisp_Object); | 252 | extern bool compare_string_intervals (Lisp_Object, Lisp_Object); |
| 253 | extern Lisp_Object textget (Lisp_Object, Lisp_Object); | 253 | extern Lisp_Object textget (Lisp_Object, Lisp_Object); |
| 254 | extern Lisp_Object lookup_char_property (Lisp_Object, Lisp_Object, int); | 254 | extern Lisp_Object lookup_char_property (Lisp_Object, Lisp_Object, bool); |
| 255 | extern void move_if_not_intangible (ptrdiff_t); | 255 | extern void move_if_not_intangible (ptrdiff_t); |
| 256 | extern int get_property_and_range (ptrdiff_t, Lisp_Object, Lisp_Object *, | 256 | extern bool get_property_and_range (ptrdiff_t, Lisp_Object, Lisp_Object *, |
| 257 | ptrdiff_t *, ptrdiff_t *, Lisp_Object); | 257 | ptrdiff_t *, ptrdiff_t *, Lisp_Object); |
| 258 | extern Lisp_Object get_local_map (ptrdiff_t, struct buffer *, Lisp_Object); | 258 | extern Lisp_Object get_local_map (ptrdiff_t, struct buffer *, Lisp_Object); |
| 259 | extern INTERVAL update_interval (INTERVAL, ptrdiff_t); | 259 | extern INTERVAL update_interval (INTERVAL, ptrdiff_t); |
| 260 | extern void set_intervals_multibyte (int); | 260 | extern void set_intervals_multibyte (bool); |
| 261 | extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *, | 261 | extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *, |
| 262 | Lisp_Object *, int); | 262 | Lisp_Object *, int); |
| 263 | extern INTERVAL interval_of (ptrdiff_t, Lisp_Object); | 263 | extern INTERVAL interval_of (ptrdiff_t, Lisp_Object); |
diff --git a/src/keyboard.c b/src/keyboard.c index 868d0c8d2c1..464c3ae0d66 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -63,20 +63,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 63 | #include <unistd.h> | 63 | #include <unistd.h> |
| 64 | #include <fcntl.h> | 64 | #include <fcntl.h> |
| 65 | 65 | ||
| 66 | /* This is to get the definitions of the XK_ symbols. */ | 66 | #ifdef HAVE_WINDOW_SYSTEM |
| 67 | #ifdef HAVE_X_WINDOWS | 67 | #include TERM_HEADER |
| 68 | #include "xterm.h" | 68 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 69 | #endif | ||
| 70 | |||
| 71 | #ifdef HAVE_NTGUI | ||
| 72 | #include "w32term.h" | ||
| 73 | #endif /* HAVE_NTGUI */ | ||
| 74 | |||
| 75 | #ifdef HAVE_NS | ||
| 76 | #include "nsterm.h" | ||
| 77 | #endif | ||
| 78 | 69 | ||
| 79 | /* Variables for blockinput.h: */ | 70 | /* Variables for blockinput.h: */ |
| 80 | 71 | ||
| 81 | /* Non-zero if interrupt input is blocked right now. */ | 72 | /* Non-zero if interrupt input is blocked right now. */ |
| 82 | volatile int interrupt_input_blocked; | 73 | volatile int interrupt_input_blocked; |
| @@ -1434,8 +1425,7 @@ command_loop_1 (void) | |||
| 1434 | Fkill_emacs (Qnil); | 1425 | Fkill_emacs (Qnil); |
| 1435 | 1426 | ||
| 1436 | /* Make sure the current window's buffer is selected. */ | 1427 | /* Make sure the current window's buffer is selected. */ |
| 1437 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 1428 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); |
| 1438 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); | ||
| 1439 | 1429 | ||
| 1440 | /* Display any malloc warning that just came out. Use while because | 1430 | /* Display any malloc warning that just came out. Use while because |
| 1441 | displaying one warning can cause another. */ | 1431 | displaying one warning can cause another. */ |
| @@ -1513,8 +1503,7 @@ command_loop_1 (void) | |||
| 1513 | /* A filter may have run while we were reading the input. */ | 1503 | /* A filter may have run while we were reading the input. */ |
| 1514 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) | 1504 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) |
| 1515 | Fkill_emacs (Qnil); | 1505 | Fkill_emacs (Qnil); |
| 1516 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 1506 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); |
| 1517 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); | ||
| 1518 | 1507 | ||
| 1519 | ++num_input_keys; | 1508 | ++num_input_keys; |
| 1520 | 1509 | ||
| @@ -4350,9 +4339,8 @@ struct input_event last_timer_event EXTERNALLY_VISIBLE; | |||
| 4350 | ...). Each element has the form (FUN . ARGS). */ | 4339 | ...). Each element has the form (FUN . ARGS). */ |
| 4351 | Lisp_Object pending_funcalls; | 4340 | Lisp_Object pending_funcalls; |
| 4352 | 4341 | ||
| 4353 | /* If TIMER is a valid timer, return nonzero and place its value into | 4342 | /* Return true if TIMER is a valid timer, placing its value into *RESULT. */ |
| 4354 | *RESULT. Otherwise return zero. */ | 4343 | static bool |
| 4355 | static int | ||
| 4356 | decode_timer (Lisp_Object timer, EMACS_TIME *result) | 4344 | decode_timer (Lisp_Object timer, EMACS_TIME *result) |
| 4357 | { | 4345 | { |
| 4358 | Lisp_Object *vector; | 4346 | Lisp_Object *vector; |
| @@ -4419,7 +4407,6 @@ timer_check_2 (void) | |||
| 4419 | 4407 | ||
| 4420 | while (CONSP (timers) || CONSP (idle_timers)) | 4408 | while (CONSP (timers) || CONSP (idle_timers)) |
| 4421 | { | 4409 | { |
| 4422 | Lisp_Object *vector; | ||
| 4423 | Lisp_Object timer = Qnil, idle_timer = Qnil; | 4410 | Lisp_Object timer = Qnil, idle_timer = Qnil; |
| 4424 | EMACS_TIME timer_time, idle_timer_time; | 4411 | EMACS_TIME timer_time, idle_timer_time; |
| 4425 | EMACS_TIME difference; | 4412 | EMACS_TIME difference; |
| @@ -4495,15 +4482,14 @@ timer_check_2 (void) | |||
| 4495 | /* If timer is ripe, run it if it hasn't been run. */ | 4482 | /* If timer is ripe, run it if it hasn't been run. */ |
| 4496 | if (ripe) | 4483 | if (ripe) |
| 4497 | { | 4484 | { |
| 4498 | vector = XVECTOR (chosen_timer)->contents; | 4485 | if (NILP (AREF (chosen_timer, 0))) |
| 4499 | if (NILP (vector[0])) | ||
| 4500 | { | 4486 | { |
| 4501 | ptrdiff_t count = SPECPDL_INDEX (); | 4487 | ptrdiff_t count = SPECPDL_INDEX (); |
| 4502 | Lisp_Object old_deactivate_mark = Vdeactivate_mark; | 4488 | Lisp_Object old_deactivate_mark = Vdeactivate_mark; |
| 4503 | 4489 | ||
| 4504 | /* Mark the timer as triggered to prevent problems if the lisp | 4490 | /* Mark the timer as triggered to prevent problems if the lisp |
| 4505 | code fails to reschedule it right. */ | 4491 | code fails to reschedule it right. */ |
| 4506 | vector[0] = Qt; | 4492 | ASET (chosen_timer, 0, Qt); |
| 4507 | 4493 | ||
| 4508 | specbind (Qinhibit_quit, Qt); | 4494 | specbind (Qinhibit_quit, Qt); |
| 4509 | 4495 | ||
| @@ -8447,7 +8433,6 @@ init_tool_bar_items (Lisp_Object reuse) | |||
| 8447 | static void | 8433 | static void |
| 8448 | append_tool_bar_item (void) | 8434 | append_tool_bar_item (void) |
| 8449 | { | 8435 | { |
| 8450 | Lisp_Object *to, *from; | ||
| 8451 | ptrdiff_t incr = | 8436 | ptrdiff_t incr = |
| 8452 | (ntool_bar_items | 8437 | (ntool_bar_items |
| 8453 | - (ASIZE (tool_bar_items_vector) - TOOL_BAR_ITEM_NSLOTS)); | 8438 | - (ASIZE (tool_bar_items_vector) - TOOL_BAR_ITEM_NSLOTS)); |
| @@ -8459,9 +8444,8 @@ append_tool_bar_item (void) | |||
| 8459 | 8444 | ||
| 8460 | /* Append entries from tool_bar_item_properties to the end of | 8445 | /* Append entries from tool_bar_item_properties to the end of |
| 8461 | tool_bar_items_vector. */ | 8446 | tool_bar_items_vector. */ |
| 8462 | to = XVECTOR (tool_bar_items_vector)->contents + ntool_bar_items; | 8447 | vcopy (tool_bar_items_vector, ntool_bar_items, |
| 8463 | from = XVECTOR (tool_bar_item_properties)->contents; | 8448 | XVECTOR (tool_bar_item_properties)->contents, TOOL_BAR_ITEM_NSLOTS); |
| 8464 | memcpy (to, from, TOOL_BAR_ITEM_NSLOTS * sizeof *to); | ||
| 8465 | ntool_bar_items += TOOL_BAR_ITEM_NSLOTS; | 8449 | ntool_bar_items += TOOL_BAR_ITEM_NSLOTS; |
| 8466 | } | 8450 | } |
| 8467 | 8451 | ||
| @@ -9578,7 +9562,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9578 | because we may get input from a subprocess which | 9562 | because we may get input from a subprocess which |
| 9579 | wants to change the selected window and stuff (say, | 9563 | wants to change the selected window and stuff (say, |
| 9580 | emacsclient). */ | 9564 | emacsclient). */ |
| 9581 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 9565 | record_unwind_current_buffer (); |
| 9582 | 9566 | ||
| 9583 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) | 9567 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) |
| 9584 | Fkill_emacs (Qnil); | 9568 | Fkill_emacs (Qnil); |
| @@ -10490,10 +10474,10 @@ DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0, | |||
| 10490 | else | 10474 | else |
| 10491 | { | 10475 | { |
| 10492 | val = Fvector (NUM_RECENT_KEYS, keys); | 10476 | val = Fvector (NUM_RECENT_KEYS, keys); |
| 10493 | memcpy (XVECTOR (val)->contents, keys + recent_keys_index, | 10477 | vcopy (val, 0, keys + recent_keys_index, |
| 10494 | (NUM_RECENT_KEYS - recent_keys_index) * word_size); | 10478 | NUM_RECENT_KEYS - recent_keys_index); |
| 10495 | memcpy (XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index, | 10479 | vcopy (val, NUM_RECENT_KEYS - recent_keys_index, |
| 10496 | keys, recent_keys_index * word_size); | 10480 | keys, recent_keys_index); |
| 10497 | return val; | 10481 | return val; |
| 10498 | } | 10482 | } |
| 10499 | } | 10483 | } |
| @@ -11255,7 +11239,7 @@ The `posn-' functions access elements of such lists. */) | |||
| 11255 | 11239 | ||
| 11256 | if (WINDOWP (frame_or_window)) | 11240 | if (WINDOWP (frame_or_window)) |
| 11257 | { | 11241 | { |
| 11258 | struct window *w = decode_valid_window (frame_or_window); | 11242 | struct window *w = decode_live_window (frame_or_window); |
| 11259 | 11243 | ||
| 11260 | XSETINT (x, (XINT (x) | 11244 | XSETINT (x, (XINT (x) |
| 11261 | + WINDOW_LEFT_EDGE_X (w) | 11245 | + WINDOW_LEFT_EDGE_X (w) |
diff --git a/src/keymap.c b/src/keymap.c index 21f7dcb5d37..85c384b8180 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1570,9 +1570,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1570 | would not be a problem here, but it is easier to keep | 1570 | would not be a problem here, but it is easier to keep |
| 1571 | things the same. | 1571 | things the same. |
| 1572 | */ | 1572 | */ |
| 1573 | 1573 | record_unwind_current_buffer (); | |
| 1574 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | ||
| 1575 | |||
| 1576 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 1574 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 1577 | } | 1575 | } |
| 1578 | } | 1576 | } |
| @@ -2159,7 +2157,7 @@ The `kbd' macro is an approximate inverse of this. */) | |||
| 2159 | char * | 2157 | char * |
| 2160 | push_key_description (EMACS_INT ch, char *p, int force_multibyte) | 2158 | push_key_description (EMACS_INT ch, char *p, int force_multibyte) |
| 2161 | { | 2159 | { |
| 2162 | int c, c2; | 2160 | int c, c2, tab_as_ci; |
| 2163 | 2161 | ||
| 2164 | /* Clear all the meaningless bits above the meta bit. */ | 2162 | /* Clear all the meaningless bits above the meta bit. */ |
| 2165 | c = ch & (meta_modifier | ~ - meta_modifier); | 2163 | c = ch & (meta_modifier | ~ - meta_modifier); |
| @@ -2173,6 +2171,8 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2173 | return p; | 2171 | return p; |
| 2174 | } | 2172 | } |
| 2175 | 2173 | ||
| 2174 | tab_as_ci = (c2 == '\t' && (c & meta_modifier)); | ||
| 2175 | |||
| 2176 | if (c & alt_modifier) | 2176 | if (c & alt_modifier) |
| 2177 | { | 2177 | { |
| 2178 | *p++ = 'A'; | 2178 | *p++ = 'A'; |
| @@ -2180,7 +2180,8 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2180 | c -= alt_modifier; | 2180 | c -= alt_modifier; |
| 2181 | } | 2181 | } |
| 2182 | if ((c & ctrl_modifier) != 0 | 2182 | if ((c & ctrl_modifier) != 0 |
| 2183 | || (c2 < ' ' && c2 != 27 && c2 != '\t' && c2 != Ctl ('M'))) | 2183 | || (c2 < ' ' && c2 != 27 && c2 != '\t' && c2 != Ctl ('M')) |
| 2184 | || tab_as_ci) | ||
| 2184 | { | 2185 | { |
| 2185 | *p++ = 'C'; | 2186 | *p++ = 'C'; |
| 2186 | *p++ = '-'; | 2187 | *p++ = '-'; |
| @@ -2218,6 +2219,10 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2218 | *p++ = 'S'; | 2219 | *p++ = 'S'; |
| 2219 | *p++ = 'C'; | 2220 | *p++ = 'C'; |
| 2220 | } | 2221 | } |
| 2222 | else if (tab_as_ci) | ||
| 2223 | { | ||
| 2224 | *p++ = 'i'; | ||
| 2225 | } | ||
| 2221 | else if (c == '\t') | 2226 | else if (c == '\t') |
| 2222 | { | 2227 | { |
| 2223 | *p++ = 'T'; | 2228 | *p++ = 'T'; |
diff --git a/src/lisp.h b/src/lisp.h index 5c7e8dc2f82..07a3ae17469 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -126,7 +126,7 @@ extern _Noreturn void die (const char *, const char *, int); | |||
| 126 | eassert macro altogether, e.g., if XSTRING (x) uses eassert to test | 126 | eassert macro altogether, e.g., if XSTRING (x) uses eassert to test |
| 127 | STRINGP (x), but a particular use of XSTRING is invoked only after | 127 | STRINGP (x), but a particular use of XSTRING is invoked only after |
| 128 | testing that STRINGP (x) is true, making the test redundant. */ | 128 | testing that STRINGP (x) is true, making the test redundant. */ |
| 129 | extern int suppress_checking EXTERNALLY_VISIBLE; | 129 | extern bool suppress_checking EXTERNALLY_VISIBLE; |
| 130 | 130 | ||
| 131 | # define eassert(cond) \ | 131 | # define eassert(cond) \ |
| 132 | ((cond) || suppress_checking \ | 132 | ((cond) || suppress_checking \ |
| @@ -617,10 +617,8 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) | |||
| 617 | 617 | ||
| 618 | #define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX] | 618 | #define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX] |
| 619 | #define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size | 619 | #define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size |
| 620 | /* The IDX==IDX tries to detect when the macro argument is side-effecting. */ | ||
| 621 | #define ASET(ARRAY, IDX, VAL) \ | 620 | #define ASET(ARRAY, IDX, VAL) \ |
| 622 | (eassert ((IDX) == (IDX)), \ | 621 | (eassert (0 <= (IDX) && (IDX) < ASIZE (ARRAY)), \ |
| 623 | eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \ | ||
| 624 | XVECTOR (ARRAY)->contents[IDX] = (VAL)) | 622 | XVECTOR (ARRAY)->contents[IDX] = (VAL)) |
| 625 | 623 | ||
| 626 | /* Convenience macros for dealing with Lisp strings. */ | 624 | /* Convenience macros for dealing with Lisp strings. */ |
| @@ -713,7 +711,7 @@ struct Lisp_Cons | |||
| 713 | #define CDR_SAFE(c) \ | 711 | #define CDR_SAFE(c) \ |
| 714 | (CONSP ((c)) ? XCDR ((c)) : Qnil) | 712 | (CONSP ((c)) ? XCDR ((c)) : Qnil) |
| 715 | 713 | ||
| 716 | /* Nonzero if STR is a multibyte string. */ | 714 | /* True if STR is a multibyte string. */ |
| 717 | #define STRING_MULTIBYTE(STR) \ | 715 | #define STRING_MULTIBYTE(STR) \ |
| 718 | (XSTRING (STR)->size_byte >= 0) | 716 | (XSTRING (STR)->size_byte >= 0) |
| 719 | 717 | ||
| @@ -1929,11 +1927,7 @@ typedef struct { | |||
| 1929 | Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) | 1927 | Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) |
| 1930 | 1928 | ||
| 1931 | /* Non-zero if OBJ is a Lisp function. */ | 1929 | /* Non-zero if OBJ is a Lisp function. */ |
| 1932 | #define FUNCTIONP(OBJ) \ | 1930 | #define FUNCTIONP(OBJ) functionp(OBJ) |
| 1933 | ((CONSP (OBJ) && EQ (XCAR (OBJ), Qlambda)) \ | ||
| 1934 | || (SYMBOLP (OBJ) && !NILP (Ffboundp (OBJ))) \ | ||
| 1935 | || COMPILEDP (OBJ) \ | ||
| 1936 | || SUBRP (OBJ)) | ||
| 1937 | 1931 | ||
| 1938 | /* defsubr (Sname); | 1932 | /* defsubr (Sname); |
| 1939 | is how we define the symbol for function `name' at start-up time. */ | 1933 | is how we define the symbol for function `name' at start-up time. */ |
| @@ -2357,6 +2351,17 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val) | |||
| 2357 | XVECTOR (array)->contents[idx] = val; | 2351 | XVECTOR (array)->contents[idx] = val; |
| 2358 | } | 2352 | } |
| 2359 | 2353 | ||
| 2354 | /* Copy COUNT Lisp_Objects from ARGS to contents of V starting from OFFSET. */ | ||
| 2355 | |||
| 2356 | LISP_INLINE void | ||
| 2357 | vcopy (Lisp_Object v, ptrdiff_t offset, Lisp_Object *args, ptrdiff_t count) | ||
| 2358 | { | ||
| 2359 | eassert (0 <= offset && 0 <= count && offset + count <= ASIZE (v)); | ||
| 2360 | memcpy (XVECTOR (v)->contents + offset, args, count * sizeof *args); | ||
| 2361 | } | ||
| 2362 | |||
| 2363 | /* Functions to modify hash tables. */ | ||
| 2364 | |||
| 2360 | LISP_INLINE void | 2365 | LISP_INLINE void |
| 2361 | set_hash_key_and_value (struct Lisp_Hash_Table *h, Lisp_Object key_and_value) | 2366 | set_hash_key_and_value (struct Lisp_Hash_Table *h, Lisp_Object key_and_value) |
| 2362 | { | 2367 | { |
| @@ -2582,8 +2587,7 @@ extern Lisp_Object Qoverflow_error, Qunderflow_error; | |||
| 2582 | extern Lisp_Object Qfloatp; | 2587 | extern Lisp_Object Qfloatp; |
| 2583 | extern Lisp_Object Qnumberp, Qnumber_or_marker_p; | 2588 | extern Lisp_Object Qnumberp, Qnumber_or_marker_p; |
| 2584 | 2589 | ||
| 2585 | extern Lisp_Object Qinteger, Qinterval, Qsymbol, Qstring; | 2590 | extern Lisp_Object Qbuffer, Qinteger, Qsymbol; |
| 2586 | extern Lisp_Object Qmisc, Qvector, Qfloat, Qcons, Qbuffer; | ||
| 2587 | 2591 | ||
| 2588 | extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | 2592 | extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; |
| 2589 | 2593 | ||
| @@ -2630,7 +2634,7 @@ extern _Noreturn void args_out_of_range_3 (Lisp_Object, Lisp_Object, | |||
| 2630 | Lisp_Object); | 2634 | Lisp_Object); |
| 2631 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); | 2635 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); |
| 2632 | extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *); | 2636 | extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *); |
| 2633 | extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, int); | 2637 | extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool); |
| 2634 | extern void syms_of_data (void); | 2638 | extern void syms_of_data (void); |
| 2635 | extern void init_data (void); | 2639 | extern void init_data (void); |
| 2636 | extern void swap_in_global_binding (struct Lisp_Symbol *); | 2640 | extern void swap_in_global_binding (struct Lisp_Symbol *); |
| @@ -2642,7 +2646,7 @@ extern void keys_of_cmds (void); | |||
| 2642 | /* Defined in coding.c */ | 2646 | /* Defined in coding.c */ |
| 2643 | extern Lisp_Object Qcharset; | 2647 | extern Lisp_Object Qcharset; |
| 2644 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, | 2648 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, |
| 2645 | ptrdiff_t, int, int, Lisp_Object); | 2649 | ptrdiff_t, bool, bool, Lisp_Object); |
| 2646 | extern void init_coding (void); | 2650 | extern void init_coding (void); |
| 2647 | extern void init_coding_once (void); | 2651 | extern void init_coding_once (void); |
| 2648 | extern void syms_of_coding (void); | 2652 | extern void syms_of_coding (void); |
| @@ -2730,43 +2734,43 @@ extern void move_gap_both (ptrdiff_t, ptrdiff_t); | |||
| 2730 | extern _Noreturn void buffer_overflow (void); | 2734 | extern _Noreturn void buffer_overflow (void); |
| 2731 | extern void make_gap (ptrdiff_t); | 2735 | extern void make_gap (ptrdiff_t); |
| 2732 | extern ptrdiff_t copy_text (const unsigned char *, unsigned char *, | 2736 | extern ptrdiff_t copy_text (const unsigned char *, unsigned char *, |
| 2733 | ptrdiff_t, int, int); | 2737 | ptrdiff_t, bool, bool); |
| 2734 | extern int count_combining_before (const unsigned char *, | 2738 | extern int count_combining_before (const unsigned char *, |
| 2735 | ptrdiff_t, ptrdiff_t, ptrdiff_t); | 2739 | ptrdiff_t, ptrdiff_t, ptrdiff_t); |
| 2736 | extern int count_combining_after (const unsigned char *, | 2740 | extern int count_combining_after (const unsigned char *, |
| 2737 | ptrdiff_t, ptrdiff_t, ptrdiff_t); | 2741 | ptrdiff_t, ptrdiff_t, ptrdiff_t); |
| 2738 | extern void insert (const char *, ptrdiff_t); | 2742 | extern void insert (const char *, ptrdiff_t); |
| 2739 | extern void insert_and_inherit (const char *, ptrdiff_t); | 2743 | extern void insert_and_inherit (const char *, ptrdiff_t); |
| 2740 | extern void insert_1 (const char *, ptrdiff_t, int, int, int); | 2744 | extern void insert_1 (const char *, ptrdiff_t, bool, bool, bool); |
| 2741 | extern void insert_1_both (const char *, ptrdiff_t, ptrdiff_t, | 2745 | extern void insert_1_both (const char *, ptrdiff_t, ptrdiff_t, |
| 2742 | int, int, int); | 2746 | bool, bool, bool); |
| 2743 | extern void insert_from_gap (ptrdiff_t, ptrdiff_t); | 2747 | extern void insert_from_gap (ptrdiff_t, ptrdiff_t); |
| 2744 | extern void insert_from_string (Lisp_Object, ptrdiff_t, ptrdiff_t, | 2748 | extern void insert_from_string (Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 2745 | ptrdiff_t, ptrdiff_t, int); | 2749 | ptrdiff_t, ptrdiff_t, bool); |
| 2746 | extern void insert_from_buffer (struct buffer *, ptrdiff_t, ptrdiff_t, int); | 2750 | extern void insert_from_buffer (struct buffer *, ptrdiff_t, ptrdiff_t, bool); |
| 2747 | extern void insert_char (int); | 2751 | extern void insert_char (int); |
| 2748 | extern void insert_string (const char *); | 2752 | extern void insert_string (const char *); |
| 2749 | extern void insert_before_markers (const char *, ptrdiff_t); | 2753 | extern void insert_before_markers (const char *, ptrdiff_t); |
| 2750 | extern void insert_before_markers_and_inherit (const char *, ptrdiff_t); | 2754 | extern void insert_before_markers_and_inherit (const char *, ptrdiff_t); |
| 2751 | extern void insert_from_string_before_markers (Lisp_Object, ptrdiff_t, | 2755 | extern void insert_from_string_before_markers (Lisp_Object, ptrdiff_t, |
| 2752 | ptrdiff_t, ptrdiff_t, | 2756 | ptrdiff_t, ptrdiff_t, |
| 2753 | ptrdiff_t, int); | 2757 | ptrdiff_t, bool); |
| 2754 | extern void del_range (ptrdiff_t, ptrdiff_t); | 2758 | extern void del_range (ptrdiff_t, ptrdiff_t); |
| 2755 | extern Lisp_Object del_range_1 (ptrdiff_t, ptrdiff_t, int, int); | 2759 | extern Lisp_Object del_range_1 (ptrdiff_t, ptrdiff_t, bool, bool); |
| 2756 | extern void del_range_byte (ptrdiff_t, ptrdiff_t, int); | 2760 | extern void del_range_byte (ptrdiff_t, ptrdiff_t, bool); |
| 2757 | extern void del_range_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, int); | 2761 | extern void del_range_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); |
| 2758 | extern Lisp_Object del_range_2 (ptrdiff_t, ptrdiff_t, | 2762 | extern Lisp_Object del_range_2 (ptrdiff_t, ptrdiff_t, |
| 2759 | ptrdiff_t, ptrdiff_t, int); | 2763 | ptrdiff_t, ptrdiff_t, bool); |
| 2760 | extern void modify_region (struct buffer *, ptrdiff_t, ptrdiff_t, int); | 2764 | extern void modify_region (struct buffer *, ptrdiff_t, ptrdiff_t, bool); |
| 2761 | extern void prepare_to_modify_buffer (ptrdiff_t, ptrdiff_t, ptrdiff_t *); | 2765 | extern void prepare_to_modify_buffer (ptrdiff_t, ptrdiff_t, ptrdiff_t *); |
| 2762 | extern void signal_after_change (ptrdiff_t, ptrdiff_t, ptrdiff_t); | 2766 | extern void signal_after_change (ptrdiff_t, ptrdiff_t, ptrdiff_t); |
| 2763 | extern void adjust_after_insert (ptrdiff_t, ptrdiff_t, ptrdiff_t, | 2767 | extern void adjust_after_insert (ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 2764 | ptrdiff_t, ptrdiff_t); | 2768 | ptrdiff_t, ptrdiff_t); |
| 2765 | extern void adjust_markers_for_delete (ptrdiff_t, ptrdiff_t, | 2769 | extern void adjust_markers_for_delete (ptrdiff_t, ptrdiff_t, |
| 2766 | ptrdiff_t, ptrdiff_t); | 2770 | ptrdiff_t, ptrdiff_t); |
| 2767 | extern void replace_range (ptrdiff_t, ptrdiff_t, Lisp_Object, int, int, int); | 2771 | extern void replace_range (ptrdiff_t, ptrdiff_t, Lisp_Object, bool, bool, bool); |
| 2768 | extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, | 2772 | extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 2769 | const char *, ptrdiff_t, ptrdiff_t, int); | 2773 | const char *, ptrdiff_t, ptrdiff_t, bool); |
| 2770 | extern void syms_of_insdel (void); | 2774 | extern void syms_of_insdel (void); |
| 2771 | 2775 | ||
| 2772 | /* Defined in dispnew.c */ | 2776 | /* Defined in dispnew.c */ |
| @@ -2776,7 +2780,7 @@ _Noreturn void __executable_start (void); | |||
| 2776 | #endif | 2780 | #endif |
| 2777 | extern Lisp_Object selected_frame; | 2781 | extern Lisp_Object selected_frame; |
| 2778 | extern Lisp_Object Vwindow_system; | 2782 | extern Lisp_Object Vwindow_system; |
| 2779 | extern Lisp_Object sit_for (Lisp_Object, int, int); | 2783 | extern Lisp_Object sit_for (Lisp_Object, bool, int); |
| 2780 | extern void init_display (void); | 2784 | extern void init_display (void); |
| 2781 | extern void syms_of_display (void); | 2785 | extern void syms_of_display (void); |
| 2782 | 2786 | ||
| @@ -2802,7 +2806,7 @@ extern Lisp_Object echo_area_buffer[2]; | |||
| 2802 | extern void add_to_log (const char *, Lisp_Object, Lisp_Object); | 2806 | extern void add_to_log (const char *, Lisp_Object, Lisp_Object); |
| 2803 | extern void check_message_stack (void); | 2807 | extern void check_message_stack (void); |
| 2804 | extern void setup_echo_area_for_printing (int); | 2808 | extern void setup_echo_area_for_printing (int); |
| 2805 | extern int push_message (void); | 2809 | extern bool push_message (void); |
| 2806 | extern Lisp_Object pop_message_unwind (Lisp_Object); | 2810 | extern Lisp_Object pop_message_unwind (Lisp_Object); |
| 2807 | extern Lisp_Object restore_message_unwind (Lisp_Object); | 2811 | extern Lisp_Object restore_message_unwind (Lisp_Object); |
| 2808 | extern void restore_message (void); | 2812 | extern void restore_message (void); |
| @@ -2845,7 +2849,7 @@ extern void uninterrupt_malloc (void); | |||
| 2845 | extern void malloc_warning (const char *); | 2849 | extern void malloc_warning (const char *); |
| 2846 | extern _Noreturn void memory_full (size_t); | 2850 | extern _Noreturn void memory_full (size_t); |
| 2847 | extern _Noreturn void buffer_memory_full (ptrdiff_t); | 2851 | extern _Noreturn void buffer_memory_full (ptrdiff_t); |
| 2848 | extern int survives_gc_p (Lisp_Object); | 2852 | extern bool survives_gc_p (Lisp_Object); |
| 2849 | extern void mark_object (Lisp_Object); | 2853 | extern void mark_object (Lisp_Object); |
| 2850 | #if defined REL_ALLOC && !defined SYSTEM_MALLOC | 2854 | #if defined REL_ALLOC && !defined SYSTEM_MALLOC |
| 2851 | extern void refill_memory_reserve (void); | 2855 | extern void refill_memory_reserve (void); |
| @@ -2887,8 +2891,8 @@ extern Lisp_Object make_uninit_string (EMACS_INT); | |||
| 2887 | extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT); | 2891 | extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT); |
| 2888 | extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); | 2892 | extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); |
| 2889 | extern Lisp_Object make_specified_string (const char *, | 2893 | extern Lisp_Object make_specified_string (const char *, |
| 2890 | ptrdiff_t, ptrdiff_t, int); | 2894 | ptrdiff_t, ptrdiff_t, bool); |
| 2891 | extern Lisp_Object make_pure_string (const char *, ptrdiff_t, ptrdiff_t, int); | 2895 | extern Lisp_Object make_pure_string (const char *, ptrdiff_t, ptrdiff_t, bool); |
| 2892 | extern Lisp_Object make_pure_c_string (const char *, ptrdiff_t); | 2896 | extern Lisp_Object make_pure_c_string (const char *, ptrdiff_t); |
| 2893 | 2897 | ||
| 2894 | /* Make a string allocated in pure space, use STR as string data. */ | 2898 | /* Make a string allocated in pure space, use STR as string data. */ |
| @@ -2922,8 +2926,8 @@ extern struct window *allocate_window (void); | |||
| 2922 | extern struct frame *allocate_frame (void); | 2926 | extern struct frame *allocate_frame (void); |
| 2923 | extern struct Lisp_Process *allocate_process (void); | 2927 | extern struct Lisp_Process *allocate_process (void); |
| 2924 | extern struct terminal *allocate_terminal (void); | 2928 | extern struct terminal *allocate_terminal (void); |
| 2925 | extern int gc_in_progress; | 2929 | extern bool gc_in_progress; |
| 2926 | extern int abort_on_gc; | 2930 | extern bool abort_on_gc; |
| 2927 | extern Lisp_Object make_float (double); | 2931 | extern Lisp_Object make_float (double); |
| 2928 | extern void display_malloc_warning (void); | 2932 | extern void display_malloc_warning (void); |
| 2929 | extern ptrdiff_t inhibit_garbage_collection (void); | 2933 | extern ptrdiff_t inhibit_garbage_collection (void); |
| @@ -3001,6 +3005,7 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t, | |||
| 3001 | /* Defined in lread.c. */ | 3005 | /* Defined in lread.c. */ |
| 3002 | extern Lisp_Object Qvariable_documentation, Qstandard_input; | 3006 | extern Lisp_Object Qvariable_documentation, Qstandard_input; |
| 3003 | extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; | 3007 | extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; |
| 3008 | extern Lisp_Object Qlexical_binding; | ||
| 3004 | extern Lisp_Object check_obarray (Lisp_Object); | 3009 | extern Lisp_Object check_obarray (Lisp_Object); |
| 3005 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); | 3010 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); |
| 3006 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); | 3011 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); |
| @@ -3034,7 +3039,7 @@ intern_c_string (const char *str) | |||
| 3034 | 3039 | ||
| 3035 | /* Defined in eval.c. */ | 3040 | /* Defined in eval.c. */ |
| 3036 | extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro; | 3041 | extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro; |
| 3037 | extern Lisp_Object Qinhibit_quit, Qclosure; | 3042 | extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure; |
| 3038 | extern Lisp_Object Qand_rest; | 3043 | extern Lisp_Object Qand_rest; |
| 3039 | extern Lisp_Object Vautoload_queue; | 3044 | extern Lisp_Object Vautoload_queue; |
| 3040 | extern Lisp_Object Vsignaling_function; | 3045 | extern Lisp_Object Vsignaling_function; |
| @@ -3109,23 +3114,23 @@ extern Lisp_Object save_restriction_save (void); | |||
| 3109 | extern Lisp_Object save_excursion_restore (Lisp_Object); | 3114 | extern Lisp_Object save_excursion_restore (Lisp_Object); |
| 3110 | extern Lisp_Object save_restriction_restore (Lisp_Object); | 3115 | extern Lisp_Object save_restriction_restore (Lisp_Object); |
| 3111 | extern _Noreturn void time_overflow (void); | 3116 | extern _Noreturn void time_overflow (void); |
| 3112 | extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, int); | 3117 | extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, bool); |
| 3113 | extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, | 3118 | extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 3114 | ptrdiff_t, int); | 3119 | ptrdiff_t, bool); |
| 3115 | extern void init_editfns (void); | 3120 | extern void init_editfns (void); |
| 3116 | const char *get_system_name (void); | 3121 | const char *get_system_name (void); |
| 3117 | extern void syms_of_editfns (void); | 3122 | extern void syms_of_editfns (void); |
| 3118 | extern void set_time_zone_rule (const char *); | 3123 | extern void set_time_zone_rule (const char *); |
| 3119 | 3124 | ||
| 3120 | /* Defined in buffer.c. */ | 3125 | /* Defined in buffer.c. */ |
| 3121 | extern int mouse_face_overlay_overlaps (Lisp_Object); | 3126 | extern bool mouse_face_overlay_overlaps (Lisp_Object); |
| 3122 | extern _Noreturn void nsberror (Lisp_Object); | 3127 | extern _Noreturn void nsberror (Lisp_Object); |
| 3123 | extern void adjust_overlays_for_insert (ptrdiff_t, ptrdiff_t); | 3128 | extern void adjust_overlays_for_insert (ptrdiff_t, ptrdiff_t); |
| 3124 | extern void adjust_overlays_for_delete (ptrdiff_t, ptrdiff_t); | 3129 | extern void adjust_overlays_for_delete (ptrdiff_t, ptrdiff_t); |
| 3125 | extern void fix_start_end_in_overlays (ptrdiff_t, ptrdiff_t); | 3130 | extern void fix_start_end_in_overlays (ptrdiff_t, ptrdiff_t); |
| 3126 | extern void report_overlay_modification (Lisp_Object, Lisp_Object, int, | 3131 | extern void report_overlay_modification (Lisp_Object, Lisp_Object, bool, |
| 3127 | Lisp_Object, Lisp_Object, Lisp_Object); | 3132 | Lisp_Object, Lisp_Object, Lisp_Object); |
| 3128 | extern int overlay_touches_p (ptrdiff_t); | 3133 | extern bool overlay_touches_p (ptrdiff_t); |
| 3129 | extern Lisp_Object Vbuffer_alist; | 3134 | extern Lisp_Object Vbuffer_alist; |
| 3130 | extern Lisp_Object set_buffer_if_live (Lisp_Object); | 3135 | extern Lisp_Object set_buffer_if_live (Lisp_Object); |
| 3131 | extern Lisp_Object other_buffer_safely (Lisp_Object); | 3136 | extern Lisp_Object other_buffer_safely (Lisp_Object); |
| @@ -3272,7 +3277,7 @@ extern void syms_of_frame (void); | |||
| 3272 | extern char **initial_argv; | 3277 | extern char **initial_argv; |
| 3273 | extern int initial_argc; | 3278 | extern int initial_argc; |
| 3274 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) | 3279 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) |
| 3275 | extern int display_arg; | 3280 | extern bool display_arg; |
| 3276 | #endif | 3281 | #endif |
| 3277 | extern Lisp_Object decode_env_path (const char *, const char *); | 3282 | extern Lisp_Object decode_env_path (const char *, const char *); |
| 3278 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; | 3283 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| @@ -3291,22 +3296,26 @@ void synchronize_system_time_locale (void); | |||
| 3291 | #define synchronize_system_messages_locale() | 3296 | #define synchronize_system_messages_locale() |
| 3292 | #define synchronize_system_time_locale() | 3297 | #define synchronize_system_time_locale() |
| 3293 | #endif | 3298 | #endif |
| 3294 | void shut_down_emacs (int, int, Lisp_Object); | 3299 | extern void shut_down_emacs (int, Lisp_Object); |
| 3295 | /* Nonzero means don't do interactive redisplay and don't change tty modes. */ | 3300 | |
| 3296 | extern int noninteractive; | 3301 | /* True means don't do interactive redisplay and don't change tty modes. */ |
| 3302 | extern bool noninteractive; | ||
| 3297 | 3303 | ||
| 3298 | /* Nonzero means remove site-lisp directories from load-path. */ | 3304 | /* True means remove site-lisp directories from load-path. */ |
| 3299 | extern int no_site_lisp; | 3305 | extern bool no_site_lisp; |
| 3300 | 3306 | ||
| 3301 | /* Pipe used to send exit notification to the daemon parent at | 3307 | /* Pipe used to send exit notification to the daemon parent at |
| 3302 | startup. */ | 3308 | startup. */ |
| 3303 | extern int daemon_pipe[2]; | 3309 | extern int daemon_pipe[2]; |
| 3304 | #define IS_DAEMON (daemon_pipe[1] != 0) | 3310 | #define IS_DAEMON (daemon_pipe[1] != 0) |
| 3305 | 3311 | ||
| 3306 | /* Nonzero means don't do use window-system-specific display code. */ | 3312 | /* True if handling a fatal error already. */ |
| 3307 | extern int inhibit_window_system; | 3313 | extern bool fatal_error_in_progress; |
| 3308 | /* Nonzero means that a filter or a sentinel is running. */ | 3314 | |
| 3309 | extern int running_asynch_code; | 3315 | /* True means don't do use window-system-specific display code. */ |
| 3316 | extern bool inhibit_window_system; | ||
| 3317 | /* True means that a filter or a sentinel is running. */ | ||
| 3318 | extern bool running_asynch_code; | ||
| 3310 | 3319 | ||
| 3311 | /* Defined in process.c. */ | 3320 | /* Defined in process.c. */ |
| 3312 | extern Lisp_Object QCtype, Qlocal; | 3321 | extern Lisp_Object QCtype, Qlocal; |
| @@ -3338,7 +3347,7 @@ extern void setup_process_coding_systems (Lisp_Object); | |||
| 3338 | #ifndef DOS_NT | 3347 | #ifndef DOS_NT |
| 3339 | _Noreturn | 3348 | _Noreturn |
| 3340 | #endif | 3349 | #endif |
| 3341 | extern int child_setup (int, int, int, char **, int, Lisp_Object); | 3350 | extern int child_setup (int, int, int, char **, bool, Lisp_Object); |
| 3342 | extern void init_callproc_1 (void); | 3351 | extern void init_callproc_1 (void); |
| 3343 | extern void init_callproc (void); | 3352 | extern void init_callproc (void); |
| 3344 | extern void set_initial_environment (void); | 3353 | extern void set_initial_environment (void); |
| @@ -3347,9 +3356,9 @@ extern void syms_of_callproc (void); | |||
| 3347 | /* Defined in doc.c */ | 3356 | /* Defined in doc.c */ |
| 3348 | extern Lisp_Object Qfunction_documentation; | 3357 | extern Lisp_Object Qfunction_documentation; |
| 3349 | extern Lisp_Object read_doc_string (Lisp_Object); | 3358 | extern Lisp_Object read_doc_string (Lisp_Object); |
| 3350 | extern Lisp_Object get_doc_string (Lisp_Object, int, int); | 3359 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); |
| 3351 | extern void syms_of_doc (void); | 3360 | extern void syms_of_doc (void); |
| 3352 | extern int read_bytecode_char (int); | 3361 | extern int read_bytecode_char (bool); |
| 3353 | 3362 | ||
| 3354 | /* Defined in bytecode.c */ | 3363 | /* Defined in bytecode.c */ |
| 3355 | extern Lisp_Object Qbytecode; | 3364 | extern Lisp_Object Qbytecode; |
| @@ -3419,7 +3428,8 @@ extern void child_setup_tty (int); | |||
| 3419 | extern void setup_pty (int); | 3428 | extern void setup_pty (int); |
| 3420 | extern int set_window_size (int, int, int); | 3429 | extern int set_window_size (int, int, int); |
| 3421 | extern EMACS_INT get_random (void); | 3430 | extern EMACS_INT get_random (void); |
| 3422 | extern void seed_random (long); | 3431 | extern void seed_random (void *, ptrdiff_t); |
| 3432 | extern void init_random (void); | ||
| 3423 | extern int emacs_open (const char *, int, int); | 3433 | extern int emacs_open (const char *, int, int); |
| 3424 | extern int emacs_close (int); | 3434 | extern int emacs_close (int); |
| 3425 | extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); | 3435 | extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); |
| @@ -3448,11 +3458,10 @@ extern void syms_of_ccl (void); | |||
| 3448 | extern void syms_of_dired (void); | 3458 | extern void syms_of_dired (void); |
| 3449 | extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, | 3459 | extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, |
| 3450 | Lisp_Object, Lisp_Object, | 3460 | Lisp_Object, Lisp_Object, |
| 3451 | int, Lisp_Object); | 3461 | bool, Lisp_Object); |
| 3452 | 3462 | ||
| 3453 | /* Defined in term.c */ | 3463 | /* Defined in term.c */ |
| 3454 | extern int *char_ins_del_vector; | 3464 | extern int *char_ins_del_vector; |
| 3455 | extern void mark_ttys (void); | ||
| 3456 | extern void syms_of_term (void); | 3465 | extern void syms_of_term (void); |
| 3457 | extern _Noreturn void fatal (const char *msgid, ...) | 3466 | extern _Noreturn void fatal (const char *msgid, ...) |
| 3458 | ATTRIBUTE_FORMAT_PRINTF (1, 2); | 3467 | ATTRIBUTE_FORMAT_PRINTF (1, 2); |
| @@ -3480,6 +3489,9 @@ extern Lisp_Object Qface; | |||
| 3480 | extern Lisp_Object Qnormal; | 3489 | extern Lisp_Object Qnormal; |
| 3481 | extern Lisp_Object QCfamily, QCweight, QCslant; | 3490 | extern Lisp_Object QCfamily, QCweight, QCslant; |
| 3482 | extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; | 3491 | extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; |
| 3492 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; | ||
| 3493 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; | ||
| 3494 | extern Lisp_Object Qoblique, Qitalic; | ||
| 3483 | extern Lisp_Object Vface_alternative_font_family_alist; | 3495 | extern Lisp_Object Vface_alternative_font_family_alist; |
| 3484 | extern Lisp_Object Vface_alternative_font_registry_alist; | 3496 | extern Lisp_Object Vface_alternative_font_registry_alist; |
| 3485 | extern void syms_of_xfaces (void); | 3497 | extern void syms_of_xfaces (void); |
| @@ -3524,9 +3536,9 @@ void syms_of_dbusbind (void); | |||
| 3524 | extern char *emacs_root_dir (void); | 3536 | extern char *emacs_root_dir (void); |
| 3525 | #endif /* DOS_NT */ | 3537 | #endif /* DOS_NT */ |
| 3526 | 3538 | ||
| 3527 | /* Nonzero means Emacs has already been initialized. | 3539 | /* True means Emacs has already been initialized. |
| 3528 | Used during startup to detect startup of dumped Emacs. */ | 3540 | Used during startup to detect startup of dumped Emacs. */ |
| 3529 | extern int initialized; | 3541 | extern bool initialized; |
| 3530 | 3542 | ||
| 3531 | extern int immediate_quit; /* Nonzero means ^G can quit instantly */ | 3543 | extern int immediate_quit; /* Nonzero means ^G can quit instantly */ |
| 3532 | 3544 | ||
| @@ -3593,7 +3605,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); | |||
| 3593 | extern void *record_xmalloc (size_t); | 3605 | extern void *record_xmalloc (size_t); |
| 3594 | 3606 | ||
| 3595 | #define USE_SAFE_ALLOCA \ | 3607 | #define USE_SAFE_ALLOCA \ |
| 3596 | ptrdiff_t sa_count = SPECPDL_INDEX (); int sa_must_free = 0 | 3608 | ptrdiff_t sa_count = SPECPDL_INDEX (); bool sa_must_free = 0 |
| 3597 | 3609 | ||
| 3598 | /* SAFE_ALLOCA allocates a simple buffer. */ | 3610 | /* SAFE_ALLOCA allocates a simple buffer. */ |
| 3599 | 3611 | ||
| @@ -3664,6 +3676,38 @@ maybe_gc (void) | |||
| 3664 | Fgarbage_collect (); | 3676 | Fgarbage_collect (); |
| 3665 | } | 3677 | } |
| 3666 | 3678 | ||
| 3679 | LISP_INLINE int | ||
| 3680 | functionp (Lisp_Object object) | ||
| 3681 | { | ||
| 3682 | if (SYMBOLP (object) && !NILP (Ffboundp (object))) | ||
| 3683 | { | ||
| 3684 | object = Findirect_function (object, Qt); | ||
| 3685 | |||
| 3686 | if (CONSP (object) && EQ (XCAR (object), Qautoload)) | ||
| 3687 | { | ||
| 3688 | /* Autoloaded symbols are functions, except if they load | ||
| 3689 | macros or keymaps. */ | ||
| 3690 | int i; | ||
| 3691 | for (i = 0; i < 4 && CONSP (object); i++) | ||
| 3692 | object = XCDR (object); | ||
| 3693 | |||
| 3694 | return ! (CONSP (object) && !NILP (XCAR (object))); | ||
| 3695 | } | ||
| 3696 | } | ||
| 3697 | |||
| 3698 | if (SUBRP (object)) | ||
| 3699 | return XSUBR (object)->max_args != UNEVALLED; | ||
| 3700 | else if (COMPILEDP (object)) | ||
| 3701 | return 1; | ||
| 3702 | else if (CONSP (object)) | ||
| 3703 | { | ||
| 3704 | Lisp_Object car = XCAR (object); | ||
| 3705 | return EQ (car, Qlambda) || EQ (car, Qclosure); | ||
| 3706 | } | ||
| 3707 | else | ||
| 3708 | return 0; | ||
| 3709 | } | ||
| 3710 | |||
| 3667 | INLINE_HEADER_END | 3711 | INLINE_HEADER_END |
| 3668 | 3712 | ||
| 3669 | #endif /* EMACS_LISP_H */ | 3713 | #endif /* EMACS_LISP_H */ |
diff --git a/src/lread.c b/src/lread.c index e2ad03b349f..1dd6275684b 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -89,8 +89,6 @@ static Lisp_Object Qget_emacs_mule_file_char; | |||
| 89 | 89 | ||
| 90 | static Lisp_Object Qload_force_doc_strings; | 90 | static Lisp_Object Qload_force_doc_strings; |
| 91 | 91 | ||
| 92 | extern Lisp_Object Qinternal_interpreter_environment; | ||
| 93 | |||
| 94 | static Lisp_Object Qload_in_progress; | 92 | static Lisp_Object Qload_in_progress; |
| 95 | 93 | ||
| 96 | /* The association list of objects read with the #n=object form. | 94 | /* The association list of objects read with the #n=object form. |
| @@ -189,7 +187,7 @@ static int readbyte_from_string (int, Lisp_Object); | |||
| 189 | static int unread_char; | 187 | static int unread_char; |
| 190 | 188 | ||
| 191 | static int | 189 | static int |
| 192 | readchar (Lisp_Object readcharfun, int *multibyte) | 190 | readchar (Lisp_Object readcharfun, bool *multibyte) |
| 193 | { | 191 | { |
| 194 | Lisp_Object tem; | 192 | Lisp_Object tem; |
| 195 | register int c; | 193 | register int c; |
| @@ -2354,9 +2352,9 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix) | |||
| 2354 | static Lisp_Object | 2352 | static Lisp_Object |
| 2355 | read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | 2353 | read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) |
| 2356 | { | 2354 | { |
| 2357 | register int c; | 2355 | int c; |
| 2358 | unsigned uninterned_symbol = 0; | 2356 | bool uninterned_symbol = 0; |
| 2359 | int multibyte; | 2357 | bool multibyte; |
| 2360 | 2358 | ||
| 2361 | *pch = 0; | 2359 | *pch = 0; |
| 2362 | load_each_byte = 0; | 2360 | load_each_byte = 0; |
| @@ -3406,7 +3404,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag) | |||
| 3406 | /* Delay handling the bytecode slot until we know whether | 3404 | /* Delay handling the bytecode slot until we know whether |
| 3407 | it is lazily-loaded (we can tell by whether the | 3405 | it is lazily-loaded (we can tell by whether the |
| 3408 | constants slot is nil). */ | 3406 | constants slot is nil). */ |
| 3409 | ptr[COMPILED_CONSTANTS] = item; | 3407 | ASET (vector, COMPILED_CONSTANTS, item); |
| 3410 | item = Qnil; | 3408 | item = Qnil; |
| 3411 | } | 3409 | } |
| 3412 | else if (i == COMPILED_CONSTANTS) | 3410 | else if (i == COMPILED_CONSTANTS) |
| @@ -3432,7 +3430,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag) | |||
| 3432 | } | 3430 | } |
| 3433 | 3431 | ||
| 3434 | /* Now handle the bytecode slot. */ | 3432 | /* Now handle the bytecode slot. */ |
| 3435 | ptr[COMPILED_BYTECODE] = bytestr; | 3433 | ASET (vector, COMPILED_BYTECODE, bytestr); |
| 3436 | } | 3434 | } |
| 3437 | else if (i == COMPILED_DOC_STRING | 3435 | else if (i == COMPILED_DOC_STRING |
| 3438 | && STRINGP (item) | 3436 | && STRINGP (item) |
| @@ -3444,7 +3442,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag) | |||
| 3444 | item = Fstring_as_multibyte (item); | 3442 | item = Fstring_as_multibyte (item); |
| 3445 | } | 3443 | } |
| 3446 | } | 3444 | } |
| 3447 | ptr[i] = item; | 3445 | ASET (vector, i, item); |
| 3448 | otem = XCONS (tem); | 3446 | otem = XCONS (tem); |
| 3449 | tem = Fcdr (tem); | 3447 | tem = Fcdr (tem); |
| 3450 | free_cons (otem); | 3448 | free_cons (otem); |
| @@ -4253,9 +4251,12 @@ init_lread (void) | |||
| 4253 | { | 4251 | { |
| 4254 | tem = Fexpand_file_name (build_string ("site-lisp"), | 4252 | tem = Fexpand_file_name (build_string ("site-lisp"), |
| 4255 | Vsource_directory); | 4253 | Vsource_directory); |
| 4256 | 4254 | tem1 = Ffile_exists_p (tem); | |
| 4257 | if (NILP (Fmember (tem, Vload_path))) | 4255 | if (!NILP (tem1)) |
| 4258 | Vload_path = Fcons (tem, Vload_path); | 4256 | { |
| 4257 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4258 | Vload_path = Fcons (tem, Vload_path); | ||
| 4259 | } | ||
| 4259 | } | 4260 | } |
| 4260 | } | 4261 | } |
| 4261 | } /* Vinstallation_directory != Vsource_directory */ | 4262 | } /* Vinstallation_directory != Vsource_directory */ |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index bdb292099bc..a8dcf5f2ae8 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -390,6 +390,7 @@ SYSTIME_H = $(SRC)/systime.h \ | |||
| 390 | $(NT_INC)/sys/time.h \ | 390 | $(NT_INC)/sys/time.h \ |
| 391 | $(GNU_LIB)/timespec.h | 391 | $(GNU_LIB)/timespec.h |
| 392 | ATIMER_H = $(SRC)/atimer.h \ | 392 | ATIMER_H = $(SRC)/atimer.h \ |
| 393 | $(NT_INC)/stdbool.h \ | ||
| 393 | $(SYSTIME_H) | 394 | $(SYSTIME_H) |
| 394 | BLOCKINPUT_H = $(SRC)/blockinput.h \ | 395 | BLOCKINPUT_H = $(SRC)/blockinput.h \ |
| 395 | $(ATIMER_H) | 396 | $(ATIMER_H) |
| @@ -401,6 +402,8 @@ CAREADLINKAT_H = $(GNU_LIB)/careadlinkat.h \ | |||
| 401 | $(NT_INC)/unistd.h | 402 | $(NT_INC)/unistd.h |
| 402 | CHARACTER_H = $(SRC)/character.h \ | 403 | CHARACTER_H = $(SRC)/character.h \ |
| 403 | $(GNU_LIB)/verify.h | 404 | $(GNU_LIB)/verify.h |
| 405 | CCL_H = $(SRC)/ccl.h \ | ||
| 406 | $(CHARACTER_H) | ||
| 404 | CHARSET_H = $(SRC)/charset.h \ | 407 | CHARSET_H = $(SRC)/charset.h \ |
| 405 | $(GNU_LIB)/verify.h | 408 | $(GNU_LIB)/verify.h |
| 406 | CODING_H = $(SRC)/coding.h \ | 409 | CODING_H = $(SRC)/coding.h \ |
| @@ -422,7 +425,7 @@ DISPEXTERN_H = $(SRC)/dispextern.h \ | |||
| 422 | FILEMODE_H = $(GNU_LIB)/filemode.h \ | 425 | FILEMODE_H = $(GNU_LIB)/filemode.h \ |
| 423 | $(NT_INC)/sys/stat.h | 426 | $(NT_INC)/sys/stat.h |
| 424 | FONT_H = $(SRC)/font.h \ | 427 | FONT_H = $(SRC)/font.h \ |
| 425 | $(SRC)/ccl.h | 428 | $(CCL_H) |
| 426 | FRAME_H = $(SRC)/frame.h \ | 429 | FRAME_H = $(SRC)/frame.h \ |
| 427 | $(DISPEXTERN_H) | 430 | $(DISPEXTERN_H) |
| 428 | FTOASTR_H = $(GNU_LIB)/ftoastr.h \ | 431 | FTOASTR_H = $(GNU_LIB)/ftoastr.h \ |
| @@ -469,6 +472,8 @@ SYSTTY_H = $(SRC)/systty.h \ | |||
| 469 | $(NT_INC)/unistd.h | 472 | $(NT_INC)/unistd.h |
| 470 | TERMHOOKS_H = $(SRC)/termhooks.h \ | 473 | TERMHOOKS_H = $(SRC)/termhooks.h \ |
| 471 | $(SYSTIME_H) | 474 | $(SYSTIME_H) |
| 475 | W32FONT_H = $(SRC)/w32font.h \ | ||
| 476 | $(FONT_H) | ||
| 472 | W32TERM_H = $(SRC)/w32term.h \ | 477 | W32TERM_H = $(SRC)/w32term.h \ |
| 473 | $(W32GUI_H) | 478 | $(W32GUI_H) |
| 474 | WINDOW_H = $(SRC)/window.h \ | 479 | WINDOW_H = $(SRC)/window.h \ |
| @@ -553,7 +558,6 @@ $(BLD)/callint.$(O) : \ | |||
| 553 | 558 | ||
| 554 | $(BLD)/callproc.$(O) : \ | 559 | $(BLD)/callproc.$(O) : \ |
| 555 | $(SRC)/callproc.c \ | 560 | $(SRC)/callproc.c \ |
| 556 | $(SRC)/ccl.h \ | ||
| 557 | $(SRC)/commands.h \ | 561 | $(SRC)/commands.h \ |
| 558 | $(SRC)/composite.h \ | 562 | $(SRC)/composite.h \ |
| 559 | $(SRC)/epaths.h \ | 563 | $(SRC)/epaths.h \ |
| @@ -563,6 +567,7 @@ $(BLD)/callproc.$(O) : \ | |||
| 563 | $(NT_INC)/unistd.h \ | 567 | $(NT_INC)/unistd.h \ |
| 564 | $(BLOCKINPUT_H) \ | 568 | $(BLOCKINPUT_H) \ |
| 565 | $(BUFFER_H) \ | 569 | $(BUFFER_H) \ |
| 570 | $(CCL_H) \ | ||
| 566 | $(CHARACTER_H) \ | 571 | $(CHARACTER_H) \ |
| 567 | $(CODING_H) \ | 572 | $(CODING_H) \ |
| 568 | $(CONFIG_H) \ | 573 | $(CONFIG_H) \ |
| @@ -602,7 +607,7 @@ $(BLD)/category.$(O) : \ | |||
| 602 | 607 | ||
| 603 | $(BLD)/ccl.$(O) : \ | 608 | $(BLD)/ccl.$(O) : \ |
| 604 | $(SRC)/ccl.c \ | 609 | $(SRC)/ccl.c \ |
| 605 | $(SRC)/ccl.h \ | 610 | $(CCL_H) \ |
| 606 | $(CHARACTER_H) \ | 611 | $(CHARACTER_H) \ |
| 607 | $(CHARSET_H) \ | 612 | $(CHARSET_H) \ |
| 608 | $(CODING_H) \ | 613 | $(CODING_H) \ |
| @@ -634,7 +639,7 @@ $(BLD)/charset.$(O) : \ | |||
| 634 | 639 | ||
| 635 | $(BLD)/chartab.$(O) : \ | 640 | $(BLD)/chartab.$(O) : \ |
| 636 | $(SRC)/chartab.c \ | 641 | $(SRC)/chartab.c \ |
| 637 | $(SRC)/ccl.h \ | 642 | $(CCL_H) \ |
| 638 | $(CHARACTER_H) \ | 643 | $(CHARACTER_H) \ |
| 639 | $(CHARSET_H) \ | 644 | $(CHARSET_H) \ |
| 640 | $(CONFIG_H) \ | 645 | $(CONFIG_H) \ |
| @@ -656,9 +661,9 @@ $(BLD)/cmds.$(O) : \ | |||
| 656 | 661 | ||
| 657 | $(BLD)/coding.$(O) : \ | 662 | $(BLD)/coding.$(O) : \ |
| 658 | $(SRC)/coding.c \ | 663 | $(SRC)/coding.c \ |
| 659 | $(SRC)/ccl.h \ | ||
| 660 | $(SRC)/composite.h \ | 664 | $(SRC)/composite.h \ |
| 661 | $(BUFFER_H) \ | 665 | $(BUFFER_H) \ |
| 666 | $(CCL_H) \ | ||
| 662 | $(CHARACTER_H) \ | 667 | $(CHARACTER_H) \ |
| 663 | $(CHARSET_H) \ | 668 | $(CHARSET_H) \ |
| 664 | $(CODING_H) \ | 669 | $(CODING_H) \ |
| @@ -802,6 +807,7 @@ $(BLD)/emacs.$(O) : \ | |||
| 802 | $(PROCESS_H) \ | 807 | $(PROCESS_H) \ |
| 803 | $(SYSTTY_H) \ | 808 | $(SYSTTY_H) \ |
| 804 | $(TERMHOOKS_H) \ | 809 | $(TERMHOOKS_H) \ |
| 810 | $(W32TERM_H) \ | ||
| 805 | $(WINDOW_H) | 811 | $(WINDOW_H) |
| 806 | 812 | ||
| 807 | $(BLD)/eval.$(O) : \ | 813 | $(BLD)/eval.$(O) : \ |
| @@ -897,10 +903,10 @@ $(BLD)/font.$(O) : \ | |||
| 897 | 903 | ||
| 898 | $(BLD)/fontset.$(O) : \ | 904 | $(BLD)/fontset.$(O) : \ |
| 899 | $(SRC)/fontset.c \ | 905 | $(SRC)/fontset.c \ |
| 900 | $(SRC)/ccl.h \ | ||
| 901 | $(SRC)/fontset.h \ | 906 | $(SRC)/fontset.h \ |
| 902 | $(BLOCKINPUT_H) \ | 907 | $(BLOCKINPUT_H) \ |
| 903 | $(BUFFER_H) \ | 908 | $(BUFFER_H) \ |
| 909 | $(CCL_H) \ | ||
| 904 | $(CHARACTER_H) \ | 910 | $(CHARACTER_H) \ |
| 905 | $(CHARSET_H) \ | 911 | $(CHARSET_H) \ |
| 906 | $(CONFIG_H) \ | 912 | $(CONFIG_H) \ |
| @@ -1268,6 +1274,7 @@ $(BLD)/process.$(O) : \ | |||
| 1268 | $(SYSTIME_H) \ | 1274 | $(SYSTIME_H) \ |
| 1269 | $(SYSTTY_H) \ | 1275 | $(SYSTTY_H) \ |
| 1270 | $(TERMHOOKS_H) \ | 1276 | $(TERMHOOKS_H) \ |
| 1277 | $(W32TERM_H) \ | ||
| 1271 | $(WINDOW_H) | 1278 | $(WINDOW_H) |
| 1272 | 1279 | ||
| 1273 | $(BLD)/ralloc.$(O) : \ | 1280 | $(BLD)/ralloc.$(O) : \ |
| @@ -1523,14 +1530,13 @@ $(BLD)/xfaces.$(O) : \ | |||
| 1523 | 1530 | ||
| 1524 | $(BLD)/w32fns.$(O) : \ | 1531 | $(BLD)/w32fns.$(O) : \ |
| 1525 | $(SRC)/w32fns.c \ | 1532 | $(SRC)/w32fns.c \ |
| 1526 | $(SRC)/ccl.h \ | ||
| 1527 | $(SRC)/epaths.h \ | 1533 | $(SRC)/epaths.h \ |
| 1528 | $(SRC)/fontset.h \ | 1534 | $(SRC)/fontset.h \ |
| 1529 | $(SRC)/w32.h \ | 1535 | $(SRC)/w32.h \ |
| 1530 | $(SRC)/w32font.h \ | ||
| 1531 | $(SRC)/w32heap.h \ | 1536 | $(SRC)/w32heap.h \ |
| 1532 | $(BLOCKINPUT_H) \ | 1537 | $(BLOCKINPUT_H) \ |
| 1533 | $(BUFFER_H) \ | 1538 | $(BUFFER_H) \ |
| 1539 | $(CCL_H) \ | ||
| 1534 | $(CHARACTER_H) \ | 1540 | $(CHARACTER_H) \ |
| 1535 | $(CHARSET_H) \ | 1541 | $(CHARSET_H) \ |
| 1536 | $(CODING_H) \ | 1542 | $(CODING_H) \ |
| @@ -1543,6 +1549,7 @@ $(BLD)/w32fns.$(O) : \ | |||
| 1543 | $(LISP_H) \ | 1549 | $(LISP_H) \ |
| 1544 | $(SYSTIME_H) \ | 1550 | $(SYSTIME_H) \ |
| 1545 | $(TERMHOOKS_H) \ | 1551 | $(TERMHOOKS_H) \ |
| 1552 | $(W32FONT_H) \ | ||
| 1546 | $(W32TERM_H) \ | 1553 | $(W32TERM_H) \ |
| 1547 | $(WINDOW_H) | 1554 | $(WINDOW_H) |
| 1548 | 1555 | ||
| @@ -1567,18 +1574,17 @@ $(BLD)/w32menu.$(O) : \ | |||
| 1567 | 1574 | ||
| 1568 | $(BLD)/w32term.$(O) : \ | 1575 | $(BLD)/w32term.$(O) : \ |
| 1569 | $(SRC)/w32term.c \ | 1576 | $(SRC)/w32term.c \ |
| 1570 | $(SRC)/ccl.h \ | ||
| 1571 | $(SRC)/disptab.h \ | 1577 | $(SRC)/disptab.h \ |
| 1572 | $(SRC)/fontset.h \ | 1578 | $(SRC)/fontset.h \ |
| 1573 | $(SRC)/keymap.h \ | 1579 | $(SRC)/keymap.h \ |
| 1574 | $(SRC)/termchar.h \ | 1580 | $(SRC)/termchar.h \ |
| 1575 | $(SRC)/termopts.h \ | 1581 | $(SRC)/termopts.h \ |
| 1576 | $(SRC)/w32font.h \ | ||
| 1577 | $(SRC)/w32heap.h \ | 1582 | $(SRC)/w32heap.h \ |
| 1578 | $(NT_INC)/sys/stat.h \ | 1583 | $(NT_INC)/sys/stat.h \ |
| 1579 | $(ATIMER_H) \ | 1584 | $(ATIMER_H) \ |
| 1580 | $(BLOCKINPUT_H) \ | 1585 | $(BLOCKINPUT_H) \ |
| 1581 | $(BUFFER_H) \ | 1586 | $(BUFFER_H) \ |
| 1587 | $(CCL_H) \ | ||
| 1582 | $(CHARACTER_H) \ | 1588 | $(CHARACTER_H) \ |
| 1583 | $(CHARSET_H) \ | 1589 | $(CHARSET_H) \ |
| 1584 | $(CODING_H) \ | 1590 | $(CODING_H) \ |
| @@ -1593,6 +1599,7 @@ $(BLD)/w32term.$(O) : \ | |||
| 1593 | $(SYSTIME_H) \ | 1599 | $(SYSTIME_H) \ |
| 1594 | $(SYSTTY_H) \ | 1600 | $(SYSTTY_H) \ |
| 1595 | $(TERMHOOKS_H) \ | 1601 | $(TERMHOOKS_H) \ |
| 1602 | $(W32FONT_H) \ | ||
| 1596 | $(W32TERM_H) \ | 1603 | $(W32TERM_H) \ |
| 1597 | $(WINDOW_H) | 1604 | $(WINDOW_H) |
| 1598 | 1605 | ||
| @@ -1628,7 +1635,6 @@ $(BLD)/w32xfns.$(O) : \ | |||
| 1628 | $(BLD)/w32font.$(O) : \ | 1635 | $(BLD)/w32font.$(O) : \ |
| 1629 | $(SRC)/w32font.c \ | 1636 | $(SRC)/w32font.c \ |
| 1630 | $(SRC)/fontset.h \ | 1637 | $(SRC)/fontset.h \ |
| 1631 | $(SRC)/w32font.h \ | ||
| 1632 | $(CHARACTER_H) \ | 1638 | $(CHARACTER_H) \ |
| 1633 | $(CHARSET_H) \ | 1639 | $(CHARSET_H) \ |
| 1634 | $(CODING_H) \ | 1640 | $(CODING_H) \ |
| @@ -1637,13 +1643,13 @@ $(BLD)/w32font.$(O) : \ | |||
| 1637 | $(FONT_H) \ | 1643 | $(FONT_H) \ |
| 1638 | $(FRAME_H) \ | 1644 | $(FRAME_H) \ |
| 1639 | $(LISP_H) \ | 1645 | $(LISP_H) \ |
| 1646 | $(W32FONT_H) \ | ||
| 1640 | $(W32TERM_H) | 1647 | $(W32TERM_H) |
| 1641 | 1648 | ||
| 1642 | $(BLD)/w32uniscribe.$(O) : \ | 1649 | $(BLD)/w32uniscribe.$(O) : \ |
| 1643 | $(SRC)/w32uniscribe.c \ | 1650 | $(SRC)/w32uniscribe.c \ |
| 1644 | $(SRC)/composite.h \ | 1651 | $(SRC)/composite.h \ |
| 1645 | $(SRC)/fontset.h \ | 1652 | $(SRC)/fontset.h \ |
| 1646 | $(SRC)/w32font.h \ | ||
| 1647 | $(CHARACTER_H) \ | 1653 | $(CHARACTER_H) \ |
| 1648 | $(CHARSET_H) \ | 1654 | $(CHARSET_H) \ |
| 1649 | $(CONFIG_H) \ | 1655 | $(CONFIG_H) \ |
| @@ -1651,6 +1657,7 @@ $(BLD)/w32uniscribe.$(O) : \ | |||
| 1651 | $(FONT_H) \ | 1657 | $(FONT_H) \ |
| 1652 | $(FRAME_H) \ | 1658 | $(FRAME_H) \ |
| 1653 | $(LISP_H) \ | 1659 | $(LISP_H) \ |
| 1660 | $(W32FONT_H) \ | ||
| 1654 | $(W32TERM_H) | 1661 | $(W32TERM_H) |
| 1655 | 1662 | ||
| 1656 | # Each object file depends on stamp_BLD, because in parallel builds we must | 1663 | # Each object file depends on stamp_BLD, because in parallel builds we must |
diff --git a/src/menu.c b/src/menu.c index 3e466b46aa3..20770537326 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -36,24 +36,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 36 | #include "../lwlib/lwlib.h" | 36 | #include "../lwlib/lwlib.h" |
| 37 | #endif | 37 | #endif |
| 38 | 38 | ||
| 39 | #ifdef HAVE_X_WINDOWS | 39 | #ifdef HAVE_WINDOW_SYSTEM |
| 40 | #include "xterm.h" | 40 | #include TERM_HEADER |
| 41 | #endif | 41 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 42 | |||
| 43 | #ifdef HAVE_NS | ||
| 44 | #include "nsterm.h" | ||
| 45 | #endif | ||
| 46 | |||
| 47 | #ifdef USE_GTK | ||
| 48 | #include "gtkutil.h" | ||
| 49 | #endif | ||
| 50 | 42 | ||
| 51 | #ifdef HAVE_NTGUI | 43 | #ifdef HAVE_NTGUI |
| 52 | #include "w32term.h" | ||
| 53 | |||
| 54 | extern AppendMenuW_Proc unicode_append_menu; | 44 | extern AppendMenuW_Proc unicode_append_menu; |
| 55 | extern HMENU current_popup_menu; | 45 | extern HMENU current_popup_menu; |
| 56 | |||
| 57 | #endif /* HAVE_NTGUI */ | 46 | #endif /* HAVE_NTGUI */ |
| 58 | 47 | ||
| 59 | #include "menu.h" | 48 | #include "menu.h" |
diff --git a/src/minibuf.c b/src/minibuf.c index 2154d1654df..2035a3e3985 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -817,7 +817,7 @@ get_minibuffer (EMACS_INT depth) | |||
| 817 | while the buffer doesn't know about them any more. */ | 817 | while the buffer doesn't know about them any more. */ |
| 818 | delete_all_overlays (XBUFFER (buf)); | 818 | delete_all_overlays (XBUFFER (buf)); |
| 819 | reset_buffer (XBUFFER (buf)); | 819 | reset_buffer (XBUFFER (buf)); |
| 820 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 820 | record_unwind_current_buffer (); |
| 821 | Fset_buffer (buf); | 821 | Fset_buffer (buf); |
| 822 | if (!NILP (Ffboundp (intern ("minibuffer-inactive-mode")))) | 822 | if (!NILP (Ffboundp (intern ("minibuffer-inactive-mode")))) |
| 823 | call0 (intern ("minibuffer-inactive-mode")); | 823 | call0 (intern ("minibuffer-inactive-mode")); |
| @@ -1860,7 +1860,6 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1860 | } | 1860 | } |
| 1861 | 1861 | ||
| 1862 | static Lisp_Object Qmetadata; | 1862 | static Lisp_Object Qmetadata; |
| 1863 | extern Lisp_Object Qbuffer; | ||
| 1864 | 1863 | ||
| 1865 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, | 1864 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, |
| 1866 | doc: /* Perform completion on buffer names. | 1865 | doc: /* Perform completion on buffer names. |
diff --git a/src/msdos.c b/src/msdos.c index 30435820d9e..ac348e94375 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -1029,7 +1029,6 @@ IT_clear_end_of_line (struct frame *f, int first_unused) | |||
| 1029 | { | 1029 | { |
| 1030 | char *spaces, *sp; | 1030 | char *spaces, *sp; |
| 1031 | int i, j, offset = 2 * (new_pos_X + screen_size_X * new_pos_Y); | 1031 | int i, j, offset = 2 * (new_pos_X + screen_size_X * new_pos_Y); |
| 1032 | extern int fatal_error_in_progress; | ||
| 1033 | struct tty_display_info *tty = FRAME_TTY (f); | 1032 | struct tty_display_info *tty = FRAME_TTY (f); |
| 1034 | 1033 | ||
| 1035 | if (new_pos_X >= first_unused || fatal_error_in_progress) | 1034 | if (new_pos_X >= first_unused || fatal_error_in_progress) |
| @@ -2434,10 +2433,10 @@ and then the scan code. */) | |||
| 2434 | else | 2433 | else |
| 2435 | { | 2434 | { |
| 2436 | val = Fvector (NUM_RECENT_DOSKEYS, keys); | 2435 | val = Fvector (NUM_RECENT_DOSKEYS, keys); |
| 2437 | memcpy (XVECTOR (val)->contents, keys + recent_doskeys_index, | 2436 | vcopy (val, 0, keys + recent_doskeys_index, |
| 2438 | (NUM_RECENT_DOSKEYS - recent_doskeys_index) * word_size); | 2437 | NUM_RECENT_DOSKEYS - recent_doskeys_index); |
| 2439 | memcpy (XVECTOR (val)->contents + NUM_RECENT_DOSKEYS - recent_doskeys_index, | 2438 | vcopy (val, NUM_RECENT_DOSKEYS - recent_doskeys_index, |
| 2440 | keys, recent_doskeys_index * word_size); | 2439 | keys, recent_doskeys_index); |
| 2441 | return val; | 2440 | return val; |
| 2442 | } | 2441 | } |
| 2443 | } | 2442 | } |
diff --git a/src/nsmenu.m b/src/nsmenu.m index e8a0b43a01b..9e290486213 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -1497,6 +1497,8 @@ ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header) | |||
| 1497 | FlippedView *contentView; | 1497 | FlippedView *contentView; |
| 1498 | NSImage *img; | 1498 | NSImage *img; |
| 1499 | 1499 | ||
| 1500 | dialog_return = Qundefined; | ||
| 1501 | button_values = NULL; | ||
| 1500 | area.origin.x = 3*SPACER; | 1502 | area.origin.x = 3*SPACER; |
| 1501 | area.origin.y = 2*SPACER; | 1503 | area.origin.y = 2*SPACER; |
| 1502 | area.size.width = ICONSIZE; | 1504 | area.size.width = ICONSIZE; |
| @@ -1578,44 +1580,65 @@ ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header) | |||
| 1578 | [self setOneShot: YES]; | 1580 | [self setOneShot: YES]; |
| 1579 | [self setReleasedWhenClosed: YES]; | 1581 | [self setReleasedWhenClosed: YES]; |
| 1580 | [self setHidesOnDeactivate: YES]; | 1582 | [self setHidesOnDeactivate: YES]; |
| 1583 | [self setStyleMask: | ||
| 1584 | NSTitledWindowMask|NSClosableWindowMask|NSUtilityWindowMask]; | ||
| 1585 | |||
| 1581 | return self; | 1586 | return self; |
| 1582 | } | 1587 | } |
| 1583 | 1588 | ||
| 1584 | 1589 | ||
| 1585 | - (BOOL)windowShouldClose: (id)sender | 1590 | - (BOOL)windowShouldClose: (id)sender |
| 1586 | { | 1591 | { |
| 1587 | [NSApp stopModalWithCode: XHASH (Qnil)]; // FIXME: BIG UGLY HACK!! | 1592 | window_closed = YES; |
| 1593 | [NSApp stop:self]; | ||
| 1588 | return NO; | 1594 | return NO; |
| 1589 | } | 1595 | } |
| 1590 | 1596 | ||
| 1597 | - (void)dealloc | ||
| 1598 | { | ||
| 1599 | xfree (button_values); | ||
| 1600 | [super dealloc]; | ||
| 1601 | } | ||
| 1591 | 1602 | ||
| 1592 | void process_dialog (id window, Lisp_Object list) | 1603 | - (void)process_dialog: (Lisp_Object) list |
| 1593 | { | 1604 | { |
| 1594 | Lisp_Object item; | 1605 | Lisp_Object item, lst = list; |
| 1595 | int row = 0; | 1606 | int row = 0; |
| 1607 | int buttons = 0, btnnr = 0; | ||
| 1608 | |||
| 1609 | for (; XTYPE (lst) == Lisp_Cons; lst = XCDR (lst)) | ||
| 1610 | { | ||
| 1611 | item = XCAR (list); | ||
| 1612 | if (XTYPE (item) == Lisp_Cons) | ||
| 1613 | ++buttons; | ||
| 1614 | } | ||
| 1615 | |||
| 1616 | if (buttons > 0) | ||
| 1617 | button_values = (Lisp_Object *) xmalloc (buttons * sizeof (*button_values)); | ||
| 1596 | 1618 | ||
| 1597 | for (; XTYPE (list) == Lisp_Cons; list = XCDR (list)) | 1619 | for (; XTYPE (list) == Lisp_Cons; list = XCDR (list)) |
| 1598 | { | 1620 | { |
| 1599 | item = XCAR (list); | 1621 | item = XCAR (list); |
| 1600 | if (XTYPE (item) == Lisp_String) | 1622 | if (XTYPE (item) == Lisp_String) |
| 1601 | { | 1623 | { |
| 1602 | [window addString: SSDATA (item) row: row++]; | 1624 | [self addString: SSDATA (item) row: row++]; |
| 1603 | } | 1625 | } |
| 1604 | else if (XTYPE (item) == Lisp_Cons) | 1626 | else if (XTYPE (item) == Lisp_Cons) |
| 1605 | { | 1627 | { |
| 1606 | [window addButton: SSDATA (XCAR (item)) | 1628 | button_values[btnnr] = XCDR (item); |
| 1607 | value: XCDR (item) row: row++]; | 1629 | [self addButton: SSDATA (XCAR (item)) value: btnnr row: row++]; |
| 1630 | ++btnnr; | ||
| 1608 | } | 1631 | } |
| 1609 | else if (NILP (item)) | 1632 | else if (NILP (item)) |
| 1610 | { | 1633 | { |
| 1611 | [window addSplit]; | 1634 | [self addSplit]; |
| 1612 | row = 0; | 1635 | row = 0; |
| 1613 | } | 1636 | } |
| 1614 | } | 1637 | } |
| 1615 | } | 1638 | } |
| 1616 | 1639 | ||
| 1617 | 1640 | ||
| 1618 | - addButton: (char *)str value: (Lisp_Object)val row: (int)row | 1641 | - (void)addButton: (char *)str value: (int)tag row: (int)row |
| 1619 | { | 1642 | { |
| 1620 | id cell; | 1643 | id cell; |
| 1621 | 1644 | ||
| @@ -1628,15 +1651,13 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1628 | [cell setTarget: self]; | 1651 | [cell setTarget: self]; |
| 1629 | [cell setAction: @selector (clicked: )]; | 1652 | [cell setAction: @selector (clicked: )]; |
| 1630 | [cell setTitle: [NSString stringWithUTF8String: str]]; | 1653 | [cell setTitle: [NSString stringWithUTF8String: str]]; |
| 1631 | [cell setTag: XHASH (val)]; // FIXME: BIG UGLY HACK!! | 1654 | [cell setTag: tag]; |
| 1632 | [cell setBordered: YES]; | 1655 | [cell setBordered: YES]; |
| 1633 | [cell setEnabled: YES]; | 1656 | [cell setEnabled: YES]; |
| 1634 | |||
| 1635 | return self; | ||
| 1636 | } | 1657 | } |
| 1637 | 1658 | ||
| 1638 | 1659 | ||
| 1639 | - addString: (char *)str row: (int)row | 1660 | - (void)addString: (char *)str row: (int)row |
| 1640 | { | 1661 | { |
| 1641 | id cell; | 1662 | id cell; |
| 1642 | 1663 | ||
| @@ -1649,32 +1670,28 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1649 | [cell setTitle: [NSString stringWithUTF8String: str]]; | 1670 | [cell setTitle: [NSString stringWithUTF8String: str]]; |
| 1650 | [cell setBordered: YES]; | 1671 | [cell setBordered: YES]; |
| 1651 | [cell setEnabled: NO]; | 1672 | [cell setEnabled: NO]; |
| 1652 | |||
| 1653 | return self; | ||
| 1654 | } | 1673 | } |
| 1655 | 1674 | ||
| 1656 | 1675 | ||
| 1657 | - addSplit | 1676 | - (void)addSplit |
| 1658 | { | 1677 | { |
| 1659 | [matrix addColumn]; | 1678 | [matrix addColumn]; |
| 1660 | cols++; | 1679 | cols++; |
| 1661 | return self; | ||
| 1662 | } | 1680 | } |
| 1663 | 1681 | ||
| 1664 | 1682 | ||
| 1665 | - clicked: sender | 1683 | - (void)clicked: sender |
| 1666 | { | 1684 | { |
| 1667 | NSArray *sellist = nil; | 1685 | NSArray *sellist = nil; |
| 1668 | EMACS_INT seltag; | 1686 | EMACS_INT seltag; |
| 1669 | 1687 | ||
| 1670 | sellist = [sender selectedCells]; | 1688 | sellist = [sender selectedCells]; |
| 1671 | if ([sellist count]<1) | 1689 | if ([sellist count] < 1) |
| 1672 | return self; | 1690 | return; |
| 1673 | 1691 | ||
| 1674 | seltag = [[sellist objectAtIndex: 0] tag]; | 1692 | seltag = [[sellist objectAtIndex: 0] tag]; |
| 1675 | if (seltag != XHASH (Qundefined)) // FIXME: BIG UGLY HACK!! | 1693 | dialog_return = button_values[seltag]; |
| 1676 | [NSApp stopModalWithCode: seltag]; | 1694 | [NSApp stop:self]; |
| 1677 | return self; | ||
| 1678 | } | 1695 | } |
| 1679 | 1696 | ||
| 1680 | 1697 | ||
| @@ -1686,7 +1703,7 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1686 | if (XTYPE (contents) == Lisp_Cons) | 1703 | if (XTYPE (contents) == Lisp_Cons) |
| 1687 | { | 1704 | { |
| 1688 | head = Fcar (contents); | 1705 | head = Fcar (contents); |
| 1689 | process_dialog (self, Fcdr (contents)); | 1706 | [self process_dialog: Fcdr (contents)]; |
| 1690 | } | 1707 | } |
| 1691 | else | 1708 | else |
| 1692 | head = contents; | 1709 | head = contents; |
| @@ -1706,7 +1723,7 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1706 | if (cols == 1 && rows > 1) /* Never told where to split */ | 1723 | if (cols == 1 && rows > 1) /* Never told where to split */ |
| 1707 | { | 1724 | { |
| 1708 | [matrix addColumn]; | 1725 | [matrix addColumn]; |
| 1709 | for (i = 0; i<rows/2; i++) | 1726 | for (i = 0; i < rows/2; i++) |
| 1710 | { | 1727 | { |
| 1711 | [matrix putCell: [matrix cellAtRow: (rows+1)/2 column: 0] | 1728 | [matrix putCell: [matrix cellAtRow: (rows+1)/2 column: 0] |
| 1712 | atRow: i column: 1]; | 1729 | atRow: i column: 1]; |
| @@ -1756,13 +1773,27 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1756 | 1773 | ||
| 1757 | - (void)timeout_handler: (NSTimer *)timedEntry | 1774 | - (void)timeout_handler: (NSTimer *)timedEntry |
| 1758 | { | 1775 | { |
| 1759 | timer_fired = 1; | 1776 | NSEvent *nxev = [NSEvent otherEventWithType: NSApplicationDefined |
| 1760 | [NSApp abortModal]; | 1777 | location: NSMakePoint (0, 0) |
| 1778 | modifierFlags: 0 | ||
| 1779 | timestamp: 0 | ||
| 1780 | windowNumber: [[NSApp mainWindow] windowNumber] | ||
| 1781 | context: [NSApp context] | ||
| 1782 | subtype: 0 | ||
| 1783 | data1: 0 | ||
| 1784 | data2: 0]; | ||
| 1785 | |||
| 1786 | timer_fired = YES; | ||
| 1787 | /* We use sto because stopModal/abortModal out of the main loop does not | ||
| 1788 | seem to work in 10.6. But as we use stop we must send a real event so | ||
| 1789 | the stop is seen and acted upon. */ | ||
| 1790 | [NSApp stop:self]; | ||
| 1791 | [NSApp postEvent: nxev atStart: NO]; | ||
| 1761 | } | 1792 | } |
| 1762 | 1793 | ||
| 1763 | - (Lisp_Object)runDialogAt: (NSPoint)p | 1794 | - (Lisp_Object)runDialogAt: (NSPoint)p |
| 1764 | { | 1795 | { |
| 1765 | NSInteger ret = 0; | 1796 | Lisp_Object ret = Qundefined; |
| 1766 | 1797 | ||
| 1767 | while (popup_activated_flag) | 1798 | while (popup_activated_flag) |
| 1768 | { | 1799 | { |
| @@ -1780,8 +1811,10 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1780 | [[NSRunLoop currentRunLoop] addTimer: tmo | 1811 | [[NSRunLoop currentRunLoop] addTimer: tmo |
| 1781 | forMode: NSModalPanelRunLoopMode]; | 1812 | forMode: NSModalPanelRunLoopMode]; |
| 1782 | } | 1813 | } |
| 1783 | timer_fired = 0; | 1814 | timer_fired = NO; |
| 1784 | ret = [NSApp runModalForWindow: self]; | 1815 | dialog_return = Qundefined; |
| 1816 | [NSApp runModalForWindow: self]; | ||
| 1817 | ret = dialog_return; | ||
| 1785 | if (! timer_fired) | 1818 | if (! timer_fired) |
| 1786 | { | 1819 | { |
| 1787 | if (tmo != nil) [tmo invalidate]; /* Cancels timer */ | 1820 | if (tmo != nil) [tmo invalidate]; /* Cancels timer */ |
| @@ -1789,11 +1822,11 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1789 | } | 1822 | } |
| 1790 | } | 1823 | } |
| 1791 | 1824 | ||
| 1792 | { /* FIXME: BIG UGLY HACK!!! */ | 1825 | if (EQ (ret, Qundefined) && window_closed) |
| 1793 | Lisp_Object tmp; | 1826 | /* Make close button pressed equivalent to C-g. */ |
| 1794 | *(EMACS_INT*)(&tmp) = ret; | 1827 | Fsignal (Qquit, Qnil); |
| 1795 | return tmp; | 1828 | |
| 1796 | } | 1829 | return ret; |
| 1797 | } | 1830 | } |
| 1798 | 1831 | ||
| 1799 | @end | 1832 | @end |
diff --git a/src/nsterm.h b/src/nsterm.h index 54f4a4ec89e..f0cae193005 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -195,12 +195,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 195 | NSTextField *title; | 195 | NSTextField *title; |
| 196 | NSMatrix *matrix; | 196 | NSMatrix *matrix; |
| 197 | int rows, cols; | 197 | int rows, cols; |
| 198 | int timer_fired; | 198 | BOOL timer_fired, window_closed; |
| 199 | Lisp_Object dialog_return; | ||
| 200 | Lisp_Object *button_values; | ||
| 199 | } | 201 | } |
| 200 | - initFromContents: (Lisp_Object)menu isQuestion: (BOOL)isQ; | 202 | - initFromContents: (Lisp_Object)menu isQuestion: (BOOL)isQ; |
| 201 | - addButton: (char *)str value: (Lisp_Object)val row: (int)row; | 203 | - (void)process_dialog: (Lisp_Object)list; |
| 202 | - addString: (char *)str row: (int)row; | 204 | - (void)addButton: (char *)str value: (int)tag row: (int)row; |
| 203 | - addSplit; | 205 | - (void)addString: (char *)str row: (int)row; |
| 206 | - (void)addSplit; | ||
| 204 | - (Lisp_Object)runDialogAt: (NSPoint)p; | 207 | - (Lisp_Object)runDialogAt: (NSPoint)p; |
| 205 | - (void)timeout_handler: (NSTimer *)timedEntry; | 208 | - (void)timeout_handler: (NSTimer *)timedEntry; |
| 206 | @end | 209 | @end |
| @@ -628,6 +631,8 @@ struct x_output | |||
| 628 | /* This is the `Display *' which frame F is on. */ | 631 | /* This is the `Display *' which frame F is on. */ |
| 629 | #define FRAME_NS_DISPLAY(f) (0) | 632 | #define FRAME_NS_DISPLAY(f) (0) |
| 630 | #define FRAME_X_DISPLAY(f) (0) | 633 | #define FRAME_X_DISPLAY(f) (0) |
| 634 | #define FRAME_X_SCREEN(f) (0) | ||
| 635 | #define FRAME_X_VISUAL(f) FRAME_NS_DISPLAY_INFO(f)->visual | ||
| 631 | 636 | ||
| 632 | #define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color) | 637 | #define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color) |
| 633 | #define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color) | 638 | #define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color) |
| @@ -777,31 +782,6 @@ extern Lisp_Object find_and_return_menu_selection (FRAME_PTR f, | |||
| 777 | extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, | 782 | extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, |
| 778 | Lisp_Object header); | 783 | Lisp_Object header); |
| 779 | 784 | ||
| 780 | /* More prototypes that should be moved to a more general include file */ | ||
| 781 | extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); | ||
| 782 | extern void x_set_window_size (struct frame *f, int change_grav, | ||
| 783 | int cols, int rows); | ||
| 784 | extern void x_sync (struct frame *); | ||
| 785 | extern Lisp_Object x_get_focus_frame (struct frame *); | ||
| 786 | extern void x_set_mouse_position (struct frame *f, int h, int v); | ||
| 787 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | ||
| 788 | extern void x_make_frame_visible (struct frame *f); | ||
| 789 | extern void x_make_frame_invisible (struct frame *f); | ||
| 790 | extern void x_iconify_frame (struct frame *f); | ||
| 791 | extern int x_char_width (struct frame *f); | ||
| 792 | extern int x_char_height (struct frame *f); | ||
| 793 | extern int x_pixel_width (struct frame *f); | ||
| 794 | extern int x_pixel_height (struct frame *f); | ||
| 795 | extern void x_set_frame_alpha (struct frame *f); | ||
| 796 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 797 | extern void x_set_tool_bar_lines (struct frame *f, | ||
| 798 | Lisp_Object value, | ||
| 799 | Lisp_Object oldval); | ||
| 800 | extern void x_activate_menubar (struct frame *); | ||
| 801 | extern void free_frame_menubar (struct frame *); | ||
| 802 | extern void x_free_frame_resources (struct frame *); | ||
| 803 | extern void x_destroy_window (struct frame *); | ||
| 804 | |||
| 805 | #define NSAPP_DATA2_RUNASSCRIPT 10 | 785 | #define NSAPP_DATA2_RUNASSCRIPT 10 |
| 806 | extern void ns_run_ascript (void); | 786 | extern void ns_run_ascript (void); |
| 807 | 787 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index 3ab9358467a..c892a5486a7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -4600,11 +4600,15 @@ not_in_argv (NSString *arg) | |||
| 4600 | 4600 | ||
| 4601 | SELECT_TYPE readfds, writefds, *wfds; | 4601 | SELECT_TYPE readfds, writefds, *wfds; |
| 4602 | EMACS_TIME timeout, *tmo; | 4602 | EMACS_TIME timeout, *tmo; |
| 4603 | NSAutoreleasePool *pool = nil; | ||
| 4603 | 4604 | ||
| 4604 | /* NSTRACE (fd_handler); */ | 4605 | /* NSTRACE (fd_handler); */ |
| 4605 | 4606 | ||
| 4606 | for (;;) | 4607 | for (;;) |
| 4607 | { | 4608 | { |
| 4609 | [pool release]; | ||
| 4610 | pool = [[NSAutoreleasePool alloc] init]; | ||
| 4611 | |||
| 4608 | if (waiting) | 4612 | if (waiting) |
| 4609 | { | 4613 | { |
| 4610 | SELECT_TYPE fds; | 4614 | SELECT_TYPE fds; |
| @@ -5087,7 +5091,8 @@ not_in_argv (NSString *arg) | |||
| 5087 | /* TODO: still need this? */ | 5091 | /* TODO: still need this? */ |
| 5088 | if (code == 0x2DC) | 5092 | if (code == 0x2DC) |
| 5089 | code = '~'; /* 0x7E */ | 5093 | code = '~'; /* 0x7E */ |
| 5090 | emacs_event->modifiers = 0; | 5094 | if (code != 32) /* Space */ |
| 5095 | emacs_event->modifiers = 0; | ||
| 5091 | emacs_event->kind | 5096 | emacs_event->kind |
| 5092 | = code > 0xFF ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT; | 5097 | = code > 0xFF ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT; |
| 5093 | emacs_event->code = code; | 5098 | emacs_event->code = code; |
diff --git a/src/print.c b/src/print.c index e8309109f1d..3cf5fc7348d 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -197,8 +197,7 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; | |||
| 197 | ? PT - start_point : 0), \ | 197 | ? PT - start_point : 0), \ |
| 198 | old_point_byte + (old_point_byte >= start_point_byte \ | 198 | old_point_byte + (old_point_byte >= start_point_byte \ |
| 199 | ? PT_BYTE - start_point_byte : 0)); \ | 199 | ? PT_BYTE - start_point_byte : 0)); \ |
| 200 | if (old != current_buffer) \ | 200 | set_buffer_internal (old); |
| 201 | set_buffer_internal (old); | ||
| 202 | 201 | ||
| 203 | #define PRINTCHAR(ch) printchar (ch, printcharfun) | 202 | #define PRINTCHAR(ch) printchar (ch, printcharfun) |
| 204 | 203 | ||
| @@ -488,7 +487,7 @@ temp_output_buffer_setup (const char *bufname) | |||
| 488 | register struct buffer *old = current_buffer; | 487 | register struct buffer *old = current_buffer; |
| 489 | register Lisp_Object buf; | 488 | register Lisp_Object buf; |
| 490 | 489 | ||
| 491 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 490 | record_unwind_current_buffer (); |
| 492 | 491 | ||
| 493 | Fset_buffer (Fget_buffer_create (build_string (bufname))); | 492 | Fset_buffer (Fget_buffer_create (build_string (bufname))); |
| 494 | 493 | ||
| @@ -586,6 +585,7 @@ A printed representation of an object is text which describes that object. */) | |||
| 586 | (Lisp_Object object, Lisp_Object noescape) | 585 | (Lisp_Object object, Lisp_Object noescape) |
| 587 | { | 586 | { |
| 588 | Lisp_Object printcharfun; | 587 | Lisp_Object printcharfun; |
| 588 | bool prev_abort_on_gc; | ||
| 589 | /* struct gcpro gcpro1, gcpro2; */ | 589 | /* struct gcpro gcpro1, gcpro2; */ |
| 590 | Lisp_Object save_deactivate_mark; | 590 | Lisp_Object save_deactivate_mark; |
| 591 | ptrdiff_t count = SPECPDL_INDEX (); | 591 | ptrdiff_t count = SPECPDL_INDEX (); |
| @@ -601,7 +601,8 @@ A printed representation of an object is text which describes that object. */) | |||
| 601 | No need for specbind, since errors deactivate the mark. */ | 601 | No need for specbind, since errors deactivate the mark. */ |
| 602 | save_deactivate_mark = Vdeactivate_mark; | 602 | save_deactivate_mark = Vdeactivate_mark; |
| 603 | /* GCPRO2 (object, save_deactivate_mark); */ | 603 | /* GCPRO2 (object, save_deactivate_mark); */ |
| 604 | abort_on_gc++; | 604 | prev_abort_on_gc = abort_on_gc; |
| 605 | abort_on_gc = 1; | ||
| 605 | 606 | ||
| 606 | printcharfun = Vprin1_to_string_buffer; | 607 | printcharfun = Vprin1_to_string_buffer; |
| 607 | PRINTPREPARE; | 608 | PRINTPREPARE; |
| @@ -625,7 +626,7 @@ A printed representation of an object is text which describes that object. */) | |||
| 625 | Vdeactivate_mark = save_deactivate_mark; | 626 | Vdeactivate_mark = save_deactivate_mark; |
| 626 | /* UNGCPRO; */ | 627 | /* UNGCPRO; */ |
| 627 | 628 | ||
| 628 | abort_on_gc--; | 629 | abort_on_gc = prev_abort_on_gc; |
| 629 | return unbind_to (count, object); | 630 | return unbind_to (count, object); |
| 630 | } | 631 | } |
| 631 | 632 | ||
diff --git a/src/process.c b/src/process.c index fa138027ec1..dbbb23b8627 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -116,12 +116,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 116 | #include "gnutls.h" | 116 | #include "gnutls.h" |
| 117 | #endif | 117 | #endif |
| 118 | 118 | ||
| 119 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 120 | #include TERM_HEADER | ||
| 121 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 122 | |||
| 119 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) | 123 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) |
| 120 | #include "xgselect.h" | 124 | #include "xgselect.h" |
| 121 | #endif | 125 | #endif |
| 122 | #ifdef HAVE_NS | ||
| 123 | #include "nsterm.h" | ||
| 124 | #endif | ||
| 125 | 126 | ||
| 126 | /* Work around GCC 4.7.0 bug with strict overflow checking; see | 127 | /* Work around GCC 4.7.0 bug with strict overflow checking; see |
| 127 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>. | 128 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>. |
| @@ -164,16 +165,6 @@ static Lisp_Object QClocal, QCremote, QCcoding; | |||
| 164 | static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; | 165 | static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; |
| 165 | static Lisp_Object QCsentinel, QClog, QCoptions, QCplist; | 166 | static Lisp_Object QCsentinel, QClog, QCoptions, QCplist; |
| 166 | static Lisp_Object Qlast_nonmenu_event; | 167 | static Lisp_Object Qlast_nonmenu_event; |
| 167 | /* QCfamily is declared and initialized in xfaces.c, | ||
| 168 | QCfilter in keyboard.c. */ | ||
| 169 | extern Lisp_Object QCfamily, QCfilter; | ||
| 170 | |||
| 171 | /* Qexit is declared and initialized in eval.c. */ | ||
| 172 | |||
| 173 | /* QCfamily is defined in xfaces.c. */ | ||
| 174 | extern Lisp_Object QCfamily; | ||
| 175 | /* QCfilter is defined in keyboard.c. */ | ||
| 176 | extern Lisp_Object QCfilter; | ||
| 177 | 168 | ||
| 178 | #define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) | 169 | #define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) |
| 179 | #define NETCONN1_P(p) (EQ (p->type, Qnetwork)) | 170 | #define NETCONN1_P(p) (EQ (p->type, Qnetwork)) |
| @@ -5039,15 +5030,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5039 | for (channel = 0; channel <= max_input_desc; ++channel) | 5030 | for (channel = 0; channel <= max_input_desc; ++channel) |
| 5040 | { | 5031 | { |
| 5041 | struct fd_callback_data *d = &fd_callback_info[channel]; | 5032 | struct fd_callback_data *d = &fd_callback_info[channel]; |
| 5042 | if (FD_ISSET (channel, &Available) | 5033 | if (d->func |
| 5043 | && d->func != 0 | 5034 | && ((d->flags & FOR_READ |
| 5044 | && (d->flags & FOR_READ) != 0) | 5035 | && FD_ISSET (channel, &Available)) |
| 5045 | d->func (channel, d->data, 1); | 5036 | || (d->flags & FOR_WRITE |
| 5046 | if (FD_ISSET (channel, &Writeok) | 5037 | && FD_ISSET (channel, &Writeok)))) |
| 5047 | && d->func != 0 | 5038 | d->func (channel, d->data); |
| 5048 | && (d->flags & FOR_WRITE) != 0) | 5039 | } |
| 5049 | d->func (channel, d->data, 0); | ||
| 5050 | } | ||
| 5051 | 5040 | ||
| 5052 | for (channel = 0; channel <= max_process_desc; channel++) | 5041 | for (channel = 0; channel <= max_process_desc; channel++) |
| 5053 | { | 5042 | { |
| @@ -5361,14 +5350,14 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5361 | /* There's no good reason to let process filters change the current | 5350 | /* There's no good reason to let process filters change the current |
| 5362 | buffer, and many callers of accept-process-output, sit-for, and | 5351 | buffer, and many callers of accept-process-output, sit-for, and |
| 5363 | friends don't expect current-buffer to be changed from under them. */ | 5352 | friends don't expect current-buffer to be changed from under them. */ |
| 5364 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 5353 | record_unwind_current_buffer (); |
| 5365 | 5354 | ||
| 5366 | /* Read and dispose of the process output. */ | 5355 | /* Read and dispose of the process output. */ |
| 5367 | outstream = p->filter; | 5356 | outstream = p->filter; |
| 5368 | if (!NILP (outstream)) | 5357 | if (!NILP (outstream)) |
| 5369 | { | 5358 | { |
| 5370 | Lisp_Object text; | 5359 | Lisp_Object text; |
| 5371 | int outer_running_asynch_code = running_asynch_code; | 5360 | bool outer_running_asynch_code = running_asynch_code; |
| 5372 | int waiting = waiting_for_user_input_p; | 5361 | int waiting = waiting_for_user_input_p; |
| 5373 | 5362 | ||
| 5374 | /* No need to gcpro these, because all we do with them later | 5363 | /* No need to gcpro these, because all we do with them later |
| @@ -5605,7 +5594,7 @@ send_process_trap (int ignore) | |||
| 5605 | { | 5594 | { |
| 5606 | SIGNAL_THREAD_CHECK (SIGPIPE); | 5595 | SIGNAL_THREAD_CHECK (SIGPIPE); |
| 5607 | sigunblock (sigmask (SIGPIPE)); | 5596 | sigunblock (sigmask (SIGPIPE)); |
| 5608 | longjmp (send_process_frame, 1); | 5597 | _longjmp (send_process_frame, 1); |
| 5609 | } | 5598 | } |
| 5610 | 5599 | ||
| 5611 | /* In send_process, when a write fails temporarily, | 5600 | /* In send_process, when a write fails temporarily, |
| @@ -5808,7 +5797,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, | |||
| 5808 | /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, | 5797 | /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, |
| 5809 | CFLAGS="-g -O": The value of the parameter `proc' is clobbered | 5798 | CFLAGS="-g -O": The value of the parameter `proc' is clobbered |
| 5810 | when returning with longjmp despite being declared volatile. */ | 5799 | when returning with longjmp despite being declared volatile. */ |
| 5811 | if (!setjmp (send_process_frame)) | 5800 | if (!_setjmp (send_process_frame)) |
| 5812 | { | 5801 | { |
| 5813 | p = XPROCESS (proc); /* Repair any setjmp clobbering. */ | 5802 | p = XPROCESS (proc); /* Repair any setjmp clobbering. */ |
| 5814 | process_sent_to = proc; | 5803 | process_sent_to = proc; |
| @@ -6725,9 +6714,9 @@ static void | |||
| 6725 | exec_sentinel (Lisp_Object proc, Lisp_Object reason) | 6714 | exec_sentinel (Lisp_Object proc, Lisp_Object reason) |
| 6726 | { | 6715 | { |
| 6727 | Lisp_Object sentinel, odeactivate; | 6716 | Lisp_Object sentinel, odeactivate; |
| 6728 | register struct Lisp_Process *p = XPROCESS (proc); | 6717 | struct Lisp_Process *p = XPROCESS (proc); |
| 6729 | ptrdiff_t count = SPECPDL_INDEX (); | 6718 | ptrdiff_t count = SPECPDL_INDEX (); |
| 6730 | int outer_running_asynch_code = running_asynch_code; | 6719 | bool outer_running_asynch_code = running_asynch_code; |
| 6731 | int waiting = waiting_for_user_input_p; | 6720 | int waiting = waiting_for_user_input_p; |
| 6732 | 6721 | ||
| 6733 | if (inhibit_sentinels) | 6722 | if (inhibit_sentinels) |
| @@ -6745,7 +6734,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason) | |||
| 6745 | /* There's no good reason to let sentinels change the current | 6734 | /* There's no good reason to let sentinels change the current |
| 6746 | buffer, and many callers of accept-process-output, sit-for, and | 6735 | buffer, and many callers of accept-process-output, sit-for, and |
| 6747 | friends don't expect current-buffer to be changed from under them. */ | 6736 | friends don't expect current-buffer to be changed from under them. */ |
| 6748 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 6737 | record_unwind_current_buffer (); |
| 6749 | 6738 | ||
| 6750 | sentinel = p->sentinel; | 6739 | sentinel = p->sentinel; |
| 6751 | if (NILP (sentinel)) | 6740 | if (NILP (sentinel)) |
diff --git a/src/process.h b/src/process.h index db000464cb5..e89ba478187 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -187,7 +187,7 @@ pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) | |||
| 187 | 187 | ||
| 188 | /* True if we are about to fork off a synchronous process or if we | 188 | /* True if we are about to fork off a synchronous process or if we |
| 189 | are waiting for it. */ | 189 | are waiting for it. */ |
| 190 | extern int synch_process_alive; | 190 | extern bool synch_process_alive; |
| 191 | 191 | ||
| 192 | /* Communicate exit status of sync process to from sigchld_handler | 192 | /* Communicate exit status of sync process to from sigchld_handler |
| 193 | to Fcall_process. */ | 193 | to Fcall_process. */ |
| @@ -222,7 +222,7 @@ extern void hold_keyboard_input (void); | |||
| 222 | extern void unhold_keyboard_input (void); | 222 | extern void unhold_keyboard_input (void); |
| 223 | extern int kbd_on_hold_p (void); | 223 | extern int kbd_on_hold_p (void); |
| 224 | 224 | ||
| 225 | typedef void (*fd_callback)(int fd, void *data, int for_read); | 225 | typedef void (*fd_callback) (int fd, void *data); |
| 226 | 226 | ||
| 227 | extern void add_read_fd (int fd, fd_callback func, void *data); | 227 | extern void add_read_fd (int fd, fd_callback func, void *data); |
| 228 | extern void delete_read_fd (int fd); | 228 | extern void delete_read_fd (int fd); |
diff --git a/src/ralloc.c b/src/ralloc.c index c40258693f5..3877e21d4f6 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -670,6 +670,7 @@ static void | |||
| 670 | free_bloc (bloc_ptr bloc) | 670 | free_bloc (bloc_ptr bloc) |
| 671 | { | 671 | { |
| 672 | heap_ptr heap = bloc->heap; | 672 | heap_ptr heap = bloc->heap; |
| 673 | heap_ptr h; | ||
| 673 | 674 | ||
| 674 | if (r_alloc_freeze_level) | 675 | if (r_alloc_freeze_level) |
| 675 | { | 676 | { |
| @@ -699,20 +700,38 @@ free_bloc (bloc_ptr bloc) | |||
| 699 | bloc->prev->next = bloc->next; | 700 | bloc->prev->next = bloc->next; |
| 700 | } | 701 | } |
| 701 | 702 | ||
| 702 | /* Update the records of which blocs are in HEAP. */ | 703 | /* Sometimes, 'heap' obtained from bloc->heap above is not really a |
| 703 | if (heap->first_bloc == bloc) | 704 | 'heap' structure. It can even be beyond the current break point, |
| 705 | which will cause crashes when we dereference it below (see | ||
| 706 | bug#12242). Evidently, the reason is bloc allocations done while | ||
| 707 | use_relocatable_buffers was non-positive, because additional | ||
| 708 | memory we get then is not recorded in the heaps we manage. If | ||
| 709 | bloc->heap records such a "heap", we cannot (and don't need to) | ||
| 710 | update its records. So we validate the 'heap' value by making | ||
| 711 | sure it is one of the heaps we manage via the heaps linked list, | ||
| 712 | and don't touch a 'heap' that isn't found there. This avoids | ||
| 713 | accessing memory we know nothing about. */ | ||
| 714 | for (h = first_heap; h != NIL_HEAP; h = h->next) | ||
| 715 | if (heap == h) | ||
| 716 | break; | ||
| 717 | |||
| 718 | if (h) | ||
| 704 | { | 719 | { |
| 705 | if (bloc->next != 0 && bloc->next->heap == heap) | 720 | /* Update the records of which blocs are in HEAP. */ |
| 706 | heap->first_bloc = bloc->next; | 721 | if (heap->first_bloc == bloc) |
| 707 | else | 722 | { |
| 708 | heap->first_bloc = heap->last_bloc = NIL_BLOC; | 723 | if (bloc->next != 0 && bloc->next->heap == heap) |
| 709 | } | 724 | heap->first_bloc = bloc->next; |
| 710 | if (heap->last_bloc == bloc) | 725 | else |
| 711 | { | 726 | heap->first_bloc = heap->last_bloc = NIL_BLOC; |
| 712 | if (bloc->prev != 0 && bloc->prev->heap == heap) | 727 | } |
| 713 | heap->last_bloc = bloc->prev; | 728 | if (heap->last_bloc == bloc) |
| 714 | else | 729 | { |
| 715 | heap->first_bloc = heap->last_bloc = NIL_BLOC; | 730 | if (bloc->prev != 0 && bloc->prev->heap == heap) |
| 731 | heap->last_bloc = bloc->prev; | ||
| 732 | else | ||
| 733 | heap->first_bloc = heap->last_bloc = NIL_BLOC; | ||
| 734 | } | ||
| 716 | } | 735 | } |
| 717 | 736 | ||
| 718 | relinquish (); | 737 | relinquish (); |
diff --git a/src/sysdep.c b/src/sysdep.c index 183ee005227..b84e6a4ea3a 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1765,19 +1765,37 @@ init_signals (void) | |||
| 1765 | #endif /* !RAND_BITS */ | 1765 | #endif /* !RAND_BITS */ |
| 1766 | 1766 | ||
| 1767 | void | 1767 | void |
| 1768 | seed_random (long int arg) | 1768 | seed_random (void *seed, ptrdiff_t seed_size) |
| 1769 | { | 1769 | { |
| 1770 | #if defined HAVE_RANDOM || ! defined HAVE_LRAND48 | ||
| 1771 | unsigned int arg = 0; | ||
| 1772 | #else | ||
| 1773 | long int arg = 0; | ||
| 1774 | #endif | ||
| 1775 | unsigned char *argp = (unsigned char *) &arg; | ||
| 1776 | unsigned char *seedp = seed; | ||
| 1777 | ptrdiff_t i; | ||
| 1778 | for (i = 0; i < seed_size; i++) | ||
| 1779 | argp[i % sizeof arg] ^= seedp[i]; | ||
| 1770 | #ifdef HAVE_RANDOM | 1780 | #ifdef HAVE_RANDOM |
| 1771 | srandom ((unsigned int)arg); | 1781 | srandom (arg); |
| 1772 | #else | 1782 | #else |
| 1773 | # ifdef HAVE_LRAND48 | 1783 | # ifdef HAVE_LRAND48 |
| 1774 | srand48 (arg); | 1784 | srand48 (arg); |
| 1775 | # else | 1785 | # else |
| 1776 | srand ((unsigned int)arg); | 1786 | srand (arg); |
| 1777 | # endif | 1787 | # endif |
| 1778 | #endif | 1788 | #endif |
| 1779 | } | 1789 | } |
| 1780 | 1790 | ||
| 1791 | void | ||
| 1792 | init_random (void) | ||
| 1793 | { | ||
| 1794 | EMACS_TIME t = current_emacs_time (); | ||
| 1795 | uintmax_t v = getpid () ^ EMACS_SECS (t) ^ EMACS_NSECS (t); | ||
| 1796 | seed_random (&v, sizeof v); | ||
| 1797 | } | ||
| 1798 | |||
| 1781 | /* | 1799 | /* |
| 1782 | * Return a nonnegative random integer out of whatever we've got. | 1800 | * Return a nonnegative random integer out of whatever we've got. |
| 1783 | * It contains enough bits to make a random (signed) Emacs fixnum. | 1801 | * It contains enough bits to make a random (signed) Emacs fixnum. |
diff --git a/src/systime.h b/src/systime.h index d3bdeb83019..9ce7ce646fb 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -154,8 +154,8 @@ extern void set_waiting_for_input (EMACS_TIME *); | |||
| 154 | #ifdef GCPRO1 | 154 | #ifdef GCPRO1 |
| 155 | /* defined in editfns.c */ | 155 | /* defined in editfns.c */ |
| 156 | extern Lisp_Object make_lisp_time (EMACS_TIME); | 156 | extern Lisp_Object make_lisp_time (EMACS_TIME); |
| 157 | extern int decode_time_components (Lisp_Object, Lisp_Object, Lisp_Object, | 157 | extern bool decode_time_components (Lisp_Object, Lisp_Object, Lisp_Object, |
| 158 | Lisp_Object, EMACS_TIME *, double *); | 158 | Lisp_Object, EMACS_TIME *, double *); |
| 159 | extern EMACS_TIME lisp_time_argument (Lisp_Object); | 159 | extern EMACS_TIME lisp_time_argument (Lisp_Object); |
| 160 | #endif | 160 | #endif |
| 161 | 161 | ||
diff --git a/src/term.c b/src/term.c index 23e074287c1..f1a09b39cf9 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3001,6 +3001,7 @@ init_tty (const char *name, const char *terminal_type, int must_succeed) | |||
| 3001 | #else | 3001 | #else |
| 3002 | tty = xzalloc (sizeof *tty); | 3002 | tty = xzalloc (sizeof *tty); |
| 3003 | #endif | 3003 | #endif |
| 3004 | tty->top_frame = Qnil; | ||
| 3004 | tty->next = tty_list; | 3005 | tty->next = tty_list; |
| 3005 | tty_list = tty; | 3006 | tty_list = tty; |
| 3006 | 3007 | ||
| @@ -3541,22 +3542,6 @@ delete_tty (struct terminal *terminal) | |||
| 3541 | xfree (tty); | 3542 | xfree (tty); |
| 3542 | } | 3543 | } |
| 3543 | 3544 | ||
| 3544 | |||
| 3545 | |||
| 3546 | /* Mark the pointers in the tty_display_info objects. | ||
| 3547 | Called by Fgarbage_collect. */ | ||
| 3548 | |||
| 3549 | void | ||
| 3550 | mark_ttys (void) | ||
| 3551 | { | ||
| 3552 | struct tty_display_info *tty; | ||
| 3553 | |||
| 3554 | for (tty = tty_list; tty; tty = tty->next) | ||
| 3555 | mark_object (tty->top_frame); | ||
| 3556 | } | ||
| 3557 | |||
| 3558 | |||
| 3559 | |||
| 3560 | void | 3545 | void |
| 3561 | syms_of_term (void) | 3546 | syms_of_term (void) |
| 3562 | { | 3547 | { |
diff --git a/src/textprop.c b/src/textprop.c index 20d98b0e6f3..b6895fc426a 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -760,7 +760,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) | |||
| 760 | 760 | ||
| 761 | if (BUFFERP (object) && current_buffer != XBUFFER (object)) | 761 | if (BUFFERP (object) && current_buffer != XBUFFER (object)) |
| 762 | { | 762 | { |
| 763 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 763 | record_unwind_current_buffer (); |
| 764 | Fset_buffer (object); | 764 | Fset_buffer (object); |
| 765 | } | 765 | } |
| 766 | 766 | ||
| @@ -843,7 +843,7 @@ position LIMIT; return LIMIT if nothing is found before reaching LIMIT. */) | |||
| 843 | 843 | ||
| 844 | if (BUFFERP (object) && current_buffer != XBUFFER (object)) | 844 | if (BUFFERP (object) && current_buffer != XBUFFER (object)) |
| 845 | { | 845 | { |
| 846 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 846 | record_unwind_current_buffer (); |
| 847 | Fset_buffer (object); | 847 | Fset_buffer (object); |
| 848 | } | 848 | } |
| 849 | 849 | ||
diff --git a/src/undo.c b/src/undo.c index 777e3291806..9cd1d5f9f67 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -324,7 +324,7 @@ truncate_undo_list (struct buffer *b) | |||
| 324 | /* Make the buffer current to get its local values of variables such | 324 | /* Make the buffer current to get its local values of variables such |
| 325 | as undo_limit. Also so that Vundo_outer_limit_function can | 325 | as undo_limit. Also so that Vundo_outer_limit_function can |
| 326 | tell which buffer to operate on. */ | 326 | tell which buffer to operate on. */ |
| 327 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 327 | record_unwind_current_buffer (); |
| 328 | set_buffer_internal (b); | 328 | set_buffer_internal (b); |
| 329 | 329 | ||
| 330 | list = BVAR (b, undo_list); | 330 | list = BVAR (b, undo_list); |
| @@ -4098,7 +4098,7 @@ symlink (char const *filename, char const *linkname) | |||
| 4098 | dir_access = sys_access (filename, D_OK); | 4098 | dir_access = sys_access (filename, D_OK); |
| 4099 | 4099 | ||
| 4100 | /* Since Windows distinguishes between symlinks to directories and | 4100 | /* Since Windows distinguishes between symlinks to directories and |
| 4101 | to files, we provide a kludgey feature: if FILENAME doesn't | 4101 | to files, we provide a kludgy feature: if FILENAME doesn't |
| 4102 | exist, but ends in a slash, we create a symlink to directory. If | 4102 | exist, but ends in a slash, we create a symlink to directory. If |
| 4103 | FILENAME exists and is a directory, we always create a symlink to | 4103 | FILENAME exists and is a directory, we always create a symlink to |
| 4104 | directory. */ | 4104 | directory. */ |
| @@ -4165,7 +4165,7 @@ symlink (char const *filename, char const *linkname) | |||
| 4165 | whether the underlying volume actually supports symlinks, by | 4165 | whether the underlying volume actually supports symlinks, by |
| 4166 | testing the FILE_SUPPORTS_REPARSE_POINTS bit in volume's flags, and | 4166 | testing the FILE_SUPPORTS_REPARSE_POINTS bit in volume's flags, and |
| 4167 | avoid the call to this function if it doesn't. That's because the | 4167 | avoid the call to this function if it doesn't. That's because the |
| 4168 | call to GetFileAttributes takes a non-negligible time, expecially | 4168 | call to GetFileAttributes takes a non-negligible time, especially |
| 4169 | on non-local or removable filesystems. See stat_worker for an | 4169 | on non-local or removable filesystems. See stat_worker for an |
| 4170 | example of how to do that. */ | 4170 | example of how to do that. */ |
| 4171 | static int | 4171 | static int |
| @@ -6773,7 +6773,7 @@ shutdown_handler (DWORD type) | |||
| 6773 | || type == CTRL_SHUTDOWN_EVENT) /* User shutsdown. */ | 6773 | || type == CTRL_SHUTDOWN_EVENT) /* User shutsdown. */ |
| 6774 | { | 6774 | { |
| 6775 | /* Shut down cleanly, making sure autosave files are up to date. */ | 6775 | /* Shut down cleanly, making sure autosave files are up to date. */ |
| 6776 | shut_down_emacs (0, 0, Qnil); | 6776 | shut_down_emacs (0, Qnil); |
| 6777 | } | 6777 | } |
| 6778 | 6778 | ||
| 6779 | /* Allow other handlers to handle this signal. */ | 6779 | /* Allow other handlers to handle this signal. */ |
diff --git a/src/w32fns.c b/src/w32fns.c index 9c5231f9d93..5a1b6dfabab 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4735,7 +4735,7 @@ x_display_info_for_name (Lisp_Object name) | |||
| 4735 | CHECK_STRING (name); | 4735 | CHECK_STRING (name); |
| 4736 | 4736 | ||
| 4737 | for (dpyinfo = &one_w32_display_info, names = w32_display_name_list; | 4737 | for (dpyinfo = &one_w32_display_info, names = w32_display_name_list; |
| 4738 | dpyinfo; | 4738 | dpyinfo && !NILP (w32_display_name_list); |
| 4739 | dpyinfo = dpyinfo->next, names = XCDR (names)) | 4739 | dpyinfo = dpyinfo->next, names = XCDR (names)) |
| 4740 | { | 4740 | { |
| 4741 | Lisp_Object tem; | 4741 | Lisp_Object tem; |
diff --git a/src/w32font.h b/src/w32font.h index b08d48a3d36..a29ddbe778c 100644 --- a/src/w32font.h +++ b/src/w32font.h | |||
| @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | #ifndef EMACS_W32FONT_H | 19 | #ifndef EMACS_W32FONT_H |
| 20 | #define EMACS_W32FONT_H | 20 | #define EMACS_W32FONT_H |
| 21 | 21 | ||
| 22 | #include "font.h" | ||
| 22 | 23 | ||
| 23 | /* Bit 17 of ntmFlags in NEWTEXTMETRIC is set for PostScript OpenType fonts, | 24 | /* Bit 17 of ntmFlags in NEWTEXTMETRIC is set for PostScript OpenType fonts, |
| 24 | bit 18 for TrueType OpenType fonts, bit 20 for Type1 fonts. */ | 25 | bit 18 for TrueType OpenType fonts, bit 20 for Type1 fonts. */ |
| @@ -83,4 +84,7 @@ int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec); | |||
| 83 | 84 | ||
| 84 | Lisp_Object intern_font_name (char *); | 85 | Lisp_Object intern_font_name (char *); |
| 85 | 86 | ||
| 87 | extern void syms_of_w32font (void); | ||
| 88 | extern void globals_of_w32font (void); | ||
| 89 | |||
| 86 | #endif | 90 | #endif |
diff --git a/src/w32term.h b/src/w32term.h index ccbf3c42c0e..5d756f435e4 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -302,9 +302,6 @@ struct w32_output | |||
| 302 | /* Non-hourglass cursor that is currently active. */ | 302 | /* Non-hourglass cursor that is currently active. */ |
| 303 | Cursor current_cursor; | 303 | Cursor current_cursor; |
| 304 | 304 | ||
| 305 | /* Flag to set when the window needs to be completely repainted. */ | ||
| 306 | int needs_exposure; | ||
| 307 | |||
| 308 | DWORD dwStyle; | 305 | DWORD dwStyle; |
| 309 | 306 | ||
| 310 | /* This is the Emacs structure for the display this frame is on. */ | 307 | /* This is the Emacs structure for the display this frame is on. */ |
| @@ -345,7 +342,7 @@ extern struct w32_output w32term_display; | |||
| 345 | 342 | ||
| 346 | /* Return the window associated with the frame F. */ | 343 | /* Return the window associated with the frame F. */ |
| 347 | #define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc) | 344 | #define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc) |
| 348 | #define FRAME_X_WINDOW(f) ((f)->output_data.w32->window_desc) | 345 | #define FRAME_X_WINDOW(f) FRAME_W32_WINDOW (f) |
| 349 | 346 | ||
| 350 | #define FRAME_FONT(f) ((f)->output_data.w32->font) | 347 | #define FRAME_FONT(f) ((f)->output_data.w32->font) |
| 351 | #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) | 348 | #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 06f7b1bd192..bc45e2c648c 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -320,7 +320,7 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 320 | } | 320 | } |
| 321 | if (SUCCEEDED (result)) | 321 | if (SUCCEEDED (result)) |
| 322 | { | 322 | { |
| 323 | int j, from, to; | 323 | int j, from, to, adj_offset = 0; |
| 324 | 324 | ||
| 325 | from = 0; | 325 | from = 0; |
| 326 | to = from; | 326 | to = from; |
| @@ -364,6 +364,32 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 364 | } | 364 | } |
| 365 | } | 365 | } |
| 366 | } | 366 | } |
| 367 | |||
| 368 | /* For RTL text, the Uniscribe shaper prepares | ||
| 369 | the values in ADVANCES array for layout in | ||
| 370 | reverse order, whereby "advance width" is | ||
| 371 | applied to move the pen in reverse direction | ||
| 372 | and _before_ drawing the glyph. Since we | ||
| 373 | draw glyphs in their normal left-to-right | ||
| 374 | order, we need to adjust the coordinates of | ||
| 375 | each non-base glyph in a grapheme cluster via | ||
| 376 | X-OFF component of the gstring's ADJUSTMENT | ||
| 377 | sub-vector. This loop computes, for each | ||
| 378 | grapheme cluster, the initial value of the | ||
| 379 | adjustment for the base character, which is | ||
| 380 | then updated for each successive glyph in the | ||
| 381 | grapheme cluster. */ | ||
| 382 | if (items[i].a.fRTL) | ||
| 383 | { | ||
| 384 | int j1 = j; | ||
| 385 | |||
| 386 | adj_offset = 0; | ||
| 387 | while (j1 < nglyphs && !attributes[j1].fClusterStart) | ||
| 388 | { | ||
| 389 | adj_offset += advances[j1]; | ||
| 390 | j1++; | ||
| 391 | } | ||
| 392 | } | ||
| 367 | } | 393 | } |
| 368 | 394 | ||
| 369 | LGLYPH_SET_CHAR (lglyph, chars[items[i].iCharPos | 395 | LGLYPH_SET_CHAR (lglyph, chars[items[i].iCharPos |
| @@ -392,9 +418,11 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 392 | 418 | ||
| 393 | if (SUCCEEDED (result)) | 419 | if (SUCCEEDED (result)) |
| 394 | { | 420 | { |
| 395 | LGLYPH_SET_LBEARING (lglyph, char_metric.abcA); | 421 | int lbearing = char_metric.abcA; |
| 396 | LGLYPH_SET_RBEARING (lglyph, (char_metric.abcA | 422 | int rbearing = char_metric.abcA + char_metric.abcB; |
| 397 | + char_metric.abcB)); | 423 | |
| 424 | LGLYPH_SET_LBEARING (lglyph, lbearing); | ||
| 425 | LGLYPH_SET_RBEARING (lglyph, rbearing); | ||
| 398 | } | 426 | } |
| 399 | else | 427 | else |
| 400 | { | 428 | { |
| @@ -402,18 +430,43 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 402 | LGLYPH_SET_RBEARING (lglyph, advances[j]); | 430 | LGLYPH_SET_RBEARING (lglyph, advances[j]); |
| 403 | } | 431 | } |
| 404 | 432 | ||
| 405 | if (offsets[j].du || offsets[j].dv) | 433 | if (offsets[j].du || offsets[j].dv |
| 434 | /* For non-base glyphs of RTL grapheme clusters, | ||
| 435 | adjust the X offset even if both DU and DV | ||
| 436 | are zero. */ | ||
| 437 | || (!attributes[j].fClusterStart && items[i].a.fRTL)) | ||
| 406 | { | 438 | { |
| 407 | Lisp_Object vec; | 439 | Lisp_Object vec; |
| 408 | vec = Fmake_vector (make_number (3), Qnil); | 440 | vec = Fmake_vector (make_number (3), Qnil); |
| 409 | ASET (vec, 0, make_number (offsets[j].du)); | 441 | if (items[i].a.fRTL) |
| 442 | { | ||
| 443 | /* Empirically, it looks like Uniscribe | ||
| 444 | interprets DU in reverse direction for | ||
| 445 | RTL clusters. E.g., if we don't reverse | ||
| 446 | the direction, the Hebrew point HOLAM is | ||
| 447 | drawn above the right edge of the base | ||
| 448 | consonant, instead of above the left edge. */ | ||
| 449 | ASET (vec, 0, make_number (-offsets[j].du | ||
| 450 | + adj_offset)); | ||
| 451 | /* Update the adjustment value for the width | ||
| 452 | advance of the glyph we just emitted. */ | ||
| 453 | adj_offset -= 2 * advances[j]; | ||
| 454 | } | ||
| 455 | else | ||
| 456 | ASET (vec, 0, make_number (offsets[j].du + adj_offset)); | ||
| 410 | ASET (vec, 1, make_number (offsets[j].dv)); | 457 | ASET (vec, 1, make_number (offsets[j].dv)); |
| 411 | /* Based on what ftfont.c does... */ | 458 | /* Based on what ftfont.c does... */ |
| 412 | ASET (vec, 2, make_number (advances[j])); | 459 | ASET (vec, 2, make_number (advances[j])); |
| 413 | LGLYPH_SET_ADJUSTMENT (lglyph, vec); | 460 | LGLYPH_SET_ADJUSTMENT (lglyph, vec); |
| 414 | } | 461 | } |
| 415 | else | 462 | else |
| 416 | LGLYPH_SET_ADJUSTMENT (lglyph, Qnil); | 463 | { |
| 464 | LGLYPH_SET_ADJUSTMENT (lglyph, Qnil); | ||
| 465 | /* Update the adjustment value to compensate for | ||
| 466 | the width of the base character. */ | ||
| 467 | if (items[i].a.fRTL) | ||
| 468 | adj_offset -= advances[j]; | ||
| 469 | } | ||
| 417 | } | 470 | } |
| 418 | } | 471 | } |
| 419 | } | 472 | } |
diff --git a/src/w32xfns.c b/src/w32xfns.c index 745a5cfe3e7..62e45dd987b 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -438,6 +438,6 @@ XParseGeometry (char *string, | |||
| 438 | 438 | ||
| 439 | /* x_sync is a no-op on W32. */ | 439 | /* x_sync is a no-op on W32. */ |
| 440 | void | 440 | void |
| 441 | x_sync (void *f) | 441 | x_sync (struct frame *f) |
| 442 | { | 442 | { |
| 443 | } | 443 | } |
diff --git a/src/widget.c b/src/widget.c index b94c30f4e9c..ea9bdb61b13 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -671,8 +671,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs | |||
| 671 | update_wm_hints (ew); | 671 | update_wm_hints (ew); |
| 672 | } | 672 | } |
| 673 | 673 | ||
| 674 | extern void free_frame_faces (struct frame *); | ||
| 675 | |||
| 676 | static void | 674 | static void |
| 677 | EmacsFrameDestroy (Widget widget) | 675 | EmacsFrameDestroy (Widget widget) |
| 678 | { | 676 | { |
diff --git a/src/window.c b/src/window.c index 20325711e73..732d5060d29 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -54,14 +54,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 54 | #include "nsterm.h" | 54 | #include "nsterm.h" |
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_valid_p; | 57 | Lisp_Object Qwindowp, Qwindow_live_p; |
| 58 | static Lisp_Object Qwindow_valid_p; | ||
| 58 | static Lisp_Object Qwindow_configuration_p, Qrecord_window_buffer; | 59 | static Lisp_Object Qwindow_configuration_p, Qrecord_window_buffer; |
| 59 | static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer; | 60 | static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer; |
| 60 | static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; | 61 | static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; |
| 61 | static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; | 62 | static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; |
| 62 | static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; | 63 | static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; |
| 63 | static Lisp_Object Qsafe, Qabove, Qbelow; | 64 | static Lisp_Object Qsafe, Qabove, Qbelow; |
| 64 | static Lisp_Object Qauto_buffer_name, Qclone_of; | 65 | static Lisp_Object Qclone_of; |
| 65 | 66 | ||
| 66 | static int displayed_window_lines (struct window *); | 67 | static int displayed_window_lines (struct window *); |
| 67 | static int count_windows (struct window *); | 68 | static int count_windows (struct window *); |
| @@ -268,7 +269,7 @@ decode_any_window (register Lisp_Object window) | |||
| 268 | return w; | 269 | return w; |
| 269 | } | 270 | } |
| 270 | 271 | ||
| 271 | struct window * | 272 | static struct window * |
| 272 | decode_valid_window (register Lisp_Object window) | 273 | decode_valid_window (register Lisp_Object window) |
| 273 | { | 274 | { |
| 274 | struct window *w; | 275 | struct window *w; |
| @@ -1407,22 +1408,21 @@ DEFUN ("window-point", Fwindow_point, Swindow_point, 0, 1, 0, | |||
| 1407 | doc: /* Return current value of point in WINDOW. | 1408 | doc: /* Return current value of point in WINDOW. |
| 1408 | WINDOW must be a live window and defaults to the selected one. | 1409 | WINDOW must be a live window and defaults to the selected one. |
| 1409 | 1410 | ||
| 1410 | For a nonselected window, this is the value point would have | 1411 | For a nonselected window, this is the value point would have if that |
| 1411 | if that window were selected. | 1412 | window were selected. |
| 1412 | 1413 | ||
| 1413 | Note that, when WINDOW is the selected window and its buffer | 1414 | Note that, when WINDOW is selected, the value returned is the same as |
| 1414 | is also currently selected, the value returned is the same as (point). | 1415 | that returned by `point' for WINDOW's buffer. It would be more strictly |
| 1415 | It would be more strictly correct to return the `top-level' value | 1416 | correct to return the `top-level' value of `point', outside of any |
| 1416 | of point, outside of any save-excursion forms. | 1417 | `save-excursion' forms. But that is hard to define. */) |
| 1417 | But that is hard to define. */) | ||
| 1418 | (Lisp_Object window) | 1418 | (Lisp_Object window) |
| 1419 | { | 1419 | { |
| 1420 | register struct window *w = decode_live_window (window); | 1420 | register struct window *w = decode_live_window (window); |
| 1421 | 1421 | ||
| 1422 | if (w == XWINDOW (selected_window) | 1422 | if (w == XWINDOW (selected_window)) |
| 1423 | && current_buffer == XBUFFER (w->buffer)) | 1423 | return make_number (BUF_PT (XBUFFER (w->buffer))); |
| 1424 | return Fpoint (); | 1424 | else |
| 1425 | return Fmarker_position (w->pointm); | 1425 | return Fmarker_position (w->pointm); |
| 1426 | } | 1426 | } |
| 1427 | 1427 | ||
| 1428 | DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0, | 1428 | DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0, |
| @@ -1532,16 +1532,27 @@ Return POS. */) | |||
| 1532 | register struct window *w = decode_live_window (window); | 1532 | register struct window *w = decode_live_window (window); |
| 1533 | 1533 | ||
| 1534 | CHECK_NUMBER_COERCE_MARKER (pos); | 1534 | CHECK_NUMBER_COERCE_MARKER (pos); |
| 1535 | if (w == XWINDOW (selected_window) | ||
| 1536 | && XBUFFER (w->buffer) == current_buffer) | ||
| 1537 | Fgoto_char (pos); | ||
| 1538 | else | ||
| 1539 | set_marker_restricted (w->pointm, pos, w->buffer); | ||
| 1540 | 1535 | ||
| 1541 | /* We have to make sure that redisplay updates the window to show | 1536 | if (w == XWINDOW (selected_window)) |
| 1542 | the new value of point. */ | 1537 | { |
| 1543 | if (!EQ (window, selected_window)) | 1538 | if (XBUFFER (w->buffer) == current_buffer) |
| 1544 | ++windows_or_buffers_changed; | 1539 | Fgoto_char (pos); |
| 1540 | else | ||
| 1541 | { | ||
| 1542 | struct buffer *old_buffer = current_buffer; | ||
| 1543 | |||
| 1544 | set_buffer_internal (XBUFFER (w->buffer)); | ||
| 1545 | Fgoto_char (pos); | ||
| 1546 | set_buffer_internal (old_buffer); | ||
| 1547 | } | ||
| 1548 | } | ||
| 1549 | else | ||
| 1550 | { | ||
| 1551 | set_marker_restricted (w->pointm, pos, w->buffer); | ||
| 1552 | /* We have to make sure that redisplay updates the window to show | ||
| 1553 | the new value of point. */ | ||
| 1554 | ++windows_or_buffers_changed; | ||
| 1555 | } | ||
| 1545 | 1556 | ||
| 1546 | return pos; | 1557 | return pos; |
| 1547 | } | 1558 | } |
| @@ -1958,6 +1969,9 @@ unshow_buffer (register struct window *w) | |||
| 1958 | is actually stored in that buffer, and the window's pointm isn't used. | 1969 | is actually stored in that buffer, and the window's pointm isn't used. |
| 1959 | So don't clobber point in that buffer. */ | 1970 | So don't clobber point in that buffer. */ |
| 1960 | if (! EQ (buf, XWINDOW (selected_window)->buffer) | 1971 | if (! EQ (buf, XWINDOW (selected_window)->buffer) |
| 1972 | /* Don't clobber point in current buffer either (this could be | ||
| 1973 | useful in connection with bug#12208). | ||
| 1974 | && XBUFFER (buf) != current_buffer */ | ||
| 1961 | /* This line helps to fix Horsley's testbug.el bug. */ | 1975 | /* This line helps to fix Horsley's testbug.el bug. */ |
| 1962 | && !(WINDOWP (BVAR (b, last_selected_window)) | 1976 | && !(WINDOWP (BVAR (b, last_selected_window)) |
| 1963 | && w != XWINDOW (BVAR (b, last_selected_window)) | 1977 | && w != XWINDOW (BVAR (b, last_selected_window)) |
| @@ -3087,7 +3101,7 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3087 | /* Use the right buffer. Matters when running the local hooks. */ | 3101 | /* Use the right buffer. Matters when running the local hooks. */ |
| 3088 | if (current_buffer != XBUFFER (Fwindow_buffer (Qnil))) | 3102 | if (current_buffer != XBUFFER (Fwindow_buffer (Qnil))) |
| 3089 | { | 3103 | { |
| 3090 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 3104 | record_unwind_current_buffer (); |
| 3091 | Fset_buffer (Fwindow_buffer (Qnil)); | 3105 | Fset_buffer (Fwindow_buffer (Qnil)); |
| 3092 | } | 3106 | } |
| 3093 | 3107 | ||
| @@ -3124,7 +3138,7 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3124 | DEFUN ("run-window-configuration-change-hook", Frun_window_configuration_change_hook, | 3138 | DEFUN ("run-window-configuration-change-hook", Frun_window_configuration_change_hook, |
| 3125 | Srun_window_configuration_change_hook, 1, 1, 0, | 3139 | Srun_window_configuration_change_hook, 1, 1, 0, |
| 3126 | doc: /* Run `window-configuration-change-hook' for FRAME. */) | 3140 | doc: /* Run `window-configuration-change-hook' for FRAME. */) |
| 3127 | (Lisp_Object frame) | 3141 | (Lisp_Object frame) |
| 3128 | { | 3142 | { |
| 3129 | CHECK_LIVE_FRAME (frame); | 3143 | CHECK_LIVE_FRAME (frame); |
| 3130 | run_window_configuration_change_hook (XFRAME (frame)); | 3144 | run_window_configuration_change_hook (XFRAME (frame)); |
| @@ -3191,7 +3205,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3191 | because that might itself be a local variable. */ | 3205 | because that might itself be a local variable. */ |
| 3192 | if (window_initialized) | 3206 | if (window_initialized) |
| 3193 | { | 3207 | { |
| 3194 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 3208 | record_unwind_current_buffer (); |
| 3195 | Fset_buffer (buffer); | 3209 | Fset_buffer (buffer); |
| 3196 | } | 3210 | } |
| 3197 | 3211 | ||
| @@ -5526,7 +5540,6 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5526 | struct Lisp_Vector *saved_windows; | 5540 | struct Lisp_Vector *saved_windows; |
| 5527 | Lisp_Object new_current_buffer; | 5541 | Lisp_Object new_current_buffer; |
| 5528 | Lisp_Object frame; | 5542 | Lisp_Object frame; |
| 5529 | Lisp_Object auto_buffer_name; | ||
| 5530 | FRAME_PTR f; | 5543 | FRAME_PTR f; |
| 5531 | ptrdiff_t old_point = -1; | 5544 | ptrdiff_t old_point = -1; |
| 5532 | 5545 | ||
| @@ -5602,6 +5615,21 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5602 | int previous_frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f); | 5615 | int previous_frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f); |
| 5603 | int previous_frame_tool_bar_lines = FRAME_TOOL_BAR_LINES (f); | 5616 | int previous_frame_tool_bar_lines = FRAME_TOOL_BAR_LINES (f); |
| 5604 | 5617 | ||
| 5618 | /* Don't do this within the main loop below: This may call Lisp | ||
| 5619 | code and is thus potentially unsafe while input is blocked. */ | ||
| 5620 | for (k = 0; k < saved_windows->header.size; k++) | ||
| 5621 | { | ||
| 5622 | p = SAVED_WINDOW_N (saved_windows, k); | ||
| 5623 | window = p->window; | ||
| 5624 | w = XWINDOW (window); | ||
| 5625 | if (!NILP (w->buffer) | ||
| 5626 | && !EQ (w->buffer, p->buffer) | ||
| 5627 | && !NILP (BVAR (XBUFFER (p->buffer), name))) | ||
| 5628 | /* If a window we restore gets another buffer, record the | ||
| 5629 | window's old buffer. */ | ||
| 5630 | call1 (Qrecord_window_buffer, window); | ||
| 5631 | } | ||
| 5632 | |||
| 5605 | /* The mouse highlighting code could get screwed up | 5633 | /* The mouse highlighting code could get screwed up |
| 5606 | if it runs during this. */ | 5634 | if it runs during this. */ |
| 5607 | BLOCK_INPUT; | 5635 | BLOCK_INPUT; |
| @@ -5780,18 +5808,6 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5780 | BUF_PT_BYTE (XBUFFER (w->buffer))); | 5808 | BUF_PT_BYTE (XBUFFER (w->buffer))); |
| 5781 | w->start_at_line_beg = 1; | 5809 | w->start_at_line_beg = 1; |
| 5782 | } | 5810 | } |
| 5783 | else if (STRINGP (auto_buffer_name = | ||
| 5784 | Fwindow_parameter (window, Qauto_buffer_name)) | ||
| 5785 | && SCHARS (auto_buffer_name) != 0 | ||
| 5786 | && (wset_buffer (w, Fget_buffer_create (auto_buffer_name)), | ||
| 5787 | !NILP (w->buffer))) | ||
| 5788 | { | ||
| 5789 | set_marker_restricted (w->start, | ||
| 5790 | make_number (0), w->buffer); | ||
| 5791 | set_marker_restricted (w->pointm, | ||
| 5792 | make_number (0), w->buffer); | ||
| 5793 | w->start_at_line_beg = 1; | ||
| 5794 | } | ||
| 5795 | else | 5811 | else |
| 5796 | /* Window has no live buffer, get one. */ | 5812 | /* Window has no live buffer, get one. */ |
| 5797 | { | 5813 | { |
| @@ -5889,7 +5905,13 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5889 | } | 5905 | } |
| 5890 | 5906 | ||
| 5891 | if (!NILP (new_current_buffer)) | 5907 | if (!NILP (new_current_buffer)) |
| 5892 | Fset_buffer (new_current_buffer); | 5908 | { |
| 5909 | Fset_buffer (new_current_buffer); | ||
| 5910 | /* If the new current buffer doesn't appear in the selected | ||
| 5911 | window, go to its old point (see bug#12208). */ | ||
| 5912 | if (!EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) | ||
| 5913 | Fgoto_char (make_number (old_point)); | ||
| 5914 | } | ||
| 5893 | 5915 | ||
| 5894 | Vminibuf_scroll_window = data->minibuf_scroll_window; | 5916 | Vminibuf_scroll_window = data->minibuf_scroll_window; |
| 5895 | minibuf_selected_window = data->minibuf_selected_window; | 5917 | minibuf_selected_window = data->minibuf_selected_window; |
| @@ -6691,7 +6713,6 @@ syms_of_window (void) | |||
| 6691 | DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook"); | 6713 | DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook"); |
| 6692 | DEFSYM (Qabove, "above"); | 6714 | DEFSYM (Qabove, "above"); |
| 6693 | DEFSYM (Qbelow, "below"); | 6715 | DEFSYM (Qbelow, "below"); |
| 6694 | DEFSYM (Qauto_buffer_name, "auto-buffer-name"); | ||
| 6695 | DEFSYM (Qclone_of, "clone-of"); | 6716 | DEFSYM (Qclone_of, "clone-of"); |
| 6696 | 6717 | ||
| 6697 | staticpro (&Vwindow_list); | 6718 | staticpro (&Vwindow_list); |
diff --git a/src/window.h b/src/window.h index 28b9678b667..dfb88b2cf3c 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -972,7 +972,6 @@ struct glyph *get_phys_cursor_glyph (struct window *w); | |||
| 972 | extern Lisp_Object Qwindowp, Qwindow_live_p; | 972 | extern Lisp_Object Qwindowp, Qwindow_live_p; |
| 973 | extern Lisp_Object Vwindow_list; | 973 | extern Lisp_Object Vwindow_list; |
| 974 | 974 | ||
| 975 | extern struct window *decode_valid_window (Lisp_Object); | ||
| 976 | extern struct window *decode_live_window (Lisp_Object); | 975 | extern struct window *decode_live_window (Lisp_Object); |
| 977 | extern int compare_window_configurations (Lisp_Object, Lisp_Object, int); | 976 | extern int compare_window_configurations (Lisp_Object, Lisp_Object, int); |
| 978 | extern void mark_window_cursors_off (struct window *); | 977 | extern void mark_window_cursors_off (struct window *); |
diff --git a/src/xdisp.c b/src/xdisp.c index e41783d03c1..86f041dea4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -768,9 +768,9 @@ static int clear_image_cache_count; | |||
| 768 | static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; | 768 | static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; |
| 769 | #endif | 769 | #endif |
| 770 | 770 | ||
| 771 | /* Non-zero while redisplay_internal is in progress. */ | 771 | /* True while redisplay_internal is in progress. */ |
| 772 | 772 | ||
| 773 | int redisplaying_p; | 773 | bool redisplaying_p; |
| 774 | 774 | ||
| 775 | static Lisp_Object Qinhibit_free_realized_faces; | 775 | static Lisp_Object Qinhibit_free_realized_faces; |
| 776 | static Lisp_Object Qmode_line_default_help_echo; | 776 | static Lisp_Object Qmode_line_default_help_echo; |
| @@ -2420,7 +2420,7 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect) | |||
| 2420 | static Lisp_Object | 2420 | static Lisp_Object |
| 2421 | safe_eval_handler (Lisp_Object arg, ptrdiff_t nargs, Lisp_Object *args) | 2421 | safe_eval_handler (Lisp_Object arg, ptrdiff_t nargs, Lisp_Object *args) |
| 2422 | { | 2422 | { |
| 2423 | add_to_log ("Error during redisplay: %S signalled %S", | 2423 | add_to_log ("Error during redisplay: %S signaled %S", |
| 2424 | Flist (nargs, args), arg); | 2424 | Flist (nargs, args), arg); |
| 2425 | return Qnil; | 2425 | return Qnil; |
| 2426 | } | 2426 | } |
| @@ -10480,11 +10480,10 @@ current_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4) | |||
| 10480 | empty. This is a relatively infrequent operation, so it's not | 10480 | empty. This is a relatively infrequent operation, so it's not |
| 10481 | worth optimizing. */ | 10481 | worth optimizing. */ |
| 10482 | 10482 | ||
| 10483 | int | 10483 | bool |
| 10484 | push_message (void) | 10484 | push_message (void) |
| 10485 | { | 10485 | { |
| 10486 | Lisp_Object msg; | 10486 | Lisp_Object msg = current_message (); |
| 10487 | msg = current_message (); | ||
| 10488 | Vmessage_stack = Fcons (msg, Vmessage_stack); | 10487 | Vmessage_stack = Fcons (msg, Vmessage_stack); |
| 10489 | return STRINGP (msg); | 10488 | return STRINGP (msg); |
| 10490 | } | 10489 | } |
| @@ -12967,12 +12966,11 @@ redisplay_internal (void) | |||
| 12967 | if (redisplaying_p) | 12966 | if (redisplaying_p) |
| 12968 | return; | 12967 | return; |
| 12969 | 12968 | ||
| 12970 | /* Record a function that resets redisplaying_p to its old value | 12969 | /* Record a function that clears redisplaying_p |
| 12971 | when we leave this function. */ | 12970 | when we leave this function. */ |
| 12972 | count = SPECPDL_INDEX (); | 12971 | count = SPECPDL_INDEX (); |
| 12973 | record_unwind_protect (unwind_redisplay, | 12972 | record_unwind_protect (unwind_redisplay, selected_frame); |
| 12974 | Fcons (make_number (redisplaying_p), selected_frame)); | 12973 | redisplaying_p = 1; |
| 12975 | ++redisplaying_p; | ||
| 12976 | specbind (Qinhibit_free_realized_faces, Qnil); | 12974 | specbind (Qinhibit_free_realized_faces, Qnil); |
| 12977 | 12975 | ||
| 12978 | { | 12976 | { |
| @@ -13710,21 +13708,15 @@ redisplay_preserve_echo_area (int from_where) | |||
| 13710 | } | 13708 | } |
| 13711 | 13709 | ||
| 13712 | 13710 | ||
| 13713 | /* Function registered with record_unwind_protect in | 13711 | /* Function registered with record_unwind_protect in redisplay_internal. |
| 13714 | redisplay_internal. Reset redisplaying_p to the value it had | 13712 | Clear redisplaying_p. Also, select the previously |
| 13715 | before redisplay_internal was called, and clear | ||
| 13716 | prevent_freeing_realized_faces_p. It also selects the previously | ||
| 13717 | selected frame, unless it has been deleted (by an X connection | 13713 | selected frame, unless it has been deleted (by an X connection |
| 13718 | failure during redisplay, for example). */ | 13714 | failure during redisplay, for example). */ |
| 13719 | 13715 | ||
| 13720 | static Lisp_Object | 13716 | static Lisp_Object |
| 13721 | unwind_redisplay (Lisp_Object val) | 13717 | unwind_redisplay (Lisp_Object old_frame) |
| 13722 | { | 13718 | { |
| 13723 | Lisp_Object old_redisplaying_p, old_frame; | 13719 | redisplaying_p = 0; |
| 13724 | |||
| 13725 | old_redisplaying_p = XCAR (val); | ||
| 13726 | redisplaying_p = XFASTINT (old_redisplaying_p); | ||
| 13727 | old_frame = XCDR (val); | ||
| 13728 | if (! EQ (old_frame, selected_frame) | 13720 | if (! EQ (old_frame, selected_frame) |
| 13729 | && FRAME_LIVE_P (XFRAME (old_frame))) | 13721 | && FRAME_LIVE_P (XFRAME (old_frame))) |
| 13730 | select_frame_for_redisplay (old_frame); | 13722 | select_frame_for_redisplay (old_frame); |
| @@ -14552,8 +14544,7 @@ run_window_scroll_functions (Lisp_Object window, struct text_pos startp) | |||
| 14552 | make_number (CHARPOS (startp))); | 14544 | make_number (CHARPOS (startp))); |
| 14553 | SET_TEXT_POS_FROM_MARKER (startp, w->start); | 14545 | SET_TEXT_POS_FROM_MARKER (startp, w->start); |
| 14554 | /* In case the hook functions switch buffers. */ | 14546 | /* In case the hook functions switch buffers. */ |
| 14555 | if (current_buffer != XBUFFER (w->buffer)) | 14547 | set_buffer_internal (XBUFFER (w->buffer)); |
| 14556 | set_buffer_internal_1 (XBUFFER (w->buffer)); | ||
| 14557 | } | 14548 | } |
| 14558 | 14549 | ||
| 14559 | return startp; | 14550 | return startp; |
| @@ -15381,7 +15372,7 @@ set_vertical_scroll_bar (struct window *w) | |||
| 15381 | selected_window is redisplayed. | 15372 | selected_window is redisplayed. |
| 15382 | 15373 | ||
| 15383 | We can return without actually redisplaying the window if | 15374 | We can return without actually redisplaying the window if |
| 15384 | fonts_changed_p is nonzero. In that case, redisplay_internal will | 15375 | fonts_changed_p. In that case, redisplay_internal will |
| 15385 | retry. */ | 15376 | retry. */ |
| 15386 | 15377 | ||
| 15387 | static void | 15378 | static void |
| @@ -16225,7 +16216,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 16225 | } | 16216 | } |
| 16226 | #endif /* HAVE_WINDOW_SYSTEM */ | 16217 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 16227 | 16218 | ||
| 16228 | /* We go to this label, with fonts_changed_p nonzero, | 16219 | /* We go to this label, with fonts_changed_p set, |
| 16229 | if it is necessary to try again using larger glyph matrices. | 16220 | if it is necessary to try again using larger glyph matrices. |
| 16230 | We have to redeem the scroll bar even in this case, | 16221 | We have to redeem the scroll bar even in this case, |
| 16231 | because the loop in redisplay_internal expects that. */ | 16222 | because the loop in redisplay_internal expects that. */ |
| @@ -17706,15 +17697,15 @@ try_window_id (struct window *w) | |||
| 17706 | { | 17697 | { |
| 17707 | rotate_matrix (current_matrix, first_unchanged_at_end_vpos + dvpos, | 17698 | rotate_matrix (current_matrix, first_unchanged_at_end_vpos + dvpos, |
| 17708 | bottom_vpos, dvpos); | 17699 | bottom_vpos, dvpos); |
| 17709 | enable_glyph_matrix_rows (current_matrix, bottom_vpos + dvpos, | 17700 | clear_glyph_matrix_rows (current_matrix, bottom_vpos + dvpos, |
| 17710 | bottom_vpos, 0); | 17701 | bottom_vpos); |
| 17711 | } | 17702 | } |
| 17712 | else if (dvpos > 0) | 17703 | else if (dvpos > 0) |
| 17713 | { | 17704 | { |
| 17714 | rotate_matrix (current_matrix, first_unchanged_at_end_vpos, | 17705 | rotate_matrix (current_matrix, first_unchanged_at_end_vpos, |
| 17715 | bottom_vpos, dvpos); | 17706 | bottom_vpos, dvpos); |
| 17716 | enable_glyph_matrix_rows (current_matrix, first_unchanged_at_end_vpos, | 17707 | clear_glyph_matrix_rows (current_matrix, first_unchanged_at_end_vpos, |
| 17717 | first_unchanged_at_end_vpos + dvpos, 0); | 17708 | first_unchanged_at_end_vpos + dvpos); |
| 17718 | } | 17709 | } |
| 17719 | 17710 | ||
| 17720 | /* For frame-based redisplay, make sure that current frame and window | 17711 | /* For frame-based redisplay, make sure that current frame and window |
diff --git a/src/xfaces.c b/src/xfaces.c index 46121d66606..4df5caf6f2a 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -225,11 +225,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 225 | #include "dosfns.h" | 225 | #include "dosfns.h" |
| 226 | #endif | 226 | #endif |
| 227 | 227 | ||
| 228 | #ifdef WINDOWSNT | 228 | #ifdef HAVE_WINDOW_SYSTEM |
| 229 | #include "w32term.h" | 229 | #include TERM_HEADER |
| 230 | #include "fontset.h" | 230 | #include "fontset.h" |
| 231 | /* Redefine X specifics to W32 equivalents to avoid cluttering the | 231 | #ifdef WINDOWSNT |
| 232 | code with #ifdef blocks. */ | ||
| 233 | #undef FRAME_X_DISPLAY_INFO | 232 | #undef FRAME_X_DISPLAY_INFO |
| 234 | #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO | 233 | #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO |
| 235 | #define x_display_info w32_display_info | 234 | #define x_display_info w32_display_info |
| @@ -238,13 +237,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 238 | #endif /* WINDOWSNT */ | 237 | #endif /* WINDOWSNT */ |
| 239 | 238 | ||
| 240 | #ifdef HAVE_NS | 239 | #ifdef HAVE_NS |
| 241 | #include "nsterm.h" | ||
| 242 | #undef FRAME_X_DISPLAY_INFO | 240 | #undef FRAME_X_DISPLAY_INFO |
| 243 | #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO | 241 | #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO |
| 244 | #define x_display_info ns_display_info | 242 | #define x_display_info ns_display_info |
| 245 | #define check_x check_ns | 243 | #define check_x check_ns |
| 246 | #define GCGraphicsExposures 0 | 244 | #define GCGraphicsExposures 0 |
| 247 | #endif /* HAVE_NS */ | 245 | #endif /* HAVE_NS */ |
| 246 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 248 | 247 | ||
| 249 | #include "buffer.h" | 248 | #include "buffer.h" |
| 250 | #include "dispextern.h" | 249 | #include "dispextern.h" |
| @@ -254,9 +253,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 254 | #include "termchar.h" | 253 | #include "termchar.h" |
| 255 | 254 | ||
| 256 | #include "font.h" | 255 | #include "font.h" |
| 257 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 258 | #include "fontset.h" | ||
| 259 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 260 | 256 | ||
| 261 | #ifdef HAVE_X_WINDOWS | 257 | #ifdef HAVE_X_WINDOWS |
| 262 | 258 | ||
| @@ -319,9 +315,10 @@ static Lisp_Object QCfontset; | |||
| 319 | Lisp_Object Qnormal; | 315 | Lisp_Object Qnormal; |
| 320 | Lisp_Object Qbold; | 316 | Lisp_Object Qbold; |
| 321 | static Lisp_Object Qline, Qwave; | 317 | static Lisp_Object Qline, Qwave; |
| 322 | Lisp_Object Qultra_light, Qextra_light, Qlight; | 318 | static Lisp_Object Qultra_light, Qreverse_oblique, Qreverse_italic; |
| 319 | Lisp_Object Qextra_light, Qlight; | ||
| 323 | Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; | 320 | Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; |
| 324 | Lisp_Object Qoblique, Qreverse_oblique, Qreverse_italic; | 321 | Lisp_Object Qoblique; |
| 325 | Lisp_Object Qitalic; | 322 | Lisp_Object Qitalic; |
| 326 | static Lisp_Object Qultra_condensed, Qextra_condensed; | 323 | static Lisp_Object Qultra_condensed, Qextra_condensed; |
| 327 | Lisp_Object Qcondensed; | 324 | Lisp_Object Qcondensed; |
| @@ -456,18 +453,7 @@ static int menu_face_changed_default; | |||
| 456 | struct table_entry; | 453 | struct table_entry; |
| 457 | struct named_merge_point; | 454 | struct named_merge_point; |
| 458 | 455 | ||
| 459 | static void map_tty_color (struct frame *, struct face *, | ||
| 460 | enum lface_attribute_index, int *); | ||
| 461 | static Lisp_Object resolve_face_name (Lisp_Object, int); | ||
| 462 | static void set_font_frame_param (Lisp_Object, Lisp_Object); | 456 | static void set_font_frame_param (Lisp_Object, Lisp_Object); |
| 463 | static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *, | ||
| 464 | int, struct named_merge_point *); | ||
| 465 | static ptrdiff_t load_pixmap (struct frame *, Lisp_Object, | ||
| 466 | unsigned *, unsigned *); | ||
| 467 | static struct frame *frame_or_selected_frame (Lisp_Object, int); | ||
| 468 | static void load_face_colors (struct frame *, struct face *, Lisp_Object *); | ||
| 469 | static void free_face_colors (struct frame *, struct face *); | ||
| 470 | static int face_color_gray_p (struct frame *, const char *); | ||
| 471 | static struct face *realize_face (struct face_cache *, Lisp_Object *, | 457 | static struct face *realize_face (struct face_cache *, Lisp_Object *, |
| 472 | int); | 458 | int); |
| 473 | static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, | 459 | static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, |
| @@ -477,38 +463,11 @@ static struct face *realize_tty_face (struct face_cache *, Lisp_Object *); | |||
| 477 | static int realize_basic_faces (struct frame *); | 463 | static int realize_basic_faces (struct frame *); |
| 478 | static int realize_default_face (struct frame *); | 464 | static int realize_default_face (struct frame *); |
| 479 | static void realize_named_face (struct frame *, Lisp_Object, int); | 465 | static void realize_named_face (struct frame *, Lisp_Object, int); |
| 480 | static int lface_fully_specified_p (Lisp_Object *); | ||
| 481 | static int lface_equal_p (Lisp_Object *, Lisp_Object *); | ||
| 482 | static unsigned hash_string_case_insensitive (Lisp_Object); | ||
| 483 | static unsigned lface_hash (Lisp_Object *); | ||
| 484 | static int lface_same_font_attributes_p (Lisp_Object *, Lisp_Object *); | ||
| 485 | static struct face_cache *make_face_cache (struct frame *); | 466 | static struct face_cache *make_face_cache (struct frame *); |
| 486 | static void clear_face_gcs (struct face_cache *); | 467 | static void clear_face_gcs (struct face_cache *); |
| 487 | static void free_face_cache (struct face_cache *); | 468 | static void free_face_cache (struct face_cache *); |
| 488 | static int face_fontset (Lisp_Object *); | ||
| 489 | static void merge_face_vectors (struct frame *, Lisp_Object *, Lisp_Object*, | ||
| 490 | struct named_merge_point *); | ||
| 491 | static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, | 469 | static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, |
| 492 | int, struct named_merge_point *); | 470 | int, struct named_merge_point *); |
| 493 | static int set_lface_from_font (struct frame *, Lisp_Object, Lisp_Object, | ||
| 494 | int); | ||
| 495 | static Lisp_Object lface_from_face_name (struct frame *, Lisp_Object, int); | ||
| 496 | static struct face *make_realized_face (Lisp_Object *); | ||
| 497 | static void cache_face (struct face_cache *, struct face *, unsigned); | ||
| 498 | static void uncache_face (struct face_cache *, struct face *); | ||
| 499 | |||
| 500 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 501 | |||
| 502 | static GC x_create_gc (struct frame *, unsigned long, XGCValues *); | ||
| 503 | static void x_free_gc (struct frame *, GC); | ||
| 504 | |||
| 505 | #ifdef USE_X_TOOLKIT | ||
| 506 | static void x_update_menu_appearance (struct frame *); | ||
| 507 | |||
| 508 | extern void free_frame_menubar (struct frame *); | ||
| 509 | #endif /* USE_X_TOOLKIT */ | ||
| 510 | |||
| 511 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 512 | 471 | ||
| 513 | 472 | ||
| 514 | /*********************************************************************** | 473 | /*********************************************************************** |
| @@ -2565,13 +2524,13 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2565 | } | 2524 | } |
| 2566 | else if (EQ (keyword, QCstipple)) | 2525 | else if (EQ (keyword, QCstipple)) |
| 2567 | { | 2526 | { |
| 2568 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) | 2527 | #if defined (HAVE_WINDOW_SYSTEM) |
| 2569 | Lisp_Object pixmap_p = Fbitmap_spec_p (value); | 2528 | Lisp_Object pixmap_p = Fbitmap_spec_p (value); |
| 2570 | if (!NILP (pixmap_p)) | 2529 | if (!NILP (pixmap_p)) |
| 2571 | to[LFACE_STIPPLE_INDEX] = value; | 2530 | to[LFACE_STIPPLE_INDEX] = value; |
| 2572 | else | 2531 | else |
| 2573 | err = 1; | 2532 | err = 1; |
| 2574 | #endif | 2533 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 2575 | } | 2534 | } |
| 2576 | else if (EQ (keyword, QCwidth)) | 2535 | else if (EQ (keyword, QCwidth)) |
| 2577 | { | 2536 | { |
| @@ -2781,8 +2740,7 @@ The value is TO. */) | |||
| 2781 | copy = Finternal_make_lisp_face (to, new_frame); | 2740 | copy = Finternal_make_lisp_face (to, new_frame); |
| 2782 | } | 2741 | } |
| 2783 | 2742 | ||
| 2784 | memcpy (XVECTOR (copy)->contents, XVECTOR (lface)->contents, | 2743 | vcopy (copy, 0, XVECTOR (lface)->contents, LFACE_VECTOR_SIZE); |
| 2785 | LFACE_VECTOR_SIZE * word_size); | ||
| 2786 | 2744 | ||
| 2787 | /* Changing a named face means that all realized faces depending on | 2745 | /* Changing a named face means that all realized faces depending on |
| 2788 | that face are invalid. Since we cannot tell which realized faces | 2746 | that face are invalid. Since we cannot tell which realized faces |
| @@ -3126,14 +3084,14 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 3126 | } | 3084 | } |
| 3127 | else if (EQ (attr, QCstipple)) | 3085 | else if (EQ (attr, QCstipple)) |
| 3128 | { | 3086 | { |
| 3129 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) | 3087 | #if defined (HAVE_WINDOW_SYSTEM) |
| 3130 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) | 3088 | if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) |
| 3131 | && !NILP (value) | 3089 | && !NILP (value) |
| 3132 | && NILP (Fbitmap_spec_p (value))) | 3090 | && NILP (Fbitmap_spec_p (value))) |
| 3133 | signal_error ("Invalid stipple attribute", value); | 3091 | signal_error ("Invalid stipple attribute", value); |
| 3134 | old_value = LFACE_STIPPLE (lface); | 3092 | old_value = LFACE_STIPPLE (lface); |
| 3135 | ASET (lface, LFACE_STIPPLE_INDEX, value); | 3093 | ASET (lface, LFACE_STIPPLE_INDEX, value); |
| 3136 | #endif /* HAVE_X_WINDOWS || HAVE_NS */ | 3094 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 3137 | } | 3095 | } |
| 3138 | else if (EQ (attr, QCwidth)) | 3096 | else if (EQ (attr, QCwidth)) |
| 3139 | { | 3097 | { |
| @@ -3831,9 +3789,9 @@ Default face attributes override any local face attributes. */) | |||
| 3831 | gvec = XVECTOR (global_lface)->contents; | 3789 | gvec = XVECTOR (global_lface)->contents; |
| 3832 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | 3790 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) |
| 3833 | if (IGNORE_DEFFACE_P (gvec[i])) | 3791 | if (IGNORE_DEFFACE_P (gvec[i])) |
| 3834 | lvec[i] = Qunspecified; | 3792 | ASET (local_lface, i, Qunspecified); |
| 3835 | else if (! UNSPECIFIEDP (gvec[i])) | 3793 | else if (! UNSPECIFIEDP (gvec[i])) |
| 3836 | lvec[i] = gvec[i]; | 3794 | ASET (local_lface, i, AREF (global_lface, i)); |
| 3837 | 3795 | ||
| 3838 | /* If the default face was changed, update the face cache and the | 3796 | /* If the default face was changed, update the face cache and the |
| 3839 | `font' frame parameter. */ | 3797 | `font' frame parameter. */ |
| @@ -3850,7 +3808,7 @@ Default face attributes override any local face attributes. */) | |||
| 3850 | the previously-cached vector. */ | 3808 | the previously-cached vector. */ |
| 3851 | memcpy (attrs, oldface->lface, sizeof attrs); | 3809 | memcpy (attrs, oldface->lface, sizeof attrs); |
| 3852 | merge_face_vectors (f, lvec, attrs, 0); | 3810 | merge_face_vectors (f, lvec, attrs, 0); |
| 3853 | memcpy (lvec, attrs, sizeof attrs); | 3811 | vcopy (local_lface, 0, attrs, LFACE_VECTOR_SIZE); |
| 3854 | newface = realize_face (c, lvec, DEFAULT_FACE_ID); | 3812 | newface = realize_face (c, lvec, DEFAULT_FACE_ID); |
| 3855 | 3813 | ||
| 3856 | if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX]) | 3814 | if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX]) |
diff --git a/src/xfont.c b/src/xfont.c index 072bce7bb0a..be9556d585a 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -46,7 +46,6 @@ struct xfont_info | |||
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | /* Prototypes of support functions. */ | 48 | /* Prototypes of support functions. */ |
| 49 | extern void x_clear_errors (Display *); | ||
| 50 | 49 | ||
| 51 | static XCharStruct *xfont_get_pcm (XFontStruct *, XChar2b *); | 50 | static XCharStruct *xfont_get_pcm (XFontStruct *, XChar2b *); |
| 52 | 51 | ||
| @@ -390,7 +389,7 @@ xfont_list_pattern (Display *display, const char *pattern, | |||
| 390 | Lisp_Object scripts = Qnil; | 389 | Lisp_Object scripts = Qnil; |
| 391 | 390 | ||
| 392 | for (i = 0; i < ASIZE (xfont_scratch_props); i++) | 391 | for (i = 0; i < ASIZE (xfont_scratch_props); i++) |
| 393 | props[i] = Qnil; | 392 | ASET (xfont_scratch_props, i, Qnil); |
| 394 | for (i = 0; i < num_fonts; i++) | 393 | for (i = 0; i < num_fonts; i++) |
| 395 | indices[i] = names[i]; | 394 | indices[i] = names[i]; |
| 396 | qsort (indices, num_fonts, sizeof (char *), compare_font_names); | 395 | qsort (indices, num_fonts, sizeof (char *), compare_font_names); |
| @@ -467,9 +466,9 @@ xfont_list_pattern (Display *display, const char *pattern, | |||
| 467 | word_size * 7) | 466 | word_size * 7) |
| 468 | || ! EQ (AREF (entity, FONT_SPACING_INDEX), props[7])) | 467 | || ! EQ (AREF (entity, FONT_SPACING_INDEX), props[7])) |
| 469 | { | 468 | { |
| 470 | memcpy (props, aref_addr (entity, FONT_FOUNDRY_INDEX), | 469 | vcopy (xfont_scratch_props, 0, |
| 471 | word_size * 7); | 470 | aref_addr (entity, FONT_FOUNDRY_INDEX), 7); |
| 472 | props[7] = AREF (entity, FONT_SPACING_INDEX); | 471 | ASET (xfont_scratch_props, 7, AREF (entity, FONT_SPACING_INDEX)); |
| 473 | scripts = xfont_supported_scripts (display, indices[i], | 472 | scripts = xfont_supported_scripts (display, indices[i], |
| 474 | xfont_scratch_props, encoding); | 473 | xfont_scratch_props, encoding); |
| 475 | } | 474 | } |
diff --git a/src/xgselect.c b/src/xgselect.c index 04ca00274e8..0c00d815820 100644 --- a/src/xgselect.c +++ b/src/xgselect.c | |||
| @@ -29,9 +29,6 @@ along with GNU Emacs. If not, see <http§://www.gnu.org/licenses/>. */ | |||
| 29 | #include <setjmp.h> | 29 | #include <setjmp.h> |
| 30 | #include "xterm.h" | 30 | #include "xterm.h" |
| 31 | 31 | ||
| 32 | static GPollFD *gfds; | ||
| 33 | static ptrdiff_t gfds_size; | ||
| 34 | |||
| 35 | int | 32 | int |
| 36 | xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | 33 | xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, |
| 37 | EMACS_TIME *timeout, sigset_t *sigmask) | 34 | EMACS_TIME *timeout, sigset_t *sigmask) |
| @@ -41,35 +38,31 @@ xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | |||
| 41 | 38 | ||
| 42 | GMainContext *context; | 39 | GMainContext *context; |
| 43 | int have_wfds = wfds != NULL; | 40 | int have_wfds = wfds != NULL; |
| 44 | int n_gfds = 0, retval = 0, our_fds = 0, max_fds = fds_lim - 1; | 41 | GPollFD gfds_buf[128]; |
| 42 | GPollFD *gfds = gfds_buf; | ||
| 43 | int gfds_size = sizeof gfds_buf / sizeof *gfds_buf; | ||
| 44 | int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; | ||
| 45 | int i, nfds, tmo_in_millisec; | 45 | int i, nfds, tmo_in_millisec; |
| 46 | USE_SAFE_ALLOCA; | ||
| 46 | 47 | ||
| 47 | if (!x_in_use) | 48 | if (! (x_in_use |
| 48 | return pselect (fds_lim, rfds, wfds, efds, tmop, sigmask); | 49 | && g_main_context_pending (context = g_main_context_default ()))) |
| 50 | return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask); | ||
| 49 | 51 | ||
| 50 | if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds)); | 52 | if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds)); |
| 51 | else FD_ZERO (&all_rfds); | 53 | else FD_ZERO (&all_rfds); |
| 52 | if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds)); | 54 | if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds)); |
| 53 | else FD_ZERO (&all_wfds); | 55 | else FD_ZERO (&all_wfds); |
| 54 | 56 | ||
| 55 | /* Update event sources in GLib. */ | 57 | n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, |
| 56 | context = g_main_context_default (); | 58 | gfds, gfds_size); |
| 57 | g_main_context_pending (context); | 59 | if (gfds_size < n_gfds) |
| 58 | 60 | { | |
| 59 | do { | 61 | SAFE_NALLOCA (gfds, sizeof *gfds, n_gfds); |
| 60 | if (n_gfds > gfds_size) | 62 | gfds_size = n_gfds; |
| 61 | { | 63 | n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, |
| 62 | xfree (gfds); | 64 | gfds, gfds_size); |
| 63 | gfds = xpalloc (0, &gfds_size, n_gfds - gfds_size, INT_MAX, | 65 | } |
| 64 | sizeof *gfds); | ||
| 65 | } | ||
| 66 | |||
| 67 | n_gfds = g_main_context_query (context, | ||
| 68 | G_PRIORITY_LOW, | ||
| 69 | &tmo_in_millisec, | ||
| 70 | gfds, | ||
| 71 | gfds_size); | ||
| 72 | } while (n_gfds > gfds_size); | ||
| 73 | 66 | ||
| 74 | for (i = 0; i < n_gfds; ++i) | 67 | for (i = 0; i < n_gfds; ++i) |
| 75 | { | 68 | { |
| @@ -86,6 +79,8 @@ xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | |||
| 86 | } | 79 | } |
| 87 | } | 80 | } |
| 88 | 81 | ||
| 82 | SAFE_FREE (); | ||
| 83 | |||
| 89 | if (tmo_in_millisec >= 0) | 84 | if (tmo_in_millisec >= 0) |
| 90 | { | 85 | { |
| 91 | tmo = make_emacs_time (tmo_in_millisec / 1000, | 86 | tmo = make_emacs_time (tmo_in_millisec / 1000, |
| @@ -147,12 +142,3 @@ xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, | |||
| 147 | return retval; | 142 | return retval; |
| 148 | } | 143 | } |
| 149 | #endif /* USE_GTK || HAVE_GCONF || HAVE_GSETTINGS */ | 144 | #endif /* USE_GTK || HAVE_GCONF || HAVE_GSETTINGS */ |
| 150 | |||
| 151 | void | ||
| 152 | xgselect_initialize (void) | ||
| 153 | { | ||
| 154 | #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) | ||
| 155 | gfds_size = 128; | ||
| 156 | gfds = xmalloc (gfds_size * sizeof *gfds); | ||
| 157 | #endif | ||
| 158 | } | ||
diff --git a/src/xgselect.h b/src/xgselect.h index 8e5614ea972..5509e23c5c0 100644 --- a/src/xgselect.h +++ b/src/xgselect.h | |||
| @@ -31,6 +31,4 @@ extern int xg_select (int max_fds, | |||
| 31 | EMACS_TIME *timeout, | 31 | EMACS_TIME *timeout, |
| 32 | sigset_t *sigmask); | 32 | sigset_t *sigmask); |
| 33 | 33 | ||
| 34 | extern void xgselect_initialize (void); | ||
| 35 | |||
| 36 | #endif /* XGSELECT_H */ | 34 | #endif /* XGSELECT_H */ |
diff --git a/src/xsmfns.c b/src/xsmfns.c index 1f6eb84260e..cddbb2aae86 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -97,7 +97,7 @@ ice_connection_closed (void) | |||
| 97 | open to a session manager, just return. */ | 97 | open to a session manager, just return. */ |
| 98 | 98 | ||
| 99 | static void | 99 | static void |
| 100 | x_session_check_input (int fd, void *data, int for_read) | 100 | x_session_check_input (int fd, void *data) |
| 101 | { | 101 | { |
| 102 | int ret; | 102 | int ret; |
| 103 | 103 | ||
diff --git a/src/xterm.c b/src/xterm.c index 118c8767c23..f497b5322bf 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -165,13 +165,6 @@ struct x_display_info *x_display_list; | |||
| 165 | 165 | ||
| 166 | Lisp_Object x_display_name_list; | 166 | Lisp_Object x_display_name_list; |
| 167 | 167 | ||
| 168 | /* Frame being updated by update_frame. This is declared in term.c. | ||
| 169 | This is set by update_begin and looked at by all the XT functions. | ||
| 170 | It is zero while not inside an update. In that case, the XT | ||
| 171 | functions assume that `selected_frame' is the frame to apply to. */ | ||
| 172 | |||
| 173 | extern struct frame *updating_frame; | ||
| 174 | |||
| 175 | /* This is a frame waiting to be auto-raised, within XTread_socket. */ | 168 | /* This is a frame waiting to be auto-raised, within XTread_socket. */ |
| 176 | 169 | ||
| 177 | static struct frame *pending_autoraise_frame; | 170 | static struct frame *pending_autoraise_frame; |
| @@ -7850,7 +7843,7 @@ x_connection_closed (Display *dpy, const char *error_message) | |||
| 7850 | (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, | 7843 | (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, |
| 7851 | the resulting Glib error message loop filled a user's disk. | 7844 | the resulting Glib error message loop filled a user's disk. |
| 7852 | To avoid this, kill Emacs unconditionally on disconnect. */ | 7845 | To avoid this, kill Emacs unconditionally on disconnect. */ |
| 7853 | shut_down_emacs (0, 0, Qnil); | 7846 | shut_down_emacs (0, Qnil); |
| 7854 | fprintf (stderr, "%s\n\ | 7847 | fprintf (stderr, "%s\n\ |
| 7855 | When compiled with GTK, Emacs cannot recover from X disconnects.\n\ | 7848 | When compiled with GTK, Emacs cannot recover from X disconnects.\n\ |
| 7856 | This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ | 7849 | This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ |
| @@ -10609,8 +10602,6 @@ x_activate_timeout_atimer (void) | |||
| 10609 | 10602 | ||
| 10610 | /* Set up use of X before we make the first connection. */ | 10603 | /* Set up use of X before we make the first connection. */ |
| 10611 | 10604 | ||
| 10612 | extern frame_parm_handler x_frame_parm_handlers[]; | ||
| 10613 | |||
| 10614 | static struct redisplay_interface x_redisplay_interface = | 10605 | static struct redisplay_interface x_redisplay_interface = |
| 10615 | { | 10606 | { |
| 10616 | x_frame_parm_handlers, | 10607 | x_frame_parm_handlers, |
| @@ -10815,8 +10806,6 @@ x_initialize (void) | |||
| 10815 | XSetIOErrorHandler (x_io_error_quitter); | 10806 | XSetIOErrorHandler (x_io_error_quitter); |
| 10816 | 10807 | ||
| 10817 | signal (SIGPIPE, x_connection_signal); | 10808 | signal (SIGPIPE, x_connection_signal); |
| 10818 | |||
| 10819 | xgselect_initialize (); | ||
| 10820 | } | 10809 | } |
| 10821 | 10810 | ||
| 10822 | 10811 | ||
diff --git a/src/xterm.h b/src/xterm.h index 86a76fd81a9..2d718f49118 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -16,6 +16,9 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | 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 | #ifndef XTERM_H | ||
| 20 | #define XTERM_H | ||
| 21 | |||
| 19 | #include <X11/Xlib.h> | 22 | #include <X11/Xlib.h> |
| 20 | #include <X11/cursorfont.h> | 23 | #include <X11/cursorfont.h> |
| 21 | 24 | ||
| @@ -367,13 +370,14 @@ extern int use_xim; | |||
| 367 | extern void check_x (void); | 370 | extern void check_x (void); |
| 368 | 371 | ||
| 369 | extern struct frame *x_window_to_frame (struct x_display_info *, int); | 372 | extern struct frame *x_window_to_frame (struct x_display_info *, int); |
| 370 | |||
| 371 | extern struct frame *x_any_window_to_frame (struct x_display_info *, int); | 373 | extern struct frame *x_any_window_to_frame (struct x_display_info *, int); |
| 372 | extern struct frame *x_menubar_window_to_frame (struct x_display_info *, | 374 | extern struct frame *x_menubar_window_to_frame (struct x_display_info *, |
| 373 | XEvent *); | 375 | XEvent *); |
| 374 | |||
| 375 | extern struct frame *x_top_window_to_frame (struct x_display_info *, int); | 376 | extern struct frame *x_top_window_to_frame (struct x_display_info *, int); |
| 376 | 377 | ||
| 378 | extern struct frame *x_menubar_window_to_frame (struct x_display_info *, | ||
| 379 | XEvent *); | ||
| 380 | |||
| 377 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) | 381 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) |
| 378 | #define x_any_window_to_frame x_window_to_frame | 382 | #define x_any_window_to_frame x_window_to_frame |
| 379 | #define x_top_window_to_frame x_window_to_frame | 383 | #define x_top_window_to_frame x_window_to_frame |
| @@ -389,7 +393,6 @@ extern struct x_display_info *x_display_list; | |||
| 389 | extern Lisp_Object x_display_name_list; | 393 | extern Lisp_Object x_display_name_list; |
| 390 | 394 | ||
| 391 | extern struct x_display_info *x_display_info_for_display (Display *); | 395 | extern struct x_display_info *x_display_info_for_display (Display *); |
| 392 | extern void x_set_frame_alpha (struct frame *); | ||
| 393 | 396 | ||
| 394 | extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); | 397 | extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); |
| 395 | extern int x_display_ok (const char *); | 398 | extern int x_display_ok (const char *); |
| @@ -544,9 +547,6 @@ struct x_output | |||
| 544 | /* Non-zero means hourglass cursor is currently displayed. */ | 547 | /* Non-zero means hourglass cursor is currently displayed. */ |
| 545 | unsigned hourglass_p : 1; | 548 | unsigned hourglass_p : 1; |
| 546 | 549 | ||
| 547 | /* Flag to set when the X window needs to be completely repainted. */ | ||
| 548 | int needs_exposure; | ||
| 549 | |||
| 550 | /* These are the current window manager hints. It seems that | 550 | /* These are the current window manager hints. It seems that |
| 551 | XSetWMHints, when presented with an unset bit in the `flags' | 551 | XSetWMHints, when presented with an unset bit in the `flags' |
| 552 | member of the hints structure, does not leave the corresponding | 552 | member of the hints structure, does not leave the corresponding |
| @@ -944,7 +944,6 @@ XrmDatabase x_load_resources (Display *, const char *, const char *, | |||
| 944 | /* Defined in xterm.c */ | 944 | /* Defined in xterm.c */ |
| 945 | 945 | ||
| 946 | extern int x_text_icon (struct frame *, const char *); | 946 | extern int x_text_icon (struct frame *, const char *); |
| 947 | extern int x_bitmap_icon (struct frame *, Lisp_Object); | ||
| 948 | extern void x_catch_errors (Display *); | 947 | extern void x_catch_errors (Display *); |
| 949 | extern void x_check_errors (Display *, const char *) | 948 | extern void x_check_errors (Display *, const char *) |
| 950 | ATTRIBUTE_FORMAT_PRINTF (2, 0); | 949 | ATTRIBUTE_FORMAT_PRINTF (2, 0); |
| @@ -956,11 +955,6 @@ extern void x_set_mouse_position (struct frame *, int, int); | |||
| 956 | extern void x_set_mouse_pixel_position (struct frame *, int, int); | 955 | extern void x_set_mouse_pixel_position (struct frame *, int, int); |
| 957 | extern void xembed_request_focus (struct frame *); | 956 | extern void xembed_request_focus (struct frame *); |
| 958 | extern void x_ewmh_activate_frame (struct frame *); | 957 | extern void x_ewmh_activate_frame (struct frame *); |
| 959 | extern void x_make_frame_visible (struct frame *); | ||
| 960 | extern void x_make_frame_invisible (struct frame *); | ||
| 961 | extern void x_iconify_frame (struct frame *); | ||
| 962 | extern void x_free_frame_resources (struct frame *); | ||
| 963 | extern void x_wm_set_size_hint (struct frame *, long, int); | ||
| 964 | extern void x_delete_terminal (struct terminal *terminal); | 958 | extern void x_delete_terminal (struct terminal *terminal); |
| 965 | extern unsigned long x_copy_color (struct frame *, unsigned long); | 959 | extern unsigned long x_copy_color (struct frame *, unsigned long); |
| 966 | #ifdef USE_X_TOOLKIT | 960 | #ifdef USE_X_TOOLKIT |
| @@ -973,7 +967,6 @@ extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, | |||
| 973 | double, int); | 967 | double, int); |
| 974 | #endif | 968 | #endif |
| 975 | extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); | 969 | extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); |
| 976 | extern void x_query_colors (struct frame *f, XColor *, int); | ||
| 977 | extern void x_query_color (struct frame *f, XColor *); | 970 | extern void x_query_color (struct frame *f, XColor *); |
| 978 | extern void x_clear_area (Display *, Window, int, int, int, int, int); | 971 | extern void x_clear_area (Display *, Window, int, int, int, int, int); |
| 979 | #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK | 972 | #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK |
| @@ -1032,8 +1025,6 @@ extern int xg_set_icon (struct frame *, Lisp_Object); | |||
| 1032 | extern int xg_set_icon_from_xpm_data (struct frame *, const char**); | 1025 | extern int xg_set_icon_from_xpm_data (struct frame *, const char**); |
| 1033 | #endif /* USE_GTK */ | 1026 | #endif /* USE_GTK */ |
| 1034 | 1027 | ||
| 1035 | extern void x_real_positions (struct frame *, int *, int *); | ||
| 1036 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1037 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); | 1028 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); |
| 1038 | extern void xic_free_xfontset (struct frame *); | 1029 | extern void xic_free_xfontset (struct frame *); |
| 1039 | extern void create_frame_xic (struct frame *); | 1030 | extern void create_frame_xic (struct frame *); |
| @@ -1043,9 +1034,6 @@ extern void xic_set_statusarea (struct frame *); | |||
| 1043 | extern void xic_set_xfontset (struct frame *, const char *); | 1034 | extern void xic_set_xfontset (struct frame *, const char *); |
| 1044 | extern int x_pixel_width (struct frame *); | 1035 | extern int x_pixel_width (struct frame *); |
| 1045 | extern int x_pixel_height (struct frame *); | 1036 | extern int x_pixel_height (struct frame *); |
| 1046 | extern int x_char_width (struct frame *); | ||
| 1047 | extern int x_char_height (struct frame *); | ||
| 1048 | extern void x_sync (struct frame *); | ||
| 1049 | extern int x_defined_color (struct frame *, const char *, XColor *, int); | 1037 | extern int x_defined_color (struct frame *, const char *, XColor *, int); |
| 1050 | #ifdef HAVE_X_I18N | 1038 | #ifdef HAVE_X_I18N |
| 1051 | extern void free_frame_xic (struct frame *); | 1039 | extern void free_frame_xic (struct frame *); |
| @@ -1053,7 +1041,6 @@ extern void free_frame_xic (struct frame *); | |||
| 1053 | extern char * xic_create_fontsetname (const char *base_fontname, int motif); | 1041 | extern char * xic_create_fontsetname (const char *base_fontname, int motif); |
| 1054 | # endif | 1042 | # endif |
| 1055 | #endif | 1043 | #endif |
| 1056 | extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1057 | 1044 | ||
| 1058 | /* Defined in xfaces.c */ | 1045 | /* Defined in xfaces.c */ |
| 1059 | 1046 | ||
| @@ -1070,10 +1057,8 @@ extern void x_menu_set_in_use (int); | |||
| 1070 | #ifdef USE_MOTIF | 1057 | #ifdef USE_MOTIF |
| 1071 | extern void x_menu_wait_for_event (void *data); | 1058 | extern void x_menu_wait_for_event (void *data); |
| 1072 | #endif | 1059 | #endif |
| 1073 | extern void x_activate_menubar (struct frame *); | ||
| 1074 | extern int popup_activated (void); | 1060 | extern int popup_activated (void); |
| 1075 | extern void initialize_frame_menubar (struct frame *); | 1061 | extern void initialize_frame_menubar (struct frame *); |
| 1076 | extern void free_frame_menubar (struct frame *); | ||
| 1077 | 1062 | ||
| 1078 | /* Defined in widget.c */ | 1063 | /* Defined in widget.c */ |
| 1079 | 1064 | ||
| @@ -1115,3 +1100,5 @@ extern Lisp_Object Qx_gtk_map_stock; | |||
| 1115 | (nr).y = (ry), \ | 1100 | (nr).y = (ry), \ |
| 1116 | (nr).width = (rwidth), \ | 1101 | (nr).width = (rwidth), \ |
| 1117 | (nr).height = (rheight)) | 1102 | (nr).height = (rheight)) |
| 1103 | |||
| 1104 | #endif /* XTERM_H */ | ||
diff --git a/test/ChangeLog b/test/ChangeLog index c3183406ea2..f523f6f59a9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-28 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * automated/files.el: Test every combination of values for | ||
| 4 | enable-local-variables and enable-local-eval. | ||
| 5 | |||
| 1 | 2012-08-19 Chong Yidong <cyd@gnu.org> | 6 | 2012-08-19 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * redisplay-testsuite.el (test-redisplay): Use switch-to-buffer. | 8 | * redisplay-testsuite.el (test-redisplay): Use switch-to-buffer. |
diff --git a/test/automated/files.el b/test/automated/files.el index e43d8c32f85..b6011395bfd 100644 --- a/test/automated/files.el +++ b/test/automated/files.el | |||
| @@ -21,32 +21,129 @@ | |||
| 21 | 21 | ||
| 22 | (require 'ert) | 22 | (require 'ert) |
| 23 | 23 | ||
| 24 | (defvar files-test-var1 nil) | 24 | ;; Set to t if the local variable was set, `query' if the query was |
| 25 | ;; triggered. | ||
| 26 | (defvar files-test-result) | ||
| 27 | |||
| 28 | (defvar files-test-safe-result) | ||
| 29 | (put 'files-test-safe-result 'safe-local-variable 'booleanp) | ||
| 25 | 30 | ||
| 26 | (defun files-test-fun1 () | 31 | (defun files-test-fun1 () |
| 27 | (setq files-test-var1 t)) | 32 | (setq files-test-result t)) |
| 28 | 33 | ||
| 29 | (ert-deftest files-test-bug12155 () | 34 | ;; Test combinations: |
| 30 | "Test for http://debbugs.gnu.org/12155 ." | 35 | ;; `enable-local-variables' t, nil, :safe, :all, or something else. |
| 31 | (with-temp-buffer | 36 | ;; `enable-local-eval' t, nil, or something else. |
| 32 | (insert "text\n" | 37 | |
| 33 | ";; Local Variables:\n" | 38 | (defvar files-test-local-variable-data |
| 34 | ";; eval: (files-test-fun1)\n" | 39 | ;; Unsafe eval form |
| 35 | ";; End:\n") | 40 | '((("eval: (files-test-fun1)") |
| 36 | (let ((enable-local-variables :safe) | 41 | (t t (eq files-test-result t)) |
| 37 | (enable-local-eval 'maybe)) | 42 | (t nil (eq files-test-result nil)) |
| 38 | (hack-local-variables) | 43 | (t maybe (eq files-test-result 'query)) |
| 39 | (should (eq files-test-var1 nil))))) | 44 | (nil t (eq files-test-result nil)) |
| 45 | (nil nil (eq files-test-result nil)) | ||
| 46 | (nil maybe (eq files-test-result nil)) | ||
| 47 | (:safe t (eq files-test-result nil)) | ||
| 48 | (:safe nil (eq files-test-result nil)) | ||
| 49 | (:safe maybe (eq files-test-result nil)) | ||
| 50 | (:all t (eq files-test-result t)) | ||
| 51 | (:all nil (eq files-test-result nil)) | ||
| 52 | (:all maybe (eq files-test-result t)) ; This combination is ambiguous. | ||
| 53 | (maybe t (eq files-test-result 'query)) | ||
| 54 | (maybe nil (eq files-test-result 'query)) | ||
| 55 | (maybe maybe (eq files-test-result 'query))) | ||
| 56 | ;; Unsafe local variable value | ||
| 57 | (("files-test-result: t") | ||
| 58 | (t t (eq files-test-result 'query)) | ||
| 59 | (t nil (eq files-test-result 'query)) | ||
| 60 | (t maybe (eq files-test-result 'query)) | ||
| 61 | (nil t (eq files-test-result nil)) | ||
| 62 | (nil nil (eq files-test-result nil)) | ||
| 63 | (nil maybe (eq files-test-result nil)) | ||
| 64 | (:safe t (eq files-test-result nil)) | ||
| 65 | (:safe nil (eq files-test-result nil)) | ||
| 66 | (:safe maybe (eq files-test-result nil)) | ||
| 67 | (:all t (eq files-test-result t)) | ||
| 68 | (:all nil (eq files-test-result t)) | ||
| 69 | (:all maybe (eq files-test-result t)) | ||
| 70 | (maybe t (eq files-test-result 'query)) | ||
| 71 | (maybe nil (eq files-test-result 'query)) | ||
| 72 | (maybe maybe (eq files-test-result 'query))) | ||
| 73 | ;; Safe local variable | ||
| 74 | (("files-test-safe-result: t") | ||
| 75 | (t t (eq files-test-safe-result t)) | ||
| 76 | (t nil (eq files-test-safe-result t)) | ||
| 77 | (t maybe (eq files-test-safe-result t)) | ||
| 78 | (nil t (eq files-test-safe-result nil)) | ||
| 79 | (nil nil (eq files-test-safe-result nil)) | ||
| 80 | (nil maybe (eq files-test-safe-result nil)) | ||
| 81 | (:safe t (eq files-test-safe-result t)) | ||
| 82 | (:safe nil (eq files-test-safe-result t)) | ||
| 83 | (:safe maybe (eq files-test-safe-result t)) | ||
| 84 | (:all t (eq files-test-safe-result t)) | ||
| 85 | (:all nil (eq files-test-safe-result t)) | ||
| 86 | (:all maybe (eq files-test-safe-result t)) | ||
| 87 | (maybe t (eq files-test-result 'query)) | ||
| 88 | (maybe nil (eq files-test-result 'query)) | ||
| 89 | (maybe maybe (eq files-test-result 'query))) | ||
| 90 | ;; Safe local variable with unsafe value | ||
| 91 | (("files-test-safe-result: 1") | ||
| 92 | (t t (eq files-test-result 'query)) | ||
| 93 | (t nil (eq files-test-result 'query)) | ||
| 94 | (t maybe (eq files-test-result 'query)) | ||
| 95 | (nil t (eq files-test-safe-result nil)) | ||
| 96 | (nil nil (eq files-test-safe-result nil)) | ||
| 97 | (nil maybe (eq files-test-safe-result nil)) | ||
| 98 | (:safe t (eq files-test-safe-result nil)) | ||
| 99 | (:safe nil (eq files-test-safe-result nil)) | ||
| 100 | (:safe maybe (eq files-test-safe-result nil)) | ||
| 101 | (:all t (eq files-test-safe-result 1)) | ||
| 102 | (:all nil (eq files-test-safe-result 1)) | ||
| 103 | (:all maybe (eq files-test-safe-result 1)) | ||
| 104 | (maybe t (eq files-test-result 'query)) | ||
| 105 | (maybe nil (eq files-test-result 'query)) | ||
| 106 | (maybe maybe (eq files-test-result 'query)))) | ||
| 107 | "List of file-local variable tests. | ||
| 108 | Each list element should have the form | ||
| 109 | |||
| 110 | (LOCAL-VARS-LIST . TEST-LIST) | ||
| 40 | 111 | ||
| 41 | (ert-deftest files-test-disable-local-variables () | 112 | where LOCAL-VARS-LISTS should be a list of local variable |
| 42 | "Test that setting enable-local-variables to nil works." | 113 | definitions (strings) and TEST-LIST is a list of tests to |
| 114 | perform. Each entry of TEST-LIST should have the form | ||
| 115 | |||
| 116 | (ENABLE-LOCAL-VARIABLES ENABLE-LOCAL-EVAL FORM) | ||
| 117 | |||
| 118 | where ENABLE-LOCAL-VARIABLES is the value to assign to | ||
| 119 | `enable-local-variables', ENABLE-LOCAL-EVAL is the value to | ||
| 120 | assign to `enable-local-eval', and FORM is a desired `should' | ||
| 121 | form.") | ||
| 122 | |||
| 123 | (defun file-test--do-local-variables-test (str test-settings) | ||
| 43 | (with-temp-buffer | 124 | (with-temp-buffer |
| 44 | (insert "text\n" | 125 | (insert str) |
| 45 | ";; Local Variables:\n" | 126 | (let ((enable-local-variables (nth 0 test-settings)) |
| 46 | ";; files-test-var1: t\n" | 127 | (enable-local-eval (nth 1 test-settings)) |
| 47 | ";; End:\n") | 128 | (files-test-result nil) |
| 48 | (let ((enable-local-variables nil)) | 129 | (files-test-queried nil) |
| 130 | (files-test-safe-result nil)) | ||
| 49 | (hack-local-variables) | 131 | (hack-local-variables) |
| 50 | (should (eq files-test-var1 nil))))) | 132 | (eval (nth 2 test-settings))))) |
| 133 | |||
| 134 | (ert-deftest files-test-local-variables () | ||
| 135 | "Test the file-local variables implementation." | ||
| 136 | (unwind-protect | ||
| 137 | (progn | ||
| 138 | (defadvice hack-local-variables-confirm (around files-test activate) | ||
| 139 | (setq files-test-result 'query) | ||
| 140 | nil) | ||
| 141 | (dolist (test files-test-local-variable-data) | ||
| 142 | (let ((str (concat "text\n\n;; Local Variables:\n;; " | ||
| 143 | (mapconcat 'identity (car test) "\n;; ") | ||
| 144 | "\n;; End:\n"))) | ||
| 145 | (dolist (subtest (cdr test)) | ||
| 146 | (should (file-test--do-local-variables-test str subtest)))))) | ||
| 147 | (ad-disable-advice 'hack-local-variables-confirm 'around 'files-test))) | ||
| 51 | 148 | ||
| 52 | ;;; files.el ends here | 149 | ;;; files.el ends here |