aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-06-28 16:57:57 -0400
committerChong Yidong2011-06-28 16:57:57 -0400
commitada35ec18a3429c0389fe1b77d7ae82b8a5715d6 (patch)
tree4405c0735657c3adbd2296fd53a3d1aaafda16dd
parentb380a76ffbf54594dfd6fc3d932983ac0439d07f (diff)
parent1176868d0a466ae5374d1c47de70f1fc22ef7cd6 (diff)
downloademacs-ada35ec18a3429c0389fe1b77d7ae82b8a5715d6.tar.gz
emacs-ada35ec18a3429c0389fe1b77d7ae82b8a5715d6.zip
merge from upstream
-rw-r--r--ChangeLog4
-rw-r--r--autogen/Makefile.in33
-rw-r--r--autogen/aclocal.m41
-rwxr-xr-xautogen/configure472
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/fortran-xtra.texi4
-rw-r--r--doc/misc/ChangeLog11
-rw-r--r--doc/misc/gnus.texi7
-rw-r--r--doc/misc/rcirc.texi8
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/ChangeLog309
-rw-r--r--lisp/allout-widgets.el35
-rw-r--r--lisp/battery.el28
-rw-r--r--lisp/bs.el7
-rw-r--r--lisp/calendar/diary-lib.el106
-rw-r--r--lisp/emacs-lisp/lisp-mode.el80
-rw-r--r--lisp/emacs-lisp/smie.el4
-rw-r--r--lisp/eshell/em-ls.el9
-rw-r--r--lisp/faces.el2
-rw-r--r--lisp/gnus/ChangeLog34
-rw-r--r--lisp/gnus/auth-source.el4
-rw-r--r--lisp/gnus/gnus-art.el7
-rw-r--r--lisp/gnus/gnus-msg.el11
-rw-r--r--lisp/gnus/gnus-registry.el3
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/shr.el8
-rw-r--r--lisp/gnus/spam-stat.el9
-rw-r--r--lisp/gnus/spam.el69
-rw-r--r--lisp/help-fns.el18
-rw-r--r--lisp/hl-line.el24
-rw-r--r--lisp/mail/emacsbug.el53
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/rmailmm.el17
-rw-r--r--lisp/mail/smtpmail.el8
-rw-r--r--lisp/net/ange-ftp.el8
-rw-r--r--lisp/net/network-stream.el61
-rw-r--r--lisp/progmodes/cperl-mode.el7
-rw-r--r--lisp/progmodes/f90.el111
-rw-r--r--lisp/progmodes/flymake.el4
-rw-r--r--lisp/register.el48
-rw-r--r--lisp/ses.el1057
-rw-r--r--lisp/tar-mode.el3
-rw-r--r--lisp/textmodes/css-mode.el4
-rw-r--r--lisp/vc/vc.el69
-rw-r--r--lisp/window.el344
-rw-r--r--lwlib/ChangeLog5
-rw-r--r--lwlib/Makefile.in2
-rw-r--r--src/ChangeLog66
-rw-r--r--src/bidi.c4
-rw-r--r--src/buffer.c23
-rw-r--r--src/emacsgtkfixed.c101
-rw-r--r--src/emacsgtkfixed.h8
-rw-r--r--src/gnutls.c1
-rw-r--r--src/gtkutil.c16
-rw-r--r--src/makefile.w32-in1679
-rw-r--r--src/process.c12
-rw-r--r--src/window.c114
57 files changed, 3085 insertions, 2061 deletions
diff --git a/ChangeLog b/ChangeLog
index 4bf89e35776..3fb10e14974 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12011-06-27 Bill Wohler <wohler@newt.com>
2
3 * .bzrignore: Add lisp/mh-e/mh-autoloads.el and lisp/mh-e/mh-cus-load.el.
4
12011-06-25 Paul Eggert <eggert@cs.ucla.edu> 52011-06-25 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Use gnulib's dup2 module instead of rolling our own. 7 Use gnulib's dup2 module instead of rolling our own.
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index 41763bc9ba3..d3151304c5f 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -24,7 +24,7 @@
24# the same distribution terms as the rest of that program. 24# the same distribution terms as the rest of that program.
25# 25#
26# Generated by gnulib-tool. 26# Generated by gnulib-tool.
27# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat 27# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
28 28
29VPATH = @srcdir@ 29VPATH = @srcdir@
30pkgdatadir = $(datadir)/@PACKAGE@ 30pkgdatadir = $(datadir)/@PACKAGE@
@@ -52,9 +52,10 @@ subdir = lib
52ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 52ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
53am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ 53am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
54 $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \ 54 $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \
55 $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/filemode.m4 \ 55 $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/extensions.m4 \
56 $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \ 56 $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \
57 $(top_srcdir)/m4/gl-comp.m4 $(top_srcdir)/m4/gnulib-common.m4 \ 57 $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \
58 $(top_srcdir)/m4/gnulib-common.m4 \
58 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ 59 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \
59 $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ 60 $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
60 $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ 61 $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \
@@ -738,14 +739,14 @@ BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(GETOPT_H) \
738 stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h 739 stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h
739EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \ 740EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \
740 $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \ 741 $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \
741 sha512.h dosname.h ftoastr.c ftoastr.h filemode.h getloadavg.c \ 742 sha512.h dosname.h ftoastr.c ftoastr.h dup2.c filemode.h \
742 getopt.c getopt.in.h getopt1.c getopt_int.h ignore-value.h \ 743 getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \
743 intprops.h inttypes.in.h lstat.c mktime-internal.h mktime.c \ 744 ignore-value.h intprops.h inttypes.in.h lstat.c \
744 readlink.c stat.c stdarg.in.h stdbool.in.h stddef.in.h \ 745 mktime-internal.h mktime.c readlink.c stat.c stdarg.in.h \
745 stdint.in.h stdio.in.h stdlib.in.h strftime.h strtol.c \ 746 stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
746 strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ 747 strftime.h strtol.c strtoul.c strtoull.c strtoimax.c \
747 sys_stat.in.h time.in.h time_r.c u64.h unistd.in.h verify.h \ 748 strtoumax.c symlink.c sys_stat.in.h time.in.h time_r.c u64.h \
748 $(top_srcdir)/./warn-on-use.h 749 unistd.in.h verify.h $(top_srcdir)/./warn-on-use.h
749MOSTLYCLEANDIRS = sys 750MOSTLYCLEANDIRS = sys
750MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ 751MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
751 arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \ 752 arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \
@@ -759,9 +760,10 @@ libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \
759 sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c 760 sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c
760libgnu_a_LIBADD = $(gl_LIBOBJS) 761libgnu_a_LIBADD = $(gl_LIBOBJS)
761libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) 762libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
762EXTRA_libgnu_a_SOURCES = ftoastr.c getloadavg.c getopt.c getopt1.c \ 763EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \
763 lstat.c mktime.c readlink.c stat.c strtol.c strtoul.c \ 764 getopt1.c lstat.c mktime.c readlink.c stat.c strtol.c \
764 strtoull.c strtoimax.c strtoumax.c symlink.c time_r.c 765 strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \
766 time_r.c
765ARG_NONNULL_H = arg-nonnull.h 767ARG_NONNULL_H = arg-nonnull.h
766CXXDEFS_H = c++defs.h 768CXXDEFS_H = c++defs.h
767WARN_ON_USE_H = warn-on-use.h 769WARN_ON_USE_H = warn-on-use.h
@@ -817,6 +819,7 @@ distclean-compile:
817@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@ 819@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@
818@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Po@am__quote@ 820@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Po@am__quote@
819@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ 821@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@
822@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@
820@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ 823@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@
821@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ 824@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@
822@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ 825@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4
index 08bef24413f..8c0a25eba14 100644
--- a/autogen/aclocal.m4
+++ b/autogen/aclocal.m4
@@ -987,6 +987,7 @@ AC_SUBST([am__untar])
987m4_include([m4/00gnulib.m4]) 987m4_include([m4/00gnulib.m4])
988m4_include([m4/alloca.m4]) 988m4_include([m4/alloca.m4])
989m4_include([m4/c-strtod.m4]) 989m4_include([m4/c-strtod.m4])
990m4_include([m4/dup2.m4])
990m4_include([m4/extensions.m4]) 991m4_include([m4/extensions.m4])
991m4_include([m4/filemode.m4]) 992m4_include([m4/filemode.m4])
992m4_include([m4/getloadavg.m4]) 993m4_include([m4/getloadavg.m4])
diff --git a/autogen/configure b/autogen/configure
index 06e293b170b..cf8fada0a36 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -894,6 +894,72 @@ PRAGMA_COLUMNS
894PRAGMA_SYSTEM_HEADER 894PRAGMA_SYSTEM_HEADER
895INCLUDE_NEXT_AS_FIRST_DIRECTIVE 895INCLUDE_NEXT_AS_FIRST_DIRECTIVE
896INCLUDE_NEXT 896INCLUDE_NEXT
897GETLOADAVG_LIBS
898REPLACE_WCTOMB
899REPLACE_UNSETENV
900REPLACE_STRTOD
901REPLACE_SETENV
902REPLACE_REALPATH
903REPLACE_REALLOC
904REPLACE_PUTENV
905REPLACE_MKSTEMP
906REPLACE_MBTOWC
907REPLACE_MALLOC
908REPLACE_CANONICALIZE_FILE_NAME
909REPLACE_CALLOC
910HAVE_DECL_UNSETENV
911HAVE_UNLOCKPT
912HAVE_SYS_LOADAVG_H
913HAVE_STRUCT_RANDOM_DATA
914HAVE_STRTOULL
915HAVE_STRTOLL
916HAVE_STRTOD
917HAVE_DECL_SETENV
918HAVE_SETENV
919HAVE_RPMATCH
920HAVE_REALPATH
921HAVE_RANDOM_R
922HAVE_RANDOM_H
923HAVE_PTSNAME
924HAVE_MKSTEMPS
925HAVE_MKSTEMP
926HAVE_MKOSTEMPS
927HAVE_MKOSTEMP
928HAVE_MKDTEMP
929HAVE_GRANTPT
930HAVE_GETSUBOPT
931HAVE_DECL_GETLOADAVG
932HAVE_CANONICALIZE_FILE_NAME
933HAVE_ATOLL
934HAVE__EXIT
935GNULIB_WCTOMB
936GNULIB_UNSETENV
937GNULIB_UNLOCKPT
938GNULIB_SYSTEM_POSIX
939GNULIB_STRTOULL
940GNULIB_STRTOLL
941GNULIB_STRTOD
942GNULIB_SETENV
943GNULIB_RPMATCH
944GNULIB_REALPATH
945GNULIB_REALLOC_POSIX
946GNULIB_RANDOM_R
947GNULIB_PUTENV
948GNULIB_PTSNAME
949GNULIB_MKSTEMPS
950GNULIB_MKSTEMP
951GNULIB_MKOSTEMPS
952GNULIB_MKOSTEMP
953GNULIB_MKDTEMP
954GNULIB_MBTOWC
955GNULIB_MALLOC_POSIX
956GNULIB_GRANTPT
957GNULIB_GETSUBOPT
958GNULIB_GETLOADAVG
959GNULIB_CANONICALIZE_FILE_NAME
960GNULIB_CALLOC_POSIX
961GNULIB_ATOLL
962GNULIB__EXIT
897UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS 963UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
898UNISTD_H_HAVE_WINSOCK2_H 964UNISTD_H_HAVE_WINSOCK2_H
899REPLACE_WRITE 965REPLACE_WRITE
@@ -1004,72 +1070,6 @@ GNULIB_DUP3
1004GNULIB_DUP2 1070GNULIB_DUP2
1005GNULIB_CLOSE 1071GNULIB_CLOSE
1006GNULIB_CHOWN 1072GNULIB_CHOWN
1007GETLOADAVG_LIBS
1008REPLACE_WCTOMB
1009REPLACE_UNSETENV
1010REPLACE_STRTOD
1011REPLACE_SETENV
1012REPLACE_REALPATH
1013REPLACE_REALLOC
1014REPLACE_PUTENV
1015REPLACE_MKSTEMP
1016REPLACE_MBTOWC
1017REPLACE_MALLOC
1018REPLACE_CANONICALIZE_FILE_NAME
1019REPLACE_CALLOC
1020HAVE_DECL_UNSETENV
1021HAVE_UNLOCKPT
1022HAVE_SYS_LOADAVG_H
1023HAVE_STRUCT_RANDOM_DATA
1024HAVE_STRTOULL
1025HAVE_STRTOLL
1026HAVE_STRTOD
1027HAVE_DECL_SETENV
1028HAVE_SETENV
1029HAVE_RPMATCH
1030HAVE_REALPATH
1031HAVE_RANDOM_R
1032HAVE_RANDOM_H
1033HAVE_PTSNAME
1034HAVE_MKSTEMPS
1035HAVE_MKSTEMP
1036HAVE_MKOSTEMPS
1037HAVE_MKOSTEMP
1038HAVE_MKDTEMP
1039HAVE_GRANTPT
1040HAVE_GETSUBOPT
1041HAVE_DECL_GETLOADAVG
1042HAVE_CANONICALIZE_FILE_NAME
1043HAVE_ATOLL
1044HAVE__EXIT
1045GNULIB_WCTOMB
1046GNULIB_UNSETENV
1047GNULIB_UNLOCKPT
1048GNULIB_SYSTEM_POSIX
1049GNULIB_STRTOULL
1050GNULIB_STRTOLL
1051GNULIB_STRTOD
1052GNULIB_SETENV
1053GNULIB_RPMATCH
1054GNULIB_REALPATH
1055GNULIB_REALLOC_POSIX
1056GNULIB_RANDOM_R
1057GNULIB_PUTENV
1058GNULIB_PTSNAME
1059GNULIB_MKSTEMPS
1060GNULIB_MKSTEMP
1061GNULIB_MKOSTEMPS
1062GNULIB_MKOSTEMP
1063GNULIB_MKDTEMP
1064GNULIB_MBTOWC
1065GNULIB_MALLOC_POSIX
1066GNULIB_GRANTPT
1067GNULIB_GETSUBOPT
1068GNULIB_GETLOADAVG
1069GNULIB_CANONICALIZE_FILE_NAME
1070GNULIB_CALLOC_POSIX
1071GNULIB_ATOLL
1072GNULIB__EXIT
1073GL_GENERATE_ALLOCA_H_FALSE 1073GL_GENERATE_ALLOCA_H_FALSE
1074GL_GENERATE_ALLOCA_H_TRUE 1074GL_GENERATE_ALLOCA_H_TRUE
1075ALLOCA_H 1075ALLOCA_H
@@ -3083,6 +3083,7 @@ as_fn_append ac_header_list " stdlib.h"
3083as_fn_append ac_header_list " unistd.h" 3083as_fn_append ac_header_list " unistd.h"
3084as_fn_append ac_header_list " sys/param.h" 3084as_fn_append ac_header_list " sys/param.h"
3085as_fn_append ac_func_list " readlinkat" 3085as_fn_append ac_func_list " readlinkat"
3086as_fn_append ac_func_list " dup2"
3086gl_getopt_required=GNU 3087gl_getopt_required=GNU
3087as_fn_append ac_header_list " getopt.h" 3088as_fn_append ac_header_list " getopt.h"
3088as_fn_append ac_header_list " wchar.h" 3089as_fn_append ac_header_list " wchar.h"
@@ -6549,6 +6550,7 @@ esac
6549 # Code from module crypto/sha512: 6550 # Code from module crypto/sha512:
6550 # Code from module dosname: 6551 # Code from module dosname:
6551 # Code from module dtoastr: 6552 # Code from module dtoastr:
6553 # Code from module dup2:
6552 # Code from module extensions: 6554 # Code from module extensions:
6553 6555
6554 # Code from module filemode: 6556 # Code from module filemode:
@@ -13586,7 +13588,7 @@ esac
13586 13588
13587 13589
13588 13590
13589for ac_func in gethostname getdomainname dup2 \ 13591for ac_func in gethostname getdomainname \
13590rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ 13592rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
13591random lrand48 logb frexp fmod rint cbrt ftime setsid \ 13593random lrand48 logb frexp fmod rint cbrt ftime setsid \
13592strerror fpathconf select euidaccess getpagesize tzset setlocale \ 13594strerror fpathconf select euidaccess getpagesize tzset setlocale \
@@ -14292,119 +14294,6 @@ $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
14292 14294
14293 fi 14295 fi
14294 14296
14295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
14296$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
14297if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
14298 $as_echo_n "(cached) " >&6
14299else
14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301/* end confdefs.h. */
14302
14303#include <sys/types.h>
14304#include <sys/stat.h>
14305int
14306main ()
14307{
14308struct stat s; s.st_dm_mode;
14309 ;
14310 return 0;
14311}
14312_ACEOF
14313if ac_fn_c_try_compile "$LINENO"; then :
14314 ac_cv_struct_st_dm_mode=yes
14315else
14316 ac_cv_struct_st_dm_mode=no
14317fi
14318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14319fi
14320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
14321$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
14322
14323 if test $ac_cv_struct_st_dm_mode = yes; then
14324
14325$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
14326
14327 fi
14328
14329
14330ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
14331if test "x$ac_cv_have_decl_strmode" = x""yes; then :
14332 ac_have_decl=1
14333else
14334 ac_have_decl=0
14335fi
14336
14337cat >>confdefs.h <<_ACEOF
14338#define HAVE_DECL_STRMODE $ac_have_decl
14339_ACEOF
14340
14341
14342 GNULIB__EXIT=0;
14343 GNULIB_ATOLL=0;
14344 GNULIB_CALLOC_POSIX=0;
14345 GNULIB_CANONICALIZE_FILE_NAME=0;
14346 GNULIB_GETLOADAVG=0;
14347 GNULIB_GETSUBOPT=0;
14348 GNULIB_GRANTPT=0;
14349 GNULIB_MALLOC_POSIX=0;
14350 GNULIB_MBTOWC=0;
14351 GNULIB_MKDTEMP=0;
14352 GNULIB_MKOSTEMP=0;
14353 GNULIB_MKOSTEMPS=0;
14354 GNULIB_MKSTEMP=0;
14355 GNULIB_MKSTEMPS=0;
14356 GNULIB_PTSNAME=0;
14357 GNULIB_PUTENV=0;
14358 GNULIB_RANDOM_R=0;
14359 GNULIB_REALLOC_POSIX=0;
14360 GNULIB_REALPATH=0;
14361 GNULIB_RPMATCH=0;
14362 GNULIB_SETENV=0;
14363 GNULIB_STRTOD=0;
14364 GNULIB_STRTOLL=0;
14365 GNULIB_STRTOULL=0;
14366 GNULIB_SYSTEM_POSIX=0;
14367 GNULIB_UNLOCKPT=0;
14368 GNULIB_UNSETENV=0;
14369 GNULIB_WCTOMB=0;
14370 HAVE__EXIT=1;
14371 HAVE_ATOLL=1;
14372 HAVE_CANONICALIZE_FILE_NAME=1;
14373 HAVE_DECL_GETLOADAVG=1;
14374 HAVE_GETSUBOPT=1;
14375 HAVE_GRANTPT=1;
14376 HAVE_MKDTEMP=1;
14377 HAVE_MKOSTEMP=1;
14378 HAVE_MKOSTEMPS=1;
14379 HAVE_MKSTEMP=1;
14380 HAVE_MKSTEMPS=1;
14381 HAVE_PTSNAME=1;
14382 HAVE_RANDOM_H=1;
14383 HAVE_RANDOM_R=1;
14384 HAVE_REALPATH=1;
14385 HAVE_RPMATCH=1;
14386 HAVE_SETENV=1;
14387 HAVE_DECL_SETENV=1;
14388 HAVE_STRTOD=1;
14389 HAVE_STRTOLL=1;
14390 HAVE_STRTOULL=1;
14391 HAVE_STRUCT_RANDOM_DATA=1;
14392 HAVE_SYS_LOADAVG_H=0;
14393 HAVE_UNLOCKPT=1;
14394 HAVE_DECL_UNSETENV=1;
14395 REPLACE_CALLOC=0;
14396 REPLACE_CANONICALIZE_FILE_NAME=0;
14397 REPLACE_MALLOC=0;
14398 REPLACE_MBTOWC=0;
14399 REPLACE_MKSTEMP=0;
14400 REPLACE_PUTENV=0;
14401 REPLACE_REALLOC=0;
14402 REPLACE_REALPATH=0;
14403 REPLACE_SETENV=0;
14404 REPLACE_STRTOD=0;
14405 REPLACE_UNSETENV=0;
14406 REPLACE_WCTOMB=0;
14407
14408 14297
14409 GNULIB_CHOWN=0; 14298 GNULIB_CHOWN=0;
14410 GNULIB_CLOSE=0; 14299 GNULIB_CLOSE=0;
@@ -14520,6 +14409,121 @@ _ACEOF
14520 14409
14521 14410
14522 14411
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
14413$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
14414if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
14415 $as_echo_n "(cached) " >&6
14416else
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418/* end confdefs.h. */
14419
14420#include <sys/types.h>
14421#include <sys/stat.h>
14422int
14423main ()
14424{
14425struct stat s; s.st_dm_mode;
14426 ;
14427 return 0;
14428}
14429_ACEOF
14430if ac_fn_c_try_compile "$LINENO"; then :
14431 ac_cv_struct_st_dm_mode=yes
14432else
14433 ac_cv_struct_st_dm_mode=no
14434fi
14435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14436fi
14437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
14438$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
14439
14440 if test $ac_cv_struct_st_dm_mode = yes; then
14441
14442$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
14443
14444 fi
14445
14446
14447ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
14448if test "x$ac_cv_have_decl_strmode" = x""yes; then :
14449 ac_have_decl=1
14450else
14451 ac_have_decl=0
14452fi
14453
14454cat >>confdefs.h <<_ACEOF
14455#define HAVE_DECL_STRMODE $ac_have_decl
14456_ACEOF
14457
14458
14459 GNULIB__EXIT=0;
14460 GNULIB_ATOLL=0;
14461 GNULIB_CALLOC_POSIX=0;
14462 GNULIB_CANONICALIZE_FILE_NAME=0;
14463 GNULIB_GETLOADAVG=0;
14464 GNULIB_GETSUBOPT=0;
14465 GNULIB_GRANTPT=0;
14466 GNULIB_MALLOC_POSIX=0;
14467 GNULIB_MBTOWC=0;
14468 GNULIB_MKDTEMP=0;
14469 GNULIB_MKOSTEMP=0;
14470 GNULIB_MKOSTEMPS=0;
14471 GNULIB_MKSTEMP=0;
14472 GNULIB_MKSTEMPS=0;
14473 GNULIB_PTSNAME=0;
14474 GNULIB_PUTENV=0;
14475 GNULIB_RANDOM_R=0;
14476 GNULIB_REALLOC_POSIX=0;
14477 GNULIB_REALPATH=0;
14478 GNULIB_RPMATCH=0;
14479 GNULIB_SETENV=0;
14480 GNULIB_STRTOD=0;
14481 GNULIB_STRTOLL=0;
14482 GNULIB_STRTOULL=0;
14483 GNULIB_SYSTEM_POSIX=0;
14484 GNULIB_UNLOCKPT=0;
14485 GNULIB_UNSETENV=0;
14486 GNULIB_WCTOMB=0;
14487 HAVE__EXIT=1;
14488 HAVE_ATOLL=1;
14489 HAVE_CANONICALIZE_FILE_NAME=1;
14490 HAVE_DECL_GETLOADAVG=1;
14491 HAVE_GETSUBOPT=1;
14492 HAVE_GRANTPT=1;
14493 HAVE_MKDTEMP=1;
14494 HAVE_MKOSTEMP=1;
14495 HAVE_MKOSTEMPS=1;
14496 HAVE_MKSTEMP=1;
14497 HAVE_MKSTEMPS=1;
14498 HAVE_PTSNAME=1;
14499 HAVE_RANDOM_H=1;
14500 HAVE_RANDOM_R=1;
14501 HAVE_REALPATH=1;
14502 HAVE_RPMATCH=1;
14503 HAVE_SETENV=1;
14504 HAVE_DECL_SETENV=1;
14505 HAVE_STRTOD=1;
14506 HAVE_STRTOLL=1;
14507 HAVE_STRTOULL=1;
14508 HAVE_STRUCT_RANDOM_DATA=1;
14509 HAVE_SYS_LOADAVG_H=0;
14510 HAVE_UNLOCKPT=1;
14511 HAVE_DECL_UNSETENV=1;
14512 REPLACE_CALLOC=0;
14513 REPLACE_CANONICALIZE_FILE_NAME=0;
14514 REPLACE_MALLOC=0;
14515 REPLACE_MBTOWC=0;
14516 REPLACE_MKSTEMP=0;
14517 REPLACE_PUTENV=0;
14518 REPLACE_REALLOC=0;
14519 REPLACE_REALPATH=0;
14520 REPLACE_SETENV=0;
14521 REPLACE_STRTOD=0;
14522 REPLACE_UNSETENV=0;
14523 REPLACE_WCTOMB=0;
14524
14525
14526
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 14527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
14524$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } 14528$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
14525if test "${gl_cv_have_include_next+set}" = set; then : 14529if test "${gl_cv_have_include_next+set}" = set; then :
@@ -16760,6 +16764,114 @@ fi
16760 16764
16761 16765
16762 16766
16767$as_echo "#define HAVE_DUP2 1" >>confdefs.h
16768
16769
16770 if test $HAVE_DUP2 = 1; then
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
16772$as_echo_n "checking whether dup2 works... " >&6; }
16773if test "${gl_cv_func_dup2_works+set}" = set; then :
16774 $as_echo_n "(cached) " >&6
16775else
16776 if test "$cross_compiling" = yes; then :
16777 case "$host_os" in
16778 mingw*) # on this platform, dup2 always returns 0 for success
16779 gl_cv_func_dup2_works=no;;
16780 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
16781 gl_cv_func_dup2_works=no;;
16782 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
16783 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
16784 gl_cv_func_dup2_works=no;;
16785 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
16786 gl_cv_func_dup2_works=no;;
16787 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
16788 gl_cv_func_dup2_works=no;;
16789 *) gl_cv_func_dup2_works=yes;;
16790 esac
16791else
16792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793/* end confdefs.h. */
16794
16795 #include <unistd.h>
16796#include <fcntl.h>
16797#include <errno.h>
16798int
16799main ()
16800{
16801int result = 0;
16802#ifdef FD_CLOEXEC
16803 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
16804 result |= 1;
16805#endif
16806 if (dup2 (1, 1) == 0)
16807 result |= 2;
16808#ifdef FD_CLOEXEC
16809 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
16810 result |= 4;
16811#endif
16812 close (0);
16813 if (dup2 (0, 0) != -1)
16814 result |= 8;
16815 /* Many gnulib modules require POSIX conformance of EBADF. */
16816 if (dup2 (2, 1000000) == -1 && errno != EBADF)
16817 result |= 16;
16818 return result;
16819
16820 ;
16821 return 0;
16822}
16823
16824_ACEOF
16825if ac_fn_c_try_run "$LINENO"; then :
16826 gl_cv_func_dup2_works=yes
16827else
16828 gl_cv_func_dup2_works=no
16829fi
16830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16831 conftest.$ac_objext conftest.beam conftest.$ac_ext
16832fi
16833
16834
16835fi
16836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
16837$as_echo "$gl_cv_func_dup2_works" >&6; }
16838 if test "$gl_cv_func_dup2_works" = no; then
16839
16840
16841
16842 if test $ac_cv_func_dup2 = yes; then
16843 REPLACE_DUP2=1
16844 fi
16845
16846
16847
16848
16849
16850
16851
16852
16853 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
16854
16855
16856 fi
16857 fi
16858
16859
16860
16861
16862
16863
16864 GNULIB_DUP2=1
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16763 16875
16764# Persuade glibc <stdlib.h> to declare getloadavg(). 16876# Persuade glibc <stdlib.h> to declare getloadavg().
16765 16877
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index ab0abcd43d3..26cce9b2ac9 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12011-06-26 Glenn Morris <rgm@gnu.org>
2
3 * fortran-xtra.texi (Fortran): F90 mode is also for F2008.
4
12011-06-25 Andreas Rottmann <a.rottmann@gmx.at> 52011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
2 6
3 * misc.texi (emacsclient Options): Mention --frame-parameters. 7 * misc.texi (emacsclient Options): Mention --frame-parameters.
diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi
index 8f92df3f3ae..b7a4ef973ea 100644
--- a/doc/emacs/fortran-xtra.texi
+++ b/doc/emacs/fortran-xtra.texi
@@ -10,12 +10,12 @@
10@cindex mode, Fortran 10@cindex mode, Fortran
11 11
12@cindex Fortran fixed form and free form 12@cindex Fortran fixed form and free form
13@cindex Fortran 77 and Fortran 90, 95, 2003 13@cindex Fortran 77 and Fortran 90, 95, 2003, 2008
14@findex f90-mode 14@findex f90-mode
15@findex fortran-mode 15@findex fortran-mode
16 Fortran mode is meant for editing ``fixed form'' (and also ``tab 16 Fortran mode is meant for editing ``fixed form'' (and also ``tab
17format'') source code (normally Fortran 77). For editing more modern 17format'') source code (normally Fortran 77). For editing more modern
18``free form'' source code (Fortran 90, 95, 2003), use F90 mode 18``free form'' source code (Fortran 90, 95, 2003, 2008), use F90 mode
19(@code{f90-mode}). Emacs normally uses Fortran mode for files with 19(@code{f90-mode}). Emacs normally uses Fortran mode for files with
20extension @samp{.f}, @samp{.F} or @samp{.for}, and F90 mode for the 20extension @samp{.f}, @samp{.F} or @samp{.for}, and F90 mode for the
21extensions @samp{.f90} and @samp{.f95}. Customize 21extensions @samp{.f90} and @samp{.f95}. Customize
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 9181bb81e7a..2e0e28e9827 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,14 @@
12011-06-28 Deniz Dogan <deniz@dogan.se>
2
3 * rcirc.texi (Configuration): Bug-fix:
4 `rcirc-default-user-full-name' is now `rcirc-default-full-name'.
5 Reported by Elias Pipping <pipping@exherbo.org>.
6
72011-06-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
8
9 * gnus.texi (Summary Mail Commands): Document
10 `gnus-summary-reply-to-list-with-original'.
11
12011-06-20 Stefan Monnier <monnier@iro.umontreal.ca> 122011-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 13
3 * eshell.texi (Known problems): Fix typo. 14 * eshell.texi (Known problems): Fix typo.
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 82200780e19..f98d4df2bde 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -5568,6 +5568,13 @@ message (@code{gnus-summary-wide-reply-with-original}). This command uses
5568the process/prefix convention, but only uses the headers from the 5568the process/prefix convention, but only uses the headers from the
5569first article to determine the recipients. 5569first article to determine the recipients.
5570 5570
5571@item S L
5572@kindex S L (Summary)
5573@findex gnus-summary-reply-to-list-with-original
5574When replying to a message from a mailing list, send a reply to that
5575message to the mailing list, and include the original message
5576(@code{gnus-summary-reply-to-list-with-original}).
5577
5571@item S v 5578@item S v
5572@kindex S v (Summary) 5579@kindex S v (Summary)
5573@findex gnus-summary-very-wide-reply 5580@findex gnus-summary-very-wide-reply
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index c2b6867c419..3e9ee928822 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -509,8 +509,8 @@ This variable contains the default user name to report to the server.
509It defaults to the login name returned by @code{user-login-name}, just 509It defaults to the login name returned by @code{user-login-name}, just
510like @code{rcirc-default-nick}. 510like @code{rcirc-default-nick}.
511 511
512@item rcirc-default-user-full-name 512@item rcirc-default-full-name
513@vindex rcirc-default-user-full-name 513@vindex rcirc-default-full-name
514@cindex full name 514@cindex full name
515@cindex real name 515@cindex real name
516@cindex surname 516@cindex surname
@@ -519,7 +519,7 @@ to the name returned by @code{user-full-name}. If you want to hide
519your full name, you might want to set it to some pseudonym. 519your full name, you might want to set it to some pseudonym.
520 520
521@example 521@example
522(setq rcirc-default-user-full-name "Curious Minds Want To Know") 522(setq rcirc-default-full-name "Curious Minds Want To Know")
523@end example 523@end example
524 524
525@item rcirc-authinfo 525@item rcirc-authinfo
@@ -926,7 +926,7 @@ The real answer, therefore, is a @code{/reconnect} command:
926 (delete-process process) 926 (delete-process process)
927 (rcirc-connect server port nick 927 (rcirc-connect server port nick
928 rcirc-default-user-name 928 rcirc-default-user-name
929 rcirc-default-user-full-name 929 rcirc-default-full-name
930 channels)))) 930 channels))))
931@end smallexample 931@end smallexample
932 932
diff --git a/etc/NEWS b/etc/NEWS
index 32e4a0dc11f..f655c9da572 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -787,6 +787,9 @@ the user for specifics, e.g. a merge source.
787 787
788**** Currently supported for Bzr, Git, and Mercurial. 788**** Currently supported for Bzr, Git, and Mercurial.
789 789
790*** New option `vc-revert-show-diff' controls whether `vc-revert'
791shows a diff while querying the user. It defaults to t.
792
790*** Log entries in some Log View buffers can be toggled to display a 793*** Log entries in some Log View buffers can be toggled to display a
791longer description by typing RET (log-view-toggle-entry-display). 794longer description by typing RET (log-view-toggle-entry-display).
792In the Log View buffers made by `C-x v L' (vc-print-root-log), you can 795In the Log View buffers made by `C-x v L' (vc-print-root-log), you can
@@ -802,6 +805,9 @@ of a file similar to `vc-diff', but using ediff backend.
802 805
803** Miscellaneous 806** Miscellaneous
804 807
808+++
809*** f90.el has some support for Fortran 2008 syntax.
810
805--- 811---
806*** `copyright-fix-years' can optionally convert consecutive years to ranges. 812*** `copyright-fix-years' can optionally convert consecutive years to ranges.
807 813
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f9f47e6a52b..29ea8dca53c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,281 @@
12011-06-28 Chong Yidong <cyd@stupidchicken.com>
2
3 * mail/emacsbug.el (report-emacs-bug): Handle non-gnu bug
4 addresses more clearly. Add hyperlinks for bug-gnu-emacs and
5 debbugs.gnu.org. Mention acknowledgment email.
6
72011-06-28 Lars Magne Ingebrigtsen <larsi@gnus.org>
8
9 * mail/smtpmail.el (smtpmail-send-it): Leave off changing the
10 buffer multibyteness, since it shouldn't matter.
11
122011-06-28 Martin Rudalics <rudalics@gmx.at>
13
14 * window.el (display-buffer-in-side-window): Handle dedicated
15 windows as in display-buffer-reuse-window.
16 (display-buffer-normalize-alist): Use value of override
17 specifier.
18 (display-buffer-normalize-specifiers): Use value of
19 other-window-means-other-frame specifier.
20 (display-buffer-alist): Rewrite some texts in widgets.
21 (display-buffer): Spread arguments when calling function
22 specified by fun-with-args.
23
242011-06-28 Deniz Dogan <deniz@dogan.se>
25
26 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table): Unnest
27 `let'.
28
29 * textmodes/css-mode.el (css-font-lock-keywords): Fix grouped
30 selectors (Bug#5732).
31 (css-proprietary-nmstart-re): Use `regexp-opt'.
32
332011-06-27 Jari Aalto <jari.aalto@cante.net>
34
35 * eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440).
36 (eshell-ls-date-format): New defcustom.
37 (eshell-ls-file): Use it.
38
392011-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
40
41 * help-fns.el (describe-variable): Fix message for terminal-local vars.
42
432011-06-27 Katsumi Yamaoka <yamaoka@jpl.org>
44
45 * net/ange-ftp.el: Allow loading .gz files (Bug#6923).
46 (ange-ftp-make-tmp-name): New arg.
47 (ange-ftp-file-local-copy): Use it.
48
492011-06-27 Jambunathan K <kjambunathan@gmail.com>
50
51 * tar-mode.el (tar-untar-buffer): Set coding-system-for-write to
52 no-conversion (Bug#8870).
53
542011-06-27 Martin Rudalics <rudalics@gmx.at>
55
56 * window.el (window-right, window-left, window-child)
57 (window-child-count, window-last-child)
58 (window-iso-combination-p, walk-window-tree-1)
59 (window-atom-check-1, window-tree-1, delete-window)
60 (window-state-get-1, display-buffer-even-window-sizes): Adapt to
61 new naming conventions - window-vchild, window-hchild,
62 window-next and window-prev are now called window-top-child,
63 window-left-child, window-next-sibling and window-prev-sibling
64 respectively.
65 (resize-window-reset): Rename to window-resize-reset.
66 (resize-window-reset-1): Rename to window-resize-reset-1.
67 (resize-window): Rename to window-resize.
68 (window-min-height, window-min-width)
69 (resize-mini-window, resize-this-window, resize-root-window)
70 (resize-root-window-vertically, adjust-window-trailing-edge)
71 (enlarge-window, shrink-window, maximize-window)
72 (minimize-window, delete-window, quit-restore-window)
73 (split-window, balance-windows, balance-windows-area-adjust)
74 (balance-windows-area, window-state-put-2)
75 (display-buffer-even-window-sizes, display-buffer-set-height)
76 (display-buffer-set-width, set-window-text-height)
77 (fit-window-to-buffer): Rename all "resize-window" prefixed
78 calls to use the "window-resize" prefix convention.
79 (display-buffer-alist): Fix symbol for label specifier.
80 (display-buffer-reuse-window): Set reuse-dedicated to cdr of
81 corresponding specifier.
82 Reported by Juanma Barranquero <lekktu@gmail.com>.
83
842011-06-27 Vincent Belaïche <vincentb1@users.sourceforge.net>
85
86 * ses.el (ses-destroy-cell-variable-range): Fix heading comment
87 convention.
88 (ses-call-printer): Does not pass an empty string to formatter when the
89 cell is empty to keep from barking printer Calc math-format-value.
90
912011-06-27 Richard Stallman <rms@gnu.org>
92
93 * battery.el (battery-mode-line-limit): New variable.
94 (battery-update): Handle it.
95
96 * mail/rmailmm.el (rmail-mime-process-multipart):
97 Handle truncated messages.
98
992011-06-27 Glenn Morris <rgm@gnu.org>
100
101 * progmodes/flymake.el (flymake-err-line-patterns):
102 Allow for column numbers in the ant/javac pattern. (Bug#8866)
103
1042011-06-27 Vincent Belaïche <vincentb1@users.sourceforge.net>
105
106 * ses.el (ses-relocate-range): Keep rest of arguments for ses-range.
107 (ses--clean-!, ses--clean-_): New functions.
108 (ses-range): Add configurability of readout order, and conversion
109 to Calc vector.
110
111 * ses.el (ses-repair-cell-reference-all): New function.
112 (ses-cell-symbol): Set macro as safe, so that it can be used in
113 formulas.
114
115 * ses.el: Update cycle detection algorithm.
116 (ses-localvars): Add ses--Dijkstra-attempt-nb and
117 ses--Dijkstra-weight-bound, and initial values thereof when applicable.
118 (ses-set-localvars): New function.
119 (ses-make-cell): Add property-list as a cell element.
120 (ses-cell-property-get-fun, ses-cell-property-get)
121 (ses-cell-property-delq-fun, ses-cell-property-set-fun)
122 (ses-cell-property-pop-fun, ses-cell-property-get-handle-fun):
123 New functions.
124 (ses-cell-property-set, ses-cell-property-pop)
125 (ses-cell-property-get-handle): New macro.
126 (ses-cell-property-handle-car, ses-cell-property-handle-setcar):
127 New aliases, used for code readability.
128 (ses-calculate-cell, ses-update-cells): Use Dijkstra algorithm for
129 cycle detection.
130 (ses-self-reference-early-detection): New defcustom.
131 (ses-formula-references): Robustify against self-refering cells.
132 (ses-mode): Use ses-set-localvars.
133 (ses-command-hook): Add call to ses-initialize-Dijkstra-attempt
134 before lauching the update processing.
135 (ses-initialize-Dijkstra-attempt): New function.
136 (ses-recalculate-cell): Update for cycle detection based on
137 Dijkstra algorithm.
138
139 * ses.el: Fix commenting and indenting convention.
140
1412011-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
142
143 * bs.el (bs-cycle-next): Complete last change.
144
1452011-06-27 Drew Adams <drew.adams@oracle.com>
146
147 * faces.el (list-faces-display): Add help-mode-map to output (bug#8939).
148
1492011-06-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
150
151 * net/network-stream.el (network-stream-open-starttls):
152 Don't re-get capabilities unless we've reestablished connection.
153 (network-stream-open-starttls): Fix stupid typo with gnutls-clii.
154
155 * mail/smtpmail.el (smtpmail-via-smtp): Bind coding-system-for-*
156 to binary to possibly avoid line encoding issues on Windows (among
157 other things).
158
1592011-06-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
160
161 * net/network-stream.el (open-network-stream): Return an :error
162 saying what the problem was, if possible.
163
164 * mail/smtpmail.el (smtpmail-via-smtp): Report the error from the
165 server.
166
167 * net/network-stream.el (network-stream-open-starttls): If we
168 wanted to use STARTTLS, and the server offered it, but we weren't
169 able to because we had no STARTTLS support, then close the connection.
170 (open-network-stream): Return an :error element, if present.
171
1722011-06-26 Chong Yidong <cyd@stupidchicken.com>
173
174 * hl-line.el (hl-line-sticky-flag): Doc fix.
175 (global-hl-line-sticky-flag): New option (Bug#8323).
176 (global-hl-line-highlight): Obey it.
177
178 * vc/vc.el (vc-revert-show-diff): Default to t.
179
1802011-06-26 Ken Manheimer <ken.manheimer@gmail.com>
181
182 * allout-widgets.el (allout-widgets-post-command-business):
183 Stop decorating intermediate isearch matches. They're not being
184 undecorated when an isearch is continued past, and isearch
185 automatically collapses them. This leads to "widget leaks", where
186 decorated items accumulate in collapsed areas. Lines with lots of
187 hidden widgets can slow down cursor travel, substantially.
188 Too much complicated machinery would be needed to ensure undecoration,
189 so we're doing without this nicety.
190
191 (allout-widgets-tally-string): Don't try to do a hash-table-count
192 of allout-widgets-tally when it's nil. This eliminates spurious "Error
193 during redisplay: (wrong-type-argument hash-table-p nil)" warnings in
194 *Messages* when allout-widgets-maintain-tally is t.
195
1962011-06-26 Martin Rudalics <rudalics@gmx.at>
197
198 * window.el (display-buffer-normalize-argument): Rename to
199 display-buffer-normalize-arguments. Handle special meaning of
200 LABEL argument. Respect special-display-function when popping up
201 a new frame. Fix code searching for a window showing the buffer
202 on another frame.
203 (display-buffer-normalize-specifiers):
204 Call display-buffer-normalize-arguments.
205 (display-buffer-in-window): Don't undedicate the window if its
206 buffer remains the same.
207 Reported by Drew Adams <drew.adams@oracle.com>.
208 (display-buffer-alist): Add choice for same-window macro
209 specfier.
210 (display-buffer): Mention special meaning of LABEL argument in
211 doc-string. Fix quoting. Don't pop up a new frame even as
212 fallback.
213
2142011-06-26 Juanma Barranquero <lekktu@gmail.com>
215
216 * bs.el (bs-cycle-next): Pass current buffer to `bury-buffer' to
217 avoid deleting the current window in some cases (bug#8911).
218
2192011-06-26 Andreas Schwab <schwab@linux-m68k.org>
220
221 * emacs-lisp/smie.el (smie-bnf->prec2): Fix last change.
222 (Bug#8934)
223
2242011-06-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
225
226 * net/network-stream.el (network-stream-open-starttls):
227 Use built-in TLS support if `gnutls-available-p' is true.
228 (network-stream-open-tls): Ditto.
229
2302011-06-26 Leo Liu <sdl.web@gmail.com>
231
232 * register.el (registerv): New struct.
233 (registerv-make): New function.
234 (jump-to-register, describe-register-1, insert-register):
235 Support the jump-func, print-func and insert-func slot of a registerv
236 struct. (Bug#8415)
237
2382011-06-26 Chong Yidong <cyd@stupidchicken.com>
239
240 * vc/vc.el (vc-revert-show-diff): New defcustom.
241 (vc-diff-internal): New arg specifying diff buffer.
242 (vc-revert): Obey vc-revert-show-diff. If we show a diff, don't
243 reuse an existing *vc-diff* buffer (Bug#8927).
244
245 * progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode.
246
2472011-06-26 Glenn Morris <rgm@gnu.org>
248
249 * progmodes/f90.el (f90-critical-indent): New option.
250 (f90-font-lock-keywords-2, f90-blocks-re, f90-end-block-re)
251 (f90-start-block-re, f90-mode-abbrev-table): Add block, critical.
252 (f90-mode): Doc fix.
253 (f90-looking-at-critical, f90-looking-at-end-critical): New funcs.
254 (f90-no-block-limit, f90-calculate-indent, f90-end-of-block)
255 (f90-beginning-of-block, f90-next-block, f90-indent-region)
256 (f90-match-end): Handle block, critical.
257
12011-06-25 Glenn Morris <rgm@gnu.org> 2582011-06-25 Glenn Morris <rgm@gnu.org>
2 259
3 * progmodes/f90.el (f90-keywords-re, f90-procedures-re) 260 * calendar/diary-lib.el (diary-included-files): Doc fix.
4 (f90-constants-re): Add some F2008 stuff. 261 (diary-include-files): New function, extracted from
262 diary-include-other-diary-files and diary-mark-included-diary-files.
263 (diary-include-other-diary-files, diary-mark-included-diary-files):
264 Just call diary-include-files.
265 (diary-mark-entries): Reset diary-included-files on first call.
266
267 * calendar/diary-lib.el (diary-mark-entries)
268 (diary-mark-included-diary-files):
269 Visit included diary-files in temp buffers.
270
271 * progmodes/f90.el (f90-keywords-re, f90-font-lock-keywords-1)
272 (f90-blocks-re, f90-program-block-re, f90-end-block-re)
273 (f90-start-block-re, f90-imenu-generic-expression)
274 (f90-looking-at-program-block-start, f90-no-block-limit):
275 Add support for submodules.
276
277 * progmodes/f90.el (f90-keywords-re, f90-keywords-level-3-re)
278 (f90-procedures-re, f90-constants-re): Add some F2008 stuff.
5 279
62011-06-25 Eli Zaretskii <eliz@gnu.org> 2802011-06-25 Eli Zaretskii <eliz@gnu.org>
7 281
@@ -136,8 +410,8 @@
136 410
1372011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 4112011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
138 412
139 * mail/smtpmail.el (smtpmail-via-smtp): Set 413 * mail/smtpmail.el (smtpmail-via-smtp):
140 :use-starttls-if-possible so that we always use STARTTLS if the 414 Set :use-starttls-if-possible so that we always use STARTTLS if the
141 server supports it. SMTP servers that support STARTTLS commonly 415 server supports it. SMTP servers that support STARTTLS commonly
142 require it. 416 require it.
143 417
@@ -149,13 +423,13 @@
149 upgrades with `open-network-stream', and rely solely on 423 upgrades with `open-network-stream', and rely solely on
150 auth-source for all credentials. Big changes throughout the file, 424 auth-source for all credentials. Big changes throughout the file,
151 but in particular: 425 but in particular:
152 (smtpmail-auth-credentials): Removed. 426 (smtpmail-auth-credentials): Remove.
153 (smtpmail-starttls-credentials): Removed. 427 (smtpmail-starttls-credentials): Remove.
154 (smtpmail-via-smtp): Check for servers saying they want AUTH after 428 (smtpmail-via-smtp): Check for servers saying they want AUTH after
155 MAIL FROM, too. 429 MAIL FROM, too.
156 430
157 * net/network-stream.el (network-stream-open-starttls): Provide 431 * net/network-stream.el (network-stream-open-starttls):
158 support for client certificates both for external and built-in 432 Provide support for client certificates both for external and built-in
159 STARTTLS. 433 STARTTLS.
160 (auth-source): Require. 434 (auth-source): Require.
161 (open-network-stream): Document the :client-certificate keyword. 435 (open-network-stream): Document the :client-certificate keyword.
@@ -169,8 +443,8 @@
169 443
1702011-06-21 Tim Harper <timcharper@gmail.com> 4442011-06-21 Tim Harper <timcharper@gmail.com>
171 445
172 * term/ns-win.el (ns-initialize-window-system): set 446 * term/ns-win.el (ns-initialize-window-system):
173 application-specific `ApplePressAndHoldEnabled' system 447 Set application-specific `ApplePressAndHoldEnabled' system
174 resource to NO as it is not yet supported by the NS port. 448 resource to NO as it is not yet supported by the NS port.
175 449
1762011-06-21 Juanma Barranquero <lekktu@gmail.com> 4502011-06-21 Juanma Barranquero <lekktu@gmail.com>
@@ -195,8 +469,8 @@
195 options more faithfully. 469 options more faithfully.
196 (pop-to-buffer): Don't rely on `display-buffer' selecting the 470 (pop-to-buffer): Don't rely on `display-buffer' selecting the
197 window if it is on another frame. 471 window if it is on another frame.
198 (display-buffer-alist, display-buffer-default-specifiers): Don't 472 (display-buffer-alist, display-buffer-default-specifiers):
199 make new frame unsplittable by default. 473 Don't make new frame unsplittable by default.
200 (display-buffer-normalize-argument): Fix doc-string typo and use 474 (display-buffer-normalize-argument): Fix doc-string typo and use
201 'same-frame-other-window instead of 'other-window when associating 475 'same-frame-other-window instead of 'other-window when associating
202 with display-buffer-macro-specifiers. 476 with display-buffer-macro-specifiers.
@@ -213,7 +487,7 @@
213 * progmodes/compile.el (compilation-error-regexp-alist-alist): Rename 487 * progmodes/compile.el (compilation-error-regexp-alist-alist): Rename
214 `caml' to `python-tracebacks-and-caml'; allow leading tabs (bug#8585). 488 `caml' to `python-tracebacks-and-caml'; allow leading tabs (bug#8585).
215 489
2162011-06-21 Drew Adams <drew.adams@oracle.com> 4902011-06-21 Drew Adams <drew.adams@oracle.com>
217 491
218 * menu-bar.el: Use function variable instead of switch-to-buffer. 492 * menu-bar.el: Use function variable instead of switch-to-buffer.
219 (menu-bar-select-buffer-function): New variable. 493 (menu-bar-select-buffer-function): New variable.
@@ -739,7 +1013,7 @@
739 (window-in-direction-2, window-in-direction, get-mru-window): 1013 (window-in-direction-2, window-in-direction, get-mru-window):
740 New functions. 1014 New functions.
741 1015
7422011-06-08 Reuben Thomas <rrt@sc3d.org> 10162011-06-08 Reuben Thomas <rrt@sc3d.org>
743 1017
744 * progmodes/flymake.el (flymake-compilation-prevents-syntax-check): 1018 * progmodes/flymake.el (flymake-compilation-prevents-syntax-check):
745 Doc fix (Bug#8713). 1019 Doc fix (Bug#8713).
@@ -1126,7 +1400,6 @@
1126 1400
11272011-05-28 Chong Yidong <cyd@stupidchicken.com> 14012011-05-28 Chong Yidong <cyd@stupidchicken.com>
1128 1402
1129
1130 * emacs-lisp/re-builder.el (re-builder): Improve doc (Bug#8286). 1403 * emacs-lisp/re-builder.el (re-builder): Improve doc (Bug#8286).
1131 1404
11322011-05-28 Dima Kogan <dkogan@cds.caltech.edu> (tiny change) 14052011-05-28 Dima Kogan <dkogan@cds.caltech.edu> (tiny change)
@@ -1257,7 +1530,7 @@
1257 * vc/vc-bzr.el (vc-bzr-sha1-program): Rename from sha1-program. 1530 * vc/vc-bzr.el (vc-bzr-sha1-program): Rename from sha1-program.
1258 (vc-bzr-sha1): Adapt. 1531 (vc-bzr-sha1): Adapt.
1259 1532
1260 * sha1.el: Remove. Function `sha1' is now builtin. 1533 * sha1.el: Remove. Function `sha1' is now builtin.
1261 1534
1262 * bindings.el: Provide sha1 feature. 1535 * bindings.el: Provide sha1 feature.
1263 1536
@@ -1345,7 +1618,7 @@
13452011-05-23 Vincent Belaïche <vincentb1@users.sourceforge.net> 16182011-05-23 Vincent Belaïche <vincentb1@users.sourceforge.net>
1346 1619
1347 * play/5x5.el: I/ Add an arithmetic solver to suggest positions to 1620 * play/5x5.el: I/ Add an arithmetic solver to suggest positions to
1348 click on. II/ Make 5x5 multisession. III/ Ensure that random grids 1621 click on. II/ Make 5x5 multisession. III/ Ensure that random grids
1349 always have a solution in grid size = 5 cases. 1622 always have a solution in grid size = 5 cases.
1350 (5x5-mode-map): Add keybinding to function `5x5-solve-suggest'. 1623 (5x5-mode-map): Add keybinding to function `5x5-solve-suggest'.
1351 (5x5-solver-output, 5x5-log-buffer): New vars. 1624 (5x5-solver-output, 5x5-log-buffer): New vars.
@@ -2566,7 +2839,7 @@
2566 2839
25672011-04-20 felix <EmacsWiki> (tiny change) 28402011-04-20 felix <EmacsWiki> (tiny change)
2568 2841
2569 * whitespace.el (global-whitespace-mode): keep highlight when 2842 * whitespace.el (global-whitespace-mode): Keep highlight when
2570 switching between major modes on a file. 2843 switching between major modes on a file.
2571 2844
25722011-04-19 Stefan Monnier <monnier@iro.umontreal.ca> 28452011-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 647b609288d..0f1fe850123 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -258,7 +258,9 @@ widgets are locally inhibited.
258 258
259The number varies according to the evanescence of objects on a 259The number varies according to the evanescence of objects on a
260 hash table with weak keys, so tracking of widget erasures is often delayed." 260 hash table with weak keys, so tracking of widget erasures is often delayed."
261 (when (and allout-widgets-maintain-tally (not allout-widgets-mode-inhibit)) 261 (when (and allout-widgets-maintain-tally
262 (not allout-widgets-mode-inhibit)
263 allout-widgets-tally)
262 (format ":%s" (hash-table-count allout-widgets-tally)))) 264 (format ":%s" (hash-table-count allout-widgets-tally))))
263;;;_ = allout-widgets-track-decoration nil 265;;;_ = allout-widgets-track-decoration nil
264(defcustom allout-widgets-track-decoration nil 266(defcustom allout-widgets-track-decoration nil
@@ -748,20 +750,23 @@ Optional RECURSING is for internal use, to limit recursion."
748 (message replaced-message) 750 (message replaced-message)
749 (message ""))))) 751 (message "")))))
750 752
751 ;; Detect undecorated items, eg during isearch into previously 753 ;; alas, decorated intermediate matches are not easily undecorated
752 ;; unexposed topics, and decorate "economically". Some 754 ;; when they're automatically rehidden by isearch, so we're
753 ;; undecorated stuff is often exposed, to reduce lag, but the 755 ;; dropping this nicety.
754 ;; item containing the cursor is decorated. We constrain 756 ;; ;; Detect undecorated items, eg during isearch into previously
755 ;; recursion to avoid being trapped by unexpectedly undecoratable 757 ;; ;; unexposed topics, and decorate "economically". Some
756 ;; items. 758 ;; ;; undecorated stuff is often exposed, to reduce lag, but the
757 (when (and (not recursing) 759 ;; ;; item containing the cursor is decorated. We constrain
758 (not (allout-current-decorated-p)) 760 ;; ;; recursion to avoid being trapped by unexpectedly undecoratable
759 (or (not (equal (allout-depth) 0)) 761 ;; ;; items.
760 (not allout-container-item-widget))) 762 ;; (when (and (not recursing)
761 (let ((buffer-undo-list t)) 763 ;; (not (allout-current-decorated-p))
762 (allout-widgets-exposure-change-recorder 764 ;; (or (not (equal (allout-depth) 0))
763 allout-recent-prefix-beginning allout-recent-prefix-end nil) 765 ;; (not allout-container-item-widget)))
764 (allout-widgets-post-command-business 'recursing))) 766 ;; (let ((buffer-undo-list t))
767 ;; (allout-widgets-exposure-change-recorder
768 ;; allout-recent-prefix-beginning allout-recent-prefix-end nil)
769 ;; (allout-widgets-post-command-business 'recursing)))
765 770
766 ;; Detect and rectify fouled outline structure - decorated item 771 ;; Detect and rectify fouled outline structure - decorated item
767 ;; not at beginning of line. 772 ;; not at beginning of line.
diff --git a/lisp/battery.el b/lisp/battery.el
index 9afe9de7b98..d7d3045fa58 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -102,6 +102,11 @@ string are substituted as defined by the current value of the variable
102 "String to display in the mode line.") 102 "String to display in the mode line.")
103;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t) 103;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t)
104 104
105(defcustom battery-mode-line-limit 100
106 "Percentage of full battery load below which display battery status"
107 :type 'integer
108 :group 'battery)
109
105(defcustom battery-mode-line-format 110(defcustom battery-mode-line-format
106 (cond ((eq battery-status-function 'battery-linux-proc-acpi) 111 (cond ((eq battery-status-function 'battery-linux-proc-acpi)
107 "[%b%p%%,%d°C]") 112 "[%b%p%%,%d°C]")
@@ -182,16 +187,21 @@ seconds."
182 187
183(defun battery-update () 188(defun battery-update ()
184 "Update battery status information in the mode line." 189 "Update battery status information in the mode line."
185 (setq battery-mode-line-string 190 (let ((data (and battery-status-function (funcall battery-status-function))))
186 (propertize (if (and battery-mode-line-format 191 (setq battery-mode-line-string
187 battery-status-function) 192 (propertize (if (and battery-mode-line-format
188 (battery-format 193 (<= (car (read-from-string (cdr (assq ?p data))))
189 battery-mode-line-format 194 battery-mode-line-limit))
190 (funcall battery-status-function)) 195 (battery-format
191 "") 196 battery-mode-line-format
192 'help-echo "Battery status information")) 197 data)
198 "")
199 'face
200 (and (<= (car (read-from-string (cdr (assq ?p data))))
201 battery-load-critical)
202 'font-lock-warning-face)
203 'help-echo "Battery status information")))
193 (force-mode-line-update)) 204 (force-mode-line-update))
194
195 205
196;;; `/proc/apm' interface for Linux. 206;;; `/proc/apm' interface for Linux.
197 207
diff --git a/lisp/bs.el b/lisp/bs.el
index 95dc371e57b..94fbd0e04f9 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1212,10 +1212,9 @@ by buffer configuration `bs-cycle-configuration-name'."
1212 bs--cycle-list))) 1212 bs--cycle-list)))
1213 (next (car tupel)) 1213 (next (car tupel))
1214 (cycle-list (cdr tupel))) 1214 (cycle-list (cdr tupel)))
1215 (unless (window-dedicated-p (selected-window)) 1215 ;; We don't want the frame iconified if the only window in the frame
1216 ;; We don't want the frame iconified if the only window in the frame 1216 ;; happens to be dedicated.
1217 ;; happens to be dedicated; let's get the error from switch-to-buffer 1217 (bury-buffer (current-buffer))
1218 (bury-buffer))
1219 (switch-to-buffer next) 1218 (switch-to-buffer next)
1220 (setq bs--cycle-list (append (cdr cycle-list) 1219 (setq bs--cycle-list (append (cdr cycle-list)
1221 (list (car cycle-list)))) 1220 (list (car cycle-list))))
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index f21247e9c93..1b980b3b1fa 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -776,7 +776,8 @@ of the appropriate type."
776 (goto-char (point-min))) 776 (goto-char (point-min)))
777 777
778(defvar diary-included-files nil 778(defvar diary-included-files nil
779 "List of any diary files included in the last call to `diary-list-entries'.") 779 "List of any diary files included in the last call to `diary-list-entries'.
780Or to `diary-mark-entries'.")
780 781
781(defun diary-list-entries (date number &optional list-only) 782(defun diary-list-entries (date number &optional list-only)
782 "Create and display a buffer containing the relevant lines in `diary-file'. 783 "Create and display a buffer containing the relevant lines in `diary-file'.
@@ -832,7 +833,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
832 (let* ((original-date date) ; save for possible use in the hooks 833 (let* ((original-date date) ; save for possible use in the hooks
833 (date-string (calendar-date-string date)) 834 (date-string (calendar-date-string date))
834 (diary-buffer (find-buffer-visiting diary-file)) 835 (diary-buffer (find-buffer-visiting diary-file))
835 ;; Dynamically bound in diary-include-other-diary-files. 836 ;; Dynamically bound in diary-include-files.
836 (d-incp (and (boundp 'diary-including) diary-including)) 837 (d-incp (and (boundp 'diary-including) diary-including))
837 diary-entries-list file-glob-attrs temp-buff) 838 diary-entries-list file-glob-attrs temp-buff)
838 (unless d-incp 839 (unless d-incp
@@ -921,19 +922,20 @@ LIST-ONLY is non-nil, in which case it just returns the list."
921(defvar original-date) ; bound in diary-list-entries 922(defvar original-date) ; bound in diary-list-entries
922;(defvar number) ; already declared above 923;(defvar number) ; already declared above
923 924
924(defun diary-include-other-diary-files () 925(defun diary-include-files (&optional mark)
925 "Add diary entries from included diary files to `diary-entries-list'. 926 "Process diary entries from included diary files.
927By default, lists included entries, but if optional argument MARK is non-nil
928marks entries instead.
926For example, this enables you to share common diary files. 929For example, this enables you to share common diary files.
927To use, add this function to `diary-list-entries-hook'.
928Specify include files using lines matching `diary-include-string', e.g. 930Specify include files using lines matching `diary-include-string', e.g.
929 #include \"filename\" 931 #include \"filename\"
930This is recursive; that is, included files may include other files. 932This is recursive; that is, included files may include other files."
931See also `diary-mark-included-diary-files'."
932 (goto-char (point-min)) 933 (goto-char (point-min))
933 (while (re-search-forward 934 (while (re-search-forward
934 (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) 935 (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string))
935 nil t) 936 nil t)
936 (let ((diary-file (match-string-no-properties 1)) 937 (let ((diary-file (match-string-no-properties 1))
938 (diary-mark-entries-hook 'diary-mark-included-diary-files)
937 (diary-list-entries-hook 'diary-include-other-diary-files) 939 (diary-list-entries-hook 'diary-include-other-diary-files)
938 (diary-including t) 940 (diary-including t)
939 diary-hook diary-list-include-blanks efile) 941 diary-hook diary-list-include-blanks efile)
@@ -943,10 +945,12 @@ See also `diary-mark-included-diary-files'."
943 diary-included-files) 945 diary-included-files)
944 (error "Recursive diary include for %s" diary-file) 946 (error "Recursive diary include for %s" diary-file)
945 (setq diary-included-files 947 (setq diary-included-files
946 (append diary-included-files (list efile)) 948 (append diary-included-files (list efile)))
947 diary-entries-list 949 (if mark
948 (append diary-entries-list 950 (diary-mark-entries)
949 (diary-list-entries original-date number t)))) 951 (setq diary-entries-list
952 (append diary-entries-list
953 (diary-list-entries original-date number t)))))
950 (beep) 954 (beep)
951 (message "Can't read included diary file %s" diary-file) 955 (message "Can't read included diary file %s" diary-file)
952 (sleep-for 2)) 956 (sleep-for 2))
@@ -955,6 +959,13 @@ See also `diary-mark-included-diary-files'."
955 (sleep-for 2)))) 959 (sleep-for 2))))
956 (goto-char (point-min))) 960 (goto-char (point-min)))
957 961
962(defun diary-include-other-diary-files ()
963 "Add diary entries from included diary files to `diary-entries-list'.
964To use, add this function to `diary-list-entries-hook'.
965For details, see `diary-include-files'.
966See also `diary-mark-included-diary-files'."
967 (diary-include-files))
968
958(define-obsolete-function-alias 'include-other-diary-files 969(define-obsolete-function-alias 'include-other-diary-files
959 'diary-include-other-diary-files "23.1") 970 'diary-include-other-diary-files "23.1")
960 971
@@ -1405,22 +1416,37 @@ marks. This is intended to deal with deleted diary entries."
1405 (setq calendar-mark-diary-entries-flag nil) 1416 (setq calendar-mark-diary-entries-flag nil)
1406 (calendar-redraw)) 1417 (calendar-redraw))
1407 (let ((diary-marking-entries-flag t) 1418 (let ((diary-marking-entries-flag t)
1408 file-glob-attrs) 1419 (diary-buffer (find-buffer-visiting diary-file))
1409 (with-current-buffer (find-file-noselect (diary-check-diary-file) t) 1420 ;; Dynamically bound in diary-include-files.
1410 (save-excursion 1421 (d-incp (and (boundp 'diary-including) diary-including))
1411 (when (eq major-mode (default-value 'major-mode)) (diary-mode)) 1422 file-glob-attrs temp-buff)
1412 (setq calendar-mark-diary-entries-flag t) 1423 (unless d-incp
1413 (message "Marking diary entries...") 1424 (setq diary-included-files nil)
1414 (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) 1425 (message "Marking diary entries..."))
1415 (with-syntax-table diary-syntax-table 1426 (unwind-protect
1416 (diary-mark-entries-1 'calendar-mark-date-pattern) 1427 (with-current-buffer (or diary-buffer
1417 (diary-mark-sexp-entries) 1428 (if d-incp
1418 ;; Although it looks like mark-entries-hook runs every time, 1429 (setq temp-buff (generate-new-buffer
1419 ;; diary-mark-included-diary-files binds it to nil 1430 " *diary-temp*"))
1420 ;; (essentially) when it runs in included files. 1431 (find-file-noselect
1421 (run-hooks 'diary-nongregorian-marking-hook 1432 (diary-check-diary-file) t)))
1422 'diary-mark-entries-hook)) 1433 (if temp-buff
1423 (message "Marking diary entries...done"))))) 1434 ;; If including, caller has already verified it is readable.
1435 (insert-file-contents diary-file)
1436 (if (eq major-mode (default-value 'major-mode)) (diary-mode)))
1437 (setq calendar-mark-diary-entries-flag t)
1438 (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
1439 (with-syntax-table diary-syntax-table
1440 (save-excursion
1441 (diary-mark-entries-1 'calendar-mark-date-pattern)
1442 (diary-mark-sexp-entries)
1443 ;; Although it looks like mark-entries-hook runs every time,
1444 ;; diary-mark-included-diary-files binds it to nil
1445 ;; (essentially) when it runs in included files.
1446 (run-hooks 'diary-nongregorian-marking-hook
1447 'diary-mark-entries-hook))))
1448 (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
1449 (or d-incp (message "Marking diary entries...done"))))
1424 1450
1425;;;###cal-autoload 1451;;;###cal-autoload
1426(define-obsolete-function-alias 'mark-diary-entries 'diary-mark-entries "23.1") 1452(define-obsolete-function-alias 'mark-diary-entries 'diary-mark-entries "23.1")
@@ -1504,32 +1530,10 @@ is marked. See the documentation for the function `diary-list-sexp-entries'."
1504 1530
1505(defun diary-mark-included-diary-files () 1531(defun diary-mark-included-diary-files ()
1506 "Mark diary entries from included diary files. 1532 "Mark diary entries from included diary files.
1507For example, this enables you to share common diary files.
1508To use, add this function to `diary-mark-entries-hook'. 1533To use, add this function to `diary-mark-entries-hook'.
1509Specify include files using lines matching `diary-include-string', e.g. 1534For details, see `diary-include-files'.
1510 #include \"filename\"
1511This is recursive; that is, included files may include other files.
1512See also `diary-include-other-diary-files'." 1535See also `diary-include-other-diary-files'."
1513 (goto-char (point-min)) 1536 (diary-include-files t))
1514 (while (re-search-forward
1515 (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string))
1516 nil t)
1517 (let* ((diary-file (match-string-no-properties 1))
1518 (diary-mark-entries-hook 'diary-mark-included-diary-files)
1519 (dbuff (find-buffer-visiting diary-file)))
1520 (if (file-exists-p diary-file)
1521 (if (file-readable-p diary-file)
1522 (progn
1523 (diary-mark-entries)
1524 (unless dbuff
1525 (kill-buffer (find-buffer-visiting diary-file))))
1526 (beep)
1527 (message "Can't read included diary file %s" diary-file)
1528 (sleep-for 2))
1529 (beep)
1530 (message "Can't find included diary file %s" diary-file)
1531 (sleep-for 2))))
1532 (goto-char (point-min)))
1533 1537
1534(define-obsolete-function-alias 'mark-included-diary-files 1538(define-obsolete-function-alias 'mark-included-diary-files
1535 'diary-mark-included-diary-files "23.1") 1539 'diary-mark-included-diary-files "23.1")
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 04299aec099..114e9755039 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -38,46 +38,46 @@
38(define-abbrev-table 'lisp-mode-abbrev-table ()) 38(define-abbrev-table 'lisp-mode-abbrev-table ())
39 39
40(defvar emacs-lisp-mode-syntax-table 40(defvar emacs-lisp-mode-syntax-table
41 (let ((table (make-syntax-table))) 41 (let ((table (make-syntax-table))
42 (let ((i 0)) 42 (i 0))
43 (while (< i ?0) 43 (while (< i ?0)
44 (modify-syntax-entry i "_ " table) 44 (modify-syntax-entry i "_ " table)
45 (setq i (1+ i))) 45 (setq i (1+ i)))
46 (setq i (1+ ?9)) 46 (setq i (1+ ?9))
47 (while (< i ?A) 47 (while (< i ?A)
48 (modify-syntax-entry i "_ " table) 48 (modify-syntax-entry i "_ " table)
49 (setq i (1+ i))) 49 (setq i (1+ i)))
50 (setq i (1+ ?Z)) 50 (setq i (1+ ?Z))
51 (while (< i ?a) 51 (while (< i ?a)
52 (modify-syntax-entry i "_ " table) 52 (modify-syntax-entry i "_ " table)
53 (setq i (1+ i))) 53 (setq i (1+ i)))
54 (setq i (1+ ?z)) 54 (setq i (1+ ?z))
55 (while (< i 128) 55 (while (< i 128)
56 (modify-syntax-entry i "_ " table) 56 (modify-syntax-entry i "_ " table)
57 (setq i (1+ i))) 57 (setq i (1+ i)))
58 (modify-syntax-entry ?\s " " table) 58 (modify-syntax-entry ?\s " " table)
59 ;; Non-break space acts as whitespace. 59 ;; Non-break space acts as whitespace.
60 (modify-syntax-entry ?\x8a0 " " table) 60 (modify-syntax-entry ?\x8a0 " " table)
61 (modify-syntax-entry ?\t " " table) 61 (modify-syntax-entry ?\t " " table)
62 (modify-syntax-entry ?\f " " table) 62 (modify-syntax-entry ?\f " " table)
63 (modify-syntax-entry ?\n "> " table) 63 (modify-syntax-entry ?\n "> " table)
64 ;; This is probably obsolete since nowadays such features use overlays. 64 ;; This is probably obsolete since nowadays such features use overlays.
65 ;; ;; Give CR the same syntax as newline, for selective-display. 65 ;; ;; Give CR the same syntax as newline, for selective-display.
66 ;; (modify-syntax-entry ?\^m "> " table) 66 ;; (modify-syntax-entry ?\^m "> " table)
67 (modify-syntax-entry ?\; "< " table) 67 (modify-syntax-entry ?\; "< " table)
68 (modify-syntax-entry ?` "' " table) 68 (modify-syntax-entry ?` "' " table)
69 (modify-syntax-entry ?' "' " table) 69 (modify-syntax-entry ?' "' " table)
70 (modify-syntax-entry ?, "' " table) 70 (modify-syntax-entry ?, "' " table)
71 (modify-syntax-entry ?@ "' " table) 71 (modify-syntax-entry ?@ "' " table)
72 ;; Used to be singlequote; changed for flonums. 72 ;; Used to be singlequote; changed for flonums.
73 (modify-syntax-entry ?. "_ " table) 73 (modify-syntax-entry ?. "_ " table)
74 (modify-syntax-entry ?# "' " table) 74 (modify-syntax-entry ?# "' " table)
75 (modify-syntax-entry ?\" "\" " table) 75 (modify-syntax-entry ?\" "\" " table)
76 (modify-syntax-entry ?\\ "\\ " table) 76 (modify-syntax-entry ?\\ "\\ " table)
77 (modify-syntax-entry ?\( "() " table) 77 (modify-syntax-entry ?\( "() " table)
78 (modify-syntax-entry ?\) ")( " table) 78 (modify-syntax-entry ?\) ")( " table)
79 (modify-syntax-entry ?\[ "(] " table) 79 (modify-syntax-entry ?\[ "(] " table)
80 (modify-syntax-entry ?\] ")[ " table)) 80 (modify-syntax-entry ?\] ")[ " table)
81 table) 81 table)
82 "Syntax table used in `emacs-lisp-mode'.") 82 "Syntax table used in `emacs-lisp-mode'.")
83 83
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 0206abb9f53..cad7c8419b2 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -238,9 +238,9 @@ one of those elements share the same precedence level and associativity."
238 (pushnew (car shr) last-ops) 238 (pushnew (car shr) last-ops)
239 (pushnew (car shr) last-nts) 239 (pushnew (car shr) last-nts)
240 (when (consp (cdr shr)) 240 (when (consp (cdr shr))
241 (when (member (cadr rhs) nts) 241 (when (member (cadr shr) nts)
242 (error "Adjacent non-terminals: %s %s" 242 (error "Adjacent non-terminals: %s %s"
243 (cadr rhs) (car rhs))) 243 (cadr shr) (car shr)))
244 (pushnew (cadr shr) last-ops))))) 244 (pushnew (cadr shr) last-ops)))))
245 (push (cons nt first-ops) first-ops-table) 245 (push (cons nt first-ops) first-ops-table)
246 (push (cons nt last-ops) last-ops-table) 246 (push (cons nt last-ops) last-ops-table)
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 4ef259dee4b..17dbe3fbaf2 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -57,6 +57,13 @@ properties to colorize its output based on the setting of
57 :type 'hook 57 :type 'hook
58 :group 'eshell-ls) 58 :group 'eshell-ls)
59 59
60(defcustom eshell-ls-date-format "%Y-%m-%d"
61 "How to display time information in `eshell-ls-file'.
62This is passed to `format-time-string' as a format string.
63To display the date using the current locale, use \"%b \%e\"."
64 :type 'string
65 :group 'eshell-ls)
66
60(defcustom eshell-ls-initial-args nil 67(defcustom eshell-ls-initial-args nil
61 "If non-nil, this list of args is included before any call to `ls'. 68 "If non-nil, this list of args is included before any call to `ls'.
62This is useful for enabling human-readable format (-h), for example." 69This is useful for enabling human-readable format (-h), for example."
@@ -508,7 +515,7 @@ whose cdr is the list of file attributes."
508 str)) 515 str))
509 " " (format-time-string 516 " " (format-time-string
510 (concat 517 (concat
511 "%b %e " 518 eshell-ls-date-format " "
512 (if (= (nth 5 (decode-time (current-time))) 519 (if (= (nth 5 (decode-time (current-time)))
513 (nth 5 (decode-time 520 (nth 5 (decode-time
514 (nth (cond 521 (nth (cond
diff --git a/lisp/faces.el b/lisp/faces.el
index 3fb8bc80931..c29d8c9bfd8 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1255,7 +1255,7 @@ arg, prompt for a regular expression."
1255 (insert 1255 (insert
1256 (substitute-command-keys 1256 (substitute-command-keys
1257 (concat 1257 (concat
1258 "Use " 1258 "\\<help-mode-map>>Use "
1259 (if (display-mouse-p) "\\[help-follow-mouse] or ") 1259 (if (display-mouse-p) "\\[help-follow-mouse] or ")
1260 "\\[help-follow] on a face name to customize it\n" 1260 "\\[help-follow] on a face name to customize it\n"
1261 "or on its sample text for a description of the face.\n\n"))) 1261 "or on its sample text for a description of the face.\n\n")))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index e08d52ddbde..839bd519d49 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,31 @@
12011-06-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-art.el (gnus-article-stop-animations): New function to stop any
4 animations going on at article exit time.
5
6 * gnus-registry.el (gnus-registry-user-format-function-M): Reinstate,
7 since removing it breaks people upgrading.
8
9 * shr.el (shr-put-image): Use the new interface for animating images.
10 (shr-put-image): Animate for 60 seconds.
11
12 * auth-source.el (with-auth-source-epa-overrides): Fix compilation
13 error with `find-file-hooks' on Emacs 22.
14 (with-auth-source-epa-overrides): Ugly hack to Wrap the
15 `find-file-hook' things in `symbol-value' to avoid compilation warnings
16 on all architectures.
17
18 * spam.el (spam-stat): Require in a normal fashion without binding
19 `spam-stat-install-hooks' to avoid compilation warnings.
20
21 * spam-stat.el (spam-stat-install-hooks): Removed.
22 (spam-stat-install-hooks): Don't run automatically.
23
242011-06-26 Timo Juhani Lindfors <timo.lindfors@iki.fi> (tiny change)
25
26 * gnus-msg.el (gnus-summary-reply-to-list-with-original): New command
27 and keystroke.
28
12011-06-23 Katsumi Yamaoka <yamaoka@jpl.org> 292011-06-23 Katsumi Yamaoka <yamaoka@jpl.org>
2 30
3 * auth-source.el (auth-source-netrc-cache): Move forward. 31 * auth-source.el (auth-source-netrc-cache): Move forward.
@@ -532,12 +560,6 @@
532 * Makefile.in (fail-on-warning): New rule to compile with warnings as 560 * Makefile.in (fail-on-warning): New rule to compile with warnings as
533 errors. 561 errors.
534 562
535 * dgnushack.el (dgnushack-compile-error-on-warn): New function to call
536 dgnushack-compile with error-on-warn enabled, and to signal an error if
537 clean compilation failed.
538 (dgnushack-compile): New argument 'error-on-warn'. If non-nil, compile
539 with `byte-compile-error-on-warn'. Return nil if errors occured.
540
5412011-04-06 Teodor Zlatanov <tzz@lifelogs.com> 5632011-04-06 Teodor Zlatanov <tzz@lifelogs.com>
542 564
543 * gnus-registry.el: Don't use ERT if it's not available. Load it 565 * gnus-registry.el: Don't use ERT if it's not available. Load it
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 66497cd9a0c..c9cfc14fc55 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -971,7 +971,9 @@ Note that the MAX parameter is used so we can exit the parse early."
971 (,(if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks) 971 (,(if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks)
972 ',(remove 972 ',(remove
973 'epa-file-find-file-hook 973 'epa-file-find-file-hook
974 (if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks))) 974 (if (boundp 'find-file-hook)
975 (symbol-value 'find-file-hook)
976 (symbol-value 'find-file-hooks))))
975 (auto-mode-alist 977 (auto-mode-alist
976 ',(if (boundp 'epa-file-auto-mode-alist-entry) 978 ',(if (boundp 'epa-file-auto-mode-alist-entry)
977 (remove (symbol-value 'epa-file-auto-mode-alist-entry) 979 (remove (symbol-value 'epa-file-auto-mode-alist-entry)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 3ebb5cc719b..6c3ad01eabf 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -4509,6 +4509,7 @@ commands:
4509 t))) 4509 t)))
4510 (with-current-buffer name 4510 (with-current-buffer name
4511 (set (make-local-variable 'gnus-article-edit-mode) nil) 4511 (set (make-local-variable 'gnus-article-edit-mode) nil)
4512 (gnus-article-stop-animations)
4512 (when gnus-article-mime-handles 4513 (when gnus-article-mime-handles
4513 (mm-destroy-parts gnus-article-mime-handles) 4514 (mm-destroy-parts gnus-article-mime-handles)
4514 (setq gnus-article-mime-handles nil)) 4515 (setq gnus-article-mime-handles nil))
@@ -4533,6 +4534,12 @@ commands:
4533 (gnus-start-date-timer gnus-article-update-date-headers)) 4534 (gnus-start-date-timer gnus-article-update-date-headers))
4534 (current-buffer))))) 4535 (current-buffer)))))
4535 4536
4537(defun gnus-article-stop-animations ()
4538 (dolist (timer (and (boundp 'timer-list)
4539 timer-list))
4540 (when (eq (aref timer 5) 'image-animate-timeout)
4541 (cancel-timer timer))))
4542
4536;; Set article window start at LINE, where LINE is the number of lines 4543;; Set article window start at LINE, where LINE is the number of lines
4537;; from the head of the article. 4544;; from the head of the article.
4538(defun gnus-article-set-window-start (&optional line) 4545(defun gnus-article-set-window-start (&optional line)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 093eec33fcd..e256446c016 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -351,6 +351,7 @@ Thank you for your help in stamping out bugs.
351 "r" gnus-summary-reply 351 "r" gnus-summary-reply
352 "y" gnus-summary-yank-message 352 "y" gnus-summary-yank-message
353 "R" gnus-summary-reply-with-original 353 "R" gnus-summary-reply-with-original
354 "L" gnus-summary-reply-to-list-with-original
354 "w" gnus-summary-wide-reply 355 "w" gnus-summary-wide-reply
355 "W" gnus-summary-wide-reply-with-original 356 "W" gnus-summary-wide-reply-with-original
356 "v" gnus-summary-very-wide-reply 357 "v" gnus-summary-very-wide-reply
@@ -1154,6 +1155,16 @@ The original article will be yanked."
1154 (interactive "P") 1155 (interactive "P")
1155 (gnus-summary-reply (gnus-summary-work-articles n) wide)) 1156 (gnus-summary-reply (gnus-summary-work-articles n) wide))
1156 1157
1158(defun gnus-summary-reply-to-list-with-original (n &optional wide)
1159 "Start composing a reply mail to the current message.
1160The reply goes only to the mailing list.
1161The original article will be yanked."
1162 (interactive "P")
1163 (let ((message-reply-to-function
1164 (lambda nil
1165 `((To . ,(gnus-mailing-list-followup-to))))))
1166 (gnus-summary-reply (gnus-summary-work-articles n) wide)))
1167
1157(defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide) 1168(defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide)
1158 "Like `gnus-summary-reply' except removing reply-to field. 1169 "Like `gnus-summary-reply' except removing reply-to field.
1159If prefix argument YANK is non-nil, the original article is yanked 1170If prefix argument YANK is non-nil, the original article is yanked
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index a44986e2499..f8ff52f128f 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -914,6 +914,9 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
914(make-obsolete 'gnus-registry-user-format-function-M 914(make-obsolete 'gnus-registry-user-format-function-M
915 'gnus-registry-article-marks-to-chars "24.1") ? 915 'gnus-registry-article-marks-to-chars "24.1") ?
916 916
917(defalias 'gnus-registry-user-format-function-M
918 'gnus-registry-article-marks-to-chars)
919
917;; use like this: 920;; use like this:
918;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars) 921;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars)
919(defun gnus-registry-article-marks-to-chars (headers) 922(defun gnus-registry-article-marks-to-chars (headers)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f974d386acb..4c059e9332a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -7298,6 +7298,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
7298 (run-hooks 'gnus-summary-prepare-exit-hook) 7298 (run-hooks 'gnus-summary-prepare-exit-hook)
7299 (when (gnus-buffer-live-p gnus-article-buffer) 7299 (when (gnus-buffer-live-p gnus-article-buffer)
7300 (with-current-buffer gnus-article-buffer 7300 (with-current-buffer gnus-article-buffer
7301 (gnus-article-stop-animations)
7301 (mm-destroy-parts gnus-article-mime-handles) 7302 (mm-destroy-parts gnus-article-mime-handles)
7302 ;; Set it to nil for safety reason. 7303 ;; Set it to nil for safety reason.
7303 (setq gnus-article-mime-handle-alist nil) 7304 (setq gnus-article-mime-handle-alist nil)
@@ -9579,6 +9580,7 @@ C-u g', show the raw article."
9579 ;; Destroy any MIME parts. 9580 ;; Destroy any MIME parts.
9580 (when (gnus-buffer-live-p gnus-article-buffer) 9581 (when (gnus-buffer-live-p gnus-article-buffer)
9581 (with-current-buffer gnus-article-buffer 9582 (with-current-buffer gnus-article-buffer
9583 (gnus-article-stop-animations)
9582 (mm-destroy-parts gnus-article-mime-handles) 9584 (mm-destroy-parts gnus-article-mime-handles)
9583 ;; Set it to nil for safety reason. 9585 ;; Set it to nil for safety reason.
9584 (setq gnus-article-mime-handle-alist nil) 9586 (setq gnus-article-mime-handle-alist nil)
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 67effc07ee2..f8a85579b4f 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -526,7 +526,9 @@ the URL of the image to the kill buffer instead."
526 (when (and (> (current-column) 0) 526 (when (and (> (current-column) 0)
527 (> (car (image-size image t)) 400)) 527 (> (car (image-size image t)) 400))
528 (insert "\n")) 528 (insert "\n"))
529 (insert-image image (or alt "*"))) 529 (insert-image image (or alt "*"))
530 (when (image-animated-p image)
531 (image-animate image nil 60)))
530 image) 532 image)
531 (insert alt))) 533 (insert alt)))
532 534
@@ -557,10 +559,6 @@ the URL of the image to the kill buffer instead."
557 :width window-width 559 :width window-width
558 :ascent 100) 560 :ascent 100)
559 image))) 561 image)))
560 (when (and (fboundp 'create-animated-image)
561 (eq (image-type data nil t) 'gif))
562 (setq image (create-animated-image data 'gif t
563 :ascent 100)))
564 image))) 562 image)))
565 563
566;; url-cache-extract autoloads url-cache. 564;; url-cache-extract autoloads url-cache.
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el
index b56d0c416ef..8b56c7bd537 100644
--- a/lisp/gnus/spam-stat.el
+++ b/lisp/gnus/spam-stat.el
@@ -138,12 +138,6 @@ See `spam-stat-to-hash-table' for the format of the file."
138 :type 'file 138 :type 'file
139 :group 'spam-stat) 139 :group 'spam-stat)
140 140
141(defcustom spam-stat-install-hooks t
142 "Whether spam-stat should install its hooks in Gnus.
143This is set to nil if you use spam-stat through spam.el."
144 :type 'boolean
145 :group 'spam-stat)
146
147(defcustom spam-stat-unknown-word-score 0.2 141(defcustom spam-stat-unknown-word-score 0.2
148 "The score to use for unknown words. 142 "The score to use for unknown words.
149Also used for words that don't appear often enough." 143Also used for words that don't appear often enough."
@@ -658,9 +652,6 @@ COUNT defaults to 5"
658 (add-hook 'gnus-select-article-hook 652 (add-hook 'gnus-select-article-hook
659 'spam-stat-store-gnus-article-buffer)) 653 'spam-stat-store-gnus-article-buffer))
660 654
661(when spam-stat-install-hooks
662 (spam-stat-install-hooks-function))
663
664(defun spam-stat-unload-hook () 655(defun spam-stat-unload-hook ()
665 "Uninstall the spam-stat function hooks." 656 "Uninstall the spam-stat function hooks."
666 (interactive) 657 (interactive)
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index cbffeeab69e..33dbaaa1f0c 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -2260,51 +2260,44 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
2260 (autoload 'spam-stat-save "spam-stat") 2260 (autoload 'spam-stat-save "spam-stat")
2261 (autoload 'spam-stat-split-fancy "spam-stat")) 2261 (autoload 'spam-stat-split-fancy "spam-stat"))
2262 2262
2263(eval-and-compile 2263(require 'spam-stat)
2264 (when (condition-case nil
2265 (let ((spam-stat-install-hooks nil))
2266 (require 'spam-stat))
2267 (file-error
2268 (defalias 'spam-stat-register-ham-routine 'ignore)
2269 (defalias 'spam-stat-register-spam-routine 'ignore)
2270 nil))
2271 2264
2272 (defun spam-check-stat () 2265(defun spam-check-stat ()
2273 "Check the spam-stat backend for the classification of this message" 2266 "Check the spam-stat backend for the classification of this message"
2274 (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override 2267 (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override
2275 (spam-stat-buffer (buffer-name)) ; stat the current buffer 2268 (spam-stat-buffer (buffer-name)) ; stat the current buffer
2276 category return) 2269 category return)
2277 (spam-stat-split-fancy))) 2270 (spam-stat-split-fancy)))
2278 2271
2279 (defun spam-stat-register-spam-routine (articles &optional unregister) 2272(defun spam-stat-register-spam-routine (articles &optional unregister)
2280 (dolist (article articles) 2273 (dolist (article articles)
2281 (let ((article-string (spam-get-article-as-string article))) 2274 (let ((article-string (spam-get-article-as-string article)))
2282 (with-temp-buffer 2275 (with-temp-buffer
2283 (insert article-string) 2276 (insert article-string)
2284 (if unregister 2277 (if unregister
2285 (spam-stat-buffer-change-to-non-spam) 2278 (spam-stat-buffer-change-to-non-spam)
2286 (spam-stat-buffer-is-spam)))))) 2279 (spam-stat-buffer-is-spam))))))
2287 2280
2288 (defun spam-stat-unregister-spam-routine (articles) 2281(defun spam-stat-unregister-spam-routine (articles)
2289 (spam-stat-register-spam-routine articles t)) 2282 (spam-stat-register-spam-routine articles t))
2290 2283
2291 (defun spam-stat-register-ham-routine (articles &optional unregister) 2284(defun spam-stat-register-ham-routine (articles &optional unregister)
2292 (dolist (article articles) 2285 (dolist (article articles)
2293 (let ((article-string (spam-get-article-as-string article))) 2286 (let ((article-string (spam-get-article-as-string article)))
2294 (with-temp-buffer 2287 (with-temp-buffer
2295 (insert article-string) 2288 (insert article-string)
2296 (if unregister 2289 (if unregister
2297 (spam-stat-buffer-change-to-spam) 2290 (spam-stat-buffer-change-to-spam)
2298 (spam-stat-buffer-is-non-spam)))))) 2291 (spam-stat-buffer-is-non-spam))))))
2299 2292
2300 (defun spam-stat-unregister-ham-routine (articles) 2293(defun spam-stat-unregister-ham-routine (articles)
2301 (spam-stat-register-ham-routine articles t)) 2294 (spam-stat-register-ham-routine articles t))
2302 2295
2303 (defun spam-maybe-spam-stat-load () 2296(defun spam-maybe-spam-stat-load ()
2304 (when spam-use-stat (spam-stat-load))) 2297 (when spam-use-stat (spam-stat-load)))
2305 2298
2306 (defun spam-maybe-spam-stat-save () 2299(defun spam-maybe-spam-stat-save ()
2307 (when spam-use-stat (spam-stat-save))))) 2300 (when spam-use-stat (spam-stat-save)))
2308 2301
2309;;}}} 2302;;}}}
2310 2303
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1cd62c1dfa4..b13e6a77d5d 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -731,12 +731,18 @@ it is displayed along with the global value."
731 (delete-region (1- from) from))))))) 731 (delete-region (1- from) from)))))))
732 (terpri) 732 (terpri)
733 (when locus 733 (when locus
734 (if (bufferp locus) 734 (cond
735 (princ (format "%socal in buffer %s; " 735 ((bufferp locus)
736 (if (get variable 'permanent-local) 736 (princ (format "%socal in buffer %s; "
737 "Permanently l" "L") 737 (if (get variable 'permanent-local)
738 (buffer-name))) 738 "Permanently l" "L")
739 (princ (format "It is a frame-local variable; "))) 739 (buffer-name))))
740 ((framep locus)
741 (princ (format "It is a frame-local variable; ")))
742 ((terminal-live-p locus)
743 (princ (format "It is a terminal-local variable; ")))
744 (t
745 (princ (format "It is local to %S" locus))))
740 (if (not (default-boundp variable)) 746 (if (not (default-boundp variable))
741 (princ "globally void") 747 (princ "globally void")
742 (let ((val (default-value variable))) 748 (let ((val (default-value variable)))
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 55704dccb33..846f5f95187 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -93,14 +93,26 @@
93 (overlay-put global-hl-line-overlay 'face hl-line-face)))) 93 (overlay-put global-hl-line-overlay 'face hl-line-face))))
94 94
95(defcustom hl-line-sticky-flag t 95(defcustom hl-line-sticky-flag t
96 "Non-nil means highlight the current line in all windows. 96 "Non-nil means the HL-Line mode highlight appears in all windows.
97Otherwise Hl-Line mode will highlight only in the selected 97Otherwise Hl-Line mode will highlight only in the selected
98window. Setting this variable takes effect the next time you use 98window. Setting this variable takes effect the next time you use
99the command `hl-line-mode' to turn Hl-Line mode on." 99the command `hl-line-mode' to turn Hl-Line mode on.
100
101This variable has no effect in Global Highlight Line mode.
102For that, use `global-hl-line-sticky-flag'."
100 :type 'boolean 103 :type 'boolean
101 :version "22.1" 104 :version "22.1"
102 :group 'hl-line) 105 :group 'hl-line)
103 106
107(defcustom global-hl-line-sticky-flag nil
108 "Non-nil means the Global HL-Line mode highlight appears in all windows.
109Otherwise Global Hl-Line mode will highlight only in the selected
110window. Setting this variable takes effect the next time you use
111the command `global-hl-line-mode' to turn Global Hl-Line mode on."
112 :type 'boolean
113 :version "24.1"
114 :group 'hl-line)
115
104(defvar hl-line-range-function nil 116(defvar hl-line-range-function nil
105 "If non-nil, function to call to return highlight range. 117 "If non-nil, function to call to return highlight range.
106The function of no args should return a cons cell; its car value 118The function of no args should return a cons cell; its car value
@@ -162,6 +174,10 @@ addition to `hl-line-highlight' on `post-command-hook'."
162 "Global minor mode to highlight the line about point in the current window. 174 "Global minor mode to highlight the line about point in the current window.
163With ARG, turn Global-Hl-Line mode on if ARG is positive, off otherwise. 175With ARG, turn Global-Hl-Line mode on if ARG is positive, off otherwise.
164 176
177If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode
178highlights the line about the current buffer's point in all
179windows.
180
165Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and 181Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
166`global-hl-line-highlight' on `pre-command-hook' and `post-command-hook'." 182`global-hl-line-highlight' on `pre-command-hook' and `post-command-hook'."
167 :global t 183 :global t
@@ -181,7 +197,9 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
181 (unless global-hl-line-overlay 197 (unless global-hl-line-overlay
182 (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved 198 (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved
183 (overlay-put global-hl-line-overlay 'face hl-line-face)) 199 (overlay-put global-hl-line-overlay 'face hl-line-face))
184 (overlay-put global-hl-line-overlay 'window (selected-window)) 200 (overlay-put global-hl-line-overlay 'window
201 (unless global-hl-line-sticky-flag
202 (selected-window)))
185 (hl-line-move global-hl-line-overlay)))) 203 (hl-line-move global-hl-line-overlay))))
186 204
187(defun global-hl-line-unhighlight () 205(defun global-hl-line-unhighlight ()
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 6b062f2298f..0722227d3d2 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -150,8 +150,8 @@ Prompts for bug subject. Leaves you in a mail buffer."
150 ;; Put these properties on semantically-void text. 150 ;; Put these properties on semantically-void text.
151 ;; report-emacs-bug-hook deletes these regions before sending. 151 ;; report-emacs-bug-hook deletes these regions before sending.
152 (prompt-properties '(field emacsbug-prompt 152 (prompt-properties '(field emacsbug-prompt
153 intangible but-helpful 153 intangible but-helpful
154 rear-nonsticky t)) 154 rear-nonsticky t))
155 (can-insert-mail (or (report-emacs-bug-can-use-xdg-email) 155 (can-insert-mail (or (report-emacs-bug-can-use-xdg-email)
156 (report-emacs-bug-can-use-osx-open))) 156 (report-emacs-bug-can-use-osx-open)))
157 user-point message-end-point) 157 user-point message-end-point)
@@ -175,25 +175,36 @@ Prompts for bug subject. Leaves you in a mail buffer."
175 (backward-char (length signature))) 175 (backward-char (length signature)))
176 (unless report-emacs-bug-no-explanations 176 (unless report-emacs-bug-no-explanations
177 ;; Insert warnings for novice users. 177 ;; Insert warnings for novice users.
178 (when (string-match "@gnu\\.org$" report-emacs-bug-address) 178 (if (not (equal "bug-gnu-emacs@gnu.org" report-emacs-bug-address))
179 (insert "This bug report will be sent to the Free Software Foundation,\n") 179 (insert (format "The report will be sent to %s.\n\n"
180 (let ((pos (point))) 180 report-emacs-bug-address))
181 (insert "not to your local site managers!") 181 (insert "This bug report will be sent to the ")
182 (overlay-put (make-overlay pos (point)) 'face 'highlight))) 182 (insert-button
183 (insert "\nPlease write in ") 183 "Bug-GNU-Emacs"
184 (let ((pos (point))) 184 'face 'link
185 (insert "English") 185 'help-echo (concat "mouse-2, RET: Follow this link")
186 (overlay-put (make-overlay pos (point)) 'face 'highlight)) 186 'action (lambda (button)
187 (insert " if possible, because the Emacs maintainers 187 (browse-url "http://lists.gnu.org/archive/html/bug-gnu-emacs/"))
188usually do not have translators to read other languages for them.\n\n") 188 'follow-link t)
189 (insert "Please check that the From: line gives an address where you can be reached.\n") 189 (insert " mailing list\nand the GNU bug tracker at ")
190 (insert (format "Your report will be posted to the %s mailing list" 190 (insert-button
191 report-emacs-bug-address)) 191 "debbugs.gnu.org"
192 (insert "\nand the gnu.emacs.bug news group, and at http://debbugs.gnu.org.\n\n")) 192 'face 'link
193 193 'help-echo (concat "mouse-2, RET: Follow this link")
194 (insert "Please describe exactly what actions triggered the bug\n" 194 'action (lambda (button)
195 "and the precise symptoms of the bug. If you can, give\n" 195 (browse-url "http://debbugs.gnu.org/"))
196 "a recipe starting from `emacs -Q':\n\n") 196 'follow-link t)
197
198 (insert ". Please check that
199the From: line contains a valid email address. After a delay of up
200to one day, you should receive an acknowledgement at that address.
201
202Please write in English if possible, as the Emacs maintainers
203usually do not have translators for other languages.\n\n")))
204
205 (insert "Please describe exactly what actions triggered the bug, and\n"
206 "the precise symptoms of the bug. If you can, give a recipe\n"
207 "starting from `emacs -Q':\n\n")
197 (add-text-properties (save-excursion 208 (add-text-properties (save-excursion
198 (rfc822-goto-eoh) 209 (rfc822-goto-eoh)
199 (line-beginning-position 2)) 210 (line-beginning-position 2))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 640f1dfff29..02f78635e26 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4379,7 +4379,7 @@ With prefix argument N moves forward N messages with these labels.
4379 4379
4380;;;*** 4380;;;***
4381 4381
4382;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "5e3ff91cc650ca2c5c147dcf3397dfcf") 4382;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "30ab95e291380f184dff5fa6cde75520")
4383;;; Generated autoloads from rmailmm.el 4383;;; Generated autoloads from rmailmm.el
4384 4384
4385(autoload 'rmail-mime "rmailmm" "\ 4385(autoload 'rmail-mime "rmailmm" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index a02d388a6f7..651defeaf46 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -843,8 +843,18 @@ The other arguments are the same as `rmail-mime-multipart-handler'."
843 ;; the beginning of the next part. The current point is just 843 ;; the beginning of the next part. The current point is just
844 ;; after the boundary tag. 844 ;; after the boundary tag.
845 (setq beg (point-min)) 845 (setq beg (point-min))
846 (while (search-forward boundary nil t) 846
847 (setq end (match-beginning 0)) 847 (while (or (and (search-forward boundary nil t)
848 (setq end (match-beginning 0)))
849 ;; If the boundary does not appear at all,
850 ;; the message was truncated.
851 ;; Handle the rest of the truncated message
852 ;; (if it isn't empty) by pretending that the boundary
853 ;; appears at the end of the message.
854 (and (save-excursion
855 (skip-chars-forward "\n")
856 (> (point-max) (point)))
857 (setq end (point-max))))
848 ;; If this is the last boundary according to RFC 2046, hide the 858 ;; If this is the last boundary according to RFC 2046, hide the
849 ;; epilogue, else hide the boundary only. Use a marker for 859 ;; epilogue, else hide the boundary only. Use a marker for
850 ;; `next' because `rmail-mime-show' may change the buffer. 860 ;; `next' because `rmail-mime-show' may change the buffer.
@@ -852,6 +862,9 @@ The other arguments are the same as `rmail-mime-multipart-handler'."
852 (setq next (point-max-marker))) 862 (setq next (point-max-marker)))
853 ((looking-at "[ \t]*\n") 863 ((looking-at "[ \t]*\n")
854 (setq next (copy-marker (match-end 0) t))) 864 (setq next (copy-marker (match-end 0) t)))
865 ((= end (point-max))
866 ;; We're handling what's left of a truncated message.
867 (setq next (point-max-marker)))
855 (t 868 (t
856 ;; The original code signalled an error as below, but 869 ;; The original code signalled an error as below, but
857 ;; this line may be a boundary of nested multipart. So, 870 ;; this line may be a boundary of nested multipart. So,
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 3c9ea9de573..3fd2d9ddf21 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -488,9 +488,9 @@ The list is in preference order.")
488 (secret . "SMTP password for %u@%h: "))) 488 (secret . "SMTP password for %u@%h: ")))
489 (auth-info (car 489 (auth-info (car
490 (auth-source-search 490 (auth-source-search
491 :max 1
492 :host host 491 :host host
493 :port port 492 :port port
493 :max 1
494 :require (and ask-for-password 494 :require (and ask-for-password
495 '(:user :secret)) 495 '(:user :secret))
496 :create ask-for-password))) 496 :create ask-for-password)))
@@ -615,6 +615,8 @@ The list is in preference order.")
615 (and mail-specify-envelope-from 615 (and mail-specify-envelope-from
616 (mail-envelope-from)) 616 (mail-envelope-from))
617 user-mail-address)) 617 user-mail-address))
618 (coding-system-for-read 'binary)
619 (coding-system-for-write 'binary)
618 response-code 620 response-code
619 process-buffer 621 process-buffer
620 result 622 result
@@ -651,7 +653,9 @@ The list is in preference order.")
651 653
652 ;; If we couldn't access the server at all, we give up. 654 ;; If we couldn't access the server at all, we give up.
653 (unless (setq process (car result)) 655 (unless (setq process (car result))
654 (throw 'done "Unable to contact server")) 656 (throw 'done (if (plist-get (cdr result) :error)
657 (plist-get (cdr result) :error)
658 "Unable to contact server")))
655 659
656 ;; set the send-filter 660 ;; set the send-filter
657 (set-process-filter process 'smtpmail-process-filter) 661 (set-process-filter process 'smtpmail-process-filter)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 1282f86d503..41716dbdacd 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1723,11 +1723,12 @@ good, skip, fatal, or unknown."
1723;;; Temporary file location and deletion... 1723;;; Temporary file location and deletion...
1724;;; ------------------------------------------------------------ 1724;;; ------------------------------------------------------------
1725 1725
1726(defun ange-ftp-make-tmp-name (host) 1726(defun ange-ftp-make-tmp-name (host &optional suffix)
1727 "This routine will return the name of a new file." 1727 "This routine will return the name of a new file."
1728 (make-temp-file (if (ange-ftp-use-gateway-p host) 1728 (make-temp-file (if (ange-ftp-use-gateway-p host)
1729 ange-ftp-gateway-tmp-name-template 1729 ange-ftp-gateway-tmp-name-template
1730 ange-ftp-tmp-name-template))) 1730 ange-ftp-tmp-name-template)
1731 nil suffix))
1731 1732
1732(defun ange-ftp-del-tmp-name (filename) 1733(defun ange-ftp-del-tmp-name (filename)
1733 "Force to delete temporary file." 1734 "Force to delete temporary file."
@@ -4139,7 +4140,8 @@ directory, so that Emacs will know its current contents."
4139 (let* ((fn1 (expand-file-name file)) 4140 (let* ((fn1 (expand-file-name file))
4140 (pa1 (ange-ftp-ftp-name fn1))) 4141 (pa1 (ange-ftp-ftp-name fn1)))
4141 (if pa1 4142 (if pa1
4142 (let ((tmp1 (ange-ftp-make-tmp-name (car pa1)))) 4143 (let ((tmp1 (ange-ftp-make-tmp-name (car pa1)
4144 (file-name-extension file t))))
4143 (ange-ftp-copy-file-internal fn1 tmp1 t nil 4145 (ange-ftp-copy-file-internal fn1 tmp1 t nil
4144 (format "Getting %s" fn1)) 4146 (format "Getting %s" fn1))
4145 tmp1)))) 4147 tmp1))))
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index 161d7252d6e..a8989398e15 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -46,7 +46,8 @@
46(require 'starttls) 46(require 'starttls)
47(require 'auth-source) 47(require 'auth-source)
48 48
49(declare-function gnutls-negotiate "gnutls" t t) ; defun* 49(autoload 'gnutls-negotiate "gnutls")
50(autoload 'open-gnutls-stream "gnutls")
50 51
51;;;###autoload 52;;;###autoload
52(defun open-network-stream (name buffer host service &rest parameters) 53(defun open-network-stream (name buffer host service &rest parameters)
@@ -161,7 +162,8 @@ functionality.
161 (list (car result) 162 (list (car result)
162 :greeting (nth 1 result) 163 :greeting (nth 1 result)
163 :capabilities (nth 2 result) 164 :capabilities (nth 2 result)
164 :type (nth 3 result)) 165 :type (nth 3 result)
166 :error (nth 4 result))
165 (car result)))))) 167 (car result))))))
166 168
167(defun network-stream-certificate (host service parameters) 169(defun network-stream-certificate (host service parameters)
@@ -207,21 +209,25 @@ functionality.
207 (greeting (network-stream-get-response stream start eoc)) 209 (greeting (network-stream-get-response stream start eoc))
208 (capabilities (network-stream-command stream capability-command eoc)) 210 (capabilities (network-stream-command stream capability-command eoc))
209 (resulting-type 'plain) 211 (resulting-type 'plain)
210 starttls-command) 212 (builtin-starttls (and (fboundp 'gnutls-available-p)
211 213 (gnutls-available-p)))
214 starttls-command error)
215
216 ;; First check whether the server supports STARTTLS at all.
217 (when (and capabilities success-string starttls-function)
218 (setq starttls-command
219 (funcall starttls-function capabilities)))
212 ;; If we have built-in STARTTLS support, try to upgrade the 220 ;; If we have built-in STARTTLS support, try to upgrade the
213 ;; connection. 221 ;; connection.
214 (when (and (or (fboundp 'open-gnutls-stream) 222 (when (and starttls-command
223 (or builtin-starttls
215 (and (or require-tls 224 (and (or require-tls
216 (plist-get parameters :use-starttls-if-possible)) 225 (plist-get parameters :use-starttls-if-possible))
217 (executable-find "gnutls-cli"))) 226 (executable-find "gnutls-cli")))
218 capabilities success-string starttls-function
219 (setq starttls-command
220 (funcall starttls-function capabilities))
221 (not (eq (plist-get parameters :type) 'plain))) 227 (not (eq (plist-get parameters :type) 'plain)))
222 ;; If using external STARTTLS, drop this connection and start 228 ;; If using external STARTTLS, drop this connection and start
223 ;; anew with `starttls-open-stream'. 229 ;; anew with `starttls-open-stream'.
224 (unless (fboundp 'open-gnutls-stream) 230 (unless builtin-starttls
225 (delete-process stream) 231 (delete-process stream)
226 (setq start (with-current-buffer buffer (point-max))) 232 (setq start (with-current-buffer buffer (point-max)))
227 (let* ((starttls-use-gnutls t) 233 (let* ((starttls-use-gnutls t)
@@ -240,15 +246,15 @@ functionality.
240 "--x509certfile" (expand-file-name (nth 1 cert))) 246 "--x509certfile" (expand-file-name (nth 1 cert)))
241 starttls-extra-arguments))) 247 starttls-extra-arguments)))
242 (setq stream (starttls-open-stream name buffer host service))) 248 (setq stream (starttls-open-stream name buffer host service)))
243 (network-stream-get-response stream start eoc)) 249 (network-stream-get-response stream start eoc)
244 ;; Requery capabilities for protocols that require it; i.e., 250 ;; Requery capabilities for protocols that require it; i.e.,
245 ;; EHLO for SMTP. 251 ;; EHLO for SMTP.
246 (when (plist-get parameters :always-query-capabilities) 252 (when (plist-get parameters :always-query-capabilities)
247 (network-stream-command stream capability-command eoc)) 253 (network-stream-command stream capability-command eoc)))
248 (when (string-match success-string 254 (when (string-match success-string
249 (network-stream-command stream starttls-command eoc)) 255 (network-stream-command stream starttls-command eoc))
250 ;; The server said it was OK to begin STARTTLS negotiations. 256 ;; The server said it was OK to begin STARTTLS negotiations.
251 (if (fboundp 'open-gnutls-stream) 257 (if builtin-starttls
252 (let ((cert (network-stream-certificate host service parameters))) 258 (let ((cert (network-stream-certificate host service parameters)))
253 (gnutls-negotiate :process stream :hostname host 259 (gnutls-negotiate :process stream :hostname host
254 :keylist (and cert (list cert)))) 260 :keylist (and cert (list cert))))
@@ -268,11 +274,22 @@ functionality.
268 (network-stream-command stream capability-command eoc)))) 274 (network-stream-command stream capability-command eoc))))
269 275
270 ;; If TLS is mandatory, close the connection if it's unencrypted. 276 ;; If TLS is mandatory, close the connection if it's unencrypted.
271 (and require-tls 277 (when (and (or require-tls
272 (eq resulting-type 'plain) 278 ;; The server said it was possible to do STARTTLS,
273 (delete-process stream)) 279 ;; and we wanted to use it...
280 (and starttls-command
281 (plist-get parameters :use-starttls-if-possible)))
282 ;; ... but Emacs wasn't able to -- either no built-in
283 ;; support, or no gnutls-cli installed.
284 (eq resulting-type 'plain))
285 (setq error
286 (if require-tls
287 "Server does not support TLS"
288 "Server supports STARTTLS, but Emacs does not have support for it"))
289 (delete-process stream)
290 (setq stream nil))
274 ;; Return value: 291 ;; Return value:
275 (list stream greeting capabilities resulting-type))) 292 (list stream greeting capabilities resulting-type error)))
276 293
277(defun network-stream-command (stream command eoc) 294(defun network-stream-command (stream command eoc)
278 (when command 295 (when command
@@ -296,7 +313,8 @@ functionality.
296(defun network-stream-open-tls (name buffer host service parameters) 313(defun network-stream-open-tls (name buffer host service parameters)
297 (with-current-buffer buffer 314 (with-current-buffer buffer
298 (let* ((start (point-max)) 315 (let* ((start (point-max))
299 (use-builtin-gnutls (fboundp 'open-gnutls-stream)) 316 (use-builtin-gnutls (and (fboundp 'gnutls-available-p)
317 (gnutls-available-p)))
300 (stream 318 (stream
301 (funcall (if use-builtin-gnutls 319 (funcall (if use-builtin-gnutls
302 'open-gnutls-stream 320 'open-gnutls-stream
@@ -307,7 +325,8 @@ functionality.
307 (list nil nil nil 'plain) 325 (list nil nil nil 'plain)
308 ;; If we're using tls.el, we have to delete the output from 326 ;; If we're using tls.el, we have to delete the output from
309 ;; openssl/gnutls-cli. 327 ;; openssl/gnutls-cli.
310 (when (and (null use-builtin-gnutls) eoc) 328 (when (and (null use-builtin-gnutls)
329 eoc)
311 (network-stream-get-response stream start eoc) 330 (network-stream-get-response stream start eoc)
312 (goto-char (point-min)) 331 (goto-char (point-min))
313 (when (re-search-forward eoc nil t) 332 (when (re-search-forward eoc nil t)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 8eb2d01c097..48df73a678f 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1522,7 +1522,7 @@ the last)."
1522(defvar compilation-error-regexp-alist) 1522(defvar compilation-error-regexp-alist)
1523 1523
1524;;;###autoload 1524;;;###autoload
1525(defun cperl-mode () 1525(define-derived-mode cperl-mode prog-mode "CPerl"
1526 "Major mode for editing Perl code. 1526 "Major mode for editing Perl code.
1527Expression and list commands understand all C brackets. 1527Expression and list commands understand all C brackets.
1528Tab indents for Perl code. 1528Tab indents for Perl code.
@@ -1695,9 +1695,6 @@ with no args.
1695DO NOT FORGET to read micro-docs (available from `Perl' menu) 1695DO NOT FORGET to read micro-docs (available from `Perl' menu)
1696or as help on variables `cperl-tips', `cperl-problems', 1696or as help on variables `cperl-tips', `cperl-problems',
1697`cperl-praise', `cperl-speed'." 1697`cperl-praise', `cperl-speed'."
1698 (interactive)
1699 (kill-all-local-variables)
1700 (use-local-map cperl-mode-map)
1701 (if (cperl-val 'cperl-electric-linefeed) 1698 (if (cperl-val 'cperl-electric-linefeed)
1702 (progn 1699 (progn
1703 (local-set-key "\C-J" 'cperl-linefeed) 1700 (local-set-key "\C-J" 'cperl-linefeed)
@@ -1710,8 +1707,6 @@ or as help on variables `cperl-tips', `cperl-problems',
1710 (cperl-define-key "\C-hf" 'cperl-info-on-current-command [(control h) f]) 1707 (cperl-define-key "\C-hf" 'cperl-info-on-current-command [(control h) f])
1711 (cperl-define-key "\C-c\C-hf" 'cperl-info-on-command 1708 (cperl-define-key "\C-c\C-hf" 'cperl-info-on-command
1712 [(control c) (control h) f]))) 1709 [(control c) (control h) f])))
1713 (setq major-mode cperl-use-major-mode)
1714 (setq mode-name "CPerl")
1715 (let ((prev-a-c abbrevs-changed)) 1710 (let ((prev-a-c abbrevs-changed))
1716 (define-abbrev-table 'cperl-mode-abbrev-table '( 1711 (define-abbrev-table 'cperl-mode-abbrev-table '(
1717 ("if" "if" cperl-electric-keyword 0) 1712 ("if" "if" cperl-electric-keyword 0)
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index e5a62780ad6..cdb5f2a715d 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -26,6 +26,7 @@
26;; Major mode for editing F90 programs in FREE FORMAT. 26;; Major mode for editing F90 programs in FREE FORMAT.
27;; The minor language revision F95 is also supported (with font-locking). 27;; The minor language revision F95 is also supported (with font-locking).
28;; Some/many (?) aspects of F2003 are supported. 28;; Some/many (?) aspects of F2003 are supported.
29;; Some aspects of F2008 are supported.
29 30
30;; Knows about continuation lines, named structured statements, and other 31;; Knows about continuation lines, named structured statements, and other
31;; features in F90 including HPF (High Performance Fortran) structures. 32;; features in F90 including HPF (High Performance Fortran) structures.
@@ -207,6 +208,13 @@
207 :group 'f90-indent 208 :group 'f90-indent
208 :version "23.1") 209 :version "23.1")
209 210
211(defcustom f90-critical-indent 2
212 "Extra indentation applied to BLOCK, CRITICAL blocks."
213 :type 'integer
214 :safe 'integerp
215 :group 'f90-indent
216 :version "24.1")
217
210(defcustom f90-continuation-indent 5 218(defcustom f90-continuation-indent 5
211 "Extra indentation applied to continuation lines." 219 "Extra indentation applied to continuation lines."
212 :type 'integer 220 :type 'integer
@@ -310,8 +318,9 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
310 "deferred" "enum" "enumerator" "extends" "extends_type_of" 318 "deferred" "enum" "enumerator" "extends" "extends_type_of"
311 "final" "generic" "import" "non_intrinsic" "non_overridable" 319 "final" "generic" "import" "non_intrinsic" "non_overridable"
312 "nopass" "pass" "protected" "same_type_as" "value" "volatile" 320 "nopass" "pass" "protected" "same_type_as" "value" "volatile"
313 ;; F2008 321 ;; F2008.
314 "contiguous" 322 "contiguous" "submodule" "concurrent" "codimension"
323 "sync all" "sync memory" "critical" "image_index"
315 ) 'words) 324 ) 'words)
316 "Regexp used by the function `f90-change-keywords'.") 325 "Regexp used by the function `f90-change-keywords'.")
317 326
@@ -329,6 +338,10 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
329 ;; F2003. asynchronous separate. 338 ;; F2003. asynchronous separate.
330 "abstract" "deferred" "import" "final" "non_intrinsic" "non_overridable" 339 "abstract" "deferred" "import" "final" "non_intrinsic" "non_overridable"
331 "nopass" "pass" "protected" "value" "volatile" 340 "nopass" "pass" "protected" "value" "volatile"
341 ;; F2008.
342 ;; "concurrent" is only in the sense of "do [,] concurrent", but given
343 ;; the [,] it's simpler to just do every instance (cf "do while").
344 "contiguous" "concurrent" "codimension" "sync all" "sync memory"
332 ) 'words) 345 ) 'words)
333 "Keyword-regexp for font-lock level >= 3.") 346 "Keyword-regexp for font-lock level >= 3.")
334 347
@@ -374,7 +387,9 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
374 "bessel_j0" "bessel_j1" "bessel_jn" 387 "bessel_j0" "bessel_j1" "bessel_jn"
375 "bessel_y0" "bessel_y1" "bessel_yn" 388 "bessel_y0" "bessel_y1" "bessel_yn"
376 "erf" "erfc" "erfc_scaled" "gamma" "hypot" "log_gamma" 389 "erf" "erfc" "erfc_scaled" "gamma" "hypot" "log_gamma"
377 "norm2" "parity" "findloc" 390 "norm2" "parity" "findloc" "is_contiguous"
391 "sync images" "lock" "unlock" "image_index"
392 "lcobound" "ucobound" "num_images" "this_image"
378 ;; F2008 iso_fortran_env module. 393 ;; F2008 iso_fortran_env module.
379 "compiler_options" "compiler_version" 394 "compiler_options" "compiler_version"
380 ;; F2008 iso_c_binding module. 395 ;; F2008 iso_c_binding module.
@@ -445,6 +460,7 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
445 "character_kinds" "int8" "int16" "int32" "int64" 460 "character_kinds" "int8" "int16" "int32" "int64"
446 "integer_kinds" "iostat_inquire_internal_unit" 461 "integer_kinds" "iostat_inquire_internal_unit"
447 "logical_kinds" "real_kinds" "real32" "real64" "real128" 462 "logical_kinds" "real_kinds" "real32" "real64" "real128"
463 "lock_type" "atomic_int_kind" "atomic_logical_kind"
448 ) 'words) 464 ) 'words)
449 "Regexp for Fortran intrinsic constants.") 465 "Regexp for Fortran intrinsic constants.")
450 466
@@ -482,13 +498,18 @@ type-name parts, respectively."
482;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face)) 498;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face))
483 '(f90-typedef-matcher 499 '(f90-typedef-matcher
484 (1 font-lock-keyword-face) (2 font-lock-function-name-face)) 500 (1 font-lock-keyword-face) (2 font-lock-function-name-face))
485 ;; F2003. Prevent operators being highlighted as functions. 501 ;; F2003. Prevent operators being highlighted as functions.
486 '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\ 502 '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\
487read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) 503read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t))
488 ;; Other functions and declarations. Named interfaces = F2003. 504 ;; Other functions and declarations. Named interfaces = F2003.
489 '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|module\\|function\\|associate\\|\ 505 ;; F2008: end submodule submodule_name.
490subroutine\\|interface\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?" 506 '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|\\(?:sub\\)?module\\|\
507function\\|associate\\|subroutine\\|interface\\)\\|use\\|call\\)\
508\\>[ \t]*\\(\\sw+\\)?"
491 (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) 509 (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t))
510 ;; F2008: submodule (parent_name) submodule_name.
511 '("\\<\\(submodule\\)\\>[ \t]*([^)\n]+)[ \t]*\\(\\sw+\\)?"
512 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
492 ;; F2003. 513 ;; F2003.
493 '("\\<\\(use\\)[ \t]*,[ \t]*\\(\\(?:non_\\)?intrinsic\\)[ \t]*::[ \t]*\ 514 '("\\<\\(use\\)[ \t]*,[ \t]*\\(\\(?:non_\\)?intrinsic\\)[ \t]*::[ \t]*\
494\\(\\sw+\\)" 515\\(\\sw+\\)"
@@ -575,12 +596,16 @@ logical\\|double[ \t]*precision\\|\
575 ;; enum (F2003; must be followed by ", bind(C)"). 596 ;; enum (F2003; must be followed by ", bind(C)").
576 '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face)) 597 '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face))
577 ;; end do, enum (F2003), if, select, where, and forall constructs. 598 ;; end do, enum (F2003), if, select, where, and forall constructs.
578 '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ 599 ;; block, critical (F2008).
600 ;; Note that "block data" may get somewhat mixed up with F2008 blocks,
601 ;; but since the former is obsolete I'm not going to worry about it.
602 '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\|\
603block\\|critical\\)\\)\\>\
579\\([ \t]+\\(\\sw+\\)\\)?" 604\\([ \t]+\\(\\sw+\\)\\)?"
580 (1 font-lock-keyword-face) (3 font-lock-constant-face nil t)) 605 (1 font-lock-keyword-face) (3 font-lock-constant-face nil t))
581 '("^[ \t0-9]*\\(\\(\\sw+\\)[ \t]*:[ \t]*\\)?\\(\\(if\\|\ 606 '("^[ \t0-9]*\\(\\(\\sw+\\)[ \t]*:[ \t]*\\)?\\(\\(if\\|\
582do\\([ \t]*while\\)?\\|select[ \t]*\\(?:case\\|type\\)\\|where\\|\ 607do\\([ \t]*while\\)?\\|select[ \t]*\\(?:case\\|type\\)\\|where\\|\
583forall\\)\\)\\>" 608forall\\|block\\|critical\\)\\)\\>"
584 (2 font-lock-constant-face nil t) (3 font-lock-keyword-face)) 609 (2 font-lock-constant-face nil t) (3 font-lock-keyword-face))
585 ;; Implicit declaration. 610 ;; Implicit declaration.
586 '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\ 611 '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
@@ -794,12 +819,14 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
794 (regexp-opt '("do" "if" "interface" "function" "module" "program" 819 (regexp-opt '("do" "if" "interface" "function" "module" "program"
795 "select" "subroutine" "type" "where" "forall" 820 "select" "subroutine" "type" "where" "forall"
796 ;; F2003. 821 ;; F2003.
797 "enum" "associate")) 822 "enum" "associate"
823 ;; F2008.
824 "submodule" "block" "critical"))
798 "\\)\\>") 825 "\\)\\>")
799 "Regexp potentially indicating a \"block\" of F90 code.") 826 "Regexp potentially indicating a \"block\" of F90 code.")
800 827
801(defconst f90-program-block-re 828(defconst f90-program-block-re
802 (regexp-opt '("program" "module" "subroutine" "function") 'paren) 829 (regexp-opt '("program" "module" "subroutine" "function" "submodule") 'paren)
803 "Regexp used to locate the start/end of a \"subprogram\".") 830 "Regexp used to locate the start/end of a \"subprogram\".")
804 831
805;; "class is" is F2003. 832;; "class is" is F2003.
@@ -857,7 +884,8 @@ allowed. This minor issue currently only affects \"(/\" and \"/)\".")
857 (concat "^[ \t0-9]*\\<end[ \t]*" 884 (concat "^[ \t0-9]*\\<end[ \t]*"
858 (regexp-opt '("do" "if" "forall" "function" "interface" 885 (regexp-opt '("do" "if" "forall" "function" "interface"
859 "module" "program" "select" "subroutine" 886 "module" "program" "select" "subroutine"
860 "type" "where" "enum" "associate") t) 887 "type" "where" "enum" "associate" "submodule"
888 "block" "critical") t)
861 "\\>") 889 "\\>")
862 "Regexp matching the end of an F90 \"block\", from the line start. 890 "Regexp matching the end of an F90 \"block\", from the line start.
863Used in the F90 entry in `hs-special-modes-alist'.") 891Used in the F90 entry in `hs-special-modes-alist'.")
@@ -883,10 +911,10 @@ Used in the F90 entry in `hs-special-modes-alist'.")
883 "[^i(!\n\"\& \t]\\|" ; not-i( 911 "[^i(!\n\"\& \t]\\|" ; not-i(
884 "i[^s!\n\"\& \t]\\|" ; i not-s 912 "i[^s!\n\"\& \t]\\|" ; i not-s
885 "is\\sw\\)\\|" 913 "is\\sw\\)\\|"
886 ;; "abstract interface" is F2003. 914 ;; "abstract interface" is F2003; "submodule" is F2008.
887 "program\\|\\(?:abstract[ \t]*\\)?interface\\|module\\|" 915 "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|"
888 ;; "enum", but not "enumerator". 916 ;; "enum", but not "enumerator".
889 "function\\|subroutine\\|enum[^e]\\|associate" 917 "function\\|subroutine\\|enum[^e]\\|associate\\|block\\|critical"
890 "\\)" 918 "\\)"
891 "[ \t]*") 919 "[ \t]*")
892 "Regexp matching the start of an F90 \"block\", from the line start. 920 "Regexp matching the start of an F90 \"block\", from the line start.
@@ -924,6 +952,8 @@ Set subexpression 1 in the match-data to the name of the type."
924 ) 952 )
925 (list 953 (list
926 '(nil "^[ \t0-9]*program[ \t]+\\(\\sw+\\)" 1) 954 '(nil "^[ \t0-9]*program[ \t]+\\(\\sw+\\)" 1)
955 '("Submodules" "^[ \t0-9]*submodule[ \t]*([^)\n]+)[ \t]*\
956\\(\\sw+\\)[ \t]*\\(!\\|$\\)" 1)
927 '("Modules" "^[ \t0-9]*module[ \t]+\\(\\sw+\\)[ \t]*\\(!\\|$\\)" 1) 957 '("Modules" "^[ \t0-9]*module[ \t]+\\(\\sw+\\)[ \t]*\\(!\\|$\\)" 1)
928 (list "Types" 'f90-imenu-type-matcher 1) 958 (list "Types" 'f90-imenu-type-matcher 1)
929 ;; Does not handle: "type[, stuff] :: foo". 959 ;; Does not handle: "type[, stuff] :: foo".
@@ -971,11 +1001,13 @@ Set subexpression 1 in the match-data to the name of the type."
971 ("`asy" . "asynchronous" ) 1001 ("`asy" . "asynchronous" )
972 ("`ba" . "backspace" ) 1002 ("`ba" . "backspace" )
973 ("`bd" . "block data" ) 1003 ("`bd" . "block data" )
1004 ("`bl" . "block" )
974 ("`c" . "character" ) 1005 ("`c" . "character" )
975 ("`cl" . "close" ) 1006 ("`cl" . "close" )
976 ("`cm" . "common" ) 1007 ("`cm" . "common" )
977 ("`cx" . "complex" ) 1008 ("`cx" . "complex" )
978 ("`cn" . "contains" ) 1009 ("`cn" . "contains" )
1010 ("`cr" . "critical" )
979 ("`cy" . "cycle" ) 1011 ("`cy" . "cycle" )
980 ("`de" . "deallocate" ) 1012 ("`de" . "deallocate" )
981 ("`df" . "define" ) 1013 ("`df" . "define" )
@@ -1055,6 +1087,10 @@ Variables controlling indentation style and extra features:
1055`f90-program-indent' 1087`f90-program-indent'
1056 Extra indentation within program/module/subroutine/function blocks 1088 Extra indentation within program/module/subroutine/function blocks
1057 (default 2). 1089 (default 2).
1090`f90-associate-indent'
1091 Extra indentation within associate blocks (default 2).
1092`f90-critical-indent'
1093 Extra indentation within critical/block blocks (default 2).
1058`f90-continuation-indent' 1094`f90-continuation-indent'
1059 Extra indentation applied to continuation lines (default 5). 1095 Extra indentation applied to continuation lines (default 5).
1060`f90-comment-region' 1096`f90-comment-region'
@@ -1225,6 +1261,25 @@ NAME is nil if the statement has no label."
1225 (if (looking-at "\\<\\(associate\\)[ \t]*(") 1261 (if (looking-at "\\<\\(associate\\)[ \t]*(")
1226 (list (match-string 1)))) 1262 (list (match-string 1))))
1227 1263
1264(defsubst f90-looking-at-critical ()
1265 "Return (KIND NAME) if a critical or block block starts after point."
1266 (if (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\\(critical\\|block\\)\\>")
1267 (let ((struct (match-string 3))
1268 (label (match-string 2)))
1269 (if (or (not (string-equal "block" struct))
1270 (save-excursion
1271 (skip-chars-forward " \t")
1272 (not (looking-at "data\\>"))))
1273 (list struct label)))))
1274
1275(defsubst f90-looking-at-end-critical ()
1276 "Return non-nil if a critical or block block ends after point."
1277 (if (looking-at "end[ \t]*\\(critical\\|block\\)\\>")
1278 (or (not (string-equal "block" (match-string 1)))
1279 (save-excursion
1280 (skip-chars-forward " \t")
1281 (not (looking-at "data\\>"))))))
1282
1228(defsubst f90-looking-at-where-or-forall () 1283(defsubst f90-looking-at-where-or-forall ()
1229 "Return (KIND NAME) if a where or forall block starts after point. 1284 "Return (KIND NAME) if a where or forall block starts after point.
1230NAME is nil if the statement has no label." 1285NAME is nil if the statement has no label."
@@ -1275,6 +1330,8 @@ write\\)[ \t]*([^)\n]*)")
1275 ((and (not (looking-at "module[ \t]*procedure\\>")) 1330 ((and (not (looking-at "module[ \t]*procedure\\>"))
1276 (looking-at "\\(module\\)[ \t]+\\(\\sw+\\)\\>")) 1331 (looking-at "\\(module\\)[ \t]+\\(\\sw+\\)\\>"))
1277 (list (match-string 1) (match-string 2))) 1332 (list (match-string 1) (match-string 2)))
1333 ((looking-at "\\(submodule\\)[ \t]*([^)\n]+)[ \t]*\\(\\sw+\\)\\>")
1334 (list (match-string 1) (match-string 2)))
1278 ((and (not (looking-at "end[ \t]*\\(function\\|subroutine\\)")) 1335 ((and (not (looking-at "end[ \t]*\\(function\\|subroutine\\)"))
1279 (looking-at "[^!'\"\&\n]*\\(function\\|subroutine\\)[ \t]+\ 1336 (looking-at "[^!'\"\&\n]*\\(function\\|subroutine\\)[ \t]+\
1280\\(\\sw+\\)")) 1337\\(\\sw+\\)"))
@@ -1349,8 +1406,9 @@ if all else fails."
1349 (save-excursion 1406 (save-excursion
1350 (not (or (looking-at "end") 1407 (not (or (looking-at "end")
1351 (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\ 1408 (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
1352\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\)\\>") 1409\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
1353 (looking-at "\\(program\\|module\\|\ 1410block\\|critical\\)\\>")
1411 (looking-at "\\(program\\|\\(?:sub\\)?module\\|\
1354\\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\>") 1412\\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\>")
1355 (looking-at "\\(contains\\|\\sw+[ \t]*:\\)") 1413 (looking-at "\\(contains\\|\\sw+[ \t]*:\\)")
1356 (looking-at f90-type-def-re) 1414 (looking-at f90-type-def-re)
@@ -1393,6 +1451,8 @@ Does not check type and subprogram indentation."
1393 (f90-looking-at-where-or-forall) 1451 (f90-looking-at-where-or-forall)
1394 (f90-looking-at-select-case)) 1452 (f90-looking-at-select-case))
1395 (setq icol (+ icol f90-if-indent))) 1453 (setq icol (+ icol f90-if-indent)))
1454 ;; FIXME this makes no sense, because this section/function is
1455 ;; only for if/do/select/where/forall ?
1396 ((f90-looking-at-associate) 1456 ((f90-looking-at-associate)
1397 (setq icol (+ icol f90-associate-indent)))) 1457 (setq icol (+ icol f90-associate-indent))))
1398 (end-of-line)) 1458 (end-of-line))
@@ -1406,12 +1466,16 @@ Does not check type and subprogram indentation."
1406 (f90-looking-at-where-or-forall) 1466 (f90-looking-at-where-or-forall)
1407 (f90-looking-at-select-case)) 1467 (f90-looking-at-select-case))
1408 (setq icol (+ icol f90-if-indent))) 1468 (setq icol (+ icol f90-if-indent)))
1469 ;; FIXME this makes no sense, because this section/function is
1470 ;; only for if/do/select/where/forall ?
1409 ((f90-looking-at-associate) 1471 ((f90-looking-at-associate)
1410 (setq icol (+ icol f90-associate-indent))) 1472 (setq icol (+ icol f90-associate-indent)))
1411 ((looking-at f90-end-if-re) 1473 ((looking-at f90-end-if-re)
1412 (setq icol (- icol f90-if-indent))) 1474 (setq icol (- icol f90-if-indent)))
1413 ((looking-at f90-end-associate-re) 1475 ((looking-at f90-end-associate-re)
1414 (setq icol (- icol f90-associate-indent))) 1476 (setq icol (- icol f90-associate-indent)))
1477 ((f90-looking-at-end-critical)
1478 (setq icol (- icol f90-critical-indent)))
1415 ((looking-at "end[ \t]*do\\>") 1479 ((looking-at "end[ \t]*do\\>")
1416 (setq icol (- icol f90-do-indent)))) 1480 (setq icol (- icol f90-do-indent))))
1417 (end-of-line)) 1481 (end-of-line))
@@ -1459,6 +1523,8 @@ Does not check type and subprogram indentation."
1459 (setq icol (+ icol f90-type-indent))) 1523 (setq icol (+ icol f90-type-indent)))
1460 ((f90-looking-at-associate) 1524 ((f90-looking-at-associate)
1461 (setq icol (+ icol f90-associate-indent))) 1525 (setq icol (+ icol f90-associate-indent)))
1526 ((f90-looking-at-critical)
1527 (setq icol (+ icol f90-critical-indent)))
1462 ((or (f90-looking-at-program-block-start) 1528 ((or (f90-looking-at-program-block-start)
1463 (looking-at "contains[ \t]*\\($\\|!\\)")) 1529 (looking-at "contains[ \t]*\\($\\|!\\)"))
1464 (setq icol (+ icol f90-program-indent))))) 1530 (setq icol (+ icol f90-program-indent)))))
@@ -1478,6 +1544,8 @@ Does not check type and subprogram indentation."
1478 (setq icol (- icol f90-type-indent))) 1544 (setq icol (- icol f90-type-indent)))
1479 ((looking-at f90-end-associate-re) 1545 ((looking-at f90-end-associate-re)
1480 (setq icol (- icol f90-associate-indent))) 1546 (setq icol (- icol f90-associate-indent)))
1547 ((f90-looking-at-end-critical)
1548 (setq icol (- icol f90-critical-indent)))
1481 ((or (looking-at "contains[ \t]*\\(!\\|$\\)") 1549 ((or (looking-at "contains[ \t]*\\(!\\|$\\)")
1482 (f90-looking-at-program-block-end)) 1550 (f90-looking-at-program-block-end))
1483 (setq icol (- icol f90-program-indent)))))))))) 1551 (setq icol (- icol f90-program-indent))))))))))
@@ -1584,6 +1652,7 @@ Interactively, pushes mark before moving point."
1584 (f90-looking-at-select-case) 1652 (f90-looking-at-select-case)
1585 (f90-looking-at-type-like) 1653 (f90-looking-at-type-like)
1586 (f90-looking-at-associate) 1654 (f90-looking-at-associate)
1655 (f90-looking-at-critical)
1587 (f90-looking-at-program-block-start) 1656 (f90-looking-at-program-block-start)
1588 (f90-looking-at-if-then) 1657 (f90-looking-at-if-then)
1589 (f90-looking-at-where-or-forall))) 1658 (f90-looking-at-where-or-forall)))
@@ -1645,6 +1714,7 @@ Interactively, pushes mark before moving point."
1645 (f90-looking-at-select-case) 1714 (f90-looking-at-select-case)
1646 (f90-looking-at-type-like) 1715 (f90-looking-at-type-like)
1647 (f90-looking-at-associate) 1716 (f90-looking-at-associate)
1717 (f90-looking-at-critical)
1648 (f90-looking-at-program-block-start) 1718 (f90-looking-at-program-block-start)
1649 (f90-looking-at-if-then) 1719 (f90-looking-at-if-then)
1650 (f90-looking-at-where-or-forall))) 1720 (f90-looking-at-where-or-forall)))
@@ -1686,6 +1756,7 @@ A block is a subroutine, if-endif, etc."
1686 (f90-looking-at-select-case) 1756 (f90-looking-at-select-case)
1687 (f90-looking-at-type-like) 1757 (f90-looking-at-type-like)
1688 (f90-looking-at-associate) 1758 (f90-looking-at-associate)
1759 (f90-looking-at-critical)
1689 (f90-looking-at-program-block-start) 1760 (f90-looking-at-program-block-start)
1690 (f90-looking-at-if-then) 1761 (f90-looking-at-if-then)
1691 (f90-looking-at-where-or-forall)) 1762 (f90-looking-at-where-or-forall))
@@ -1822,6 +1893,8 @@ If run in the middle of a line, the line is not broken."
1822 f90-type-indent) 1893 f90-type-indent)
1823 ((setq struct (f90-looking-at-associate)) 1894 ((setq struct (f90-looking-at-associate))
1824 f90-associate-indent) 1895 f90-associate-indent)
1896 ((setq struct (f90-looking-at-critical))
1897 f90-critical-indent)
1825 ((or (setq struct (f90-looking-at-program-block-start)) 1898 ((or (setq struct (f90-looking-at-program-block-start))
1826 (looking-at "contains[ \t]*\\($\\|!\\)")) 1899 (looking-at "contains[ \t]*\\($\\|!\\)"))
1827 f90-program-indent))) 1900 f90-program-indent)))
@@ -1857,6 +1930,8 @@ If run in the middle of a line, the line is not broken."
1857 f90-type-indent) 1930 f90-type-indent)
1858 ((setq struct (f90-looking-at-associate)) 1931 ((setq struct (f90-looking-at-associate))
1859 f90-associate-indent) 1932 f90-associate-indent)
1933 ((setq struct (f90-looking-at-critical))
1934 f90-critical-indent)
1860 ((setq struct (f90-looking-at-program-block-start)) 1935 ((setq struct (f90-looking-at-program-block-start))
1861 f90-program-indent))) 1936 f90-program-indent)))
1862 (setq ind-curr ind-lev) 1937 (setq ind-curr ind-lev)
@@ -1875,6 +1950,7 @@ If run in the middle of a line, the line is not broken."
1875 ((looking-at f90-end-type-re) f90-type-indent) 1950 ((looking-at f90-end-type-re) f90-type-indent)
1876 ((looking-at f90-end-associate-re) 1951 ((looking-at f90-end-associate-re)
1877 f90-associate-indent) 1952 f90-associate-indent)
1953 ((f90-looking-at-end-critical) f90-critical-indent)
1878 ((f90-looking-at-program-block-end) 1954 ((f90-looking-at-program-block-end)
1879 f90-program-indent))) 1955 f90-program-indent)))
1880 (if ind-b (setq ind-lev (- ind-lev ind-b))) 1956 (if ind-b (setq ind-lev (- ind-lev ind-b)))
@@ -2080,6 +2156,7 @@ Leave point at the end of line."
2080 (f90-looking-at-select-case) 2156 (f90-looking-at-select-case)
2081 (f90-looking-at-type-like) 2157 (f90-looking-at-type-like)
2082 (f90-looking-at-associate) 2158 (f90-looking-at-associate)
2159 (f90-looking-at-critical)
2083 (f90-looking-at-program-block-start) 2160 (f90-looking-at-program-block-start)
2084 ;; Interpret a single END without a block 2161 ;; Interpret a single END without a block
2085 ;; start to be the END of a program block 2162 ;; start to be the END of a program block
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index c01086c970e..8f617b44dae 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -924,8 +924,8 @@ Convert it to flymake internal format."
924 ;; PHP 924 ;; PHP
925 ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1) 925 ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
926 ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) 926 ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
927 ;; ant/javac 927 ;; ant/javac. Note this also matches gcc warnings!
928 (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" 928 (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\\(?:\:[0-9]+\\)?\:[ \t\n]*\\(.+\\)"
929 2 4 nil 5)) 929 2 4 nil 5))
930 ;; compilation-error-regexp-alist) 930 ;; compilation-error-regexp-alist)
931 (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) 931 (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
diff --git a/lisp/register.el b/lisp/register.el
index af1a421a0a2..82a0cf33c3e 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -28,6 +28,8 @@
28;; pieces of buffer state to named variables. The entry points are 28;; pieces of buffer state to named variables. The entry points are
29;; documented in the Emacs user's manual. 29;; documented in the Emacs user's manual.
30 30
31(eval-when-compile (require 'cl))
32
31(declare-function semantic-insert-foreign-tag "semantic/tag" (foreign-tag)) 33(declare-function semantic-insert-foreign-tag "semantic/tag" (foreign-tag))
32(declare-function semantic-tag-buffer "semantic/tag" (tag)) 34(declare-function semantic-tag-buffer "semantic/tag" (tag))
33(declare-function semantic-tag-start "semantic/tag" (tag)) 35(declare-function semantic-tag-start "semantic/tag" (tag))
@@ -50,9 +52,36 @@
50 52
51;;; Code: 53;;; Code:
52 54
55(defstruct
56 (registerv (:constructor nil)
57 (:constructor registerv--make (&optional data print-func
58 jump-func insert-func))
59 (:copier nil)
60 (:type vector)
61 :named)
62 (data nil :read-only t)
63 (print-func nil :read-only t)
64 (jump-func nil :read-only t)
65 (insert-func nil :read-only t))
66
67(defun* registerv-make (data &key print-func jump-func insert-func)
68 "Create a register value object.
69
70DATA can be any value.
71PRINT-FUNC if provided controls how `list-registers' and
72`view-register' print the register. It should be a function
73recieving one argument DATA and print text that completes
74this sentence:
75 Register X contains [TEXT PRINTED BY PRINT-FUNC]
76JUMP-FUNC if provided, controls how `jump-to-register' jumps to the register.
77INSERT-FUNC if provided, controls how `insert-register' insert the register.
78They both receive DATA as argument."
79 (registerv--make data print-func jump-func insert-func))
80
53(defvar register-alist nil 81(defvar register-alist nil
54 "Alist of elements (NAME . CONTENTS), one for each Emacs register. 82 "Alist of elements (NAME . CONTENTS), one for each Emacs register.
55NAME is a character (a number). CONTENTS is a string, number, marker or list. 83NAME is a character (a number). CONTENTS is a string, number, marker, list
84or a struct returned by `registerv-make'.
56A list of strings represents a rectangle. 85A list of strings represents a rectangle.
57A list of the form (file . FILE-NAME) represents the file named FILE-NAME. 86A list of the form (file . FILE-NAME) represents the file named FILE-NAME.
58A list of the form (file-query FILE-NAME POSITION) represents 87A list of the form (file-query FILE-NAME POSITION) represents
@@ -120,6 +149,11 @@ delete any existing frames that the frame configuration doesn't mention.
120 (interactive "cJump to register: \nP") 149 (interactive "cJump to register: \nP")
121 (let ((val (get-register register))) 150 (let ((val (get-register register)))
122 (cond 151 (cond
152 ((registerv-p val)
153 (assert (registerv-jump-func val) nil
154 "Don't know how to jump to register %s"
155 (single-key-description register))
156 (funcall (registerv-jump-func val) (registerv-data val)))
123 ((and (consp val) (frame-configuration-p (car val))) 157 ((and (consp val) (frame-configuration-p (car val)))
124 (set-frame-configuration (car val) (not delete)) 158 (set-frame-configuration (car val) (not delete))
125 (goto-char (cadr val))) 159 (goto-char (cadr val)))
@@ -209,6 +243,11 @@ The Lisp value REGISTER is a character."
209 (princ " contains ") 243 (princ " contains ")
210 (let ((val (get-register register))) 244 (let ((val (get-register register)))
211 (cond 245 (cond
246 ((registerv-p val)
247 (if (registerv-print-func val)
248 (funcall (registerv-print-func val) (registerv-data val))
249 (princ "[UNPRINTABLE CONTENTS].")))
250
212 ((numberp val) 251 ((numberp val)
213 (princ val)) 252 (princ val))
214 253
@@ -285,8 +324,11 @@ Interactively, second arg is non-nil if prefix arg is supplied."
285 (push-mark) 324 (push-mark)
286 (let ((val (get-register register))) 325 (let ((val (get-register register)))
287 (cond 326 (cond
288 ((consp val) 327 ((registerv-p val)
289 (insert-rectangle val)) 328 (assert (registerv-insert-func val) nil
329 "Don't know how to insert register %s"
330 (single-key-description register))
331 (funcall (registerv-insert-func val) (registerv-data val)))
290 ((stringp val) 332 ((stringp val)
291 (insert-for-yank val)) 333 (insert-for-yank val))
292 ((numberp val) 334 ((numberp val)
diff --git a/lisp/ses.el b/lisp/ses.el
index b52d3e23c73..8b06f058fcd 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3,8 +3,8 @@
3;; Copyright (C) 2002-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
4 4
5;; Author: Jonathan Yavner <jyavner@member.fsf.org> 5;; Author: Jonathan Yavner <jyavner@member.fsf.org>
6;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org> 6;; Maintainer: Vincent Belaïche <vincentb1@users.sourceforge.net>
7;; Keywords: spreadsheet 7;; Keywords: spreadsheet Dijkstra
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
10 10
@@ -25,6 +25,7 @@
25 25
26;;; To-do list: 26;;; To-do list:
27 27
28;; * split (catch 'cycle ...) call back into one or more functions
28;; * Use $ or … for truncated fields 29;; * Use $ or … for truncated fields
29;; * Add command to make a range of columns be temporarily invisible. 30;; * Add command to make a range of columns be temporarily invisible.
30;; * Allow paste of one cell to a range of cells -- copy formula to each. 31;; * Allow paste of one cell to a range of cells -- copy formula to each.
@@ -36,6 +37,21 @@
36;; * Left-margin column for row number. 37;; * Left-margin column for row number.
37;; * Move a row by dragging its number in the left-margin. 38;; * Move a row by dragging its number in the left-margin.
38 39
40;;; Cycle detection
41
42;; Cycles used to be detected by stationarity of ses--deferred-recalc. This was
43;; working fine in most cases, however failed in some cases of several path
44;; racing together.
45;;
46;; The current algorithm is based on Dijksta algorithm. The ``cycle length'' is
47;; stored in some cell property. In order not to reset in all cells such
48;; property at each update, the cycle length is stored in this property along
49;; with some update attempt id that is incremented at each update. The current
50;; update id is ses--Dijkstra-attempt-nb. In case there is a cycle the cycle
51;; length diverge to infinite so it will exceed ses--Dijkstra-weight-bound at
52;; some point of time that allows detection. Otherwise it converges to the
53;; longest path length in the update tree.
54
39 55
40;;; Code: 56;;; Code:
41 57
@@ -154,7 +170,7 @@ Each function is called with ARG=1."
154(defalias 'ses-mode-print-map 170(defalias 'ses-mode-print-map
155 (let ((keys '([backtab] backward-char 171 (let ((keys '([backtab] backward-char
156 [tab] ses-forward-or-insert 172 [tab] ses-forward-or-insert
157 "\C-i" ses-forward-or-insert ;Needed for ses-coverage.el? 173 "\C-i" ses-forward-or-insert ; Needed for ses-coverage.el?
158 "\M-o" ses-insert-column 174 "\M-o" ses-insert-column
159 "\C-o" ses-insert-row 175 "\C-o" ses-insert-row
160 "\C-m" ses-edit-cell 176 "\C-m" ses-edit-cell
@@ -225,10 +241,10 @@ Each function is called with ARG=1."
225 "Initial contents for the file-trailer area at the bottom of the file.") 241 "Initial contents for the file-trailer area at the bottom of the file.")
226 242
227(defconst ses-initial-file-contents 243(defconst ses-initial-file-contents
228 (concat " \n" ;One blank cell in print area 244 (concat " \n" ; One blank cell in print area.
229 ses-print-data-boundary 245 ses-print-data-boundary
230 "(ses-cell A1 nil nil nil nil)\n" ;One blank cell in data area 246 "(ses-cell A1 nil nil nil nil)\n" ; One blank cell in data area.
231 "\n" ;End-of-row terminator for the one row in data area 247 "\n" ; End-of-row terminator for the one row in data area.
232 "(ses-column-widths [7])\n" 248 "(ses-column-widths [7])\n"
233 "(ses-column-printers [nil])\n" 249 "(ses-column-printers [nil])\n"
234 "(ses-default-printer \"%.7g\")\n" 250 "(ses-default-printer \"%.7g\")\n"
@@ -255,23 +271,31 @@ default printer and then modify its output.")
255 271
256(eval-and-compile 272(eval-and-compile
257 (defconst ses-localvars 273 (defconst ses-localvars
258 '(ses--blank-line ses--cells ses--col-printers ses--col-widths ses--curcell 274 '(ses--blank-line ses--cells ses--col-printers
259 ses--curcell-overlay ses--default-printer ses--deferred-narrow 275 ses--col-widths (ses--curcell . nil) ses--curcell-overlay
260 ses--deferred-recalc ses--deferred-write ses--file-format 276 ses--default-printer
261 ses--header-hscroll ses--header-row ses--header-string ses--linewidth 277 ses--deferred-narrow (ses--deferred-recalc
262 ses--numcols ses--numrows ses--symbolic-formulas ses--data-marker 278 . nil) (ses--deferred-write . nil) ses--file-format
263 ses--params-marker 279 (ses--header-hscroll . -1) ; Flag for "initial recalc needed"
264 ;;Global variables that we override 280 ses--header-row ses--header-string ses--linewidth
281 ses--numcols ses--numrows ses--symbolic-formulas
282 ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb
283 . 0) ses--Dijkstra-weight-bound
284 ;; Global variables that we override
265 mode-line-process next-line-add-newlines transient-mark-mode) 285 mode-line-process next-line-add-newlines transient-mark-mode)
266 "Buffer-local variables used by SES.")) 286 "Buffer-local variables used by SES."))
267 287
268;;When compiling, create all the buffer locals and give them values 288(defun ses-set-localvars ()
269(eval-when-compile 289 "Set buffer-local and initialize some SES variables."
270 (dolist (x ses-localvars) 290 (dolist (x ses-localvars)
271 (make-local-variable x) 291 (cond
272 (set x nil))) 292 ((symbolp x)
293 (set (make-local-variable x) nil))
294 ((consp x)
295 (set (make-local-variable (car x)) (cdr x)))
296 (error "Unexpected elements `%S' in list `ses-localvars'"))))
273 297
274;;;This variable is documented as being permitted in file-locals: 298;;; This variable is documented as being permitted in file-locals:
275(put 'ses--symbolic-formulas 'safe-local-variable 'consp) 299(put 'ses--symbolic-formulas 'safe-local-variable 'consp)
276 300
277(defconst ses-paramlines-plist 301(defconst ses-paramlines-plist
@@ -317,12 +341,14 @@ when to emit a progress message.")
317 341
318;; We might want to use defstruct here, but cells are explicitly used as 342;; We might want to use defstruct here, but cells are explicitly used as
319;; arrays in ses-set-cell, so we'd need to fix this first. --Stef 343;; arrays in ses-set-cell, so we'd need to fix this first. --Stef
320(defsubst ses-make-cell (&optional symbol formula printer references) 344(defsubst ses-make-cell (&optional symbol formula printer references
321 (vector symbol formula printer references)) 345 property-list)
346 (vector symbol formula printer references property-list))
322 347
323(defmacro ses-cell-symbol (row &optional col) 348(defmacro ses-cell-symbol (row &optional col)
324 "From a CELL or a pair (ROW,COL), get the symbol that names the local-variable holding its value. (0,0) => A1." 349 "From a CELL or a pair (ROW,COL), get the symbol that names the local-variable holding its value. (0,0) => A1."
325 `(aref ,(if col `(ses-get-cell ,row ,col) row) 0)) 350 `(aref ,(if col `(ses-get-cell ,row ,col) row) 0))
351(put 'ses-cell-symbol 'safe-function t)
326 352
327(defmacro ses-cell-formula (row &optional col) 353(defmacro ses-cell-formula (row &optional col)
328 "From a CELL or a pair (ROW,COL), get the function that computes its value." 354 "From a CELL or a pair (ROW,COL), get the function that computes its value."
@@ -337,6 +363,116 @@ when to emit a progress message.")
337functions refer to its value." 363functions refer to its value."
338 `(aref ,(if col `(ses-get-cell ,row ,col) row) 3)) 364 `(aref ,(if col `(ses-get-cell ,row ,col) row) 3))
339 365
366(defun ses-cell-property-get-fun (property-name cell)
367 ;; To speed up property fetching, each time a property is found it is placed
368 ;; in the first position. This way, after the first get, the full property
369 ;; list needs to be scanned only when the property does not exist for that
370 ;; cell.
371 (let* ((plist (aref cell 4))
372 (ret (plist-member plist property-name)))
373 (if ret
374 ;; Property was found.
375 (let ((val (cadr ret)))
376 (if (eq ret plist)
377 ;; Property found is already in the first position, so just return
378 ;; its value.
379 val
380 ;; Property is not in the first position, the following will move it
381 ;; there before returning its value.
382 (let ((next (cddr ret)))
383 (if next
384 (progn
385 (setcdr ret (cdr next))
386 (setcar ret (car next)))
387 (setcdr (last plist 1) nil)))
388 (aset cell 4
389 `(,property-name ,val ,@plist))
390 val)))))
391
392(defmacro ses-cell-property-get (property-name row &optional col)
393 "Get property named PROPERTY-NAME From a CELL or a pair (ROW,COL).
394
395When COL is omitted, CELL=ROW is a cell object. When COL is
396present ROW and COL are the integer coordinates of the cell of
397interest."
398 (declare (debug t))
399 `(ses-cell-property-get-fun
400 ,property-name
401 ,(if col `(ses-get-cell ,row ,col) row)))
402
403(defun ses-cell-property-delq-fun (property-name cell)
404 (let ((ret (plist-get (aref cell 4) property-name)))
405 (if ret
406 (setcdr ret (cddr ret)))))
407
408(defun ses-cell-property-set-fun (property-name property-val cell)
409 (let* ((plist (aref cell 4))
410 (ret (plist-member plist property-name)))
411 (if ret
412 (setcar (cdr ret) property-val)
413 (aset cell 4 `(,property-name ,property-val ,@plist)))))
414
415(defmacro ses-cell-property-set (property-name property-value row &optional col)
416 "From a CELL or a pair (ROW,COL), set the property value of
417the corresponding cell with name PROPERTY-NAME to PROPERTY-VALUE."
418 (if property-value
419 `(ses-cell-property-set-fun ,property-name ,property-value
420 ,(if col `(ses-get-cell ,row ,col) row))
421 `(ses-cell-property-delq-fun ,property-name
422 ,(if col `(ses-get-cell ,row ,col) row))))
423
424(defun ses-cell-property-pop-fun (property-name cell)
425 (let* ((plist (aref cell 4))
426 (ret (plist-member plist property-name)))
427 (if ret
428 (prog1 (cadr ret)
429 (let ((next (cddr ret)))
430 (if next
431 (progn
432 (setcdr ret (cdr next))
433 (setcar ret (car next)))
434 (if (eq plist ret)
435 (aset cell 4 nil)
436 (setcdr (last plist 2) nil))))))))
437
438
439(defmacro ses-cell-property-pop (property-name row &optional col)
440 "From a CELL or a pair (ROW,COL), get and remove the property value of
441the corresponding cell with name PROPERTY-NAME."
442 `(ses-cell-property-pop-fun ,property-name
443 ,(if col `(ses-get-cell ,row ,col) row)))
444
445(defun ses-cell-property-get-handle-fun (property-name cell)
446 (let* ((plist (aref cell 4))
447 (ret (plist-member plist property-name)))
448 (if ret
449 (if (eq ret plist)
450 (cdr ret)
451 (let ((val (cadr ret))
452 (next (cddr ret)))
453 (if next
454 (progn
455 (setcdr ret (cdr next))
456 (setcar ret (car next)))
457 (setcdr (last plist 2) nil))
458 (setq ret (cons val plist))
459 (aset cell 4 (cons property-name ret))
460 ret))
461 (setq ret (cons nil plist))
462 (aset cell 4 (cons property-name ret))
463 ret)))
464
465(defmacro ses-cell-property-get-handle (property-name row &optional col)
466 "From a CELL or a pair (ROW,COL), get a cons cell whose car is
467the property value of the corresponding cell property with name
468PROPERTY-NAME."
469 `(ses-cell-property-get-handle-fun ,property-name
470 ,(if col `(ses-get-cell ,row ,col) row)))
471
472
473(defalias 'ses-cell-property-handle-car 'car)
474(defalias 'ses-cell-property-handle-setcar 'setcar)
475
340(defmacro ses-cell-value (row &optional col) 476(defmacro ses-cell-value (row &optional col)
341 "From a CELL or a pair (ROW,COL), get the current value for that cell." 477 "From a CELL or a pair (ROW,COL), get the current value for that cell."
342 `(symbol-value (ses-cell-symbol ,row ,col))) 478 `(symbol-value (ses-cell-symbol ,row ,col)))
@@ -514,7 +650,7 @@ for this spreadsheet."
5140-25 become A-Z; 26-701 become AA-ZZ, and so on." 6500-25 become A-Z; 26-701 become AA-ZZ, and so on."
515 (let ((units (char-to-string (+ ?A (% col 26))))) 651 (let ((units (char-to-string (+ ?A (% col 26)))))
516 (if (< col 26) 652 (if (< col 26)
517 units 653 units
518 (concat (ses-column-letter (1- (/ col 26))) units)))) 654 (concat (ses-column-letter (1- (/ col 26))) units))))
519 655
520(defun ses-create-cell-symbol (row col) 656(defun ses-create-cell-symbol (row col)
@@ -534,9 +670,9 @@ for this spreadsheet."
534 (put sym 'ses-cell (cons xrow xcol)) 670 (put sym 'ses-cell (cons xrow xcol))
535 (make-local-variable sym))))) 671 (make-local-variable sym)))))
536 672
537;;We do not delete the ses-cell properties for the cell-variables, in case a 673;; We do not delete the ses-cell properties for the cell-variables, in
538;;formula that refers to this cell is in the kill-ring and is later pasted 674;; case a formula that refers to this cell is in the kill-ring and is
539;;back in. 675;; later pasted back in.
540(defun ses-destroy-cell-variable-range (minrow maxrow mincol maxcol) 676(defun ses-destroy-cell-variable-range (minrow maxrow mincol maxcol)
541 "Destroy buffer-local variables for cells. This is undoable." 677 "Destroy buffer-local variables for cells. This is undoable."
542 (let (sym) 678 (let (sym)
@@ -584,7 +720,7 @@ cell (ROW,COL). This is undoable. The cell's data will be updated through
584 (ses-aset-with-undo cell elt val))) 720 (ses-aset-with-undo cell elt val)))
585 (if change 721 (if change
586 (add-to-list 'ses--deferred-write (cons row col)))) 722 (add-to-list 'ses--deferred-write (cons row col))))
587 nil) ;Make coverage-tester happy 723 nil) ; Make coverage-tester happy.
588 724
589(defun ses-cell-set-formula (row col formula) 725(defun ses-cell-set-formula (row col formula)
590 "Store a new formula for (ROW . COL) and enqueues the cell for 726 "Store a new formula for (ROW . COL) and enqueues the cell for
@@ -620,6 +756,75 @@ means Emacs will crash if FORMULA contains a circular list."
620 (ses-formula-record formula) 756 (ses-formula-record formula)
621 (ses-set-cell row col 'formula formula)))) 757 (ses-set-cell row col 'formula formula))))
622 758
759
760(defun ses-repair-cell-reference-all ()
761 "Repair cell reference and warn if there was some reference corruption."
762 (interactive "*")
763 (let (errors)
764 ;; Step 1, reset :ses-repair-reference cell property in the whole sheet.
765 (dotimes (row ses--numrows)
766 (dotimes (col ses--numcols)
767 (let ((references (ses-cell-property-pop :ses-repair-reference
768 row col)))
769 (when references
770 (push (list
771 (ses-cell-symbol row col)
772 :corrupt-property
773 references) errors)))))
774
775 ;; Step 2, build new.
776 (dotimes (row ses--numrows)
777 (dotimes (col ses--numcols)
778 (let* ((cell (ses-get-cell row col))
779 (sym (ses-cell-symbol cell))
780 (formula (ses-cell-formula cell))
781 (new-ref (ses-formula-references formula)))
782 (dolist (ref new-ref)
783 (let* ((rowcol (ses-sym-rowcol ref))
784 (h (ses-cell-property-get-handle :ses-repair-reference
785 (car rowcol) (cdr rowcol))))
786 (unless (memq ref (ses-cell-property-handle-car h))
787 (ses-cell-property-handle-setcar
788 h
789 (cons sym
790 (ses-cell-property-handle-car h)))))))))
791
792 ;; Step 3, overwrite with check.
793 (dotimes (row ses--numrows)
794 (dotimes (col ses--numcols)
795 (let* ((cell (ses-get-cell row col))
796 (irrelevant (ses-cell-references cell))
797 (new-ref (ses-cell-property-pop :ses-repair-reference cell))
798 missing)
799 (dolist (ref new-ref)
800 (if (memq ref irrelevant)
801 (setq irrelevant (delq ref irrelevant))
802 (push ref missing)))
803 (ses-set-cell row col 'references new-ref)
804 (when (or missing irrelevant)
805 (push `( ,(ses-cell-symbol cell)
806 ,@(and missing (list :missing missing))
807 ,@(and irrelevant (list :irrelevant irrelevant)))
808 errors)))))
809 (if errors
810 (warn "----------------------------------------------------------------
811Some reference where corrupted.
812
813The following is a list of where each element ELT is such
814that (car ELT) is the reference of cell CELL with corruption,
815and (cdr ELT) is a property list where
816
817* property `:corrupt-property' means that
818 property `:ses-repair-reference' of cell CELL was initially non
819 nil,
820
821* property `:missing' is a list of missing references
822
823* property `:irrelevant' is a list of non needed references
824
825%S" errors)
826 (message "No reference corruption found"))))
827
623(defun ses-calculate-cell (row col force) 828(defun ses-calculate-cell (row col force)
624 "Calculate and print the value for cell (ROW,COL) using the cell's formula 829 "Calculate and print the value for cell (ROW,COL) using the cell's formula
625function and print functions, if any. Result is nil for normal operation, or 830function and print functions, if any. Result is nil for normal operation, or
@@ -629,34 +834,95 @@ left unchanged if it was *skip* and the new value is nil.
629processing for the current keystroke, unless the new value is the same as 834processing for the current keystroke, unless the new value is the same as
630the old and FORCE is nil." 835the old and FORCE is nil."
631 (let ((cell (ses-get-cell row col)) 836 (let ((cell (ses-get-cell row col))
632 formula-error printer-error) 837 cycle-error formula-error printer-error)
633 (let ((oldval (ses-cell-value cell)) 838 (let ((oldval (ses-cell-value cell))
634 (formula (ses-cell-formula cell)) 839 (formula (ses-cell-formula cell))
635 newval) 840 newval
841 this-cell-Dijkstra-attempt-h
842 this-cell-Dijkstra-attempt
843 this-cell-Dijkstra-attempt+1
844 ref-cell-Dijkstra-attempt-h
845 ref-cell-Dijkstra-attempt
846 ref-rowcol)
636 (when (eq (car-safe formula) 'ses-safe-formula) 847 (when (eq (car-safe formula) 'ses-safe-formula)
637 (setq formula (ses-safe-formula (cadr formula))) 848 (setq formula (ses-safe-formula (cadr formula)))
638 (ses-set-cell row col 'formula formula)) 849 (ses-set-cell row col 'formula formula))
639 (condition-case sig 850 (condition-case sig
640 (setq newval (eval formula)) 851 (setq newval (eval formula))
641 (error 852 (error
853 ;; Variable `sig' can't be nil.
854 (nconc sig (list (ses-cell-symbol cell)))
642 (setq formula-error sig 855 (setq formula-error sig
643 newval '*error*))) 856 newval '*error*)))
644 (if (and (not newval) (eq oldval '*skip*)) 857 (if (and (not newval) (eq oldval '*skip*))
645 ;;Don't lose the *skip* - previous field spans this one 858 ;; Don't lose the *skip* --- previous field spans this one.
646 (setq newval '*skip*)) 859 (setq newval '*skip*))
647 (when (or force (not (eq newval oldval))) 860 (catch 'cycle
648 (add-to-list 'ses--deferred-write (cons row col)) ;In case force=t 861 (when (or force (not (eq newval oldval)))
649 (ses-set-cell row col 'value newval) 862 (add-to-list 'ses--deferred-write (cons row col)) ; In case force=t.
650 (dolist (ref (ses-cell-references cell)) 863 (setq this-cell-Dijkstra-attempt-h
651 (add-to-list 'ses--deferred-recalc ref)))) 864 (ses-cell-property-get-handle :ses-Dijkstra-attempt cell);
865 this-cell-Dijkstra-attempt
866 (ses-cell-property-handle-car this-cell-Dijkstra-attempt-h))
867 (if (null this-cell-Dijkstra-attempt)
868 (ses-cell-property-handle-setcar
869 this-cell-Dijkstra-attempt-h
870 (setq this-cell-Dijkstra-attempt
871 (cons ses--Dijkstra-attempt-nb 0)))
872 (unless (= ses--Dijkstra-attempt-nb
873 (car this-cell-Dijkstra-attempt))
874 (setcar this-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb)
875 (setcdr this-cell-Dijkstra-attempt 0)))
876 (setq this-cell-Dijkstra-attempt+1
877 (1+ (cdr this-cell-Dijkstra-attempt)))
878 (ses-set-cell row col 'value newval)
879 (dolist (ref (ses-cell-references cell))
880 (add-to-list 'ses--deferred-recalc ref)
881 (setq ref-rowcol (ses-sym-rowcol ref)
882 ref-cell-Dijkstra-attempt-h
883 (ses-cell-property-get-handle
884 :ses-Dijkstra-attempt
885 (car ref-rowcol) (cdr ref-rowcol))
886 ref-cell-Dijkstra-attempt
887 (ses-cell-property-handle-car ref-cell-Dijkstra-attempt-h))
888
889 (if (null ref-cell-Dijkstra-attempt)
890 (ses-cell-property-handle-setcar
891 ref-cell-Dijkstra-attempt-h
892 (setq ref-cell-Dijkstra-attempt
893 (cons ses--Dijkstra-attempt-nb
894 this-cell-Dijkstra-attempt+1)))
895 (if (= (car ref-cell-Dijkstra-attempt) ses--Dijkstra-attempt-nb)
896 (setcdr ref-cell-Dijkstra-attempt
897 (max (cdr ref-cell-Dijkstra-attempt)
898 this-cell-Dijkstra-attempt+1))
899 (setcar ref-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb)
900 (setcdr ref-cell-Dijkstra-attempt
901 this-cell-Dijkstra-attempt+1)))
902
903 (when (> this-cell-Dijkstra-attempt+1 ses--Dijkstra-weight-bound)
904 ;; Update print of this cell.
905 (throw 'cycle (setq formula-error
906 `(error ,(format "Found cycle on cells %S"
907 (ses-cell-symbol cell)))
908 cycle-error formula-error)))))))
652 (setq printer-error (ses-print-cell row col)) 909 (setq printer-error (ses-print-cell row col))
653 (or formula-error printer-error))) 910 (or
911 (and cycle-error
912 (error (error-message-string cycle-error)))
913 formula-error printer-error)))
654 914
655(defun ses-clear-cell (row col) 915(defun ses-clear-cell (row col)
656 "Delete formula and printer for cell (ROW,COL)." 916 "Delete formula and printer for cell (ROW,COL)."
657 (ses-set-cell row col 'printer nil) 917 (ses-set-cell row col 'printer nil)
658 (ses-cell-set-formula row col nil)) 918 (ses-cell-set-formula row col nil))
659 919
920(defcustom ses-self-reference-early-detection nil
921 "True if cycle detection is early for cells that refer to
922themselves."
923 :type 'boolean
924 :group 'ses)
925
660(defun ses-update-cells (list &optional force) 926(defun ses-update-cells (list &optional force)
661 "Recalculate cells in LIST, checking for dependency loops. Prints 927 "Recalculate cells in LIST, checking for dependency loops. Prints
662progress messages every second. Dependent cells are not recalculated 928progress messages every second. Dependent cells are not recalculated
@@ -664,13 +930,13 @@ if the cell's value is unchanged and FORCE is nil."
664 (let ((ses--deferred-recalc list) 930 (let ((ses--deferred-recalc list)
665 (nextlist list) 931 (nextlist list)
666 (pos (point)) 932 (pos (point))
667 curlist prevlist rowcol formula) 933 curlist prevlist this-sym this-rowcol formula)
668 (with-temp-message " " 934 (with-temp-message " "
669 (while (and ses--deferred-recalc (not (equal nextlist prevlist))) 935 (while ses--deferred-recalc
670 ;;In each loop, recalculate cells that refer only to other cells that 936 ;; In each loop, recalculate cells that refer only to other cells that
671 ;;have already been recalculated or aren't in the recalculation 937 ;; have already been recalculated or aren't in the recalculation region.
672 ;;region. Repeat until all cells have been processed or until the 938 ;; Repeat until all cells have been processed or until the set of cells
673 ;;set of cells being worked on stops changing. 939 ;; being worked on stops changing.
674 (if prevlist 940 (if prevlist
675 (message "Recalculating... (%d cells left)" 941 (message "Recalculating... (%d cells left)"
676 (length ses--deferred-recalc))) 942 (length ses--deferred-recalc)))
@@ -678,38 +944,39 @@ if the cell's value is unchanged and FORCE is nil."
678 ses--deferred-recalc nil 944 ses--deferred-recalc nil
679 prevlist nextlist) 945 prevlist nextlist)
680 (while curlist 946 (while curlist
681 (setq rowcol (ses-sym-rowcol (car curlist)) 947 ;; this-sym has to be popped from curlist *BEFORE* the check, and not
682 formula (ses-cell-formula (car rowcol) (cdr rowcol))) 948 ;; after because of the case of cells referring to themselves.
949 (setq this-sym (pop curlist)
950 this-rowcol (ses-sym-rowcol this-sym)
951 formula (ses-cell-formula (car this-rowcol)
952 (cdr this-rowcol)))
683 (or (catch 'ref 953 (or (catch 'ref
684 (dolist (ref (ses-formula-references formula)) 954 (dolist (ref (ses-formula-references formula))
685 (when (or (memq ref curlist) 955 (if (and ses-self-reference-early-detection (eq ref this-sym))
686 (memq ref ses--deferred-recalc)) 956 (error "Cycle found: cell %S is self-referring" this-sym)
687 ;;This cell refers to another that isn't done yet 957 (when (or (memq ref curlist)
688 (add-to-list 'ses--deferred-recalc (car curlist)) 958 (memq ref ses--deferred-recalc))
689 (throw 'ref t)))) 959 ;; This cell refers to another that isn't done yet
690 ;;ses-update-cells is called from post-command-hook, so 960 (add-to-list 'ses--deferred-recalc this-sym)
691 ;;inhibit-quit is implicitly bound to t. 961 (throw 'ref t)))))
962 ;; ses-update-cells is called from post-command-hook, so
963 ;; inhibit-quit is implicitly bound to t.
692 (when quit-flag 964 (when quit-flag
693 ;;Abort the recalculation. User will probably undo now. 965 ;; Abort the recalculation. User will probably undo now.
694 (error "Quit")) 966 (error "Quit"))
695 (ses-calculate-cell (car rowcol) (cdr rowcol) force)) 967 (ses-calculate-cell (car this-rowcol) (cdr this-rowcol) force)))
696 (setq curlist (cdr curlist)))
697 (dolist (ref ses--deferred-recalc) 968 (dolist (ref ses--deferred-recalc)
698 (add-to-list 'nextlist ref)) 969 (add-to-list 'nextlist ref)))
699 (setq nextlist (sort (copy-sequence nextlist) 'string<))
700 (if (equal nextlist prevlist)
701 ;;We'll go around the loop one more time.
702 (add-to-list 'nextlist t)))
703 (when ses--deferred-recalc 970 (when ses--deferred-recalc
704 ;;Just couldn't finish these 971 ;; Just couldn't finish these.
705 (dolist (x ses--deferred-recalc) 972 (dolist (x ses--deferred-recalc)
706 (let ((rowcol (ses-sym-rowcol x))) 973 (let ((this-rowcol (ses-sym-rowcol x)))
707 (ses-set-cell (car rowcol) (cdr rowcol) 'value '*error*) 974 (ses-set-cell (car this-rowcol) (cdr this-rowcol) 'value '*error*)
708 (1value (ses-print-cell (car rowcol) (cdr rowcol))))) 975 (1value (ses-print-cell (car this-rowcol) (cdr this-rowcol)))))
709 (error "Circular references: %s" ses--deferred-recalc)) 976 (error "Circular references: %s" ses--deferred-recalc))
710 (message " ")) 977 (message " "))
711 ;;Can't use save-excursion here: if the cell under point is 978 ;; Can't use save-excursion here: if the cell under point is updated,
712 ;;updated, save-excusion's marker will move past the cell. 979 ;; save-excusion's marker will move past the cell.
713 (goto-char pos))) 980 (goto-char pos)))
714 981
715 982
@@ -721,22 +988,22 @@ if the cell's value is unchanged and FORCE is nil."
721 "Returns t if point is in print area of spreadsheet." 988 "Returns t if point is in print area of spreadsheet."
722 (<= (point) ses--data-marker)) 989 (<= (point) ses--data-marker))
723 990
724;;We turn off point-motion-hooks and explicitly position the cursor, in case 991;; We turn off point-motion-hooks and explicitly position the cursor, in case
725;;the intangible properties have gotten screwed up (e.g., when 992;; the intangible properties have gotten screwed up (e.g., when ses-goto-print
726;;ses-goto-print is called during a recursive ses-print-cell). 993;; is called during a recursive ses-print-cell).
727(defun ses-goto-print (row col) 994(defun ses-goto-print (row col)
728 "Move point to print area for cell (ROW,COL)." 995 "Move point to print area for cell (ROW,COL)."
729 (let ((inhibit-point-motion-hooks t) 996 (let ((inhibit-point-motion-hooks t)
730 (n 0)) 997 (n 0))
731 (goto-char (point-min)) 998 (goto-char (point-min))
732 (forward-line row) 999 (forward-line row)
733 ;; calculate column position 1000 ;; Calculate column position.
734 (dotimes (c col) 1001 (dotimes (c col)
735 (setq n (+ n (ses-col-width c) 1))) 1002 (setq n (+ n (ses-col-width c) 1)))
736 ;; move to the position 1003 ;; Move to the position.
737 (and (> n (move-to-column n)) 1004 (and (> n (move-to-column n))
738 (eolp) 1005 (eolp)
739 ;; move point to the bol of next line (for TAB at the last cell) 1006 ;; Move point to the bol of next line (for TAB at the last cell).
740 (forward-char)))) 1007 (forward-char))))
741 1008
742(defun ses-set-curcell () 1009(defun ses-set-curcell ()
@@ -745,13 +1012,13 @@ region, or nil if cursor is not at a cell."
745 (if (or (not mark-active) 1012 (if (or (not mark-active)
746 deactivate-mark 1013 deactivate-mark
747 (= (region-beginning) (region-end))) 1014 (= (region-beginning) (region-end)))
748 ;;Single cell 1015 ;; Single cell.
749 (setq ses--curcell (get-text-property (point) 'intangible)) 1016 (setq ses--curcell (get-text-property (point) 'intangible))
750 ;;Range 1017 ;; Range.
751 (let ((bcell (get-text-property (region-beginning) 'intangible)) 1018 (let ((bcell (get-text-property (region-beginning) 'intangible))
752 (ecell (get-text-property (1- (region-end)) 'intangible))) 1019 (ecell (get-text-property (1- (region-end)) 'intangible)))
753 (when (= (region-end) ses--data-marker) 1020 (when (= (region-end) ses--data-marker)
754 ;;Correct for overflow 1021 ;; Correct for overflow.
755 (setq ecell (get-text-property (- (region-end) 2) 'intangible))) 1022 (setq ecell (get-text-property (- (region-end) 2) 'intangible)))
756 (setq ses--curcell (if (and bcell ecell) 1023 (setq ses--curcell (if (and bcell ecell)
757 (cons bcell ecell) 1024 (cons bcell ecell)
@@ -764,7 +1031,7 @@ appropriate if some argument is 'end. A range is appropriate if some
764argument is 'range. A single cell is appropriate unless some argument is 1031argument is 'range. A single cell is appropriate unless some argument is
765'needrange." 1032'needrange."
766 (if (eq ses--curcell t) 1033 (if (eq ses--curcell t)
767 ;;curcell recalculation was postponed, but user typed ahead 1034 ;; curcell recalculation was postponed, but user typed ahead.
768 (ses-set-curcell)) 1035 (ses-set-curcell))
769 (cond 1036 (cond
770 ((not ses--curcell) 1037 ((not ses--curcell)
@@ -791,53 +1058,53 @@ preceding cell has spilled over."
791 (printer (ses-cell-printer cell)) 1058 (printer (ses-cell-printer cell))
792 (maxcol (1+ col)) 1059 (maxcol (1+ col))
793 text sig startpos x) 1060 text sig startpos x)
794 ;;Create the string to print 1061 ;; Create the string to print.
795 (cond 1062 (cond
796 ((eq value '*skip*) 1063 ((eq value '*skip*)
797 ;;Don't print anything 1064 ;; Don't print anything.
798 (throw 'ses-print-cell nil)) 1065 (throw 'ses-print-cell nil))
799 ((eq value '*error*) 1066 ((eq value '*error*)
800 (setq text (make-string (ses-col-width col) ?#))) 1067 (setq text (make-string (ses-col-width col) ?#)))
801 (t 1068 (t
802 ;;Deferred safety-check on printer 1069 ;; Deferred safety-check on printer.
803 (if (eq (car-safe printer) 'ses-safe-printer) 1070 (if (eq (car-safe printer) 'ses-safe-printer)
804 (ses-set-cell row col 'printer 1071 (ses-set-cell row col 'printer
805 (setq printer (ses-safe-printer (cadr printer))))) 1072 (setq printer (ses-safe-printer (cadr printer)))))
806 ;;Print the value 1073 ;; Print the value.
807 (setq text (ses-call-printer (or printer 1074 (setq text (ses-call-printer (or printer
808 (ses-col-printer col) 1075 (ses-col-printer col)
809 ses--default-printer) 1076 ses--default-printer)
810 value)) 1077 value))
811 (if (consp ses-call-printer-return) 1078 (if (consp ses-call-printer-return)
812 ;;Printer returned an error 1079 ;; Printer returned an error.
813 (setq sig ses-call-printer-return)))) 1080 (setq sig ses-call-printer-return))))
814 ;;Adjust print width to match column width 1081 ;; Adjust print width to match column width.
815 (let ((width (ses-col-width col)) 1082 (let ((width (ses-col-width col))
816 (len (string-width text))) 1083 (len (string-width text)))
817 (cond 1084 (cond
818 ((< len width) 1085 ((< len width)
819 ;;Fill field to length with spaces 1086 ;; Fill field to length with spaces.
820 (setq len (make-string (- width len) ?\s) 1087 (setq len (make-string (- width len) ?\s)
821 text (if (eq ses-call-printer-return t) 1088 text (if (eq ses-call-printer-return t)
822 (concat text len) 1089 (concat text len)
823 (concat len text)))) 1090 (concat len text))))
824 ((> len width) 1091 ((> len width)
825 ;;Spill over into following cells, if possible 1092 ;; Spill over into following cells, if possible.
826 (let ((maxwidth width)) 1093 (let ((maxwidth width))
827 (while (and (> len maxwidth) 1094 (while (and (> len maxwidth)
828 (< maxcol ses--numcols) 1095 (< maxcol ses--numcols)
829 (or (not (setq x (ses-cell-value row maxcol))) 1096 (or (not (setq x (ses-cell-value row maxcol)))
830 (eq x '*skip*))) 1097 (eq x '*skip*)))
831 (unless x 1098 (unless x
832 ;;Set this cell to '*skip* so it won't overwrite our spillover 1099 ;; Set this cell to '*skip* so it won't overwrite our spillover.
833 (ses-set-cell row maxcol 'value '*skip*)) 1100 (ses-set-cell row maxcol 'value '*skip*))
834 (setq maxwidth (+ maxwidth (ses-col-width maxcol) 1) 1101 (setq maxwidth (+ maxwidth (ses-col-width maxcol) 1)
835 maxcol (1+ maxcol))) 1102 maxcol (1+ maxcol)))
836 (if (<= len maxwidth) 1103 (if (<= len maxwidth)
837 ;;Fill to complete width of all the fields spanned 1104 ;; Fill to complete width of all the fields spanned.
838 (setq text (concat text (make-string (- maxwidth len) ?\s))) 1105 (setq text (concat text (make-string (- maxwidth len) ?\s)))
839 ;;Not enough room to end of line or next non-nil field. Truncate 1106 ;; Not enough room to end of line or next non-nil field. Truncate
840 ;;if string or decimal; otherwise fill with error indicator 1107 ;; if string or decimal; otherwise fill with error indicator.
841 (setq sig `(error "Too wide" ,text)) 1108 (setq sig `(error "Too wide" ,text))
842 (cond 1109 (cond
843 ((stringp value) 1110 ((stringp value)
@@ -854,12 +1121,12 @@ preceding cell has spilled over."
854 (substring text (match-end 0))))) 1121 (substring text (match-end 0)))))
855 (t 1122 (t
856 (setq text (make-string maxwidth ?#))))))))) 1123 (setq text (make-string maxwidth ?#)))))))))
857 ;;Substitute question marks for tabs and newlines. Newlines are 1124 ;; Substitute question marks for tabs and newlines. Newlines are used as
858 ;;used as row-separators; tabs could confuse the reimport logic. 1125 ;; row-separators; tabs could confuse the reimport logic.
859 (setq text (replace-regexp-in-string "[\t\n]" "?" text)) 1126 (setq text (replace-regexp-in-string "[\t\n]" "?" text))
860 (ses-goto-print row col) 1127 (ses-goto-print row col)
861 (setq startpos (point)) 1128 (setq startpos (point))
862 ;;Install the printed result. This is not interruptible. 1129 ;; Install the printed result. This is not interruptible.
863 (let ((inhibit-read-only t) 1130 (let ((inhibit-read-only t)
864 (inhibit-quit t)) 1131 (inhibit-quit t))
865 (let ((inhibit-point-motion-hooks t)) 1132 (let ((inhibit-point-motion-hooks t))
@@ -867,32 +1134,32 @@ preceding cell has spilled over."
867 (move-to-column (+ (current-column) 1134 (move-to-column (+ (current-column)
868 (string-width text))) 1135 (string-width text)))
869 (1+ (point))))) 1136 (1+ (point)))))
870 ;;We use concat instead of inserting separate strings in order to 1137 ;; We use concat instead of inserting separate strings in order to
871 ;;reduce the number of cells in the undo list. 1138 ;; reduce the number of cells in the undo list.
872 (setq x (concat text (if (< maxcol ses--numcols) " " "\n"))) 1139 (setq x (concat text (if (< maxcol ses--numcols) " " "\n")))
873 ;;We use set-text-properties to prevent a wacky print function 1140 ;; We use set-text-properties to prevent a wacky print function from
874 ;;from inserting rogue properties, and to ensure that the keymap 1141 ;; inserting rogue properties, and to ensure that the keymap property is
875 ;;property is inherited (is it a bug that only unpropertied strings 1142 ;; inherited (is it a bug that only unpropertied strings actually
876 ;;actually inherit from surrounding text?) 1143 ;; inherit from surrounding text?)
877 (set-text-properties 0 (length x) nil x) 1144 (set-text-properties 0 (length x) nil x)
878 (insert-and-inherit x) 1145 (insert-and-inherit x)
879 (put-text-property startpos (point) 'intangible 1146 (put-text-property startpos (point) 'intangible
880 (ses-cell-symbol cell)) 1147 (ses-cell-symbol cell))
881 (when (and (zerop row) (zerop col)) 1148 (when (and (zerop row) (zerop col))
882 ;;Reconstruct special beginning-of-buffer attributes 1149 ;; Reconstruct special beginning-of-buffer attributes.
883 (put-text-property (point-min) (point) 'keymap 'ses-mode-print-map) 1150 (put-text-property (point-min) (point) 'keymap 'ses-mode-print-map)
884 (put-text-property (point-min) (point) 'read-only 'ses) 1151 (put-text-property (point-min) (point) 'read-only 'ses)
885 (put-text-property (point-min) (1+ (point-min)) 'front-sticky t))) 1152 (put-text-property (point-min) (1+ (point-min)) 'front-sticky t)))
886 (if (= row (1- ses--header-row)) 1153 (if (= row (1- ses--header-row))
887 ;;This line is part of the header - force recalc 1154 ;; This line is part of the header --- force recalc.
888 (ses-reset-header-string)) 1155 (ses-reset-header-string))
889 ;;If this cell (or a preceding one on the line) previously spilled over 1156 ;; If this cell (or a preceding one on the line) previously spilled over
890 ;;and has gotten shorter, redraw following cells on line recursively. 1157 ;; and has gotten shorter, redraw following cells on line recursively.
891 (when (and (< maxcol ses--numcols) 1158 (when (and (< maxcol ses--numcols)
892 (eq (ses-cell-value row maxcol) '*skip*)) 1159 (eq (ses-cell-value row maxcol) '*skip*))
893 (ses-set-cell row maxcol 'value nil) 1160 (ses-set-cell row maxcol 'value nil)
894 (ses-print-cell row maxcol)) 1161 (ses-print-cell row maxcol))
895 ;;Return to start of cell 1162 ;; Return to start of cell.
896 (goto-char startpos) 1163 (goto-char startpos)
897 sig))) 1164 sig)))
898 1165
@@ -903,17 +1170,19 @@ The variable `ses-call-printer-return' is set to t if the printer used
903parenthesis to request left-justification, or the error-signal if the 1170parenthesis to request left-justification, or the error-signal if the
904printer signaled one (and \"%s\" is used as the default printer), else nil." 1171printer signaled one (and \"%s\" is used as the default printer), else nil."
905 (setq ses-call-printer-return nil) 1172 (setq ses-call-printer-return nil)
906 (unless value
907 (setq value ""))
908 (condition-case signal 1173 (condition-case signal
909 (cond 1174 (cond
910 ((stringp printer) 1175 ((stringp printer)
911 (format printer value)) 1176 (if value
1177 (format printer value)
1178 ""))
912 ((stringp (car-safe printer)) 1179 ((stringp (car-safe printer))
913 (setq ses-call-printer-return t) 1180 (setq ses-call-printer-return t)
914 (format (car printer) value)) 1181 (if value
1182 (format (car printer) value)
1183 ""))
915 (t 1184 (t
916 (setq value (funcall printer value)) 1185 (setq value (funcall printer (or value "")))
917 (if (stringp value) 1186 (if (stringp value)
918 value 1187 value
919 (or (stringp (car-safe value)) 1188 (or (stringp (car-safe value))
@@ -932,13 +1201,13 @@ inhibit-quit to t."
932 (blank (if (> change 0) (make-string change ?\s))) 1201 (blank (if (> change 0) (make-string change ?\s)))
933 (at-end (= col ses--numcols))) 1202 (at-end (= col ses--numcols)))
934 (ses-set-with-undo 'ses--linewidth (+ ses--linewidth change)) 1203 (ses-set-with-undo 'ses--linewidth (+ ses--linewidth change))
935 ;;ses-set-with-undo always returns t for strings. 1204 ;; ses-set-with-undo always returns t for strings.
936 (1value (ses-set-with-undo 'ses--blank-line 1205 (1value (ses-set-with-undo 'ses--blank-line
937 (concat (make-string ses--linewidth ?\s) "\n"))) 1206 (concat (make-string ses--linewidth ?\s) "\n")))
938 (dotimes (row ses--numrows) 1207 (dotimes (row ses--numrows)
939 (ses-goto-print row col) 1208 (ses-goto-print row col)
940 (when at-end 1209 (when at-end
941 ;;Insert new columns before newline 1210 ;; Insert new columns before newline.
942 (let ((inhibit-point-motion-hooks t)) 1211 (let ((inhibit-point-motion-hooks t))
943 (backward-char 1))) 1212 (backward-char 1)))
944 (if blank 1213 (if blank
@@ -976,13 +1245,13 @@ number, COL is the column number for a data cell -- otherwise DEF
976is one of the symbols ses--col-widths, ses--col-printers, 1245is one of the symbols ses--col-widths, ses--col-printers,
977ses--default-printer, ses--numrows, or ses--numcols." 1246ses--default-printer, ses--numrows, or ses--numcols."
978 (ses-widen) 1247 (ses-widen)
979 (let ((inhibit-point-motion-hooks t)) ;In case intangible attrs are wrong 1248 (let ((inhibit-point-motion-hooks t)) ; In case intangible attrs are wrong.
980 (if col 1249 (if col
981 ;;It's a cell 1250 ;; It's a cell.
982 (progn 1251 (progn
983 (goto-char ses--data-marker) 1252 (goto-char ses--data-marker)
984 (forward-line (+ 1 (* def (1+ ses--numcols)) col))) 1253 (forward-line (+ 1 (* def (1+ ses--numcols)) col)))
985 ;;Convert def-symbol to offset 1254 ;; Convert def-symbol to offset.
986 (setq def (plist-get ses-paramlines-plist def)) 1255 (setq def (plist-get ses-paramlines-plist def))
987 (or def (signal 'args-out-of-range nil)) 1256 (or def (signal 'args-out-of-range nil))
988 (goto-char ses--params-marker) 1257 (goto-char ses--params-marker)
@@ -993,8 +1262,8 @@ ses--default-printer, ses--numrows, or ses--numcols."
993See `ses-goto-data' for meaning of DEF. Newlines in the data are escaped. 1262See `ses-goto-data' for meaning of DEF. Newlines in the data are escaped.
994If ELEM is specified, it is the array subscript within DEF to be set to VALUE." 1263If ELEM is specified, it is the array subscript within DEF to be set to VALUE."
995 (save-excursion 1264 (save-excursion
996 ;;We call ses-goto-data early, using the old values of numrows and 1265 ;; We call ses-goto-data early, using the old values of numrows and numcols
997 ;;numcols in case one of them is being changed. 1266 ;; in case one of them is being changed.
998 (ses-goto-data def) 1267 (ses-goto-data def)
999 (let ((inhibit-read-only t) 1268 (let ((inhibit-read-only t)
1000 (fmt (plist-get '(ses--col-widths "(ses-column-widths %S)" 1269 (fmt (plist-get '(ses--col-widths "(ses-column-widths %S)"
@@ -1012,7 +1281,7 @@ If ELEM is specified, it is the array subscript within DEF to be set to VALUE."
1012 (aset (symbol-value def) elem value)) 1281 (aset (symbol-value def) elem value))
1013 (setq oldval (symbol-value def)) 1282 (setq oldval (symbol-value def))
1014 (set def value)) 1283 (set def value))
1015 ;;Special undo since it's outside the narrowed buffer 1284 ;; Special undo since it's outside the narrowed buffer.
1016 (let (buffer-undo-list) 1285 (let (buffer-undo-list)
1017 (delete-region (point) (line-end-position)) 1286 (delete-region (point) (line-end-position))
1018 (insert (format fmt (symbol-value def)))) 1287 (insert (format fmt (symbol-value def))))
@@ -1042,7 +1311,7 @@ Newlines in the data are escaped."
1042 (setq formula (cadr formula))) 1311 (setq formula (cadr formula)))
1043 (if (eq (car-safe printer) 'ses-safe-printer) 1312 (if (eq (car-safe printer) 'ses-safe-printer)
1044 (setq printer (cadr printer))) 1313 (setq printer (cadr printer)))
1045 ;;This is noticably faster than (format "%S %S %S %S %S") 1314 ;; This is noticably faster than (format "%S %S %S %S %S")
1046 (setq text (concat "(ses-cell " 1315 (setq text (concat "(ses-cell "
1047 (symbol-name sym) 1316 (symbol-name sym)
1048 " " 1317 " "
@@ -1072,29 +1341,30 @@ Newlines in the data are escaped."
1072 1341
1073(defun ses-formula-references (formula &optional result-so-far) 1342(defun ses-formula-references (formula &optional result-so-far)
1074 "Produce a list of symbols for cells that this formula's value 1343 "Produce a list of symbols for cells that this formula's value
1075refers to. For recursive calls, RESULT-SO-FAR is the list being constructed, 1344refers to. For recursive calls, RESULT-SO-FAR is the list being
1076or t to get a wrong-type-argument error when the first reference is found." 1345constructed, or t to get a wrong-type-argument error when the
1077 (if (atom formula) 1346first reference is found."
1078 (if (ses-sym-rowcol formula) 1347 (if (ses-sym-rowcol formula)
1079 ;;Entire formula is one symbol 1348 ;;Entire formula is one symbol
1080 (add-to-list 'result-so-far formula) 1349 (add-to-list 'result-so-far formula)
1081 ) ;;Ignore other atoms 1350 (if (consp formula)
1082 (dolist (cur formula) 1351 (cond
1083 (cond 1352 ((eq (car formula) 'ses-range)
1084 ((ses-sym-rowcol cur) 1353 (dolist (cur
1085 ;;Save this reference 1354 (cdr (funcall 'macroexpand
1086 (add-to-list 'result-so-far cur)) 1355 (list 'ses-range (nth 1 formula)
1087 ((eq (car-safe cur) 'ses-range) 1356 (nth 2 formula)))))
1088 ;;All symbols in range are referenced 1357 (add-to-list 'result-so-far cur)))
1089 (dolist (x (cdr (macroexpand cur))) 1358 ((null (eq (car formula) 'quote))
1090 (add-to-list 'result-so-far x))) 1359 ;;Recursive call for subformulas
1091 ((and (consp cur) (not (eq (car cur) 'quote))) 1360 (dolist (cur formula)
1092 ;;Recursive call for subformulas 1361 (setq result-so-far (ses-formula-references cur result-so-far))))
1093 (setq result-so-far (ses-formula-references cur result-so-far))) 1362 (t
1094 (t 1363 ;;Ignore other stuff
1095 ;;Ignore other stuff 1364 ))
1096 )))) 1365 ;; other type of atom are ignored
1097 result-so-far) 1366 ))
1367 result-so-far)
1098 1368
1099(defsubst ses-relocate-symbol (sym rowcol startrow startcol rowincr colincr) 1369(defsubst ses-relocate-symbol (sym rowcol startrow startcol rowincr colincr)
1100 "Relocate one symbol SYM, whichs corresponds to ROWCOL (a cons of ROW and 1370 "Relocate one symbol SYM, whichs corresponds to ROWCOL (a cons of ROW and
@@ -1129,7 +1399,7 @@ Sets `ses-relocate-return' to 'delete if cell-references were removed."
1129 (if (setq rowcol (ses-sym-rowcol formula)) 1399 (if (setq rowcol (ses-sym-rowcol formula))
1130 (ses-relocate-symbol formula rowcol 1400 (ses-relocate-symbol formula rowcol
1131 startrow startcol rowincr colincr) 1401 startrow startcol rowincr colincr)
1132 formula) ;Pass through as-is 1402 formula) ; Pass through as-is.
1133 (dolist (cur formula) 1403 (dolist (cur formula)
1134 (setq rowcol (ses-sym-rowcol cur)) 1404 (setq rowcol (ses-sym-rowcol cur))
1135 (cond 1405 (cond
@@ -1138,9 +1408,9 @@ Sets `ses-relocate-return' to 'delete if cell-references were removed."
1138 startrow startcol rowincr colincr)) 1408 startrow startcol rowincr colincr))
1139 (if cur 1409 (if cur
1140 (push cur result) 1410 (push cur result)
1141 ;;Reference to a deleted cell. Set a flag in ses-relocate-return. 1411 ;; Reference to a deleted cell. Set a flag in ses-relocate-return.
1142 ;;don't change the flag if it's already 'range, since range 1412 ;; don't change the flag if it's already 'range, since range implies
1143 ;;implies 'delete. 1413 ;; 'delete.
1144 (unless ses-relocate-return 1414 (unless ses-relocate-return
1145 (setq ses-relocate-return 'delete)))) 1415 (setq ses-relocate-return 'delete))))
1146 ((eq (car-safe cur) 'ses-range) 1416 ((eq (car-safe cur) 'ses-range)
@@ -1148,10 +1418,10 @@ Sets `ses-relocate-return' to 'delete if cell-references were removed."
1148 (if cur 1418 (if cur
1149 (push cur result))) 1419 (push cur result)))
1150 ((or (atom cur) (eq (car cur) 'quote)) 1420 ((or (atom cur) (eq (car cur) 'quote))
1151 ;;Constants pass through unchanged 1421 ;; Constants pass through unchanged.
1152 (push cur result)) 1422 (push cur result))
1153 (t 1423 (t
1154 ;;Recursively copy and alter subformulas 1424 ;; Recursively copy and alter subformulas.
1155 (push (ses-relocate-formula cur startrow startcol 1425 (push (ses-relocate-formula cur startrow startcol
1156 rowincr colincr) 1426 rowincr colincr)
1157 result)))) 1427 result))))
@@ -1177,47 +1447,47 @@ if the range was altered."
1177 field) 1447 field)
1178 (cond 1448 (cond
1179 ((and (not min) (not max)) 1449 ((and (not min) (not max))
1180 (setq range nil)) ;;The entire range is deleted 1450 (setq range nil)) ; The entire range is deleted.
1181 ((zerop colincr) 1451 ((zerop colincr)
1182 ;;Inserting or deleting rows 1452 ;; Inserting or deleting rows.
1183 (setq field 'car) 1453 (setq field 'car)
1184 (if (not min) 1454 (if (not min)
1185 ;;Chopped off beginning of range 1455 ;; Chopped off beginning of range.
1186 (setq min (ses-create-cell-symbol startrow (cdr minrowcol)) 1456 (setq min (ses-create-cell-symbol startrow (cdr minrowcol))
1187 ses-relocate-return 'range)) 1457 ses-relocate-return 'range))
1188 (if (not max) 1458 (if (not max)
1189 (if (> rowincr 0) 1459 (if (> rowincr 0)
1190 ;;Trying to insert a nonexistent row 1460 ;; Trying to insert a nonexistent row.
1191 (setq max (ses-create-cell-symbol (1- ses--numrows) 1461 (setq max (ses-create-cell-symbol (1- ses--numrows)
1192 (cdr minrowcol))) 1462 (cdr minrowcol)))
1193 ;;End of range is being deleted 1463 ;; End of range is being deleted.
1194 (setq max (ses-create-cell-symbol (1- startrow) (cdr minrowcol)) 1464 (setq max (ses-create-cell-symbol (1- startrow) (cdr minrowcol))
1195 ses-relocate-return 'range)) 1465 ses-relocate-return 'range))
1196 (and (> rowincr 0) 1466 (and (> rowincr 0)
1197 (= (car maxrowcol) (1- startrow)) 1467 (= (car maxrowcol) (1- startrow))
1198 (= (cdr minrowcol) (cdr maxrowcol)) 1468 (= (cdr minrowcol) (cdr maxrowcol))
1199 ;;Insert after ending row of vertical range - include it 1469 ;; Insert after ending row of vertical range --- include it.
1200 (setq max (ses-create-cell-symbol (+ startrow rowincr -1) 1470 (setq max (ses-create-cell-symbol (+ startrow rowincr -1)
1201 (cdr maxrowcol)))))) 1471 (cdr maxrowcol))))))
1202 (t 1472 (t
1203 ;;Inserting or deleting columns 1473 ;; Inserting or deleting columns.
1204 (setq field 'cdr) 1474 (setq field 'cdr)
1205 (if (not min) 1475 (if (not min)
1206 ;;Chopped off beginning of range 1476 ;; Chopped off beginning of range.
1207 (setq min (ses-create-cell-symbol (car minrowcol) startcol) 1477 (setq min (ses-create-cell-symbol (car minrowcol) startcol)
1208 ses-relocate-return 'range)) 1478 ses-relocate-return 'range))
1209 (if (not max) 1479 (if (not max)
1210 (if (> colincr 0) 1480 (if (> colincr 0)
1211 ;;Trying to insert a nonexistent column 1481 ;; Trying to insert a nonexistent column.
1212 (setq max (ses-create-cell-symbol (car maxrowcol) 1482 (setq max (ses-create-cell-symbol (car maxrowcol)
1213 (1- ses--numcols))) 1483 (1- ses--numcols)))
1214 ;;End of range is being deleted 1484 ;; End of range is being deleted.
1215 (setq max (ses-create-cell-symbol (car maxrowcol) (1- startcol)) 1485 (setq max (ses-create-cell-symbol (car maxrowcol) (1- startcol))
1216 ses-relocate-return 'range)) 1486 ses-relocate-return 'range))
1217 (and (> colincr 0) 1487 (and (> colincr 0)
1218 (= (cdr maxrowcol) (1- startcol)) 1488 (= (cdr maxrowcol) (1- startcol))
1219 (= (car minrowcol) (car maxrowcol)) 1489 (= (car minrowcol) (car maxrowcol))
1220 ;;Insert after ending column of horizontal range - include it 1490 ;; Insert after ending column of horizontal range --- include it.
1221 (setq max (ses-create-cell-symbol (car maxrowcol) 1491 (setq max (ses-create-cell-symbol (car maxrowcol)
1222 (+ startcol colincr -1))))))) 1492 (+ startcol colincr -1)))))))
1223 (when range 1493 (when range
@@ -1225,9 +1495,9 @@ if the range was altered."
1225 (funcall field minrowcol)) 1495 (funcall field minrowcol))
1226 (- (funcall field (ses-sym-rowcol max)) 1496 (- (funcall field (ses-sym-rowcol max))
1227 (funcall field (ses-sym-rowcol min)))) 1497 (funcall field (ses-sym-rowcol min))))
1228 ;;This range has changed size 1498 ;; This range has changed size.
1229 (setq ses-relocate-return 'range)) 1499 (setq ses-relocate-return 'range))
1230 (list 'ses-range min max)))) 1500 `(ses-range ,min ,max ,@(cdddr range)))))
1231 1501
1232(defun ses-relocate-all (minrow mincol rowincr colincr) 1502(defun ses-relocate-all (minrow mincol rowincr colincr)
1233 "Alter all cell values, symbols, formulas, and reference-lists to relocate 1503 "Alter all cell values, symbols, formulas, and reference-lists to relocate
@@ -1236,7 +1506,7 @@ to each symbol."
1236 (let (reform) 1506 (let (reform)
1237 (let (mycell newval) 1507 (let (mycell newval)
1238 (dotimes-with-progress-reporter 1508 (dotimes-with-progress-reporter
1239 (row ses--numrows) "Relocating formulas..." 1509 (row ses--numrows) "Relocating formulas..."
1240 (dotimes (col ses--numcols) 1510 (dotimes (col ses--numcols)
1241 (setq ses-relocate-return nil 1511 (setq ses-relocate-return nil
1242 mycell (ses-get-cell row col) 1512 mycell (ses-get-cell row col)
@@ -1244,13 +1514,13 @@ to each symbol."
1244 minrow mincol rowincr colincr)) 1514 minrow mincol rowincr colincr))
1245 (ses-set-cell row col 'formula newval) 1515 (ses-set-cell row col 'formula newval)
1246 (if (eq ses-relocate-return 'range) 1516 (if (eq ses-relocate-return 'range)
1247 ;;This cell contains a (ses-range X Y) where a cell has been 1517 ;; This cell contains a (ses-range X Y) where a cell has been
1248 ;;inserted or deleted in the middle of the range. 1518 ;; inserted or deleted in the middle of the range.
1249 (push (cons row col) reform)) 1519 (push (cons row col) reform))
1250 (if ses-relocate-return 1520 (if ses-relocate-return
1251 ;;This cell referred to a cell that's been deleted or is no 1521 ;; This cell referred to a cell that's been deleted or is no
1252 ;;longer part of the range. We can't fix that now because 1522 ;; longer part of the range. We can't fix that now because
1253 ;;reference lists cells have been partially updated. 1523 ;; reference lists cells have been partially updated.
1254 (add-to-list 'ses--deferred-recalc 1524 (add-to-list 'ses--deferred-recalc
1255 (ses-create-cell-symbol row col))) 1525 (ses-create-cell-symbol row col)))
1256 (setq newval (ses-relocate-formula (ses-cell-references mycell) 1526 (setq newval (ses-relocate-formula (ses-cell-references mycell)
@@ -1259,13 +1529,13 @@ to each symbol."
1259 (and (>= row minrow) (>= col mincol) 1529 (and (>= row minrow) (>= col mincol)
1260 (ses-set-cell row col 'symbol 1530 (ses-set-cell row col 'symbol
1261 (ses-create-cell-symbol row col)))))) 1531 (ses-create-cell-symbol row col))))))
1262 ;;Relocate the cell values 1532 ;; Relocate the cell values.
1263 (let (oldval myrow mycol xrow xcol) 1533 (let (oldval myrow mycol xrow xcol)
1264 (cond 1534 (cond
1265 ((and (<= rowincr 0) (<= colincr 0)) 1535 ((and (<= rowincr 0) (<= colincr 0))
1266 ;;Deletion of rows and/or columns 1536 ;; Deletion of rows and/or columns.
1267 (dotimes-with-progress-reporter 1537 (dotimes-with-progress-reporter
1268 (row (- ses--numrows minrow)) "Relocating variables..." 1538 (row (- ses--numrows minrow)) "Relocating variables..."
1269 (setq myrow (+ row minrow)) 1539 (setq myrow (+ row minrow))
1270 (dotimes (col (- ses--numcols mincol)) 1540 (dotimes (col (- ses--numcols mincol))
1271 (setq mycol (+ col mincol) 1541 (setq mycol (+ col mincol)
@@ -1273,11 +1543,11 @@ to each symbol."
1273 xcol (- mycol colincr)) 1543 xcol (- mycol colincr))
1274 (if (and (< xrow ses--numrows) (< xcol ses--numcols)) 1544 (if (and (< xrow ses--numrows) (< xcol ses--numcols))
1275 (setq oldval (ses-cell-value xrow xcol)) 1545 (setq oldval (ses-cell-value xrow xcol))
1276 ;;Cell is off the end of the array 1546 ;; Cell is off the end of the array.
1277 (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) 1547 (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol))))
1278 (ses-set-cell myrow mycol 'value oldval)))) 1548 (ses-set-cell myrow mycol 'value oldval))))
1279 ((and (wholenump rowincr) (wholenump colincr)) 1549 ((and (wholenump rowincr) (wholenump colincr))
1280 ;;Insertion of rows and/or columns. Run the loop backwards. 1550 ;; Insertion of rows and/or columns. Run the loop backwards.
1281 (let ((disty (1- ses--numrows)) 1551 (let ((disty (1- ses--numrows))
1282 (distx (1- ses--numcols)) 1552 (distx (1- ses--numcols))
1283 myrow mycol) 1553 myrow mycol)
@@ -1289,16 +1559,16 @@ to each symbol."
1289 xrow (- myrow rowincr) 1559 xrow (- myrow rowincr)
1290 xcol (- mycol colincr)) 1560 xcol (- mycol colincr))
1291 (if (or (< xrow minrow) (< xcol mincol)) 1561 (if (or (< xrow minrow) (< xcol mincol))
1292 ;;Newly-inserted value 1562 ;; Newly-inserted value.
1293 (setq oldval nil) 1563 (setq oldval nil)
1294 ;;Transfer old value 1564 ;; Transfer old value.
1295 (setq oldval (ses-cell-value xrow xcol))) 1565 (setq oldval (ses-cell-value xrow xcol)))
1296 (ses-set-cell myrow mycol 'value oldval))) 1566 (ses-set-cell myrow mycol 'value oldval)))
1297 t)) ;Make testcover happy by returning non-nil here 1567 t)) ; Make testcover happy by returning non-nil here.
1298 (t 1568 (t
1299 (error "ROWINCR and COLINCR must have the same sign")))) 1569 (error "ROWINCR and COLINCR must have the same sign"))))
1300 ;;Reconstruct reference lists for cells that contain ses-ranges that 1570 ;; Reconstruct reference lists for cells that contain ses-ranges that have
1301 ;;have changed size. 1571 ;; changed size.
1302 (when reform 1572 (when reform
1303 (message "Fixing ses-ranges...") 1573 (message "Fixing ses-ranges...")
1304 (let (row col) 1574 (let (row col)
@@ -1324,9 +1594,9 @@ to each symbol."
1324 1594
1325(defun ses-set-with-undo (sym newval) 1595(defun ses-set-with-undo (sym newval)
1326 "Like set, but undoable. Result is t if value has changed." 1596 "Like set, but undoable. Result is t if value has changed."
1327 ;;We try to avoid adding redundant entries to the undo list, but this is 1597 ;; We try to avoid adding redundant entries to the undo list, but this is
1328 ;;unavoidable for strings because equal ignores text properties and there's 1598 ;; unavoidable for strings because equal ignores text properties and there's
1329 ;;no easy way to get the whole property list to see if it's different! 1599 ;; no easy way to get the whole property list to see if it's different!
1330 (unless (and (boundp sym) 1600 (unless (and (boundp sym)
1331 (equal (symbol-value sym) newval) 1601 (equal (symbol-value sym) newval)
1332 (not (stringp newval))) 1602 (not (stringp newval)))
@@ -1339,14 +1609,15 @@ to each symbol."
1339 1609
1340(defun ses-unset-with-undo (sym) 1610(defun ses-unset-with-undo (sym)
1341 "Set SYM to be unbound. This is undoable." 1611 "Set SYM to be unbound. This is undoable."
1342 (when (1value (boundp sym)) ;;Always bound, except after a programming error 1612 (when (1value (boundp sym)) ; Always bound, except after a programming error.
1343 (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list) 1613 (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list)
1344 (makunbound sym))) 1614 (makunbound sym)))
1345 1615
1346(defun ses-aset-with-undo (array idx newval) 1616(defun ses-aset-with-undo (array idx newval)
1347 "Like aset, but undoable. Result is t if element has changed" 1617 "Like aset, but undoable. Result is t if element has changed"
1348 (unless (equal (aref array idx) newval) 1618 (unless (equal (aref array idx) newval)
1349 (push `(apply ses-aset-with-undo ,array ,idx ,(aref array idx)) buffer-undo-list) 1619 (push `(apply ses-aset-with-undo ,array ,idx
1620 ,(aref array idx)) buffer-undo-list)
1350 (aset array idx newval) 1621 (aset array idx newval)
1351 t)) 1622 t))
1352 1623
@@ -1359,7 +1630,7 @@ to each symbol."
1359 "Parse the current buffer and sets up buffer-local variables. Does not 1630 "Parse the current buffer and sets up buffer-local variables. Does not
1360execute cell formulas or print functions." 1631execute cell formulas or print functions."
1361 (widen) 1632 (widen)
1362 ;;Read our global parameters, which should be a 3-element list 1633 ;; Read our global parameters, which should be a 3-element list.
1363 (goto-char (point-max)) 1634 (goto-char (point-max))
1364 (search-backward ";; Local Variables:\n" nil t) 1635 (search-backward ";; Local Variables:\n" nil t)
1365 (backward-list 1) 1636 (backward-list 1)
@@ -1376,7 +1647,7 @@ execute cell formulas or print functions."
1376 ses--numrows (cadr params) 1647 ses--numrows (cadr params)
1377 ses--numcols (nth 2 params)) 1648 ses--numcols (nth 2 params))
1378 (when (= ses--file-format 1) 1649 (when (= ses--file-format 1)
1379 (let (buffer-undo-list) ;This is not undoable 1650 (let (buffer-undo-list) ; This is not undoable.
1380 (ses-goto-data 'ses--header-row) 1651 (ses-goto-data 'ses--header-row)
1381 (insert "(ses-header-row 0)\n") 1652 (insert "(ses-header-row 0)\n")
1382 (ses-set-parameter 'ses--file-format 2) 1653 (ses-set-parameter 'ses--file-format 2)
@@ -1384,11 +1655,11 @@ execute cell formulas or print functions."
1384 (or (= ses--file-format 2) 1655 (or (= ses--file-format 2)
1385 (error "This file needs a newer version of the SES library code")) 1656 (error "This file needs a newer version of the SES library code"))
1386 (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols)) 1657 (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols))
1387 ;;Initialize cell array 1658 ;; Initialize cell array.
1388 (setq ses--cells (make-vector ses--numrows nil)) 1659 (setq ses--cells (make-vector ses--numrows nil))
1389 (dotimes (row ses--numrows) 1660 (dotimes (row ses--numrows)
1390 (aset ses--cells row (make-vector ses--numcols nil)))) 1661 (aset ses--cells row (make-vector ses--numcols nil))))
1391 ;;Skip over print area, which we assume is correct 1662 ;; Skip over print area, which we assume is correct.
1392 (goto-char (point-min)) 1663 (goto-char (point-min))
1393 (forward-line ses--numrows) 1664 (forward-line ses--numrows)
1394 (or (looking-at ses-print-data-boundary) 1665 (or (looking-at ses-print-data-boundary)
@@ -1396,10 +1667,10 @@ execute cell formulas or print functions."
1396 (forward-char 1) 1667 (forward-char 1)
1397 (setq ses--data-marker (point-marker)) 1668 (setq ses--data-marker (point-marker))
1398 (forward-char (1- (length ses-print-data-boundary))) 1669 (forward-char (1- (length ses-print-data-boundary)))
1399 ;;Initialize printer and symbol lists 1670 ;; Initialize printer and symbol lists.
1400 (mapc 'ses-printer-record ses-standard-printer-functions) 1671 (mapc 'ses-printer-record ses-standard-printer-functions)
1401 (setq ses--symbolic-formulas nil) 1672 (setq ses--symbolic-formulas nil)
1402 ;;Load cell definitions 1673 ;; Load cell definitions.
1403 (dotimes (row ses--numrows) 1674 (dotimes (row ses--numrows)
1404 (dotimes (col ses--numcols) 1675 (dotimes (col ses--numcols)
1405 (let* ((x (read (current-buffer))) 1676 (let* ((x (read (current-buffer)))
@@ -1412,7 +1683,7 @@ execute cell formulas or print functions."
1412 (eval x))) 1683 (eval x)))
1413 (or (looking-at "\n\n") 1684 (or (looking-at "\n\n")
1414 (error "Missing blank line between rows"))) 1685 (error "Missing blank line between rows")))
1415 ;;Load global parameters 1686 ;; Load global parameters.
1416 (let ((widths (read (current-buffer))) 1687 (let ((widths (read (current-buffer)))
1417 (n1 (char-after (point))) 1688 (n1 (char-after (point)))
1418 (printers (read (current-buffer))) 1689 (printers (read (current-buffer)))
@@ -1434,12 +1705,12 @@ execute cell formulas or print functions."
1434 (1value (eval def-printer)) 1705 (1value (eval def-printer))
1435 (1value (eval printers)) 1706 (1value (eval printers))
1436 (1value (eval head-row))) 1707 (1value (eval head-row)))
1437 ;;Should be back at global-params 1708 ;; Should be back at global-params.
1438 (forward-char 1) 1709 (forward-char 1)
1439 (or (looking-at (replace-regexp-in-string "1" "[0-9]+" 1710 (or (looking-at (replace-regexp-in-string "1" "[0-9]+"
1440 ses-initial-global-parameters)) 1711 ses-initial-global-parameters))
1441 (error "Problem with column-defs or global-params")) 1712 (error "Problem with column-defs or global-params"))
1442 ;;Check for overall newline count in definitions area 1713 ;; Check for overall newline count in definitions area.
1443 (forward-line 3) 1714 (forward-line 3)
1444 (let ((start (point))) 1715 (let ((start (point)))
1445 (ses-goto-data 'ses--numrows) 1716 (ses-goto-data 'ses--numrows)
@@ -1457,23 +1728,23 @@ Narrows the buffer to show only the print area. Gives it `read-only' and
1457 (inhibit-point-motion-hooks t) 1728 (inhibit-point-motion-hooks t)
1458 (was-modified (buffer-modified-p)) 1729 (was-modified (buffer-modified-p))
1459 pos sym) 1730 pos sym)
1460 (ses-goto-data 0 0) ;;Include marker between print-area and data-area 1731 (ses-goto-data 0 0) ; Include marker between print-area and data-area.
1461 (set-text-properties (point) (point-max) nil) ;Delete garbage props 1732 (set-text-properties (point) (point-max) nil) ; Delete garbage props.
1462 (mapc 'delete-overlay (overlays-in (point-min) (point-max))) 1733 (mapc 'delete-overlay (overlays-in (point-min) (point-max)))
1463 ;;The print area is read-only (except for our special commands) and uses a 1734 ;; The print area is read-only (except for our special commands) and uses a
1464 ;;special keymap. 1735 ;; special keymap.
1465 (put-text-property (point-min) (1- (point)) 'read-only 'ses) 1736 (put-text-property (point-min) (1- (point)) 'read-only 'ses)
1466 (put-text-property (point-min) (1- (point)) 'keymap 'ses-mode-print-map) 1737 (put-text-property (point-min) (1- (point)) 'keymap 'ses-mode-print-map)
1467 ;;For the beginning of the buffer, we want the read-only and keymap 1738 ;; For the beginning of the buffer, we want the read-only and keymap
1468 ;;attributes to be inherited from the first character 1739 ;; attributes to be inherited from the first character.
1469 (put-text-property (point-min) (1+ (point-min)) 'front-sticky t) 1740 (put-text-property (point-min) (1+ (point-min)) 'front-sticky t)
1470 ;;Create intangible properties, which also indicate which cell the text 1741 ;; Create intangible properties, which also indicate which cell the text
1471 ;;came from. 1742 ;; came from.
1472 (dotimes-with-progress-reporter (row ses--numrows) "Finding cells..." 1743 (dotimes-with-progress-reporter (row ses--numrows) "Finding cells..."
1473 (dotimes (col ses--numcols) 1744 (dotimes (col ses--numcols)
1474 (setq pos end 1745 (setq pos end
1475 sym (ses-cell-symbol row col)) 1746 sym (ses-cell-symbol row col))
1476 ;;Include skipped cells following this one 1747 ;; Include skipped cells following this one.
1477 (while (and (< col (1- ses--numcols)) 1748 (while (and (< col (1- ses--numcols))
1478 (eq (ses-cell-value row (1+ col)) '*skip*)) 1749 (eq (ses-cell-value row (1+ col)) '*skip*))
1479 (setq end (+ end (ses-col-width col) 1) 1750 (setq end (+ end (ses-col-width col) 1)
@@ -1487,13 +1758,13 @@ Narrows the buffer to show only the print area. Gives it `read-only' and
1487 (forward-char) 1758 (forward-char)
1488 (point)))) 1759 (point))))
1489 (put-text-property pos end 'intangible sym))) 1760 (put-text-property pos end 'intangible sym)))
1490 ;;Adding these properties did not actually alter the text 1761 ;; Adding these properties did not actually alter the text.
1491 (unless was-modified 1762 (unless was-modified
1492 (restore-buffer-modified-p nil) 1763 (restore-buffer-modified-p nil)
1493 (buffer-disable-undo) 1764 (buffer-disable-undo)
1494 (buffer-enable-undo))) 1765 (buffer-enable-undo)))
1495 ;;Create the underlining overlay. It's impossible for (point) to be 2, 1766 ;; Create the underlining overlay. It's impossible for (point) to be 2,
1496 ;;because column A must be at least 1 column wide. 1767 ;; because column A must be at least 1 column wide.
1497 (setq ses--curcell-overlay (make-overlay (1+ (point-min)) (1+ (point-min)))) 1768 (setq ses--curcell-overlay (make-overlay (1+ (point-min)) (1+ (point-min))))
1498 (overlay-put ses--curcell-overlay 'face 'underline)) 1769 (overlay-put ses--curcell-overlay 'face 'underline))
1499 1770
@@ -1502,15 +1773,15 @@ Narrows the buffer to show only the print area. Gives it `read-only' and
1502Delete overlays, remove special text properties." 1773Delete overlays, remove special text properties."
1503 (widen) 1774 (widen)
1504 (let ((inhibit-read-only t) 1775 (let ((inhibit-read-only t)
1505 ;; When reverting, hide the buffer name, otherwise Emacs will ask 1776 ;; When reverting, hide the buffer name, otherwise Emacs will ask the
1506 ;; the user "the file is modified, do you really want to make 1777 ;; user "the file is modified, do you really want to make modifications
1507 ;; modifications to this buffer", where the "modifications" refer to 1778 ;; to this buffer", where the "modifications" refer to the irrelevant
1508 ;; the irrelevant set-text-properties below. 1779 ;; set-text-properties below.
1509 (buffer-file-name nil) 1780 (buffer-file-name nil)
1510 (was-modified (buffer-modified-p))) 1781 (was-modified (buffer-modified-p)))
1511 ;;Delete read-only, keymap, and intangible properties 1782 ;; Delete read-only, keymap, and intangible properties.
1512 (set-text-properties (point-min) (point-max) nil) 1783 (set-text-properties (point-min) (point-max) nil)
1513 ;;Delete overlay 1784 ;; Delete overlay.
1514 (mapc 'delete-overlay (overlays-in (point-min) (point-max))) 1785 (mapc 'delete-overlay (overlays-in (point-min) (point-max)))
1515 (unless was-modified 1786 (unless was-modified
1516 (restore-buffer-modified-p nil)))) 1787 (restore-buffer-modified-p nil))))
@@ -1530,30 +1801,26 @@ These are active only in the minibuffer, when entering or editing a formula:
1530 (unless (and (boundp 'ses--deferred-narrow) 1801 (unless (and (boundp 'ses--deferred-narrow)
1531 (eq ses--deferred-narrow 'ses-mode)) 1802 (eq ses--deferred-narrow 'ses-mode))
1532 (kill-all-local-variables) 1803 (kill-all-local-variables)
1533 (mapc 'make-local-variable ses-localvars) 1804 (ses-set-localvars)
1534 (setq major-mode 'ses-mode 1805 (setq major-mode 'ses-mode
1535 mode-name "SES" 1806 mode-name "SES"
1536 next-line-add-newlines nil 1807 next-line-add-newlines nil
1537 truncate-lines t 1808 truncate-lines t
1538 ;;SES deliberately puts lots of trailing whitespace in its buffer 1809 ;; SES deliberately puts lots of trailing whitespace in its buffer.
1539 show-trailing-whitespace nil 1810 show-trailing-whitespace nil
1540 ;;Cell ranges do not work reasonably without this 1811 ;; Cell ranges do not work reasonably without this.
1541 transient-mark-mode t 1812 transient-mark-mode t
1542 ;;not to use tab characters for safe 1813 ;; Not to use tab characters for safe (tabs may do bad for column
1543 ;;(tabs may do bad for column calculation) 1814 ;; calculation).
1544 indent-tabs-mode nil) 1815 indent-tabs-mode nil)
1545 (1value (add-hook 'change-major-mode-hook 'ses-cleanup nil t)) 1816 (1value (add-hook 'change-major-mode-hook 'ses-cleanup nil t))
1546 (1value (add-hook 'before-revert-hook 'ses-cleanup nil t)) 1817 (1value (add-hook 'before-revert-hook 'ses-cleanup nil t))
1547 (setq ses--curcell nil 1818 (setq header-line-format '(:eval (progn
1548 ses--deferred-recalc nil
1549 ses--deferred-write nil
1550 ses--header-hscroll -1 ;Flag for "initial recalc needed"
1551 header-line-format '(:eval (progn
1552 (when (/= (window-hscroll) 1819 (when (/= (window-hscroll)
1553 ses--header-hscroll) 1820 ses--header-hscroll)
1554 ;;Reset ses--header-hscroll first, to 1821 ;; Reset ses--header-hscroll first,
1555 ;;avoid recursion problems when 1822 ;; to avoid recursion problems when
1556 ;;debugging ses-create-header-string 1823 ;; debugging ses-create-header-string
1557 (setq ses--header-hscroll 1824 (setq ses--header-hscroll
1558 (window-hscroll)) 1825 (window-hscroll))
1559 (ses-create-header-string)) 1826 (ses-create-header-string))
@@ -1562,12 +1829,13 @@ These are active only in the minibuffer, when entering or editing a formula:
1562 (was-modified (buffer-modified-p))) 1829 (was-modified (buffer-modified-p)))
1563 (save-excursion 1830 (save-excursion
1564 (if was-empty 1831 (if was-empty
1565 ;;Initialize buffer to contain one cell, for now 1832 ;; Initialize buffer to contain one cell, for now.
1566 (insert ses-initial-file-contents)) 1833 (insert ses-initial-file-contents))
1567 (ses-load) 1834 (ses-load)
1568 (ses-setup)) 1835 (ses-setup))
1569 (when was-empty 1836 (when was-empty
1570 (unless (equal ses-initial-default-printer (1value ses--default-printer)) 1837 (unless (equal ses-initial-default-printer
1838 (1value ses--default-printer))
1571 (1value (ses-read-default-printer ses-initial-default-printer))) 1839 (1value (ses-read-default-printer ses-initial-default-printer)))
1572 (unless (= ses-initial-column-width (1value (ses-col-width 0))) 1840 (unless (= ses-initial-column-width (1value (ses-col-width 0)))
1573 (1value (ses-set-column-width 0 ses-initial-column-width))) 1841 (1value (ses-set-column-width 0 ses-initial-column-width)))
@@ -1582,12 +1850,12 @@ These are active only in the minibuffer, when entering or editing a formula:
1582 (buffer-enable-undo) 1850 (buffer-enable-undo)
1583 (goto-char (point-min)))) 1851 (goto-char (point-min))))
1584 (use-local-map ses-mode-map) 1852 (use-local-map ses-mode-map)
1585 ;;Set the deferred narrowing flag (we can't narrow until after 1853 ;; Set the deferred narrowing flag (we can't narrow until after
1586 ;;after-find-file completes). If .ses is on the auto-load alist and the 1854 ;; after-find-file completes). If .ses is on the auto-load alist and the
1587 ;;file has "mode: ses", our ses-mode function will be called twice! Use 1855 ;; file has "mode: ses", our ses-mode function will be called twice! Use a
1588 ;;a special flag to detect this (will be reset by ses-command-hook). 1856 ;; special flag to detect this (will be reset by ses-command-hook). For
1589 ;;For find-alternate-file, post-command-hook doesn't get run for some 1857 ;; find-alternate-file, post-command-hook doesn't get run for some reason,
1590 ;;reason, so use an idle timer to make sure. 1858 ;; so use an idle timer to make sure.
1591 (setq ses--deferred-narrow 'ses-mode) 1859 (setq ses--deferred-narrow 'ses-mode)
1592 (1value (add-hook 'post-command-hook 'ses-command-hook nil t)) 1860 (1value (add-hook 'post-command-hook 'ses-command-hook nil t))
1593 (run-with-idle-timer 0.01 nil 'ses-command-hook) 1861 (run-with-idle-timer 0.01 nil 'ses-command-hook)
@@ -1601,26 +1869,28 @@ moves the underlining overlay. Performs any recalculations or cell-data
1601writes that have been deferred. If buffer-narrowing has been deferred, 1869writes that have been deferred. If buffer-narrowing has been deferred,
1602narrows the buffer now." 1870narrows the buffer now."
1603 (condition-case err 1871 (condition-case err
1604 (when (eq major-mode 'ses-mode) ;Otherwise, not our buffer anymore 1872 (when (eq major-mode 'ses-mode) ; Otherwise, not our buffer anymore.
1605 (when ses--deferred-recalc 1873 (when ses--deferred-recalc
1606 ;;We reset the deferred list before starting on the recalc -- in case 1874 ;; We reset the deferred list before starting on the recalc --- in
1607 ;;of error, we don't want to retry the recalc after every keystroke! 1875 ;; case of error, we don't want to retry the recalc after every
1876 ;; keystroke!
1877 (ses-initialize-Dijkstra-attempt)
1608 (let ((old ses--deferred-recalc)) 1878 (let ((old ses--deferred-recalc))
1609 (setq ses--deferred-recalc nil) 1879 (setq ses--deferred-recalc nil)
1610 (ses-update-cells old))) 1880 (ses-update-cells old)))
1611 (when ses--deferred-write 1881 (when ses--deferred-write
1612 ;;We don't reset the deferred list before starting -- the most 1882 ;; We don't reset the deferred list before starting --- the most
1613 ;;likely error is keyboard-quit, and we do want to keep trying 1883 ;; likely error is keyboard-quit, and we do want to keep trying these
1614 ;;these writes after a quit. 1884 ;; writes after a quit.
1615 (ses-write-cells) 1885 (ses-write-cells)
1616 (push '(apply ses-widen) buffer-undo-list)) 1886 (push '(apply ses-widen) buffer-undo-list))
1617 (when ses--deferred-narrow 1887 (when ses--deferred-narrow
1618 ;;We're not allowed to narrow the buffer until after-find-file has 1888 ;; We're not allowed to narrow the buffer until after-find-file has
1619 ;;read the local variables at the end of the file. Now it's safe to 1889 ;; read the local variables at the end of the file. Now it's safe to
1620 ;;do the narrowing. 1890 ;; do the narrowing.
1621 (narrow-to-region (point-min) ses--data-marker) 1891 (narrow-to-region (point-min) ses--data-marker)
1622 (setq ses--deferred-narrow nil)) 1892 (setq ses--deferred-narrow nil))
1623 ;;Update the modeline 1893 ;; Update the modeline.
1624 (let ((oldcell ses--curcell)) 1894 (let ((oldcell ses--curcell))
1625 (ses-set-curcell) 1895 (ses-set-curcell)
1626 (unless (eq ses--curcell oldcell) 1896 (unless (eq ses--curcell oldcell)
@@ -1636,34 +1906,34 @@ narrows the buffer now."
1636 "-" 1906 "-"
1637 (symbol-name (cdr ses--curcell)))))) 1907 (symbol-name (cdr ses--curcell))))))
1638 (force-mode-line-update))) 1908 (force-mode-line-update)))
1639 ;;Use underline overlay for single-cells only, turn off otherwise 1909 ;; Use underline overlay for single-cells only, turn off otherwise.
1640 (if (listp ses--curcell) 1910 (if (listp ses--curcell)
1641 (move-overlay ses--curcell-overlay 2 2) 1911 (move-overlay ses--curcell-overlay 2 2)
1642 (let ((next (next-single-property-change (point) 'intangible))) 1912 (let ((next (next-single-property-change (point) 'intangible)))
1643 (move-overlay ses--curcell-overlay (point) (1- next)))) 1913 (move-overlay ses--curcell-overlay (point) (1- next))))
1644 (when (not (pos-visible-in-window-p)) 1914 (when (not (pos-visible-in-window-p))
1645 ;;Scrolling will happen later 1915 ;; Scrolling will happen later.
1646 (run-with-idle-timer 0.01 nil 'ses-command-hook) 1916 (run-with-idle-timer 0.01 nil 'ses-command-hook)
1647 (setq ses--curcell t))) 1917 (setq ses--curcell t)))
1648 ;;Prevent errors in this post-command-hook from silently erasing the hook! 1918 ;; Prevent errors in this post-command-hook from silently erasing the hook!
1649 (error 1919 (error
1650 (unless executing-kbd-macro 1920 (unless executing-kbd-macro
1651 (ding)) 1921 (ding))
1652 (message "%s" (error-message-string err)))) 1922 (message "%s" (error-message-string err))))
1653 nil) ;Make coverage-tester happy 1923 nil) ; Make coverage-tester happy.
1654 1924
1655(defun ses-create-header-string () 1925(defun ses-create-header-string ()
1656 "Set up `ses--header-string' as the buffer's header line. 1926 "Set up `ses--header-string' as the buffer's header line.
1657Based on the current set of columns and `window-hscroll' position." 1927Based on the current set of columns and `window-hscroll' position."
1658 (let ((totwidth (- (window-hscroll))) 1928 (let ((totwidth (- (window-hscroll)))
1659 result width x) 1929 result width x)
1660 ;;Leave room for the left-side fringe and scrollbar 1930 ;; Leave room for the left-side fringe and scrollbar.
1661 (push (propertize " " 'display '((space :align-to 0))) result) 1931 (push (propertize " " 'display '((space :align-to 0))) result)
1662 (dotimes (col ses--numcols) 1932 (dotimes (col ses--numcols)
1663 (setq width (ses-col-width col) 1933 (setq width (ses-col-width col)
1664 totwidth (+ totwidth width 1)) 1934 totwidth (+ totwidth width 1))
1665 (if (= totwidth 1) 1935 (if (= totwidth 1)
1666 ;;Scrolled so intercolumn space is leftmost 1936 ;; Scrolled so intercolumn space is leftmost.
1667 (push " " result)) 1937 (push " " result))
1668 (when (> totwidth 1) 1938 (when (> totwidth 1)
1669 (if (> ses--header-row 0) 1939 (if (> ses--header-row 0)
@@ -1683,8 +1953,8 @@ Based on the current set of columns and `window-hscroll' position."
1683 'display `((space :align-to ,(1- totwidth))) 1953 'display `((space :align-to ,(1- totwidth)))
1684 'face ses-box-prop) 1954 'face ses-box-prop)
1685 result) 1955 result)
1686 ;;Allow the following space to be squished to make room for the 3-D box 1956 ;; Allow the following space to be squished to make room for the 3-D box
1687 ;;Coverage test ignores properties, thinks this is always a space! 1957 ;; Coverage test ignores properties, thinks this is always a space!
1688 (push (1value (propertize " " 'display `((space :align-to ,totwidth)))) 1958 (push (1value (propertize " " 'display `((space :align-to ,totwidth))))
1689 result))) 1959 result)))
1690 (if (> ses--header-row 0) 1960 (if (> ses--header-row 0)
@@ -1727,19 +1997,23 @@ print area if NONARROW is nil."
1727 (search-forward ses-print-data-boundary) 1997 (search-forward ses-print-data-boundary)
1728 (backward-char (length ses-print-data-boundary)) 1998 (backward-char (length ses-print-data-boundary))
1729 (delete-region (point-min) (point)) 1999 (delete-region (point-min) (point))
1730 ;;Insert all blank lines before printing anything, so ses-print-cell can 2000 ;; Insert all blank lines before printing anything, so ses-print-cell can
1731 ;;find the data area when inserting or deleting *skip* values for cells 2001 ;; find the data area when inserting or deleting *skip* values for cells.
1732 (dotimes (row ses--numrows) 2002 (dotimes (row ses--numrows)
1733 (insert-and-inherit ses--blank-line)) 2003 (insert-and-inherit ses--blank-line))
1734 (dotimes-with-progress-reporter (row ses--numrows) "Reprinting..." 2004 (dotimes-with-progress-reporter (row ses--numrows) "Reprinting..."
1735 (if (eq (ses-cell-value row 0) '*skip*) 2005 (if (eq (ses-cell-value row 0) '*skip*)
1736 ;;Column deletion left a dangling skip 2006 ;; Column deletion left a dangling skip.
1737 (ses-set-cell row 0 'value nil)) 2007 (ses-set-cell row 0 'value nil))
1738 (dotimes (col ses--numcols) 2008 (dotimes (col ses--numcols)
1739 (ses-print-cell row col)) 2009 (ses-print-cell row col))
1740 (beginning-of-line 2)) 2010 (beginning-of-line 2))
1741 (ses-jump-safe startcell))) 2011 (ses-jump-safe startcell)))
1742 2012
2013(defun ses-initialize-Dijkstra-attempt ()
2014 (setq ses--Dijkstra-attempt-nb (1+ ses--Dijkstra-attempt-nb)
2015 ses--Dijkstra-weight-bound (* ses--numrows ses--numcols)))
2016
1743(defun ses-recalculate-cell () 2017(defun ses-recalculate-cell ()
1744 "Recalculate and reprint the current cell or range. 2018 "Recalculate and reprint the current cell or range.
1745 2019
@@ -1750,25 +2024,37 @@ to are recalculated first."
1750 (interactive "*") 2024 (interactive "*")
1751 (ses-check-curcell 'range) 2025 (ses-check-curcell 'range)
1752 (ses-begin-change) 2026 (ses-begin-change)
1753 (let (sig) 2027 (ses-initialize-Dijkstra-attempt)
2028 (let (sig cur-rowcol)
1754 (setq ses-start-time (float-time)) 2029 (setq ses-start-time (float-time))
1755 (if (atom ses--curcell) 2030 (if (atom ses--curcell)
1756 (setq sig (ses-sym-rowcol ses--curcell) 2031 (when
1757 sig (ses-calculate-cell (car sig) (cdr sig) t)) 2032 (setq cur-rowcol (ses-sym-rowcol ses--curcell)
1758 ;;First, recalculate all cells that don't refer to other cells and 2033 sig (progn
1759 ;;produce a list of cells with references. 2034 (ses-cell-property-set :ses-Dijkstra-attempt
2035 (cons ses--Dijkstra-attempt-nb 0)
2036 (car cur-rowcol) (cdr cur-rowcol) )
2037 (ses-calculate-cell (car cur-rowcol) (cdr cur-rowcol) t)))
2038 (nconc sig (list (ses-cell-symbol (car cur-rowcol)
2039 (cdr cur-rowcol)))))
2040 ;; First, recalculate all cells that don't refer to other cells and
2041 ;; produce a list of cells with references.
1760 (ses-dorange ses--curcell 2042 (ses-dorange ses--curcell
1761 (ses-time-check "Recalculating... %s" '(ses-cell-symbol row col)) 2043 (ses-time-check "Recalculating... %s" '(ses-cell-symbol row col))
1762 (condition-case nil 2044 (condition-case nil
1763 (progn 2045 (progn
1764 ;;The t causes an error if the cell has references. 2046 ;; The t causes an error if the cell has references. If no
1765 ;;If no references, the t will be the result value. 2047 ;; references, the t will be the result value.
1766 (1value (ses-formula-references (ses-cell-formula row col) t)) 2048 (1value (ses-formula-references (ses-cell-formula row col) t))
1767 (setq sig (ses-calculate-cell row col t))) 2049 (ses-cell-property-set :ses-Dijkstra-attempt
2050 (cons ses--Dijkstra-attempt-nb 0)
2051 row col)
2052 (when (setq sig (ses-calculate-cell row col t))
2053 (nconc sig (list (ses-cell-symbol row col)))))
1768 (wrong-type-argument 2054 (wrong-type-argument
1769 ;;The formula contains a reference 2055 ;; The formula contains a reference.
1770 (add-to-list 'ses--deferred-recalc (ses-cell-symbol row col)))))) 2056 (add-to-list 'ses--deferred-recalc (ses-cell-symbol row col))))))
1771 ;;Do the update now, so we can force recalculation 2057 ;; Do the update now, so we can force recalculation.
1772 (let ((x ses--deferred-recalc)) 2058 (let ((x ses--deferred-recalc))
1773 (setq ses--deferred-recalc nil) 2059 (setq ses--deferred-recalc nil)
1774 (condition-case hold 2060 (condition-case hold
@@ -1801,11 +2087,11 @@ cells."
1801 (col (cdr rowcol))) 2087 (col (cdr rowcol)))
1802 (when (and (< col (1- ses--numcols)) ;;Last column can't spill over, anyway 2088 (when (and (< col (1- ses--numcols)) ;;Last column can't spill over, anyway
1803 (eq (ses-cell-value row (1+ col)) '*skip*)) 2089 (eq (ses-cell-value row (1+ col)) '*skip*))
1804 ;;This cell has spill-over. We'll momentarily pretend the following 2090 ;; This cell has spill-over. We'll momentarily pretend the following cell
1805 ;;cell has a `t' in it. 2091 ;; has a `t' in it.
1806 (eval `(let ((,(ses-cell-symbol row (1+ col)) t)) 2092 (eval `(let ((,(ses-cell-symbol row (1+ col)) t))
1807 (ses-print-cell row col))) 2093 (ses-print-cell row col)))
1808 ;;Now remove the *skip*. ses-print-cell is always nil here 2094 ;; Now remove the *skip*. ses-print-cell is always nil here.
1809 (ses-set-cell row (1+ col) 'value nil) 2095 (ses-set-cell row (1+ col) 'value nil)
1810 (1value (ses-print-cell row (1+ col)))))) 2096 (1value (ses-print-cell row (1+ col))))))
1811 2097
@@ -1817,12 +2103,12 @@ cells."
1817 (let (x yrow ycol) 2103 (let (x yrow ycol)
1818 ;;Delete old reference lists 2104 ;;Delete old reference lists
1819 (dotimes-with-progress-reporter 2105 (dotimes-with-progress-reporter
1820 (row ses--numrows) "Deleting references..." 2106 (row ses--numrows) "Deleting references..."
1821 (dotimes (col ses--numcols) 2107 (dotimes (col ses--numcols)
1822 (ses-set-cell row col 'references nil))) 2108 (ses-set-cell row col 'references nil)))
1823 ;;Create new reference lists 2109 ;;Create new reference lists
1824 (dotimes-with-progress-reporter 2110 (dotimes-with-progress-reporter
1825 (row ses--numrows) "Computing references..." 2111 (row ses--numrows) "Computing references..."
1826 (dotimes (col ses--numcols) 2112 (dotimes (col ses--numcols)
1827 (dolist (ref (ses-formula-references (ses-cell-formula row col))) 2113 (dolist (ref (ses-formula-references (ses-cell-formula row col)))
1828 (setq x (ses-sym-rowcol ref) 2114 (setq x (ses-sym-rowcol ref)
@@ -1831,26 +2117,27 @@ cells."
1831 (ses-set-cell yrow ycol 'references 2117 (ses-set-cell yrow ycol 'references
1832 (cons (ses-cell-symbol row col) 2118 (cons (ses-cell-symbol row col)
1833 (ses-cell-references yrow ycol))))))) 2119 (ses-cell-references yrow ycol)))))))
1834 ;;Delete everything and reconstruct basic data area 2120 ;; Delete everything and reconstruct basic data area.
1835 (ses-widen) 2121 (ses-widen)
1836 (let ((inhibit-read-only t)) 2122 (let ((inhibit-read-only t))
1837 (goto-char (point-max)) 2123 (goto-char (point-max))
1838 (if (search-backward ";; Local Variables:\n" nil t) 2124 (if (search-backward ";; Local Variables:\n" nil t)
1839 (delete-region (point-min) (point)) 2125 (delete-region (point-min) (point))
1840 ;;Buffer is quite screwed up - can't even save the user-specified locals 2126 ;; Buffer is quite screwed up --- can't even save the user-specified
2127 ;; locals.
1841 (delete-region (point-min) (point-max)) 2128 (delete-region (point-min) (point-max))
1842 (insert ses-initial-file-trailer) 2129 (insert ses-initial-file-trailer)
1843 (goto-char (point-min))) 2130 (goto-char (point-min)))
1844 ;;Create a blank display area 2131 ;; Create a blank display area.
1845 (dotimes (row ses--numrows) 2132 (dotimes (row ses--numrows)
1846 (insert ses--blank-line)) 2133 (insert ses--blank-line))
1847 (insert ses-print-data-boundary) 2134 (insert ses-print-data-boundary)
1848 (backward-char (1- (length ses-print-data-boundary))) 2135 (backward-char (1- (length ses-print-data-boundary)))
1849 (setq ses--data-marker (point-marker)) 2136 (setq ses--data-marker (point-marker))
1850 (forward-char (1- (length ses-print-data-boundary))) 2137 (forward-char (1- (length ses-print-data-boundary)))
1851 ;;Placeholders for cell data 2138 ;; Placeholders for cell data.
1852 (insert (make-string (* ses--numrows (1+ ses--numcols)) ?\n)) 2139 (insert (make-string (* ses--numrows (1+ ses--numcols)) ?\n))
1853 ;;Placeholders for col-widths, col-printers, default-printer, header-row 2140 ;; Placeholders for col-widths, col-printers, default-printer, header-row.
1854 (insert "\n\n\n\n") 2141 (insert "\n\n\n\n")
1855 (insert ses-initial-global-parameters) 2142 (insert ses-initial-global-parameters)
1856 (backward-char (1- (length ses-initial-global-parameters))) 2143 (backward-char (1- (length ses-initial-global-parameters)))
@@ -1890,13 +2177,13 @@ cell formula was unsafe and user declined confirmation."
1890 (setq initial (format "'%S" (cadr formula))) 2177 (setq initial (format "'%S" (cadr formula)))
1891 (setq initial (prin1-to-string formula))) 2178 (setq initial (prin1-to-string formula)))
1892 (if (stringp formula) 2179 (if (stringp formula)
1893 ;;Position cursor inside close-quote 2180 ;; Position cursor inside close-quote.
1894 (setq initial (cons initial (length initial)))) 2181 (setq initial (cons initial (length initial))))
1895 (list row col 2182 (list row col
1896 (read-from-minibuffer (format "Cell %s: " ses--curcell) 2183 (read-from-minibuffer (format "Cell %s: " ses--curcell)
1897 initial 2184 initial
1898 ses-mode-edit-map 2185 ses-mode-edit-map
1899 t ;Convert to Lisp object 2186 t ; Convert to Lisp object.
1900 'ses-read-cell-history))))) 2187 'ses-read-cell-history)))))
1901 (when (ses-warn-unsafe newval 'unsafep) 2188 (when (ses-warn-unsafe newval 'unsafep)
1902 (ses-begin-change) 2189 (ses-begin-change)
@@ -1917,13 +2204,13 @@ cell formula was unsafe and user declined confirmation."
1917 (cons (if (equal initial "\"") "\"\"" 2204 (cons (if (equal initial "\"") "\"\""
1918 (if (equal initial "(") "()" initial)) 2) 2205 (if (equal initial "(") "()" initial)) 2)
1919 ses-mode-edit-map 2206 ses-mode-edit-map
1920 t ;Convert to Lisp object 2207 t ; Convert to Lisp object.
1921 'ses-read-cell-history 2208 'ses-read-cell-history
1922 (prin1-to-string (if (eq (car-safe curval) 'ses-safe-formula) 2209 (prin1-to-string (if (eq (car-safe curval) 'ses-safe-formula)
1923 (cadr curval) 2210 (cadr curval)
1924 curval)))))) 2211 curval))))))
1925 (when (ses-edit-cell row col newval) 2212 (when (ses-edit-cell row col newval)
1926 (ses-command-hook) ;Update cell widths before movement 2213 (ses-command-hook) ; Update cell widths before movement.
1927 (dolist (x ses-after-entry-functions) 2214 (dolist (x ses-after-entry-functions)
1928 (funcall x 1)))) 2215 (funcall x 1))))
1929 2216
@@ -1939,10 +2226,10 @@ have been used as formulas in this spreadsheet is available for completions."
1939 (list (car rowcol) 2226 (list (car rowcol)
1940 (cdr rowcol) 2227 (cdr rowcol)
1941 (if (string= newval "") 2228 (if (string= newval "")
1942 nil ;Don't create zero-length symbols! 2229 nil ; Don't create zero-length symbols!
1943 (list 'quote (intern newval)))))) 2230 (list 'quote (intern newval))))))
1944 (when (ses-edit-cell row col symb) 2231 (when (ses-edit-cell row col symb)
1945 (ses-command-hook) ;Update cell widths before movement 2232 (ses-command-hook) ; Update cell widths before movement.
1946 (dolist (x ses-after-entry-functions) 2233 (dolist (x ses-after-entry-functions)
1947 (funcall x 1)))) 2234 (funcall x 1))))
1948 2235
@@ -1970,7 +2257,7 @@ cells."
1970 (ses-check-curcell 'end) 2257 (ses-check-curcell 'end)
1971 (ses-begin-change) 2258 (ses-begin-change)
1972 (dotimes (x count) 2259 (dotimes (x count)
1973 (backward-char 1) ;Will signal 'beginning-of-buffer if appropriate 2260 (backward-char 1) ; Will signal 'beginning-of-buffer if appropriate.
1974 (ses-set-curcell) 2261 (ses-set-curcell)
1975 (let ((rowcol (ses-sym-rowcol ses--curcell))) 2262 (let ((rowcol (ses-sym-rowcol ses--curcell)))
1976 (ses-clear-cell (car rowcol) (cdr rowcol)))))) 2263 (ses-clear-cell (car rowcol) (cdr rowcol))))))
@@ -1990,13 +2277,13 @@ PROMPT should end with \": \". Result is t if operation was cancelled."
1990 (substring prompt 0 -2) 2277 (substring prompt 0 -2)
1991 default))) 2278 default)))
1992 (let ((new (read-from-minibuffer prompt 2279 (let ((new (read-from-minibuffer prompt
1993 nil ;Initial contents 2280 nil ; Initial contents.
1994 ses-mode-edit-map 2281 ses-mode-edit-map
1995 t ;Evaluate the result 2282 t ; Evaluate the result.
1996 'ses-read-printer-history 2283 'ses-read-printer-history
1997 (prin1-to-string default)))) 2284 (prin1-to-string default))))
1998 (if (equal new default) 2285 (if (equal new default)
1999 ;;User changed mind, decided not to change printer 2286 ;; User changed mind, decided not to change printer.
2000 (setq new t) 2287 (setq new t)
2001 (ses-printer-validate new) 2288 (ses-printer-validate new)
2002 (or (not new) 2289 (or (not new)
@@ -2197,7 +2484,7 @@ If COL is specified, the new column(s) get the specified WIDTH and PRINTER
2197 ;;ses-relocate-all) 2484 ;;ses-relocate-all)
2198 (ses-goto-data row col) 2485 (ses-goto-data row col)
2199 (insert ?\n)) 2486 (insert ?\n))
2200 ;;Insert column width and printer 2487 ;; Insert column width and printer.
2201 (setq widths (ses-vector-insert widths col width) 2488 (setq widths (ses-vector-insert widths col width)
2202 printers (ses-vector-insert printers col printer))) 2489 printers (ses-vector-insert printers col printer)))
2203 (ses-set-parameter 'ses--col-widths widths) 2490 (ses-set-parameter 'ses--col-widths widths)
@@ -2208,11 +2495,11 @@ If COL is specified, the new column(s) get the specified WIDTH and PRINTER
2208 (ses-reprint-all t) 2495 (ses-reprint-all t)
2209 (when (or (> (length (ses-call-printer printer)) 0) 2496 (when (or (> (length (ses-call-printer printer)) 0)
2210 (> (length (ses-call-printer ses--default-printer)) 0)) 2497 (> (length (ses-call-printer ses--default-printer)) 0))
2211 ;;Either column printer or global printer inserts some constant text 2498 ;; Either column printer or global printer inserts some constant text.
2212 ;;Reprint the new columns to insert that text. 2499 ;; Reprint the new columns to insert that text.
2213 (dotimes (x ses--numrows) 2500 (dotimes (x ses--numrows)
2214 (dotimes (y count) 2501 (dotimes (y count)
2215 ;Always nil here - this is a blank column 2502 ;; Always nil here --- this is a blank column.
2216 (1value (ses-print-cell-new-width x (+ y col)))))) 2503 (1value (ses-print-cell-new-width x (+ y col))))))
2217 (ses-setup))) 2504 (ses-setup)))
2218 (ses-jump-safe ses--curcell)) 2505 (ses-jump-safe ses--curcell))
@@ -2272,19 +2559,19 @@ from the current one."
2272inserts a new row if at bottom of print area. Repeat COUNT times." 2559inserts a new row if at bottom of print area. Repeat COUNT times."
2273 (interactive "p") 2560 (interactive "p")
2274 (ses-check-curcell 'end) 2561 (ses-check-curcell 'end)
2275 (setq deactivate-mark t) ;Doesn't combine well with ranges 2562 (setq deactivate-mark t) ; Doesn't combine well with ranges.
2276 (dotimes (x count) 2563 (dotimes (x count)
2277 (ses-set-curcell) 2564 (ses-set-curcell)
2278 (if (not ses--curcell) 2565 (if (not ses--curcell)
2279 (progn ;At bottom of print area 2566 (progn ; At bottom of print area.
2280 (barf-if-buffer-read-only) 2567 (barf-if-buffer-read-only)
2281 (ses-insert-row 1)) 2568 (ses-insert-row 1))
2282 (let ((col (cdr (ses-sym-rowcol ses--curcell)))) 2569 (let ((col (cdr (ses-sym-rowcol ses--curcell))))
2283 (when (/= 32 2570 (when (/= 32
2284 (char-before (next-single-property-change (point) 2571 (char-before (next-single-property-change (point)
2285 'intangible))) 2572 'intangible)))
2286 ;;We're already in last nonskipped cell on line. Need to create a 2573 ;; We're already in last nonskipped cell on line. Need to create a
2287 ;;new column. 2574 ;; new column.
2288 (barf-if-buffer-read-only) 2575 (barf-if-buffer-read-only)
2289 (ses-insert-column (- count x) 2576 (ses-insert-column (- count x)
2290 ses--numcols 2577 ses--numcols
@@ -2312,12 +2599,12 @@ inserts a new row if at bottom of print area. Repeat COUNT times."
2312 (read-from-minibuffer (format "Column %s width [currently %d]: " 2599 (read-from-minibuffer (format "Column %s width [currently %d]: "
2313 (ses-column-letter col) 2600 (ses-column-letter col)
2314 (ses-col-width col)) 2601 (ses-col-width col))
2315 nil ;No initial contents 2602 nil ; No initial contents.
2316 nil ;No override keymap 2603 nil ; No override keymap.
2317 t ;Convert to Lisp object 2604 t ; Convert to Lisp object.
2318 nil ;No history 2605 nil ; No history.
2319 (number-to-string 2606 (number-to-string
2320 (ses-col-width col))))))) ;Default value 2607 (ses-col-width col))))))) ; Default value.
2321 (if (< newwidth 1) 2608 (if (< newwidth 1)
2322 (error "Invalid column width")) 2609 (error "Invalid column width"))
2323 (ses-begin-change) 2610 (ses-begin-change)
@@ -2349,7 +2636,7 @@ hard to override how mouse-1 works."
2349 (if (not (and (eq major-mode 'ses-mode) 2636 (if (not (and (eq major-mode 'ses-mode)
2350 (eq (get-text-property beg 'read-only) 'ses) 2637 (eq (get-text-property beg 'read-only) 'ses)
2351 (eq (get-text-property (1- end) 'read-only) 'ses))) 2638 (eq (get-text-property (1- end) 'read-only) 'ses)))
2352 ad-do-it ;Normal copy-region-as-kill 2639 ad-do-it ; Normal copy-region-as-kill.
2353 (kill-new (ses-copy-region beg end)) 2640 (kill-new (ses-copy-region beg end))
2354 (if transient-mark-mode 2641 (if transient-mark-mode
2355 (setq deactivate-mark t)) 2642 (setq deactivate-mark t))
@@ -2400,17 +2687,17 @@ the corresponding data cell."
2400cells instead of deleting them." 2687cells instead of deleting them."
2401 (interactive "r") 2688 (interactive "r")
2402 (ses-check-curcell 'needrange) 2689 (ses-check-curcell 'needrange)
2403 ;;For some reason, the text-read-only error is not caught by 2690 ;; For some reason, the text-read-only error is not caught by `delete-region',
2404 ;;`delete-region', so we have to use subterfuge. 2691 ;; so we have to use subterfuge.
2405 (let ((buffer-read-only t)) 2692 (let ((buffer-read-only t))
2406 (1value (condition-case x 2693 (1value (condition-case x
2407 (noreturn (funcall (lookup-key (current-global-map) 2694 (noreturn (funcall (lookup-key (current-global-map)
2408 (this-command-keys)) 2695 (this-command-keys))
2409 beg end)) 2696 beg end))
2410 (buffer-read-only nil)))) ;The expected error 2697 (buffer-read-only nil)))) ; The expected error.
2411 ;;Because the buffer was marked read-only, the kill command turned itself 2698 ;; Because the buffer was marked read-only, the kill command turned itself
2412 ;;into a copy. Now we clear the cells or signal the error. First we 2699 ;; into a copy. Now we clear the cells or signal the error. First we check
2413 ;;check whether the buffer really is read-only. 2700 ;; whether the buffer really is read-only.
2414 (barf-if-buffer-read-only) 2701 (barf-if-buffer-read-only)
2415 (ses-begin-change) 2702 (ses-begin-change)
2416 (ses-dorange ses--curcell 2703 (ses-dorange ses--curcell
@@ -2437,7 +2724,7 @@ explicitly insert a symbol, or use the C-u prefix to treat all unmarked words
2437as symbols." 2724as symbols."
2438 (if (not (and (eq major-mode 'ses-mode) 2725 (if (not (and (eq major-mode 'ses-mode)
2439 (eq (get-text-property (point) 'keymap) 'ses-mode-print-map))) 2726 (eq (get-text-property (point) 'keymap) 'ses-mode-print-map)))
2440 ad-do-it ;Normal non-SES yank 2727 ad-do-it ; Normal non-SES yank.
2441 (ses-check-curcell 'end) 2728 (ses-check-curcell 'end)
2442 (push-mark (point)) 2729 (push-mark (point))
2443 (let ((text (current-kill (cond 2730 (let ((text (current-kill (cond
@@ -2450,7 +2737,7 @@ as symbols."
2450 text 2737 text
2451 0 2738 0
2452 (if (memq (aref text (1- (length text))) '(?\t ?\n)) 2739 (if (memq (aref text (1- (length text))) '(?\t ?\n))
2453 ;;Just one cell - delete final tab or newline 2740 ;; Just one cell --- delete final tab or newline.
2454 (1- (length text))) 2741 (1- (length text)))
2455 arg))) 2742 arg)))
2456 (if (consp arg) 2743 (if (consp arg)
@@ -2499,21 +2786,21 @@ formulas are to be inserted without relocation."
2499 pos (next-single-property-change pos 'ses text) 2786 pos (next-single-property-change pos 'ses text)
2500 x (ses-sym-rowcol (car last))) 2787 x (ses-sym-rowcol (car last)))
2501 (if (not last) 2788 (if (not last)
2502 ;;Newline - all remaining cells on row are skipped 2789 ;; Newline --- all remaining cells on row are skipped.
2503 (setq x (cons (- myrow rowincr) (+ needcols colincr -1)) 2790 (setq x (cons (- myrow rowincr) (+ needcols colincr -1))
2504 last (list nil nil nil) 2791 last (list nil nil nil)
2505 pos (1- pos))) 2792 pos (1- pos)))
2506 (if (/= (car x) (- myrow rowincr)) 2793 (if (/= (car x) (- myrow rowincr))
2507 (error "Cell row error")) 2794 (error "Cell row error"))
2508 (if (< (- mycol colincr) (cdr x)) 2795 (if (< (- mycol colincr) (cdr x))
2509 ;;Some columns were skipped 2796 ;; Some columns were skipped.
2510 (let ((oldcol mycol)) 2797 (let ((oldcol mycol))
2511 (while (< (- mycol colincr) (cdr x)) 2798 (while (< (- mycol colincr) (cdr x))
2512 (ses-clear-cell myrow mycol) 2799 (ses-clear-cell myrow mycol)
2513 (setq col (1+ col) 2800 (setq col (1+ col)
2514 mycol (1+ mycol))) 2801 mycol (1+ mycol)))
2515 (ses-print-cell myrow (1- oldcol)))) ;;This inserts *skip* 2802 (ses-print-cell myrow (1- oldcol)))) ;; This inserts *skip*.
2516 (when (car last) ;Skip this for *skip* cells 2803 (when (car last) ; Skip this for *skip* cells.
2517 (setq x (nth 2 last)) 2804 (setq x (nth 2 last))
2518 (unless (equal x (ses-cell-printer myrow mycol)) 2805 (unless (equal x (ses-cell-printer myrow mycol))
2519 (or (not x) 2806 (or (not x)
@@ -2542,12 +2829,12 @@ cons of ROW and COL). Treat plain symbols as strings unless ARG is a list."
2542 (error (cons nil from))))) 2829 (error (cons nil from)))))
2543 (cond 2830 (cond
2544 ((< (cdr val) (or to (length text))) 2831 ((< (cdr val) (or to (length text)))
2545 ;;Invalid sexp - leave it as a string 2832 ;; Invalid sexp --- leave it as a string.
2546 (setq val (substring text from to))) 2833 (setq val (substring text from to)))
2547 ((and (car val) (symbolp (car val))) 2834 ((and (car val) (symbolp (car val)))
2548 (if (consp arg) 2835 (if (consp arg)
2549 (setq val (list 'quote (car val))) ;Keep symbol 2836 (setq val (list 'quote (car val))) ; Keep symbol.
2550 (setq val (substring text from to)))) ;Treat symbol as text 2837 (setq val (substring text from to)))) ; Treat symbol as text.
2551 (t 2838 (t
2552 (setq val (car val)))) 2839 (setq val (car val))))
2553 (let ((row (car rowcol)) 2840 (let ((row (car rowcol))
@@ -2729,27 +3016,28 @@ The top row is row 1. Selecting row 0 displays the default header row."
2729 "Move point to last cell on line." 3016 "Move point to last cell on line."
2730 (interactive) 3017 (interactive)
2731 (ses-check-curcell 'end 'range) 3018 (ses-check-curcell 'end 'range)
2732 (when ses--curcell ;Otherwise we're at the bottom row, which is empty anyway 3019 (when ses--curcell ; Otherwise we're at the bottom row, which is empty
3020 ; anyway.
2733 (let ((col (1- ses--numcols)) 3021 (let ((col (1- ses--numcols))
2734 row rowcol) 3022 row rowcol)
2735 (if (symbolp ses--curcell) 3023 (if (symbolp ses--curcell)
2736 ;;Single cell 3024 ;; Single cell.
2737 (setq row (car (ses-sym-rowcol ses--curcell))) 3025 (setq row (car (ses-sym-rowcol ses--curcell)))
2738 ;;Range - use whichever end of the range the point is at 3026 ;; Range --- use whichever end of the range the point is at.
2739 (setq rowcol (ses-sym-rowcol (if (< (point) (mark)) 3027 (setq rowcol (ses-sym-rowcol (if (< (point) (mark))
2740 (car ses--curcell) 3028 (car ses--curcell)
2741 (cdr ses--curcell)))) 3029 (cdr ses--curcell))))
2742 ;;If range already includes the last cell in a row, point is actually 3030 ;; If range already includes the last cell in a row, point is actually
2743 ;;in the following row 3031 ;; in the following row.
2744 (if (<= (cdr rowcol) (1- col)) 3032 (if (<= (cdr rowcol) (1- col))
2745 (setq row (car rowcol)) 3033 (setq row (car rowcol))
2746 (setq row (1+ (car rowcol))) 3034 (setq row (1+ (car rowcol)))
2747 (if (= row ses--numrows) 3035 (if (= row ses--numrows)
2748 ;;Already at end - can't go anywhere 3036 ;;Already at end - can't go anywhere
2749 (setq col 0)))) 3037 (setq col 0))))
2750 (when (< row ses--numrows) ;Otherwise it's a range that includes last cell 3038 (when (< row ses--numrows) ; Otherwise it's a range that includes last cell.
2751 (while (eq (ses-cell-value row col) '*skip*) 3039 (while (eq (ses-cell-value row col) '*skip*)
2752 ;;Back to beginning of multi-column cell 3040 ;; Back to beginning of multi-column cell.
2753 (setq col (1- col))) 3041 (setq col (1- col)))
2754 (ses-goto-print row col))))) 3042 (ses-goto-print row col)))))
2755 3043
@@ -2801,7 +3089,7 @@ REVERSE order."
2801 (interactive "*e\nP") 3089 (interactive "*e\nP")
2802 (setq event (event-end event)) 3090 (setq event (event-end event))
2803 (select-window (posn-window event)) 3091 (select-window (posn-window event))
2804 (setq event (car (posn-col-row event))) ;Click column 3092 (setq event (car (posn-col-row event))) ; Click column.
2805 (let ((col 0)) 3093 (let ((col 0))
2806 (while (and (< col ses--numcols) (> event (ses-col-width col))) 3094 (while (and (< col ses--numcols) (> event (ses-col-width col)))
2807 (setq event (- event (ses-col-width col) 1) 3095 (setq event (- event (ses-col-width col) 1)
@@ -2816,7 +3104,7 @@ spreadsheet."
2816 (interactive "*") 3104 (interactive "*")
2817 (let (x) 3105 (let (x)
2818 (with-current-buffer (window-buffer minibuffer-scroll-window) 3106 (with-current-buffer (window-buffer minibuffer-scroll-window)
2819 (ses-command-hook) ;For ses-coverage 3107 (ses-command-hook) ; For ses-coverage.
2820 (ses-check-curcell 'needrange) 3108 (ses-check-curcell 'needrange)
2821 (setq x (cdr (macroexpand `(ses-range ,(car ses--curcell) 3109 (setq x (cdr (macroexpand `(ses-range ,(car ses--curcell)
2822 ,(cdr ses--curcell)))))) 3110 ,(cdr ses--curcell))))))
@@ -2828,7 +3116,7 @@ highlighted range in the spreadsheet."
2828 (interactive "*") 3116 (interactive "*")
2829 (let (x) 3117 (let (x)
2830 (with-current-buffer (window-buffer minibuffer-scroll-window) 3118 (with-current-buffer (window-buffer minibuffer-scroll-window)
2831 (ses-command-hook) ;For ses-coverage 3119 (ses-command-hook) ; For ses-coverage.
2832 (ses-check-curcell 'needrange) 3120 (ses-check-curcell 'needrange)
2833 (setq x (format "(ses-range %S %S)" 3121 (setq x (format "(ses-range %S %S)"
2834 (car ses--curcell) 3122 (car ses--curcell)
@@ -2885,15 +3173,128 @@ is safe or user allows execution anyway. Always returns t if
2885;; Standard formulas 3173;; Standard formulas
2886;;---------------------------------------------------------------------------- 3174;;----------------------------------------------------------------------------
2887 3175
2888(defmacro ses-range (from to) 3176(defun ses--clean-! (&rest x)
2889 "Expands to a list of cell-symbols for the range. The range automatically 3177 "Clean by delq list X from any occurrence of `nil' or `*skip*'."
2890expands to include any new row or column inserted into its middle. The SES 3178 (delq nil (delq '*skip* x)))
2891library code specifically looks for the symbol `ses-range', so don't create an 3179
2892alias for this macro!" 3180(defun ses--clean-_ (x y)
2893 (let (result) 3181 "Clean list X by replacing by Y any occurrence of `nil' or `*skip*'.
3182
3183This will change X by making setcar on its cons cells."
3184 (let ((ret x) ret-elt)
3185 (while ret
3186 (setq ret-elt (car ret))
3187 (when (memq ret-elt '(nil *skip*))
3188 (setcar ret y))
3189 (setq ret (cdr ret))))
3190 x)
3191
3192(defmacro ses-range (from to &rest rest)
3193 "Expands to a list of cell-symbols for the range going from
3194FROM up to TO. The range automatically expands to include any
3195new row or column inserted into its middle. The SES library code
3196specifically looks for the symbol `ses-range', so don't create an
3197alias for this macro!
3198
3199By passing in REST some flags one can configure the way the range
3200is read and how it is formatted.
3201
3202In the sequel we assume that cells A1, B1, A2 B2 have respective values
32031 2 3 and 4 for examplication.
3204
3205Readout direction is specified by a `>v', '`>^', `<v', `<^',
3206`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
3207of such a flag, a default direction of `^<' is assumed. This
3208way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)',
3209while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2).
3210
3211If the range is one row, then `>' can be used as a shorthand to
3212`>v' or `>^', and `<' to `<v' or `<^'.
3213
3214If the range is one column, then `v' can be used as a shorthand to
3215`v>' or `v<', and `^' to `^>' or `v<'.
3216
3217A `!' flag will remove all cells whose value is nil or `*skip*'.
3218
3219A `_' flag will replace nil or `*skip*' by the value following
3220the `_' flag. If the `_' flag is the last argument, then they are
3221replaced by integer 0.
3222
3223A `*', `*1' or `*2' flag will vectorize the range in the sense of
3224Calc. See info node `(Calc) Top'. Flag `*' will output either a
3225vector or a matrix depending on the number of rows, `*1' will
3226flatten the result to a one row vector, and `*2' will make a
3227matrix whatever the number of rows.
3228
3229Warning: interaction with Calc is expermimental and may produce
3230confusing results if you are not aware of Calc data format. Use
3231`math-format-value' as a printer for Calc objects."
3232 (let (result-row
3233 result
3234 (prev-row -1)
3235 (reorient-x nil)
3236 (reorient-y nil)
3237 transpose vectorize
3238 (clean 'list))
2894 (ses-dorange (cons from to) 3239 (ses-dorange (cons from to)
2895 (push (ses-cell-symbol row col) result)) 3240 (when (/= prev-row row)
2896 (cons 'list result))) 3241 (push result-row result)
3242 (setq result-row nil))
3243 (push (ses-cell-symbol row col) result-row)
3244 (setq prev-row row))
3245 (push result-row result)
3246 (while rest
3247 (let ((x (pop rest)))
3248 (case x
3249 ((>v) (setq transpose nil reorient-x nil reorient-y nil))
3250 ((>^)(setq transpose nil reorient-x nil reorient-y t))
3251 ((<^)(setq transpose nil reorient-x t reorient-y t))
3252 ((<v)(setq transpose nil reorient-x t reorient-y nil))
3253 ((v>)(setq transpose t reorient-x nil reorient-y t))
3254 ((^>)(setq transpose t reorient-x nil reorient-y nil))
3255 ((^<)(setq transpose t reorient-x t reorient-y nil))
3256 ((v<)(setq transpose t reorient-x t reorient-y t))
3257 ((* *2 *1) (setq vectorize x))
3258 ((!) (setq clean 'ses--clean-!))
3259 ((_) (setq clean `(lambda (&rest x) (ses--clean-_ x ,(if rest (pop rest) 0)))))
3260 (t
3261 (cond
3262 ; shorthands one row
3263 ((and (null (cddr result)) (memq x '(> <)))
3264 (push (intern (concat (symbol-name x) "v")) rest))
3265 ; shorthands one col
3266 ((and (null (cdar result)) (memq x '(v ^)))
3267 (push (intern (concat (symbol-name x) ">")) rest))
3268 (t (error "Unexpected flag `%S' in ses-range" x)))))))
3269 (if reorient-y
3270 (setcdr (last result 2) nil)
3271 (setq result (cdr (nreverse result))))
3272 (unless reorient-x
3273 (setq result (mapcar 'nreverse result)))
3274 (when transpose
3275 (let ((ret (mapcar (lambda (x) (list x)) (pop result))) iter)
3276 (while result
3277 (setq iter ret)
3278 (dolist (elt (pop result))
3279 (setcar iter (cons elt (car iter)))
3280 (setq iter (cdr iter))))
3281 (setq result ret)))
3282
3283 (flet ((vectorize-*1
3284 (clean result)
3285 (cons clean (cons (quote 'vec) (apply 'append result))))
3286 (vectorize-*2
3287 (clean result)
3288 (cons clean (cons (quote 'vec) (mapcar (lambda (x)
3289 (cons clean (cons (quote 'vec) x)))
3290 result)))))
3291 (case vectorize
3292 ((nil) (cons clean (apply 'append result)))
3293 ((*1) (vectorize-*1 clean result))
3294 ((*2) (vectorize-*2 clean result))
3295 ((*) (if (cdr result)
3296 (vectorize-*2 clean result)
3297 (vectorize-*1 clean result)))))))
2897 3298
2898(defun ses-delete-blanks (&rest args) 3299(defun ses-delete-blanks (&rest args)
2899 "Return ARGS reversed, with the blank elements (nil and *skip*) removed." 3300 "Return ARGS reversed, with the blank elements (nil and *skip*) removed."
@@ -2940,9 +3341,9 @@ TEST is evaluated."
2940;; Standard print functions 3341;; Standard print functions
2941;;---------------------------------------------------------------------------- 3342;;----------------------------------------------------------------------------
2942 3343
2943;;These functions use the variables 'row' and 'col' that are 3344;; These functions use the variables 'row' and 'col' that are dynamically bound
2944;;dynamically bound by ses-print-cell. We define these variables at 3345;; by ses-print-cell. We define these variables at compile-time to make the
2945;;compile-time to make the compiler happy. 3346;; compiler happy.
2946(eval-when-compile 3347(eval-when-compile
2947 (dolist (x '(row col)) 3348 (dolist (x '(row col))
2948 (make-local-variable x) 3349 (make-local-variable x)
@@ -2960,10 +3361,10 @@ columns to include in width (default = 0)."
2960 (setq value (ses-call-printer printer value)) 3361 (setq value (ses-call-printer printer value))
2961 (dotimes (x span) 3362 (dotimes (x span)
2962 (setq width (+ width 1 (ses-col-width (+ col span (- x)))))) 3363 (setq width (+ width 1 (ses-col-width (+ col span (- x))))))
2963 ;; set column width 3364 ;; Set column width.
2964 (setq width (- width (string-width value))) 3365 (setq width (- width (string-width value)))
2965 (if (<= width 0) 3366 (if (<= width 0)
2966 value ;Too large for field, anyway 3367 value ; Too large for field, anyway.
2967 (setq half (make-string (/ width 2) fill)) 3368 (setq half (make-string (/ width 2) fill))
2968 (concat half value half 3369 (concat half value half
2969 (if (> (% width 2) 0) (char-to-string fill)))))) 3370 (if (> (% width 2) 0) (char-to-string fill))))))
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 39855a1c8cc..62171328979 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -474,7 +474,8 @@ MODE should be an integer which is a file mode value."
474 (if (and dir (not (file-exists-p dir))) 474 (if (and dir (not (file-exists-p dir)))
475 (make-directory dir t)) 475 (make-directory dir t))
476 (unless (file-directory-p name) 476 (unless (file-directory-p name)
477 (write-region start end name)) 477 (let ((coding-system-for-write 'no-conversion))
478 (write-region start end name)))
478 (set-file-modes name (tar-header-mode descriptor)))))))) 479 (set-file-modes name (tar-header-mode descriptor))))))))
479 480
480(defun tar-summarize-buffer () 481(defun tar-summarize-buffer ()
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index ef51fb25035..d98aa183f21 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -213,7 +213,7 @@
213(defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)")) 213(defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)"))
214(defconst css-ident-re (concat css-nmstart-re css-nmchar-re "*")) 214(defconst css-ident-re (concat css-nmstart-re css-nmchar-re "*"))
215(defconst css-proprietary-nmstart-re ;; Vendor-specific properties. 215(defconst css-proprietary-nmstart-re ;; Vendor-specific properties.
216 "[-_]\\(?:ms\\|moz\\|o\\|webkit\\|khtml\\)-") 216 (concat "[-_]" (regexp-opt '("ms" "moz" "o" "khtml" "webkit")) "-"))
217(defconst css-name-re (concat css-nmchar-re "+")) 217(defconst css-name-re (concat css-nmchar-re "+"))
218 218
219(defface css-selector '((t :inherit font-lock-function-name-face)) 219(defface css-selector '((t :inherit font-lock-function-name-face))
@@ -240,7 +240,7 @@
240 ;; thus prevent this highlighting from being applied (actually now that 240 ;; thus prevent this highlighting from being applied (actually now that
241 ;; I use `append' this should work better). But really the part of hte 241 ;; I use `append' this should work better). But really the part of hte
242 ;; selector between [...] should simply not be highlighted. 242 ;; selector between [...] should simply not be highlighted.
243 (,(concat "^\\([ \t]*[^@:{\n][^:{\n]+\\(?::" (regexp-opt css-pseudo-ids t) 243 (,(concat "^\\([ \t]*[^@:{}\n][^:{}]+\\(?::" (regexp-opt css-pseudo-ids t)
244 "\\(?:([^)]+)\\)?[^:{\n]*\\)*\\)\\(?:\n[ \t]*\\)*{") 244 "\\(?:([^)]+)\\)?[^:{\n]*\\)*\\)\\(?:\n[ \t]*\\)*{")
245 (1 'css-selector append)) 245 (1 'css-selector append))
246 ;; In the above rule, we allow the open-brace to be on some subsequent 246 ;; In the above rule, we allow the open-brace to be on some subsequent
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 3809b5b4293..5ec4c3998d8 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -775,6 +775,12 @@ See `run-hooks'."
775 :type 'hook 775 :type 'hook
776 :group 'vc) 776 :group 'vc)
777 777
778(defcustom vc-revert-show-diff t
779 "If non-nil, `vc-revert' shows a `vc-diff' buffer before querying."
780 :type 'boolean
781 :group 'vc
782 :version "24.1")
783
778;; Header-insertion hair 784;; Header-insertion hair
779 785
780(defcustom vc-static-header-alist 786(defcustom vc-static-header-alist
@@ -1534,10 +1540,13 @@ to override the value of `vc-diff-switches' and `diff-switches'."
1534(defvar vc-diff-added-files nil 1540(defvar vc-diff-added-files nil
1535 "If non-nil, diff added files by comparing them to /dev/null.") 1541 "If non-nil, diff added files by comparing them to /dev/null.")
1536 1542
1537(defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose) 1543(defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose buffer)
1538 "Report diffs between two revisions of a fileset. 1544 "Report diffs between two revisions of a fileset.
1539Diff output goes to the *vc-diff* buffer. The function 1545Output goes to the buffer BUFFER, which defaults to *vc-diff*.
1540returns t if the buffer had changes, nil otherwise." 1546BUFFER, if non-nil, should be a buffer or a buffer name.
1547Return t if the buffer had changes, nil otherwise."
1548 (unless buffer
1549 (setq buffer "*vc-diff*"))
1541 (let* ((files (cadr vc-fileset)) 1550 (let* ((files (cadr vc-fileset))
1542 (messages (cons (format "Finding changes in %s..." 1551 (messages (cons (format "Finding changes in %s..."
1543 (vc-delistify files)) 1552 (vc-delistify files))
@@ -1549,7 +1558,7 @@ returns t if the buffer had changes, nil otherwise."
1549 ;; be to call the back end separately for each file. 1558 ;; be to call the back end separately for each file.
1550 (coding-system-for-read 1559 (coding-system-for-read
1551 (if files (vc-coding-system-for-diff (car files)) 'undecided))) 1560 (if files (vc-coding-system-for-diff (car files)) 'undecided)))
1552 (vc-setup-buffer "*vc-diff*") 1561 (vc-setup-buffer buffer)
1553 (message "%s" (car messages)) 1562 (message "%s" (car messages))
1554 ;; Many backends don't handle well the case of a file that has been 1563 ;; Many backends don't handle well the case of a file that has been
1555 ;; added but not yet committed to the repo (notably CVS and Subversion). 1564 ;; added but not yet committed to the repo (notably CVS and Subversion).
@@ -1574,13 +1583,13 @@ returns t if the buffer had changes, nil otherwise."
1574 (error "No revisions of %s exist" file) 1583 (error "No revisions of %s exist" file)
1575 ;; We regard this as "changed". 1584 ;; We regard this as "changed".
1576 ;; Diff it against /dev/null. 1585 ;; Diff it against /dev/null.
1577 (apply 'vc-do-command "*vc-diff*" 1586 (apply 'vc-do-command buffer
1578 1 "diff" file 1587 1 "diff" file
1579 (append (vc-switches nil 'diff) '("/dev/null")))))) 1588 (append (vc-switches nil 'diff) '("/dev/null"))))))
1580 (setq files (nreverse filtered)))) 1589 (setq files (nreverse filtered))))
1581 (let ((vc-disable-async-diff (not async))) 1590 (let ((vc-disable-async-diff (not async)))
1582 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 "*vc-diff*")) 1591 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer))
1583 (set-buffer "*vc-diff*") 1592 (set-buffer buffer)
1584 (if (and (zerop (buffer-size)) 1593 (if (and (zerop (buffer-size))
1585 (not (get-buffer-process (current-buffer)))) 1594 (not (get-buffer-process (current-buffer))))
1586 ;; Treat this case specially so as not to pop the buffer. 1595 ;; Treat this case specially so as not to pop the buffer.
@@ -2256,11 +2265,12 @@ This asks for confirmation if the buffer contents are not identical
2256to the working revision (except for keyword expansion)." 2265to the working revision (except for keyword expansion)."
2257 (interactive) 2266 (interactive)
2258 (let* ((vc-fileset (vc-deduce-fileset)) 2267 (let* ((vc-fileset (vc-deduce-fileset))
2259 (files (cadr vc-fileset))) 2268 (files (cadr vc-fileset))
2260 ;; If any of the files is visited by the current buffer, make 2269 (queried nil)
2261 ;; sure buffer is saved. If the user says `no', abort since 2270 diff-buffer)
2262 ;; we cannot show the changes and ask for confirmation to 2271 ;; If any of the files is visited by the current buffer, make sure
2263 ;; discard them. 2272 ;; buffer is saved. If the user says `no', abort since we cannot
2273 ;; show the changes and ask for confirmation to discard them.
2264 (when (or (not files) (memq (buffer-file-name) files)) 2274 (when (or (not files) (memq (buffer-file-name) files))
2265 (vc-buffer-sync nil)) 2275 (vc-buffer-sync nil))
2266 (dolist (file files) 2276 (dolist (file files)
@@ -2268,20 +2278,29 @@ to the working revision (except for keyword expansion)."
2268 (when (and buf (buffer-modified-p buf)) 2278 (when (and buf (buffer-modified-p buf))
2269 (error "Please kill or save all modified buffers before reverting"))) 2279 (error "Please kill or save all modified buffers before reverting")))
2270 (when (vc-up-to-date-p file) 2280 (when (vc-up-to-date-p file)
2271 (unless (yes-or-no-p (format "%s seems up-to-date. Revert anyway? " file)) 2281 (if (yes-or-no-p (format "%s seems up-to-date. Revert anyway? " file))
2282 (setq queried t)
2272 (error "Revert canceled")))) 2283 (error "Revert canceled"))))
2273 (when (vc-diff-internal vc-allow-async-revert vc-fileset nil nil) 2284 (unwind-protect
2274 (unless (yes-or-no-p 2285 (when (if vc-revert-show-diff
2275 (format "Discard changes in %s? " 2286 (progn
2276 (let ((str (vc-delistify files)) 2287 (setq diff-buffer (generate-new-buffer-name "*vc-diff*"))
2277 (nfiles (length files))) 2288 (vc-diff-internal vc-allow-async-revert vc-fileset
2278 (if (< (length str) 50) 2289 nil nil nil diff-buffer))
2279 str 2290 ;; Avoid querying the user again.
2280 (format "%d file%s" nfiles 2291 (null queried))
2281 (if (= nfiles 1) "" "s")))))) 2292 (unless (yes-or-no-p
2282 (error "Revert canceled")) 2293 (format "Discard changes in %s? "
2283 (delete-windows-on "*vc-diff*") 2294 (let ((str (vc-delistify files))
2284 (kill-buffer "*vc-diff*")) 2295 (nfiles (length files)))
2296 (if (< (length str) 50)
2297 str
2298 (format "%d file%s" nfiles
2299 (if (= nfiles 1) "" "s"))))))
2300 (error "Revert canceled")))
2301 (when diff-buffer
2302 (delete-windows-on diff-buffer)
2303 (kill-buffer diff-buffer)))
2285 (dolist (file files) 2304 (dolist (file files)
2286 (message "Reverting %s..." (vc-delistify files)) 2305 (message "Reverting %s..." (vc-delistify files))
2287 (vc-revert-file file) 2306 (vc-revert-file file)
diff --git a/lisp/window.el b/lisp/window.el
index e8278bb9986..161dbb33646 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -63,25 +63,26 @@ are not altered by this macro (unless they are altered in BODY)."
63 (when (window-live-p save-selected-window-window) 63 (when (window-live-p save-selected-window-window)
64 (select-window save-selected-window-window 'norecord)))))) 64 (select-window save-selected-window-window 'norecord))))))
65 65
66;; The following two functions are like `window-next' and `window-prev' 66;; The following two functions are like `window-next-sibling' and
67;; but the WINDOW argument is _not_ optional (so they don't substitute 67;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so
68;; the selected window for nil), and they return nil when WINDOW doesn't 68;; they don't substitute the selected window for nil), and they return
69;; have a parent (like a frame's root window or a minibuffer window). 69;; nil when WINDOW doesn't have a parent (like a frame's root window or
70;; a minibuffer window).
70(defsubst window-right (window) 71(defsubst window-right (window)
71 "Return WINDOW's right sibling. 72 "Return WINDOW's right sibling.
72Return nil if WINDOW is the root window of its frame. WINDOW can 73Return nil if WINDOW is the root window of its frame. WINDOW can
73be any window." 74be any window."
74 (and window (window-parent window) (window-next window))) 75 (and window (window-parent window) (window-next-sibling window)))
75 76
76(defsubst window-left (window) 77(defsubst window-left (window)
77 "Return WINDOW's left sibling. 78 "Return WINDOW's left sibling.
78Return nil if WINDOW is the root window of its frame. WINDOW can 79Return nil if WINDOW is the root window of its frame. WINDOW can
79be any window." 80be any window."
80 (and window (window-parent window) (window-prev window))) 81 (and window (window-parent window) (window-prev-sibling window)))
81 82
82(defsubst window-child (window) 83(defsubst window-child (window)
83 "Return WINDOW's first child window." 84 "Return WINDOW's first child window."
84 (or (window-vchild window) (window-hchild window))) 85 (or (window-top-child window) (window-left-child window)))
85 86
86(defun window-child-count (window) 87(defun window-child-count (window)
87 "Return number of WINDOW's child windows." 88 "Return number of WINDOW's child windows."
@@ -89,14 +90,14 @@ be any window."
89 (when (and (windowp window) (setq window (window-child window))) 90 (when (and (windowp window) (setq window (window-child window)))
90 (while window 91 (while window
91 (setq count (1+ count)) 92 (setq count (1+ count))
92 (setq window (window-next window)))) 93 (setq window (window-next-sibling window))))
93 count)) 94 count))
94 95
95(defun window-last-child (window) 96(defun window-last-child (window)
96 "Return last child window of WINDOW." 97 "Return last child window of WINDOW."
97 (when (and (windowp window) (setq window (window-child window))) 98 (when (and (windowp window) (setq window (window-child window)))
98 (while (window-next window) 99 (while (window-next-sibling window)
99 (setq window (window-next window)))) 100 (setq window (window-next-sibling window))))
100 window) 101 window)
101 102
102(defsubst window-any-p (object) 103(defsubst window-any-p (object)
@@ -169,7 +170,7 @@ of this variable is honored when windows are resized or split.
169 170
170Applications should never rebind this variable. To resize a 171Applications should never rebind this variable. To resize a
171window to a height less than the one specified here, an 172window to a height less than the one specified here, an
172application should instead call `resize-window' with a non-nil 173application should instead call `window-resize' with a non-nil
173IGNORE argument. In order to have `split-window' make a window 174IGNORE argument. In order to have `split-window' make a window
174shorter, explictly specify the SIZE argument of that function." 175shorter, explictly specify the SIZE argument of that function."
175 :type 'integer 176 :type 'integer
@@ -189,7 +190,7 @@ split.
189 190
190Applications should never rebind this variable. To resize a 191Applications should never rebind this variable. To resize a
191window to a width less than the one specified here, an 192window to a width less than the one specified here, an
192application should instead call `resize-window' with a non-nil 193application should instead call `window-resize' with a non-nil
193IGNORE argument. In order to have `split-window' make a window 194IGNORE argument. In order to have `split-window' make a window
194narrower, explictly specify the SIZE argument of that function." 195narrower, explictly specify the SIZE argument of that function."
195 :type 'integer 196 :type 'integer
@@ -203,8 +204,8 @@ Optional argument HORIZONTAL non-nil means return WINDOW's first
203child if WINDOW is a horizontal combination." 204child if WINDOW is a horizontal combination."
204 (setq window (normalize-any-window window)) 205 (setq window (normalize-any-window window))
205 (if horizontal 206 (if horizontal
206 (window-hchild window) 207 (window-left-child window)
207 (window-vchild window))) 208 (window-top-child window)))
208 209
209(defsubst window-iso-combined-p (&optional window horizontal) 210(defsubst window-iso-combined-p (&optional window horizontal)
210 "Return non-nil if and only if WINDOW is vertically combined. 211 "Return non-nil if and only if WINDOW is vertically combined.
@@ -258,9 +259,9 @@ number of horizontally arranged subwindows of WINDOW."
258 (funcall proc walk-window-tree-window)) 259 (funcall proc walk-window-tree-window))
259 (unless walk-window-tree-buffer 260 (unless walk-window-tree-buffer
260 (walk-window-tree-1 261 (walk-window-tree-1
261 proc (window-hchild walk-window-tree-window) any) 262 proc (window-left-child walk-window-tree-window) any)
262 (walk-window-tree-1 263 (walk-window-tree-1
263 proc (window-vchild walk-window-tree-window) any)) 264 proc (window-top-child walk-window-tree-window) any))
264 (if sub-only 265 (if sub-only
265 (setq walk-window-tree-window nil) 266 (setq walk-window-tree-window nil)
266 (setq walk-window-tree-window 267 (setq walk-window-tree-window
@@ -375,8 +376,8 @@ WINDOW must be an internal window. Return WINDOW."
375 window t))) 376 window t)))
376 ;; Check children. 377 ;; Check children.
377 (unless (window-buffer window) 378 (unless (window-buffer window)
378 (window-atom-check-1 (window-hchild window)) 379 (window-atom-check-1 (window-left-child window))
379 (window-atom-check-1 (window-vchild window)))) 380 (window-atom-check-1 (window-top-child window))))
380 ;; Check right sibling 381 ;; Check right sibling
381 (window-atom-check-1 (window-right window)))) 382 (window-atom-check-1 (window-right window))))
382 383
@@ -1352,7 +1353,7 @@ meaning of this argument."
1352 (length (window-list-1 nil minibuf))) 1353 (length (window-list-1 nil minibuf)))
1353 1354
1354;;; Resizing windows. 1355;;; Resizing windows.
1355(defun resize-window-reset (&optional frame horizontal) 1356(defun window-resize-reset (&optional frame horizontal)
1356 "Reset resize values for all windows on FRAME. 1357 "Reset resize values for all windows on FRAME.
1357FRAME defaults to the selected frame. 1358FRAME defaults to the selected frame.
1358 1359
@@ -1360,19 +1361,19 @@ This function stores the current value of `window-total-size' applied
1360with argument HORIZONTAL in the new total size of all windows on 1361with argument HORIZONTAL in the new total size of all windows on
1361FRAME. It also resets the new normal size of each of these 1362FRAME. It also resets the new normal size of each of these
1362windows." 1363windows."
1363 (resize-window-reset-1 1364 (window-resize-reset-1
1364 (frame-root-window (normalize-live-frame frame)) horizontal)) 1365 (frame-root-window (normalize-live-frame frame)) horizontal))
1365 1366
1366(defun resize-window-reset-1 (window horizontal) 1367(defun window-resize-reset-1 (window horizontal)
1367 "Internal function of `resize-window-reset'." 1368 "Internal function of `window-resize-reset'."
1368 ;; Register old size in the new total size. 1369 ;; Register old size in the new total size.
1369 (set-window-new-total window (window-total-size window horizontal)) 1370 (set-window-new-total window (window-total-size window horizontal))
1370 ;; Reset new normal size. 1371 ;; Reset new normal size.
1371 (set-window-new-normal window) 1372 (set-window-new-normal window)
1372 (when (window-child window) 1373 (when (window-child window)
1373 (resize-window-reset-1 (window-child window) horizontal)) 1374 (window-resize-reset-1 (window-child window) horizontal))
1374 (when (window-right window) 1375 (when (window-right window)
1375 (resize-window-reset-1 (window-right window) horizontal))) 1376 (window-resize-reset-1 (window-right window) horizontal)))
1376 1377
1377;; The following routine is used to manually resize the minibuffer 1378;; The following routine is used to manually resize the minibuffer
1378;; window and is currently used, for example, by ispell.el. 1379;; window and is currently used, for example, by ispell.el.
@@ -1395,7 +1396,7 @@ as small) as possible but don't signal an error."
1395 (setq delta min-delta))) 1396 (setq delta min-delta)))
1396 1397
1397 ;; Resize now. 1398 ;; Resize now.
1398 (resize-window-reset frame) 1399 (window-resize-reset frame)
1399 ;; Ideally we should be able to resize just the last subwindow of 1400 ;; Ideally we should be able to resize just the last subwindow of
1400 ;; root here. See the comment in `resize-root-window-vertically' 1401 ;; root here. See the comment in `resize-root-window-vertically'
1401 ;; for why we do not do that. 1402 ;; for why we do not do that.
@@ -1405,7 +1406,7 @@ as small) as possible but don't signal an error."
1405 ;; a minibuffer-only frame. 1406 ;; a minibuffer-only frame.
1406 (resize-mini-window-internal window)))) 1407 (resize-mini-window-internal window))))
1407 1408
1408(defun resize-window (window delta &optional horizontal ignore) 1409(defun window-resize (window delta &optional horizontal ignore)
1409 "Resize WINDOW vertically by DELTA lines. 1410 "Resize WINDOW vertically by DELTA lines.
1410WINDOW can be an arbitrary window and defaults to the selected 1411WINDOW can be an arbitrary window and defaults to the selected
1411one. An attempt to resize the root window of a frame will raise 1412one. An attempt to resize the root window of a frame will raise
@@ -1440,7 +1441,7 @@ instead."
1440 ((window-minibuffer-p window) 1441 ((window-minibuffer-p window)
1441 (resize-mini-window window delta)) 1442 (resize-mini-window window delta))
1442 ((window-resizable-p window delta horizontal ignore) 1443 ((window-resizable-p window delta horizontal ignore)
1443 (resize-window-reset frame horizontal) 1444 (window-resize-reset frame horizontal)
1444 (resize-this-window window delta horizontal ignore t) 1445 (resize-this-window window delta horizontal ignore t)
1445 (if (and (not (window-splits window)) 1446 (if (and (not (window-splits window))
1446 (window-iso-combined-p window horizontal) 1447 (window-iso-combined-p window horizontal)
@@ -1461,7 +1462,7 @@ instead."
1461 normal-delta))) 1462 normal-delta)))
1462 ;; Otherwise, resize all other windows in the same combination. 1463 ;; Otherwise, resize all other windows in the same combination.
1463 (resize-other-windows window delta horizontal ignore)) 1464 (resize-other-windows window delta horizontal ignore))
1464 (resize-window-apply frame horizontal)) 1465 (window-resize-apply frame horizontal))
1465 (t 1466 (t
1466 (error "Cannot resize window %s" window))))) 1467 (error "Cannot resize window %s" window)))))
1467 1468
@@ -1725,7 +1726,7 @@ already set by this routine."
1725 (while sub 1726 (while sub
1726 (when (or (consp (window-new-normal sub)) 1727 (when (or (consp (window-new-normal sub))
1727 (numberp (window-new-normal sub))) 1728 (numberp (window-new-normal sub)))
1728 ;; Reset new normal size fields so `resize-window-apply' 1729 ;; Reset new normal size fields so `window-resize-apply'
1729 ;; won't use them to apply new sizes. 1730 ;; won't use them to apply new sizes.
1730 (set-window-new-normal sub)) 1731 (set-window-new-normal sub))
1731 1732
@@ -1866,7 +1867,7 @@ This function recursively resizes WINDOW's subwindows to fit the
1866new size. Make sure that WINDOW is `window-resizable' before 1867new size. Make sure that WINDOW is `window-resizable' before
1867calling this function. Note that this function does not resize 1868calling this function. Note that this function does not resize
1868siblings of WINDOW or WINDOW's parent window. You have to 1869siblings of WINDOW or WINDOW's parent window. You have to
1869eventually call `resize-window-apply' in order to make resizing 1870eventually call `window-resize-apply' in order to make resizing
1870actually take effect." 1871actually take effect."
1871 (when add 1872 (when add
1872 ;; Add DELTA to the new total size of WINDOW. 1873 ;; Add DELTA to the new total size of WINDOW.
@@ -1897,7 +1898,7 @@ This function is only called by the frame resizing routines. It
1897resizes windows proportionally and never deletes any windows." 1898resizes windows proportionally and never deletes any windows."
1898 (when (and (windowp window) (numberp delta) 1899 (when (and (windowp window) (numberp delta)
1899 (window-sizable-p window delta horizontal ignore)) 1900 (window-sizable-p window delta horizontal ignore))
1900 (resize-window-reset (window-frame window) horizontal) 1901 (window-resize-reset (window-frame window) horizontal)
1901 (resize-this-window window delta horizontal ignore t))) 1902 (resize-this-window window delta horizontal ignore t)))
1902 1903
1903(defun resize-root-window-vertically (window delta) 1904(defun resize-root-window-vertically (window delta)
@@ -1921,7 +1922,7 @@ any windows."
1921 (unless (window-sizable window delta) 1922 (unless (window-sizable window delta)
1922 (setq ignore t)))) 1923 (setq ignore t))))
1923 1924
1924 (resize-window-reset (window-frame window)) 1925 (window-resize-reset (window-frame window))
1925 ;; Ideally, we would resize just the last window in a combination 1926 ;; Ideally, we would resize just the last window in a combination
1926 ;; but that's not feasible for the following reason: If we grow 1927 ;; but that's not feasible for the following reason: If we grow
1927 ;; the minibuffer window and the last window cannot be shrunk any 1928 ;; the minibuffer window and the last window cannot be shrunk any
@@ -1999,7 +2000,7 @@ move it as far as possible in the desired direction."
1999 (setq delta (min max-delta (- min-delta)))) 2000 (setq delta (min max-delta (- min-delta))))
2000 (unless (zerop delta) 2001 (unless (zerop delta)
2001 ;; Start resizing. 2002 ;; Start resizing.
2002 (resize-window-reset frame horizontal) 2003 (window-resize-reset frame horizontal)
2003 ;; Try to enlarge LEFT first. 2004 ;; Try to enlarge LEFT first.
2004 (setq this-delta (window-resizable left delta horizontal)) 2005 (setq this-delta (window-resizable left delta horizontal))
2005 (unless (zerop this-delta) 2006 (unless (zerop this-delta)
@@ -2022,7 +2023,7 @@ move it as far as possible in the desired direction."
2022 (setq delta (max (- max-delta) min-delta))) 2023 (setq delta (max (- max-delta) min-delta)))
2023 (unless (zerop delta) 2024 (unless (zerop delta)
2024 ;; Start resizing. 2025 ;; Start resizing.
2025 (resize-window-reset frame horizontal) 2026 (window-resize-reset frame horizontal)
2026 ;; Try to enlarge RIGHT. 2027 ;; Try to enlarge RIGHT.
2027 (setq this-delta (window-resizable right (- delta) horizontal)) 2028 (setq this-delta (window-resizable right (- delta) horizontal))
2028 (unless (zerop this-delta) 2029 (unless (zerop this-delta)
@@ -2039,7 +2040,7 @@ move it as far as possible in the desired direction."
2039 (+ (window-top-line left) (window-total-size left))))))) 2040 (+ (window-top-line left) (window-total-size left)))))))
2040 (unless (zerop delta) 2041 (unless (zerop delta)
2041 ;; Don't report an error in the standard case. 2042 ;; Don't report an error in the standard case.
2042 (unless (resize-window-apply frame horizontal) 2043 (unless (window-resize-apply frame horizontal)
2043 ;; But do report an error if applying the changes fails. 2044 ;; But do report an error if applying the changes fails.
2044 (error "Failed adjusting window %s" window))))))) 2045 (error "Failed adjusting window %s" window)))))))
2045 2046
@@ -2056,9 +2057,9 @@ Return nil."
2056 ((window-size-fixed-p nil horizontal) 2057 ((window-size-fixed-p nil horizontal)
2057 (error "Selected window has fixed size")) 2058 (error "Selected window has fixed size"))
2058 ((window-resizable-p nil delta horizontal) 2059 ((window-resizable-p nil delta horizontal)
2059 (resize-window nil delta horizontal)) 2060 (window-resize nil delta horizontal))
2060 (t 2061 (t
2061 (resize-window 2062 (window-resize
2062 nil (if (> delta 0) 2063 nil (if (> delta 0)
2063 (window-max-delta nil horizontal) 2064 (window-max-delta nil horizontal)
2064 (- (window-min-delta nil horizontal))) 2065 (- (window-min-delta nil horizontal)))
@@ -2077,9 +2078,9 @@ Return nil."
2077 ((window-size-fixed-p nil horizontal) 2078 ((window-size-fixed-p nil horizontal)
2078 (error "Selected window has fixed size")) 2079 (error "Selected window has fixed size"))
2079 ((window-resizable-p nil (- delta) horizontal) 2080 ((window-resizable-p nil (- delta) horizontal)
2080 (resize-window nil (- delta) horizontal)) 2081 (window-resize nil (- delta) horizontal))
2081 (t 2082 (t
2082 (resize-window 2083 (window-resize
2083 nil (if (> delta 0) 2084 nil (if (> delta 0)
2084 (- (window-min-delta nil horizontal)) 2085 (- (window-min-delta nil horizontal))
2085 (window-max-delta nil horizontal)) 2086 (window-max-delta nil horizontal))
@@ -2091,8 +2092,8 @@ Make WINDOW as large as possible without deleting any windows.
2091WINDOW can be any window and defaults to the selected window." 2092WINDOW can be any window and defaults to the selected window."
2092 (interactive) 2093 (interactive)
2093 (setq window (normalize-any-window window)) 2094 (setq window (normalize-any-window window))
2094 (resize-window window (window-max-delta window)) 2095 (window-resize window (window-max-delta window))
2095 (resize-window window (window-max-delta window t) t)) 2096 (window-resize window (window-max-delta window t) t))
2096 2097
2097(defun minimize-window (&optional window) 2098(defun minimize-window (&optional window)
2098 "Minimize WINDOW. 2099 "Minimize WINDOW.
@@ -2100,8 +2101,8 @@ Make WINDOW as small as possible without deleting any windows.
2100WINDOW can be any window and defaults to the selected window." 2101WINDOW can be any window and defaults to the selected window."
2101 (interactive) 2102 (interactive)
2102 (setq window (normalize-any-window window)) 2103 (setq window (normalize-any-window window))
2103 (resize-window window (- (window-min-delta window))) 2104 (window-resize window (- (window-min-delta window)))
2104 (resize-window window (- (window-min-delta window t)) t)) 2105 (window-resize window (- (window-min-delta window t)) t))
2105 2106
2106(defsubst frame-root-window-p (window) 2107(defsubst frame-root-window-p (window)
2107 "Return non-nil if WINDOW is the root window of its frame." 2108 "Return non-nil if WINDOW is the root window of its frame."
@@ -2119,15 +2120,15 @@ return value."
2119 (setq list 2120 (setq list
2120 (cons 2121 (cons
2121 (cond 2122 (cond
2122 ((window-vchild window) 2123 ((window-top-child window)
2123 (cons t (cons (window-edges window) 2124 (cons t (cons (window-edges window)
2124 (window-tree-1 (window-vchild window) t)))) 2125 (window-tree-1 (window-top-child window) t))))
2125 ((window-hchild window) 2126 ((window-left-child window)
2126 (cons nil (cons (window-edges window) 2127 (cons nil (cons (window-edges window)
2127 (window-tree-1 (window-hchild window) t)))) 2128 (window-tree-1 (window-left-child window) t))))
2128 (t window)) 2129 (t window))
2129 list)) 2130 list))
2130 (setq window (when next (window-next window)))) 2131 (setq window (when next (window-next-sibling window))))
2131 (nreverse list))) 2132 (nreverse list)))
2132 2133
2133(defun window-tree (&optional frame) 2134(defun window-tree (&optional frame)
@@ -2363,14 +2364,14 @@ non-side window, signal an error."
2363 ((not parent) 2364 ((not parent)
2364 (error "Attempt to delete minibuffer or sole ordinary window"))) 2365 (error "Attempt to delete minibuffer or sole ordinary window")))
2365 2366
2366 (let* ((horizontal (window-hchild parent)) 2367 (let* ((horizontal (window-left-child parent))
2367 (size (window-total-size window horizontal)) 2368 (size (window-total-size window horizontal))
2368 (frame-selected 2369 (frame-selected
2369 (window-or-subwindow-p (frame-selected-window frame) window)) 2370 (window-or-subwindow-p (frame-selected-window frame) window))
2370 ;; Emacs 23 preferably gives WINDOW's space to its left 2371 ;; Emacs 23 preferably gives WINDOW's space to its left
2371 ;; sibling. 2372 ;; sibling.
2372 (sibling (or (window-left window) (window-right window)))) 2373 (sibling (or (window-left window) (window-right window))))
2373 (resize-window-reset frame horizontal) 2374 (window-resize-reset frame horizontal)
2374 (cond 2375 (cond
2375 ((and (not (window-splits window)) 2376 ((and (not (window-splits window))
2376 sibling (window-sizable-p sibling size)) 2377 sibling (window-sizable-p sibling size))
@@ -2944,7 +2945,7 @@ buffer list. Interactively, KILL is the prefix argument."
2944 (set-window-start window (nth 1 quit-restore)) 2945 (set-window-start window (nth 1 quit-restore))
2945 (set-window-point window (nth 2 quit-restore)) 2946 (set-window-point window (nth 2 quit-restore))
2946 (when (and resize (/= (nth 4 quit-restore) (window-total-size window))) 2947 (when (and resize (/= (nth 4 quit-restore) (window-total-size window)))
2947 (resize-window 2948 (window-resize
2948 window (- (nth 4 quit-restore) (window-total-size window)))) 2949 window (- (nth 4 quit-restore) (window-total-size window))))
2949 ;; Reset the quit-restore parameter. 2950 ;; Reset the quit-restore parameter.
2950 (set-window-parameter window 'quit-restore nil) 2951 (set-window-parameter window 'quit-restore nil)
@@ -3140,7 +3141,7 @@ frame. The selected window is not changed by this function."
3140 ;; SIZE specification violates minimum size restrictions. 3141 ;; SIZE specification violates minimum size restrictions.
3141 (error "Window %s too small for splitting" window))) 3142 (error "Window %s too small for splitting" window)))
3142 3143
3143 (resize-window-reset frame horizontal) 3144 (window-resize-reset frame horizontal)
3144 3145
3145 (setq new-parent 3146 (setq new-parent
3146 ;; Make new-parent non-nil if we need a new parent window; 3147 ;; Make new-parent non-nil if we need a new parent window;
@@ -3395,13 +3396,13 @@ window."
3395 (error "Not a window or frame %s" window-or-frame)))) 3396 (error "Not a window or frame %s" window-or-frame))))
3396 (frame (window-frame window))) 3397 (frame (window-frame window)))
3397 ;; Balance vertically. 3398 ;; Balance vertically.
3398 (resize-window-reset (window-frame window)) 3399 (window-resize-reset (window-frame window))
3399 (balance-windows-1 window) 3400 (balance-windows-1 window)
3400 (resize-window-apply frame) 3401 (window-resize-apply frame)
3401 ;; Balance horizontally. 3402 ;; Balance horizontally.
3402 (resize-window-reset (window-frame window) t) 3403 (window-resize-reset (window-frame window) t)
3403 (balance-windows-1 window t) 3404 (balance-windows-1 window t)
3404 (resize-window-apply frame t))) 3405 (window-resize-apply frame t)))
3405 3406
3406(defun window-fixed-size-p (&optional window direction) 3407(defun window-fixed-size-p (&optional window direction)
3407 "Return t if WINDOW cannot be resized in DIRECTION. 3408 "Return t if WINDOW cannot be resized in DIRECTION.
@@ -3421,13 +3422,13 @@ Changing this globally has no effect.")
3421(make-variable-buffer-local 'window-area-factor) 3422(make-variable-buffer-local 'window-area-factor)
3422 3423
3423(defun balance-windows-area-adjust (window delta horizontal) 3424(defun balance-windows-area-adjust (window delta horizontal)
3424 "Wrapper around `resize-window' with error checking. 3425 "Wrapper around `window-resize' with error checking.
3425Arguments WINDOW, DELTA and HORIZONTAL are passed on to that function." 3426Arguments WINDOW, DELTA and HORIZONTAL are passed on to that function."
3426 ;; `resize-window' may fail if delta is too large. 3427 ;; `window-resize' may fail if delta is too large.
3427 (while (>= (abs delta) 1) 3428 (while (>= (abs delta) 1)
3428 (condition-case nil 3429 (condition-case nil
3429 (progn 3430 (progn
3430 (resize-window window delta horizontal) 3431 (window-resize window delta horizontal)
3431 (setq delta 0)) 3432 (setq delta 0))
3432 (error 3433 (error
3433 ;;(message "adjust: %s" (error-message-string err)) 3434 ;;(message "adjust: %s" (error-message-string err))
@@ -3495,7 +3496,7 @@ specific buffers."
3495 ;; become significant. 3496 ;; become significant.
3496 (setq carry (+ carry areadiff)) 3497 (setq carry (+ carry areadiff))
3497 ;; This used `adjust-window-trailing-edge' before and uses 3498 ;; This used `adjust-window-trailing-edge' before and uses
3498 ;; `resize-window' now. Error wrapping is still needed. 3499 ;; `window-resize' now. Error wrapping is still needed.
3499 (balance-windows-area-adjust win diff horiz) 3500 (balance-windows-area-adjust win diff horiz)
3500 ;; (sit-for 0.5) 3501 ;; (sit-for 0.5)
3501 (let ((change (cons win (window-edges win)))) 3502 (let ((change (cons win (window-edges win))))
@@ -3524,15 +3525,15 @@ specific buffers."
3524 "Helper function for `window-state-get'." 3525 "Helper function for `window-state-get'."
3525 (let* ((type 3526 (let* ((type
3526 (cond 3527 (cond
3527 ((window-vchild window) 'vc) 3528 ((window-top-child window) 'vc)
3528 ((window-hchild window) 'hc) 3529 ((window-left-child window) 'hc)
3529 (t 'leaf))) 3530 (t 'leaf)))
3530 (buffer (window-buffer window)) 3531 (buffer (window-buffer window))
3531 (selected (eq window (selected-window))) 3532 (selected (eq window (selected-window)))
3532 (head 3533 (head
3533 (window-list-no-nils 3534 (window-list-no-nils
3534 type 3535 type
3535 (unless (window-next window) (cons 'last t)) 3536 (unless (window-next-sibling window) (cons 'last t))
3536 (cons 'clone-number (window-clone-number window)) 3537 (cons 'clone-number (window-clone-number window))
3537 (cons 'total-height (window-total-size window)) 3538 (cons 'total-height (window-total-size window))
3538 (cons 'total-width (window-total-size window t)) 3539 (cons 'total-width (window-total-size window t))
@@ -3720,13 +3721,13 @@ value can be also stored on disk and read back in a new session."
3720 (window-total-height window))) 3721 (window-total-height window)))
3721 window-size-fixed) 3722 window-size-fixed)
3722 (when (window-resizable-p window delta) 3723 (when (window-resizable-p window delta)
3723 (resize-window window delta))) 3724 (window-resize window delta)))
3724 ;; Else check whether the window is not high enough. 3725 ;; Else check whether the window is not high enough.
3725 (let* ((min-size (window-min-size window nil ignore)) 3726 (let* ((min-size (window-min-size window nil ignore))
3726 (delta (- min-size (window-total-size window)))) 3727 (delta (- min-size (window-total-size window))))
3727 (when (and (> delta 0) 3728 (when (and (> delta 0)
3728 (window-resizable-p window delta nil ignore)) 3729 (window-resizable-p window delta nil ignore))
3729 (resize-window window delta nil ignore)))) 3730 (window-resize window delta nil ignore))))
3730 ;; Adjust horizontally. 3731 ;; Adjust horizontally.
3731 (if (memq window-size-fixed '(t width)) 3732 (if (memq window-size-fixed '(t width))
3732 ;; A fixed width window, try to restore the original size. 3733 ;; A fixed width window, try to restore the original size.
@@ -3734,13 +3735,13 @@ value can be also stored on disk and read back in a new session."
3734 (window-total-width window))) 3735 (window-total-width window)))
3735 window-size-fixed) 3736 window-size-fixed)
3736 (when (window-resizable-p window delta) 3737 (when (window-resizable-p window delta)
3737 (resize-window window delta))) 3738 (window-resize window delta)))
3738 ;; Else check whether the window is not wide enough. 3739 ;; Else check whether the window is not wide enough.
3739 (let* ((min-size (window-min-size window t ignore)) 3740 (let* ((min-size (window-min-size window t ignore))
3740 (delta (- min-size (window-total-size window t)))) 3741 (delta (- min-size (window-total-size window t))))
3741 (when (and (> delta 0) 3742 (when (and (> delta 0)
3742 (window-resizable-p window delta t ignore)) 3743 (window-resizable-p window delta t ignore))
3743 (resize-window window delta t ignore)))) 3744 (window-resize window delta t ignore))))
3744 ;; Set dedicated status. 3745 ;; Set dedicated status.
3745 (set-window-dedicated-p window (cdr (assq 'dedicated state))) 3746 (set-window-dedicated-p window (cdr (assq 'dedicated state)))
3746 ;; Install positions (maybe we should do this after all windows 3747 ;; Install positions (maybe we should do this after all windows
@@ -4091,7 +4092,7 @@ A list whose car is the symbol `fun-with-args' specifies that the
4091function specified in the second element of the list is 4092function specified in the second element of the list is
4092responsible for displaying the buffer. `display-buffer' calls 4093responsible for displaying the buffer. `display-buffer' calls
4093this function with the buffer as first argument and the remaining 4094this function with the buffer as first argument and the remaining
4094elements of the list as second argument. 4095elements of the list as the other arguments.
4095 4096
4096The function should choose or create a window, display the buffer 4097The function should choose or create a window, display the buffer
4097in it, and return the window. It is also responsible for giving 4098in it, and return the window. It is also responsible for giving
@@ -4182,7 +4183,7 @@ using the location specifiers `same-window' or `other-frame'."
4182 :tag "Label" 4183 :tag "Label"
4183 :format "%v" 4184 :format "%v"
4184 :help-echo "A symbol equalling the buffer display label." 4185 :help-echo "A symbol equalling the buffer display label."
4185 (const :format "" symbol) 4186 (const :format "" label)
4186 (symbol :format "Label: %v\n" :size 32)))) 4187 (symbol :format "Label: %v\n" :size 32))))
4187 4188
4188 ;; Display specifiers. 4189 ;; Display specifiers.
@@ -4225,9 +4226,9 @@ using the location specifiers `same-window' or `other-frame'."
4225 :help-echo "Window to reuse." 4226 :help-echo "Window to reuse."
4226 :value nil 4227 :value nil
4227 :format "%[Window%] %v" :size 15 4228 :format "%[Window%] %v" :size 15
4228 (const :tag "Any" :format "%t" nil) 4229 (const :tag "Any window" :format "%t" nil)
4229 (const :tag "Selected only" :format "%t" same) 4230 (const :tag "Same window" :format "%t" same)
4230 (const :tag "Any but selected" :format "%t" other)) 4231 (const :tag "Other window" :format "%t" other))
4231 ;; The window's buffer. 4232 ;; The window's buffer.
4232 (choice 4233 (choice
4233 :tag "Buffer" 4234 :tag "Buffer"
@@ -4239,15 +4240,15 @@ using the location specifiers `same-window' or `other-frame'."
4239 (const :tag "Other buffer" :format "%t" other)) 4240 (const :tag "Other buffer" :format "%t" other))
4240 ;; The window's frame. 4241 ;; The window's frame.
4241 (choice 4242 (choice
4242 :help-echo "Frame to search for a window to reuse." 4243 :help-echo "Frames to search for a window to reuse."
4243 :tag "Frame" 4244 :tag "Frame"
4244 :value nil 4245 :value nil
4245 :format " %[Frame%] %v" :size 15 4246 :format " %[Frame%] %v" :size 15
4246 (const :tag "Selected frame only" :format "%t" nil) 4247 (const :tag "Same frame only" :format "%t" nil)
4247 (const :tag "Visible frames" :format "%t" visible) 4248 (const :tag "Visible frames" :format "%t" visible)
4248 (const :tag "Visible but unselected" :format "%t" other) 4249 (const :tag "Any other visible frame" :format "%t" other)
4249 (const :tag "Visible and iconified" :format "%t" 0) 4250 (const :tag "Visible and iconified frames" :format "%t" 0)
4250 (const :tag "Any frame" :format "%t" t))) 4251 (const :tag "All frames" :format "%t" t)))
4251 ;; Whether window sizes should be evened out. 4252 ;; Whether window sizes should be evened out.
4252 (cons 4253 (cons
4253 :format "%v\n" 4254 :format "%v\n"
@@ -4537,7 +4538,12 @@ using the location specifiers `same-window' or `other-frame'."
4537 4538
4538 ;; Macro specifiers. 4539 ;; Macro specifiers.
4539 (list 4540 (list
4540 :tag "Same frame only" 4541 :tag "Same window"
4542 :format "%t%v"
4543 :inline t
4544 (const :format "\n" same-window))
4545 (list
4546 :tag "Same frame"
4541 :format "%t%v" 4547 :format "%t%v"
4542 :inline t 4548 :inline t
4543 (const :format "\n" same-frame)) 4549 (const :format "\n" same-frame))
@@ -4552,7 +4558,7 @@ using the location specifiers `same-window' or `other-frame'."
4552 :inline t 4558 :inline t
4553 (const :format "\n" same-frame-other-window)) 4559 (const :format "\n" same-frame-other-window))
4554 (list 4560 (list
4555 :tag "Other frame only" 4561 :tag "Other frame"
4556 :format "%t%v" 4562 :format "%t%v"
4557 :inline t 4563 :inline t
4558 (const :format "\n" other-frame)) 4564 (const :format "\n" other-frame))
@@ -4590,9 +4596,9 @@ using the location specifiers `same-window' or `other-frame'."
4590 (const :format "" other-window-means-other-frame) 4596 (const :format "" other-window-means-other-frame)
4591 (choice 4597 (choice
4592 :help-echo "Whether other window means same or other frame." 4598 :help-echo "Whether other window means same or other frame."
4593 :format "%[Same or other frame%] %v\n" :size 15 4599 :format "%[Other window means other frame%] %v\n" :size 15
4594 (const :tag "Same frame" :format "%t" nil) 4600 (const :tag "Off" :format "%t" nil)
4595 (const :tag "Other frame" :format "%t" t))) 4601 (const :tag "On" :format "%t" t)))
4596 ;; Overriding. 4602 ;; Overriding.
4597 (cons 4603 (cons
4598 :format "%v\n" 4604 :format "%v\n"
@@ -4661,8 +4667,8 @@ larger than WINDOW."
4661 ;; Don't resize minibuffer windows. 4667 ;; Don't resize minibuffer windows.
4662 (window-minibuffer-p) 4668 (window-minibuffer-p)
4663 ;; WINDOW must be adjacent to the selected one. 4669 ;; WINDOW must be adjacent to the selected one.
4664 (not (or (eq window (window-prev)) 4670 (not (or (eq window (window-prev-sibling))
4665 (eq window (window-next)))))) 4671 (eq window (window-next-sibling))))))
4666 ((and (window-iso-combined-p window) 4672 ((and (window-iso-combined-p window)
4667 ;; Resize iff the selected window is higher than WINDOW. 4673 ;; Resize iff the selected window is higher than WINDOW.
4668 (> (window-total-height) (window-total-height window))) 4674 (> (window-total-height) (window-total-height window)))
@@ -4672,7 +4678,7 @@ larger than WINDOW."
4672 ;; WINDOW and the selected one. But for a simple two windows 4678 ;; WINDOW and the selected one. But for a simple two windows
4673 ;; configuration the present behavior is good enough so why care? 4679 ;; configuration the present behavior is good enough so why care?
4674 (ignore-errors 4680 (ignore-errors
4675 (resize-window 4681 (window-resize
4676 window (/ (- (window-total-height) (window-total-height window)) 4682 window (/ (- (window-total-height) (window-total-height window))
4677 2)))) 4683 2))))
4678 ((and (window-iso-combined-p window t) 4684 ((and (window-iso-combined-p window t)
@@ -4681,7 +4687,7 @@ larger than WINDOW."
4681 ;; Don't throw an error if we can't even window widths, see 4687 ;; Don't throw an error if we can't even window widths, see
4682 ;; comment above. 4688 ;; comment above.
4683 (ignore-errors 4689 (ignore-errors
4684 (resize-window 4690 (window-resize
4685 window (/ (- (window-total-width) (window-total-width window)) 4691 window (/ (- (window-total-width) (window-total-width window))
4686 2) t))))) 4692 2) t)))))
4687 4693
@@ -4700,7 +4706,7 @@ documentation of `display-buffer-alist' for a description."
4700 (delta (- height (window-total-size window)))) 4706 (delta (- height (window-total-size window))))
4701 (when (and (window-resizable-p window delta nil 'safe) 4707 (when (and (window-resizable-p window delta nil 'safe)
4702 (window-iso-combined-p window)) 4708 (window-iso-combined-p window))
4703 (resize-window window delta nil 'safe)))) 4709 (window-resize window delta nil 'safe))))
4704 ((functionp set-height) 4710 ((functionp set-height)
4705 (ignore-errors (funcall set-height window)))))) 4711 (ignore-errors (funcall set-height window))))))
4706 4712
@@ -4719,7 +4725,7 @@ documentation of `display-buffer-alist' for a description."
4719 (delta (- width (window-total-size window t)))) 4725 (delta (- width (window-total-size window t))))
4720 (when (and (window-resizable-p window delta t 'safe) 4726 (when (and (window-resizable-p window delta t 'safe)
4721 (window-iso-combined-p window t)) 4727 (window-iso-combined-p window t))
4722 (resize-window window delta t 'safe)))) 4728 (window-resize window delta t 'safe))))
4723 ((functionp set-width) 4729 ((functionp set-width)
4724 (ignore-errors (funcall set-width window)))))) 4730 (ignore-errors (funcall set-width window))))))
4725 4731
@@ -4737,7 +4743,9 @@ documentation of `display-buffer-alist' for a description."
4737 (dedicated (cdr (assq 'dedicated specifiers))) 4743 (dedicated (cdr (assq 'dedicated specifiers)))
4738 (no-other-window (cdr (assq 'no-other-window specifiers)))) 4744 (no-other-window (cdr (assq 'no-other-window specifiers))))
4739 ;; Show BUFFER in WINDOW. 4745 ;; Show BUFFER in WINDOW.
4740 (set-window-dedicated-p window nil) 4746 (unless (eq buffer (window-buffer window))
4747 ;; If we show another buffer in WINDOW, undedicate it first.
4748 (set-window-dedicated-p window nil))
4741 (set-window-buffer window buffer) 4749 (set-window-buffer window buffer)
4742 (when dedicated 4750 (when dedicated
4743 (set-window-dedicated-p window dedicated)) 4751 (set-window-dedicated-p window dedicated))
@@ -4773,7 +4781,7 @@ none was found."
4773 (let* ((method-window (nth 0 method)) 4781 (let* ((method-window (nth 0 method))
4774 (method-buffer (nth 1 method)) 4782 (method-buffer (nth 1 method))
4775 (method-frame (nth 2 method)) 4783 (method-frame (nth 2 method))
4776 (reuse-dedicated (assq 'reuse-window-dedicated specifiers)) 4784 (reuse-dedicated (cdr (assq 'reuse-window-dedicated specifiers)))
4777 windows other-frame dedicated time best-window best-time) 4785 windows other-frame dedicated time best-window best-time)
4778 (when (eq method-frame 'other) 4786 (when (eq method-frame 'other)
4779 ;; `other' is not handled by `window-list-1'. 4787 ;; `other' is not handled by `window-list-1'.
@@ -5164,6 +5172,7 @@ SPECIFIERS must be a list of buffer display specifiers."
5164 ;; `major' is the major window on SIDE, `windows' the life 5172 ;; `major' is the major window on SIDE, `windows' the life
5165 ;; windows on SIDE. 5173 ;; windows on SIDE.
5166 (windows (when major (windows-with-parameter 'window-side side))) 5174 (windows (when major (windows-with-parameter 'window-side side)))
5175 (reuse-dedicated (cdr (assq 'reuse-window-dedicated specifiers)))
5167 (slots (when major (window-child-count major))) 5176 (slots (when major (window-child-count major)))
5168 (max-slots 5177 (max-slots
5169 (nth (cond 5178 (nth (cond
@@ -5174,7 +5183,7 @@ SPECIFIERS must be a list of buffer display specifiers."
5174 window-sides-slots)) 5183 window-sides-slots))
5175 (selected-window (selected-window)) 5184 (selected-window (selected-window))
5176 window this-window this-slot prev-window next-window 5185 window this-window this-slot prev-window next-window
5177 best-window best-slot abs-slot) 5186 best-window best-slot abs-slot dedicated)
5178 5187
5179 (unless (numberp slot) 5188 (unless (numberp slot)
5180 (setq slot 0)) 5189 (setq slot 0))
@@ -5189,8 +5198,13 @@ SPECIFIERS must be a list of buffer display specifiers."
5189 ((not (numberp this-slot))) 5198 ((not (numberp this-slot)))
5190 ((and (= this-slot slot) 5199 ((and (= this-slot slot)
5191 ;; Dedicatedness check. 5200 ;; Dedicatedness check.
5192 (or (not (window-dedicated-p window)) 5201 (or (not (setq dedicated (window-dedicated-p window)))
5193 (assq 'reuse-window-dedicated specifiers))) 5202 ;; If the window is weakly dedicated to its
5203 ;; buffer, reuse-dedicated must be non-nil.
5204 (and (not (eq dedicated t)) reuse-dedicated)
5205 ;; If the window is strongly dedicated to its
5206 ;; buffer, reuse-dedicated must be t.
5207 (eq reuse-dedicated t)))
5194 ;; Window with matching SLOT, use it. 5208 ;; Window with matching SLOT, use it.
5195 (setq this-window window) 5209 (setq this-window window)
5196 (throw 'found t)) 5210 (throw 'found t))
@@ -5305,48 +5319,73 @@ user preferences expressed in `display-buffer-alist'."
5305 (or (car list) (cdr list))))) 5319 (or (car list) (cdr list)))))
5306 (when value (cdr value)))) 5320 (when value (cdr value))))
5307 5321
5308(defun display-buffer-normalize-argument (buffer-name specifiers label other-frame) 5322(defun display-buffer-normalize-arguments (buffer-name specifiers label other-frame)
5309 "Normalize second argument of `display-buffer'. 5323 "Normalize second and third argument of `display-buffer'.
5310BUFFER-NAME is the name of the buffer that shall be displayed, 5324BUFFER-NAME is the name of the buffer that shall be displayed,
5311SPECIFIERS is the second argument of `display-buffer'. LABEL the 5325SPECIFIERS is the second argument of `display-buffer'. LABEL is
5312same argument of `display-buffer'. OTHER-FRAME non-nil means use 5326the same argument of `display-buffer'. OTHER-FRAME non-nil means
5313other-frame for other-window." 5327use other-frame for other-window."
5314 (let (normalized entry) 5328 (let (normalized entry specifier pars)
5329 (setq specifier
5330 (cond
5331 ((not specifiers)
5332 nil)
5333 ((listp specifiers)
5334 ;; If SPECIFIERS is a list, we assume it is a list of specifiers.
5335 (dolist (specifier specifiers)
5336 (cond
5337 ((consp specifier)
5338 (setq normalized (cons specifier normalized)))
5339 ((eq specifier 'other-window)
5340 ;; `other-window' must be treated separately.
5341 (let ((entry (assq (if other-frame
5342 'other-frame
5343 'same-frame-other-window)
5344 display-buffer-macro-specifiers)))
5345 (dolist (item (cdr entry))
5346 (setq normalized (cons item normalized)))))
5347 ((symbolp specifier)
5348 ;; Might be a macro specifier, try to expand it (the cdr is a
5349 ;; list and we have to reverse it later, so do it one at a
5350 ;; time).
5351 (let ((entry (assq specifier display-buffer-macro-specifiers)))
5352 (dolist (item (cdr entry))
5353 (setq normalized (cons item normalized)))))))
5354 ;; Reverse list.
5355 (nreverse normalized))
5356 ((setq entry (assq specifiers display-buffer-macro-specifiers))
5357 ;; A macro specifier.
5358 (cdr entry))
5359 ((or other-frame (with-no-warnings pop-up-frames))
5360 ;; `special-display-p' group.
5361 (if (and (with-no-warnings special-display-function)
5362 ;; `special-display-p' returns either t or a list
5363 ;; of frame parameters to pass to
5364 ;; `special-display-function'.
5365 (setq pars (with-no-warnings
5366 (special-display-p buffer-name))))
5367 (list (list 'fun-with-args
5368 (with-no-warnings special-display-function)
5369 (when (listp pars) pars)))
5370 ;; Pop up another frame.
5371 (cddr (assq 'other-frame display-buffer-macro-specifiers))))
5372 (t
5373 ;; In any other case pop up a new window.
5374 (cdr (assq 'same-frame-other-window
5375 display-buffer-macro-specifiers)))))
5376
5377 ;; Handle the old meaning of the LABEL argument of `display-buffer'.
5315 (cond 5378 (cond
5316 ((not specifiers) 5379 ((or (memq label '(visible 0 t)) (frame-live-p label))
5317 nil) 5380 ;; LABEL must be one of visible (and visible frame), 0 (any
5318 ((listp specifiers) 5381 ;; visible or iconfied frame), t (any frame), or a live frame.
5319 ;; If SPECIFIERS is a list, we assume it is a list of specifiers. 5382 (cons `(reuse-window nil same ,label) specifier))
5320 (dolist (specifier specifiers) 5383 ((or other-frame
5321 (cond 5384 (with-no-warnings pop-up-frames)
5322 ((consp specifier) 5385 (with-no-warnings display-buffer-reuse-frames))
5323 (setq normalized (cons specifier normalized))) 5386 (cons '(reuse-window nil same 0) specifier))
5324 ((eq specifier 'other-window)
5325 ;; `other-window' must be treated separately.
5326 (let ((entry (assq (if other-frame
5327 'other-frame
5328 'same-frame-other-window)
5329 display-buffer-macro-specifiers)))
5330 (dolist (item (cdr entry))
5331 (setq normalized (cons item normalized)))))
5332 ((symbolp specifier)
5333 ;; Might be a macro specifier, try to expand it (the cdr is a
5334 ;; list and we have to reverse it later, so do it one at a
5335 ;; time).
5336 (let ((entry (assq specifier display-buffer-macro-specifiers)))
5337 (dolist (item (cdr entry))
5338 (setq normalized (cons item normalized)))))))
5339 ;; Reverse list.
5340 (nreverse normalized))
5341 ((setq entry (assq specifiers display-buffer-macro-specifiers))
5342 ;; A macro specifier.
5343 (cdr entry))
5344 ((or other-frame (with-no-warnings pop-up-frames))
5345 ;; Pop up another frame.
5346 (cdr (assq 'other-frame display-buffer-macro-specifiers)))
5347 (t 5387 (t
5348 ;; In any other case pop up a new window. 5388 specifier))))
5349 (cdr (assq 'same-frame-other-window display-buffer-macro-specifiers))))))
5350 5389
5351(defun display-buffer-normalize-options (buffer-or-name) 5390(defun display-buffer-normalize-options (buffer-or-name)
5352 "Subroutine of `display-buffer-normalize-specifiers'. 5391 "Subroutine of `display-buffer-normalize-specifiers'.
@@ -5517,7 +5556,7 @@ LABEL the corresponding argument of `display-buffer'."
5517 (let* ((specifiers (cdr entry)) 5556 (let* ((specifiers (cdr entry))
5518 (normalized 5557 (normalized
5519 (display-buffer-normalize-alist-1 specifiers label))) 5558 (display-buffer-normalize-alist-1 specifiers label)))
5520 (if (assq 'override specifiers) 5559 (if (cdr (assq 'override specifiers))
5521 (setq list-1 5560 (setq list-1
5522 (if list-1 5561 (if list-1
5523 (append list-1 normalized) 5562 (append list-1 normalized)
@@ -5554,13 +5593,13 @@ specifiers:
5554 5593
5555- `display-buffer-default-specifiers'." 5594- `display-buffer-default-specifiers'."
5556 (let* ((list (display-buffer-normalize-alist buffer-name label)) 5595 (let* ((list (display-buffer-normalize-alist buffer-name label))
5557 (other-frame (assq 'other-window-means-other-frame 5596 (other-frame (cdr (assq 'other-window-means-other-frame
5558 (or (car list) (cdr list))))) 5597 (or (car list) (cdr list))))))
5559 (append 5598 (append
5560 ;; Overriding user specifiers. 5599 ;; Overriding user specifiers.
5561 (car list) 5600 (car list)
5562 ;; Application specifiers. 5601 ;; Application specifiers.
5563 (display-buffer-normalize-argument 5602 (display-buffer-normalize-arguments
5564 buffer-name specifiers label other-frame) 5603 buffer-name specifiers label other-frame)
5565 ;; Emacs 23 compatibility specifiers. 5604 ;; Emacs 23 compatibility specifiers.
5566 (unless display-buffer-normalize-options-inhibit 5605 (unless display-buffer-normalize-options-inhibit
@@ -5623,6 +5662,21 @@ override SPECIFIERS by adding an entry to `display-buffer-alist'
5623whose car contains LABEL and whose cdr specifies the preferred 5662whose car contains LABEL and whose cdr specifies the preferred
5624alternative display method. 5663alternative display method.
5625 5664
5665The following values of LABEL have a special meaning and allow to
5666specify the set of frames to investigate when the buffer already
5667appears in a window:
5668
5669`visible' - the set of visible frames.
5670
56710 - the set of visible or iconified frames.
5672
5673t - the set of all frames.
5674
5675A live frame - the set containing that frame as its only element.
5676
5677If the buffer is already displayed in a window on a frame in the
5678specified set, return that window.
5679
5626The method to display the buffer is derived by combining the 5680The method to display the buffer is derived by combining the
5627values of `display-buffer-alist' and SPECIFIERS. Highest 5681values of `display-buffer-alist' and SPECIFIERS. Highest
5628priority is given to overriding elements of 5682priority is given to overriding elements of
@@ -5669,19 +5723,19 @@ this list as arguments."
5669 (display-buffer-in-side-window 5723 (display-buffer-in-side-window
5670 buffer (nth 1 specifier) (nth 2 specifier) normalized)) 5724 buffer (nth 1 specifier) (nth 2 specifier) normalized))
5671 ((eq method 'fun-with-args) 5725 ((eq method 'fun-with-args)
5672 (apply (cadr specifier) buffer (cddr specifier)))))) 5726 (apply (nth 1 specifier) buffer (nth 2 specifier))))))
5673 5727
5674 ;; If we don't have a window yet, try a fallback method. All 5728 ;; If we don't have a window yet, try a fallback method. All
5675 ;; specifiers have been used up by now. 5729 ;; specifiers have been used up by now.
5676 (or (and (window-live-p window) window) 5730 (or (and (window-live-p window) window)
5677 ;; Try reusing a window showing BUFFER on any visible or 5731 ;; Try reusing a window showing BUFFER on any visible or
5678 ;; iconfied frame. 5732 ;; iconfied frame.
5679 (display-buffer-reuse-window buffer '(nil buffer 0)) 5733 (display-buffer-reuse-window buffer `(nil ,buffer 0))
5680 ;; Try reusing a window not showing BUFFER on any visible or 5734 ;; Try reusing a window not showing BUFFER on any visible or
5681 ;; iconified frame. 5735 ;; iconified frame.
5682 (display-buffer-reuse-window buffer '(nil other 0)) 5736 (display-buffer-reuse-window buffer '(nil other 0))
5683 ;; Try making a new frame. 5737 ;; Eli says it's better to never try making a new frame.
5684 (display-buffer-pop-up-frame buffer) 5738 ;; (display-buffer-pop-up-frame buffer)
5685 ;; Try using a weakly dedicated window. 5739 ;; Try using a weakly dedicated window.
5686 (display-buffer-reuse-window 5740 (display-buffer-reuse-window
5687 buffer '(nil nil t) '((reuse-window-dedicated . weak))) 5741 buffer '(nil nil t) '((reuse-window-dedicated . weak)))
@@ -6726,7 +6780,7 @@ value of `display-buffer-alist'."
6726 (when (or display-buffer-reuse-frames pop-up-frames) 6780 (when (or display-buffer-reuse-frames pop-up-frames)
6727 ;; "0" (all visible and iconified frames) is hardcoded in 6781 ;; "0" (all visible and iconified frames) is hardcoded in
6728 ;; Emacs 23. 6782 ;; Emacs 23.
6729 0)) 6783 0))
6730 (unless (memq even-window-heights '(nil unset)) 6784 (unless (memq even-window-heights '(nil unset))
6731 (cons 'reuse-window-even-sizes t))) 6785 (cons 'reuse-window-even-sizes t)))
6732 no-custom) 6786 no-custom)
@@ -6759,7 +6813,7 @@ where some error may be present."
6759 ;; windows 1-line tall, which means that there's no more space for 6813 ;; windows 1-line tall, which means that there's no more space for
6760 ;; the modeline. 6814 ;; the modeline.
6761 (let ((window-min-height (min 2 height))) ; One text line plus a modeline. 6815 (let ((window-min-height (min 2 height))) ; One text line plus a modeline.
6762 (resize-window window delta))))) 6816 (window-resize window delta)))))
6763 6817
6764(defun enlarge-window-horizontally (delta) 6818(defun enlarge-window-horizontally (delta)
6765 "Make selected window DELTA columns wider. 6819 "Make selected window DELTA columns wider.
@@ -6902,8 +6956,8 @@ WINDOW was scrolled."
6902 ;; It's silly to put `point' at the end of the previous 6956 ;; It's silly to put `point' at the end of the previous
6903 ;; line and so maybe force horizontal scrolling. 6957 ;; line and so maybe force horizontal scrolling.
6904 (set-window-point window (line-beginning-position 0))) 6958 (set-window-point window (line-beginning-position 0)))
6905 ;; Call `resize-window' with OVERRIDE argument equal WINDOW. 6959 ;; Call `window-resize' with OVERRIDE argument equal WINDOW.
6906 (resize-window window delta nil window) 6960 (window-resize window delta nil window)
6907 ;; Check if the last line is surely fully visible. If 6961 ;; Check if the last line is surely fully visible. If
6908 ;; not, enlarge the window. 6962 ;; not, enlarge the window.
6909 (let ((end (save-excursion 6963 (let ((end (save-excursion
@@ -6926,7 +6980,7 @@ WINDOW was scrolled."
6926 (while (and (< desired-height max-height) 6980 (while (and (< desired-height max-height)
6927 (= desired-height (window-total-size)) 6981 (= desired-height (window-total-size))
6928 (not (pos-visible-in-window-p end))) 6982 (not (pos-visible-in-window-p end)))
6929 (resize-window window 1 nil window) 6983 (window-resize window 1 nil window)
6930 (setq desired-height (1+ desired-height))))) 6984 (setq desired-height (1+ desired-height)))))
6931 (error (setq delta nil))) 6985 (error (setq delta nil)))
6932 delta)))) 6986 delta))))
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index c8435eb562f..7e332a9fd5d 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,8 @@
12011-06-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * Makefile.in (ALL_CFLAGS): Add -I../lib for generated header files
4 in out-of-tree build.
5
12011-06-06 Paul Eggert <eggert@cs.ucla.edu> 62011-06-06 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * Makefile.in (ALL_CFLAGS): Add -I$(srcdir)/../lib. 8 * Makefile.in (ALL_CFLAGS): Add -I$(srcdir)/../lib.
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index fe6bbc31282..1193cee4110 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -56,7 +56,7 @@ ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
56 $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ 56 $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \
57 $(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \ 57 $(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \
58 -DHAVE_CONFIG_H -Demacs -I../src \ 58 -DHAVE_CONFIG_H -Demacs -I../src \
59 -I$(srcdir) -I$(srcdir)/../src -I$(srcdir)/../lib 59 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
60 60
61.c.o: 61.c.o:
62 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 62 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
diff --git a/src/ChangeLog b/src/ChangeLog
index e21412187c7..1e537f3872e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,67 @@
12011-06-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
4
52011-06-27 Juanma Barranquero <lekktu@gmail.com>
6
7 * makefile.w32-in: Redesign dependencies so they reflect more
8 clearly which files are directly included by each source file,
9 and not through other includes.
10
112011-06-27 Martin Rudalics <rudalics@gmx.at>
12
13 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14 (sort_overlays, overlay_strings): When an overlay's clone number
15 matches the window's clone number process the overlay even if
16 the overlay's window property doesn't match the current window.
17
18 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
19 (Fwindow_hchild): Rename to Fwindow_left_child.
20 (Fwindow_next): Rename to Fwindow_next_sibling.
21 (Fwindow_prev): Rename to Fwindow_prev_sibling.
22 (resize_window_check): Rename to window_resize_check.
23 (resize_window_apply): Rename to window_resize_apply.
24 (Fresize_window_apply): Rename to Fwindow_resize_apply.
25 (Fdelete_other_windows_internal, resize_frame_windows)
26 (Fsplit_window_internal, Fdelete_window_internal)
27 (grow_mini_window, shrink_mini_window)
28 (Fresize_mini_window_internal): Fix callers accordingly.
29
302011-06-26 Jan Djärv <jan.h.d@swipnet.se>
31
32 * emacsgtkfixed.h: State that this is only used with Gtk+3.
33 (emacs_fixed_set_min_size): Remove.
34 (emacs_fixed_new): Take frame as argument.
35
36 * emacsgtkfixed.c: State that this is only used with Gtk+3.
37 (_EmacsFixedPrivate): Remove minwidth/height.
38 Add struct frame *f.
39 (emacs_fixed_init): Initialize priv->f.
40 (get_parent_class, emacs_fixed_set_min_size): Remove.
41 (emacs_fixed_new): Set priv->f to argument.
42 (emacs_fixed_get_preferred_width)
43 (emacs_fixed_get_preferred_height): Use min_width/height from
44 frames size_hint to set minimum and natural (Bug#8919).
45 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
46 and use min_width/height from frames size_hint to set
47 min_width/height (Bug#8919).
48
49 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
50 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size. Fix
51 indentation.
52
532011-06-26 Eli Zaretskii <eliz@gnu.org>
54
55 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
56 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
57 called at ZV.
58
592011-06-26 Chong Yidong <cyd@stupidchicken.com>
60
61 * process.c (wait_reading_process_output): Bypass select if
62 waiting for a cell while ignoring keyboard input, and input is
63 pending. Suggested by Jan Djärv (Bug#8869).
64
12011-06-25 Paul Eggert <eggert@cs.ucla.edu> 652011-06-25 Paul Eggert <eggert@cs.ucla.edu>
2 66
3 Use gnulib's dup2 module instead of rolling our own. 67 Use gnulib's dup2 module instead of rolling our own.
@@ -351,7 +415,7 @@
351 415
3522011-06-22 Jim Meyering <meyering@redhat.com> 4162011-06-22 Jim Meyering <meyering@redhat.com>
353 417
354 don't leak an XBM-image-sized buffer 418 Don't leak an XBM-image-sized buffer
355 * image.c (xbm_load): Free the image buffer after using it. 419 * image.c (xbm_load): Free the image buffer after using it.
356 420
3572011-06-21 Paul Eggert <eggert@cs.ucla.edu> 4212011-06-21 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/src/bidi.c b/src/bidi.c
index 1f3b196d5a4..469afdb3819 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -744,8 +744,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
744 || type == LRE || type == LRO)); 744 || type == LRE || type == LRO));
745 type = bidi_get_type (ch, NEUTRAL_DIR)) 745 type = bidi_get_type (ch, NEUTRAL_DIR))
746 { 746 {
747 if (type == NEUTRAL_B && bidi_at_paragraph_end (pos, bytepos) >= -1)
748 break;
749 if (bytepos >= ZV_BYTE) 747 if (bytepos >= ZV_BYTE)
750 { 748 {
751 /* Pretend there's a paragraph separator at end of 749 /* Pretend there's a paragraph separator at end of
@@ -753,6 +751,8 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
753 type = NEUTRAL_B; 751 type = NEUTRAL_B;
754 break; 752 break;
755 } 753 }
754 if (type == NEUTRAL_B && bidi_at_paragraph_end (pos, bytepos) >= -1)
755 break;
756 /* Fetch next character and advance to get past it. */ 756 /* Fetch next character and advance to get past it. */
757 ch = bidi_fetch_char (bytepos, pos, &disp_pos, 757 ch = bidi_fetch_char (bytepos, pos, &disp_pos,
758 bidi_it->frame_window_p, &ch_len, &nchars); 758 bidi_it->frame_window_p, &ch_len, &nchars);
diff --git a/src/buffer.c b/src/buffer.c
index 006153b0424..328963be78c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -146,7 +146,7 @@ static Lisp_Object Qoverlayp;
146 146
147Lisp_Object Qpriority, Qbefore_string, Qafter_string; 147Lisp_Object Qpriority, Qbefore_string, Qafter_string;
148 148
149static Lisp_Object Qevaporate; 149static Lisp_Object Qclone_number, Qevaporate;
150 150
151Lisp_Object Qmodification_hooks; 151Lisp_Object Qmodification_hooks;
152Lisp_Object Qinsert_in_front_hooks; 152Lisp_Object Qinsert_in_front_hooks;
@@ -2900,10 +2900,13 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
2900 overlays that are limited to some other window. */ 2900 overlays that are limited to some other window. */
2901 if (w) 2901 if (w)
2902 { 2902 {
2903 Lisp_Object window; 2903 Lisp_Object window, clone_number;
2904 2904
2905 window = Foverlay_get (overlay, Qwindow); 2905 window = Foverlay_get (overlay, Qwindow);
2906 if (WINDOWP (window) && XWINDOW (window) != w) 2906 clone_number = Foverlay_get (overlay, Qclone_number);
2907 if (WINDOWP (window) && XWINDOW (window) != w
2908 && (! NUMBERP (clone_number)
2909 || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
2907 continue; 2910 continue;
2908 } 2911 }
2909 2912
@@ -3032,7 +3035,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str,
3032EMACS_INT 3035EMACS_INT
3033overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) 3036overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3034{ 3037{
3035 Lisp_Object overlay, window, str; 3038 Lisp_Object overlay, window, clone_number, str;
3036 struct Lisp_Overlay *ov; 3039 struct Lisp_Overlay *ov;
3037 EMACS_INT startpos, endpos; 3040 EMACS_INT startpos, endpos;
3038 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 3041 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
@@ -3051,8 +3054,12 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3051 if (endpos != pos && startpos != pos) 3054 if (endpos != pos && startpos != pos)
3052 continue; 3055 continue;
3053 window = Foverlay_get (overlay, Qwindow); 3056 window = Foverlay_get (overlay, Qwindow);
3054 if (WINDOWP (window) && XWINDOW (window) != w) 3057 clone_number = Foverlay_get (overlay, Qclone_number);
3058 if (WINDOWP (window) && XWINDOW (window) != w
3059 && (! NUMBERP (clone_number)
3060 || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
3055 continue; 3061 continue;
3062
3056 if (startpos == pos 3063 if (startpos == pos
3057 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str))) 3064 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
3058 record_overlay_string (&overlay_heads, str, 3065 record_overlay_string (&overlay_heads, str,
@@ -3079,7 +3086,10 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3079 if (endpos != pos && startpos != pos) 3086 if (endpos != pos && startpos != pos)
3080 continue; 3087 continue;
3081 window = Foverlay_get (overlay, Qwindow); 3088 window = Foverlay_get (overlay, Qwindow);
3082 if (WINDOWP (window) && XWINDOW (window) != w) 3089 clone_number = Foverlay_get (overlay, Qclone_number);
3090 if (WINDOWP (window) && XWINDOW (window) != w
3091 && (! NUMBERP (clone_number)
3092 || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
3083 continue; 3093 continue;
3084 if (startpos == pos 3094 if (startpos == pos
3085 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str))) 3095 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
@@ -5219,6 +5229,7 @@ syms_of_buffer (void)
5219 DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks"); 5229 DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks");
5220 DEFSYM (Qget_file_buffer, "get-file-buffer"); 5230 DEFSYM (Qget_file_buffer, "get-file-buffer");
5221 DEFSYM (Qpriority, "priority"); 5231 DEFSYM (Qpriority, "priority");
5232 DEFSYM (Qclone_number, "clone-number");
5222 DEFSYM (Qbefore_string, "before-string"); 5233 DEFSYM (Qbefore_string, "before-string");
5223 DEFSYM (Qafter_string, "after-string"); 5234 DEFSYM (Qafter_string, "after-string");
5224 DEFSYM (Qfirst_change_hook, "first-change-hook"); 5235 DEFSYM (Qfirst_change_hook, "first-change-hook");
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index fe3514bce93..0b57e2cdf36 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -1,4 +1,5 @@
1/* A Gtk Widget that inherits GtkFixed, but can be shrinked. 1/* A Gtk Widget that inherits GtkFixed, but can be shrinked.
2This file is only use when compiling with Gtk+ 3.
2 3
3Copyright (C) 2011 Free Software Foundation, Inc. 4Copyright (C) 2011 Free Software Foundation, Inc.
4 5
@@ -17,12 +18,19 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 20
20#include "emacsgtkfixed.h" 21#include <config.h>
21 22
23#include "emacsgtkfixed.h"
24#include <signal.h>
25#include <stdio.h>
26#include <setjmp.h>
27#include "lisp.h"
28#include "frame.h"
29#include "xterm.h"
22 30
23struct _EmacsFixedPrivate 31struct _EmacsFixedPrivate
24{ 32{
25 int minwidth, minheight; 33 struct frame *f;
26}; 34};
27 35
28 36
@@ -59,7 +67,7 @@ emacs_fixed_init (EmacsFixed *fixed)
59{ 67{
60 fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, EMACS_TYPE_FIXED, 68 fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, EMACS_TYPE_FIXED,
61 EmacsFixedPrivate); 69 EmacsFixedPrivate);
62 fixed->priv->minwidth = fixed->priv->minheight = 0; 70 fixed->priv->f = 0;
63} 71}
64 72
65/** 73/**
@@ -70,17 +78,12 @@ emacs_fixed_init (EmacsFixed *fixed)
70 * Returns: a new #EmacsFixed. 78 * Returns: a new #EmacsFixed.
71 */ 79 */
72GtkWidget* 80GtkWidget*
73emacs_fixed_new (void) 81emacs_fixed_new (struct frame *f)
74{
75 return g_object_new (EMACS_TYPE_FIXED, NULL);
76}
77
78static GtkWidgetClass *
79get_parent_class (EmacsFixed *fixed)
80{ 82{
81 EmacsFixedClass *klass = EMACS_FIXED_GET_CLASS (fixed); 83 EmacsFixed *fixed = g_object_new (EMACS_TYPE_FIXED, NULL);
82 GtkFixedClass *parent_class = g_type_class_peek_parent (klass); 84 EmacsFixedPrivate *priv = fixed->priv;
83 return (GtkWidgetClass*) parent_class; 85 priv->f = f;
86 return GTK_WIDGET (fixed);
84} 87}
85 88
86static void 89static void
@@ -90,9 +93,9 @@ emacs_fixed_get_preferred_width (GtkWidget *widget,
90{ 93{
91 EmacsFixed *fixed = EMACS_FIXED (widget); 94 EmacsFixed *fixed = EMACS_FIXED (widget);
92 EmacsFixedPrivate *priv = fixed->priv; 95 EmacsFixedPrivate *priv = fixed->priv;
93 GtkWidgetClass *widget_class = get_parent_class (fixed); 96 int w = priv->f->output_data.x->size_hints.min_width;
94 widget_class->get_preferred_width (widget, minimum, natural); 97 if (minimum) *minimum = w;
95 if (minimum) *minimum = priv->minwidth; 98 if (natural) *natural = w;
96} 99}
97 100
98static void 101static void
@@ -102,22 +105,62 @@ emacs_fixed_get_preferred_height (GtkWidget *widget,
102{ 105{
103 EmacsFixed *fixed = EMACS_FIXED (widget); 106 EmacsFixed *fixed = EMACS_FIXED (widget);
104 EmacsFixedPrivate *priv = fixed->priv; 107 EmacsFixedPrivate *priv = fixed->priv;
105 GtkWidgetClass *widget_class = get_parent_class (fixed); 108 int h = priv->f->output_data.x->size_hints.min_height;
106 widget_class->get_preferred_height (widget, minimum, natural); 109 if (minimum) *minimum = h;
107 if (minimum) *minimum = priv->minheight; 110 if (natural) *natural = h;
108} 111}
109 112
113
114/* Override the X function so we can intercept Gtk+ 3 calls.
115 Use our values for min_width/height so that KDE don't freak out
116 (Bug#8919), and so users can resize our frames as they wish. */
117
110void 118void
111emacs_fixed_set_min_size (EmacsFixed *widget, int width, int height) 119XSetWMSizeHints(Display* d,
120 Window w,
121 XSizeHints* hints,
122 Atom prop)
112{ 123{
113 EmacsFixedPrivate *priv = widget->priv; 124 struct x_display_info *dpyinfo = x_display_info_for_display (d);
114 GtkWidgetClass *widget_class = get_parent_class (widget); 125 struct frame *f = x_top_window_to_frame (dpyinfo, w);
115 int mw, nw, mh, nh; 126 long data[18];
116 127 data[0] = hints->flags;
117 widget_class->get_preferred_height (GTK_WIDGET (widget), &mh, &nh); 128 data[1] = hints->x;
118 widget_class->get_preferred_width (GTK_WIDGET (widget), &mw, &nw); 129 data[2] = hints->y;
130 data[3] = hints->width;
131 data[4] = hints->height;
132 data[5] = hints->min_width;
133 data[6] = hints->min_height;
134 data[7] = hints->max_width;
135 data[8] = hints->max_height;
136 data[9] = hints->width_inc;
137 data[10] = hints->height_inc;
138 data[11] = hints->min_aspect.x;
139 data[12] = hints->min_aspect.y;
140 data[13] = hints->max_aspect.x;
141 data[14] = hints->max_aspect.y;
142 data[15] = hints->base_width;
143 data[16] = hints->base_height;
144 data[17] = hints->win_gravity;
145
146 if ((hints->flags & PMinSize) && f)
147 {
148 int w = f->output_data.x->size_hints.min_width;
149 int h = f->output_data.x->size_hints.min_height;
150 data[5] = w;
151 data[6] = h;
152 }
153
154 XChangeProperty (d, w, prop, XA_WM_SIZE_HINTS, 32, PropModeReplace,
155 (unsigned char *) data, 18);
156}
119 157
120 /* Gtk complains if min size is less than natural size. */ 158/* Override this X11 function.
121 if (width <= nw) priv->minwidth = width; 159 This function is in the same X11 file as the one above. So we must
122 if (height <= nh) priv->minheight = height; 160 provide it also. */
161
162void
163XSetWMNormalHints (Display *d, Window w, XSizeHints *hints)
164{
165 XSetWMSizeHints (d, w, hints, XA_WM_NORMAL_HINTS);
123} 166}
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index 405374373ec..dbac136bd7f 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -1,4 +1,5 @@
1/* A Gtk Widget that inherits GtkFixed, but can be shrinked. 1/* A Gtk Widget that inherits GtkFixed, but can be shrinked.
2This file is only use when compiling with Gtk+ 3.
2 3
3Copyright (C) 2011 Free Software Foundation, Inc. 4Copyright (C) 2011 Free Software Foundation, Inc.
4 5
@@ -24,6 +25,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24 25
25G_BEGIN_DECLS 26G_BEGIN_DECLS
26 27
28struct frame;
29
27#define EMACS_TYPE_FIXED (emacs_fixed_get_type ()) 30#define EMACS_TYPE_FIXED (emacs_fixed_get_type ())
28#define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed)) 31#define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed))
29#define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass)) 32#define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass))
@@ -49,8 +52,7 @@ struct _EmacsFixedClass
49 GtkFixedClass parent_class; 52 GtkFixedClass parent_class;
50}; 53};
51 54
52extern GtkWidget *emacs_fixed_new (void); 55extern GtkWidget *emacs_fixed_new (struct frame *f);
53extern void emacs_fixed_set_min_size (EmacsFixed *widget, int width, int height);
54extern GType emacs_fixed_get_type (void); 56extern GType emacs_fixed_get_type (void);
55 57
56G_END_DECLS 58G_END_DECLS
diff --git a/src/gnutls.c b/src/gnutls.c
index b59d0b265f2..2a055ac40f0 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -51,7 +51,6 @@ static Lisp_Object Qgnutls_bootprop_callbacks;
51static Lisp_Object Qgnutls_bootprop_loglevel; 51static Lisp_Object Qgnutls_bootprop_loglevel;
52static Lisp_Object Qgnutls_bootprop_hostname; 52static Lisp_Object Qgnutls_bootprop_hostname;
53static Lisp_Object Qgnutls_bootprop_verify_flags; 53static Lisp_Object Qgnutls_bootprop_verify_flags;
54static Lisp_Object Qgnutls_bootprop_verify_error;
55static Lisp_Object Qgnutls_bootprop_verify_hostname_error; 54static Lisp_Object Qgnutls_bootprop_verify_hostname_error;
56 55
57/* Callback keys for `gnutls-boot'. Unused currently. */ 56/* Callback keys for `gnutls-boot'. Unused currently. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 7712966b0f4..48571bef275 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1090,7 +1090,7 @@ xg_create_frame_widgets (FRAME_PTR f)
1090 whbox = gtk_hbox_new (FALSE, 0); 1090 whbox = gtk_hbox_new (FALSE, 0);
1091 1091
1092#ifdef HAVE_GTK3 1092#ifdef HAVE_GTK3
1093 f->gwfixed = wfixed = emacs_fixed_new (); 1093 f->gwfixed = wfixed = emacs_fixed_new (f);
1094#else 1094#else
1095 f->gwfixed = wfixed = gtk_fixed_new (); 1095 f->gwfixed = wfixed = gtk_fixed_new ();
1096#endif 1096#endif
@@ -1290,18 +1290,6 @@ x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position)
1290 size_hints.min_width = base_width + min_cols * size_hints.width_inc; 1290 size_hints.min_width = base_width + min_cols * size_hints.width_inc;
1291 size_hints.min_height = base_height + min_rows * size_hints.height_inc; 1291 size_hints.min_height = base_height + min_rows * size_hints.height_inc;
1292 1292
1293#ifdef HAVE_GTK3
1294 /* Gtk3 ignores min width/height and overwrites them with its own idea
1295 of min width/height. Put out min values to the widget so Gtk
1296 gets the same value we want it to be. Without this, a user can't
1297 shrink an Emacs frame.
1298 */
1299 if (FRAME_GTK_WIDGET (f))
1300 emacs_fixed_set_min_size (EMACS_FIXED (FRAME_GTK_WIDGET (f)),
1301 size_hints.min_width,
1302 size_hints.min_height);
1303#endif
1304
1305 /* These currently have a one to one mapping with the X values, but I 1293 /* These currently have a one to one mapping with the X values, but I
1306 don't think we should rely on that. */ 1294 don't think we should rely on that. */
1307 hint_flags |= GDK_HINT_WIN_GRAVITY; 1295 hint_flags |= GDK_HINT_WIN_GRAVITY;
@@ -1340,7 +1328,7 @@ x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position)
1340 { 1328 {
1341 BLOCK_INPUT; 1329 BLOCK_INPUT;
1342 gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), 1330 gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
1343 NULL, &size_hints, hint_flags); 1331 NULL, &size_hints, hint_flags);
1344 f->output_data.x->size_hints = size_hints; 1332 f->output_data.x->size_hints = size_hints;
1345 f->output_data.x->hint_flags = hint_flags; 1333 f->output_data.x->hint_flags = hint_flags;
1346 UNBLOCK_INPUT; 1334 UNBLOCK_INPUT;
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 173fc673955..88b53554925 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -382,471 +382,452 @@ full-tags: TAGS TAGS-LISP ../nt/TAGS
382### DEPENDENCIES ### 382### DEPENDENCIES ###
383 383
384EMACS_ROOT = .. 384EMACS_ROOT = ..
385CONFIG_H = $(EMACS_ROOT)/src/s/ms-w32.h \ 385GNU_LIB = $(EMACS_ROOT)/lib
386 $(EMACS_ROOT)/src/m/intel386.h \ 386NT_INC = $(EMACS_ROOT)/nt/inc
387 $(EMACS_ROOT)/src/config.h \ 387
388 $(EMACS_ROOT)/nt/inc/sys/stat.h 388SYSTIME_H = $(SRC)/systime.h \
389LISP_H = $(SRC)/lisp.h \ 389 $(NT_INC)/sys/time.h
390 $(SRC)/globals.h \ 390ATIMER_H = $(SRC)/atimer.h \
391 $(EMACS_ROOT)/lib/intprops.h \ 391 $(SYSTIME_H)
392 $(EMACS_ROOT)/nt/inc/inttypes.h \ 392BLOCKINPUT_H = $(SRC)/blockinput.h \
393 $(EMACS_ROOT)/nt/inc/stdint.h 393 $(ATIMER_H)
394PROCESS_H = $(SRC)/process.h \ 394CAREADLINKAT_H = $(GNU_LIB)/careadlinkat.h \
395 $(EMACS_ROOT)/nt/inc/unistd.h \ 395 $(NT_INC)/unistd.h
396 $(SRC)/gnutls.h 396CHARACTER_H = $(SRC)/character.h \
397 $(GNU_LIB)/verify.h
398CHARSET_H = $(SRC)/charset.h \
399 $(GNU_LIB)/verify.h
400CODING_H = $(SRC)/coding.h \
401 $(SRC)/composite.h
402MS_W32_H = $(SRC)/s/ms-w32.h \
403 $(NT_INC)/sys/stat.h
404CONFIG_H = $(SRC)/config.h \
405 $(SRC)/m/intel386.h \
406 $(MS_W32_H)
407DIR_H = $(NT_INC)/sys/dir.h \
408 $(SRC)/ndir.h
409W32GUI_H = $(SRC)/w32gui.h \
410 $(SYSTIME_H)
411DISPEXTERN_H = $(SRC)/dispextern.h \
412 $(W32GUI_H)
413FILEMODE_H = $(GNU_LIB)/filemode.h \
414 $(NT_INC)/sys/stat.h
415FONT_H = $(SRC)/font.h \
416 $(SRC)/ccl.h
417FRAME_H = $(SRC)/frame.h \
418 $(DISPEXTERN_H)
419FTOASTR_H = $(GNU_LIB)/ftoastr.h \
420 $(GNU_LIB)/intprops.h
421GRP_H = $(NT_INC)/grp.h \
422 $(NT_INC)/pwd.h
423INTERVALS_H = $(SRC)/intervals.h \
424 $(SRC)/composite.h \
425 $(DISPEXTERN_H)
426INTTYPES_H = $(NT_INC)/inttypes.h \
427 $(NT_INC)/stdint.h
428KEYBOARD_H = $(SRC)/keyboard.h \
429 $(CODING_H) \
430 $(SYSTIME_H)
431LANGINFO_H = $(NT_INC)/langinfo.h \
432 $(NT_INC)/nl_types.h
433LISP_H = $(SRC)/lisp.h \
434 $(SRC)/globals.h \
435 $(GNU_LIB)/intprops.h \
436 $(INTTYPES_H)
437MD5_H = $(GNU_LIB)/md5.h \
438 $(NT_INC)/stdint.h
439MENU_H = $(SRC)/menu.h \
440 $(SYSTIME_H)
441PROCESS_H = $(SRC)/process.h \
442 $(SRC)/gnutls.h \
443 $(NT_INC)/unistd.h
444SHA1_H = $(GNU_LIB)/sha1.h \
445 $(NT_INC)/stdint.h
446SHA256_H = $(GNU_LIB)/sha256.h \
447 $(NT_INC)/stdint.h
448U64_H = $(GNU_LIB)/u64.h \
449 $(NT_INC)/stdint.h
450SHA512_H = $(GNU_LIB)/sha512.h \
451 $(U64_H)
452SOCKET_H = $(NT_INC)/sys/socket.h \
453 $(SRC)/w32.h
454SYSTTY_H = $(SRC)/systty.h \
455 $(NT_INC)/sys/ioctl.h \
456 $(NT_INC)/unistd.h
457TERMHOOKS_H = $(SRC)/termhooks.h \
458 $(SYSTIME_H)
459W32TERM_H = $(SRC)/w32term.h \
460 $(W32GUI_H)
461WINDOW_H = $(SRC)/window.h \
462 $(DISPEXTERN_H)
397 463
398$(BLD)/alloc.$(O) : \ 464$(BLD)/alloc.$(O) : \
399 $(SRC)/alloc.c \ 465 $(SRC)/alloc.c \
400 $(CONFIG_H) \
401 $(EMACS_ROOT)/nt/inc/unistd.h \
402 $(EMACS_ROOT)/nt/inc/sys/time.h \
403 $(LISP_H) \
404 $(PROCESS_H) \
405 $(SRC)/atimer.h \
406 $(SRC)/blockinput.h \
407 $(SRC)/buffer.h \ 466 $(SRC)/buffer.h \
408 $(SRC)/character.h \
409 $(SRC)/coding.h \
410 $(SRC)/composite.h \
411 $(SRC)/dispextern.h \
412 $(SRC)/frame.h \
413 $(SRC)/intervals.h \
414 $(SRC)/keyboard.h \
415 $(SRC)/puresize.h \ 467 $(SRC)/puresize.h \
416 $(SRC)/syssignal.h \ 468 $(SRC)/syssignal.h \
417 $(SRC)/systime.h \
418 $(SRC)/termhooks.h \
419 $(SRC)/w32.h \ 469 $(SRC)/w32.h \
420 $(SRC)/w32gui.h \ 470 $(NT_INC)/unistd.h \
421 $(SRC)/window.h 471 $(BLOCKINPUT_H) \
472 $(CHARACTER_H) \
473 $(CONFIG_H) \
474 $(FRAME_H) \
475 $(INTERVALS_H) \
476 $(KEYBOARD_H) \
477 $(LISP_H) \
478 $(PROCESS_H) \
479 $(TERMHOOKS_H) \
480 $(WINDOW_H)
422 481
423$(BLD)/atimer.$(O) : \ 482$(BLD)/atimer.$(O) : \
424 $(SRC)/atimer.c \ 483 $(SRC)/atimer.c \
484 $(SRC)/syssignal.h \
485 $(NT_INC)/sys/time.h \
486 $(NT_INC)/unistd.h \
487 $(ATIMER_H) \
488 $(BLOCKINPUT_H) \
425 $(CONFIG_H) \ 489 $(CONFIG_H) \
426 $(EMACS_ROOT)/nt/inc/unistd.h \
427 $(EMACS_ROOT)/nt/inc/sys/time.h \
428 $(LISP_H) \ 490 $(LISP_H) \
429 $(SRC)/atimer.h \ 491 $(SYSTIME_H)
430 $(SRC)/blockinput.h \
431 $(SRC)/syssignal.h \
432 $(SRC)/systime.h
433 492
434$(BLD)/bidi.$(O) : \ 493$(BLD)/bidi.$(O) : \
435 $(SRC)/bidi.c \ 494 $(SRC)/bidi.c \
436 $(CONFIG_H) \
437 $(EMACS_ROOT)/nt/inc/sys/time.h \
438 $(LISP_H) \
439 $(SRC)/bidimirror.h \ 495 $(SRC)/bidimirror.h \
440 $(SRC)/biditype.h \ 496 $(SRC)/biditype.h \
441 $(SRC)/buffer.h \ 497 $(SRC)/buffer.h \
442 $(SRC)/character.h \ 498 $(CHARACTER_H) \
443 $(SRC)/dispextern.h \ 499 $(CONFIG_H) \
444 $(SRC)/systime.h \ 500 $(DISPEXTERN_H) \
445 $(SRC)/w32gui.h 501 $(LISP_H)
446 502
447$(BLD)/buffer.$(O) : \ 503$(BLD)/buffer.$(O) : \
448 $(SRC)/buffer.c \ 504 $(SRC)/buffer.c \
449 $(CONFIG_H) \
450 $(EMACS_ROOT)/nt/inc/unistd.h \
451 $(EMACS_ROOT)/nt/inc/sys/param.h \
452 $(EMACS_ROOT)/nt/inc/sys/time.h \
453 $(LISP_H) \
454 $(SRC)/atimer.h \
455 $(SRC)/blockinput.h \
456 $(SRC)/buffer.h \ 505 $(SRC)/buffer.h \
457 $(SRC)/character.h \
458 $(SRC)/coding.h \
459 $(SRC)/commands.h \ 506 $(SRC)/commands.h \
460 $(SRC)/composite.h \
461 $(SRC)/dispextern.h \
462 $(SRC)/frame.h \
463 $(SRC)/indent.h \ 507 $(SRC)/indent.h \
464 $(SRC)/intervals.h \
465 $(SRC)/keyboard.h \
466 $(SRC)/keymap.h \ 508 $(SRC)/keymap.h \
467 $(SRC)/region-cache.h \ 509 $(SRC)/region-cache.h \
468 $(SRC)/systime.h \ 510 $(NT_INC)/sys/param.h \
469 $(SRC)/w32gui.h \ 511 $(NT_INC)/sys/stat.h \
470 $(SRC)/window.h 512 $(NT_INC)/unistd.h \
513 $(GNU_LIB)/verify.h \
514 $(BLOCKINPUT_H) \
515 $(CHARACTER_H) \
516 $(CONFIG_H) \
517 $(FRAME_H) \
518 $(INTERVALS_H) \
519 $(KEYBOARD_H) \
520 $(LISP_H) \
521 $(WINDOW_H)
471 522
472$(BLD)/bytecode.$(O) : \ 523$(BLD)/bytecode.$(O) : \
473 $(SRC)/bytecode.c \ 524 $(SRC)/bytecode.c \
474 $(CONFIG_H) \
475 $(EMACS_ROOT)/nt/inc/sys/time.h \
476 $(LISP_H) \
477 $(SRC)/buffer.h \ 525 $(SRC)/buffer.h \
478 $(SRC)/character.h \
479 $(SRC)/dispextern.h \
480 $(SRC)/syntax.h \ 526 $(SRC)/syntax.h \
481 $(SRC)/systime.h \ 527 $(CHARACTER_H) \
482 $(SRC)/w32gui.h \ 528 $(CONFIG_H) \
483 $(SRC)/window.h 529 $(LISP_H) \
530 $(WINDOW_H)
484 531
485$(BLD)/callint.$(O) : \ 532$(BLD)/callint.$(O) : \
486 $(SRC)/callint.c \ 533 $(SRC)/callint.c \
487 $(CONFIG_H) \
488 $(EMACS_ROOT)/nt/inc/sys/time.h \
489 $(LISP_H) \
490 $(SRC)/buffer.h \ 534 $(SRC)/buffer.h \
491 $(SRC)/character.h \
492 $(SRC)/coding.h \
493 $(SRC)/commands.h \ 535 $(SRC)/commands.h \
494 $(SRC)/composite.h \
495 $(SRC)/dispextern.h \
496 $(SRC)/keyboard.h \
497 $(SRC)/keymap.h \ 536 $(SRC)/keymap.h \
498 $(SRC)/systime.h \ 537 $(CHARACTER_H) \
499 $(SRC)/w32gui.h \ 538 $(CONFIG_H) \
500 $(SRC)/window.h 539 $(KEYBOARD_H) \
540 $(LISP_H) \
541 $(WINDOW_H)
501 542
502$(BLD)/callproc.$(O) : \ 543$(BLD)/callproc.$(O) : \
503 $(SRC)/callproc.c \ 544 $(SRC)/callproc.c \
504 $(CONFIG_H) \
505 $(EMACS_ROOT)/nt/inc/unistd.h \
506 $(EMACS_ROOT)/nt/inc/sys/file.h \
507 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
508 $(EMACS_ROOT)/nt/inc/sys/time.h \
509 $(LISP_H) \
510 $(PROCESS_H) \
511 $(SRC)/atimer.h \
512 $(SRC)/blockinput.h \
513 $(SRC)/buffer.h \ 545 $(SRC)/buffer.h \
514 $(SRC)/ccl.h \ 546 $(SRC)/ccl.h \
515 $(SRC)/character.h \
516 $(SRC)/coding.h \
517 $(SRC)/commands.h \ 547 $(SRC)/commands.h \
518 $(SRC)/composite.h \ 548 $(SRC)/composite.h \
519 $(SRC)/dispextern.h \
520 $(SRC)/epaths.h \ 549 $(SRC)/epaths.h \
521 $(SRC)/frame.h \
522 $(SRC)/syssignal.h \ 550 $(SRC)/syssignal.h \
523 $(SRC)/systime.h \
524 $(SRC)/systty.h \
525 $(SRC)/termhooks.h \
526 $(SRC)/w32.h \ 551 $(SRC)/w32.h \
527 $(SRC)/w32gui.h 552 $(NT_INC)/sys/file.h \
553 $(NT_INC)/unistd.h \
554 $(BLOCKINPUT_H) \
555 $(CHARACTER_H) \
556 $(CODING_H) \
557 $(CONFIG_H) \
558 $(FRAME_H) \
559 $(LISP_H) \
560 $(PROCESS_H) \
561 $(SYSTTY_H) \
562 $(TERMHOOKS_H)
528 563
529$(BLD)/casefiddle.$(O) : \ 564$(BLD)/casefiddle.$(O) : \
530 $(SRC)/casefiddle.c \ 565 $(SRC)/casefiddle.c \
531 $(CONFIG_H) \
532 $(LISP_H) \
533 $(SRC)/buffer.h \ 566 $(SRC)/buffer.h \
534 $(SRC)/character.h \
535 $(SRC)/commands.h \ 567 $(SRC)/commands.h \
536 $(SRC)/composite.h \ 568 $(SRC)/composite.h \
537 $(SRC)/keymap.h \ 569 $(SRC)/keymap.h \
538 $(SRC)/syntax.h 570 $(SRC)/syntax.h \
571 $(CHARACTER_H) \
572 $(CONFIG_H) \
573 $(LISP_H)
539 574
540$(BLD)/casetab.$(O) : \ 575$(BLD)/casetab.$(O) : \
541 $(SRC)/casetab.c \ 576 $(SRC)/casetab.c \
542 $(CONFIG_H) \
543 $(LISP_H) \
544 $(SRC)/buffer.h \ 577 $(SRC)/buffer.h \
545 $(SRC)/character.h 578 $(CHARACTER_H) \
579 $(CONFIG_H) \
580 $(LISP_H)
546 581
547$(BLD)/category.$(O) : \ 582$(BLD)/category.$(O) : \
548 $(SRC)/category.c \ 583 $(SRC)/category.c \
549 $(CONFIG_H) \
550 $(LISP_H) \
551 $(SRC)/buffer.h \ 584 $(SRC)/buffer.h \
552 $(SRC)/category.h \ 585 $(SRC)/category.h \
553 $(SRC)/character.h \ 586 $(SRC)/keymap.h \
554 $(SRC)/charset.h \ 587 $(CHARACTER_H) \
555 $(SRC)/keymap.h 588 $(CHARSET_H) \
589 $(CONFIG_H) \
590 $(LISP_H)
556 591
557$(BLD)/ccl.$(O) : \ 592$(BLD)/ccl.$(O) : \
558 $(SRC)/ccl.c \ 593 $(SRC)/ccl.c \
559 $(CONFIG_H) \
560 $(LISP_H) \
561 $(SRC)/ccl.h \ 594 $(SRC)/ccl.h \
562 $(SRC)/character.h \ 595 $(CHARACTER_H) \
563 $(SRC)/charset.h \ 596 $(CHARSET_H) \
564 $(SRC)/coding.h \ 597 $(CODING_H) \
565 $(SRC)/composite.h 598 $(CONFIG_H) \
599 $(LISP_H)
566 600
567$(BLD)/character.$(O) : \ 601$(BLD)/character.$(O) : \
568 $(SRC)/character.c \ 602 $(SRC)/character.c \
569 $(CONFIG_H) \
570 $(LISP_H) \
571 $(SRC)/buffer.h \ 603 $(SRC)/buffer.h \
572 $(SRC)/character.h \
573 $(SRC)/charset.h \
574 $(SRC)/composite.h \ 604 $(SRC)/composite.h \
575 $(SRC)/disptab.h 605 $(SRC)/disptab.h \
606 $(GNU_LIB)/intprops.h \
607 $(CHARACTER_H) \
608 $(CHARSET_H) \
609 $(CONFIG_H) \
610 $(LISP_H)
576 611
577$(BLD)/charset.$(O) : \ 612$(BLD)/charset.$(O) : \
578 $(SRC)/charset.c \ 613 $(SRC)/charset.c \
579 $(CONFIG_H) \
580 $(EMACS_ROOT)/nt/inc/unistd.h \
581 $(LISP_H) \
582 $(SRC)/buffer.h \ 614 $(SRC)/buffer.h \
583 $(SRC)/character.h \ 615 $(SRC)/disptab.h \
584 $(SRC)/charset.h \ 616 $(NT_INC)/unistd.h \
585 $(SRC)/coding.h \ 617 $(CHARACTER_H) \
586 $(SRC)/composite.h \ 618 $(CHARSET_H) \
587 $(SRC)/disptab.h 619 $(CODING_H) \
620 $(CONFIG_H) \
621 $(LISP_H)
588 622
589$(BLD)/chartab.$(O) : \ 623$(BLD)/chartab.$(O) : \
590 $(SRC)/chartab.c \ 624 $(SRC)/chartab.c \
591 $(CONFIG_H) \
592 $(LISP_H) \
593 $(SRC)/ccl.h \ 625 $(SRC)/ccl.h \
594 $(SRC)/character.h \ 626 $(CHARACTER_H) \
595 $(SRC)/charset.h 627 $(CHARSET_H) \
628 $(CONFIG_H) \
629 $(LISP_H)
596 630
597$(BLD)/cmds.$(O) : \ 631$(BLD)/cmds.$(O) : \
598 $(SRC)/cmds.c \ 632 $(SRC)/cmds.c \
599 $(CONFIG_H) \
600 $(EMACS_ROOT)/nt/inc/sys/time.h \
601 $(LISP_H) \
602 $(SRC)/buffer.h \ 633 $(SRC)/buffer.h \
603 $(SRC)/character.h \
604 $(SRC)/coding.h \
605 $(SRC)/commands.h \ 634 $(SRC)/commands.h \
606 $(SRC)/composite.h \
607 $(SRC)/dispextern.h \
608 $(SRC)/frame.h \
609 $(SRC)/keyboard.h \
610 $(SRC)/keymap.h \ 635 $(SRC)/keymap.h \
611 $(SRC)/syntax.h \ 636 $(SRC)/syntax.h \
612 $(SRC)/systime.h \ 637 $(CHARACTER_H) \
613 $(SRC)/w32gui.h \ 638 $(CONFIG_H) \
614 $(SRC)/window.h 639 $(DISPEXTERN_H) \
640 $(FRAME_H) \
641 $(KEYBOARD_H) \
642 $(LISP_H) \
643 $(WINDOW_H)
615 644
616$(BLD)/coding.$(O) : \ 645$(BLD)/coding.$(O) : \
617 $(SRC)/coding.c \ 646 $(SRC)/coding.c \
618 $(CONFIG_H) \
619 $(EMACS_ROOT)/nt/inc/sys/time.h \
620 $(LISP_H) \
621 $(SRC)/buffer.h \ 647 $(SRC)/buffer.h \
622 $(SRC)/ccl.h \ 648 $(SRC)/ccl.h \
623 $(SRC)/character.h \
624 $(SRC)/charset.h \
625 $(SRC)/coding.h \
626 $(SRC)/composite.h \ 649 $(SRC)/composite.h \
627 $(SRC)/dispextern.h \ 650 $(CHARACTER_H) \
628 $(SRC)/frame.h \ 651 $(CHARSET_H) \
629 $(SRC)/systime.h \ 652 $(CODING_H) \
630 $(SRC)/termhooks.h \ 653 $(CONFIG_H) \
631 $(SRC)/w32gui.h \ 654 $(FRAME_H) \
632 $(SRC)/window.h 655 $(LISP_H) \
656 $(TERMHOOKS_H) \
657 $(WINDOW_H)
633 658
634$(BLD)/composite.$(O) : \ 659$(BLD)/composite.$(O) : \
635 $(SRC)/composite.c \ 660 $(SRC)/composite.c \
661 $(SRC)/buffer.h \
662 $(CHARACTER_H) \
663 $(CODING_H) \
636 $(CONFIG_H) \ 664 $(CONFIG_H) \
637 $(EMACS_ROOT)/nt/inc/sys/time.h \ 665 $(DISPEXTERN_H) \
666 $(FONT_H) \
667 $(FRAME_H) \
668 $(INTERVALS_H) \
638 $(LISP_H) \ 669 $(LISP_H) \
639 $(SRC)/buffer.h \ 670 $(TERMHOOKS_H) \
640 $(SRC)/ccl.h \ 671 $(WINDOW_H)
641 $(SRC)/character.h \
642 $(SRC)/coding.h \
643 $(SRC)/composite.h \
644 $(SRC)/dispextern.h \
645 $(SRC)/font.h \
646 $(SRC)/frame.h \
647 $(SRC)/intervals.h \
648 $(SRC)/systime.h \
649 $(SRC)/termhooks.h \
650 $(SRC)/w32gui.h \
651 $(SRC)/window.h
652 672
653$(BLD)/data.$(O) : \ 673$(BLD)/data.$(O) : \
654 $(SRC)/data.c \ 674 $(SRC)/data.c \
655 $(CONFIG_H) \
656 $(EMACS_ROOT)/nt/inc/sys/time.h \
657 $(LISP_H) \
658 $(SRC)/buffer.h \ 675 $(SRC)/buffer.h \
659 $(SRC)/ccl.h \
660 $(SRC)/character.h \
661 $(SRC)/coding.h \
662 $(SRC)/composite.h \
663 $(SRC)/dispextern.h \
664 $(SRC)/font.h \
665 $(SRC)/frame.h \
666 $(SRC)/keyboard.h \
667 $(SRC)/puresize.h \ 676 $(SRC)/puresize.h \
668 $(SRC)/syssignal.h \ 677 $(SRC)/syssignal.h \
669 $(SRC)/systime.h \ 678 $(GNU_LIB)/intprops.h \
670 $(SRC)/termhooks.h \ 679 $(CHARACTER_H) \
671 $(SRC)/w32gui.h 680 $(CONFIG_H) \
681 $(FONT_H) \
682 $(FRAME_H) \
683 $(KEYBOARD_H) \
684 $(LISP_H) \
685 $(TERMHOOKS_H)
672 686
673$(BLD)/dired.$(O) : \ 687$(BLD)/dired.$(O) : \
674 $(SRC)/dired.c \ 688 $(SRC)/dired.c \
675 $(CONFIG_H) \
676 $(EMACS_ROOT)/nt/inc/grp.h \
677 $(EMACS_ROOT)/nt/inc/pwd.h \
678 $(EMACS_ROOT)/nt/inc/unistd.h \
679 $(EMACS_ROOT)/nt/inc/sys/dir.h \
680 $(EMACS_ROOT)/nt/inc/sys/time.h \
681 $(EMACS_ROOT)/lib/filemode.h \
682 $(LISP_H) \
683 $(SRC)/atimer.h \
684 $(SRC)/blockinput.h \
685 $(SRC)/buffer.h \ 689 $(SRC)/buffer.h \
686 $(SRC)/character.h \
687 $(SRC)/charset.h \
688 $(SRC)/coding.h \
689 $(SRC)/commands.h \ 690 $(SRC)/commands.h \
690 $(SRC)/composite.h \
691 $(SRC)/ndir.h \
692 $(SRC)/regex.h \ 691 $(SRC)/regex.h \
693 $(SRC)/systime.h 692 $(NT_INC)/pwd.h \
693 $(NT_INC)/sys/stat.h \
694 $(NT_INC)/unistd.h \
695 $(BLOCKINPUT_H) \
696 $(CHARACTER_H) \
697 $(CHARSET_H) \
698 $(CODING_H) \
699 $(CONFIG_H) \
700 $(DIR_H) \
701 $(FILEMODE_H) \
702 $(GRP_H) \
703 $(LISP_H) \
704 $(SYSTIME_H)
694 705
695$(BLD)/dispnew.$(O) : \ 706$(BLD)/dispnew.$(O) : \
696 $(SRC)/dispnew.c \ 707 $(SRC)/dispnew.c \
697 $(CONFIG_H) \
698 $(EMACS_ROOT)/nt/inc/unistd.h \
699 $(EMACS_ROOT)/nt/inc/sys/time.h \
700 $(LISP_H) \
701 $(PROCESS_H) \
702 $(SRC)/atimer.h \
703 $(SRC)/blockinput.h \
704 $(SRC)/buffer.h \ 708 $(SRC)/buffer.h \
705 $(SRC)/character.h \
706 $(SRC)/cm.h \ 709 $(SRC)/cm.h \
707 $(SRC)/coding.h \
708 $(SRC)/commands.h \ 710 $(SRC)/commands.h \
709 $(SRC)/composite.h \
710 $(SRC)/dispextern.h \
711 $(SRC)/disptab.h \ 711 $(SRC)/disptab.h \
712 $(SRC)/frame.h \
713 $(SRC)/indent.h \ 712 $(SRC)/indent.h \
714 $(SRC)/intervals.h \
715 $(SRC)/keyboard.h \
716 $(SRC)/syssignal.h \ 713 $(SRC)/syssignal.h \
717 $(SRC)/systime.h \
718 $(SRC)/termchar.h \ 714 $(SRC)/termchar.h \
719 $(SRC)/termhooks.h \
720 $(SRC)/termopts.h \ 715 $(SRC)/termopts.h \
721 $(SRC)/w32gui.h \ 716 $(NT_INC)/unistd.h \
722 $(SRC)/w32term.h \ 717 $(BLOCKINPUT_H) \
723 $(SRC)/window.h 718 $(CHARACTER_H) \
719 $(CONFIG_H) \
720 $(DISPEXTERN_H) \
721 $(FRAME_H) \
722 $(INTERVALS_H) \
723 $(KEYBOARD_H) \
724 $(LISP_H) \
725 $(PROCESS_H) \
726 $(SYSTIME_H) \
727 $(TERMHOOKS_H) \
728 $(W32TERM_H) \
729 $(WINDOW_H)
724 730
725$(BLD)/doc.$(O) : \ 731$(BLD)/doc.$(O) : \
726 $(SRC)/doc.c \ 732 $(SRC)/doc.c \
727 $(CONFIG_H) \
728 buildobj.h \
729 $(EMACS_ROOT)/nt/inc/unistd.h \
730 $(EMACS_ROOT)/nt/inc/sys/file.h \
731 $(EMACS_ROOT)/nt/inc/sys/time.h \
732 $(LISP_H) \
733 $(SRC)/buffer.h \ 733 $(SRC)/buffer.h \
734 $(SRC)/character.h \ 734 $(SRC)/buildobj.h \
735 $(SRC)/coding.h \
736 $(SRC)/composite.h \
737 $(SRC)/keyboard.h \
738 $(SRC)/keymap.h \ 735 $(SRC)/keymap.h \
739 $(SRC)/systime.h 736 $(NT_INC)/sys/file.h \
737 $(NT_INC)/unistd.h \
738 $(CHARACTER_H) \
739 $(CONFIG_H) \
740 $(KEYBOARD_H) \
741 $(LISP_H)
740 742
741$(BLD)/doprnt.$(O) : \ 743$(BLD)/doprnt.$(O) : \
742 $(SRC)/doprnt.c \ 744 $(SRC)/doprnt.c \
745 $(NT_INC)/unistd.h \
746 $(CHARACTER_H) \
743 $(CONFIG_H) \ 747 $(CONFIG_H) \
744 $(EMACS_ROOT)/nt/inc/unistd.h \ 748 $(LISP_H)
745 $(LISP_H) \
746 $(SRC)/character.h
747 749
748$(BLD)/editfns.$(O) : \ 750$(BLD)/editfns.$(O) : \
749 $(SRC)/editfns.c \ 751 $(SRC)/editfns.c \
752 $(SRC)/buffer.h \
753 $(NT_INC)/pwd.h \
754 $(NT_INC)/unistd.h \
755 $(GNU_LIB)/intprops.h \
756 $(GNU_LIB)/strftime.h \
757 $(GNU_LIB)/verify.h \
758 $(BLOCKINPUT_H) \
759 $(CHARACTER_H) \
760 $(CODING_H) \
750 $(CONFIG_H) \ 761 $(CONFIG_H) \
751 $(EMACS_ROOT)/nt/inc/pwd.h \ 762 $(FRAME_H) \
752 $(EMACS_ROOT)/nt/inc/unistd.h \ 763 $(INTERVALS_H) \
753 $(EMACS_ROOT)/nt/inc/sys/time.h \
754 $(EMACS_ROOT)/lib/strftime.h \
755 $(EMACS_ROOT)/lib/verify.h \
756 $(LISP_H) \ 764 $(LISP_H) \
757 $(SRC)/atimer.h \ 765 $(SYSTIME_H) \
758 $(SRC)/blockinput.h \ 766 $(WINDOW_H)
759 $(SRC)/buffer.h \
760 $(SRC)/character.h \
761 $(SRC)/coding.h \
762 $(SRC)/composite.h \
763 $(SRC)/dispextern.h \
764 $(SRC)/frame.h \
765 $(SRC)/intervals.h \
766 $(SRC)/systime.h \
767 $(SRC)/w32gui.h \
768 $(SRC)/window.h
769 767
770$(BLD)/emacs.$(O) : \ 768$(BLD)/emacs.$(O) : \
771 $(SRC)/emacs.c \ 769 $(SRC)/emacs.c \
772 $(CONFIG_H) \
773 $(EMACS_ROOT)/nt/inc/unistd.h \
774 $(EMACS_ROOT)/nt/inc/sys/file.h \
775 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
776 $(EMACS_ROOT)/nt/inc/sys/time.h \
777 $(LISP_H) \
778 $(PROCESS_H) \
779 $(SRC)/atimer.h \
780 $(SRC)/blockinput.h \
781 $(SRC)/buffer.h \ 770 $(SRC)/buffer.h \
782 $(SRC)/coding.h \
783 $(SRC)/commands.h \ 771 $(SRC)/commands.h \
784 $(SRC)/composite.h \ 772 $(SRC)/gnutls.h \
785 $(SRC)/dispextern.h \
786 $(SRC)/frame.h \
787 $(SRC)/intervals.h \
788 $(SRC)/keyboard.h \
789 $(SRC)/keymap.h \ 773 $(SRC)/keymap.h \
790 $(SRC)/syssignal.h \ 774 $(SRC)/syssignal.h \
791 $(SRC)/systime.h \
792 $(SRC)/systty.h \
793 $(SRC)/termhooks.h \
794 $(SRC)/unexec.h \ 775 $(SRC)/unexec.h \
795 $(SRC)/w32.h \ 776 $(SRC)/w32.h \
796 $(SRC)/w32gui.h \
797 $(SRC)/w32heap.h \ 777 $(SRC)/w32heap.h \
798 $(SRC)/window.h 778 $(NT_INC)/sys/file.h \
779 $(NT_INC)/unistd.h \
780 $(BLOCKINPUT_H) \
781 $(CONFIG_H) \
782 $(FRAME_H) \
783 $(INTERVALS_H) \
784 $(KEYBOARD_H) \
785 $(LISP_H) \
786 $(PROCESS_H) \
787 $(SYSTTY_H) \
788 $(TERMHOOKS_H) \
789 $(WINDOW_H)
799 790
800$(BLD)/eval.$(O) : \ 791$(BLD)/eval.$(O) : \
801 $(SRC)/eval.c \ 792 $(SRC)/eval.c \
802 $(CONFIG_H) \
803 $(EMACS_ROOT)/nt/inc/sys/time.h \
804 $(LISP_H) \
805 $(SRC)/atimer.h \
806 $(SRC)/blockinput.h \
807 $(SRC)/coding.h \
808 $(SRC)/commands.h \ 793 $(SRC)/commands.h \
809 $(SRC)/composite.h \ 794 $(BLOCKINPUT_H) \
810 $(SRC)/dispextern.h \ 795 $(CONFIG_H) \
811 $(SRC)/frame.h \ 796 $(DISPEXTERN_H) \
812 $(SRC)/keyboard.h \ 797 $(FRAME_H) \
813 $(SRC)/systime.h \ 798 $(KEYBOARD_H) \
814 $(SRC)/w32gui.h 799 $(LISP_H)
815 800
816$(BLD)/fileio.$(O) : \ 801$(BLD)/fileio.$(O) : \
817 $(SRC)/fileio.c \ 802 $(SRC)/fileio.c \
818 $(CONFIG_H) \
819 $(EMACS_ROOT)/nt/inc/pwd.h \
820 $(EMACS_ROOT)/nt/inc/unistd.h \
821 $(EMACS_ROOT)/nt/inc/sys/time.h \
822 $(LISP_H) \
823 $(SRC)/atimer.h \
824 $(SRC)/blockinput.h \
825 $(SRC)/buffer.h \ 803 $(SRC)/buffer.h \
826 $(SRC)/character.h \
827 $(SRC)/coding.h \
828 $(SRC)/commands.h \ 804 $(SRC)/commands.h \
829 $(SRC)/composite.h \ 805 $(NT_INC)/pwd.h \
830 $(SRC)/dispextern.h \ 806 $(NT_INC)/sys/stat.h \
831 $(SRC)/frame.h \ 807 $(NT_INC)/unistd.h \
832 $(SRC)/intervals.h \ 808 $(BLOCKINPUT_H) \
833 $(SRC)/systime.h \ 809 $(CHARACTER_H) \
834 $(SRC)/w32gui.h \ 810 $(CODING_H) \
835 $(SRC)/window.h 811 $(CONFIG_H) \
812 $(DISPEXTERN_H) \
813 $(FRAME_H) \
814 $(INTERVALS_H) \
815 $(LISP_H) \
816 $(SYSTIME_H) \
817 $(WINDOW_H)
836 818
837$(BLD)/filelock.$(O) : \ 819$(BLD)/filelock.$(O) : \
838 $(SRC)/filelock.c \ 820 $(SRC)/filelock.c \
821 $(SRC)/buffer.h \
822 $(NT_INC)/pwd.h \
823 $(NT_INC)/sys/file.h \
824 $(NT_INC)/sys/stat.h \
825 $(NT_INC)/unistd.h \
826 $(CHARACTER_H) \
827 $(CODING_H) \
839 $(CONFIG_H) \ 828 $(CONFIG_H) \
840 $(EMACS_ROOT)/nt/inc/pwd.h \
841 $(EMACS_ROOT)/nt/inc/unistd.h \
842 $(EMACS_ROOT)/nt/inc/sys/file.h \
843 $(EMACS_ROOT)/nt/inc/sys/time.h \
844 $(LISP_H) \ 829 $(LISP_H) \
845 $(SRC)/buffer.h \ 830 $(SYSTIME_H)
846 $(SRC)/character.h \
847 $(SRC)/coding.h \
848 $(SRC)/composite.h \
849 $(SRC)/systime.h
850 831
851$(BLD)/firstfile.$(O) : \ 832$(BLD)/firstfile.$(O) : \
852 $(SRC)/firstfile.c \ 833 $(SRC)/firstfile.c \
@@ -854,271 +835,213 @@ $(BLD)/firstfile.$(O) : \
854 835
855$(BLD)/floatfns.$(O) : \ 836$(BLD)/floatfns.$(O) : \
856 $(SRC)/floatfns.c \ 837 $(SRC)/floatfns.c \
838 $(SRC)/syssignal.h \
857 $(CONFIG_H) \ 839 $(CONFIG_H) \
858 $(LISP_H) \ 840 $(LISP_H)
859 $(SRC)/syssignal.h
860 841
861$(BLD)/fns.$(O) : \ 842$(BLD)/fns.$(O) : \
862 $(SRC)/fns.c \ 843 $(SRC)/fns.c \
863 $(CONFIG_H) \
864 $(EMACS_ROOT)/nt/inc/langinfo.h \
865 $(EMACS_ROOT)/nt/inc/nl_types.h \
866 $(EMACS_ROOT)/nt/inc/unistd.h \
867 $(EMACS_ROOT)/nt/inc/sys/time.h \
868 $(EMACS_ROOT)/lib/md5.h \
869 $(EMACS_ROOT)/lib/sha1.h \
870 $(EMACS_ROOT)/lib/sha256.h \
871 $(EMACS_ROOT)/lib/sha512.h \
872 $(LISP_H) \
873 $(SRC)/atimer.h \
874 $(SRC)/blockinput.h \
875 $(SRC)/buffer.h \ 844 $(SRC)/buffer.h \
876 $(SRC)/character.h \
877 $(SRC)/coding.h \
878 $(SRC)/commands.h \ 845 $(SRC)/commands.h \
879 $(SRC)/composite.h \
880 $(SRC)/dispextern.h \
881 $(SRC)/frame.h \
882 $(SRC)/intervals.h \
883 $(SRC)/keyboard.h \
884 $(SRC)/keymap.h \ 846 $(SRC)/keymap.h \
885 $(SRC)/systime.h \ 847 $(NT_INC)/unistd.h \
886 $(SRC)/w32gui.h \ 848 $(GNU_LIB)/intprops.h \
887 $(SRC)/window.h 849 $(BLOCKINPUT_H) \
850 $(CHARACTER_H) \
851 $(CODING_H) \
852 $(CONFIG_H) \
853 $(FRAME_H) \
854 $(INTERVALS_H) \
855 $(KEYBOARD_H) \
856 $(LANGINFO_H) \
857 $(LISP_H) \
858 $(MD5_H) \
859 $(SHA1_H) \
860 $(SHA256_H) \
861 $(SHA512_H) \
862 $(WINDOW_H)
888 863
889$(BLD)/font.$(O) : \ 864$(BLD)/font.$(O) : \
890 $(SRC)/font.c \ 865 $(SRC)/font.c \
891 $(CONFIG_H) \
892 $(EMACS_ROOT)/nt/inc/sys/time.h \
893 $(LISP_H) \
894 $(SRC)/buffer.h \ 866 $(SRC)/buffer.h \
895 $(SRC)/ccl.h \
896 $(SRC)/character.h \
897 $(SRC)/charset.h \
898 $(SRC)/composite.h \ 867 $(SRC)/composite.h \
899 $(SRC)/dispextern.h \
900 $(SRC)/font.h \
901 $(SRC)/fontset.h \ 868 $(SRC)/fontset.h \
902 $(SRC)/frame.h \ 869 $(CHARACTER_H) \
903 $(SRC)/systime.h \ 870 $(CHARSET_H) \
904 $(SRC)/w32gui.h \ 871 $(CONFIG_H) \
905 $(SRC)/w32term.h \ 872 $(DISPEXTERN_H) \
906 $(SRC)/window.h 873 $(FONT_H) \
874 $(FRAME_H) \
875 $(LISP_H) \
876 $(W32TERM_H) \
877 $(WINDOW_H)
907 878
908$(BLD)/fontset.$(O) : \ 879$(BLD)/fontset.$(O) : \
909 $(SRC)/fontset.c \ 880 $(SRC)/fontset.c \
910 $(CONFIG_H) \
911 $(EMACS_ROOT)/nt/inc/sys/time.h \
912 $(LISP_H) \
913 $(SRC)/atimer.h \
914 $(SRC)/blockinput.h \
915 $(SRC)/buffer.h \ 881 $(SRC)/buffer.h \
916 $(SRC)/ccl.h \ 882 $(SRC)/ccl.h \
917 $(SRC)/character.h \
918 $(SRC)/charset.h \
919 $(SRC)/coding.h \
920 $(SRC)/composite.h \
921 $(SRC)/dispextern.h \
922 $(SRC)/font.h \
923 $(SRC)/fontset.h \ 883 $(SRC)/fontset.h \
924 $(SRC)/frame.h \ 884 $(BLOCKINPUT_H) \
925 $(SRC)/intervals.h \ 885 $(CHARACTER_H) \
926 $(SRC)/keyboard.h \ 886 $(CHARSET_H) \
927 $(SRC)/systime.h \ 887 $(CONFIG_H) \
928 $(SRC)/termhooks.h \ 888 $(DISPEXTERN_H) \
929 $(SRC)/w32gui.h \ 889 $(FONT_H) \
930 $(SRC)/w32term.h \ 890 $(FRAME_H) \
931 $(SRC)/window.h 891 $(INTERVALS_H) \
892 $(KEYBOARD_H) \
893 $(LISP_H) \
894 $(TERMHOOKS_H) \
895 $(W32TERM_H) \
896 $(WINDOW_H)
932 897
933$(BLD)/frame.$(O) : \ 898$(BLD)/frame.$(O) : \
934 $(SRC)/frame.c \ 899 $(SRC)/frame.c \
935 $(CONFIG_H) \
936 $(EMACS_ROOT)/nt/inc/sys/time.h \
937 $(LISP_H) \
938 $(SRC)/atimer.h \
939 $(SRC)/blockinput.h \
940 $(SRC)/buffer.h \ 900 $(SRC)/buffer.h \
941 $(SRC)/ccl.h \
942 $(SRC)/character.h \
943 $(SRC)/coding.h \
944 $(SRC)/commands.h \ 901 $(SRC)/commands.h \
945 $(SRC)/composite.h \
946 $(SRC)/dispextern.h \
947 $(SRC)/font.h \
948 $(SRC)/fontset.h \ 902 $(SRC)/fontset.h \
949 $(SRC)/frame.h \
950 $(SRC)/keyboard.h \
951 $(SRC)/systime.h \
952 $(SRC)/termchar.h \ 903 $(SRC)/termchar.h \
953 $(SRC)/termhooks.h \ 904 $(BLOCKINPUT_H) \
954 $(SRC)/w32gui.h \ 905 $(CHARACTER_H) \
955 $(SRC)/w32term.h \ 906 $(CONFIG_H) \
956 $(SRC)/window.h 907 $(DISPEXTERN_H) \
908 $(FONT_H) \
909 $(FRAME_H) \
910 $(KEYBOARD_H) \
911 $(LISP_H) \
912 $(TERMHOOKS_H) \
913 $(W32TERM_H) \
914 $(WINDOW_H)
957 915
958$(BLD)/fringe.$(O) : \ 916$(BLD)/fringe.$(O) : \
959 $(SRC)/fringe.c \ 917 $(SRC)/fringe.c \
918 $(SRC)/buffer.h \
919 $(BLOCKINPUT_H) \
960 $(CONFIG_H) \ 920 $(CONFIG_H) \
961 $(EMACS_ROOT)/nt/inc/sys/time.h \ 921 $(DISPEXTERN_H) \
922 $(FRAME_H) \
962 $(LISP_H) \ 923 $(LISP_H) \
963 $(SRC)/atimer.h \ 924 $(TERMHOOKS_H) \
964 $(SRC)/blockinput.h \ 925 $(WINDOW_H)
965 $(SRC)/buffer.h \
966 $(SRC)/dispextern.h \
967 $(SRC)/frame.h \
968 $(SRC)/systime.h \
969 $(SRC)/termhooks.h \
970 $(SRC)/w32gui.h \
971 $(SRC)/window.h
972 926
973$(BLD)/gmalloc.$(O) : \ 927$(BLD)/gmalloc.$(O) : \
974 $(SRC)/gmalloc.c \ 928 $(SRC)/gmalloc.c \
975 $(CONFIG_H) \ 929 $(SRC)/getpagesize.h \
976 $(EMACS_ROOT)/nt/inc/unistd.h \ 930 $(NT_INC)/unistd.h \
977 $(SRC)/getpagesize.h 931 $(CONFIG_H)
978 932
979$(BLD)/gnutls.$(O) : \ 933$(BLD)/gnutls.$(O) : \
980 $(SRC)/gnutls.c \ 934 $(SRC)/gnutls.c \
935 $(SRC)/w32.h \
981 $(CONFIG_H) \ 936 $(CONFIG_H) \
982 $(EMACS_ROOT)/nt/inc/unistd.h \
983 $(LISP_H) \ 937 $(LISP_H) \
984 $(PROCESS_H) \ 938 $(PROCESS_H)
985 $(SRC)/w32.h
986 939
987$(BLD)/image.$(O) : \ 940$(BLD)/image.$(O) : \
988 $(SRC)/image.c \ 941 $(SRC)/image.c \
989 $(CONFIG_H) \
990 $(EMACS_ROOT)/nt/inc/unistd.h \
991 $(EMACS_ROOT)/nt/inc/sys/time.h \
992 $(LISP_H) \
993 $(SRC)/atimer.h \
994 $(SRC)/blockinput.h \
995 $(SRC)/ccl.h \
996 $(SRC)/character.h \
997 $(SRC)/coding.h \
998 $(SRC)/composite.h \
999 $(SRC)/dispextern.h \
1000 $(SRC)/epaths.h \ 942 $(SRC)/epaths.h \
1001 $(SRC)/font.h \
1002 $(SRC)/frame.h \
1003 $(SRC)/systime.h \
1004 $(SRC)/termhooks.h \
1005 $(SRC)/w32.h \ 943 $(SRC)/w32.h \
1006 $(SRC)/w32gui.h \ 944 $(NT_INC)/unistd.h \
1007 $(SRC)/w32term.h \ 945 $(BLOCKINPUT_H) \
1008 $(SRC)/window.h 946 $(CHARACTER_H) \
947 $(CODING_H) \
948 $(CONFIG_H) \
949 $(DISPEXTERN_H) \
950 $(FONT_H) \
951 $(FRAME_H) \
952 $(LISP_H) \
953 $(SYSTIME_H) \
954 $(TERMHOOKS_H) \
955 $(W32TERM_H) \
956 $(WINDOW_H)
1009 957
1010$(BLD)/indent.$(O) : \ 958$(BLD)/indent.$(O) : \
1011 $(SRC)/indent.c \ 959 $(SRC)/indent.c \
1012 $(CONFIG_H) \
1013 $(EMACS_ROOT)/nt/inc/sys/time.h \
1014 $(LISP_H) \
1015 $(SRC)/buffer.h \ 960 $(SRC)/buffer.h \
1016 $(SRC)/category.h \ 961 $(SRC)/category.h \
1017 $(SRC)/character.h \
1018 $(SRC)/coding.h \
1019 $(SRC)/composite.h \ 962 $(SRC)/composite.h \
1020 $(SRC)/dispextern.h \
1021 $(SRC)/disptab.h \ 963 $(SRC)/disptab.h \
1022 $(SRC)/frame.h \
1023 $(SRC)/indent.h \ 964 $(SRC)/indent.h \
1024 $(SRC)/intervals.h \
1025 $(SRC)/keyboard.h \
1026 $(SRC)/region-cache.h \ 965 $(SRC)/region-cache.h \
1027 $(SRC)/systime.h \
1028 $(SRC)/termchar.h \ 966 $(SRC)/termchar.h \
1029 $(SRC)/termopts.h \ 967 $(SRC)/termopts.h \
1030 $(SRC)/w32gui.h \ 968 $(CHARACTER_H) \
1031 $(SRC)/window.h 969 $(CONFIG_H) \
970 $(DISPEXTERN_H) \
971 $(FRAME_H) \
972 $(INTERVALS_H) \
973 $(KEYBOARD_H) \
974 $(LISP_H) \
975 $(WINDOW_H)
1032 976
1033$(BLD)/insdel.$(O) : \ 977$(BLD)/insdel.$(O) : \
1034 $(SRC)/insdel.c \ 978 $(SRC)/insdel.c \
1035 $(CONFIG_H) \
1036 $(EMACS_ROOT)/nt/inc/sys/time.h \
1037 $(LISP_H) \
1038 $(SRC)/atimer.h \
1039 $(SRC)/blockinput.h \
1040 $(SRC)/buffer.h \ 979 $(SRC)/buffer.h \
1041 $(SRC)/character.h \
1042 $(SRC)/composite.h \
1043 $(SRC)/dispextern.h \
1044 $(SRC)/intervals.h \
1045 $(SRC)/region-cache.h \ 980 $(SRC)/region-cache.h \
1046 $(SRC)/systime.h \ 981 $(GNU_LIB)/intprops.h \
1047 $(SRC)/w32gui.h \ 982 $(BLOCKINPUT_H) \
1048 $(SRC)/window.h 983 $(CHARACTER_H) \
984 $(CONFIG_H) \
985 $(INTERVALS_H) \
986 $(LISP_H) \
987 $(WINDOW_H)
1049 988
1050$(BLD)/intervals.$(O) : \ 989$(BLD)/intervals.$(O) : \
1051 $(SRC)/intervals.c \ 990 $(SRC)/intervals.c \
1052 $(CONFIG_H) \
1053 $(EMACS_ROOT)/nt/inc/sys/time.h \
1054 $(LISP_H) \
1055 $(SRC)/buffer.h \ 991 $(SRC)/buffer.h \
1056 $(SRC)/coding.h \
1057 $(SRC)/composite.h \
1058 $(SRC)/dispextern.h \
1059 $(SRC)/intervals.h \
1060 $(SRC)/keyboard.h \
1061 $(SRC)/keymap.h \ 992 $(SRC)/keymap.h \
1062 $(SRC)/puresize.h \ 993 $(SRC)/puresize.h \
1063 $(SRC)/systime.h \ 994 $(GNU_LIB)/intprops.h \
1064 $(SRC)/w32gui.h 995 $(CONFIG_H) \
996 $(INTERVALS_H) \
997 $(KEYBOARD_H) \
998 $(LISP_H)
1065 999
1066$(BLD)/keyboard.$(O) : \ 1000$(BLD)/keyboard.$(O) : \
1067 $(SRC)/keyboard.c \ 1001 $(SRC)/keyboard.c \
1068 $(CONFIG_H) \
1069 $(EMACS_ROOT)/nt/inc/unistd.h \
1070 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
1071 $(EMACS_ROOT)/nt/inc/sys/time.h \
1072 $(LISP_H) \
1073 $(PROCESS_H) \
1074 $(SRC)/atimer.h \
1075 $(SRC)/blockinput.h \
1076 $(SRC)/buffer.h \ 1002 $(SRC)/buffer.h \
1077 $(SRC)/character.h \
1078 $(SRC)/coding.h \
1079 $(SRC)/commands.h \ 1003 $(SRC)/commands.h \
1080 $(SRC)/composite.h \
1081 $(SRC)/dispextern.h \
1082 $(SRC)/disptab.h \ 1004 $(SRC)/disptab.h \
1083 $(SRC)/frame.h \
1084 $(SRC)/intervals.h \
1085 $(SRC)/keyboard.h \
1086 $(SRC)/keymap.h \ 1005 $(SRC)/keymap.h \
1087 $(SRC)/macros.h \ 1006 $(SRC)/macros.h \
1088 $(SRC)/puresize.h \ 1007 $(SRC)/puresize.h \
1089 $(SRC)/syntax.h \ 1008 $(SRC)/syntax.h \
1090 $(SRC)/syssignal.h \ 1009 $(SRC)/syssignal.h \
1091 $(SRC)/systime.h \
1092 $(SRC)/termchar.h \ 1010 $(SRC)/termchar.h \
1093 $(SRC)/termhooks.h \
1094 $(SRC)/termopts.h \ 1011 $(SRC)/termopts.h \
1095 $(SRC)/w32gui.h \ 1012 $(NT_INC)/sys/ioctl.h \
1096 $(SRC)/w32term.h \ 1013 $(NT_INC)/unistd.h \
1097 $(SRC)/window.h 1014 $(ATIMER_H) \
1015 $(BLOCKINPUT_H) \
1016 $(CHARACTER_H) \
1017 $(CONFIG_H) \
1018 $(DISPEXTERN_H) \
1019 $(FRAME_H) \
1020 $(INTERVALS_H) \
1021 $(KEYBOARD_H) \
1022 $(LISP_H) \
1023 $(PROCESS_H) \
1024 $(SYSTIME_H) \
1025 $(TERMHOOKS_H) \
1026 $(W32TERM_H) \
1027 $(WINDOW_H)
1098 1028
1099$(BLD)/keymap.$(O) : \ 1029$(BLD)/keymap.$(O) : \
1100 $(SRC)/keymap.c \ 1030 $(SRC)/keymap.c \
1101 $(CONFIG_H) \
1102 $(EMACS_ROOT)/nt/inc/sys/time.h \
1103 $(LISP_H) \
1104 $(SRC)/atimer.h \
1105 $(SRC)/blockinput.h \
1106 $(SRC)/buffer.h \ 1031 $(SRC)/buffer.h \
1107 $(SRC)/character.h \
1108 $(SRC)/charset.h \
1109 $(SRC)/coding.h \
1110 $(SRC)/commands.h \ 1032 $(SRC)/commands.h \
1111 $(SRC)/composite.h \
1112 $(SRC)/dispextern.h \
1113 $(SRC)/frame.h \
1114 $(SRC)/intervals.h \
1115 $(SRC)/keyboard.h \
1116 $(SRC)/keymap.h \ 1033 $(SRC)/keymap.h \
1117 $(SRC)/puresize.h \ 1034 $(SRC)/puresize.h \
1118 $(SRC)/systime.h \ 1035 $(BLOCKINPUT_H) \
1119 $(SRC)/termhooks.h \ 1036 $(CHARACTER_H) \
1120 $(SRC)/w32gui.h \ 1037 $(CHARSET_H) \
1121 $(SRC)/window.h 1038 $(CONFIG_H) \
1039 $(FRAME_H) \
1040 $(INTERVALS_H) \
1041 $(KEYBOARD_H) \
1042 $(LISP_H) \
1043 $(TERMHOOKS_H) \
1044 $(WINDOW_H)
1122 1045
1123$(BLD)/lastfile.$(O) : \ 1046$(BLD)/lastfile.$(O) : \
1124 $(SRC)/lastfile.c \ 1047 $(SRC)/lastfile.c \
@@ -1126,714 +1049,560 @@ $(BLD)/lastfile.$(O) : \
1126 1049
1127$(BLD)/lread.$(O) : \ 1050$(BLD)/lread.$(O) : \
1128 $(SRC)/lread.c \ 1051 $(SRC)/lread.c \
1129 $(CONFIG_H) \
1130 $(EMACS_ROOT)/nt/inc/unistd.h \
1131 $(EMACS_ROOT)/nt/inc/sys/file.h \
1132 $(EMACS_ROOT)/nt/inc/sys/time.h \
1133 $(LISP_H) \
1134 $(SRC)/atimer.h \
1135 $(SRC)/blockinput.h \
1136 $(SRC)/buffer.h \ 1052 $(SRC)/buffer.h \
1137 $(SRC)/character.h \
1138 $(SRC)/charset.h \
1139 $(SRC)/coding.h \
1140 $(SRC)/commands.h \ 1053 $(SRC)/commands.h \
1141 $(SRC)/composite.h \
1142 $(SRC)/dispextern.h \
1143 $(SRC)/epaths.h \ 1054 $(SRC)/epaths.h \
1144 $(SRC)/frame.h \ 1055 $(NT_INC)/sys/file.h \
1145 $(SRC)/intervals.h \ 1056 $(NT_INC)/sys/stat.h \
1146 $(SRC)/keyboard.h \ 1057 $(NT_INC)/unistd.h \
1147 $(SRC)/systime.h \ 1058 $(BLOCKINPUT_H) \
1148 $(SRC)/termhooks.h \ 1059 $(CHARACTER_H) \
1149 $(SRC)/w32gui.h 1060 $(CHARSET_H) \
1061 $(CODING_H) \
1062 $(CONFIG_H) \
1063 $(FRAME_H) \
1064 $(INTERVALS_H) \
1065 $(KEYBOARD_H) \
1066 $(LISP_H) \
1067 $(TERMHOOKS_H)
1150 1068
1151$(BLD)/macros.$(O) : \ 1069$(BLD)/macros.$(O) : \
1152 $(SRC)/macros.c \ 1070 $(SRC)/macros.c \
1153 $(CONFIG_H) \
1154 $(EMACS_ROOT)/nt/inc/sys/time.h \
1155 $(LISP_H) \
1156 $(SRC)/buffer.h \ 1071 $(SRC)/buffer.h \
1157 $(SRC)/coding.h \
1158 $(SRC)/commands.h \ 1072 $(SRC)/commands.h \
1159 $(SRC)/composite.h \
1160 $(SRC)/dispextern.h \
1161 $(SRC)/keyboard.h \
1162 $(SRC)/macros.h \ 1073 $(SRC)/macros.h \
1163 $(SRC)/systime.h \ 1074 $(CONFIG_H) \
1164 $(SRC)/w32gui.h \ 1075 $(KEYBOARD_H) \
1165 $(SRC)/window.h 1076 $(LISP_H) \
1077 $(WINDOW_H)
1166 1078
1167$(BLD)/marker.$(O) : \ 1079$(BLD)/marker.$(O) : \
1168 $(SRC)/marker.c \ 1080 $(SRC)/marker.c \
1169 $(CONFIG_H) \
1170 $(LISP_H) \
1171 $(SRC)/buffer.h \ 1081 $(SRC)/buffer.h \
1172 $(SRC)/character.h 1082 $(CHARACTER_H) \
1083 $(CONFIG_H) \
1084 $(LISP_H)
1173 1085
1174$(BLD)/menu.$(O) : \ 1086$(BLD)/menu.$(O) : \
1175 $(SRC)/menu.c \ 1087 $(SRC)/menu.c \
1088 $(SRC)/keymap.h \
1089 $(BLOCKINPUT_H) \
1176 $(CONFIG_H) \ 1090 $(CONFIG_H) \
1177 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1091 $(DISPEXTERN_H) \
1092 $(FRAME_H) \
1093 $(KEYBOARD_H) \
1178 $(LISP_H) \ 1094 $(LISP_H) \
1179 $(SRC)/atimer.h \ 1095 $(MENU_H) \
1180 $(SRC)/blockinput.h \ 1096 $(TERMHOOKS_H) \
1181 $(SRC)/coding.h \ 1097 $(W32TERM_H) \
1182 $(SRC)/composite.h \ 1098 $(WINDOW_H)
1183 $(SRC)/dispextern.h \
1184 $(SRC)/frame.h \
1185 $(SRC)/keyboard.h \
1186 $(SRC)/keymap.h \
1187 $(SRC)/menu.h \
1188 $(SRC)/systime.h \
1189 $(SRC)/termhooks.h \
1190 $(SRC)/w32gui.h \
1191 $(SRC)/w32term.h \
1192 $(SRC)/window.h
1193 1099
1194$(BLD)/minibuf.$(O) : \ 1100$(BLD)/minibuf.$(O) : \
1195 $(SRC)/minibuf.c \ 1101 $(SRC)/minibuf.c \
1196 $(CONFIG_H) \
1197 $(EMACS_ROOT)/nt/inc/sys/time.h \
1198 $(LISP_H) \
1199 $(SRC)/buffer.h \ 1102 $(SRC)/buffer.h \
1200 $(SRC)/character.h \
1201 $(SRC)/coding.h \
1202 $(SRC)/commands.h \ 1103 $(SRC)/commands.h \
1203 $(SRC)/composite.h \
1204 $(SRC)/dispextern.h \
1205 $(SRC)/frame.h \
1206 $(SRC)/intervals.h \
1207 $(SRC)/keyboard.h \
1208 $(SRC)/keymap.h \ 1104 $(SRC)/keymap.h \
1209 $(SRC)/syntax.h \ 1105 $(SRC)/syntax.h \
1210 $(SRC)/systime.h \ 1106 $(CONFIG_H) \
1211 $(SRC)/termhooks.h \ 1107 $(DISPEXTERN_H) \
1212 $(SRC)/w32gui.h \ 1108 $(FRAME_H) \
1213 $(SRC)/window.h 1109 $(INTERVALS_H) \
1110 $(KEYBOARD_H) \
1111 $(LISP_H) \
1112 $(TERMHOOKS_H) \
1113 $(WINDOW_H)
1214 1114
1215$(BLD)/w32.$(O) : \ 1115$(BLD)/w32.$(O) : \
1216 $(SRC)/w32.c \ 1116 $(SRC)/w32.c \
1117 $(SRC)/ndir.h \
1118 $(SRC)/w32.h \
1119 $(SRC)/w32heap.h \
1120 $(NT_INC)/pwd.h \
1121 $(NT_INC)/sys/file.h \
1122 $(NT_INC)/sys/time.h \
1123 $(GNU_LIB)/allocator.h \
1124 $(CAREADLINKAT_H) \
1125 $(CODING_H) \
1217 $(CONFIG_H) \ 1126 $(CONFIG_H) \
1218 $(EMACS_ROOT)/nt/inc/grp.h \ 1127 $(DISPEXTERN_H) \
1219 $(EMACS_ROOT)/nt/inc/pwd.h \ 1128 $(GRP_H) \
1220 $(EMACS_ROOT)/nt/inc/unistd.h \
1221 $(EMACS_ROOT)/nt/inc/sys/file.h \
1222 $(EMACS_ROOT)/nt/inc/sys/socket.h \
1223 $(EMACS_ROOT)/nt/inc/sys/time.h \
1224 $(EMACS_ROOT)/lib/allocator.h \
1225 $(EMACS_ROOT)/lib/careadlinkat.h \
1226 $(LISP_H) \ 1129 $(LISP_H) \
1227 $(PROCESS_H) \ 1130 $(PROCESS_H) \
1228 $(SRC)/coding.h \ 1131 $(SOCKET_H) \
1229 $(SRC)/composite.h \ 1132 $(SYSTIME_H)
1230 $(SRC)/dispextern.h \
1231 $(SRC)/ndir.h \
1232 $(SRC)/systime.h \
1233 $(SRC)/w32.h \
1234 $(SRC)/w32gui.h \
1235 $(SRC)/w32heap.h
1236 1133
1237$(BLD)/w32heap.$(O) : \ 1134$(BLD)/w32heap.$(O) : \
1238 $(SRC)/w32heap.c \ 1135 $(SRC)/w32heap.c \
1136 $(SRC)/w32heap.h \
1239 $(CONFIG_H) \ 1137 $(CONFIG_H) \
1240 $(LISP_H) \ 1138 $(LISP_H)
1241 $(SRC)/w32heap.h
1242 1139
1243$(BLD)/w32inevt.$(O) : \ 1140$(BLD)/w32inevt.$(O) : \
1244 $(SRC)/w32inevt.c \ 1141 $(SRC)/w32inevt.c \
1142 $(SRC)/w32heap.h \
1143 $(BLOCKINPUT_H) \
1245 $(CONFIG_H) \ 1144 $(CONFIG_H) \
1246 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1145 $(DISPEXTERN_H) \
1146 $(FRAME_H) \
1147 $(KEYBOARD_H) \
1247 $(LISP_H) \ 1148 $(LISP_H) \
1248 $(SRC)/atimer.h \ 1149 $(TERMHOOKS_H) \
1249 $(SRC)/blockinput.h \ 1150 $(W32TERM_H)
1250 $(SRC)/coding.h \
1251 $(SRC)/composite.h \
1252 $(SRC)/dispextern.h \
1253 $(SRC)/frame.h \
1254 $(SRC)/keyboard.h \
1255 $(SRC)/systime.h \
1256 $(SRC)/termhooks.h \
1257 $(SRC)/w32gui.h \
1258 $(SRC)/w32heap.h \
1259 $(SRC)/w32term.h
1260 1151
1261$(BLD)/w32proc.$(O) : \ 1152$(BLD)/w32proc.$(O) : \
1262 $(SRC)/w32proc.c \ 1153 $(SRC)/w32proc.c \
1263 $(CONFIG_H) \
1264 $(EMACS_ROOT)/nt/inc/langinfo.h \
1265 $(EMACS_ROOT)/nt/inc/nl_types.h \
1266 $(EMACS_ROOT)/nt/inc/unistd.h \
1267 $(EMACS_ROOT)/nt/inc/sys/file.h \
1268 $(EMACS_ROOT)/nt/inc/sys/time.h \
1269 $(LISP_H) \
1270 $(PROCESS_H) \
1271 $(SRC)/character.h \
1272 $(SRC)/coding.h \
1273 $(SRC)/composite.h \
1274 $(SRC)/dispextern.h \
1275 $(SRC)/syssignal.h \ 1154 $(SRC)/syssignal.h \
1276 $(SRC)/systime.h \
1277 $(SRC)/syswait.h \ 1155 $(SRC)/syswait.h \
1278 $(SRC)/w32.h \ 1156 $(SRC)/w32.h \
1279 $(SRC)/w32gui.h \
1280 $(SRC)/w32heap.h \ 1157 $(SRC)/w32heap.h \
1281 $(SRC)/w32term.h 1158 $(NT_INC)/nl_types.h \
1159 $(NT_INC)/sys/file.h \
1160 $(CODING_H) \
1161 $(CONFIG_H) \
1162 $(DISPEXTERN_H) \
1163 $(LANGINFO_H) \
1164 $(LISP_H) \
1165 $(PROCESS_H) \
1166 $(SYSTIME_H) \
1167 $(W32TERM_H)
1282 1168
1283$(BLD)/w32console.$(O) : \ 1169$(BLD)/w32console.$(O) : \
1284 $(SRC)/w32console.c \ 1170 $(SRC)/w32console.c \
1285 $(CONFIG_H) \
1286 $(EMACS_ROOT)/nt/inc/sys/time.h \
1287 $(LISP_H) \
1288 $(SRC)/character.h \
1289 $(SRC)/coding.h \
1290 $(SRC)/composite.h \
1291 $(SRC)/dispextern.h \
1292 $(SRC)/disptab.h \ 1171 $(SRC)/disptab.h \
1293 $(SRC)/frame.h \
1294 $(SRC)/systime.h \
1295 $(SRC)/termchar.h \ 1172 $(SRC)/termchar.h \
1296 $(SRC)/termhooks.h \ 1173 $(SRC)/w32inevt.h \
1297 $(SRC)/w32gui.h \ 1174 $(CHARACTER_H) \
1298 $(SRC)/w32inevt.h 1175 $(CODING_H) \
1176 $(CONFIG_H) \
1177 $(DISPEXTERN_H) \
1178 $(FRAME_H) \
1179 $(LISP_H) \
1180 $(TERMHOOKS_H)
1299 1181
1300$(BLD)/print.$(O) : \ 1182$(BLD)/print.$(O) : \
1301 $(SRC)/print.c \ 1183 $(SRC)/print.c \
1184 $(SRC)/buffer.h \
1185 $(SRC)/termchar.h \
1186 $(BLOCKINPUT_H) \
1187 $(CHARACTER_H) \
1188 $(CHARSET_H) \
1302 $(CONFIG_H) \ 1189 $(CONFIG_H) \
1303 $(EMACS_ROOT)/nt/inc/unistd.h \ 1190 $(DISPEXTERN_H) \
1304 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1191 $(FONT_H) \
1305 $(EMACS_ROOT)/lib/ftoastr.h \ 1192 $(FRAME_H) \
1193 $(FTOASTR_H) \
1194 $(INTERVALS_H) \
1195 $(KEYBOARD_H) \
1306 $(LISP_H) \ 1196 $(LISP_H) \
1307 $(PROCESS_H) \ 1197 $(PROCESS_H) \
1308 $(SRC)/atimer.h \ 1198 $(TERMHOOKS_H) \
1309 $(SRC)/blockinput.h \ 1199 $(WINDOW_H)
1310 $(SRC)/buffer.h \
1311 $(SRC)/ccl.h \
1312 $(SRC)/character.h \
1313 $(SRC)/charset.h \
1314 $(SRC)/coding.h \
1315 $(SRC)/composite.h \
1316 $(SRC)/dispextern.h \
1317 $(SRC)/font.h \
1318 $(SRC)/frame.h \
1319 $(SRC)/intervals.h \
1320 $(SRC)/keyboard.h \
1321 $(SRC)/systime.h \
1322 $(SRC)/termchar.h \
1323 $(SRC)/termhooks.h \
1324 $(SRC)/w32gui.h \
1325 $(SRC)/window.h
1326 1200
1327$(BLD)/process.$(O) : \ 1201$(BLD)/process.$(O) : \
1328 $(SRC)/process.c \ 1202 $(SRC)/process.c \
1329 $(CONFIG_H) \
1330 $(EMACS_ROOT)/nt/inc/netdb.h \
1331 $(EMACS_ROOT)/nt/inc/unistd.h \
1332 $(EMACS_ROOT)/nt/inc/arpa/inet.h \
1333 $(EMACS_ROOT)/nt/inc/netinet/in.h \
1334 $(EMACS_ROOT)/nt/inc/sys/file.h \
1335 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
1336 $(EMACS_ROOT)/nt/inc/sys/socket.h \
1337 $(EMACS_ROOT)/nt/inc/sys/time.h \
1338 $(LISP_H) \
1339 $(PROCESS_H) \
1340 $(SRC)/atimer.h \
1341 $(SRC)/blockinput.h \
1342 $(SRC)/buffer.h \ 1203 $(SRC)/buffer.h \
1343 $(SRC)/character.h \
1344 $(SRC)/coding.h \
1345 $(SRC)/commands.h \ 1204 $(SRC)/commands.h \
1346 $(SRC)/composite.h \ 1205 $(SRC)/composite.h \
1347 $(SRC)/dispextern.h \ 1206 $(SRC)/gnutls.h \
1348 $(SRC)/frame.h \
1349 $(SRC)/keyboard.h \
1350 $(SRC)/sysselect.h \ 1207 $(SRC)/sysselect.h \
1351 $(SRC)/syssignal.h \ 1208 $(SRC)/syssignal.h \
1352 $(SRC)/systime.h \
1353 $(SRC)/systty.h \
1354 $(SRC)/syswait.h \ 1209 $(SRC)/syswait.h \
1355 $(SRC)/termhooks.h \
1356 $(SRC)/termopts.h \ 1210 $(SRC)/termopts.h \
1357 $(SRC)/w32.h \ 1211 $(NT_INC)/arpa/inet.h \
1358 $(SRC)/w32gui.h \ 1212 $(NT_INC)/netdb.h \
1359 $(SRC)/window.h 1213 $(NT_INC)/netinet/in.h \
1214 $(NT_INC)/sys/file.h \
1215 $(NT_INC)/sys/ioctl.h \
1216 $(NT_INC)/sys/stat.h \
1217 $(NT_INC)/unistd.h \
1218 $(ATIMER_H) \
1219 $(BLOCKINPUT_H) \
1220 $(CHARACTER_H) \
1221 $(CODING_H) \
1222 $(CONFIG_H) \
1223 $(DISPEXTERN_H) \
1224 $(FRAME_H) \
1225 $(KEYBOARD_H) \
1226 $(LISP_H) \
1227 $(PROCESS_H) \
1228 $(SOCKET_H) \
1229 $(SYSTIME_H) \
1230 $(SYSTTY_H) \
1231 $(TERMHOOKS_H) \
1232 $(WINDOW_H)
1360 1233
1361$(BLD)/ralloc.$(O) : \ 1234$(BLD)/ralloc.$(O) : \
1362 $(SRC)/ralloc.c \ 1235 $(SRC)/ralloc.c \
1363 $(CONFIG_H) \
1364 $(EMACS_ROOT)/nt/inc/unistd.h \
1365 $(EMACS_ROOT)/nt/inc/sys/time.h \
1366 $(LISP_H) \
1367 $(SRC)/atimer.h \
1368 $(SRC)/blockinput.h \
1369 $(SRC)/getpagesize.h \ 1236 $(SRC)/getpagesize.h \
1370 $(SRC)/systime.h 1237 $(NT_INC)/unistd.h \
1238 $(BLOCKINPUT_H) \
1239 $(CONFIG_H) \
1240 $(LISP_H)
1371 1241
1372$(BLD)/regex.$(O) : \ 1242$(BLD)/regex.$(O) : \
1373 $(SRC)/regex.c \ 1243 $(SRC)/regex.c \
1374 $(CONFIG_H) \
1375 $(LISP_H) \
1376 $(SRC)/buffer.h \ 1244 $(SRC)/buffer.h \
1377 $(SRC)/category.h \ 1245 $(SRC)/category.h \
1378 $(SRC)/character.h \
1379 $(SRC)/regex.h \ 1246 $(SRC)/regex.h \
1380 $(SRC)/syntax.h 1247 $(SRC)/syntax.h \
1248 $(NT_INC)/unistd.h \
1249 $(CHARACTER_H) \
1250 $(CONFIG_H) \
1251 $(LISP_H)
1381 1252
1382$(BLD)/region-cache.$(O) : \ 1253$(BLD)/region-cache.$(O) : \
1383 $(SRC)/region-cache.c \ 1254 $(SRC)/region-cache.c \
1384 $(CONFIG_H) \
1385 $(LISP_H) \
1386 $(SRC)/buffer.h \ 1255 $(SRC)/buffer.h \
1387 $(SRC)/region-cache.h 1256 $(SRC)/region-cache.h \
1257 $(CONFIG_H) \
1258 $(LISP_H)
1388 1259
1389$(BLD)/scroll.$(O) : \ 1260$(BLD)/scroll.$(O) : \
1390 $(SRC)/scroll.c \ 1261 $(SRC)/scroll.c \
1262 $(SRC)/termchar.h \
1391 $(CONFIG_H) \ 1263 $(CONFIG_H) \
1392 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1264 $(DISPEXTERN_H) \
1265 $(FRAME_H) \
1266 $(KEYBOARD_H) \
1393 $(LISP_H) \ 1267 $(LISP_H) \
1394 $(SRC)/coding.h \ 1268 $(TERMHOOKS_H) \
1395 $(SRC)/composite.h \ 1269 $(WINDOW_H)
1396 $(SRC)/dispextern.h \
1397 $(SRC)/frame.h \
1398 $(SRC)/keyboard.h \
1399 $(SRC)/systime.h \
1400 $(SRC)/termchar.h \
1401 $(SRC)/termhooks.h \
1402 $(SRC)/w32gui.h \
1403 $(SRC)/window.h
1404 1270
1405$(BLD)/search.$(O) : \ 1271$(BLD)/search.$(O) : \
1406 $(SRC)/search.c \ 1272 $(SRC)/search.c \
1407 $(CONFIG_H) \
1408 $(EMACS_ROOT)/nt/inc/sys/time.h \
1409 $(LISP_H) \
1410 $(SRC)/atimer.h \
1411 $(SRC)/blockinput.h \
1412 $(SRC)/buffer.h \ 1273 $(SRC)/buffer.h \
1413 $(SRC)/category.h \ 1274 $(SRC)/category.h \
1414 $(SRC)/character.h \
1415 $(SRC)/charset.h \
1416 $(SRC)/commands.h \ 1275 $(SRC)/commands.h \
1417 $(SRC)/composite.h \
1418 $(SRC)/dispextern.h \
1419 $(SRC)/intervals.h \
1420 $(SRC)/regex.h \ 1276 $(SRC)/regex.h \
1421 $(SRC)/region-cache.h \ 1277 $(SRC)/region-cache.h \
1422 $(SRC)/syntax.h \ 1278 $(SRC)/syntax.h \
1423 $(SRC)/systime.h \ 1279 $(BLOCKINPUT_H) \
1424 $(SRC)/w32gui.h 1280 $(CHARACTER_H) \
1281 $(CHARSET_H) \
1282 $(CONFIG_H) \
1283 $(INTERVALS_H) \
1284 $(LISP_H)
1425 1285
1426$(BLD)/sound.$(O) : \ 1286$(BLD)/sound.$(O) : \
1427 $(SRC)/sound.c \ 1287 $(SRC)/sound.c \
1428 $(CONFIG_H) \
1429 $(EMACS_ROOT)/nt/inc/unistd.h \
1430 $(EMACS_ROOT)/nt/inc/sys/time.h \
1431 $(LISP_H) \
1432 $(SRC)/atimer.h \
1433 $(SRC)/dispextern.h \
1434 $(SRC)/syssignal.h \ 1288 $(SRC)/syssignal.h \
1435 $(SRC)/systime.h \ 1289 $(NT_INC)/unistd.h \
1436 $(SRC)/w32gui.h 1290 $(ATIMER_H) \
1291 $(CONFIG_H) \
1292 $(DISPEXTERN_H) \
1293 $(LISP_H)
1437 1294
1438$(BLD)/syntax.$(O) : \ 1295$(BLD)/syntax.$(O) : \
1439 $(SRC)/syntax.c \ 1296 $(SRC)/syntax.c \
1440 $(CONFIG_H) \
1441 $(EMACS_ROOT)/nt/inc/sys/time.h \
1442 $(LISP_H) \
1443 $(SRC)/buffer.h \ 1297 $(SRC)/buffer.h \
1444 $(SRC)/category.h \ 1298 $(SRC)/category.h \
1445 $(SRC)/character.h \
1446 $(SRC)/commands.h \ 1299 $(SRC)/commands.h \
1447 $(SRC)/composite.h \
1448 $(SRC)/dispextern.h \
1449 $(SRC)/intervals.h \
1450 $(SRC)/keymap.h \ 1300 $(SRC)/keymap.h \
1451 $(SRC)/regex.h \ 1301 $(SRC)/regex.h \
1452 $(SRC)/syntax.h \ 1302 $(SRC)/syntax.h \
1453 $(SRC)/systime.h \ 1303 $(CHARACTER_H) \
1454 $(SRC)/w32gui.h 1304 $(CONFIG_H) \
1305 $(INTERVALS_H) \
1306 $(LISP_H)
1455 1307
1456$(BLD)/sysdep.$(O) : \ 1308$(BLD)/sysdep.$(O) : \
1457 $(SRC)/sysdep.c \ 1309 $(SRC)/sysdep.c \
1458 $(CONFIG_H) \
1459 $(EMACS_ROOT)/nt/inc/grp.h \
1460 $(EMACS_ROOT)/nt/inc/netdb.h \
1461 $(EMACS_ROOT)/nt/inc/pwd.h \
1462 $(EMACS_ROOT)/nt/inc/unistd.h \
1463 $(EMACS_ROOT)/nt/inc/sys/file.h \
1464 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
1465 $(EMACS_ROOT)/nt/inc/sys/socket.h \
1466 $(EMACS_ROOT)/nt/inc/sys/time.h \
1467 $(EMACS_ROOT)/lib/allocator.h \
1468 $(EMACS_ROOT)/lib/careadlinkat.h \
1469 $(EMACS_ROOT)/lib/ignore-value.h \
1470 $(LISP_H) \
1471 $(PROCESS_H) \
1472 $(SRC)/atimer.h \
1473 $(SRC)/blockinput.h \
1474 $(SRC)/cm.h \ 1310 $(SRC)/cm.h \
1475 $(SRC)/coding.h \
1476 $(SRC)/composite.h \
1477 $(SRC)/dispextern.h \
1478 $(SRC)/frame.h \
1479 $(SRC)/keyboard.h \
1480 $(SRC)/sysselect.h \ 1311 $(SRC)/sysselect.h \
1481 $(SRC)/syssignal.h \ 1312 $(SRC)/syssignal.h \
1482 $(SRC)/systime.h \
1483 $(SRC)/systty.h \
1484 $(SRC)/syswait.h \ 1313 $(SRC)/syswait.h \
1485 $(SRC)/termchar.h \ 1314 $(SRC)/termchar.h \
1486 $(SRC)/termhooks.h \
1487 $(SRC)/termopts.h \ 1315 $(SRC)/termopts.h \
1488 $(SRC)/w32.h \ 1316 $(NT_INC)/netdb.h \
1489 $(SRC)/w32gui.h \ 1317 $(NT_INC)/pwd.h \
1490 $(SRC)/window.h 1318 $(NT_INC)/sys/file.h \
1319 $(NT_INC)/sys/stat.h \
1320 $(NT_INC)/unistd.h \
1321 $(GNU_LIB)/allocator.h \
1322 $(GNU_LIB)/ignore-value.h \
1323 $(BLOCKINPUT_H) \
1324 $(CAREADLINKAT_H) \
1325 $(CONFIG_H) \
1326 $(DISPEXTERN_H) \
1327 $(FRAME_H) \
1328 $(GRP_H) \
1329 $(KEYBOARD_H) \
1330 $(LISP_H) \
1331 $(PROCESS_H) \
1332 $(SOCKET_H) \
1333 $(SYSTIME_H) \
1334 $(SYSTTY_H) \
1335 $(TERMHOOKS_H) \
1336 $(WINDOW_H)
1491 1337
1492$(BLD)/term.$(O) : \ 1338$(BLD)/term.$(O) : \
1493 $(SRC)/term.c \ 1339 $(SRC)/term.c \
1494 $(CONFIG_H) \
1495 $(EMACS_ROOT)/nt/inc/unistd.h \
1496 $(EMACS_ROOT)/nt/inc/sys/file.h \
1497 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
1498 $(EMACS_ROOT)/nt/inc/sys/time.h \
1499 $(LISP_H) \
1500 $(SRC)/atimer.h \
1501 $(SRC)/blockinput.h \
1502 $(SRC)/buffer.h \ 1340 $(SRC)/buffer.h \
1503 $(SRC)/character.h \
1504 $(SRC)/charset.h \
1505 $(SRC)/cm.h \ 1341 $(SRC)/cm.h \
1506 $(SRC)/coding.h \
1507 $(SRC)/composite.h \ 1342 $(SRC)/composite.h \
1508 $(SRC)/dispextern.h \
1509 $(SRC)/disptab.h \ 1343 $(SRC)/disptab.h \
1510 $(SRC)/frame.h \
1511 $(SRC)/intervals.h \
1512 $(SRC)/keyboard.h \
1513 $(SRC)/keymap.h \ 1344 $(SRC)/keymap.h \
1514 $(SRC)/syssignal.h \ 1345 $(SRC)/syssignal.h \
1515 $(SRC)/systime.h \
1516 $(SRC)/systty.h \
1517 $(SRC)/termchar.h \ 1346 $(SRC)/termchar.h \
1518 $(SRC)/termhooks.h \
1519 $(SRC)/termopts.h \ 1347 $(SRC)/termopts.h \
1520 $(SRC)/tparam.h \ 1348 $(SRC)/tparam.h \
1521 $(SRC)/w32gui.h \ 1349 $(NT_INC)/sys/file.h \
1522 $(SRC)/window.h 1350 $(NT_INC)/unistd.h \
1351 $(BLOCKINPUT_H) \
1352 $(CHARACTER_H) \
1353 $(CHARSET_H) \
1354 $(CODING_H) \
1355 $(CONFIG_H) \
1356 $(DISPEXTERN_H) \
1357 $(FRAME_H) \
1358 $(INTERVALS_H) \
1359 $(KEYBOARD_H) \
1360 $(LISP_H) \
1361 $(SYSTTY_H) \
1362 $(TERMHOOKS_H) \
1363 $(WINDOW_H)
1523 1364
1524$(BLD)/terminal.$(O) : \ 1365$(BLD)/terminal.$(O) : \
1525 $(SRC)/terminal.c \ 1366 $(SRC)/terminal.c \
1367 $(SRC)/termchar.h \
1368 $(CHARSET_H) \
1369 $(CODING_H) \
1526 $(CONFIG_H) \ 1370 $(CONFIG_H) \
1527 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1371 $(FRAME_H) \
1372 $(KEYBOARD_H) \
1528 $(LISP_H) \ 1373 $(LISP_H) \
1529 $(SRC)/charset.h \ 1374 $(TERMHOOKS_H)
1530 $(SRC)/coding.h \
1531 $(SRC)/composite.h \
1532 $(SRC)/dispextern.h \
1533 $(SRC)/frame.h \
1534 $(SRC)/keyboard.h \
1535 $(SRC)/systime.h \
1536 $(SRC)/termchar.h \
1537 $(SRC)/termhooks.h \
1538 $(SRC)/w32gui.h
1539 1375
1540$(BLD)/textprop.$(O) : \ 1376$(BLD)/textprop.$(O) : \
1541 $(SRC)/textprop.c \ 1377 $(SRC)/textprop.c \
1378 $(SRC)/buffer.h \
1542 $(CONFIG_H) \ 1379 $(CONFIG_H) \
1543 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1380 $(INTERVALS_H) \
1544 $(LISP_H) \ 1381 $(LISP_H) \
1545 $(SRC)/buffer.h \ 1382 $(WINDOW_H)
1546 $(SRC)/composite.h \
1547 $(SRC)/dispextern.h \
1548 $(SRC)/intervals.h \
1549 $(SRC)/systime.h \
1550 $(SRC)/w32gui.h \
1551 $(SRC)/window.h
1552 1383
1553$(BLD)/tparam.$(O) : \ 1384$(BLD)/tparam.$(O) : \
1554 $(SRC)/tparam.c \ 1385 $(SRC)/tparam.c \
1386 $(SRC)/tparam.h \
1555 $(CONFIG_H) \ 1387 $(CONFIG_H) \
1556 $(LISP_H) \ 1388 $(LISP_H)
1557 $(SRC)/tparam.h
1558 1389
1559$(BLD)/undo.$(O) : \ 1390$(BLD)/undo.$(O) : \
1560 $(SRC)/undo.c \ 1391 $(SRC)/undo.c \
1561 $(CONFIG_H) \
1562 $(EMACS_ROOT)/nt/inc/sys/time.h \
1563 $(LISP_H) \
1564 $(SRC)/buffer.h \ 1392 $(SRC)/buffer.h \
1565 $(SRC)/commands.h \ 1393 $(SRC)/commands.h \
1566 $(SRC)/dispextern.h \ 1394 $(CONFIG_H) \
1567 $(SRC)/systime.h \ 1395 $(LISP_H) \
1568 $(SRC)/w32gui.h \ 1396 $(WINDOW_H)
1569 $(SRC)/window.h
1570 1397
1571$(BLD)/unexw32.$(O) : \ 1398$(BLD)/unexw32.$(O) : \
1572 $(SRC)/unexw32.c \ 1399 $(SRC)/unexw32.c \
1573 $(CONFIG_H) \
1574 $(SRC)/unexec.h \ 1400 $(SRC)/unexec.h \
1575 $(SRC)/w32heap.h 1401 $(SRC)/w32heap.h \
1402 $(CONFIG_H)
1576 1403
1577$(BLD)/vm-limit.$(O) : \ 1404$(BLD)/vm-limit.$(O) : \
1578 $(SRC)/vm-limit.c \ 1405 $(SRC)/vm-limit.c \
1406 $(SRC)/mem-limits.h \
1579 $(CONFIG_H) \ 1407 $(CONFIG_H) \
1580 $(LISP_H) \ 1408 $(LISP_H)
1581 $(SRC)/mem-limits.h
1582 1409
1583$(BLD)/window.$(O) : \ 1410$(BLD)/window.$(O) : \
1584 $(SRC)/window.c \ 1411 $(SRC)/window.c \
1585 $(CONFIG_H) \
1586 $(EMACS_ROOT)/nt/inc/sys/time.h \
1587 $(LISP_H) \
1588 $(SRC)/atimer.h \
1589 $(SRC)/blockinput.h \
1590 $(SRC)/buffer.h \ 1412 $(SRC)/buffer.h \
1591 $(SRC)/coding.h \
1592 $(SRC)/commands.h \ 1413 $(SRC)/commands.h \
1593 $(SRC)/composite.h \
1594 $(SRC)/dispextern.h \
1595 $(SRC)/disptab.h \ 1414 $(SRC)/disptab.h \
1596 $(SRC)/frame.h \
1597 $(SRC)/indent.h \ 1415 $(SRC)/indent.h \
1598 $(SRC)/intervals.h \
1599 $(SRC)/keyboard.h \
1600 $(SRC)/keymap.h \ 1416 $(SRC)/keymap.h \
1601 $(SRC)/systime.h \
1602 $(SRC)/termchar.h \ 1417 $(SRC)/termchar.h \
1603 $(SRC)/termhooks.h \ 1418 $(BLOCKINPUT_H) \
1604 $(SRC)/w32gui.h \ 1419 $(CONFIG_H) \
1605 $(SRC)/w32term.h \ 1420 $(DISPEXTERN_H) \
1606 $(SRC)/window.h 1421 $(FRAME_H) \
1422 $(INTERVALS_H) \
1423 $(KEYBOARD_H) \
1424 $(LISP_H) \
1425 $(TERMHOOKS_H) \
1426 $(W32TERM_H) \
1427 $(WINDOW_H)
1607 1428
1608$(BLD)/xdisp.$(O) : \ 1429$(BLD)/xdisp.$(O) : \
1609 $(SRC)/xdisp.c \ 1430 $(SRC)/xdisp.c \
1610 $(CONFIG_H) \
1611 $(EMACS_ROOT)/nt/inc/unistd.h \
1612 $(EMACS_ROOT)/nt/inc/sys/time.h \
1613 $(LISP_H) \
1614 $(PROCESS_H) \
1615 $(SRC)/atimer.h \
1616 $(SRC)/blockinput.h \
1617 $(SRC)/buffer.h \ 1431 $(SRC)/buffer.h \
1618 $(SRC)/ccl.h \
1619 $(SRC)/character.h \
1620 $(SRC)/charset.h \
1621 $(SRC)/coding.h \
1622 $(SRC)/commands.h \ 1432 $(SRC)/commands.h \
1623 $(SRC)/composite.h \
1624 $(SRC)/dispextern.h \
1625 $(SRC)/disptab.h \ 1433 $(SRC)/disptab.h \
1626 $(SRC)/font.h \
1627 $(SRC)/fontset.h \ 1434 $(SRC)/fontset.h \
1628 $(SRC)/frame.h \
1629 $(SRC)/indent.h \ 1435 $(SRC)/indent.h \
1630 $(SRC)/intervals.h \
1631 $(SRC)/keyboard.h \
1632 $(SRC)/keymap.h \ 1436 $(SRC)/keymap.h \
1633 $(SRC)/macros.h \ 1437 $(SRC)/macros.h \
1634 $(SRC)/region-cache.h \ 1438 $(SRC)/region-cache.h \
1635 $(SRC)/systime.h \
1636 $(SRC)/termchar.h \ 1439 $(SRC)/termchar.h \
1637 $(SRC)/termhooks.h \
1638 $(SRC)/termopts.h \ 1440 $(SRC)/termopts.h \
1639 $(SRC)/w32gui.h \ 1441 $(BLOCKINPUT_H) \
1640 $(SRC)/w32term.h \ 1442 $(CHARACTER_H) \
1641 $(SRC)/window.h 1443 $(CHARSET_H) \
1444 $(CODING_H) \
1445 $(CONFIG_H) \
1446 $(DISPEXTERN_H) \
1447 $(FONT_H) \
1448 $(FRAME_H) \
1449 $(INTERVALS_H) \
1450 $(KEYBOARD_H) \
1451 $(LISP_H) \
1452 $(PROCESS_H) \
1453 $(TERMHOOKS_H) \
1454 $(W32TERM_H) \
1455 $(WINDOW_H)
1642 1456
1643$(BLD)/xfaces.$(O) : \ 1457$(BLD)/xfaces.$(O) : \
1644 $(SRC)/xfaces.c \ 1458 $(SRC)/xfaces.c \
1645 $(CONFIG_H) \
1646 $(EMACS_ROOT)/nt/inc/sys/time.h \
1647 $(LISP_H) \
1648 $(SRC)/atimer.h \
1649 $(SRC)/blockinput.h \
1650 $(SRC)/buffer.h \ 1459 $(SRC)/buffer.h \
1651 $(SRC)/ccl.h \
1652 $(SRC)/character.h \
1653 $(SRC)/charset.h \
1654 $(SRC)/coding.h \
1655 $(SRC)/composite.h \
1656 $(SRC)/dispextern.h \
1657 $(SRC)/font.h \
1658 $(SRC)/fontset.h \ 1460 $(SRC)/fontset.h \
1659 $(SRC)/frame.h \
1660 $(SRC)/intervals.h \
1661 $(SRC)/keyboard.h \
1662 $(SRC)/systime.h \
1663 $(SRC)/termchar.h \ 1461 $(SRC)/termchar.h \
1664 $(SRC)/termhooks.h \ 1462 $(NT_INC)/sys/stat.h \
1665 $(SRC)/w32gui.h \ 1463 $(BLOCKINPUT_H) \
1666 $(SRC)/w32term.h \ 1464 $(CHARACTER_H) \
1667 $(SRC)/window.h 1465 $(CHARSET_H) \
1466 $(CONFIG_H) \
1467 $(DISPEXTERN_H) \
1468 $(FONT_H) \
1469 $(FRAME_H) \
1470 $(INTERVALS_H) \
1471 $(KEYBOARD_H) \
1472 $(LISP_H) \
1473 $(TERMHOOKS_H) \
1474 $(W32TERM_H) \
1475 $(WINDOW_H)
1668 1476
1669$(BLD)/w32fns.$(O) : \ 1477$(BLD)/w32fns.$(O) : \
1670 $(SRC)/w32fns.c \ 1478 $(SRC)/w32fns.c \
1671 $(CONFIG_H) \
1672 $(EMACS_ROOT)/nt/inc/sys/time.h \
1673 $(LISP_H) \
1674 $(SRC)/atimer.h \
1675 $(SRC)/blockinput.h \
1676 $(SRC)/buffer.h \ 1479 $(SRC)/buffer.h \
1677 $(SRC)/ccl.h \ 1480 $(SRC)/ccl.h \
1678 $(SRC)/character.h \
1679 $(SRC)/charset.h \
1680 $(SRC)/coding.h \
1681 $(SRC)/composite.h \
1682 $(SRC)/dispextern.h \
1683 $(SRC)/epaths.h \ 1481 $(SRC)/epaths.h \
1684 $(SRC)/font.h \
1685 $(SRC)/fontset.h \ 1482 $(SRC)/fontset.h \
1686 $(SRC)/frame.h \
1687 $(SRC)/intervals.h \
1688 $(SRC)/keyboard.h \
1689 $(SRC)/systime.h \
1690 $(SRC)/termhooks.h \
1691 $(SRC)/w32.h \ 1483 $(SRC)/w32.h \
1692 $(SRC)/w32font.h \ 1484 $(SRC)/w32font.h \
1693 $(SRC)/w32gui.h \
1694 $(SRC)/w32heap.h \ 1485 $(SRC)/w32heap.h \
1695 $(SRC)/w32term.h \ 1486 $(BLOCKINPUT_H) \
1696 $(SRC)/window.h 1487 $(CHARACTER_H) \
1488 $(CHARSET_H) \
1489 $(CODING_H) \
1490 $(CONFIG_H) \
1491 $(DISPEXTERN_H) \
1492 $(FONT_H) \
1493 $(FRAME_H) \
1494 $(INTERVALS_H) \
1495 $(KEYBOARD_H) \
1496 $(LISP_H) \
1497 $(SYSTIME_H) \
1498 $(TERMHOOKS_H) \
1499 $(W32TERM_H) \
1500 $(WINDOW_H)
1697 1501
1698$(BLD)/w32menu.$(O) : \ 1502$(BLD)/w32menu.$(O) : \
1699 $(SRC)/w32menu.c \ 1503 $(SRC)/w32menu.c \
1700 $(CONFIG_H) \
1701 $(EMACS_ROOT)/nt/inc/sys/time.h \
1702 $(LISP_H) \
1703 $(SRC)/atimer.h \
1704 $(SRC)/blockinput.h \
1705 $(SRC)/buffer.h \ 1504 $(SRC)/buffer.h \
1706 $(SRC)/character.h \
1707 $(SRC)/charset.h \
1708 $(SRC)/coding.h \
1709 $(SRC)/composite.h \
1710 $(SRC)/dispextern.h \
1711 $(SRC)/frame.h \
1712 $(SRC)/keyboard.h \
1713 $(SRC)/keymap.h \ 1505 $(SRC)/keymap.h \
1714 $(SRC)/menu.h \ 1506 $(BLOCKINPUT_H) \
1715 $(SRC)/systime.h \ 1507 $(CHARSET_H) \
1716 $(SRC)/termhooks.h \ 1508 $(CODING_H) \
1717 $(SRC)/w32gui.h \ 1509 $(CONFIG_H) \
1718 $(SRC)/w32term.h \ 1510 $(DISPEXTERN_H) \
1719 $(SRC)/window.h 1511 $(FRAME_H) \
1512 $(KEYBOARD_H) \
1513 $(LISP_H) \
1514 $(MENU_H) \
1515 $(TERMHOOKS_H) \
1516 $(W32TERM_H) \
1517 $(WINDOW_H)
1720 1518
1721$(BLD)/w32term.$(O) : \ 1519$(BLD)/w32term.$(O) : \
1722 $(SRC)/w32term.c \ 1520 $(SRC)/w32term.c \
1723 $(CONFIG_H) \
1724 $(EMACS_ROOT)/nt/inc/unistd.h \
1725 $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
1726 $(EMACS_ROOT)/nt/inc/sys/time.h \
1727 $(LISP_H) \
1728 $(PROCESS_H) \
1729 $(SRC)/atimer.h \
1730 $(SRC)/blockinput.h \
1731 $(SRC)/buffer.h \ 1521 $(SRC)/buffer.h \
1732 $(SRC)/ccl.h \ 1522 $(SRC)/ccl.h \
1733 $(SRC)/character.h \
1734 $(SRC)/charset.h \
1735 $(SRC)/coding.h \
1736 $(SRC)/composite.h \
1737 $(SRC)/dispextern.h \
1738 $(SRC)/disptab.h \ 1523 $(SRC)/disptab.h \
1739 $(SRC)/font.h \
1740 $(SRC)/fontset.h \ 1524 $(SRC)/fontset.h \
1741 $(SRC)/frame.h \
1742 $(SRC)/intervals.h \
1743 $(SRC)/keyboard.h \
1744 $(SRC)/keymap.h \ 1525 $(SRC)/keymap.h \
1745 $(SRC)/systime.h \
1746 $(SRC)/systty.h \
1747 $(SRC)/termchar.h \ 1526 $(SRC)/termchar.h \
1748 $(SRC)/termhooks.h \
1749 $(SRC)/termopts.h \ 1527 $(SRC)/termopts.h \
1750 $(SRC)/w32font.h \ 1528 $(SRC)/w32font.h \
1751 $(SRC)/w32gui.h \
1752 $(SRC)/w32heap.h \ 1529 $(SRC)/w32heap.h \
1753 $(SRC)/w32term.h \ 1530 $(NT_INC)/sys/stat.h \
1754 $(SRC)/window.h 1531 $(ATIMER_H) \
1532 $(BLOCKINPUT_H) \
1533 $(CHARACTER_H) \
1534 $(CHARSET_H) \
1535 $(CODING_H) \
1536 $(CONFIG_H) \
1537 $(DISPEXTERN_H) \
1538 $(FONT_H) \
1539 $(FRAME_H) \
1540 $(INTERVALS_H) \
1541 $(KEYBOARD_H) \
1542 $(LISP_H) \
1543 $(PROCESS_H) \
1544 $(SYSTIME_H) \
1545 $(SYSTTY_H) \
1546 $(TERMHOOKS_H) \
1547 $(W32TERM_H) \
1548 $(WINDOW_H)
1755 1549
1756$(BLD)/w32select.$(O) : \ 1550$(BLD)/w32select.$(O) : \
1757 $(SRC)/w32select.c \ 1551 $(SRC)/w32select.c \
1758 $(CONFIG_H) \
1759 $(EMACS_ROOT)/nt/inc/sys/time.h \
1760 $(LISP_H) \
1761 $(SRC)/atimer.h \
1762 $(SRC)/blockinput.h \
1763 $(SRC)/character.h \
1764 $(SRC)/charset.h \
1765 $(SRC)/coding.h \
1766 $(SRC)/composite.h \ 1552 $(SRC)/composite.h \
1767 $(SRC)/systime.h \
1768 $(SRC)/w32gui.h \
1769 $(SRC)/w32heap.h \ 1553 $(SRC)/w32heap.h \
1770 $(SRC)/w32term.h 1554 $(BLOCKINPUT_H) \
1555 $(CHARSET_H) \
1556 $(CODING_H) \
1557 $(CONFIG_H) \
1558 $(LISP_H) \
1559 $(W32TERM_H)
1771 1560
1772$(BLD)/w32reg.$(O) : \ 1561$(BLD)/w32reg.$(O) : \
1773 $(SRC)/w32reg.c \ 1562 $(SRC)/w32reg.c \
1563 $(BLOCKINPUT_H) \
1774 $(CONFIG_H) \ 1564 $(CONFIG_H) \
1775 $(EMACS_ROOT)/nt/inc/sys/time.h \
1776 $(LISP_H) \ 1565 $(LISP_H) \
1777 $(SRC)/atimer.h \ 1566 $(W32TERM_H)
1778 $(SRC)/blockinput.h \
1779 $(SRC)/systime.h \
1780 $(SRC)/w32gui.h \
1781 $(SRC)/w32term.h
1782 1567
1783$(BLD)/w32xfns.$(O) : \ 1568$(BLD)/w32xfns.$(O) : \
1784 $(SRC)/w32xfns.c \ 1569 $(SRC)/w32xfns.c \
1570 $(SRC)/fontset.h \
1571 $(BLOCKINPUT_H) \
1572 $(CHARSET_H) \
1785 $(CONFIG_H) \ 1573 $(CONFIG_H) \
1786 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1574 $(FRAME_H) \
1575 $(KEYBOARD_H) \
1787 $(LISP_H) \ 1576 $(LISP_H) \
1788 $(SRC)/atimer.h \ 1577 $(W32TERM_H)
1789 $(SRC)/blockinput.h \
1790 $(SRC)/charset.h \
1791 $(SRC)/coding.h \
1792 $(SRC)/composite.h \
1793 $(SRC)/dispextern.h \
1794 $(SRC)/fontset.h \
1795 $(SRC)/frame.h \
1796 $(SRC)/keyboard.h \
1797 $(SRC)/systime.h \
1798 $(SRC)/w32gui.h \
1799 $(SRC)/w32term.h
1800 1578
1801$(BLD)/w32font.$(O) : \ 1579$(BLD)/w32font.$(O) : \
1802 $(SRC)/w32font.c \ 1580 $(SRC)/w32font.c \
1803 $(CONFIG_H) \
1804 $(EMACS_ROOT)/nt/inc/sys/time.h \
1805 $(LISP_H) \
1806 $(SRC)/ccl.h \
1807 $(SRC)/character.h \
1808 $(SRC)/charset.h \
1809 $(SRC)/coding.h \
1810 $(SRC)/composite.h \
1811 $(SRC)/dispextern.h \
1812 $(SRC)/font.h \
1813 $(SRC)/fontset.h \ 1581 $(SRC)/fontset.h \
1814 $(SRC)/frame.h \
1815 $(SRC)/systime.h \
1816 $(SRC)/w32font.h \ 1582 $(SRC)/w32font.h \
1817 $(SRC)/w32gui.h \ 1583 $(CHARACTER_H) \
1818 $(SRC)/w32term.h 1584 $(CHARSET_H) \
1585 $(CODING_H) \
1586 $(CONFIG_H) \
1587 $(DISPEXTERN_H) \
1588 $(FONT_H) \
1589 $(FRAME_H) \
1590 $(LISP_H) \
1591 $(W32TERM_H)
1819 1592
1820$(BLD)/w32uniscribe.$(O) : \ 1593$(BLD)/w32uniscribe.$(O) : \
1821 $(SRC)/w32uniscribe.c \ 1594 $(SRC)/w32uniscribe.c \
1822 $(CONFIG_H) \
1823 $(EMACS_ROOT)/nt/inc/sys/time.h \
1824 $(LISP_H) \
1825 $(SRC)/ccl.h \
1826 $(SRC)/character.h \
1827 $(SRC)/charset.h \
1828 $(SRC)/composite.h \ 1595 $(SRC)/composite.h \
1829 $(SRC)/dispextern.h \
1830 $(SRC)/font.h \
1831 $(SRC)/fontset.h \ 1596 $(SRC)/fontset.h \
1832 $(SRC)/frame.h \
1833 $(SRC)/systime.h \
1834 $(SRC)/w32font.h \ 1597 $(SRC)/w32font.h \
1835 $(SRC)/w32gui.h \ 1598 $(CHARACTER_H) \
1836 $(SRC)/w32term.h 1599 $(CHARSET_H) \
1600 $(CONFIG_H) \
1601 $(DISPEXTERN_H) \
1602 $(FONT_H) \
1603 $(FRAME_H) \
1604 $(LISP_H) \
1605 $(W32TERM_H)
1837 1606
1838# Each object file depends on stamp_BLD, because in parallel builds we must 1607# Each object file depends on stamp_BLD, because in parallel builds we must
1839# make sure $(BLD) exists before starting compilations. 1608# make sure $(BLD) exists before starting compilations.
diff --git a/src/process.c b/src/process.c
index c46437fe8cb..0fe7068af3b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4479,13 +4479,19 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
4479 set_waiting_for_input (&timeout); 4479 set_waiting_for_input (&timeout);
4480 } 4480 }
4481 4481
4482 /* Skip the `select' call if input is available and we're
4483 waiting for keyboard input or a cell change (which can be
4484 triggered by processing X events). In the latter case, set
4485 nfds to 1 to avoid breaking the loop. */
4482 no_avail = 0; 4486 no_avail = 0;
4483 if (read_kbd && detect_input_pending ()) 4487 if ((read_kbd || !NILP (wait_for_cell))
4488 && detect_input_pending ())
4484 { 4489 {
4485 nfds = 0; 4490 nfds = read_kbd ? 0 : 1;
4486 no_avail = 1; 4491 no_avail = 1;
4487 } 4492 }
4488 else 4493
4494 if (!no_avail)
4489 { 4495 {
4490 4496
4491#ifdef ADAPTIVE_READ_BUFFERING 4497#ifdef ADAPTIVE_READ_BUFFERING
diff --git a/src/window.c b/src/window.c
index ebfe318defd..93f763ec9af 100644
--- a/src/window.c
+++ b/src/window.c
@@ -84,8 +84,8 @@ static int foreach_window_1 (struct window *,
84 int (* fn) (struct window *, void *), 84 int (* fn) (struct window *, void *),
85 void *); 85 void *);
86static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); 86static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object);
87static int resize_window_check (struct window *, int); 87static int window_resize_check (struct window *, int);
88static void resize_window_apply (struct window *, int); 88static void window_resize_apply (struct window *, int);
89static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); 89static Lisp_Object select_window (Lisp_Object, Lisp_Object, int);
90 90
91/* This is the window in which the terminal's cursor should 91/* This is the window in which the terminal's cursor should
@@ -436,37 +436,37 @@ Return nil if WINDOW has no parent. */)
436 return decode_any_window (window)->parent; 436 return decode_any_window (window)->parent;
437} 437}
438 438
439DEFUN ("window-vchild", Fwindow_vchild, Swindow_vchild, 0, 1, 0, 439DEFUN ("window-top-child", Fwindow_top_child, Swindow_top_child, 0, 1, 0,
440 doc: /* Return WINDOW's first vertical child window. 440 doc: /* Return WINDOW's topmost child window.
441WINDOW can be any window and defaults to the selected one. 441WINDOW can be any window and defaults to the selected one.
442Return nil if WINDOW has no vertical child. */) 442Return nil if WINDOW is not a vertical combination. */)
443 (Lisp_Object window) 443 (Lisp_Object window)
444{ 444{
445 return decode_any_window (window)->vchild; 445 return decode_any_window (window)->vchild;
446} 446}
447 447
448DEFUN ("window-hchild", Fwindow_hchild, Swindow_hchild, 0, 1, 0, 448DEFUN ("window-left-child", Fwindow_left_child, Swindow_left_child, 0, 1, 0,
449 doc: /* Return WINDOW's first horizontal child window. 449 doc: /* Return WINDOW's leftmost child window.
450WINDOW can be any window and defaults to the selected one. 450WINDOW can be any window and defaults to the selected one.
451Return nil if WINDOW has no horizontal child. */) 451Return nil if WINDOW is not a horizontal combination. */)
452 (Lisp_Object window) 452 (Lisp_Object window)
453{ 453{
454 return decode_any_window (window)->hchild; 454 return decode_any_window (window)->hchild;
455} 455}
456 456
457DEFUN ("window-next", Fwindow_next, Swindow_next, 0, 1, 0, 457DEFUN ("window-next-sibling", Fwindow_next_sibling, Swindow_next_sibling, 0, 1, 0,
458 doc: /* Return WINDOW's right sibling window. 458 doc: /* Return WINDOW's next sibling window.
459WINDOW can be any window and defaults to the selected one. 459WINDOW can be any window and defaults to the selected one.
460Return nil if WINDOW has no right sibling. */) 460Return nil if WINDOW has no next sibling. */)
461 (Lisp_Object window) 461 (Lisp_Object window)
462{ 462{
463 return decode_any_window (window)->next; 463 return decode_any_window (window)->next;
464} 464}
465 465
466DEFUN ("window-prev", Fwindow_prev, Swindow_prev, 0, 1, 0, 466DEFUN ("window-prev-sibling", Fwindow_prev_sibling, Swindow_prev_sibling, 0, 1, 0,
467 doc: /* Return WINDOW's left sibling window. 467 doc: /* Return WINDOW's previous sibling window.
468WINDOW can be any window and defaults to the selected one. 468WINDOW can be any window and defaults to the selected one.
469Return nil if WINDOW has no left sibling. */) 469Return nil if WINDOW has no previous sibling. */)
470 (Lisp_Object window) 470 (Lisp_Object window)
471{ 471{
472 return decode_any_window (window)->prev; 472 return decode_any_window (window)->prev;
@@ -2697,13 +2697,13 @@ window-start value is reasonable when this function is called. */)
2697 XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); 2697 XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines));
2698 w->top_line = r->top_line; 2698 w->top_line = r->top_line;
2699 resize_root_window (window, delta, Qnil, Qnil); 2699 resize_root_window (window, delta, Qnil, Qnil);
2700 if (resize_window_check (w, 0)) 2700 if (window_resize_check (w, 0))
2701 resize_window_apply (w, 0); 2701 window_resize_apply (w, 0);
2702 else 2702 else
2703 { 2703 {
2704 resize_root_window (window, delta, Qnil, Qt); 2704 resize_root_window (window, delta, Qnil, Qt);
2705 if (resize_window_check (w, 0)) 2705 if (window_resize_check (w, 0))
2706 resize_window_apply (w, 0); 2706 window_resize_apply (w, 0);
2707 else 2707 else
2708 resize_failed = 1; 2708 resize_failed = 1;
2709 } 2709 }
@@ -2715,13 +2715,13 @@ window-start value is reasonable when this function is called. */)
2715 XSETINT (delta, XINT (r->total_cols) - XINT (w->total_cols)); 2715 XSETINT (delta, XINT (r->total_cols) - XINT (w->total_cols));
2716 w->left_col = r->left_col; 2716 w->left_col = r->left_col;
2717 resize_root_window (window, delta, Qt, Qnil); 2717 resize_root_window (window, delta, Qt, Qnil);
2718 if (resize_window_check (w, 1)) 2718 if (window_resize_check (w, 1))
2719 resize_window_apply (w, 1); 2719 window_resize_apply (w, 1);
2720 else 2720 else
2721 { 2721 {
2722 resize_root_window (window, delta, Qt, Qt); 2722 resize_root_window (window, delta, Qt, Qt);
2723 if (resize_window_check (w, 1)) 2723 if (window_resize_check (w, 1))
2724 resize_window_apply (w, 1); 2724 window_resize_apply (w, 1);
2725 else 2725 else
2726 resize_failed = 1; 2726 resize_failed = 1;
2727 } 2727 }
@@ -3417,7 +3417,7 @@ Note: This function does not operate on any subwindows of WINDOW. */)
3417 `window-min-height' or `window-min-width'. It does check that window 3417 `window-min-height' or `window-min-width'. It does check that window
3418 sizes do not drop below one line (two columns). */ 3418 sizes do not drop below one line (two columns). */
3419static int 3419static int
3420resize_window_check (struct window *w, int horflag) 3420window_resize_check (struct window *w, int horflag)
3421{ 3421{
3422 struct window *c; 3422 struct window *c;
3423 3423
@@ -3431,7 +3431,7 @@ resize_window_check (struct window *w, int horflag)
3431 while (c) 3431 while (c)
3432 { 3432 {
3433 if ((XINT (c->new_total) != XINT (w->new_total)) 3433 if ((XINT (c->new_total) != XINT (w->new_total))
3434 || !resize_window_check (c, horflag)) 3434 || !window_resize_check (c, horflag))
3435 return 0; 3435 return 0;
3436 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3436 c = NILP (c->next) ? 0 : XWINDOW (c->next);
3437 } 3437 }
@@ -3444,7 +3444,7 @@ resize_window_check (struct window *w, int horflag)
3444 int sum_of_sizes = 0; 3444 int sum_of_sizes = 0;
3445 while (c) 3445 while (c)
3446 { 3446 {
3447 if (!resize_window_check (c, horflag)) 3447 if (!window_resize_check (c, horflag))
3448 return 0; 3448 return 0;
3449 sum_of_sizes = sum_of_sizes + XINT (c->new_total); 3449 sum_of_sizes = sum_of_sizes + XINT (c->new_total);
3450 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3450 c = NILP (c->next) ? 0 : XWINDOW (c->next);
@@ -3463,7 +3463,7 @@ resize_window_check (struct window *w, int horflag)
3463 int sum_of_sizes = 0; 3463 int sum_of_sizes = 0;
3464 while (c) 3464 while (c)
3465 { 3465 {
3466 if (!resize_window_check (c, horflag)) 3466 if (!window_resize_check (c, horflag))
3467 return 0; 3467 return 0;
3468 sum_of_sizes = sum_of_sizes + XINT (c->new_total); 3468 sum_of_sizes = sum_of_sizes + XINT (c->new_total);
3469 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3469 c = NILP (c->next) ? 0 : XWINDOW (c->next);
@@ -3476,7 +3476,7 @@ resize_window_check (struct window *w, int horflag)
3476 while (c) 3476 while (c)
3477 { 3477 {
3478 if ((XINT (c->new_total) != XINT (w->new_total)) 3478 if ((XINT (c->new_total) != XINT (w->new_total))
3479 || !resize_window_check (c, horflag)) 3479 || !window_resize_check (c, horflag))
3480 return 0; 3480 return 0;
3481 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3481 c = NILP (c->next) ? 0 : XWINDOW (c->next);
3482 } 3482 }
@@ -3496,9 +3496,9 @@ resize_window_check (struct window *w, int horflag)
3496 each of these windows. 3496 each of these windows.
3497 3497
3498 This function does not perform any error checks. Make sure you have 3498 This function does not perform any error checks. Make sure you have
3499 run resize_window_check on W before applying this function. */ 3499 run window_resize_check on W before applying this function. */
3500static void 3500static void
3501resize_window_apply (struct window *w, int horflag) 3501window_resize_apply (struct window *w, int horflag)
3502{ 3502{
3503 struct window *c; 3503 struct window *c;
3504 int pos; 3504 int pos;
@@ -3532,7 +3532,7 @@ resize_window_apply (struct window *w, int horflag)
3532 XSETFASTINT (c->left_col, pos); 3532 XSETFASTINT (c->left_col, pos);
3533 else 3533 else
3534 XSETFASTINT (c->top_line, pos); 3534 XSETFASTINT (c->top_line, pos);
3535 resize_window_apply (c, horflag); 3535 window_resize_apply (c, horflag);
3536 if (!horflag) 3536 if (!horflag)
3537 pos = pos + XINT (c->total_lines); 3537 pos = pos + XINT (c->total_lines);
3538 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3538 c = NILP (c->next) ? 0 : XWINDOW (c->next);
@@ -3548,7 +3548,7 @@ resize_window_apply (struct window *w, int horflag)
3548 XSETFASTINT (c->left_col, pos); 3548 XSETFASTINT (c->left_col, pos);
3549 else 3549 else
3550 XSETFASTINT (c->top_line, pos); 3550 XSETFASTINT (c->top_line, pos);
3551 resize_window_apply (c, horflag); 3551 window_resize_apply (c, horflag);
3552 if (horflag) 3552 if (horflag)
3553 pos = pos + XINT (c->total_cols); 3553 pos = pos + XINT (c->total_cols);
3554 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3554 c = NILP (c->next) ? 0 : XWINDOW (c->next);
@@ -3561,7 +3561,7 @@ resize_window_apply (struct window *w, int horflag)
3561} 3561}
3562 3562
3563 3563
3564DEFUN ("resize-window-apply", Fresize_window_apply, Sresize_window_apply, 1, 2, 0, 3564DEFUN ("window-resize-apply", Fwindow_resize_apply, Swindow_resize_apply, 1, 2, 0,
3565 doc: /* Apply requested size values for window-tree of FRAME. 3565 doc: /* Apply requested size values for window-tree of FRAME.
3566Optional argument HORIZONTAL omitted or nil means apply requested height 3566Optional argument HORIZONTAL omitted or nil means apply requested height
3567values. HORIZONTAL non-nil means apply requested width values. 3567values. HORIZONTAL non-nil means apply requested width values.
@@ -3586,12 +3586,12 @@ be applied on the Elisp level. */)
3586 f = XFRAME (frame); 3586 f = XFRAME (frame);
3587 r = XWINDOW (FRAME_ROOT_WINDOW (f)); 3587 r = XWINDOW (FRAME_ROOT_WINDOW (f));
3588 3588
3589 if (!resize_window_check (r, horflag) 3589 if (!window_resize_check (r, horflag)
3590 || ! EQ (r->new_total, (horflag ? r->total_cols : r->total_lines))) 3590 || ! EQ (r->new_total, (horflag ? r->total_cols : r->total_lines)))
3591 return Qnil; 3591 return Qnil;
3592 3592
3593 BLOCK_INPUT; 3593 BLOCK_INPUT;
3594 resize_window_apply (r, horflag); 3594 window_resize_apply (r, horflag);
3595 3595
3596 windows_or_buffers_changed++; 3596 windows_or_buffers_changed++;
3597 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 3597 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
@@ -3643,22 +3643,22 @@ resize_frame_windows (struct frame *f, int size, int horflag)
3643 XSETINT (delta, new_size - old_size); 3643 XSETINT (delta, new_size - old_size);
3644 /* Try a "normal" resize first. */ 3644 /* Try a "normal" resize first. */
3645 resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil); 3645 resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil);
3646 if (resize_window_check (r, horflag) && new_size == XINT (r->new_total)) 3646 if (window_resize_check (r, horflag) && new_size == XINT (r->new_total))
3647 resize_window_apply (r, horflag); 3647 window_resize_apply (r, horflag);
3648 else 3648 else
3649 { 3649 {
3650 /* Try with "reasonable" minimum sizes next. */ 3650 /* Try with "reasonable" minimum sizes next. */
3651 resize_root_window (root, delta, horflag ? Qt : Qnil, Qt); 3651 resize_root_window (root, delta, horflag ? Qt : Qnil, Qt);
3652 if (resize_window_check (r, horflag) 3652 if (window_resize_check (r, horflag)
3653 && new_size == XINT (r->new_total)) 3653 && new_size == XINT (r->new_total))
3654 resize_window_apply (r, horflag); 3654 window_resize_apply (r, horflag);
3655 else 3655 else
3656 { 3656 {
3657 /* Finally, try with "safe" minimum sizes. */ 3657 /* Finally, try with "safe" minimum sizes. */
3658 resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe); 3658 resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe);
3659 if (resize_window_check (r, horflag) 3659 if (window_resize_check (r, horflag)
3660 && new_size == XINT (r->new_total)) 3660 && new_size == XINT (r->new_total))
3661 resize_window_apply (r, horflag); 3661 window_resize_apply (r, horflag);
3662 else 3662 else
3663 { 3663 {
3664 /* We lost. Delete all windows but the frame's 3664 /* We lost. Delete all windows but the frame's
@@ -3767,7 +3767,7 @@ set correctly. See the code of `split-window' for how this is done. */)
3767 XSETINT (p->new_total, 3767 XSETINT (p->new_total,
3768 XINT (horflag ? p->total_cols : p->total_lines) 3768 XINT (horflag ? p->total_cols : p->total_lines)
3769 - XINT (total_size)); 3769 - XINT (total_size));
3770 if (!resize_window_check (p, horflag)) 3770 if (!window_resize_check (p, horflag))
3771 error ("Window sizes don't fit"); 3771 error ("Window sizes don't fit");
3772 else 3772 else
3773 /* Undo the temporary pretension. */ 3773 /* Undo the temporary pretension. */
@@ -3775,7 +3775,7 @@ set correctly. See the code of `split-window' for how this is done. */)
3775 } 3775 }
3776 else 3776 else
3777 { 3777 {
3778 if (!resize_window_check (o, horflag)) 3778 if (!window_resize_check (o, horflag))
3779 error ("Resizing old window failed"); 3779 error ("Resizing old window failed");
3780 else if (XINT (total_size) + XINT (o->new_total) 3780 else if (XINT (total_size) + XINT (o->new_total)
3781 != XINT (horflag ? o->total_cols : o->total_lines)) 3781 != XINT (horflag ? o->total_cols : o->total_lines))
@@ -3863,13 +3863,13 @@ set correctly. See the code of `split-window' for how this is done. */)
3863 n->total_cols = o->total_cols; 3863 n->total_cols = o->total_cols;
3864 } 3864 }
3865 3865
3866 /* Iso-coordinates and sizes are assigned by resize_window_apply, 3866 /* Iso-coordinates and sizes are assigned by window_resize_apply,
3867 get them ready here. */ 3867 get them ready here. */
3868 n->new_total = total_size; 3868 n->new_total = total_size;
3869 n->new_normal = normal_size; 3869 n->new_normal = normal_size;
3870 3870
3871 BLOCK_INPUT; 3871 BLOCK_INPUT;
3872 resize_window_apply (p, horflag); 3872 window_resize_apply (p, horflag);
3873 adjust_glyphs (f); 3873 adjust_glyphs (f);
3874 /* Set buffer of NEW to buffer of reference window. Don't run 3874 /* Set buffer of NEW to buffer of reference window. Don't run
3875 any hooks. */ 3875 any hooks. */
@@ -3947,13 +3947,13 @@ when WINDOW is the only window on its frame. */)
3947 XWINDOW (s->next)->prev = sibling; 3947 XWINDOW (s->next)->prev = sibling;
3948 } 3948 }
3949 3949
3950 if (resize_window_check (r, horflag) 3950 if (window_resize_check (r, horflag)
3951 && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines))) 3951 && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines)))
3952 /* We can delete WINDOW now. */ 3952 /* We can delete WINDOW now. */
3953 { 3953 {
3954 /* Block input. */ 3954 /* Block input. */
3955 BLOCK_INPUT; 3955 BLOCK_INPUT;
3956 resize_window_apply (p, horflag); 3956 window_resize_apply (p, horflag);
3957 3957
3958 windows_or_buffers_changed++; 3958 windows_or_buffers_changed++;
3959 Vwindow_list = Qnil; 3959 Vwindow_list = Qnil;
@@ -4076,10 +4076,10 @@ grow_mini_window (struct window *w, int delta)
4076 root = FRAME_ROOT_WINDOW (f); 4076 root = FRAME_ROOT_WINDOW (f);
4077 r = XWINDOW (root); 4077 r = XWINDOW (root);
4078 value = call2 (Qresize_root_window_vertically, root, make_number (- delta)); 4078 value = call2 (Qresize_root_window_vertically, root, make_number (- delta));
4079 if (INTEGERP (value) && resize_window_check (r, 0)) 4079 if (INTEGERP (value) && window_resize_check (r, 0))
4080 { 4080 {
4081 BLOCK_INPUT; 4081 BLOCK_INPUT;
4082 resize_window_apply (r, 0); 4082 window_resize_apply (r, 0);
4083 4083
4084 /* Grow the mini-window. */ 4084 /* Grow the mini-window. */
4085 XSETFASTINT (w->top_line, XFASTINT (r->top_line) + XFASTINT (r->total_lines)); 4085 XSETFASTINT (w->top_line, XFASTINT (r->top_line) + XFASTINT (r->total_lines));
@@ -4111,10 +4111,10 @@ shrink_mini_window (struct window *w)
4111 r = XWINDOW (root); 4111 r = XWINDOW (root);
4112 value = call2 (Qresize_root_window_vertically, 4112 value = call2 (Qresize_root_window_vertically,
4113 root, make_number (size - 1)); 4113 root, make_number (size - 1));
4114 if (INTEGERP (value) && resize_window_check (r, 0)) 4114 if (INTEGERP (value) && window_resize_check (r, 0))
4115 { 4115 {
4116 BLOCK_INPUT; 4116 BLOCK_INPUT;
4117 resize_window_apply (r, 0); 4117 window_resize_apply (r, 0);
4118 4118
4119 /* Shrink the mini-window. */ 4119 /* Shrink the mini-window. */
4120 XSETFASTINT (w->top_line, XFASTINT (r->top_line) + XFASTINT (r->total_lines)); 4120 XSETFASTINT (w->top_line, XFASTINT (r->top_line) + XFASTINT (r->total_lines));
@@ -4152,12 +4152,12 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
4152 4152
4153 r = XWINDOW (FRAME_ROOT_WINDOW (f)); 4153 r = XWINDOW (FRAME_ROOT_WINDOW (f));
4154 height = XINT (r->total_lines) + XINT (w->total_lines); 4154 height = XINT (r->total_lines) + XINT (w->total_lines);
4155 if (resize_window_check (r, 0) 4155 if (window_resize_check (r, 0)
4156 && XINT (w->new_total) > 0 4156 && XINT (w->new_total) > 0
4157 && height == XINT (r->new_total) + XINT (w->new_total)) 4157 && height == XINT (r->new_total) + XINT (w->new_total))
4158 { 4158 {
4159 BLOCK_INPUT; 4159 BLOCK_INPUT;
4160 resize_window_apply (r, 0); 4160 window_resize_apply (r, 0);
4161 4161
4162 w->total_lines = w->new_total; 4162 w->total_lines = w->new_total;
4163 XSETFASTINT (w->top_line, XINT (r->top_line) + XINT (r->total_lines)); 4163 XSETFASTINT (w->top_line, XINT (r->top_line) + XINT (r->total_lines));
@@ -6600,10 +6600,10 @@ function `window-nest' and altered by the function `set-window-nest'. */);
6600 defsubr (&Swindow_clone_number); 6600 defsubr (&Swindow_clone_number);
6601 defsubr (&Swindow_buffer); 6601 defsubr (&Swindow_buffer);
6602 defsubr (&Swindow_parent); 6602 defsubr (&Swindow_parent);
6603 defsubr (&Swindow_vchild); 6603 defsubr (&Swindow_top_child);
6604 defsubr (&Swindow_hchild); 6604 defsubr (&Swindow_left_child);
6605 defsubr (&Swindow_next); 6605 defsubr (&Swindow_next_sibling);
6606 defsubr (&Swindow_prev); 6606 defsubr (&Swindow_prev_sibling);
6607 defsubr (&Swindow_splits); 6607 defsubr (&Swindow_splits);
6608 defsubr (&Sset_window_splits); 6608 defsubr (&Sset_window_splits);
6609 defsubr (&Swindow_nest); 6609 defsubr (&Swindow_nest);
@@ -6617,7 +6617,7 @@ function `window-nest' and altered by the function `set-window-nest'. */);
6617 defsubr (&Swindow_new_normal); 6617 defsubr (&Swindow_new_normal);
6618 defsubr (&Sset_window_new_total); 6618 defsubr (&Sset_window_new_total);
6619 defsubr (&Sset_window_new_normal); 6619 defsubr (&Sset_window_new_normal);
6620 defsubr (&Sresize_window_apply); 6620 defsubr (&Swindow_resize_apply);
6621 defsubr (&Swindow_body_size); 6621 defsubr (&Swindow_body_size);
6622 defsubr (&Swindow_hscroll); 6622 defsubr (&Swindow_hscroll);
6623 defsubr (&Sset_window_hscroll); 6623 defsubr (&Sset_window_hscroll);