diff options
| author | Kenichi Handa | 2013-09-12 23:48:18 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2013-09-12 23:48:18 +0900 |
| commit | 56d968a488c68563c5eae8264b7d3adfee9dc684 (patch) | |
| tree | 712adf1c2f7e12ac9d169958ea63760ad42fc6ce | |
| parent | b5623270b6047528786d4550cebe0b228ecadb6b (diff) | |
| parent | 4dfa4b9bd944fa385b248b5b0b56e95979119420 (diff) | |
| download | emacs-56d968a488c68563c5eae8264b7d3adfee9dc684.tar.gz emacs-56d968a488c68563c5eae8264b7d3adfee9dc684.zip | |
merge trunk
153 files changed, 2036 insertions, 1720 deletions
| @@ -1,3 +1,19 @@ | |||
| 1 | 2013-09-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.ac (LDFLAGS_NOCOMBRELOC): New variable. | ||
| 4 | (LDFLAGS): Move nocombreloc option from here... | ||
| 5 | (LD_SWITCH_SYSTEM_TEMACS): ... to here. | ||
| 6 | |||
| 7 | 2013-09-08 Glenn Morris <rgm@gnu.org> | ||
| 8 | |||
| 9 | * configure.ac (--without-compress-install): | ||
| 10 | Rename from --without-compress-info. (Bug#9789) | ||
| 11 | (GZIP_INFO): Remove. | ||
| 12 | (GZIP_PROG): Allow --without-compress-install to disable it. | ||
| 13 | * Makefile.in (GZIP_INFO): Remove all references. | ||
| 14 | |||
| 15 | * info/dir: Tweak emacs-gnutls entry. | ||
| 16 | |||
| 1 | 2013-09-07 Paul Eggert <eggert@cs.ucla.edu> | 17 | 2013-09-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 18 | ||
| 3 | Port --without-x --enable-gcc-warnings to Fedora 19. | 19 | Port --without-x --enable-gcc-warnings to Fedora 19. |
diff --git a/Makefile.in b/Makefile.in index 204099cc202..c6254fd6098 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -259,8 +259,6 @@ LN_S_FILEONLY = @LN_S_FILEONLY@ | |||
| 259 | 259 | ||
| 260 | # We use gzip to compress installed .el files. | 260 | # We use gzip to compress installed .el files. |
| 261 | GZIP_PROG = @GZIP_PROG@ | 261 | GZIP_PROG = @GZIP_PROG@ |
| 262 | # If non-nil, gzip the installed Info and man pages. | ||
| 263 | GZIP_INFO = @GZIP_INFO@ | ||
| 264 | 262 | ||
| 265 | # ============================= Targets ============================== | 263 | # ============================= Targets ============================== |
| 266 | 264 | ||
| @@ -662,7 +660,7 @@ install-info: info | |||
| 662 | for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ | 660 | for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ |
| 663 | (cd $${thisdir}; \ | 661 | (cd $${thisdir}; \ |
| 664 | ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \ | 662 | ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \ |
| 665 | ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ | 663 | [ -n "${GZIP_PROG}" ] || continue ; \ |
| 666 | rm -f $(DESTDIR)${infodir}/$$f.gz; \ | 664 | rm -f $(DESTDIR)${infodir}/$$f.gz; \ |
| 667 | ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \ | 665 | ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \ |
| 668 | done; \ | 666 | done; \ |
| @@ -684,7 +682,7 @@ install-man: | |||
| 684 | dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \ | 682 | dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \ |
| 685 | (cd $${thisdir}; \ | 683 | (cd $${thisdir}; \ |
| 686 | ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \ | 684 | ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \ |
| 687 | ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ | 685 | [ -n "${GZIP_PROG}" ] || continue ; \ |
| 688 | rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \ | 686 | rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \ |
| 689 | ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \ | 687 | ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \ |
| 690 | done | 688 | done |
| @@ -754,12 +752,12 @@ uninstall: uninstall-$(NTDIR) uninstall-doc | |||
| 754 | for elt in ${INFO_NONMISC} $${info_misc}; do \ | 752 | for elt in ${INFO_NONMISC} $${info_misc}; do \ |
| 755 | (cd $${thisdir}; \ | 753 | (cd $${thisdir}; \ |
| 756 | $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \ | 754 | $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \ |
| 757 | if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ | 755 | if [ -n "${GZIP_PROG}" ]; then \ |
| 758 | ext=.gz; else ext=; fi; \ | 756 | ext=.gz; else ext=; fi; \ |
| 759 | rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \ | 757 | rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \ |
| 760 | done; \ | 758 | done; \ |
| 761 | fi) | 759 | fi) |
| 762 | (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ | 760 | (if [ -n "${GZIP_PROG}" ]; then \ |
| 763 | ext=.gz; else ext=; fi; \ | 761 | ext=.gz; else ext=; fi; \ |
| 764 | if cd ${mansrcdir}; then \ | 762 | if cd ${mansrcdir}; then \ |
| 765 | for page in *.1; do \ | 763 | for page in *.1; do \ |
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index f26d3dce212..19904e8631e 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -677,7 +677,6 @@ GSETTINGS_LIBS = @GSETTINGS_LIBS@ | |||
| 677 | GTK_CFLAGS = @GTK_CFLAGS@ | 677 | GTK_CFLAGS = @GTK_CFLAGS@ |
| 678 | GTK_LIBS = @GTK_LIBS@ | 678 | GTK_LIBS = @GTK_LIBS@ |
| 679 | GTK_OBJ = @GTK_OBJ@ | 679 | GTK_OBJ = @GTK_OBJ@ |
| 680 | GZIP_INFO = @GZIP_INFO@ | ||
| 681 | GZIP_PROG = @GZIP_PROG@ | 680 | GZIP_PROG = @GZIP_PROG@ |
| 682 | HAVE_ALPHASORT = @HAVE_ALPHASORT@ | 681 | HAVE_ALPHASORT = @HAVE_ALPHASORT@ |
| 683 | HAVE_ATOLL = @HAVE_ATOLL@ | 682 | HAVE_ATOLL = @HAVE_ATOLL@ |
diff --git a/autogen/configure b/autogen/configure index 4be101ce418..a0f302b4ac0 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -1442,7 +1442,6 @@ build_vendor | |||
| 1442 | build_cpu | 1442 | build_cpu |
| 1443 | build | 1443 | build |
| 1444 | PROFILING_CFLAGS | 1444 | PROFILING_CFLAGS |
| 1445 | GZIP_INFO | ||
| 1446 | cache_file | 1445 | cache_file |
| 1447 | am__untar | 1446 | am__untar |
| 1448 | am__tar | 1447 | am__tar |
| @@ -1545,7 +1544,7 @@ with_gnutls | |||
| 1545 | with_zlib | 1544 | with_zlib |
| 1546 | with_file_notification | 1545 | with_file_notification |
| 1547 | with_makeinfo | 1546 | with_makeinfo |
| 1548 | with_compress_info | 1547 | with_compress_install |
| 1549 | with_pkg_config_prog | 1548 | with_pkg_config_prog |
| 1550 | with_gameuser | 1549 | with_gameuser |
| 1551 | with_gnustep_conf | 1550 | with_gnustep_conf |
| @@ -2278,7 +2277,9 @@ Optional Packages: | |||
| 2278 | use a file notification library (LIB one of: yes, | 2277 | use a file notification library (LIB one of: yes, |
| 2279 | gfile, inotify, w32, no) | 2278 | gfile, inotify, w32, no) |
| 2280 | --without-makeinfo don't require makeinfo for building manuals | 2279 | --without-makeinfo don't require makeinfo for building manuals |
| 2281 | --without-compress-info don't compress the installed Info pages | 2280 | --without-compress-install |
| 2281 | don't compress some files (.el, .info, etc.) when | ||
| 2282 | installing. Equivalent to: make GZIP_PROG= install | ||
| 2282 | --with-pkg-config-prog=FILENAME | 2283 | --with-pkg-config-prog=FILENAME |
| 2283 | file name of pkg-config for finding GTK and librsvg | 2284 | file name of pkg-config for finding GTK and librsvg |
| 2284 | --with-gameuser=USER user for shared game score files | 2285 | --with-gameuser=USER user for shared game score files |
| @@ -4429,17 +4430,11 @@ fi | |||
| 4429 | ## This is an option because I do not know if all info/man support | 4430 | ## This is an option because I do not know if all info/man support |
| 4430 | ## compressed files, nor how to test if they do so. | 4431 | ## compressed files, nor how to test if they do so. |
| 4431 | 4432 | ||
| 4432 | # Check whether --with-compress-info was given. | 4433 | # Check whether --with-compress-install was given. |
| 4433 | if test "${with_compress_info+set}" = set; then : | 4434 | if test "${with_compress_install+set}" = set; then : |
| 4434 | withval=$with_compress_info; | 4435 | withval=$with_compress_install; |
| 4435 | else | 4436 | else |
| 4436 | with_compress_info=$with_features | 4437 | with_compress_install=$with_features |
| 4437 | fi | ||
| 4438 | |||
| 4439 | if test $with_compress_info = yes; then | ||
| 4440 | GZIP_INFO=yes | ||
| 4441 | else | ||
| 4442 | GZIP_INFO= | ||
| 4443 | fi | 4438 | fi |
| 4444 | 4439 | ||
| 4445 | 4440 | ||
| @@ -8618,6 +8613,9 @@ fi | |||
| 8618 | 8613 | ||
| 8619 | 8614 | ||
| 8620 | 8615 | ||
| 8616 | test $with_compress_install != yes && test -n "$GZIP_PROG" && \ | ||
| 8617 | GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" | ||
| 8618 | |||
| 8621 | if test $opsys = gnu-linux; then | 8619 | if test $opsys = gnu-linux; then |
| 8622 | # Extract the first word of "paxctl", so it can be a program name with args. | 8620 | # Extract the first word of "paxctl", so it can be a program name with args. |
| 8623 | set dummy paxctl; ac_word=$2 | 8621 | set dummy paxctl; ac_word=$2 |
| @@ -8781,13 +8779,15 @@ else | |||
| 8781 | fi | 8779 | fi |
| 8782 | 8780 | ||
| 8783 | 8781 | ||
| 8784 | late_LDFLAGS=$LDFLAGS | 8782 | late_LDFLAGS="$LDFLAGS" |
| 8785 | if test x$GCC = xyes; then | 8783 | if test x$GCC = xyes; then |
| 8786 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | 8784 | LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc" |
| 8787 | else | 8785 | else |
| 8788 | LDFLAGS="$LDFLAGS -znocombreloc" | 8786 | LDFLAGS_NOCOMBRELOC="-znocombreloc" |
| 8789 | fi | 8787 | fi |
| 8790 | 8788 | ||
| 8789 | LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC" | ||
| 8790 | |||
| 8791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | 8791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 |
| 8792 | $as_echo_n "checking for -znocombreloc... " >&6; } | 8792 | $as_echo_n "checking for -znocombreloc... " >&6; } |
| 8793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 8793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| @@ -8805,13 +8805,14 @@ if ac_fn_c_try_link "$LINENO"; then : | |||
| 8805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | 8805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8806 | $as_echo "yes" >&6; } | 8806 | $as_echo "yes" >&6; } |
| 8807 | else | 8807 | else |
| 8808 | LDFLAGS=$late_LDFLAGS | 8808 | LDFLAGS_NOCOMBRELOC= |
| 8809 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 8809 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8810 | $as_echo "no" >&6; } | 8810 | $as_echo "no" >&6; } |
| 8811 | fi | 8811 | fi |
| 8812 | rm -f core conftest.err conftest.$ac_objext \ | 8812 | rm -f core conftest.err conftest.$ac_objext \ |
| 8813 | conftest$ac_exeext conftest.$ac_ext | 8813 | conftest$ac_exeext conftest.$ac_ext |
| 8814 | 8814 | ||
| 8815 | LDFLAGS="$late_LDFLAGS" | ||
| 8815 | 8816 | ||
| 8816 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no | 8817 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
| 8817 | case "$opsys" in | 8818 | case "$opsys" in |
| @@ -29051,6 +29052,8 @@ if test x$ac_enable_profiling != x ; then | |||
| 29051 | esac | 29052 | esac |
| 29052 | fi | 29053 | fi |
| 29053 | 29054 | ||
| 29055 | LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS" | ||
| 29056 | |||
| 29054 | 29057 | ||
| 29055 | 29058 | ||
| 29056 | ## MinGW-specific post-link processing of temacs. | 29059 | ## MinGW-specific post-link processing of temacs. |
diff --git a/configure.ac b/configure.ac index c7cdc01e3e7..ab2e48b6f0f 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -266,13 +266,9 @@ AC_SUBST(cache_file) | |||
| 266 | 266 | ||
| 267 | ## This is an option because I do not know if all info/man support | 267 | ## This is an option because I do not know if all info/man support |
| 268 | ## compressed files, nor how to test if they do so. | 268 | ## compressed files, nor how to test if they do so. |
| 269 | OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages]) | 269 | OPTION_DEFAULT_ON([compress-install], |
| 270 | if test $with_compress_info = yes; then | 270 | [don't compress some files (.el, .info, etc.) when installing. Equivalent to: |
| 271 | GZIP_INFO=yes | 271 | make GZIP_PROG= install]) |
| 272 | else | ||
| 273 | GZIP_INFO= | ||
| 274 | fi | ||
| 275 | AC_SUBST(GZIP_INFO) | ||
| 276 | 272 | ||
| 277 | AC_ARG_WITH([pkg-config-prog],dnl | 273 | AC_ARG_WITH([pkg-config-prog],dnl |
| 278 | [AS_HELP_STRING([--with-pkg-config-prog=FILENAME], | 274 | [AS_HELP_STRING([--with-pkg-config-prog=FILENAME], |
| @@ -950,6 +946,9 @@ AC_PATH_PROG(INSTALL_INFO, install-info, :, | |||
| 950 | dnl Don't use GZIP, which is used by gzip for additional parameters. | 946 | dnl Don't use GZIP, which is used by gzip for additional parameters. |
| 951 | AC_PATH_PROG(GZIP_PROG, gzip) | 947 | AC_PATH_PROG(GZIP_PROG, gzip) |
| 952 | 948 | ||
| 949 | test $with_compress_install != yes && test -n "$GZIP_PROG" && \ | ||
| 950 | GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" | ||
| 951 | |||
| 953 | if test $opsys = gnu-linux; then | 952 | if test $opsys = gnu-linux; then |
| 954 | AC_PATH_PROG(PAXCTL, paxctl,, | 953 | AC_PATH_PROG(PAXCTL, paxctl,, |
| 955 | [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) | 954 | [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) |
| @@ -1027,19 +1026,30 @@ dnl (Don't use `-z nocombreloc' as -z takes no arg on Irix.) | |||
| 1027 | dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' | 1026 | dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' |
| 1028 | dnl if not built to support GNU ld. | 1027 | dnl if not built to support GNU ld. |
| 1029 | 1028 | ||
| 1030 | late_LDFLAGS=$LDFLAGS | 1029 | dnl For a long time, -znocombreloc was added to LDFLAGS rather than |
| 1030 | dnl LD_SWITCH_SYSTEM_TEMACS. That is: | ||
| 1031 | dnl * inappropriate, as LDFLAGS is a user option but this is essential. | ||
| 1032 | dnl Eg "make LDFLAGS=... all" could run into problems, | ||
| 1033 | dnl http://bugs.debian.org/684788 | ||
| 1034 | dnl * unnecessary, since temacs is the only thing that actually needs it. | ||
| 1035 | dnl Indeed this is where it was originally, prior to: | ||
| 1036 | dnl http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html | ||
| 1037 | late_LDFLAGS="$LDFLAGS" | ||
| 1031 | if test x$GCC = xyes; then | 1038 | if test x$GCC = xyes; then |
| 1032 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | 1039 | LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc" |
| 1033 | else | 1040 | else |
| 1034 | LDFLAGS="$LDFLAGS -znocombreloc" | 1041 | LDFLAGS_NOCOMBRELOC="-znocombreloc" |
| 1035 | fi | 1042 | fi |
| 1036 | 1043 | ||
| 1044 | LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC" | ||
| 1045 | |||
| 1037 | AC_MSG_CHECKING([for -znocombreloc]) | 1046 | AC_MSG_CHECKING([for -znocombreloc]) |
| 1038 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], | 1047 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
| 1039 | [AC_MSG_RESULT(yes)], | 1048 | [AC_MSG_RESULT(yes)], |
| 1040 | LDFLAGS=$late_LDFLAGS | 1049 | LDFLAGS_NOCOMBRELOC= |
| 1041 | [AC_MSG_RESULT(no)]) | 1050 | [AC_MSG_RESULT(no)]) |
| 1042 | 1051 | ||
| 1052 | LDFLAGS="$late_LDFLAGS" | ||
| 1043 | 1053 | ||
| 1044 | dnl The function dump-emacs will not be defined and temacs will do | 1054 | dnl The function dump-emacs will not be defined and temacs will do |
| 1045 | dnl (load "loadup") automatically unless told otherwise. | 1055 | dnl (load "loadup") automatically unless told otherwise. |
| @@ -4741,6 +4751,8 @@ if test x$ac_enable_profiling != x ; then | |||
| 4741 | esac | 4751 | esac |
| 4742 | fi | 4752 | fi |
| 4743 | 4753 | ||
| 4754 | LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS" | ||
| 4755 | |||
| 4744 | AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) | 4756 | AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) |
| 4745 | 4757 | ||
| 4746 | ## MinGW-specific post-link processing of temacs. | 4758 | ## MinGW-specific post-link processing of temacs. |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 7ff13a70718..b263ca7671a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-09-12 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * text.texi (Enriched Justification): Explain values of default-justification. | ||
| 4 | |||
| 1 | 2013-09-04 Xue Fuqiao <xfq.free@gmail.com> | 5 | 2013-09-04 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 6 | ||
| 3 | * maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument. | 7 | * maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument. |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e5743b064fb..b2cb5ee3d3b 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -2086,6 +2086,7 @@ newlines are used for filling. The @key{RET} (@code{newline}) and | |||
| 2086 | commands, including Auto Fill (@pxref{Auto Fill}), insert only soft | 2086 | commands, including Auto Fill (@pxref{Auto Fill}), insert only soft |
| 2087 | newlines and delete only soft newlines, leaving hard newlines alone. | 2087 | newlines and delete only soft newlines, leaving hard newlines alone. |
| 2088 | 2088 | ||
| 2089 | @c FIXME: I don't see ‘unfilled’ in that node. --xfq | ||
| 2089 | Thus, when editing with Enriched mode, you should not use @key{RET} | 2090 | Thus, when editing with Enriched mode, you should not use @key{RET} |
| 2090 | or @kbd{C-o} to break lines in the middle of filled paragraphs. Use | 2091 | or @kbd{C-o} to break lines in the middle of filled paragraphs. Use |
| 2091 | Auto Fill mode or explicit fill commands (@pxref{Fill Commands}) | 2092 | Auto Fill mode or explicit fill commands (@pxref{Fill Commands}) |
| @@ -2294,13 +2295,13 @@ commands do nothing on text with this setting. You can, however, | |||
| 2294 | still indent the left margin. | 2295 | still indent the left margin. |
| 2295 | @end table | 2296 | @end table |
| 2296 | 2297 | ||
| 2297 | @c FIXME: We should explain the effect of these symbols. --xfq | ||
| 2298 | @vindex default-justification | 2298 | @vindex default-justification |
| 2299 | You can also specify justification styles using the Justification | 2299 | You can also specify justification styles using the Justification |
| 2300 | submenu in the Text Properties menu. The default justification style | 2300 | submenu in the Text Properties menu. The default justification style |
| 2301 | is specified by the per-buffer variable @code{default-justification}. | 2301 | is specified by the per-buffer variable @code{default-justification}. |
| 2302 | Its value should be one of the symbols @code{left}, @code{right}, | 2302 | Its value should be one of the symbols @code{left}, @code{right}, |
| 2303 | @code{full}, @code{center}, or @code{none}. | 2303 | @code{full}, @code{center}, or @code{none}; their meanings correspond |
| 2304 | to the commands above. | ||
| 2304 | 2305 | ||
| 2305 | @node Enriched Properties | 2306 | @node Enriched Properties |
| 2306 | @subsection Setting Other Text Properties | 2307 | @subsection Setting Other Text Properties |
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 0d5ce6820c7..34783796899 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -1140,6 +1140,7 @@ Please help us keep up with the workload by designing the patch in a | |||
| 1140 | form that is clearly safe to install. | 1140 | form that is clearly safe to install. |
| 1141 | @end itemize | 1141 | @end itemize |
| 1142 | 1142 | ||
| 1143 | @c FIXME: Include the node above? | ||
| 1143 | @node Contributing | 1144 | @node Contributing |
| 1144 | @section Contributing to Emacs Development | 1145 | @section Contributing to Emacs Development |
| 1145 | @cindex contributing to Emacs | 1146 | @cindex contributing to Emacs |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 8b5aa65ff96..ed073456e7e 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2013-09-12 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * functions.texi (Obsolete Functions): Add an index for obsolete functions. | ||
| 4 | |||
| 5 | 2013-09-11 Xue Fuqiao <xfq.free@gmail.com> | ||
| 6 | |||
| 7 | * nonascii.texi (Character Properties): Character properties fix | ||
| 8 | for decimal-digit-value and digit-value. | ||
| 9 | |||
| 10 | 2013-09-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 11 | |||
| 12 | * macros.texi (Defining Macros): Prefer "function" to "lambda | ||
| 13 | expression" (bug#15296). | ||
| 14 | |||
| 1 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> | 15 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 16 | ||
| 3 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, | 17 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 39a9ff6b62c..f1d8c54f49c 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1135,6 +1135,7 @@ examining or altering the structure of closure objects. | |||
| 1135 | 1135 | ||
| 1136 | @node Obsolete Functions | 1136 | @node Obsolete Functions |
| 1137 | @section Declaring Functions Obsolete | 1137 | @section Declaring Functions Obsolete |
| 1138 | @cindex obsolete functions | ||
| 1138 | 1139 | ||
| 1139 | You can mark a named function as @dfn{obsolete}, meaning that it may | 1140 | You can mark a named function as @dfn{obsolete}, meaning that it may |
| 1140 | be removed at some point in the future. This causes Emacs to warn | 1141 | be removed at some point in the future. This causes Emacs to warn |
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index 5520bbbd1df..a2526f383aa 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi | |||
| @@ -191,8 +191,8 @@ During Compile}). | |||
| 191 | @section Defining Macros | 191 | @section Defining Macros |
| 192 | 192 | ||
| 193 | A Lisp macro object is a list whose @sc{car} is @code{macro}, and | 193 | A Lisp macro object is a list whose @sc{car} is @code{macro}, and |
| 194 | whose @sc{cdr} is a lambda expression. Expansion of the macro works | 194 | whose @sc{cdr} is a function. Expansion of the macro works |
| 195 | by applying the lambda expression (with @code{apply}) to the list of | 195 | by applying the function (with @code{apply}) to the list of |
| 196 | @emph{unevaluated} arguments from the macro call. | 196 | @emph{unevaluated} arguments from the macro call. |
| 197 | 197 | ||
| 198 | It is possible to use an anonymous Lisp macro just like an anonymous | 198 | It is possible to use an anonymous Lisp macro just like an anonymous |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index f351829e4cf..e8e810ce61f 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -478,14 +478,14 @@ unassigned codepoints, the value is the character itself. | |||
| 478 | 478 | ||
| 479 | @item decimal-digit-value | 479 | @item decimal-digit-value |
| 480 | Corresponds to the Unicode @code{Numeric_Value} property for | 480 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 481 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an | 481 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is |
| 482 | integer number. For unassigned codepoints, the value is @code{nil}, | 482 | an integer number. For unassigned codepoints, the value is |
| 483 | which means @acronym{NaN}, or ``not-a-number''. | 483 | @code{nil}, which means @acronym{NaN}, or ``not-a-number''. |
| 484 | 484 | ||
| 485 | @item digit-value | 485 | @item digit-value |
| 486 | Corresponds to the Unicode @code{Numeric_Value} property for | 486 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 487 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is | 487 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an |
| 488 | an integer number. Examples of such characters include compatibility | 488 | integer number. Examples of such characters include compatibility |
| 489 | subscript and superscript digits, for which the value is the | 489 | subscript and superscript digits, for which the value is the |
| 490 | corresponding number. For unassigned codepoints, the value is | 490 | corresponding number. For unassigned codepoints, the value is |
| 491 | @code{nil}, which means @acronym{NaN}. | 491 | @code{nil}, which means @acronym{NaN}. |
| @@ -549,6 +549,8 @@ is @code{nil}, which means the character itself. | |||
| 549 | @defun get-char-code-property char propname | 549 | @defun get-char-code-property char propname |
| 550 | This function returns the value of @var{char}'s @var{propname} property. | 550 | This function returns the value of @var{char}'s @var{propname} property. |
| 551 | 551 | ||
| 552 | @c FIXME: Use ‘?\s’ instead of ‘? ’ for the space character in the | ||
| 553 | @c first example? --xfq | ||
| 552 | @example | 554 | @example |
| 553 | @group | 555 | @group |
| 554 | (get-char-code-property ? 'general-category) | 556 | (get-char-code-property ? 'general-category) |
| @@ -684,6 +686,7 @@ which case the returned charset must be supported by that coding | |||
| 684 | system (@pxref{Coding Systems}). | 686 | system (@pxref{Coding Systems}). |
| 685 | @end defun | 687 | @end defun |
| 686 | 688 | ||
| 689 | @c TODO: Explain the properties here and add indexes such as ‘charset property’. | ||
| 687 | @defun charset-plist charset | 690 | @defun charset-plist charset |
| 688 | This function returns the property list of the character set | 691 | This function returns the property list of the character set |
| 689 | @var{charset}. Although @var{charset} is a symbol, this is not the | 692 | @var{charset}. Although @var{charset} is a symbol, this is not the |
| @@ -849,6 +852,8 @@ systems specifies its own translation tables, the table that is the | |||
| 849 | value of this variable, if non-@code{nil}, is applied after them. | 852 | value of this variable, if non-@code{nil}, is applied after them. |
| 850 | @end defvar | 853 | @end defvar |
| 851 | 854 | ||
| 855 | @c FIXME: This variable is obsolete since 23.1. We should mention | ||
| 856 | @c that here or simply remove this defvar. --xfq | ||
| 852 | @defvar translation-table-for-input | 857 | @defvar translation-table-for-input |
| 853 | Self-inserting characters are translated through this translation | 858 | Self-inserting characters are translated through this translation |
| 854 | table before they are inserted. Search commands also translate their | 859 | table before they are inserted. Search commands also translate their |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 85143fc2692..aa1e69891a2 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-09-11 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * ido.texi (Interactive Substring Matching): Use @key{RET} instead | ||
| 4 | of @kbd{RET}. | ||
| 5 | (Prefix Matching): Add an index. | ||
| 6 | |||
| 7 | 2013-09-08 Glenn Morris <rgm@gnu.org> | ||
| 8 | |||
| 9 | * emacs-gnutls.texi: Tweak direntry. | ||
| 10 | |||
| 1 | 2013-09-06 Michael Albinus <michael.albinus@gmx.de> | 11 | 2013-09-06 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 12 | ||
| 3 | * tramp.texi (Alternative Syntax): Remove chapter. | 13 | * tramp.texi (Alternative Syntax): Remove chapter. |
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi index 740dfee41ed..b1c4c13c5ff 100644 --- a/doc/misc/emacs-gnutls.texi +++ b/doc/misc/emacs-gnutls.texi | |||
| @@ -25,7 +25,7 @@ modify this GNU manual.'' | |||
| 25 | 25 | ||
| 26 | @dircategory Emacs network features | 26 | @dircategory Emacs network features |
| 27 | @direntry | 27 | @direntry |
| 28 | * GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. | 28 | * Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. |
| 29 | @end direntry | 29 | @end direntry |
| 30 | 30 | ||
| 31 | @titlepage | 31 | @titlepage |
diff --git a/doc/misc/ido.texi b/doc/misc/ido.texi index 623fb4bfa79..64885179259 100644 --- a/doc/misc/ido.texi +++ b/doc/misc/ido.texi | |||
| @@ -258,7 +258,7 @@ Buffer: 23@{123456 | 123@} | |||
| 258 | At this point, you still have two matching buffers. If you want the | 258 | At this point, you still have two matching buffers. If you want the |
| 259 | first buffer in the list, you can simply press @key{RET}. If you want | 259 | first buffer in the list, you can simply press @key{RET}. If you want |
| 260 | the second in the list, you can press @kbd{C-s} to move it to the top | 260 | the second in the list, you can press @kbd{C-s} to move it to the top |
| 261 | of the list and then press @kbd{RET} to select it. | 261 | of the list and then press @key{RET} to select it. |
| 262 | 262 | ||
| 263 | However, if you type @kbd{4}, you'll only have one match left: | 263 | However, if you type @kbd{4}, you'll only have one match left: |
| 264 | 264 | ||
| @@ -366,6 +366,7 @@ users Ido offers in addition to the default substring matching method | |||
| 366 | the only difference to the description of the substring matching | 366 | the only difference to the description of the substring matching |
| 367 | above. | 367 | above. |
| 368 | 368 | ||
| 369 | @cindex toggle prefix matching | ||
| 369 | You can toggle prefix matching with @kbd{C-p} | 370 | You can toggle prefix matching with @kbd{C-p} |
| 370 | (@code{ido-toggle-prefix}). | 371 | (@code{ido-toggle-prefix}). |
| 371 | 372 | ||
diff --git a/etc/ChangeLog b/etc/ChangeLog index c1cb67a6a67..bd5534d9446 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-09-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * refcards/Makefile (PS_ENGLISH, PS_CZECH, PS_FRENCH, PS_GERMAN) | ||
| 4 | (PS_POLISH, PS_PORTUGUESE, PS_RUSSIAN, PS_SLOVAKIAN, PS_TARGETS): | ||
| 5 | Use substitution refs. | ||
| 6 | |||
| 1 | 2013-08-15 Glenn Morris <rgm@gnu.org> | 7 | 2013-08-15 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * refcards/calccard.pdf, refcards/cs-dired-ref.pdf: | 9 | * refcards/calccard.pdf, refcards/cs-dired-ref.pdf: |
| @@ -34,6 +34,10 @@ build time. To prevent this, use the configure option | |||
| 34 | `--with-file-notification-no'. See below for file-notify features. | 34 | `--with-file-notification-no'. See below for file-notify features. |
| 35 | FIXME? This feature is not available for the Nextstep port. (?) | 35 | FIXME? This feature is not available for the Nextstep port. (?) |
| 36 | 36 | ||
| 37 | ** The configure option `without-compress-info' has been generalized, | ||
| 38 | and renamed to `without-compress-install'. It now prevents compression | ||
| 39 | of _any_ files during installation. | ||
| 40 | |||
| 37 | ** The configure option --with-crt-dir has been removed. | 41 | ** The configure option --with-crt-dir has been removed. |
| 38 | It is no longer needed, as the crt*.o files are no longer linked | 42 | It is no longer needed, as the crt*.o files are no longer linked |
| 39 | specially. | 43 | specially. |
| @@ -610,9 +614,20 @@ file using `set-file-extended-attributes'. | |||
| 610 | ** `visited-file-modtime' now returns -1 for nonexistent files. | 614 | ** `visited-file-modtime' now returns -1 for nonexistent files. |
| 611 | Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous | 615 | Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous |
| 612 | in the presence of files with negative time stamps. | 616 | in the presence of files with negative time stamps. |
| 617 | |||
| 618 | ** The cars of the elements in `interpreter-mode-alist' are now treated | ||
| 619 | as regexps rather than literal strings. Technically this is an | ||
| 620 | incompatible change, but unless you are using interpreter-mode-alist | ||
| 621 | for something (not just adding elements to it), it ought not to affect you. | ||
| 622 | |||
| 613 | 623 | ||
| 614 | * Lisp Changes in Emacs 24.4 | 624 | * Lisp Changes in Emacs 24.4 |
| 615 | 625 | ||
| 626 | ** Comparison functions =, <, >, <=, >= now take many arguments. | ||
| 627 | |||
| 628 | ** The second argument of `eval' can now be a lexical-environment. | ||
| 629 | |||
| 630 | ** `with-demoted-errors' takes an additional argument `format'. | ||
| 616 | +++ | 631 | +++ |
| 617 | ** New function `define-error'. | 632 | ** New function `define-error'. |
| 618 | 633 | ||
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile index 36abf67d594..0931540e4d8 100644 --- a/etc/refcards/Makefile +++ b/etc/refcards/Makefile | |||
| @@ -58,42 +58,16 @@ PDF_SLOVAKIAN = \ | |||
| 58 | PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \ | 58 | PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \ |
| 59 | $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN) | 59 | $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN) |
| 60 | 60 | ||
| 61 | PS_ENGLISH = \ | 61 | PS_ENGLISH = $(PDF_ENGLISH:.pdf=.ps) |
| 62 | calccard.ps \ | 62 | PS_CZECH = $(PDF_CZECH:.pdf=.ps) |
| 63 | dired-ref.ps \ | 63 | PS_FRENCH = $(PDF_FRENCH:.pdf=.ps) |
| 64 | gnus-booklet.ps \ | 64 | PS_GERMAN = $(PDF_GERMAN:.pdf=.ps) |
| 65 | gnus-refcard.ps \ | 65 | PS_POLISH = $(PDF_POLISH:.pdf=.ps) |
| 66 | orgcard.ps \ | 66 | PS_PORTUGUESE = $(PDF_PORTUGUESE:.pdf=.ps) |
| 67 | refcard.ps \ | 67 | PS_RUSSIAN = $(PDF_RUSSIAN:.pdf=.ps) |
| 68 | survival.ps \ | 68 | PS_SLOVAKIAN = $(PDF_SLOVAKIAN:.pdf=.ps) |
| 69 | vipcard.ps \ | 69 | |
| 70 | viperCard.ps | 70 | PS_TARGETS = $(PDF_TARGETS:.pdf=.ps) |
| 71 | |||
| 72 | PS_CZECH = \ | ||
| 73 | cs-dired-ref.ps \ | ||
| 74 | cs-refcard.ps \ | ||
| 75 | cs-survival.ps | ||
| 76 | |||
| 77 | PS_FRENCH = \ | ||
| 78 | fr-dired-ref.ps \ | ||
| 79 | fr-refcard.ps \ | ||
| 80 | fr-survival.ps \ | ||
| 81 | |||
| 82 | PS_GERMAN = de-refcard.ps | ||
| 83 | |||
| 84 | PS_POLISH = pl-refcard.ps | ||
| 85 | |||
| 86 | PS_PORTUGUESE = pt-br-refcard.ps | ||
| 87 | |||
| 88 | PS_RUSSIAN = ru-refcard.ps | ||
| 89 | |||
| 90 | PS_SLOVAKIAN = \ | ||
| 91 | sk-dired-ref.ps \ | ||
| 92 | sk-refcard.ps \ | ||
| 93 | sk-survival.ps | ||
| 94 | |||
| 95 | PS_TARGETS = $(PS_ENGLISH) $(PS_CZECH) $(PS_FRENCH) $(PS_GERMAN) \ | ||
| 96 | $(PS_POLISH) $(PS_PORTUGUESE) $(PS_RUSSIAN) $(PS_SLOVAKIAN) | ||
| 97 | 71 | ||
| 98 | 72 | ||
| 99 | ## For emacsver.tex. | 73 | ## For emacsver.tex. |
| @@ -41,7 +41,7 @@ Emacs editing modes | |||
| 41 | Emacs network features | 41 | Emacs network features |
| 42 | * EUDC: (eudc). Emacs client for directory servers (LDAP, PH). | 42 | * EUDC: (eudc). Emacs client for directory servers (LDAP, PH). |
| 43 | * Gnus: (gnus). The newsreader Gnus. | 43 | * Gnus: (gnus). The newsreader Gnus. |
| 44 | * GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. | 44 | * Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. |
| 45 | * Mairix: (mairix-el). Emacs interface to the Mairix mail indexer. | 45 | * Mairix: (mairix-el). Emacs interface to the Mairix mail indexer. |
| 46 | * MH-E: (mh-e). Emacs interface to the MH mail system. | 46 | * MH-E: (mh-e). Emacs interface to the MH mail system. |
| 47 | * Message: (message). Mail and news composition mode that | 47 | * Message: (message). Mail and news composition mode that |
diff --git a/leim/ChangeLog b/leim/ChangeLog index 3e25c0edbe1..11186603df8 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-09-05 Jean Haidouk <haidouk@yandex.com> (tiny change) | ||
| 2 | |||
| 3 | * quail/latin-alt.el ("french-alt-postfix", "latin-alt-postfix"): | ||
| 4 | * quail/latin-pre.el ("french-prefix"): | ||
| 5 | * quail/latin-post.el ("french-postfix"): Add `œ' and `Œ'. | ||
| 6 | |||
| 1 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, | 9 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, |
diff --git a/leim/quail/latin-alt.el b/leim/quail/latin-alt.el index fdfc89f4eca..6841947524f 100644 --- a/leim/quail/latin-alt.el +++ b/leim/quail/latin-alt.el | |||
| @@ -938,7 +938,7 @@ Par exemple: a` -> à e' -> é. | |||
| 938 | En doublant la frappe des diacritiques, ils s'isoleront de la lettre. | 938 | En doublant la frappe des diacritiques, ils s'isoleront de la lettre. |
| 939 | Par exemple: e'' -> e' | 939 | Par exemple: e'' -> e' |
| 940 | 940 | ||
| 941 | <e dans l'o> n'est pas disponible." | 941 | Œ est produit par O/." |
| 942 | nil t nil nil nil nil nil nil nil nil t) | 942 | nil t nil nil nil nil nil nil nil nil t) |
| 943 | 943 | ||
| 944 | (quail-define-rules | 944 | (quail-define-rules |
| @@ -959,7 +959,9 @@ Par exemple: e'' -> e' | |||
| 959 | ("i^" ?î) | 959 | ("i^" ?î) |
| 960 | ("i\"" ?ï) | 960 | ("i\"" ?ï) |
| 961 | ("O^" ?Ô) | 961 | ("O^" ?Ô) |
| 962 | ("O/" ?Œ) | ||
| 962 | ("o^" ?ô) | 963 | ("o^" ?ô) |
| 964 | ("o/" ?œ) | ||
| 963 | ("U`" ?Ù) | 965 | ("U`" ?Ù) |
| 964 | ("U^" ?Û) | 966 | ("U^" ?Û) |
| 965 | ("U\"" ?Ü) | 967 | ("U\"" ?Ü) |
| @@ -988,7 +990,9 @@ Par exemple: e'' -> e' | |||
| 988 | ("i^^" ["i^"]) | 990 | ("i^^" ["i^"]) |
| 989 | ("i\"\"" ["i\""]) | 991 | ("i\"\"" ["i\""]) |
| 990 | ("O^^" ["O^"]) | 992 | ("O^^" ["O^"]) |
| 993 | ("O//" ["O/"]) | ||
| 991 | ("o^^" ["o^"]) | 994 | ("o^^" ["o^"]) |
| 995 | ("o//" ["o/"]) | ||
| 992 | ("U``" ["U`"]) | 996 | ("U``" ["U`"]) |
| 993 | ("U^^" ["U^"]) | 997 | ("U^^" ["U^"]) |
| 994 | ("U\"\"" ["U\""]) | 998 | ("U\"\"" ["U\""]) |
| @@ -1423,6 +1427,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a' | |||
| 1423 | ("O'" ?Ó) | 1427 | ("O'" ?Ó) |
| 1424 | ("O-" ?Ō) | 1428 | ("O-" ?Ō) |
| 1425 | ("O/" ?Ø) | 1429 | ("O/" ?Ø) |
| 1430 | ("O/" ?Œ) | ||
| 1426 | ("O:" ?Ő) | 1431 | ("O:" ?Ő) |
| 1427 | ("O\"" ?Ö) | 1432 | ("O\"" ?Ö) |
| 1428 | ("O^" ?Ô) | 1433 | ("O^" ?Ô) |
| @@ -1515,6 +1520,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a' | |||
| 1515 | ("o'" ?ó) | 1520 | ("o'" ?ó) |
| 1516 | ("o-" ?ō) | 1521 | ("o-" ?ō) |
| 1517 | ("o/" ?ø) | 1522 | ("o/" ?ø) |
| 1523 | ("o/" ?œ) | ||
| 1518 | ("o:" ?ő) | 1524 | ("o:" ?ő) |
| 1519 | ("o\"" ?ö) | 1525 | ("o\"" ?ö) |
| 1520 | ("o^" ?ô) | 1526 | ("o^" ?ô) |
diff --git a/leim/quail/latin-post.el b/leim/quail/latin-post.el index 67cd0648951..7fa3d88e8c6 100644 --- a/leim/quail/latin-post.el +++ b/leim/quail/latin-post.el | |||
| @@ -1013,7 +1013,7 @@ Par exemple: a` -> à e' -> é. | |||
| 1013 | En doublant la frappe des diacritiques, ils s'isoleront de la lettre. | 1013 | En doublant la frappe des diacritiques, ils s'isoleront de la lettre. |
| 1014 | Par exemple: e'' -> e' | 1014 | Par exemple: e'' -> e' |
| 1015 | 1015 | ||
| 1016 | <e dans l'o> n'est pas disponible." | 1016 | Œ est produit par O/." |
| 1017 | nil t nil nil nil nil nil nil nil nil t) | 1017 | nil t nil nil nil nil nil nil nil nil t) |
| 1018 | 1018 | ||
| 1019 | (quail-define-rules | 1019 | (quail-define-rules |
| @@ -1034,7 +1034,9 @@ Par exemple: e'' -> e' | |||
| 1034 | ("i^" ?î) | 1034 | ("i^" ?î) |
| 1035 | ("i\"" ?ï) | 1035 | ("i\"" ?ï) |
| 1036 | ("O^" ?Ô) | 1036 | ("O^" ?Ô) |
| 1037 | ("O/" ?Œ) | ||
| 1037 | ("o^" ?ô) | 1038 | ("o^" ?ô) |
| 1039 | ("o/" ?œ) | ||
| 1038 | ("U`" ?Ù) | 1040 | ("U`" ?Ù) |
| 1039 | ("U^" ?Û) | 1041 | ("U^" ?Û) |
| 1040 | ("U\"" ?Ü) | 1042 | ("U\"" ?Ü) |
| @@ -1063,7 +1065,9 @@ Par exemple: e'' -> e' | |||
| 1063 | ("i^^" ["i^"]) | 1065 | ("i^^" ["i^"]) |
| 1064 | ("i\"\"" ["i\""]) | 1066 | ("i\"\"" ["i\""]) |
| 1065 | ("O^^" ["O^"]) | 1067 | ("O^^" ["O^"]) |
| 1068 | ("O//" ["O/"]) | ||
| 1066 | ("o^^" ["o^"]) | 1069 | ("o^^" ["o^"]) |
| 1070 | ("o//" ["o/"]) | ||
| 1067 | ("U``" ["U`"]) | 1071 | ("U``" ["U`"]) |
| 1068 | ("U^^" ["U^"]) | 1072 | ("U^^" ["U^"]) |
| 1069 | ("U\"\"" ["U\""]) | 1073 | ("U\"\"" ["U\""]) |
| @@ -2099,7 +2103,7 @@ of characters from a single Latin-N charset. | |||
| 2099 | dot | . | z. -> ż | 2103 | dot | . | z. -> ż |
| 2100 | stroke | / | d/ -> đ | 2104 | stroke | / | d/ -> đ |
| 2101 | nordic | / | d/ -> ð t/ -> þ a/ -> å e/ -> æ o/ -> ø | 2105 | nordic | / | d/ -> ð t/ -> þ a/ -> å e/ -> æ o/ -> ø |
| 2102 | others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> ° | 2106 | others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> ° o/ -> œ |
| 2103 | | various | << -> « >> -> » o_ -> º a_ -> ª | 2107 | | various | << -> « >> -> » o_ -> º a_ -> ª |
| 2104 | 2108 | ||
| 2105 | Doubling the postfix separates the letter and postfix: e.g. a'' -> a' | 2109 | Doubling the postfix separates the letter and postfix: e.g. a'' -> a' |
diff --git a/leim/quail/latin-pre.el b/leim/quail/latin-pre.el index 4b4179ebf82..c6085f34290 100644 --- a/leim/quail/latin-pre.el +++ b/leim/quail/latin-pre.el | |||
| @@ -264,6 +264,7 @@ Key translation rules are: | |||
| 264 | diaeresis | \" | \"i -> ï | 264 | diaeresis | \" | \"i -> ï |
| 265 | cedilla | ~ or , | ~c -> ç ,c -> ç | 265 | cedilla | ~ or , | ~c -> ç ,c -> ç |
| 266 | symbol | ~ | ~> -> » ~< -> « | 266 | symbol | ~ | ~> -> » ~< -> « |
| 267 | misc | / | /o -> œ | ||
| 267 | " nil t nil nil nil nil nil nil nil nil t) | 268 | " nil t nil nil nil nil nil nil nil nil t) |
| 268 | 269 | ||
| 269 | (quail-define-rules | 270 | (quail-define-rules |
| @@ -295,6 +296,9 @@ Key translation rules are: | |||
| 295 | ("\"e" ?ë) | 296 | ("\"e" ?ë) |
| 296 | ("\"i" ?ï) | 297 | ("\"i" ?ï) |
| 297 | ("\" " ?\") | 298 | ("\" " ?\") |
| 299 | ("/o" ?œ) | ||
| 300 | ("/O" ?Œ) | ||
| 301 | ("/ " ?/) | ||
| 298 | ("~<" ?\«) | 302 | ("~<" ?\«) |
| 299 | ("~>" ?\») | 303 | ("~>" ?\») |
| 300 | ("~C" ?Ç) | 304 | ("~C" ?Ç) |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 324cefe7ed6..5cae5873f92 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,287 @@ | |||
| 3 | * composite.el (compose-gstring-for-graphic): Handle enclosing | 3 | * composite.el (compose-gstring-for-graphic): Handle enclosing |
| 4 | mark. | 4 | mark. |
| 5 | 5 | ||
| 6 | 2013-09-12 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * vc/vc-svn.el (vc-svn-dir-status-files, vc-svn-dir-extra-headers) | ||
| 9 | (vc-svn-ignore, vc-svn-retrieve-tag): Mark unused arguments. | ||
| 10 | |||
| 11 | * subr.el (do-after-load-evaluation): Also give compiler warnings | ||
| 12 | when obsolete files are used (except by obsolete files). | ||
| 13 | |||
| 14 | * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files | ||
| 15 | in the status output, assume `filename' is the first. (Bug#15322) | ||
| 16 | |||
| 17 | * vc/vc.el (vc-deduce-fileset): Doc fix. | ||
| 18 | |||
| 19 | * calc/calc-help.el (Info-goto-node): | ||
| 20 | * progmodes/cperl-mode.el (Info-find-node): | ||
| 21 | * vc/ediff.el (Info-goto-node): Update declarations. | ||
| 22 | |||
| 23 | * vc/vc-dispatcher.el (vc-dir-refresh): Declare. | ||
| 24 | |||
| 25 | * vc/vc-bzr.el (vc-compilation-mode): Declare. | ||
| 26 | (vc-bzr-pull): Require vc-dispatcher. | ||
| 27 | * vc/vc-git.el (vc-compilation-mode): Declare. | ||
| 28 | (vc-git-pull): Require vc-dispatcher. | ||
| 29 | |||
| 30 | * progmodes/ruby-mode.el (ruby-syntax-propertize-function): Declare. | ||
| 31 | |||
| 32 | * progmodes/octave.el (help-button-action): Declare. | ||
| 33 | |||
| 34 | * shell.el (shell-directory-tracker): Output error as a message | ||
| 35 | rather than just returning it as a string. | ||
| 36 | (shell-process-pushd): Remove useless use of message. | ||
| 37 | |||
| 38 | * dframe.el (dframe-timer-fn): | ||
| 39 | * files.el (dir-locals-read-from-file): | ||
| 40 | * mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run) | ||
| 41 | (mpc-format): | ||
| 42 | * reveal.el (reveal-post-command): | ||
| 43 | * saveplace.el (load-save-place-alist-from-file): | ||
| 44 | * shell.el (shell-resync-dirs): | ||
| 45 | * w32-common-fns.el (x-get-selection-value): | ||
| 46 | * emacs-lisp/copyright.el (copyright-find-copyright): | ||
| 47 | * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): | ||
| 48 | * emulation/tpu-edt.el (tpu-copy-keyfile): | ||
| 49 | * play/bubbles.el (bubbles--mark-neighbourhood): | ||
| 50 | * progmodes/executable.el | ||
| 51 | (executable-make-buffer-file-executable-if-script-p): | ||
| 52 | * term/pc-win.el (x-get-selection-value): Use with-demoted-errors. | ||
| 53 | |||
| 54 | 2013-09-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 55 | |||
| 56 | Cleanup Eshell to rely less on dynamic scoping. | ||
| 57 | * eshell/esh-opt.el (eshell-eval-using-options): Don't bind usage-msg, | ||
| 58 | last-value, and ext-command here. Bind `args' closer to `body'. | ||
| 59 | (temp-args, last-value, usage-msg, ext-command, args): Don't defvar. | ||
| 60 | (eshell--args): Declare new dynamic var. | ||
| 61 | (eshell-do-opt): Add argument `args'. Bind our own usage-msg, | ||
| 62 | last-value, and ext-command. Pass `args' to `body'. | ||
| 63 | (eshell-process-args): Bind eshell--args. | ||
| 64 | (eshell-set-option): Use eshell--args. | ||
| 65 | * eshell/eshell.el (eshell): Use derived-mode-p. | ||
| 66 | * eshell/esh-var.el (eshell-parse-variable): Use backquote. | ||
| 67 | (eshell-parse-variable-ref): Remove unused vars `end' and `err'. | ||
| 68 | (eshell-glob-function): Declare. | ||
| 69 | * eshell/esh-util.el: Require cl-lib. | ||
| 70 | (eshell-read-hosts-file): Avoid add-to-list. | ||
| 71 | * eshell/esh-cmd.el (eshell-parse-lisp-argument): Remove unused var | ||
| 72 | `err'. | ||
| 73 | * eshell/em-unix.el (compilation-scroll-output, locate-history-list): | ||
| 74 | Declare. | ||
| 75 | (eshell/diff): Remove unused var `err'. | ||
| 76 | * eshell/em-rebind.el (eshell-delete-backward-char): Remove unused arg | ||
| 77 | `killflag'. | ||
| 78 | * eshell/em-pred.el (eshell-parse-modifiers): Remove unused var `err'. | ||
| 79 | * eshell/em-ls.el (eshell-ls-highlight-alist): Move defvars before | ||
| 80 | first use. | ||
| 81 | * eshell/em-glob.el (eshell-glob-matches, message-shown): | ||
| 82 | Move declaration before first use. | ||
| 83 | * eshell/em-alias.el (eshell-maybe-replace-by-alias): Use backquotes. | ||
| 84 | * autorevert.el (auto-revert-notify-handler): Use `cl-dolist' since we | ||
| 85 | rely on cl-return. | ||
| 86 | |||
| 87 | 2013-09-12 Glenn Morris <rgm@gnu.org> | ||
| 88 | |||
| 89 | * term/ns-win.el (global-map): Remove binding for ispell-next, | ||
| 90 | deleted 1999-05-29. (Bug#15357) | ||
| 91 | |||
| 92 | 2013-09-11 Glenn Morris <rgm@gnu.org> | ||
| 93 | |||
| 94 | * echistory.el (electric-command-history): Remove call to deleted func. | ||
| 95 | |||
| 96 | * play/landmark.el (landmark-mode): Fix typos. | ||
| 97 | |||
| 98 | * vc/vc-cvs.el (cvs-append-to-ignore): Fix arg spec. | ||
| 99 | Check cvs-sort-ignore-file is bound. | ||
| 100 | |||
| 101 | * savehist.el: No need for cl when compiling on Emacs. | ||
| 102 | |||
| 103 | 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 104 | |||
| 105 | * eshell/esh-mode.el (eshell-mode-syntax-table): Fix up initialization | ||
| 106 | (bug#15338). | ||
| 107 | (eshell-self-insert-command, eshell-send-invisible): | ||
| 108 | Remove unused argument. | ||
| 109 | (eshell-handle-control-codes): Remove unused var `orig'. | ||
| 110 | Avoid delete-backward-char. | ||
| 111 | |||
| 112 | * files.el (set-auto-mode): Simplify a bit further. | ||
| 113 | |||
| 114 | 2013-09-11 Glenn Morris <rgm@gnu.org> | ||
| 115 | |||
| 116 | * files.el (interpreter-mode-alist): Remove \\` \\' parts. | ||
| 117 | (set-auto-mode): Don't regexp-quote elements. | ||
| 118 | * progmodes/python.el (interpreter-mode-alist): Remove \\` \\'. | ||
| 119 | * progmodes/cc-mode.el (interpreter-mode-alist): | ||
| 120 | * progmodes/ruby-mode.el (interpreter-mode-alist): | ||
| 121 | Revert previous change. | ||
| 122 | |||
| 123 | 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 124 | |||
| 125 | * play/snake.el (snake-mode): | ||
| 126 | * play/mpuz.el (mpuz-mode): | ||
| 127 | * play/landmark.el (lm-mode): | ||
| 128 | * play/blackbox.el (blackbox-mode): | ||
| 129 | * play/5x5.el (5x5-mode): | ||
| 130 | * obsolete/options.el (Edit-options-mode): | ||
| 131 | * net/quickurl.el (quickurl-list-mode): | ||
| 132 | * net/newst-treeview.el (newsticker-treeview-mode): | ||
| 133 | * mail/rmailsum.el (rmail-summary-mode): | ||
| 134 | * mail/mspools.el (mspools-mode): | ||
| 135 | * locate.el (locate-mode): | ||
| 136 | * ibuffer.el (ibuffer-mode): | ||
| 137 | * emulation/ws-mode.el (wordstar-mode): | ||
| 138 | * emacs-lisp/debug.el (debugger-mode): | ||
| 139 | * array.el (array-mode): | ||
| 140 | * net/eudc.el (eudc-mode): Use define-derived-mode. | ||
| 141 | * net/mairix.el (mairix-searches-mode-font-lock-keywords): | ||
| 142 | Move initialization into declaration. | ||
| 143 | (mairix-searches-mode): Use define-derived-mode. | ||
| 144 | * net/eudc-hotlist.el (eudc-hotlist-mode): Use define-derived-mode. | ||
| 145 | (eudc-edit-hotlist): Use dolist. | ||
| 146 | * man.el (Man-mode-syntax-table): Rename from man-mode-syntax-table. | ||
| 147 | (Man-mode): Use define-derived-mode. | ||
| 148 | * info.el (Info-edit-mode-map): Rename from Info-edit-map. | ||
| 149 | (Info-edit-mode): Use define-derived-mode. | ||
| 150 | (Info-cease-edit): Use Info-mode. | ||
| 151 | * eshell/esh-mode.el (eshell-mode-syntax-table): Move initialization | ||
| 152 | into declaration. | ||
| 153 | (eshell-mode): Use define-derived-mode. | ||
| 154 | * chistory.el (command-history-mode-map): Rename from | ||
| 155 | command-history-map. | ||
| 156 | (command-history-mode): Use define-derived-mode. | ||
| 157 | (Command-history-setup): Remove function. | ||
| 158 | * calc/calc.el (calc-trail-mode-map): New var. | ||
| 159 | (calc-trail-mode): Use define-derived-mode. | ||
| 160 | (calc-trail-buffer): Set calc-main-buffer manually. | ||
| 161 | * bookmark.el (bookmark-insert-annotation): New function. | ||
| 162 | (bookmark-edit-annotation): Use it. | ||
| 163 | (bookmark-edit-annotation-mode): Make it a proper major mode. | ||
| 164 | (bookmark-send-edited-annotation): Use derived-mode-p. | ||
| 165 | * arc-mode.el (archive-mode): Move kill-all-local-variables a tiny bit | ||
| 166 | closer to its ideal place. Use \' to match EOS. | ||
| 167 | |||
| 168 | * profiler.el (profiler-calltree-find): Use function-equal. | ||
| 169 | |||
| 170 | 2013-09-10 Glenn Morris <rgm@gnu.org> | ||
| 171 | |||
| 172 | * files.el (interpreter-mode-alist): Convert to regexps. | ||
| 173 | (set-auto-mode): Adapt for this. (Bug#15306) | ||
| 174 | * progmodes/cperl-mode.el (cperl-clobber-mode-lists): | ||
| 175 | Comment out unused variable. | ||
| 176 | * progmodes/cc-mode.el (interpreter-mode-alist): | ||
| 177 | * progmodes/python.el (interpreter-mode-alist): | ||
| 178 | * progmodes/ruby-mode.el (interpreter-mode-alist): Convert to regexps. | ||
| 179 | * progmodes/sh-script.el (sh-set-shell): | ||
| 180 | No longer use interpreter-mode-alist to get list of shells. | ||
| 181 | |||
| 182 | * progmodes/cc-mode.el (awk-mode): Remove duplicate autoload. | ||
| 183 | |||
| 184 | 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 185 | |||
| 186 | * simple.el: Use set-temporary-overlay-map for universal-argument. | ||
| 187 | (universal-argument-map): Don't use default-bindings (bug#15317). | ||
| 188 | Bind switch-frame explicitly. Replace universal-argument-minus with | ||
| 189 | a conditional binding. | ||
| 190 | (universal-argument-num-events, saved-overriding-map): Remove. | ||
| 191 | (restore-overriding-map): Remove. | ||
| 192 | (universal-argument--mode): Rename from save&set-overriding-map, | ||
| 193 | and rewrite. | ||
| 194 | (universal-argument, universal-argument-more, negative-argument) | ||
| 195 | (digit-argument): Adjust accordingly. | ||
| 196 | (universal-argument-minus): Remove. | ||
| 197 | (universal-argument-other-key): Remove. | ||
| 198 | |||
| 199 | * subr.el (with-demoted-errors): Add `format' argument. | ||
| 200 | |||
| 201 | 2013-09-10 Michael Albinus <michael.albinus@gmx.de> | ||
| 202 | |||
| 203 | * net/tramp.el (tramp-cleanup): Remove. Functionality added to | ||
| 204 | `tramp-cleanup-connection'. | ||
| 205 | |||
| 206 | * net/tramp-cmds.el (tramp-cleanup-connection): Add optional | ||
| 207 | parameters KEEP-DEBUG and KEEP-PASSWORD. | ||
| 208 | |||
| 209 | * net/tramp.el (tramp-file-name-handler): | ||
| 210 | * net/tramp-adb.el (tramp-adb-maybe-open-connection): | ||
| 211 | * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell) | ||
| 212 | (tramp-maybe-open-connection): | ||
| 213 | * net/tramp-smb.el (tramp-smb-maybe-open-connection): | ||
| 214 | Use `tramp-cleanup-connection'. | ||
| 215 | |||
| 216 | * net/tramp-sh.el (tramp-maybe-open-connection): | ||
| 217 | Catch 'uname-changed inside the progress reporter. | ||
| 218 | |||
| 219 | 2013-09-10 Glenn Morris <rgm@gnu.org> | ||
| 220 | |||
| 221 | * simple.el (read-minibuffer): Unbreak it. (Bug#15318) | ||
| 222 | |||
| 223 | * dired-x.el (dired-mark-sexp): Unbreak for systems where ls | ||
| 224 | returns "alternate access method" in mode (eg "-rw-r--r--."). | ||
| 225 | |||
| 226 | 2013-09-08 Glenn Morris <rgm@gnu.org> | ||
| 227 | |||
| 228 | * saveplace.el (load-save-place-alist-from-file): | ||
| 229 | Demote errors. (Bug#15305) | ||
| 230 | |||
| 231 | 2013-09-08 Michael Albinus <michael.albinus@gmx.de> | ||
| 232 | |||
| 233 | Improve compatibility with older Emacsen, and XEmacs. | ||
| 234 | |||
| 235 | * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize' | ||
| 236 | only if it is bound. It isn't for XEmacs. | ||
| 237 | (with-tramp-progress-reporter): Do not let-bind `result'. | ||
| 238 | This yields to scoping errors in XEmacs. | ||
| 239 | (tramp-handle-make-auto-save-file-name): New function, moved from | ||
| 240 | tramp-sh.el. | ||
| 241 | |||
| 242 | * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler | ||
| 243 | for `make-auto-save-file-name'. | ||
| 244 | (tramp-adb--gnu-switches-to-ash): | ||
| 245 | Use `tramp-compat-replace-regexp-in-string'. | ||
| 246 | |||
| 247 | * net/tramp-cache.el (tramp-cache-print): Call | ||
| 248 | `substring-no-properties' only if it is bound. It isn't for XEmacs. | ||
| 249 | |||
| 250 | * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is | ||
| 251 | bound. It isn't for XEmacs. | ||
| 252 | |||
| 253 | * net/tramp-compat.el (tramp-compat-copy-file): | ||
| 254 | Catch `wrong-number-of-arguments' error. | ||
| 255 | (tramp-compat-replace-regexp-in-string): New defun. | ||
| 256 | |||
| 257 | * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler | ||
| 258 | for `make-auto-save-file-name'. | ||
| 259 | (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for | ||
| 260 | `copy-file'. | ||
| 261 | (tramp-gvfs-file-gvfs-monitor-file-process-filter) | ||
| 262 | (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'. | ||
| 263 | (tramp-synce-list-devices): Use `push' instead of `pushnew'. | ||
| 264 | |||
| 265 | * net/tramp-gw.el (tramp-gw-open-network-stream): | ||
| 266 | Use `tramp-compat-replace-regexp-in-string'. | ||
| 267 | |||
| 268 | * net/tramp-sh.el (tramp-sh-file-name-handler-alist): | ||
| 269 | Call `tramp-handle-make-auto-save-file-name'. | ||
| 270 | (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el. | ||
| 271 | (tramp-sh-file-gvfs-monitor-dir-process-filter) | ||
| 272 | (tramp-sh-file-inotifywait-process-filter): | ||
| 273 | Use `tramp-compat-replace-regexp-in-string'. | ||
| 274 | (tramp-compute-multi-hops): Use `push' instead of `pushnew'. | ||
| 275 | |||
| 276 | * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler | ||
| 277 | for `make-auto-save-file-name'. | ||
| 278 | (tramp-smb-handle-copy-directory): | ||
| 279 | Call `tramp-compat-replace-regexp-in-string'. | ||
| 280 | (tramp-smb-get-file-entries): Use `push' instead of `pushnew'. | ||
| 281 | (tramp-smb-handle-copy-file): Improve error message. | ||
| 282 | (tramp-smb-handle-rename-file): Rename directly only in case | ||
| 283 | `newname' does not exist yet. This is a restriction of smbclient. | ||
| 284 | (tramp-smb-maybe-open-connection): Rerun the function only when | ||
| 285 | `auth-sources' is non-nil. | ||
| 286 | |||
| 6 | 2013-09-08 Kenichi Handa <handa@gnu.org> | 287 | 2013-09-08 Kenichi Handa <handa@gnu.org> |
| 7 | 288 | ||
| 8 | * international/characters.el: Set category "^" (Combining) for | 289 | * international/characters.el: Set category "^" (Combining) for |
| @@ -14,8 +295,8 @@ | |||
| 14 | * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")" | 295 | * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")" |
| 15 | in Java Mode. | 296 | in Java Mode. |
| 16 | (c-recognize-typeless-decls): Set the Java value to t. | 297 | (c-recognize-typeless-decls): Set the Java value to t. |
| 17 | * progmodes/cc-engine.el (c-forward-decl-or-cast-1): While | 298 | * progmodes/cc-engine.el (c-forward-decl-or-cast-1): |
| 18 | handling a "(", add a check for, effectively, Java, and handle a | 299 | While handling a "(", add a check for, effectively, Java, and handle a |
| 19 | "typeless" declaration there. | 300 | "typeless" declaration there. |
| 20 | 301 | ||
| 21 | 2013-09-07 Roland Winkler <winkler@gnu.org> | 302 | 2013-09-07 Roland Winkler <winkler@gnu.org> |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index a4f7015c844..c22205d5634 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -683,9 +683,9 @@ archive. | |||
| 683 | ;; At present we cannot create archives from scratch | 683 | ;; At present we cannot create archives from scratch |
| 684 | (funcall (or (default-value 'major-mode) 'fundamental-mode)) | 684 | (funcall (or (default-value 'major-mode) 'fundamental-mode)) |
| 685 | (if (and (not force) archive-files) nil | 685 | (if (and (not force) archive-files) nil |
| 686 | (kill-all-local-variables) | ||
| 686 | (let* ((type (archive-find-type)) | 687 | (let* ((type (archive-find-type)) |
| 687 | (typename (capitalize (symbol-name type)))) | 688 | (typename (capitalize (symbol-name type)))) |
| 688 | (kill-all-local-variables) | ||
| 689 | (make-local-variable 'archive-subtype) | 689 | (make-local-variable 'archive-subtype) |
| 690 | (setq archive-subtype type) | 690 | (setq archive-subtype type) |
| 691 | 691 | ||
| @@ -761,7 +761,7 @@ archive. | |||
| 761 | ((looking-at "..-l[hz][0-9ds]-") 'lzh) | 761 | ((looking-at "..-l[hz][0-9ds]-") 'lzh) |
| 762 | ((looking-at "....................[\334]\247\304\375") 'zoo) | 762 | ((looking-at "....................[\334]\247\304\375") 'zoo) |
| 763 | ((and (looking-at "\C-z") ; signature too simple, IMHO | 763 | ((and (looking-at "\C-z") ; signature too simple, IMHO |
| 764 | (string-match "\\.[aA][rR][cC]$" | 764 | (string-match "\\.[aA][rR][cC]\\'" |
| 765 | (or buffer-file-name (buffer-name)))) | 765 | (or buffer-file-name (buffer-name)))) |
| 766 | 'arc) | 766 | 'arc) |
| 767 | ;; This pattern modeled on the BSD/GNU+Linux `file' command. | 767 | ;; This pattern modeled on the BSD/GNU+Linux `file' command. |
diff --git a/lisp/array.el b/lisp/array.el index e60cbdfffc1..8c4f609e626 100644 --- a/lisp/array.el +++ b/lisp/array.el | |||
| @@ -800,7 +800,7 @@ Return COLUMN." | |||
| 800 | (put 'array-mode 'mode-class 'special) | 800 | (put 'array-mode 'mode-class 'special) |
| 801 | 801 | ||
| 802 | ;;;###autoload | 802 | ;;;###autoload |
| 803 | (defun array-mode () | 803 | (define-derived-mode array-mode fundamental-mode "Array" |
| 804 | "Major mode for editing arrays. | 804 | "Major mode for editing arrays. |
| 805 | 805 | ||
| 806 | Array mode is a specialized mode for editing arrays. An array is | 806 | Array mode is a specialized mode for editing arrays. An array is |
| @@ -863,9 +863,6 @@ take a numeric prefix argument): | |||
| 863 | \\[array-display-local-variables] Display the current values of local variables. | 863 | \\[array-display-local-variables] Display the current values of local variables. |
| 864 | 864 | ||
| 865 | Entering array mode calls the function `array-mode-hook'." | 865 | Entering array mode calls the function `array-mode-hook'." |
| 866 | |||
| 867 | (interactive) | ||
| 868 | (kill-all-local-variables) | ||
| 869 | (make-local-variable 'array-buffer-line) | 866 | (make-local-variable 'array-buffer-line) |
| 870 | (make-local-variable 'array-buffer-column) | 867 | (make-local-variable 'array-buffer-column) |
| 871 | (make-local-variable 'array-row) | 868 | (make-local-variable 'array-row) |
| @@ -888,13 +885,9 @@ Entering array mode calls the function `array-mode-hook'." | |||
| 888 | (+ (floor (1- array-max-column) array-columns-per-line) | 885 | (+ (floor (1- array-max-column) array-columns-per-line) |
| 889 | (if array-rows-numbered 2 1))) | 886 | (if array-rows-numbered 2 1))) |
| 890 | (message "") | 887 | (message "") |
| 891 | (setq major-mode 'array-mode) | ||
| 892 | (setq mode-name "Array") | ||
| 893 | (force-mode-line-update) | 888 | (force-mode-line-update) |
| 894 | (set (make-local-variable 'truncate-lines) t) | 889 | (set (make-local-variable 'truncate-lines) t) |
| 895 | (setq overwrite-mode 'overwrite-mode-textual) | 890 | (setq overwrite-mode 'overwrite-mode-textual)) |
| 896 | (use-local-map array-mode-map) | ||
| 897 | (run-mode-hooks 'array-mode-hook)) | ||
| 898 | 891 | ||
| 899 | 892 | ||
| 900 | 893 | ||
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 0e2b6f32cf3..65526f07e1b 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -548,7 +548,7 @@ will use an up-to-date value of `auto-revert-interval'" | |||
| 548 | (cl-assert (stringp file)) | 548 | (cl-assert (stringp file)) |
| 549 | (when (eq action 'renamed) (cl-assert (stringp file1))) | 549 | (when (eq action 'renamed) (cl-assert (stringp file1))) |
| 550 | ;; Loop over all buffers, in order to find the intended one. | 550 | ;; Loop over all buffers, in order to find the intended one. |
| 551 | (dolist (buffer buffers) | 551 | (cl-dolist (buffer buffers) |
| 552 | (when (buffer-live-p buffer) | 552 | (when (buffer-live-p buffer) |
| 553 | (with-current-buffer buffer | 553 | (with-current-buffer buffer |
| 554 | (when (and (stringp buffer-file-name) | 554 | (when (and (stringp buffer-file-name) |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 9514317809b..ce0d6831a3a 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -862,31 +862,25 @@ It takes one argument, the name of the bookmark, as a string.") | |||
| 862 | map) | 862 | map) |
| 863 | "Keymap for editing an annotation of a bookmark.") | 863 | "Keymap for editing an annotation of a bookmark.") |
| 864 | 864 | ||
| 865 | 865 | (defun bookmark-insert-annotation (bookmark-name-or-record) | |
| 866 | (defun bookmark-edit-annotation-mode (bookmark-name-or-record) | ||
| 867 | "Mode for editing the annotation of bookmark BOOKMARK-NAME-OR-RECORD. | ||
| 868 | When you have finished composing, type \\[bookmark-send-annotation]. | ||
| 869 | |||
| 870 | \\{bookmark-edit-annotation-mode-map}" | ||
| 871 | (interactive) | ||
| 872 | (kill-all-local-variables) | ||
| 873 | (make-local-variable 'bookmark-annotation-name) | ||
| 874 | (setq bookmark-annotation-name bookmark-name-or-record) | ||
| 875 | (use-local-map bookmark-edit-annotation-mode-map) | ||
| 876 | (setq major-mode 'bookmark-edit-annotation-mode | ||
| 877 | mode-name "Edit Bookmark Annotation") | ||
| 878 | (insert (funcall bookmark-edit-annotation-text-func bookmark-name-or-record)) | 866 | (insert (funcall bookmark-edit-annotation-text-func bookmark-name-or-record)) |
| 879 | (let ((annotation (bookmark-get-annotation bookmark-name-or-record))) | 867 | (let ((annotation (bookmark-get-annotation bookmark-name-or-record))) |
| 880 | (if (and annotation (not (string-equal annotation ""))) | 868 | (if (and annotation (not (string-equal annotation ""))) |
| 881 | (insert annotation))) | 869 | (insert annotation)))) |
| 882 | (run-mode-hooks 'text-mode-hook)) | 870 | |
| 871 | (define-derived-mode bookmark-edit-annotation-mode | ||
| 872 | text-mode "Edit Bookmark Annotation" | ||
| 873 | "Mode for editing the annotation of bookmarks. | ||
| 874 | When you have finished composing, type \\[bookmark-send-annotation]. | ||
| 875 | |||
| 876 | \\{bookmark-edit-annotation-mode-map}") | ||
| 883 | 877 | ||
| 884 | 878 | ||
| 885 | (defun bookmark-send-edited-annotation () | 879 | (defun bookmark-send-edited-annotation () |
| 886 | "Use buffer contents as annotation for a bookmark. | 880 | "Use buffer contents as annotation for a bookmark. |
| 887 | Lines beginning with `#' are ignored." | 881 | Lines beginning with `#' are ignored." |
| 888 | (interactive) | 882 | (interactive) |
| 889 | (if (not (eq major-mode 'bookmark-edit-annotation-mode)) | 883 | (if (not (derived-mode-p 'bookmark-edit-annotation-mode)) |
| 890 | (error "Not in bookmark-edit-annotation-mode")) | 884 | (error "Not in bookmark-edit-annotation-mode")) |
| 891 | (goto-char (point-min)) | 885 | (goto-char (point-min)) |
| 892 | (while (< (point) (point-max)) | 886 | (while (< (point) (point-max)) |
| @@ -906,7 +900,10 @@ Lines beginning with `#' are ignored." | |||
| 906 | (defun bookmark-edit-annotation (bookmark-name-or-record) | 900 | (defun bookmark-edit-annotation (bookmark-name-or-record) |
| 907 | "Pop up a buffer for editing bookmark BOOKMARK-NAME-OR-RECORD's annotation." | 901 | "Pop up a buffer for editing bookmark BOOKMARK-NAME-OR-RECORD's annotation." |
| 908 | (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*")) | 902 | (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*")) |
| 909 | (bookmark-edit-annotation-mode bookmark-name-or-record)) | 903 | (bookmark-insert-annotation bookmark-name-or-record) |
| 904 | (bookmark-edit-annotation-mode) | ||
| 905 | (set (make-local-variable 'bookmark-annotation-name) | ||
| 906 | bookmark-name-or-record)) | ||
| 910 | 907 | ||
| 911 | 908 | ||
| 912 | (defun bookmark-buffer-name () | 909 | (defun bookmark-buffer-name () |
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 2b7b56c3f89..641453568ca 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | (require 'calc-macs) | 30 | (require 'calc-macs) |
| 31 | 31 | ||
| 32 | ;; Declare functions which are defined elsewhere. | 32 | ;; Declare functions which are defined elsewhere. |
| 33 | (declare-function Info-goto-node "info" (nodename &optional fork)) | 33 | (declare-function Info-goto-node "info" (nodename &optional fork strict-case)) |
| 34 | (declare-function Info-last "info" ()) | 34 | (declare-function Info-last "info" ()) |
| 35 | 35 | ||
| 36 | 36 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 2eeb880c34d..2795a177a41 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -1387,7 +1387,12 @@ Notations: 3.14e6 3.14 * 10^6 | |||
| 1387 | (calc-check-defines)) | 1387 | (calc-check-defines)) |
| 1388 | (setplist 'calc-define nil))))) | 1388 | (setplist 'calc-define nil))))) |
| 1389 | 1389 | ||
| 1390 | (defun calc-trail-mode (&optional buf) | 1390 | (defvar calc-trail-mode-map |
| 1391 | (let ((map (make-sparse-keymap))) | ||
| 1392 | (set-keymap-parent map calc-mode-map) | ||
| 1393 | map)) | ||
| 1394 | |||
| 1395 | (define-derived-mode calc-trail-mode fundamental-mode "Calc Trail" | ||
| 1391 | "Calc Trail mode. | 1396 | "Calc Trail mode. |
| 1392 | This mode is used by the *Calc Trail* buffer, which records all results | 1397 | This mode is used by the *Calc Trail* buffer, which records all results |
| 1393 | obtained by the GNU Emacs Calculator. | 1398 | obtained by the GNU Emacs Calculator. |
| @@ -1397,26 +1402,18 @@ the Trail. | |||
| 1397 | 1402 | ||
| 1398 | This buffer uses the same key map as the *Calculator* buffer; calculator | 1403 | This buffer uses the same key map as the *Calculator* buffer; calculator |
| 1399 | commands given here will actually operate on the *Calculator* stack." | 1404 | commands given here will actually operate on the *Calculator* stack." |
| 1400 | (interactive) | ||
| 1401 | (fundamental-mode) | ||
| 1402 | (use-local-map calc-mode-map) | ||
| 1403 | (setq major-mode 'calc-trail-mode) | ||
| 1404 | (setq mode-name "Calc Trail") | ||
| 1405 | (setq truncate-lines t) | 1405 | (setq truncate-lines t) |
| 1406 | (setq buffer-read-only t) | 1406 | (setq buffer-read-only t) |
| 1407 | (make-local-variable 'overlay-arrow-position) | 1407 | (make-local-variable 'overlay-arrow-position) |
| 1408 | (make-local-variable 'overlay-arrow-string) | 1408 | (make-local-variable 'overlay-arrow-string) |
| 1409 | (when buf | ||
| 1410 | (set (make-local-variable 'calc-main-buffer) buf)) | ||
| 1411 | (when (= (buffer-size) 0) | 1409 | (when (= (buffer-size) 0) |
| 1412 | (let ((buffer-read-only nil)) | 1410 | (let ((buffer-read-only nil)) |
| 1413 | (insert (propertize "Emacs Calculator Trail\n" 'face 'italic)))) | 1411 | (insert (propertize "Emacs Calculator Trail\n" 'face 'italic))))) |
| 1414 | (run-mode-hooks 'calc-trail-mode-hook)) | ||
| 1415 | 1412 | ||
| 1416 | (defun calc-create-buffer () | 1413 | (defun calc-create-buffer () |
| 1417 | "Create and initialize a buffer for the Calculator." | 1414 | "Create and initialize a buffer for the Calculator." |
| 1418 | (set-buffer (get-buffer-create "*Calculator*")) | 1415 | (set-buffer (get-buffer-create "*Calculator*")) |
| 1419 | (or (eq major-mode 'calc-mode) | 1416 | (or (derived-mode-p 'calc-mode) |
| 1420 | (calc-mode)) | 1417 | (calc-mode)) |
| 1421 | (setq max-lisp-eval-depth (max max-lisp-eval-depth 1000)) | 1418 | (setq max-lisp-eval-depth (max max-lisp-eval-depth 1000)) |
| 1422 | (when calc-always-load-extensions | 1419 | (when calc-always-load-extensions |
| @@ -1439,7 +1436,7 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1439 | (when (get-buffer-window "*Calc Keypad*") | 1436 | (when (get-buffer-window "*Calc Keypad*") |
| 1440 | (calc-keypad) | 1437 | (calc-keypad) |
| 1441 | (set-buffer (window-buffer))) | 1438 | (set-buffer (window-buffer))) |
| 1442 | (if (eq major-mode 'calc-mode) | 1439 | (if (derived-mode-p 'calc-mode) |
| 1443 | (calc-quit) | 1440 | (calc-quit) |
| 1444 | (let ((oldbuf (current-buffer))) | 1441 | (let ((oldbuf (current-buffer))) |
| 1445 | (calc-create-buffer) | 1442 | (calc-create-buffer) |
| @@ -1490,7 +1487,7 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1490 | (if (and (equal (buffer-name) "*Gnuplot Trail*") | 1487 | (if (and (equal (buffer-name) "*Gnuplot Trail*") |
| 1491 | (> (recursion-depth) 0)) | 1488 | (> (recursion-depth) 0)) |
| 1492 | (exit-recursive-edit) | 1489 | (exit-recursive-edit) |
| 1493 | (if (eq major-mode 'calc-edit-mode) | 1490 | (if (derived-mode-p 'calc-edit-mode) |
| 1494 | (calc-edit-finish arg) | 1491 | (calc-edit-finish arg) |
| 1495 | (if calc-was-keypad-mode | 1492 | (if calc-was-keypad-mode |
| 1496 | (calc-keypad) | 1493 | (calc-keypad) |
| @@ -1504,13 +1501,13 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1504 | (if (and (equal (buffer-name) "*Gnuplot Trail*") | 1501 | (if (and (equal (buffer-name) "*Gnuplot Trail*") |
| 1505 | (> (recursion-depth) 0)) | 1502 | (> (recursion-depth) 0)) |
| 1506 | (exit-recursive-edit)) | 1503 | (exit-recursive-edit)) |
| 1507 | (if (eq major-mode 'calc-edit-mode) | 1504 | (if (derived-mode-p 'calc-edit-mode) |
| 1508 | (calc-edit-cancel) | 1505 | (calc-edit-cancel) |
| 1509 | (if (and interactive | 1506 | (if (and interactive |
| 1510 | calc-embedded-info | 1507 | calc-embedded-info |
| 1511 | (eq (current-buffer) (aref calc-embedded-info 0))) | 1508 | (eq (current-buffer) (aref calc-embedded-info 0))) |
| 1512 | (calc-embedded nil) | 1509 | (calc-embedded nil) |
| 1513 | (unless (eq major-mode 'calc-mode) | 1510 | (unless (derived-mode-p 'calc-mode) |
| 1514 | (calc-create-buffer)) | 1511 | (calc-create-buffer)) |
| 1515 | (run-hooks 'calc-end-hook) | 1512 | (run-hooks 'calc-end-hook) |
| 1516 | (if (integerp calc-undo-length) | 1513 | (if (integerp calc-undo-length) |
| @@ -1631,10 +1628,10 @@ See calc-keypad for details." | |||
| 1631 | (if (math-lessp 1 time) | 1628 | (if (math-lessp 1 time) |
| 1632 | (calc-record time "(t)")))) | 1629 | (calc-record time "(t)")))) |
| 1633 | (or (memq 'no-align calc-command-flags) | 1630 | (or (memq 'no-align calc-command-flags) |
| 1634 | (eq major-mode 'calc-trail-mode) | 1631 | (derived-mode-p 'calc-trail-mode) |
| 1635 | (calc-align-stack-window)) | 1632 | (calc-align-stack-window)) |
| 1636 | (and (memq 'position-point calc-command-flags) | 1633 | (and (memq 'position-point calc-command-flags) |
| 1637 | (if (eq major-mode 'calc-mode) | 1634 | (if (derived-mode-p 'calc-mode) |
| 1638 | (progn | 1635 | (progn |
| 1639 | (goto-char (point-min)) | 1636 | (goto-char (point-min)) |
| 1640 | (forward-line (1- calc-final-point-line)) | 1637 | (forward-line (1- calc-final-point-line)) |
| @@ -1664,7 +1661,7 @@ See calc-keypad for details." | |||
| 1664 | (setq calc-command-flags (cons f calc-command-flags)))) | 1661 | (setq calc-command-flags (cons f calc-command-flags)))) |
| 1665 | 1662 | ||
| 1666 | (defun calc-select-buffer () | 1663 | (defun calc-select-buffer () |
| 1667 | (or (eq major-mode 'calc-mode) | 1664 | (or (derived-mode-p 'calc-mode) |
| 1668 | (if calc-main-buffer | 1665 | (if calc-main-buffer |
| 1669 | (set-buffer calc-main-buffer) | 1666 | (set-buffer calc-main-buffer) |
| 1670 | (let ((buf (get-buffer "*Calculator*"))) | 1667 | (let ((buf (get-buffer "*Calculator*"))) |
| @@ -1801,7 +1798,7 @@ See calc-keypad for details." | |||
| 1801 | (and calc-embedded-info (calc-embedded-mode-line-change)))))) | 1798 | (and calc-embedded-info (calc-embedded-mode-line-change)))))) |
| 1802 | 1799 | ||
| 1803 | (defun calc-align-stack-window () | 1800 | (defun calc-align-stack-window () |
| 1804 | (if (eq major-mode 'calc-mode) | 1801 | (if (derived-mode-p 'calc-mode) |
| 1805 | (progn | 1802 | (progn |
| 1806 | (let ((win (get-buffer-window (current-buffer)))) | 1803 | (let ((win (get-buffer-window (current-buffer)))) |
| 1807 | (if win | 1804 | (if win |
| @@ -1988,7 +1985,7 @@ See calc-keypad for details." | |||
| 1988 | (defvar calc-any-evaltos nil) | 1985 | (defvar calc-any-evaltos nil) |
| 1989 | (defun calc-refresh (&optional align) | 1986 | (defun calc-refresh (&optional align) |
| 1990 | (interactive) | 1987 | (interactive) |
| 1991 | (and (eq major-mode 'calc-mode) | 1988 | (and (derived-mode-p 'calc-mode) |
| 1992 | (not calc-executing-macro) | 1989 | (not calc-executing-macro) |
| 1993 | (let* ((buffer-read-only nil) | 1990 | (let* ((buffer-read-only nil) |
| 1994 | (save-point (point)) | 1991 | (save-point (point)) |
| @@ -2016,7 +2013,7 @@ See calc-keypad for details." | |||
| 2016 | (calc-align-stack-window) | 2013 | (calc-align-stack-window) |
| 2017 | (goto-char save-point)) | 2014 | (goto-char save-point)) |
| 2018 | (if save-mark (set-mark save-mark)))) | 2015 | (if save-mark (set-mark save-mark)))) |
| 2019 | (and calc-embedded-info (not (eq major-mode 'calc-mode)) | 2016 | (and calc-embedded-info (not (derived-mode-p 'calc-mode)) |
| 2020 | (with-current-buffer (aref calc-embedded-info 1) | 2017 | (with-current-buffer (aref calc-embedded-info 1) |
| 2021 | (calc-refresh align))) | 2018 | (calc-refresh align))) |
| 2022 | (setq calc-refresh-count (1+ calc-refresh-count))) | 2019 | (setq calc-refresh-count (1+ calc-refresh-count))) |
| @@ -2078,12 +2075,13 @@ the United States." | |||
| 2078 | (null (buffer-name calc-trail-buffer))) | 2075 | (null (buffer-name calc-trail-buffer))) |
| 2079 | (save-excursion | 2076 | (save-excursion |
| 2080 | (setq calc-trail-buffer (get-buffer-create "*Calc Trail*")) | 2077 | (setq calc-trail-buffer (get-buffer-create "*Calc Trail*")) |
| 2081 | (let ((buf (or (and (not (eq major-mode 'calc-mode)) | 2078 | (let ((buf (or (and (not (derived-mode-p 'calc-mode)) |
| 2082 | (get-buffer "*Calculator*")) | 2079 | (get-buffer "*Calculator*")) |
| 2083 | (current-buffer)))) | 2080 | (current-buffer)))) |
| 2084 | (set-buffer calc-trail-buffer) | 2081 | (set-buffer calc-trail-buffer) |
| 2085 | (or (eq major-mode 'calc-trail-mode) | 2082 | (unless (derived-mode-p 'calc-trail-mode) |
| 2086 | (calc-trail-mode buf))))) | 2083 | (calc-trail-mode) |
| 2084 | (set (make-local-variable 'calc-main-buffer) buf))))) | ||
| 2087 | (or (and calc-trail-pointer | 2085 | (or (and calc-trail-pointer |
| 2088 | (eq (marker-buffer calc-trail-pointer) calc-trail-buffer)) | 2086 | (eq (marker-buffer calc-trail-pointer) calc-trail-buffer)) |
| 2089 | (with-current-buffer calc-trail-buffer | 2087 | (with-current-buffer calc-trail-buffer |
| @@ -2152,7 +2150,7 @@ the United States." | |||
| 2152 | 2150 | ||
| 2153 | (defun calc-trail-here () | 2151 | (defun calc-trail-here () |
| 2154 | (interactive) | 2152 | (interactive) |
| 2155 | (if (eq major-mode 'calc-trail-mode) | 2153 | (if (derived-mode-p 'calc-trail-mode) |
| 2156 | (progn | 2154 | (progn |
| 2157 | (beginning-of-line) | 2155 | (beginning-of-line) |
| 2158 | (if (bobp) | 2156 | (if (bobp) |
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 50467fa6e37..f5528202bb4 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * semantic/grammar.el (semantic-grammar-mode): Use define-derived-mode. | ||
| 4 | (semantic-grammar-mode-syntax-table): Rename from | ||
| 5 | semantic-grammar-syntax-table. | ||
| 6 | (semantic-grammar-mode-map): Rename from semantic-grammar-map. | ||
| 7 | * data-debug.el (data-debug-mode-map): Rename from data-debug-map. | ||
| 8 | (data-debug-mode): Use define-derived-mode. | ||
| 9 | |||
| 1 | 2013-09-05 Glenn Morris <rgm@gnu.org> | 10 | 2013-09-05 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * semantic/fw.el (semantic-make-local-hook): | 12 | * semantic/fw.el (semantic-make-local-hook): |
| @@ -15,15 +24,15 @@ | |||
| 15 | 24 | ||
| 16 | * semantic/decorate/mode.el | 25 | * semantic/decorate/mode.el |
| 17 | (semantic-decoration-on-includes-p-default) | 26 | (semantic-decoration-on-includes-p-default) |
| 18 | (semantic-decoration-on-includes-highlight-default): Declare for | 27 | (semantic-decoration-on-includes-highlight-default): Declare for |
| 19 | byte compiler. | 28 | byte compiler. |
| 20 | 29 | ||
| 21 | * semantic/wisent/python.el (semantic/format): New require. | 30 | * semantic/wisent/python.el (semantic/format): New require. |
| 22 | 31 | ||
| 23 | 2013-07-27 Eric Ludlam <zappo@gnu.org> | 32 | 2013-07-27 Eric Ludlam <zappo@gnu.org> |
| 24 | 33 | ||
| 25 | * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap | 34 | * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): |
| 26 | debug message removing middle tag in semantic-edits-verbose-flag | 35 | Wrap debug message removing middle tag in semantic-edits-verbose-flag |
| 27 | check. | 36 | check. |
| 28 | 37 | ||
| 29 | 2013-07-27 David Engster <deng@randomsample.de> | 38 | 2013-07-27 David Engster <deng@randomsample.de> |
| @@ -69,8 +78,8 @@ | |||
| 69 | `semantic/decorate/include' anymore. | 78 | `semantic/decorate/include' anymore. |
| 70 | (semantic-toggle-decoration-style): Error if an unknown decoration | 79 | (semantic-toggle-decoration-style): Error if an unknown decoration |
| 71 | style is toggled. | 80 | style is toggled. |
| 72 | (define-semantic-decoration-style): Add new :load option. When | 81 | (define-semantic-decoration-style): Add new :load option. |
| 73 | :load is specified, add autoload tokens for the definition | 82 | When :load is specified, add autoload tokens for the definition |
| 74 | functions so that code is loaded when the mode is used. | 83 | functions so that code is loaded when the mode is used. |
| 75 | (semantic-decoration-on-includes): New autoload definition for | 84 | (semantic-decoration-on-includes): New autoload definition for |
| 76 | highlighting includes. | 85 | highlighting includes. |
| @@ -94,8 +103,8 @@ | |||
| 94 | * semantic/ctxt.el (semantic-ctxt-end-of-symbol): New. | 103 | * semantic/ctxt.el (semantic-ctxt-end-of-symbol): New. |
| 95 | (semantic-ctxt-current-symbol-default): New. | 104 | (semantic-ctxt-current-symbol-default): New. |
| 96 | 105 | ||
| 97 | * semantic/bovine/el.el (semantic-default-elisp-setup): Add | 106 | * semantic/bovine/el.el (semantic-default-elisp-setup): |
| 98 | autoload cookie. Explain existence. | 107 | Add autoload cookie. Explain existence. |
| 99 | (footer): Add local variable for loaddefs. | 108 | (footer): Add local variable for loaddefs. |
| 100 | 109 | ||
| 101 | * semantic/db.el (semanticdb-file-table-object): Add new filter, | 110 | * semantic/db.el (semanticdb-file-table-object): Add new filter, |
| @@ -120,7 +129,7 @@ | |||
| 120 | * ede/cpp-root.el (ede-preprocessor-map): Protect against init | 129 | * ede/cpp-root.el (ede-preprocessor-map): Protect against init |
| 121 | problems. | 130 | problems. |
| 122 | 131 | ||
| 123 | * ede/proj.el (ede-proj-target): Added a new "custom" option for | 132 | * ede/proj.el (ede-proj-target): Add a new "custom" option for |
| 124 | custom symbols representing a compiler or linker instead of | 133 | custom symbols representing a compiler or linker instead of |
| 125 | restricting things to only the predefined compilers and linkers. | 134 | restricting things to only the predefined compilers and linkers. |
| 126 | 135 | ||
| @@ -198,15 +207,15 @@ | |||
| 198 | 2013-04-27 David Engster <deng@randomsample.de> | 207 | 2013-04-27 David Engster <deng@randomsample.de> |
| 199 | 208 | ||
| 200 | * semantic/complete.el | 209 | * semantic/complete.el |
| 201 | (semantic-collector-calculate-completions-raw): If | 210 | (semantic-collector-calculate-completions-raw): |
| 202 | `completionslist' is not set, refresh the cache if necessary and | 211 | If `completionslist' is not set, refresh the cache if necessary and |
| 203 | use it for completions. This fixes the | 212 | use it for completions. This fixes the |
| 204 | `semantic-collector-buffer-deep' collector (bug#14265). | 213 | `semantic-collector-buffer-deep' collector (bug#14265). |
| 205 | 214 | ||
| 206 | 2013-03-26 Leo Liu <sdl.web@gmail.com> | 215 | 2013-03-26 Leo Liu <sdl.web@gmail.com> |
| 207 | 216 | ||
| 208 | * semantic/senator.el (senator-copy-tag-to-register): Move | 217 | * semantic/senator.el (senator-copy-tag-to-register): |
| 209 | register handling logic from register.el. (Bug#14052) | 218 | Move register handling logic from register.el. (Bug#14052) |
| 210 | 219 | ||
| 211 | 2013-03-21 Eric Ludlam <zappo@gnu.org> | 220 | 2013-03-21 Eric Ludlam <zappo@gnu.org> |
| 212 | 221 | ||
| @@ -223,17 +232,17 @@ | |||
| 223 | 232 | ||
| 224 | * semantic/find.el (semantic-filter-tags-by-class): New function. | 233 | * semantic/find.el (semantic-filter-tags-by-class): New function. |
| 225 | 234 | ||
| 226 | * semantic/tag-ls.el (semantic-tag-similar-p-default): Add | 235 | * semantic/tag-ls.el (semantic-tag-similar-p-default): |
| 227 | short-circuit in case tag1 and 2 are identical. | 236 | Add short-circuit in case tag1 and 2 are identical. |
| 228 | 237 | ||
| 229 | * semantic/analyze/fcn.el | 238 | * semantic/analyze/fcn.el |
| 230 | (semantic-analyze-dereference-metatype-stack): Use | 239 | (semantic-analyze-dereference-metatype-stack): |
| 231 | `semantic-tag-similar-p' instead of 'eq' when comparing two tags | 240 | Use `semantic-tag-similar-p' instead of 'eq' when comparing two tags |
| 232 | during metatype evaluation in case they are the same, but not the | 241 | during metatype evaluation in case they are the same, but not the |
| 233 | same node. (Tweaked patch from Tomasz Gajewski) (Tiny change) | 242 | same node. (Tweaked patch from Tomasz Gajewski) (Tiny change) |
| 234 | 243 | ||
| 235 | * semantic/db-find.el (semanticdb-partial-synchronize): Fix | 244 | * semantic/db-find.el (semanticdb-partial-synchronize): |
| 236 | require to semantic/db-typecache to be correct. | 245 | Fix require to semantic/db-typecache to be correct. |
| 237 | (semanticdb-find-tags-external-children-of-type): Make this a | 246 | (semanticdb-find-tags-external-children-of-type): Make this a |
| 238 | brutish search by default. | 247 | brutish search by default. |
| 239 | 248 | ||
| @@ -243,19 +252,19 @@ | |||
| 243 | input tag as the place to start searching for externally defined | 252 | input tag as the place to start searching for externally defined |
| 244 | methods. | 253 | methods. |
| 245 | 254 | ||
| 246 | * semantic/db-file.el (semanticdb-default-save-directory): Doc | 255 | * semantic/db-file.el (semanticdb-default-save-directory): |
| 247 | fix: Add ref to default value. | 256 | Doc fix: Add ref to default value. |
| 248 | 257 | ||
| 249 | * semantic/complete.el (semantic-complete-post-command-hook): When | 258 | * semantic/complete.el (semantic-complete-post-command-hook): |
| 250 | detecting if cursor is outside completion area, do so if cursor | 259 | When detecting if cursor is outside completion area, do so if cursor |
| 251 | moves before start of overlay, or the original starting location | 260 | moves before start of overlay, or the original starting location |
| 252 | of the overlay (i.e., if user deletes past beginning of the | 261 | of the overlay (i.e., if user deletes past beginning of the |
| 253 | overlay region). | 262 | overlay region). |
| 254 | (semantic-complete-inline-tag-engine): Initialize original start | 263 | (semantic-complete-inline-tag-engine): Initialize original start |
| 255 | of `semantic-complete-inline-overlay'. | 264 | of `semantic-complete-inline-overlay'. |
| 256 | 265 | ||
| 257 | * semantic/bovine/c.el (semantic-c-describe-environment): Update | 266 | * semantic/bovine/c.el (semantic-c-describe-environment): |
| 258 | some section titles. Test semanticdb table before printing it. | 267 | Update some section titles. Test semanticdb table before printing it. |
| 259 | (semantic-c-reset-preprocessor-symbol-map): Update | 268 | (semantic-c-reset-preprocessor-symbol-map): Update |
| 260 | `semantic-lex-spp-macro-symbol-obarray' outside the loop over all | 269 | `semantic-lex-spp-macro-symbol-obarray' outside the loop over all |
| 261 | the files contributing to its value. | 270 | the files contributing to its value. |
| @@ -271,8 +280,8 @@ | |||
| 271 | * srecode/cpp.el (srecode-semantic-handle-:c): Replace all | 280 | * srecode/cpp.el (srecode-semantic-handle-:c): Replace all |
| 272 | characters in FILENAME_SYMBOL that aren't valid CPP symbol chars. | 281 | characters in FILENAME_SYMBOL that aren't valid CPP symbol chars. |
| 273 | 282 | ||
| 274 | * srecode/map.el (srecode-map-validate-file-for-mode): Force | 283 | * srecode/map.el (srecode-map-validate-file-for-mode): |
| 275 | semantic to load if it is not active in the template being added | 284 | Force semantic to load if it is not active in the template being added |
| 276 | to the map. | 285 | to the map. |
| 277 | 286 | ||
| 278 | * srecode/srt.el: Add local variables for setting the autoload | 287 | * srecode/srt.el: Add local variables for setting the autoload |
| @@ -287,7 +296,7 @@ | |||
| 287 | has both a version variable and a Version: comment, always use | 296 | has both a version variable and a Version: comment, always use |
| 288 | `call-next-method'. | 297 | `call-next-method'. |
| 289 | 298 | ||
| 290 | * ede/cpp-root.el (ede-set-project-variables): Deleted. | 299 | * ede/cpp-root.el (ede-set-project-variables): Delete. |
| 291 | `ede-preprocessor-map' does the job this function was attempting | 300 | `ede-preprocessor-map' does the job this function was attempting |
| 292 | to do with :spp-table. | 301 | to do with :spp-table. |
| 293 | (ede-preprocessor-map): Update file tests to provide better | 302 | (ede-preprocessor-map): Update file tests to provide better |
| @@ -302,8 +311,8 @@ | |||
| 302 | 2013-03-21 David Engster <deng@randomsample.de> | 311 | 2013-03-21 David Engster <deng@randomsample.de> |
| 303 | 312 | ||
| 304 | * semantic/bovine/c.el (semantic-get-local-variables): Also add a | 313 | * semantic/bovine/c.el (semantic-get-local-variables): Also add a |
| 305 | new variable 'this' if we are in an inline member function. For | 314 | new variable 'this' if we are in an inline member function. |
| 306 | detecting this, we check overlays at point if there is a class | 315 | For detecting this, we check overlays at point if there is a class |
| 307 | spanning the current function. Also, the variable 'this' has to | 316 | spanning the current function. Also, the variable 'this' has to |
| 308 | be a pointer. | 317 | be a pointer. |
| 309 | 318 | ||
| @@ -350,14 +359,14 @@ | |||
| 350 | 359 | ||
| 351 | 2013-03-21 Tomasz Gajewski <tomga@wp.pl> (tiny change) | 360 | 2013-03-21 Tomasz Gajewski <tomga@wp.pl> (tiny change) |
| 352 | 361 | ||
| 353 | * ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix | 362 | * ede/cpp-root.el (ede-project-autoload, initialize-instance): |
| 354 | EDE file symbol to match rename. Fix ede-cpp-root symbol to | 363 | Fix EDE file symbol to match rename. Fix ede-cpp-root symbol to |
| 355 | include -project in name. | 364 | include -project in name. |
| 356 | 365 | ||
| 357 | 2013-03-21 Alex Ott <alexott@gmail.com> | 366 | 2013-03-21 Alex Ott <alexott@gmail.com> |
| 358 | 367 | ||
| 359 | * cedet-files.el (cedet-files-list-recursively): New. Recursively | 368 | * cedet-files.el (cedet-files-list-recursively): New. |
| 360 | find files whose names are matching to given regex. | 369 | Recursively find files whose names are matching to given regex. |
| 361 | 370 | ||
| 362 | * ede.el (ede-current-project): Rewrite to avoid imperative style. | 371 | * ede.el (ede-current-project): Rewrite to avoid imperative style. |
| 363 | 372 | ||
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index c468ec1046a..4658c604211 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el | |||
| @@ -869,7 +869,8 @@ If PARENT is non-nil, it is somehow related as a parent to thing." | |||
| 869 | table) | 869 | table) |
| 870 | "Syntax table used in data-debug macro buffers.") | 870 | "Syntax table used in data-debug macro buffers.") |
| 871 | 871 | ||
| 872 | (defvar data-debug-map | 872 | (define-obsolete-variable-alias 'data-debug-map 'data-debug-mode-map "24.1") |
| 873 | (defvar data-debug-mode-map | ||
| 873 | (let ((km (make-sparse-keymap))) | 874 | (let ((km (make-sparse-keymap))) |
| 874 | (suppress-keymap km) | 875 | (suppress-keymap km) |
| 875 | (define-key km [mouse-2] 'data-debug-expand-or-contract-mouse) | 876 | (define-key km [mouse-2] 'data-debug-expand-or-contract-mouse) |
| @@ -887,22 +888,15 @@ If PARENT is non-nil, it is somehow related as a parent to thing." | |||
| 887 | :group 'data-debug | 888 | :group 'data-debug |
| 888 | :type 'hook) | 889 | :type 'hook) |
| 889 | 890 | ||
| 890 | (defun data-debug-mode () | 891 | (define-derived-mode data-debug-mode fundamental-mode "DATA-DEBUG" |
| 891 | "Major-mode for the Analyzer debugger. | 892 | "Major-mode for the Analyzer debugger. |
| 892 | 893 | ||
| 893 | \\{data-debug-map}" | 894 | \\{data-debug-mode-map}" |
| 894 | (interactive) | 895 | (setq comment-start ";;" |
| 895 | (kill-all-local-variables) | ||
| 896 | (setq major-mode 'data-debug-mode | ||
| 897 | mode-name "DATA-DEBUG" | ||
| 898 | comment-start ";;" | ||
| 899 | comment-end "" | 896 | comment-end "" |
| 900 | buffer-read-only t) | 897 | buffer-read-only t) |
| 901 | (set (make-local-variable 'comment-start-skip) | 898 | (setq-local comment-start-skip |
| 902 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") | 899 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") |
| 903 | (set-syntax-table data-debug-mode-syntax-table) | ||
| 904 | (use-local-map data-debug-map) | ||
| 905 | (run-hooks 'data-debug-hook) | ||
| 906 | (buffer-disable-undo) | 900 | (buffer-disable-undo) |
| 907 | (set (make-local-variable 'font-lock-global-modes) nil) | 901 | (set (make-local-variable 'font-lock-global-modes) nil) |
| 908 | (font-lock-mode -1) | 902 | (font-lock-mode -1) |
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index ce658cd5d54..60c4ccadf65 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el | |||
| @@ -860,7 +860,7 @@ Lisp code." | |||
| 860 | ;; Use Unix EOLs, so that the file is portable to all platforms. | 860 | ;; Use Unix EOLs, so that the file is portable to all platforms. |
| 861 | (setq buffer-file-coding-system 'raw-text-unix) | 861 | (setq buffer-file-coding-system 'raw-text-unix) |
| 862 | (erase-buffer) | 862 | (erase-buffer) |
| 863 | (unless (eq major-mode 'emacs-lisp-mode) | 863 | (unless (derived-mode-p 'emacs-lisp-mode) |
| 864 | (emacs-lisp-mode)) | 864 | (emacs-lisp-mode)) |
| 865 | 865 | ||
| 866 | ;;;; Header + Prologue | 866 | ;;;; Header + Prologue |
| @@ -1102,7 +1102,9 @@ END is the limit of the search." | |||
| 1102 | ;;;; Define major mode | 1102 | ;;;; Define major mode |
| 1103 | ;;;; | 1103 | ;;;; |
| 1104 | 1104 | ||
| 1105 | (defvar semantic-grammar-syntax-table | 1105 | (define-obsolete-variable-alias 'semantic-grammar-syntax-table |
| 1106 | 'semantic-grammar-mode-syntax-table "24.1") | ||
| 1107 | (defvar semantic-grammar-mode-syntax-table | ||
| 1106 | (let ((table (make-syntax-table (standard-syntax-table)))) | 1108 | (let ((table (make-syntax-table (standard-syntax-table)))) |
| 1107 | (modify-syntax-entry ?\: "." table) ;; COLON | 1109 | (modify-syntax-entry ?\: "." table) ;; COLON |
| 1108 | (modify-syntax-entry ?\> "." table) ;; GT | 1110 | (modify-syntax-entry ?\> "." table) ;; GT |
| @@ -1170,7 +1172,9 @@ END is the limit of the search." | |||
| 1170 | semantic-grammar-mode-keywords-1 | 1172 | semantic-grammar-mode-keywords-1 |
| 1171 | "Font Lock keywords used to highlight Semantic grammar buffers.") | 1173 | "Font Lock keywords used to highlight Semantic grammar buffers.") |
| 1172 | 1174 | ||
| 1173 | (defvar semantic-grammar-map | 1175 | (define-obsolete-variable-alias 'semantic-grammar-map |
| 1176 | 'semantic-grammar-mode-map "24.1") | ||
| 1177 | (defvar semantic-grammar-mode-map | ||
| 1174 | (let ((km (make-sparse-keymap))) | 1178 | (let ((km (make-sparse-keymap))) |
| 1175 | 1179 | ||
| 1176 | (define-key km "|" 'semantic-grammar-electric-punctuation) | 1180 | (define-key km "|" 'semantic-grammar-electric-punctuation) |
| @@ -1271,22 +1275,17 @@ the change bounds to encompass the whole nonterminal tag." | |||
| 1271 | (semantic-tag-start outer) | 1275 | (semantic-tag-start outer) |
| 1272 | (semantic-tag-end outer))))) | 1276 | (semantic-tag-end outer))))) |
| 1273 | 1277 | ||
| 1274 | (defun semantic-grammar-mode () | 1278 | (define-derived-mode semantic-grammar-mode |
| 1279 | fundamental-mode "Semantic Grammar Framework" | ||
| 1275 | "Initialize a buffer for editing Semantic grammars. | 1280 | "Initialize a buffer for editing Semantic grammars. |
| 1276 | 1281 | ||
| 1277 | \\{semantic-grammar-map}" | 1282 | \\{semantic-grammar-mode-map}" |
| 1278 | (interactive) | ||
| 1279 | (kill-all-local-variables) | ||
| 1280 | (setq major-mode 'semantic-grammar-mode | ||
| 1281 | mode-name "Semantic Grammar Framework") | ||
| 1282 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | 1283 | (set (make-local-variable 'parse-sexp-ignore-comments) t) |
| 1283 | (set (make-local-variable 'comment-start) ";;") | 1284 | (set (make-local-variable 'comment-start) ";;") |
| 1284 | ;; Look within the line for a ; following an even number of backslashes | 1285 | ;; Look within the line for a ; following an even number of backslashes |
| 1285 | ;; after either a non-backslash or the line beginning. | 1286 | ;; after either a non-backslash or the line beginning. |
| 1286 | (set (make-local-variable 'comment-start-skip) | 1287 | (set (make-local-variable 'comment-start-skip) |
| 1287 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") | 1288 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") |
| 1288 | (set-syntax-table semantic-grammar-syntax-table) | ||
| 1289 | (use-local-map semantic-grammar-map) | ||
| 1290 | (set (make-local-variable 'indent-line-function) | 1289 | (set (make-local-variable 'indent-line-function) |
| 1291 | 'semantic-grammar-indent) | 1290 | 'semantic-grammar-indent) |
| 1292 | (set (make-local-variable 'fill-paragraph-function) | 1291 | (set (make-local-variable 'fill-paragraph-function) |
| @@ -1335,15 +1334,14 @@ the change bounds to encompass the whole nonterminal tag." | |||
| 1335 | (semantic-make-local-hook 'semantic-edits-new-change-functions) | 1334 | (semantic-make-local-hook 'semantic-edits-new-change-functions) |
| 1336 | (add-hook 'semantic-edits-new-change-functions | 1335 | (add-hook 'semantic-edits-new-change-functions |
| 1337 | 'semantic-grammar-edits-new-change-hook-fcn | 1336 | 'semantic-grammar-edits-new-change-hook-fcn |
| 1338 | nil t) | 1337 | nil t)) |
| 1339 | (semantic-run-mode-hooks 'semantic-grammar-mode-hook)) | ||
| 1340 | 1338 | ||
| 1341 | ;;;; | 1339 | ;;;; |
| 1342 | ;;;; Useful commands | 1340 | ;;;; Useful commands |
| 1343 | ;;;; | 1341 | ;;;; |
| 1344 | 1342 | ||
| 1345 | (defvar semantic-grammar-skip-quoted-syntax-table | 1343 | (defvar semantic-grammar-skip-quoted-syntax-table |
| 1346 | (let ((st (copy-syntax-table semantic-grammar-syntax-table))) | 1344 | (let ((st (copy-syntax-table semantic-grammar-mode-syntax-table))) |
| 1347 | (modify-syntax-entry ?\' "$" st) | 1345 | (modify-syntax-entry ?\' "$" st) |
| 1348 | st) | 1346 | st) |
| 1349 | "Syntax table to skip a whole quoted expression in grammar code. | 1347 | "Syntax table to skip a whole quoted expression in grammar code. |
diff --git a/lisp/chistory.el b/lisp/chistory.el index 509324ade88..9a77793b1e1 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el | |||
| @@ -121,7 +121,9 @@ The buffer is left in Command History mode." | |||
| 121 | (error "No command history") | 121 | (error "No command history") |
| 122 | (command-history-mode))))) | 122 | (command-history-mode))))) |
| 123 | 123 | ||
| 124 | (defvar command-history-map | 124 | (define-obsolete-variable-alias 'command-history-map |
| 125 | 'command-history-mode-map "24.1") | ||
| 126 | (defvar command-history-mode-map | ||
| 125 | (let ((map (make-sparse-keymap))) | 127 | (let ((map (make-sparse-keymap))) |
| 126 | (set-keymap-parent map lisp-mode-shared-map) | 128 | (set-keymap-parent map lisp-mode-shared-map) |
| 127 | (suppress-keymap map) | 129 | (suppress-keymap map) |
| @@ -132,21 +134,11 @@ The buffer is left in Command History mode." | |||
| 132 | map) | 134 | map) |
| 133 | "Keymap for `command-history-mode'.") | 135 | "Keymap for `command-history-mode'.") |
| 134 | 136 | ||
| 135 | (defun command-history-mode () | 137 | (define-derived-mode command-history-mode fundamental-mode "Command History" |
| 136 | "Major mode for listing and repeating recent commands. | 138 | "Major mode for listing and repeating recent commands. |
| 137 | 139 | ||
| 138 | Keybindings: | 140 | Keybindings: |
| 139 | \\{command-history-map}" | 141 | \\{command-history-mode-map}" |
| 140 | (interactive) | ||
| 141 | (Command-history-setup) | ||
| 142 | (setq major-mode 'command-history-mode) | ||
| 143 | (setq mode-name "Command History") | ||
| 144 | (use-local-map command-history-map) | ||
| 145 | (run-mode-hooks 'command-history-mode-hook)) | ||
| 146 | |||
| 147 | (defun Command-history-setup () | ||
| 148 | (kill-all-local-variables) | ||
| 149 | (use-local-map command-history-map) | ||
| 150 | (lisp-mode-variables nil) | 142 | (lisp-mode-variables nil) |
| 151 | (set-syntax-table emacs-lisp-mode-syntax-table) | 143 | (set-syntax-table emacs-lisp-mode-syntax-table) |
| 152 | (setq buffer-read-only t)) | 144 | (setq buffer-read-only t)) |
diff --git a/lisp/comint.el b/lisp/comint.el index 0ce7053c031..7572e8baabc 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -3793,25 +3793,21 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." | |||
| 3793 | ;; comint-mode will take care of it. The following example, from shell.el, | 3793 | ;; comint-mode will take care of it. The following example, from shell.el, |
| 3794 | ;; is typical: | 3794 | ;; is typical: |
| 3795 | ;; | 3795 | ;; |
| 3796 | ;; (defvar shell-mode-map '()) | 3796 | ;; (defvar shell-mode-map |
| 3797 | ;; (cond ((not shell-mode-map) | 3797 | ;; (let ((map (make-sparse-keymap))) |
| 3798 | ;; (setq shell-mode-map (copy-keymap comint-mode-map)) | 3798 | ;; (set-keymap-parent map comint-mode-map) |
| 3799 | ;; (define-key shell-mode-map "\C-c\C-f" 'shell-forward-command) | 3799 | ;; (define-key map "\C-c\C-f" 'shell-forward-command) |
| 3800 | ;; (define-key shell-mode-map "\C-c\C-b" 'shell-backward-command) | 3800 | ;; (define-key map "\C-c\C-b" 'shell-backward-command) |
| 3801 | ;; (define-key shell-mode-map "\t" 'completion-at-point) | 3801 | ;; (define-key map "\t" 'completion-at-point) |
| 3802 | ;; (define-key shell-mode-map "\M-?" | 3802 | ;; (define-key map "\M-?" |
| 3803 | ;; 'comint-dynamic-list-filename-completions))) | 3803 | ;; 'comint-dynamic-list-filename-completions) |
| 3804 | ;; map)) | ||
| 3804 | ;; | 3805 | ;; |
| 3805 | ;; (defun shell-mode () | 3806 | ;; (define-derived-mode shell-mode comint-mode "Shell" |
| 3806 | ;; (interactive) | 3807 | ;; "Doc." |
| 3807 | ;; (comint-mode) | ||
| 3808 | ;; (setq comint-prompt-regexp shell-prompt-pattern) | 3808 | ;; (setq comint-prompt-regexp shell-prompt-pattern) |
| 3809 | ;; (setq major-mode 'shell-mode) | ||
| 3810 | ;; (setq mode-name "Shell") | ||
| 3811 | ;; (use-local-map shell-mode-map) | ||
| 3812 | ;; (setq-local shell-directory-stack nil) | 3809 | ;; (setq-local shell-directory-stack nil) |
| 3813 | ;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker) | 3810 | ;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker)) |
| 3814 | ;; (run-mode-hooks 'shell-mode-hook)) | ||
| 3815 | ;; | 3811 | ;; |
| 3816 | ;; | 3812 | ;; |
| 3817 | ;; Completion for comint-mode users | 3813 | ;; Completion for comint-mode users |
diff --git a/lisp/dframe.el b/lisp/dframe.el index 66967075e34..3ef30d055b6 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el | |||
| @@ -758,9 +758,8 @@ who requested the timer. NULL-ON-ERROR is ignored." | |||
| 758 | Evaluates all cached timer functions in sequence." | 758 | Evaluates all cached timer functions in sequence." |
| 759 | (let ((l dframe-client-functions)) | 759 | (let ((l dframe-client-functions)) |
| 760 | (while (and l (sit-for 0)) | 760 | (while (and l (sit-for 0)) |
| 761 | (condition-case er | 761 | (with-demoted-errors "DFRAME TIMER ERROR: %S" |
| 762 | (funcall (car l)) | 762 | (funcall (car l))) |
| 763 | (error (message "DFRAME TIMER ERROR: %S" er))) | ||
| 764 | (setq l (cdr l))))) | 763 | (setq l (cdr l))))) |
| 765 | 764 | ||
| 766 | ;;; Menu hacking for mouse-3 | 765 | ;;; Menu hacking for mouse-3 |
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index c6ecbf1e718..c15f3b5b121 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -1459,6 +1459,9 @@ to mark all zero length files." | |||
| 1459 | s nil)) | 1459 | s nil)) |
| 1460 | (setq mode (buffer-substring (point) (+ mode-len (point)))) | 1460 | (setq mode (buffer-substring (point) (+ mode-len (point)))) |
| 1461 | (forward-char mode-len) | 1461 | (forward-char mode-len) |
| 1462 | ;; Skip any extended attributes marker ("." or "+"). | ||
| 1463 | (or (looking-at " ") | ||
| 1464 | (forward-char 1)) | ||
| 1462 | (setq nlink (read (current-buffer))) | 1465 | (setq nlink (read (current-buffer))) |
| 1463 | ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid. | 1466 | ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid. |
| 1464 | (setq uid (buffer-substring (1+ (point)) | 1467 | (setq uid (buffer-substring (1+ (point)) |
diff --git a/lisp/dired.el b/lisp/dired.el index f873aea9bf0..345e8d57113 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -4352,7 +4352,7 @@ instead. | |||
| 4352 | 4352 | ||
| 4353 | ;;;*** | 4353 | ;;;*** |
| 4354 | 4354 | ||
| 4355 | ;;;### (autoloads nil "dired-x" "dired-x.el" "1bf4009b81e55bf51947bc87b2c82994") | 4355 | ;;;### (autoloads nil "dired-x" "dired-x.el" "11fd4a8afa32507cc32d4a04d852587f") |
| 4356 | ;;; Generated autoloads from dired-x.el | 4356 | ;;; Generated autoloads from dired-x.el |
| 4357 | 4357 | ||
| 4358 | (autoload 'dired-jump "dired-x" "\ | 4358 | (autoload 'dired-jump "dired-x" "\ |
diff --git a/lisp/echistory.el b/lisp/echistory.el index fc576aa6484..5989c9b8445 100644 --- a/lisp/echistory.el +++ b/lisp/echistory.el | |||
| @@ -117,7 +117,6 @@ The Command History listing is recomputed each time this mode is invoked." | |||
| 117 | (save-window-excursion | 117 | (save-window-excursion |
| 118 | (list-command-history) | 118 | (list-command-history) |
| 119 | (set-buffer "*Command History*") | 119 | (set-buffer "*Command History*") |
| 120 | (Command-history-setup) | ||
| 121 | (setq major-mode 'electric-command-history) | 120 | (setq major-mode 'electric-command-history) |
| 122 | (setq mode-name "Electric History") | 121 | (setq mode-name "Electric History") |
| 123 | (use-local-map electric-history-map)) | 122 | (use-local-map electric-history-map)) |
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index b3fc6fb887a..2b2189e70e3 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; copyright.el --- update the copyright notice in current buffer | 1 | ;;; copyright.el --- update the copyright notice in current buffer |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1991-1995, 1998, 2001-2013 Free Software Foundation, | 3 | ;; Copyright (C) 1991-1995, 1998, 2001-2013 Free Software Foundation, Inc. |
| 4 | ;; Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> | 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> |
| 7 | ;; Keywords: maint, tools | 6 | ;; Keywords: maint, tools |
| @@ -145,18 +144,17 @@ The header must match `copyright-regexp' and `copyright-names-regexp', if set. | |||
| 145 | This function sets the match-data that `copyright-update-year' uses." | 144 | This function sets the match-data that `copyright-update-year' uses." |
| 146 | (widen) | 145 | (widen) |
| 147 | (goto-char (copyright-start-point)) | 146 | (goto-char (copyright-start-point)) |
| 148 | (condition-case err | 147 | ;; In case the regexp is rejected. This is useful because |
| 149 | ;; (1) Need the extra \\( \\) around copyright-regexp because we | 148 | ;; copyright-update is typically called from before-save-hook where |
| 150 | ;; goto (match-end 1) below. See note (2) below. | 149 | ;; such an error is very inconvenient for the user. |
| 151 | (copyright-re-search (concat "\\(" copyright-regexp | 150 | (with-demoted-errors "Can't update copyright: %s" |
| 152 | "\\)\\([ \t]*\n\\)?.*\\(?:" | 151 | ;; (1) Need the extra \\( \\) around copyright-regexp because we |
| 153 | copyright-names-regexp "\\)") | 152 | ;; goto (match-end 1) below. See note (2) below. |
| 154 | (copyright-limit) | 153 | (copyright-re-search (concat "\\(" copyright-regexp |
| 155 | t) | 154 | "\\)\\([ \t]*\n\\)?.*\\(?:" |
| 156 | ;; In case the regexp is rejected. This is useful because | 155 | copyright-names-regexp "\\)") |
| 157 | ;; copyright-update is typically called from before-save-hook where | 156 | (copyright-limit) |
| 158 | ;; such an error is very inconvenient for the user. | 157 | t))) |
| 159 | (error (message "Can't update copyright: %s" err) nil))) | ||
| 160 | 158 | ||
| 161 | (defun copyright-find-end () | 159 | (defun copyright-find-end () |
| 162 | "Possibly adjust the search performed by `copyright-find-copyright'. | 160 | "Possibly adjust the search performed by `copyright-find-copyright'. |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 709a094e73b..6c7a0d2db1d 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -626,7 +626,7 @@ The environment used is the one when entering the activation frame at point." | |||
| 626 | 626 | ||
| 627 | (put 'debugger-mode 'mode-class 'special) | 627 | (put 'debugger-mode 'mode-class 'special) |
| 628 | 628 | ||
| 629 | (defun debugger-mode () | 629 | (define-derived-mode debugger-mode fundamental-mode "Debugger" |
| 630 | "Mode for backtrace buffers, selected in debugger. | 630 | "Mode for backtrace buffers, selected in debugger. |
| 631 | \\<debugger-mode-map> | 631 | \\<debugger-mode-map> |
| 632 | A line starts with `*' if exiting that frame will call the debugger. | 632 | A line starts with `*' if exiting that frame will call the debugger. |
| @@ -641,13 +641,9 @@ which functions will enter the debugger when called. | |||
| 641 | 641 | ||
| 642 | Complete list of commands: | 642 | Complete list of commands: |
| 643 | \\{debugger-mode-map}" | 643 | \\{debugger-mode-map}" |
| 644 | (kill-all-local-variables) | ||
| 645 | (setq major-mode 'debugger-mode) | ||
| 646 | (setq mode-name "Debugger") | ||
| 647 | (setq truncate-lines t) | 644 | (setq truncate-lines t) |
| 648 | (set-syntax-table emacs-lisp-mode-syntax-table) | 645 | (set-syntax-table emacs-lisp-mode-syntax-table) |
| 649 | (use-local-map debugger-mode-map) | 646 | (use-local-map debugger-mode-map)) |
| 650 | (run-mode-hooks 'debugger-mode-hook)) | ||
| 651 | 647 | ||
| 652 | (defcustom debugger-record-buffer "*Debugger-record*" | 648 | (defcustom debugger-record-buffer "*Debugger-record*" |
| 653 | "Buffer name for expression values, for \\[debugger-record-expression]." | 649 | "Buffer name for expression values, for \\[debugger-record-expression]." |
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 9b9fd325941..250f93800ec 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -309,27 +309,26 @@ This variable is expected to be made buffer-local by modes (other than | |||
| 309 | Emacs Lisp mode) that support ElDoc.") | 309 | Emacs Lisp mode) that support ElDoc.") |
| 310 | 310 | ||
| 311 | (defun eldoc-print-current-symbol-info () | 311 | (defun eldoc-print-current-symbol-info () |
| 312 | (condition-case err | 312 | ;; This is run from post-command-hook or some idle timer thing, |
| 313 | (and (or (eldoc-display-message-p) eldoc-post-insert-mode) | 313 | ;; so we need to be careful that errors aren't ignored. |
| 314 | (if eldoc-documentation-function | 314 | (with-demoted-errors "eldoc error: %s" |
| 315 | (eldoc-message (funcall eldoc-documentation-function)) | 315 | (and (or (eldoc-display-message-p) eldoc-post-insert-mode) |
| 316 | (let* ((current-symbol (eldoc-current-symbol)) | 316 | (if eldoc-documentation-function |
| 317 | (current-fnsym (eldoc-fnsym-in-current-sexp)) | 317 | (eldoc-message (funcall eldoc-documentation-function)) |
| 318 | (doc (cond | 318 | (let* ((current-symbol (eldoc-current-symbol)) |
| 319 | ((null current-fnsym) | 319 | (current-fnsym (eldoc-fnsym-in-current-sexp)) |
| 320 | nil) | 320 | (doc (cond |
| 321 | ((eq current-symbol (car current-fnsym)) | 321 | ((null current-fnsym) |
| 322 | (or (apply 'eldoc-get-fnsym-args-string | 322 | nil) |
| 323 | current-fnsym) | 323 | ((eq current-symbol (car current-fnsym)) |
| 324 | (eldoc-get-var-docstring current-symbol))) | 324 | (or (apply 'eldoc-get-fnsym-args-string |
| 325 | (t | 325 | current-fnsym) |
| 326 | (or (eldoc-get-var-docstring current-symbol) | 326 | (eldoc-get-var-docstring current-symbol))) |
| 327 | (apply 'eldoc-get-fnsym-args-string | 327 | (t |
| 328 | current-fnsym)))))) | 328 | (or (eldoc-get-var-docstring current-symbol) |
| 329 | (eldoc-message doc)))) | 329 | (apply 'eldoc-get-fnsym-args-string |
| 330 | ;; This is run from post-command-hook or some idle timer thing, | 330 | current-fnsym)))))) |
| 331 | ;; so we need to be careful that errors aren't ignored. | 331 | (eldoc-message doc)))))) |
| 332 | (error (message "eldoc error: %s" err)))) | ||
| 333 | 332 | ||
| 334 | (defun eldoc-get-fnsym-args-string (sym &optional index) | 333 | (defun eldoc-get-fnsym-args-string (sym &optional index) |
| 335 | "Return a string containing the parameter list of the function SYM. | 334 | "Return a string containing the parameter list of the function SYM. |
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index 1ec0ecc943c..e2fcf2eae41 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el | |||
| @@ -2374,9 +2374,8 @@ If FILE is nil, try to load a default file. The default file names are | |||
| 2374 | (goto-char (point-min)) | 2374 | (goto-char (point-min)) |
| 2375 | (beep) | 2375 | (beep) |
| 2376 | (and (tpu-y-or-n-p "Copy key definitions to the new file now? ") | 2376 | (and (tpu-y-or-n-p "Copy key definitions to the new file now? ") |
| 2377 | (condition-case conditions | 2377 | (with-demoted-errors "Sorry, couldn't copy - %s." |
| 2378 | (copy-file oldname newname) | 2378 | (copy-file oldname newname))) |
| 2379 | (error (message "Sorry, couldn't copy - %s." (cdr conditions))))) | ||
| 2380 | (kill-buffer "*TPU-Notice*"))) | 2379 | (kill-buffer "*TPU-Notice*"))) |
| 2381 | 2380 | ||
| 2382 | (defvar tpu-edt-old-global-values nil) | 2381 | (defvar tpu-edt-old-global-values nil) |
diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el index 03d7076195e..dfb81b3829c 100644 --- a/lisp/emulation/ws-mode.el +++ b/lisp/emulation/ws-mode.el | |||
| @@ -73,8 +73,7 @@ | |||
| 73 | (define-key map "\C-x" 'save-buffers-kill-emacs) | 73 | (define-key map "\C-x" 'save-buffers-kill-emacs) |
| 74 | (define-key map "y" 'ws-delete-block) | 74 | (define-key map "y" 'ws-delete-block) |
| 75 | (define-key map "\C-y" 'ws-delete-block) | 75 | (define-key map "\C-y" 'ws-delete-block) |
| 76 | map) | 76 | map)) |
| 77 | "") | ||
| 78 | 77 | ||
| 79 | (defvar wordstar-C-o-map | 78 | (defvar wordstar-C-o-map |
| 80 | (let ((map (make-keymap))) | 79 | (let ((map (make-keymap))) |
| @@ -140,8 +139,7 @@ | |||
| 140 | (define-key map "y" 'ws-kill-eol) | 139 | (define-key map "y" 'ws-kill-eol) |
| 141 | (define-key map "\C-y" 'ws-kill-eol) | 140 | (define-key map "\C-y" 'ws-kill-eol) |
| 142 | (define-key map "\177" 'ws-kill-bol) | 141 | (define-key map "\177" 'ws-kill-bol) |
| 143 | map) | 142 | map)) |
| 144 | "") | ||
| 145 | 143 | ||
| 146 | (defvar wordstar-mode-map | 144 | (defvar wordstar-mode-map |
| 147 | (let ((map (make-keymap))) | 145 | (let ((map (make-keymap))) |
| @@ -170,17 +168,16 @@ | |||
| 170 | (define-key map "\C-x" 'next-line) | 168 | (define-key map "\C-x" 'next-line) |
| 171 | (define-key map "\C-y" 'kill-complete-line) | 169 | (define-key map "\C-y" 'kill-complete-line) |
| 172 | (define-key map "\C-z" 'scroll-up-line) | 170 | (define-key map "\C-z" 'scroll-up-line) |
| 173 | map) | 171 | map)) |
| 174 | "") | ||
| 175 | 172 | ||
| 176 | ;; wordstar-C-j-map not yet implemented | 173 | ;; wordstar-C-j-map not yet implemented |
| 177 | (defvar wordstar-C-j-map nil "") | 174 | (defvar wordstar-C-j-map nil) |
| 178 | 175 | ||
| 179 | 176 | ||
| 180 | (put 'wordstar-mode 'mode-class 'special) | 177 | (put 'wordstar-mode 'mode-class 'special) |
| 181 | 178 | ||
| 182 | ;;;###autoload | 179 | ;;;###autoload |
| 183 | (defun wordstar-mode () | 180 | (define-derived-mode wordstar-mode fundamental-mode "WordStar" |
| 184 | "Major mode with WordStar-like key bindings. | 181 | "Major mode with WordStar-like key bindings. |
| 185 | 182 | ||
| 186 | BUGS: | 183 | BUGS: |
| @@ -191,106 +188,7 @@ BUGS: | |||
| 191 | - Search and replace (C-q a) is only available in forward direction | 188 | - Search and replace (C-q a) is only available in forward direction |
| 192 | 189 | ||
| 193 | No key bindings beginning with ESC are installed, they will work | 190 | No key bindings beginning with ESC are installed, they will work |
| 194 | Emacs-like. | 191 | Emacs-like.") |
| 195 | |||
| 196 | The key bindings are: | ||
| 197 | |||
| 198 | C-a backward-word | ||
| 199 | C-b fill-paragraph | ||
| 200 | C-c scroll-up-line | ||
| 201 | C-d forward-char | ||
| 202 | C-e previous-line | ||
| 203 | C-f forward-word | ||
| 204 | C-g delete-char | ||
| 205 | C-h backward-char | ||
| 206 | C-i indent-for-tab-command | ||
| 207 | C-j help-for-help | ||
| 208 | C-k ordstar-C-k-map | ||
| 209 | C-l ws-repeat-search | ||
| 210 | C-n open-line | ||
| 211 | C-p quoted-insert | ||
| 212 | C-r scroll-down-line | ||
| 213 | C-s backward-char | ||
| 214 | C-t kill-word | ||
| 215 | C-u keyboard-quit | ||
| 216 | C-v overwrite-mode | ||
| 217 | C-w scroll-down | ||
| 218 | C-x next-line | ||
| 219 | C-y kill-complete-line | ||
| 220 | C-z scroll-up | ||
| 221 | |||
| 222 | C-k 0 ws-set-marker-0 | ||
| 223 | C-k 1 ws-set-marker-1 | ||
| 224 | C-k 2 ws-set-marker-2 | ||
| 225 | C-k 3 ws-set-marker-3 | ||
| 226 | C-k 4 ws-set-marker-4 | ||
| 227 | C-k 5 ws-set-marker-5 | ||
| 228 | C-k 6 ws-set-marker-6 | ||
| 229 | C-k 7 ws-set-marker-7 | ||
| 230 | C-k 8 ws-set-marker-8 | ||
| 231 | C-k 9 ws-set-marker-9 | ||
| 232 | C-k b ws-begin-block | ||
| 233 | C-k c ws-copy-block | ||
| 234 | C-k d save-buffers-kill-emacs | ||
| 235 | C-k f find-file | ||
| 236 | C-k h ws-show-markers | ||
| 237 | C-k i ws-indent-block | ||
| 238 | C-k k ws-end-block | ||
| 239 | C-k p ws-print-block | ||
| 240 | C-k q kill-emacs | ||
| 241 | C-k r insert-file | ||
| 242 | C-k s save-some-buffers | ||
| 243 | C-k t ws-mark-word | ||
| 244 | C-k u ws-exdent-block | ||
| 245 | C-k C-u keyboard-quit | ||
| 246 | C-k v ws-move-block | ||
| 247 | C-k w ws-write-block | ||
| 248 | C-k x kill-emacs | ||
| 249 | C-k y ws-delete-block | ||
| 250 | |||
| 251 | C-o c wordstar-center-line | ||
| 252 | C-o b switch-to-buffer | ||
| 253 | C-o j justify-current-line | ||
| 254 | C-o k kill-buffer | ||
| 255 | C-o l list-buffers | ||
| 256 | C-o m auto-fill-mode | ||
| 257 | C-o r set-fill-column | ||
| 258 | C-o C-u keyboard-quit | ||
| 259 | C-o wd delete-other-windows | ||
| 260 | C-o wh split-window-right | ||
| 261 | C-o wo other-window | ||
| 262 | C-o wv split-window-below | ||
| 263 | |||
| 264 | C-q 0 ws-find-marker-0 | ||
| 265 | C-q 1 ws-find-marker-1 | ||
| 266 | C-q 2 ws-find-marker-2 | ||
| 267 | C-q 3 ws-find-marker-3 | ||
| 268 | C-q 4 ws-find-marker-4 | ||
| 269 | C-q 5 ws-find-marker-5 | ||
| 270 | C-q 6 ws-find-marker-6 | ||
| 271 | C-q 7 ws-find-marker-7 | ||
| 272 | C-q 8 ws-find-marker-8 | ||
| 273 | C-q 9 ws-find-marker-9 | ||
| 274 | C-q a ws-query-replace | ||
| 275 | C-q b ws-to-block-begin | ||
| 276 | C-q c end-of-buffer | ||
| 277 | C-q d end-of-line | ||
| 278 | C-q f ws-search | ||
| 279 | C-q k ws-to-block-end | ||
| 280 | C-q l ws-undo | ||
| 281 | C-q p ws-last-cursorp | ||
| 282 | C-q r beginning-of-buffer | ||
| 283 | C-q C-u keyboard-quit | ||
| 284 | C-q w ws-last-error | ||
| 285 | C-q y ws-kill-eol | ||
| 286 | C-q DEL ws-kill-bol | ||
| 287 | " | ||
| 288 | (interactive) | ||
| 289 | (kill-all-local-variables) | ||
| 290 | (use-local-map wordstar-mode-map) | ||
| 291 | (setq mode-name "WordStar") | ||
| 292 | (setq major-mode 'wordstar-mode) | ||
| 293 | (run-mode-hooks 'wordstar-mode-hook)) | ||
| 294 | 192 | ||
| 295 | 193 | ||
| 296 | (defun wordstar-center-paragraph () | 194 | (defun wordstar-center-paragraph () |
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index a46b48c01b3..9a9cc4cd567 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el | |||
| @@ -221,18 +221,11 @@ file named by `eshell-aliases-file'.") | |||
| 221 | (let ((alias (eshell-lookup-alias command))) | 221 | (let ((alias (eshell-lookup-alias command))) |
| 222 | (if alias | 222 | (if alias |
| 223 | (throw 'eshell-replace-command | 223 | (throw 'eshell-replace-command |
| 224 | (list | 224 | `(let ((eshell-command-name ',eshell-last-command-name) |
| 225 | 'let | 225 | (eshell-command-arguments ',eshell-last-arguments) |
| 226 | (list | 226 | (eshell-prevent-alias-expansion |
| 227 | (list 'eshell-command-name | 227 | ',(cons command eshell-prevent-alias-expansion))) |
| 228 | (list 'quote eshell-last-command-name)) | 228 | ,(eshell-parse-command (nth 1 alias)))))))) |
| 229 | (list 'eshell-command-arguments | ||
| 230 | (list 'quote eshell-last-arguments)) | ||
| 231 | (list 'eshell-prevent-alias-expansion | ||
| 232 | (list 'quote | ||
| 233 | (cons command | ||
| 234 | eshell-prevent-alias-expansion)))) | ||
| 235 | (eshell-parse-command (nth 1 alias)))))))) | ||
| 236 | 229 | ||
| 237 | (defun eshell-alias-completions (name) | 230 | (defun eshell-alias-completions (name) |
| 238 | "Find all possible completions for NAME. | 231 | "Find all possible completions for NAME. |
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index a58c7730ded..b5ca8119470 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el | |||
| @@ -180,6 +180,8 @@ interpretation." | |||
| 180 | (goto-char (1+ end)))))))))) | 180 | (goto-char (1+ end)))))))))) |
| 181 | 181 | ||
| 182 | (defvar eshell-glob-chars-regexp nil) | 182 | (defvar eshell-glob-chars-regexp nil) |
| 183 | (defvar eshell-glob-matches) | ||
| 184 | (defvar message-shown) | ||
| 183 | 185 | ||
| 184 | (defun eshell-glob-regexp (pattern) | 186 | (defun eshell-glob-regexp (pattern) |
| 185 | "Convert glob-pattern PATTERN to a regular expression. | 187 | "Convert glob-pattern PATTERN to a regular expression. |
| @@ -262,9 +264,6 @@ the form: | |||
| 262 | (error "No matches found: %s" glob) | 264 | (error "No matches found: %s" glob) |
| 263 | glob)))) | 265 | glob)))) |
| 264 | 266 | ||
| 265 | (defvar eshell-glob-matches) | ||
| 266 | (defvar message-shown) | ||
| 267 | |||
| 268 | ;; FIXME does this really need to abuse eshell-glob-matches, message-shown? | 267 | ;; FIXME does this really need to abuse eshell-glob-matches, message-shown? |
| 269 | (defun eshell-glob-entries (path globs &optional recurse-p) | 268 | (defun eshell-glob-entries (path globs &optional recurse-p) |
| 270 | "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." | 269 | "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." |
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 41db4cd03d1..3dee1adb58a 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el | |||
| @@ -268,6 +268,25 @@ scope during the evaluation of TEST-SEXP." | |||
| 268 | :type '(repeat (cons function face)) | 268 | :type '(repeat (cons function face)) |
| 269 | :group 'eshell-ls) | 269 | :group 'eshell-ls) |
| 270 | 270 | ||
| 271 | (defvar block-size) | ||
| 272 | (defvar dereference-links) | ||
| 273 | (defvar dir-literal) | ||
| 274 | (defvar error-func) | ||
| 275 | (defvar flush-func) | ||
| 276 | (defvar human-readable) | ||
| 277 | (defvar ignore-pattern) | ||
| 278 | (defvar insert-func) | ||
| 279 | (defvar listing-style) | ||
| 280 | (defvar numeric-uid-gid) | ||
| 281 | (defvar reverse-list) | ||
| 282 | (defvar show-all) | ||
| 283 | (defvar show-almost-all) | ||
| 284 | (defvar show-recursive) | ||
| 285 | (defvar show-size) | ||
| 286 | (defvar sort-method) | ||
| 287 | (defvar ange-cache) | ||
| 288 | (defvar dired-flag) | ||
| 289 | |||
| 271 | ;;; Functions: | 290 | ;;; Functions: |
| 272 | 291 | ||
| 273 | (defun eshell-ls-insert-directory | 292 | (defun eshell-ls-insert-directory |
| @@ -315,25 +334,6 @@ instead." | |||
| 315 | 334 | ||
| 316 | (put 'eshell/ls 'eshell-no-numeric-conversions t) | 335 | (put 'eshell/ls 'eshell-no-numeric-conversions t) |
| 317 | 336 | ||
| 318 | (defvar block-size) | ||
| 319 | (defvar dereference-links) | ||
| 320 | (defvar dir-literal) | ||
| 321 | (defvar error-func) | ||
| 322 | (defvar flush-func) | ||
| 323 | (defvar human-readable) | ||
| 324 | (defvar ignore-pattern) | ||
| 325 | (defvar insert-func) | ||
| 326 | (defvar listing-style) | ||
| 327 | (defvar numeric-uid-gid) | ||
| 328 | (defvar reverse-list) | ||
| 329 | (defvar show-all) | ||
| 330 | (defvar show-almost-all) | ||
| 331 | (defvar show-recursive) | ||
| 332 | (defvar show-size) | ||
| 333 | (defvar sort-method) | ||
| 334 | (defvar ange-cache) | ||
| 335 | (defvar dired-flag) | ||
| 336 | |||
| 337 | (declare-function eshell-glob-regexp "em-glob" (pattern)) | 337 | (declare-function eshell-glob-regexp "em-glob" (pattern)) |
| 338 | 338 | ||
| 339 | (defun eshell-do-ls (&rest args) | 339 | (defun eshell-do-ls (&rest args) |
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 3a7f46ebe83..14d3020530f 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el | |||
| @@ -307,7 +307,7 @@ functions. PRED-FUNCS take a filename and return t if the test | |||
| 307 | succeeds; MOD-FUNCS take any string and preform a modification, | 307 | succeeds; MOD-FUNCS take any string and preform a modification, |
| 308 | returning the resultant string." | 308 | returning the resultant string." |
| 309 | (let (result negate follow preds mods) | 309 | (let (result negate follow preds mods) |
| 310 | (condition-case err | 310 | (condition-case nil |
| 311 | (while (not (eobp)) | 311 | (while (not (eobp)) |
| 312 | (let ((char (char-after))) | 312 | (let ((char (char-after))) |
| 313 | (cond | 313 | (cond |
diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index 341191fc62f..a526d590307 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el | |||
| @@ -218,7 +218,7 @@ lock it at that." | |||
| 218 | (cdar bindings)) | 218 | (cdar bindings)) |
| 219 | (setq bindings (cdr bindings))))) | 219 | (setq bindings (cdr bindings))))) |
| 220 | 220 | ||
| 221 | (defun eshell-delete-backward-char (n &optional killflag) | 221 | (defun eshell-delete-backward-char (n) |
| 222 | "Delete the last character, unless it's part of the output." | 222 | "Delete the last character, unless it's part of the output." |
| 223 | (interactive "P") | 223 | (interactive "P") |
| 224 | (let ((count (prefix-numeric-value n))) | 224 | (let ((count (prefix-numeric-value n))) |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index af54d875cb0..b9b1c1635a5 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -714,6 +714,8 @@ available..." | |||
| 714 | (goto-char (point-min)) | 714 | (goto-char (point-min)) |
| 715 | (resize-temp-buffer-window)))))) | 715 | (resize-temp-buffer-window)))))) |
| 716 | 716 | ||
| 717 | (defvar compilation-scroll-output) | ||
| 718 | |||
| 717 | (defun eshell-grep (command args &optional maybe-use-occur) | 719 | (defun eshell-grep (command args &optional maybe-use-occur) |
| 718 | "Generic service function for the various grep aliases. | 720 | "Generic service function for the various grep aliases. |
| 719 | It calls Emacs's grep utility if the command is not redirecting output, | 721 | It calls Emacs's grep utility if the command is not redirecting output, |
| @@ -989,7 +991,7 @@ Show wall-clock time elapsed during execution of COMMAND.") | |||
| 989 | (setq args nil) | 991 | (setq args nil) |
| 990 | (setcdr (last args 3) nil)) | 992 | (setcdr (last args 3) nil)) |
| 991 | (with-current-buffer | 993 | (with-current-buffer |
| 992 | (condition-case err | 994 | (condition-case nil |
| 993 | (diff-no-select | 995 | (diff-no-select |
| 994 | old new | 996 | old new |
| 995 | (nil-blank-string (eshell-flatten-and-stringify args))) | 997 | (nil-blank-string (eshell-flatten-and-stringify args))) |
| @@ -1014,6 +1016,8 @@ Show wall-clock time elapsed during execution of COMMAND.") | |||
| 1014 | 1016 | ||
| 1015 | (put 'eshell/diff 'eshell-no-numeric-conversions t) | 1017 | (put 'eshell/diff 'eshell-no-numeric-conversions t) |
| 1016 | 1018 | ||
| 1019 | (defvar locate-history-list) | ||
| 1020 | |||
| 1017 | (defun eshell/locate (&rest args) | 1021 | (defun eshell/locate (&rest args) |
| 1018 | "Alias \"locate\" to call Emacs `locate' function." | 1022 | "Alias \"locate\" to call Emacs `locate' function." |
| 1019 | (if (or eshell-plain-locate-behavior | 1023 | (if (or eshell-plain-locate-behavior |
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index d7dfd27d8d3..e3a12d5ece5 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el | |||
| @@ -278,7 +278,7 @@ Point is left at the end of the arguments." | |||
| 278 | (eshell-resolve-current-argument) | 278 | (eshell-resolve-current-argument) |
| 279 | eshell-current-argument)) | 279 | eshell-current-argument)) |
| 280 | 280 | ||
| 281 | (defsubst eshell-operator (&rest args) | 281 | (defsubst eshell-operator (&rest _args) |
| 282 | "A stub function that generates an error if a floating operator is found." | 282 | "A stub function that generates an error if a floating operator is found." |
| 283 | (error "Unhandled operator in input text")) | 283 | (error "Unhandled operator in input text")) |
| 284 | 284 | ||
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index ef8a53f3c0b..c2922983ae2 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -650,7 +650,7 @@ For an external command, it means an exit code of 0." | |||
| 650 | (looking-at eshell-lisp-regexp)) | 650 | (looking-at eshell-lisp-regexp)) |
| 651 | (let* ((here (point)) | 651 | (let* ((here (point)) |
| 652 | (obj | 652 | (obj |
| 653 | (condition-case err | 653 | (condition-case nil |
| 654 | (read (current-buffer)) | 654 | (read (current-buffer)) |
| 655 | (end-of-file | 655 | (end-of-file |
| 656 | (throw 'eshell-incomplete ?\())))) | 656 | (throw 'eshell-incomplete ?\())))) |
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index ed5fecf09ff..54a36428d58 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -220,74 +220,67 @@ This is used by `eshell-watch-for-password-prompt'." | |||
| 220 | (defvar eshell-last-output-end nil) | 220 | (defvar eshell-last-output-end nil) |
| 221 | 221 | ||
| 222 | (defvar eshell-currently-handling-window nil) | 222 | (defvar eshell-currently-handling-window nil) |
| 223 | (defvar eshell-mode-syntax-table nil) | ||
| 224 | (defvar eshell-mode-abbrev-table nil) | ||
| 225 | 223 | ||
| 226 | (define-abbrev-table 'eshell-mode-abbrev-table ()) | 224 | (define-abbrev-table 'eshell-mode-abbrev-table ()) |
| 227 | 225 | ||
| 228 | (if (not eshell-mode-syntax-table) | 226 | (defvar eshell-mode-syntax-table |
| 229 | (let ((i 0)) | 227 | (let ((st (make-syntax-table)) |
| 230 | (setq eshell-mode-syntax-table (make-syntax-table)) | 228 | (i 0)) |
| 231 | (while (< i ?0) | 229 | (while (< i ?0) |
| 232 | (modify-syntax-entry i "_ " eshell-mode-syntax-table) | 230 | (modify-syntax-entry i "_ " st) |
| 233 | (setq i (1+ i))) | 231 | (setq i (1+ i))) |
| 234 | (setq i (1+ ?9)) | 232 | (setq i (1+ ?9)) |
| 235 | (while (< i ?A) | 233 | (while (< i ?A) |
| 236 | (modify-syntax-entry i "_ " eshell-mode-syntax-table) | 234 | (modify-syntax-entry i "_ " st) |
| 237 | (setq i (1+ i))) | 235 | (setq i (1+ i))) |
| 238 | (setq i (1+ ?Z)) | 236 | (setq i (1+ ?Z)) |
| 239 | (while (< i ?a) | 237 | (while (< i ?a) |
| 240 | (modify-syntax-entry i "_ " eshell-mode-syntax-table) | 238 | (modify-syntax-entry i "_ " st) |
| 241 | (setq i (1+ i))) | 239 | (setq i (1+ i))) |
| 242 | (setq i (1+ ?z)) | 240 | (setq i (1+ ?z)) |
| 243 | (while (< i 128) | 241 | (while (< i 128) |
| 244 | (modify-syntax-entry i "_ " eshell-mode-syntax-table) | 242 | (modify-syntax-entry i "_ " st) |
| 245 | (setq i (1+ i))) | 243 | (setq i (1+ i))) |
| 246 | (modify-syntax-entry ? " " eshell-mode-syntax-table) | 244 | (modify-syntax-entry ? " " st) |
| 247 | (modify-syntax-entry ?\t " " eshell-mode-syntax-table) | 245 | (modify-syntax-entry ?\t " " st) |
| 248 | (modify-syntax-entry ?\f " " eshell-mode-syntax-table) | 246 | (modify-syntax-entry ?\f " " st) |
| 249 | (modify-syntax-entry ?\n "> " eshell-mode-syntax-table) | 247 | (modify-syntax-entry ?\n "> " st) |
| 250 | ;; Give CR the same syntax as newline, for selective-display. | 248 | ;; Give CR the same syntax as newline, for selective-display. |
| 251 | (modify-syntax-entry ?\^m "> " eshell-mode-syntax-table) | 249 | (modify-syntax-entry ?\^m "> " st) |
| 252 | ;;; (modify-syntax-entry ?\; "< " eshell-mode-syntax-table) | 250 | ;; (modify-syntax-entry ?\; "< " st) |
| 253 | (modify-syntax-entry ?` "' " eshell-mode-syntax-table) | 251 | (modify-syntax-entry ?` "' " st) |
| 254 | (modify-syntax-entry ?' "' " eshell-mode-syntax-table) | 252 | (modify-syntax-entry ?' "' " st) |
| 255 | (modify-syntax-entry ?, "' " eshell-mode-syntax-table) | 253 | (modify-syntax-entry ?, "' " st) |
| 256 | ;; Used to be singlequote; changed for flonums. | 254 | ;; Used to be singlequote; changed for flonums. |
| 257 | (modify-syntax-entry ?. "_ " eshell-mode-syntax-table) | 255 | (modify-syntax-entry ?. "_ " st) |
| 258 | (modify-syntax-entry ?- "_ " eshell-mode-syntax-table) | 256 | (modify-syntax-entry ?- "_ " st) |
| 259 | (modify-syntax-entry ?| ". " eshell-mode-syntax-table) | 257 | (modify-syntax-entry ?| ". " st) |
| 260 | (modify-syntax-entry ?# "' " eshell-mode-syntax-table) | 258 | (modify-syntax-entry ?# "' " st) |
| 261 | (modify-syntax-entry ?\" "\" " eshell-mode-syntax-table) | 259 | (modify-syntax-entry ?\" "\" " st) |
| 262 | (modify-syntax-entry ?\\ "/ " eshell-mode-syntax-table) | 260 | (modify-syntax-entry ?\\ "/ " st) |
| 263 | (modify-syntax-entry ?\( "() " eshell-mode-syntax-table) | 261 | (modify-syntax-entry ?\( "() " st) |
| 264 | (modify-syntax-entry ?\) ")( " eshell-mode-syntax-table) | 262 | (modify-syntax-entry ?\) ")( " st) |
| 265 | (modify-syntax-entry ?\{ "(} " eshell-mode-syntax-table) | 263 | (modify-syntax-entry ?\{ "(} " st) |
| 266 | (modify-syntax-entry ?\} "){ " eshell-mode-syntax-table) | 264 | (modify-syntax-entry ?\} "){ " st) |
| 267 | (modify-syntax-entry ?\[ "(] " eshell-mode-syntax-table) | 265 | (modify-syntax-entry ?\[ "(] " st) |
| 268 | (modify-syntax-entry ?\] ")[ " eshell-mode-syntax-table) | 266 | (modify-syntax-entry ?\] ")[ " st) |
| 269 | ;; All non-word multibyte characters should be `symbol'. | 267 | ;; All non-word multibyte characters should be `symbol'. |
| 270 | (if (featurep 'xemacs) | 268 | (map-char-table |
| 271 | (map-char-table | 269 | (if (featurep 'xemacs) |
| 272 | (function | 270 | (lambda (key _val) |
| 273 | (lambda (key val) | 271 | (and (characterp key) |
| 274 | (and (characterp key) | 272 | (>= (char-int key) 256) |
| 275 | (>= (char-int key) 256) | 273 | (/= (char-syntax key) ?w) |
| 276 | (/= (char-syntax key) ?w) | 274 | (modify-syntax-entry key "_ " st))) |
| 277 | (modify-syntax-entry key "_ " | 275 | (lambda (key _val) |
| 278 | eshell-mode-syntax-table)))) | 276 | (and (if (consp key) |
| 279 | (standard-syntax-table)) | 277 | (and (>= (car key) 128) |
| 280 | (map-char-table | 278 | (/= (char-syntax (car key)) ?w)) |
| 281 | (function | 279 | (and (>= key 256) |
| 282 | (lambda (key val) | 280 | (/= (char-syntax key) ?w))) |
| 283 | (and (if (consp key) | 281 | (modify-syntax-entry key "_ " st)))) |
| 284 | (and (>= (car key) 128) | 282 | (standard-syntax-table)) |
| 285 | (/= (char-syntax (car key)) ?w)) | 283 | st)) |
| 286 | (and (>= key 256) | ||
| 287 | (/= (char-syntax key) ?w))) | ||
| 288 | (modify-syntax-entry key "_ " | ||
| 289 | eshell-mode-syntax-table)))) | ||
| 290 | (standard-syntax-table))))) | ||
| 291 | 284 | ||
| 292 | ;;; User Functions: | 285 | ;;; User Functions: |
| 293 | 286 | ||
| @@ -303,25 +296,18 @@ and the hook `eshell-exit-hook'." | |||
| 303 | (run-hooks 'eshell-exit-hook)) | 296 | (run-hooks 'eshell-exit-hook)) |
| 304 | 297 | ||
| 305 | ;;;###autoload | 298 | ;;;###autoload |
| 306 | (defun eshell-mode () | 299 | (define-derived-mode eshell-mode fundamental-mode "EShell" |
| 307 | "Emacs shell interactive mode. | 300 | "Emacs shell interactive mode." |
| 308 | 301 | (setq-local eshell-mode t) | |
| 309 | \\{eshell-mode-map}" | ||
| 310 | (kill-all-local-variables) | ||
| 311 | |||
| 312 | (setq major-mode 'eshell-mode) | ||
| 313 | (setq mode-name "EShell") | ||
| 314 | (set (make-local-variable 'eshell-mode) t) | ||
| 315 | 302 | ||
| 316 | (make-local-variable 'eshell-mode-map) | 303 | ;; FIXME: What the hell!? |
| 317 | (setq eshell-mode-map (make-sparse-keymap)) | 304 | (setq-local eshell-mode-map (make-sparse-keymap)) |
| 318 | (use-local-map eshell-mode-map) | 305 | (use-local-map eshell-mode-map) |
| 319 | 306 | ||
| 320 | (when eshell-status-in-mode-line | 307 | (when eshell-status-in-mode-line |
| 321 | (make-local-variable 'eshell-command-running-string) | 308 | (make-local-variable 'eshell-command-running-string) |
| 322 | (let ((fmt (copy-sequence mode-line-format))) | 309 | (let ((fmt (copy-sequence mode-line-format))) |
| 323 | (make-local-variable 'mode-line-format) | 310 | (setq-local mode-line-format fmt)) |
| 324 | (setq mode-line-format fmt)) | ||
| 325 | (let ((mode-line-elt (memq 'mode-line-modified mode-line-format))) | 311 | (let ((mode-line-elt (memq 'mode-line-modified mode-line-format))) |
| 326 | (if mode-line-elt | 312 | (if mode-line-elt |
| 327 | (setcar mode-line-elt 'eshell-command-running-string)))) | 313 | (setcar mode-line-elt 'eshell-command-running-string)))) |
| @@ -331,11 +317,9 @@ and the hook `eshell-exit-hook'." | |||
| 331 | (define-key eshell-mode-map [(meta control ?l)] 'eshell-show-output) | 317 | (define-key eshell-mode-map [(meta control ?l)] 'eshell-show-output) |
| 332 | (define-key eshell-mode-map [(control ?a)] 'eshell-bol) | 318 | (define-key eshell-mode-map [(control ?a)] 'eshell-bol) |
| 333 | 319 | ||
| 334 | (set (make-local-variable 'eshell-command-prefix) | 320 | (setq-local eshell-command-prefix (make-symbol "eshell-command-prefix")) |
| 335 | (make-symbol "eshell-command-prefix")) | ||
| 336 | (fset eshell-command-prefix (make-sparse-keymap)) | 321 | (fset eshell-command-prefix (make-sparse-keymap)) |
| 337 | (set (make-local-variable 'eshell-command-map) | 322 | (setq-local eshell-command-map (symbol-function eshell-command-prefix)) |
| 338 | (symbol-function eshell-command-prefix)) | ||
| 339 | (define-key eshell-mode-map [(control ?c)] eshell-command-prefix) | 323 | (define-key eshell-mode-map [(control ?c)] eshell-command-prefix) |
| 340 | 324 | ||
| 341 | ;; without this, find-tag complains about read-only text being | 325 | ;; without this, find-tag complains about read-only text being |
| @@ -359,7 +343,6 @@ and the hook `eshell-exit-hook'." | |||
| 359 | (define-key eshell-command-map [(control ?y)] 'eshell-repeat-argument) | 343 | (define-key eshell-command-map [(control ?y)] 'eshell-repeat-argument) |
| 360 | 344 | ||
| 361 | (setq local-abbrev-table eshell-mode-abbrev-table) | 345 | (setq local-abbrev-table eshell-mode-abbrev-table) |
| 362 | (set-syntax-table eshell-mode-syntax-table) | ||
| 363 | 346 | ||
| 364 | (set (make-local-variable 'dired-directory) default-directory) | 347 | (set (make-local-variable 'dired-directory) default-directory) |
| 365 | (set (make-local-variable 'list-buffers-directory) | 348 | (set (make-local-variable 'list-buffers-directory) |
| @@ -442,7 +425,6 @@ and the hook `eshell-exit-hook'." | |||
| 442 | 425 | ||
| 443 | (if eshell-first-time-p | 426 | (if eshell-first-time-p |
| 444 | (run-hooks 'eshell-first-time-mode-hook)) | 427 | (run-hooks 'eshell-first-time-mode-hook)) |
| 445 | (run-mode-hooks 'eshell-mode-hook) | ||
| 446 | (run-hooks 'eshell-post-command-hook)) | 428 | (run-hooks 'eshell-post-command-hook)) |
| 447 | 429 | ||
| 448 | (put 'eshell-mode 'mode-class 'special) | 430 | (put 'eshell-mode 'mode-class 'special) |
| @@ -470,8 +452,8 @@ and the hook `eshell-exit-hook'." | |||
| 470 | (add-hook 'pre-command-hook 'eshell-intercept-commands t t) | 452 | (add-hook 'pre-command-hook 'eshell-intercept-commands t t) |
| 471 | (message "Sending subprocess input directly"))) | 453 | (message "Sending subprocess input directly"))) |
| 472 | 454 | ||
| 473 | (defun eshell-self-insert-command (N) | 455 | (defun eshell-self-insert-command () |
| 474 | (interactive "i") | 456 | (interactive) |
| 475 | (process-send-string | 457 | (process-send-string |
| 476 | (eshell-interactive-process) | 458 | (eshell-interactive-process) |
| 477 | (char-to-string (if (symbolp last-command-event) | 459 | (char-to-string (if (symbolp last-command-event) |
| @@ -944,10 +926,10 @@ a key." | |||
| 944 | (custom-add-option 'eshell-output-filter-functions | 926 | (custom-add-option 'eshell-output-filter-functions |
| 945 | 'eshell-truncate-buffer) | 927 | 'eshell-truncate-buffer) |
| 946 | 928 | ||
| 947 | (defun eshell-send-invisible (str) | 929 | (defun eshell-send-invisible () |
| 948 | "Read a string without echoing. | 930 | "Read a string without echoing. |
| 949 | Then send it to the process running in the current buffer." | 931 | Then send it to the process running in the current buffer." |
| 950 | (interactive "P") ; Defeat snooping via C-x ESC ESC | 932 | (interactive) ; Don't pass str as argument, to avoid snooping via C-x ESC ESC |
| 951 | (let ((str (read-passwd | 933 | (let ((str (read-passwd |
| 952 | (format "%s Password: " | 934 | (format "%s Password: " |
| 953 | (process-name (eshell-interactive-process)))))) | 935 | (process-name (eshell-interactive-process)))))) |
| @@ -969,7 +951,7 @@ This function could be in the list `eshell-output-filter-functions'." | |||
| 969 | (beginning-of-line) | 951 | (beginning-of-line) |
| 970 | (if (re-search-forward eshell-password-prompt-regexp | 952 | (if (re-search-forward eshell-password-prompt-regexp |
| 971 | eshell-last-output-end t) | 953 | eshell-last-output-end t) |
| 972 | (eshell-send-invisible nil))))) | 954 | (eshell-send-invisible))))) |
| 973 | 955 | ||
| 974 | (custom-add-option 'eshell-output-filter-functions | 956 | (custom-add-option 'eshell-output-filter-functions |
| 975 | 'eshell-watch-for-password-prompt) | 957 | 'eshell-watch-for-password-prompt) |
| @@ -977,32 +959,30 @@ This function could be in the list `eshell-output-filter-functions'." | |||
| 977 | (defun eshell-handle-control-codes () | 959 | (defun eshell-handle-control-codes () |
| 978 | "Act properly when certain control codes are seen." | 960 | "Act properly when certain control codes are seen." |
| 979 | (save-excursion | 961 | (save-excursion |
| 980 | (let ((orig (point))) | 962 | (goto-char eshell-last-output-block-begin) |
| 981 | (goto-char eshell-last-output-block-begin) | 963 | (unless (eolp) |
| 982 | (unless (eolp) | 964 | (beginning-of-line)) |
| 983 | (beginning-of-line)) | 965 | (while (< (point) eshell-last-output-end) |
| 984 | (while (< (point) eshell-last-output-end) | 966 | (let ((char (char-after))) |
| 985 | (let ((char (char-after))) | 967 | (cond |
| 986 | (cond | 968 | ((eq char ?\r) |
| 987 | ((eq char ?\r) | 969 | (if (< (1+ (point)) eshell-last-output-end) |
| 988 | (if (< (1+ (point)) eshell-last-output-end) | 970 | (if (memq (char-after (1+ (point))) |
| 989 | (if (memq (char-after (1+ (point))) | 971 | '(?\n ?\r)) |
| 990 | '(?\n ?\r)) | 972 | (delete-char 1) |
| 991 | (delete-char 1) | 973 | (let ((end (1+ (point)))) |
| 992 | (let ((end (1+ (point)))) | 974 | (beginning-of-line) |
| 993 | (beginning-of-line) | 975 | (delete-region (point) end))) |
| 994 | (delete-region (point) end))) | 976 | (add-text-properties (point) (1+ (point)) |
| 995 | (add-text-properties (point) (1+ (point)) | 977 | '(invisible t)) |
| 996 | '(invisible t)) | 978 | (forward-char))) |
| 997 | (forward-char))) | 979 | ((eq char ?\a) |
| 998 | ((eq char ?\a) | 980 | (delete-char 1) |
| 999 | (delete-char 1) | 981 | (beep)) |
| 1000 | (beep)) | 982 | ((eq char ?\C-h) |
| 1001 | ((eq char ?\C-h) | 983 | (delete-region (1- (point)) (1+ (point)))) |
| 1002 | (delete-backward-char 1) | 984 | (t |
| 1003 | (delete-char 1)) | 985 | (forward-char))))))) |
| 1004 | (t | ||
| 1005 | (forward-char)))))))) | ||
| 1006 | 986 | ||
| 1007 | (custom-add-option 'eshell-output-filter-functions | 987 | (custom-add-option 'eshell-output-filter-functions |
| 1008 | 'eshell-handle-control-codes) | 988 | 'eshell-handle-control-codes) |
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 33625433022..c62cbc7e1dc 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el | |||
| @@ -28,11 +28,11 @@ | |||
| 28 | (require 'esh-ext) | 28 | (require 'esh-ext) |
| 29 | 29 | ||
| 30 | ;; Unused. | 30 | ;; Unused. |
| 31 | ;;; (defgroup eshell-opt nil | 31 | ;; (defgroup eshell-opt nil |
| 32 | ;;; "The options processing code handles command argument parsing for | 32 | ;; "The options processing code handles command argument parsing for |
| 33 | ;;; Eshell commands implemented in Lisp." | 33 | ;; Eshell commands implemented in Lisp." |
| 34 | ;;; :tag "Command options processing" | 34 | ;; :tag "Command options processing" |
| 35 | ;;; :group 'eshell) | 35 | ;; :group 'eshell) |
| 36 | 36 | ||
| 37 | ;;; User Functions: | 37 | ;;; User Functions: |
| 38 | 38 | ||
| @@ -103,32 +103,25 @@ interned variable `args' (created using a `let' form)." | |||
| 103 | macro-args | 103 | macro-args |
| 104 | (list 'eshell-stringify-list | 104 | (list 'eshell-stringify-list |
| 105 | (list 'eshell-flatten-list macro-args))))) | 105 | (list 'eshell-flatten-list macro-args))))) |
| 106 | (let ,(append (delq nil (mapcar (lambda (opt) | 106 | (let ,(delq nil (mapcar (lambda (opt) |
| 107 | (and (listp opt) (nth 3 opt))) | 107 | (and (listp opt) (nth 3 opt))) |
| 108 | (cadr options))) | 108 | (cadr options))) |
| 109 | '(usage-msg last-value ext-command args)) | ||
| 110 | ;; FIXME: `options' ends up hiding some variable names under `quote', | 109 | ;; FIXME: `options' ends up hiding some variable names under `quote', |
| 111 | ;; which is incompatible with lexical scoping!! | 110 | ;; which is incompatible with lexical scoping!! |
| 112 | (eshell-do-opt ,name ,options (lambda () ,@body-forms))))) | 111 | (eshell-do-opt ,name ,options (lambda (args) ,@body-forms) temp-args)))) |
| 113 | 112 | ||
| 114 | ;;; Internal Functions: | 113 | ;;; Internal Functions: |
| 115 | 114 | ||
| 116 | (defvar temp-args) | ||
| 117 | (defvar last-value) | ||
| 118 | (defvar usage-msg) | ||
| 119 | (defvar ext-command) | ||
| 120 | ;; Documented part of the interface; see eshell-eval-using-options. | 115 | ;; Documented part of the interface; see eshell-eval-using-options. |
| 121 | (defvar args) | 116 | (defvar eshell--args) |
| 122 | 117 | ||
| 123 | (defun eshell-do-opt (name options body-fun) | 118 | (defun eshell-do-opt (name options body-fun args) |
| 124 | "Helper function for `eshell-eval-using-options'. | 119 | "Helper function for `eshell-eval-using-options'. |
| 125 | This code doesn't really need to be macro expanded everywhere." | 120 | This code doesn't really need to be macro expanded everywhere." |
| 126 | (setq args temp-args) | 121 | (let* (last-value |
| 127 | (if (setq | 122 | (ext-command |
| 128 | ext-command | ||
| 129 | (catch 'eshell-ext-command | 123 | (catch 'eshell-ext-command |
| 130 | (when (setq | 124 | (let ((usage-msg |
| 131 | usage-msg | ||
| 132 | (catch 'eshell-usage | 125 | (catch 'eshell-usage |
| 133 | (setq last-value nil) | 126 | (setq last-value nil) |
| 134 | (if (and (= (length args) 0) | 127 | (if (and (= (length args) 0) |
| @@ -136,12 +129,14 @@ This code doesn't really need to be macro expanded everywhere." | |||
| 136 | (throw 'eshell-usage | 129 | (throw 'eshell-usage |
| 137 | (eshell-show-usage name options))) | 130 | (eshell-show-usage name options))) |
| 138 | (setq args (eshell-process-args name args options) | 131 | (setq args (eshell-process-args name args options) |
| 139 | last-value (funcall body-fun)) | 132 | last-value (funcall body-fun args)) |
| 140 | nil)) | 133 | nil))) |
| 141 | (error "%s" usage-msg)))) | 134 | (when usage-msg |
| 135 | (error "%s" usage-msg)))))) | ||
| 136 | (if ext-command | ||
| 142 | (throw 'eshell-external | 137 | (throw 'eshell-external |
| 143 | (eshell-external-command ext-command args)) | 138 | (eshell-external-command ext-command args)) |
| 144 | last-value)) | 139 | last-value))) |
| 145 | 140 | ||
| 146 | (defun eshell-show-usage (name options) | 141 | (defun eshell-show-usage (name options) |
| 147 | "Display the usage message for NAME, using OPTIONS." | 142 | "Display the usage message for NAME, using OPTIONS." |
| @@ -197,12 +192,13 @@ will be modified." | |||
| 197 | (if (not (nth 3 opt)) | 192 | (if (not (nth 3 opt)) |
| 198 | (eshell-show-usage name options) | 193 | (eshell-show-usage name options) |
| 199 | (if (eq (nth 2 opt) t) | 194 | (if (eq (nth 2 opt) t) |
| 200 | (if (> ai (length args)) | 195 | (if (> ai (length eshell--args)) |
| 201 | (error "%s: missing option argument" name) | 196 | (error "%s: missing option argument" name) |
| 202 | (set (nth 3 opt) (nth ai args)) | 197 | (set (nth 3 opt) (nth ai eshell--args)) |
| 203 | (if (> ai 0) | 198 | (if (> ai 0) |
| 204 | (setcdr (nthcdr (1- ai) args) (nthcdr (1+ ai) args)) | 199 | (setcdr (nthcdr (1- ai) eshell--args) |
| 205 | (setq args (cdr args)))) | 200 | (nthcdr (1+ ai) eshell--args)) |
| 201 | (setq eshell--args (cdr eshell--args)))) | ||
| 206 | (set (nth 3 opt) (or (nth 2 opt) t))))) | 202 | (set (nth 3 opt) (or (nth 2 opt) t))))) |
| 207 | 203 | ||
| 208 | (defun eshell-process-option (name switch kind ai options) | 204 | (defun eshell-process-option (name switch kind ai options) |
| @@ -232,14 +228,15 @@ switch is unrecognized." | |||
| 232 | (setq extcmd (eshell-search-path (cadr extcmd))) | 228 | (setq extcmd (eshell-search-path (cadr extcmd))) |
| 233 | (if extcmd | 229 | (if extcmd |
| 234 | (throw 'eshell-ext-command extcmd) | 230 | (throw 'eshell-ext-command extcmd) |
| 235 | (if (characterp switch) | 231 | (error (if (characterp switch) "%s: unrecognized option -%c" |
| 236 | (error "%s: unrecognized option -%c" name switch) | 232 | "%s: unrecognized option --%s") |
| 237 | (error "%s: unrecognized option --%s" name switch)))))))) | 233 | name switch))))))) |
| 238 | 234 | ||
| 239 | (defun eshell-process-args (name args options) | 235 | (defun eshell-process-args (name args options) |
| 240 | "Process the given ARGS using OPTIONS. | 236 | "Process the given ARGS using OPTIONS. |
| 241 | This assumes that symbols have been intern'd by `eshell-eval-using-options'." | 237 | This assumes that symbols have been intern'd by `eshell-eval-using-options'." |
| 242 | (let ((ai 0) arg) | 238 | (let ((ai 0) arg |
| 239 | (eshell--args args)) | ||
| 243 | (while (< ai (length args)) | 240 | (while (< ai (length args)) |
| 244 | (setq arg (nth ai args)) | 241 | (setq arg (nth ai args)) |
| 245 | (if (not (and (stringp arg) | 242 | (if (not (and (stringp arg) |
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index dd344eb50a2..968d1ebad79 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Code: | 24 | ;;; Code: |
| 25 | 25 | ||
| 26 | (eval-when-compile (require 'cl-lib)) | ||
| 27 | |||
| 26 | (defgroup eshell-util nil | 28 | (defgroup eshell-util nil |
| 27 | "This is general utility code, meant for use by Eshell itself." | 29 | "This is general utility code, meant for use by Eshell itself." |
| 28 | :tag "General utilities" | 30 | :tag "General utilities" |
| @@ -484,12 +486,12 @@ list." | |||
| 484 | (while (re-search-forward | 486 | (while (re-search-forward |
| 485 | "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) | 487 | "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) |
| 486 | (if (match-string 1) | 488 | (if (match-string 1) |
| 487 | (add-to-list 'hosts (match-string 1))) | 489 | (cl-pushnew (match-string 1) hosts :test #'equal)) |
| 488 | (if (match-string 2) | 490 | (if (match-string 2) |
| 489 | (add-to-list 'hosts (match-string 2))) | 491 | (cl-pushnew (match-string 2) hosts :test #'equal)) |
| 490 | (if (match-string 4) | 492 | (if (match-string 4) |
| 491 | (add-to-list 'hosts (match-string 4))))) | 493 | (cl-pushnew (match-string 4) hosts :test #'equal)))) |
| 492 | (sort hosts 'string-lessp))) | 494 | (sort hosts #'string-lessp))) |
| 493 | 495 | ||
| 494 | (defun eshell-read-hosts (file result-var timestamp-var) | 496 | (defun eshell-read-hosts (file result-var timestamp-var) |
| 495 | "Read the contents of /etc/passwd for user names." | 497 | "Read the contents of /etc/passwd for user names." |
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 188b8165248..75c36a68544 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el | |||
| @@ -395,12 +395,9 @@ process any indices that come after the variable reference." | |||
| 395 | indices (and (not (eobp)) | 395 | indices (and (not (eobp)) |
| 396 | (eq (char-after) ?\[) | 396 | (eq (char-after) ?\[) |
| 397 | (eshell-parse-indices)) | 397 | (eshell-parse-indices)) |
| 398 | value (list 'let | 398 | value `(let ((indices ',indices)) ,value)) |
| 399 | (list (list 'indices | ||
| 400 | (list 'quote indices))) | ||
| 401 | value)) | ||
| 402 | (if get-len | 399 | (if get-len |
| 403 | (list 'length value) | 400 | `(length ,value) |
| 404 | value))) | 401 | value))) |
| 405 | 402 | ||
| 406 | (defun eshell-parse-variable-ref () | 403 | (defun eshell-parse-variable-ref () |
| @@ -414,67 +411,68 @@ Possible options are: | |||
| 414 | <LONG-NAME> disambiguates the length of the name | 411 | <LONG-NAME> disambiguates the length of the name |
| 415 | {COMMAND} result of command is variable's value | 412 | {COMMAND} result of command is variable's value |
| 416 | (LISP-FORM) result of Lisp form is variable's value" | 413 | (LISP-FORM) result of Lisp form is variable's value" |
| 417 | (let (end) | 414 | (cond |
| 418 | (cond | 415 | ((eq (char-after) ?{) |
| 419 | ((eq (char-after) ?{) | 416 | (let ((end (eshell-find-delimiter ?\{ ?\}))) |
| 420 | (let ((end (eshell-find-delimiter ?\{ ?\}))) | 417 | (if (not end) |
| 421 | (if (not end) | 418 | (throw 'eshell-incomplete ?\{) |
| 422 | (throw 'eshell-incomplete ?\{) | 419 | (prog1 |
| 423 | (prog1 | 420 | (list 'eshell-convert |
| 424 | (list 'eshell-convert | 421 | (list 'eshell-command-to-value |
| 425 | (list 'eshell-command-to-value | 422 | (list 'eshell-as-subcommand |
| 426 | (list 'eshell-as-subcommand | 423 | (eshell-parse-command |
| 427 | (eshell-parse-command | 424 | (cons (1+ (point)) end))))) |
| 428 | (cons (1+ (point)) end))))) | 425 | (goto-char (1+ end)))))) |
| 429 | (goto-char (1+ end)))))) | 426 | ((memq (char-after) '(?\' ?\")) |
| 430 | ((memq (char-after) '(?\' ?\")) | 427 | (let ((name (if (eq (char-after) ?\') |
| 431 | (let ((name (if (eq (char-after) ?\') | 428 | (eshell-parse-literal-quote) |
| 432 | (eshell-parse-literal-quote) | 429 | (eshell-parse-double-quote)))) |
| 433 | (eshell-parse-double-quote)))) | 430 | (if name |
| 434 | (if name | ||
| 435 | (list 'eshell-get-variable (eval name) 'indices)))) | 431 | (list 'eshell-get-variable (eval name) 'indices)))) |
| 436 | ((eq (char-after) ?\<) | 432 | ((eq (char-after) ?\<) |
| 437 | (let ((end (eshell-find-delimiter ?\< ?\>))) | 433 | (let ((end (eshell-find-delimiter ?\< ?\>))) |
| 438 | (if (not end) | 434 | (if (not end) |
| 439 | (throw 'eshell-incomplete ?\<) | 435 | (throw 'eshell-incomplete ?\<) |
| 440 | (let* ((temp (make-temp-file temporary-file-directory)) | 436 | (let* ((temp (make-temp-file temporary-file-directory)) |
| 441 | (cmd (concat (buffer-substring (1+ (point)) end) | 437 | (cmd (concat (buffer-substring (1+ (point)) end) |
| 442 | " > " temp))) | 438 | " > " temp))) |
| 443 | (prog1 | 439 | (prog1 |
| 444 | (list | 440 | (list |
| 445 | 'let (list (list 'eshell-current-handles | 441 | 'let (list (list 'eshell-current-handles |
| 446 | (list 'eshell-create-handles temp | 442 | (list 'eshell-create-handles temp |
| 447 | (list 'quote 'overwrite)))) | 443 | (list 'quote 'overwrite)))) |
| 448 | (list | 444 | (list |
| 449 | 'progn | 445 | 'progn |
| 450 | (list 'eshell-as-subcommand | 446 | (list 'eshell-as-subcommand |
| 451 | (eshell-parse-command cmd)) | 447 | (eshell-parse-command cmd)) |
| 452 | (list 'ignore | 448 | (list 'ignore |
| 453 | (list 'nconc 'eshell-this-command-hook | 449 | (list 'nconc 'eshell-this-command-hook |
| 454 | (list 'list | 450 | (list 'list |
| 455 | (list 'function | 451 | (list 'function |
| 456 | (list 'lambda nil | 452 | (list 'lambda nil |
| 457 | (list 'delete-file temp)))))) | 453 | (list 'delete-file temp)))))) |
| 458 | (list 'quote temp))) | 454 | (list 'quote temp))) |
| 459 | (goto-char (1+ end))))))) | 455 | (goto-char (1+ end))))))) |
| 460 | ((eq (char-after) ?\() | 456 | ((eq (char-after) ?\() |
| 461 | (condition-case err | 457 | (condition-case nil |
| 462 | (list 'eshell-command-to-value | 458 | (list 'eshell-command-to-value |
| 463 | (list 'eshell-lisp-command | 459 | (list 'eshell-lisp-command |
| 464 | (list 'quote (read (current-buffer))))) | 460 | (list 'quote (read (current-buffer))))) |
| 465 | (end-of-file | 461 | (end-of-file |
| 466 | (throw 'eshell-incomplete ?\()))) | 462 | (throw 'eshell-incomplete ?\()))) |
| 467 | ((assoc (char-to-string (char-after)) | 463 | ((assoc (char-to-string (char-after)) |
| 468 | eshell-variable-aliases-list) | 464 | eshell-variable-aliases-list) |
| 469 | (forward-char) | 465 | (forward-char) |
| 470 | (list 'eshell-get-variable | 466 | (list 'eshell-get-variable |
| 471 | (char-to-string (char-before)) 'indices)) | 467 | (char-to-string (char-before)) 'indices)) |
| 472 | ((looking-at eshell-variable-name-regexp) | 468 | ((looking-at eshell-variable-name-regexp) |
| 473 | (prog1 | 469 | (prog1 |
| 474 | (list 'eshell-get-variable (match-string 0) 'indices) | 470 | (list 'eshell-get-variable (match-string 0) 'indices) |
| 475 | (goto-char (match-end 0)))) | 471 | (goto-char (match-end 0)))) |
| 476 | (t | 472 | (t |
| 477 | (error "Invalid variable reference"))))) | 473 | (error "Invalid variable reference")))) |
| 474 | |||
| 475 | (defvar eshell-glob-function) | ||
| 478 | 476 | ||
| 479 | (defun eshell-parse-indices () | 477 | (defun eshell-parse-indices () |
| 480 | "Parse and return a list of list of indices." | 478 | "Parse and return a list of list of indices." |
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 9bdf8b3eb68..e3f8f0d11bc 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el | |||
| @@ -300,7 +300,7 @@ buffer selected (or created)." | |||
| 300 | (get-buffer-create eshell-buffer-name))))) | 300 | (get-buffer-create eshell-buffer-name))))) |
| 301 | (cl-assert (and buf (buffer-live-p buf))) | 301 | (cl-assert (and buf (buffer-live-p buf))) |
| 302 | (pop-to-buffer-same-window buf) | 302 | (pop-to-buffer-same-window buf) |
| 303 | (unless (eq major-mode 'eshell-mode) | 303 | (unless (derived-mode-p 'eshell-mode) |
| 304 | (eshell-mode)) | 304 | (eshell-mode)) |
| 305 | buf)) | 305 | buf)) |
| 306 | 306 | ||
diff --git a/lisp/files.el b/lisp/files.el index f9ff3c936bd..ca55c646699 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2447,35 +2447,20 @@ and `magic-mode-alist', which determines modes based on file contents.") | |||
| 2447 | (mapcar | 2447 | (mapcar |
| 2448 | (lambda (l) | 2448 | (lambda (l) |
| 2449 | (cons (purecopy (car l)) (cdr l))) | 2449 | (cons (purecopy (car l)) (cdr l))) |
| 2450 | '(("perl" . perl-mode) | 2450 | '(("\\(mini\\)?perl5?" . perl-mode) |
| 2451 | ("perl5" . perl-mode) | 2451 | ("wishx?" . tcl-mode) |
| 2452 | ("miniperl" . perl-mode) | 2452 | ("tcl\\(sh\\)?" . tcl-mode) |
| 2453 | ("wish" . tcl-mode) | ||
| 2454 | ("wishx" . tcl-mode) | ||
| 2455 | ("tcl" . tcl-mode) | ||
| 2456 | ("tclsh" . tcl-mode) | ||
| 2457 | ("expect" . tcl-mode) | 2453 | ("expect" . tcl-mode) |
| 2458 | ("scm" . scheme-mode) | 2454 | ("scm" . scheme-mode) |
| 2459 | ("ash" . sh-mode) | 2455 | ("[acjkwz]sh" . sh-mode) |
| 2460 | ("bash" . sh-mode) | 2456 | ("r?bash2?" . sh-mode) |
| 2461 | ("bash2" . sh-mode) | 2457 | ("\\(dt\\|pd\\|w\\)ksh" . sh-mode) |
| 2462 | ("csh" . sh-mode) | ||
| 2463 | ("dtksh" . sh-mode) | ||
| 2464 | ("es" . sh-mode) | 2458 | ("es" . sh-mode) |
| 2465 | ("itcsh" . sh-mode) | 2459 | ("i?tcsh" . sh-mode) |
| 2466 | ("jsh" . sh-mode) | ||
| 2467 | ("ksh" . sh-mode) | ||
| 2468 | ("oash" . sh-mode) | 2460 | ("oash" . sh-mode) |
| 2469 | ("pdksh" . sh-mode) | ||
| 2470 | ("rbash" . sh-mode) | ||
| 2471 | ("rc" . sh-mode) | 2461 | ("rc" . sh-mode) |
| 2472 | ("rpm" . sh-mode) | 2462 | ("rpm" . sh-mode) |
| 2473 | ("sh" . sh-mode) | 2463 | ("sh5?" . sh-mode) |
| 2474 | ("sh5" . sh-mode) | ||
| 2475 | ("tcsh" . sh-mode) | ||
| 2476 | ("wksh" . sh-mode) | ||
| 2477 | ("wsh" . sh-mode) | ||
| 2478 | ("zsh" . sh-mode) | ||
| 2479 | ("tail" . text-mode) | 2464 | ("tail" . text-mode) |
| 2480 | ("more" . text-mode) | 2465 | ("more" . text-mode) |
| 2481 | ("less" . text-mode) | 2466 | ("less" . text-mode) |
| @@ -2486,9 +2471,10 @@ and `magic-mode-alist', which determines modes based on file contents.") | |||
| 2486 | ("emacs" . emacs-lisp-mode))) | 2471 | ("emacs" . emacs-lisp-mode))) |
| 2487 | "Alist mapping interpreter names to major modes. | 2472 | "Alist mapping interpreter names to major modes. |
| 2488 | This is used for files whose first lines match `auto-mode-interpreter-regexp'. | 2473 | This is used for files whose first lines match `auto-mode-interpreter-regexp'. |
| 2489 | Each element looks like (INTERPRETER . MODE). | 2474 | Each element looks like (REGEXP . MODE). |
| 2490 | If INTERPRETER matches the name of the interpreter specified in the first line | 2475 | If \\\\`REGEXP\\\\' matches the name (minus any directory part) of |
| 2491 | of a script, mode MODE is enabled. | 2476 | the interpreter specified in the first line of a script, enable |
| 2477 | major mode MODE. | ||
| 2492 | 2478 | ||
| 2493 | See also `auto-mode-alist'.") | 2479 | See also `auto-mode-alist'.") |
| 2494 | 2480 | ||
| @@ -2683,19 +2669,23 @@ we don't actually set it to the same mode the buffer already has." | |||
| 2683 | ;; If we didn't, look for an interpreter specified in the first line. | 2669 | ;; If we didn't, look for an interpreter specified in the first line. |
| 2684 | ;; As a special case, allow for things like "#!/bin/env perl", which | 2670 | ;; As a special case, allow for things like "#!/bin/env perl", which |
| 2685 | ;; finds the interpreter anywhere in $PATH. | 2671 | ;; finds the interpreter anywhere in $PATH. |
| 2686 | (unless done | 2672 | (and (not done) |
| 2687 | (setq mode (save-excursion | 2673 | (setq mode (save-excursion |
| 2688 | (goto-char (point-min)) | 2674 | (goto-char (point-min)) |
| 2689 | (if (looking-at auto-mode-interpreter-regexp) | 2675 | (if (looking-at auto-mode-interpreter-regexp) |
| 2690 | (match-string 2) | 2676 | (match-string 2)))) |
| 2691 | "")) | 2677 | ;; Map interpreter name to a mode, signaling we're done at the |
| 2692 | ;; Map interpreter name to a mode, signaling we're done at the | 2678 | ;; same time. |
| 2693 | ;; same time. | 2679 | (setq done (assoc-default |
| 2694 | done (assoc (file-name-nondirectory mode) | 2680 | (file-name-nondirectory mode) |
| 2695 | interpreter-mode-alist)) | 2681 | (mapcar (lambda (e) |
| 2696 | ;; If we found an interpreter mode to use, invoke it now. | 2682 | (cons |
| 2697 | (if done | 2683 | (format "\\`%s\\'" (car e)) |
| 2698 | (set-auto-mode-0 (cdr done) keep-mode-if-same))) | 2684 | (cdr e))) |
| 2685 | interpreter-mode-alist) | ||
| 2686 | #'string-match-p)) | ||
| 2687 | ;; If we found an interpreter mode to use, invoke it now. | ||
| 2688 | (set-auto-mode-0 done keep-mode-if-same)) | ||
| 2699 | ;; Next try matching the buffer beginning against magic-mode-alist. | 2689 | ;; Next try matching the buffer beginning against magic-mode-alist. |
| 2700 | (unless done | 2690 | (unless done |
| 2701 | (if (setq done (save-excursion | 2691 | (if (setq done (save-excursion |
| @@ -3647,21 +3637,17 @@ FILE is the name of the file holding the variables to apply. | |||
| 3647 | The new class name is the same as the directory in which FILE | 3637 | The new class name is the same as the directory in which FILE |
| 3648 | is found. Returns the new class name." | 3638 | is found. Returns the new class name." |
| 3649 | (with-temp-buffer | 3639 | (with-temp-buffer |
| 3650 | ;; This is with-demoted-errors, but we want to mention dir-locals | 3640 | (with-demoted-errors "Error reading dir-locals: %S" |
| 3651 | ;; in any error message. | 3641 | (insert-file-contents file) |
| 3652 | (condition-case err | 3642 | (unless (zerop (buffer-size)) |
| 3653 | (progn | 3643 | (let* ((dir-name (file-name-directory file)) |
| 3654 | (insert-file-contents file) | 3644 | (class-name (intern dir-name)) |
| 3655 | (unless (zerop (buffer-size)) | 3645 | (variables (let ((read-circle nil)) |
| 3656 | (let* ((dir-name (file-name-directory file)) | 3646 | (read (current-buffer))))) |
| 3657 | (class-name (intern dir-name)) | 3647 | (dir-locals-set-class-variables class-name variables) |
| 3658 | (variables (let ((read-circle nil)) | 3648 | (dir-locals-set-directory-class dir-name class-name |
| 3659 | (read (current-buffer))))) | 3649 | (nth 5 (file-attributes file))) |
| 3660 | (dir-locals-set-class-variables class-name variables) | 3650 | class-name))))) |
| 3661 | (dir-locals-set-directory-class dir-name class-name | ||
| 3662 | (nth 5 (file-attributes file))) | ||
| 3663 | class-name))) | ||
| 3664 | (error (message "Error reading dir-locals: %S" err) nil)))) | ||
| 3665 | 3651 | ||
| 3666 | (defcustom enable-remote-dir-locals nil | 3652 | (defcustom enable-remote-dir-locals nil |
| 3667 | "Non-nil means dir-local variables will be applied to remote files." | 3653 | "Non-nil means dir-local variables will be applied to remote files." |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c75588536a4..2eea1fb833e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * gnus-icalendar.el (gnus-icalendar-event--build-reply-event-body): | ||
| 4 | Avoid using `find', which i) might not be defined at runtime; | ||
| 5 | ii) does not work, since its default test is eql, not equal. | ||
| 6 | (gnus-mime-action-alist): Declare. | ||
| 7 | |||
| 8 | 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 9 | |||
| 10 | * score-mode.el (gnus-score-mode-map): Move initialization | ||
| 11 | into declaration. | ||
| 12 | (gnus-score-mode): Use define-derived-mode. | ||
| 13 | * gnus-srvr.el (gnus-browse-mode): Use define-derived-mode. | ||
| 14 | * gnus-kill.el (gnus-kill-file-mode-map): Move initialization | ||
| 15 | into declaration. | ||
| 16 | (gnus-kill-file-mode): Use define-derived-mode. | ||
| 17 | (gnus-kill-file-edit-file, gnus-kill-file-enter-kill, gnus-kill): | ||
| 18 | Use derived-mode-p. | ||
| 19 | * gnus-group.el (gnus-group-mode): Use define-derived-mode. | ||
| 20 | (gnus-group-setup-buffer, gnus-group-name-at-point) | ||
| 21 | (gnus-group-make-web-group, gnus-group-enter-directory) | ||
| 22 | (gnus-group-suspend): Use derived-mode-p. | ||
| 23 | * gnus-cus.el (gnus-custom-mode): Use define-derived-mode. | ||
| 24 | * gnus-bookmark.el (gnus-bookmark-bmenu-mode): Use define-derived-mode. | ||
| 25 | * gnus-art.el (gnus-article-mode): Use define-derived-mode. | ||
| 26 | (gnus-article-setup-buffer, gnus-article-prepare) | ||
| 27 | (gnus-article-prepare-display, gnus-sticky-article) | ||
| 28 | (gnus-kill-sticky-article-buffer, gnus-kill-sticky-article-buffers) | ||
| 29 | (gnus-bind-safe-url-regexp, gnus-article-check-buffer) | ||
| 30 | (gnus-article-read-summary-keys): Use derived-mode-p. | ||
| 31 | |||
| 1 | 2013-08-28 Katsumi Yamaoka <yamaoka@jpl.org> | 32 | 2013-08-28 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 33 | ||
| 3 | * mm-decode.el (mm-temp-files-delete): Fix file deletion logic. | 34 | * mm-decode.el (mm-temp-files-delete): Fix file deletion logic. |
| @@ -177,15 +208,15 @@ | |||
| 177 | 2013-07-10 David Engster <deng@randomsample.de> | 208 | 2013-07-10 David Engster <deng@randomsample.de> |
| 178 | 209 | ||
| 179 | * gnus-start.el (gnus-clean-old-newsrc): Always remove 'unexist' marks | 210 | * gnus-start.el (gnus-clean-old-newsrc): Always remove 'unexist' marks |
| 180 | if `gnus-newsrc-file-version' does not match `gnus-version'. This | 211 | if `gnus-newsrc-file-version' does not match `gnus-version'. |
| 181 | fixes a bug in Emacs trunk where the 'unexist' marks were always | 212 | This fixes a bug in Emacs trunk where the 'unexist' marks were always |
| 182 | removed at startup because "Gnus v5.13" was considered smaller than "Ma | 213 | removed at startup because "Gnus v5.13" was considered smaller than "Ma |
| 183 | Gnus v0.03". | 214 | Gnus v0.03". |
| 184 | 215 | ||
| 185 | 2013-07-10 Tassilo Horn <tsdh@gnu.org> | 216 | 2013-07-10 Tassilo Horn <tsdh@gnu.org> |
| 186 | 217 | ||
| 187 | * gnus.el (gnus-summary-line-format): Reference | 218 | * gnus.el (gnus-summary-line-format): |
| 188 | `gnus-user-date-format-alist' for the &user-date; format, not | 219 | Reference `gnus-user-date-format-alist' for the &user-date; format, not |
| 189 | `gnus-summary-user-date-format-alist'. | 220 | `gnus-summary-user-date-format-alist'. |
| 190 | 221 | ||
| 191 | 2013-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org> | 222 | 2013-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| @@ -467,7 +498,7 @@ | |||
| 467 | 498 | ||
| 468 | * shr.el (shr-render-td): Support horizontal alignment. | 499 | * shr.el (shr-render-td): Support horizontal alignment. |
| 469 | 500 | ||
| 470 | * eww.el (eww-put-color): Removed. | 501 | * eww.el (eww-put-color): Remove. |
| 471 | (eww-colorize-region): Use `add-face-text-property'. | 502 | (eww-colorize-region): Use `add-face-text-property'. |
| 472 | 503 | ||
| 473 | * shr.el (shr-add-font): Append face data, so that we get the correct | 504 | * shr.el (shr-add-font): Append face data, so that we get the correct |
| @@ -522,7 +553,7 @@ | |||
| 522 | 553 | ||
| 523 | 2013-06-16 Rüdiger Sonderfeld <ruediger@c-plusplus.de> | 554 | 2013-06-16 Rüdiger Sonderfeld <ruediger@c-plusplus.de> |
| 524 | 555 | ||
| 525 | * shr.el (shr-dom-to-xml): Fixed function call. | 556 | * shr.el (shr-dom-to-xml): Fix function call. |
| 526 | 557 | ||
| 527 | * eww.el (eww): New group. | 558 | * eww.el (eww): New group. |
| 528 | (eww-header-line-format): New custom variable. | 559 | (eww-header-line-format): New custom variable. |
| @@ -558,8 +589,8 @@ | |||
| 558 | (auth-source-netrc-parse): Refactor and improve netrc parser to support | 589 | (auth-source-netrc-parse): Refactor and improve netrc parser to support |
| 559 | single-quoted strings and multiline entries. | 590 | single-quoted strings and multiline entries. |
| 560 | (auth-source-netrc-parse-next-interesting) | 591 | (auth-source-netrc-parse-next-interesting) |
| 561 | (auth-source-netrc-parse-one, auth-source-netrc-parse-entries): New | 592 | (auth-source-netrc-parse-one, auth-source-netrc-parse-entries): |
| 562 | functions to support parser. | 593 | New functions to support parser. |
| 563 | 594 | ||
| 564 | 2013-06-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | 595 | 2013-06-14 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 565 | 596 | ||
| @@ -707,8 +738,8 @@ | |||
| 707 | * registry.el (initialize-instance, registry-lookup) | 738 | * registry.el (initialize-instance, registry-lookup) |
| 708 | (registry-lookup-breaks-before-lexbind, registry-lookup-secondary) | 739 | (registry-lookup-breaks-before-lexbind, registry-lookup-secondary) |
| 709 | (registry-lookup-secondary-value, registry-search, registry-delete) | 740 | (registry-lookup-secondary-value, registry-search, registry-delete) |
| 710 | (registry-insert, registry-reindex, registry-size, registry-prune): Do | 741 | (registry-insert, registry-reindex, registry-size, registry-prune): |
| 711 | not wrap methods in `eval-and-compile'. This breaks due to latest | 742 | Do not wrap methods in `eval-and-compile'. This breaks due to latest |
| 712 | changes in EIEIO (introduction of eieio-core.el). | 743 | changes in EIEIO (introduction of eieio-core.el). |
| 713 | 744 | ||
| 714 | 2013-05-30 Glenn Morris <rgm@gnu.org> | 745 | 2013-05-30 Glenn Morris <rgm@gnu.org> |
| @@ -988,8 +1019,8 @@ | |||
| 988 | 2013-03-26 Andrew Cohen <cohen@bu.edu> | 1019 | 2013-03-26 Andrew Cohen <cohen@bu.edu> |
| 989 | 1020 | ||
| 990 | * nnir.el: Major rewrite. Cleaner separation between searches and group | 1021 | * nnir.el: Major rewrite. Cleaner separation between searches and group |
| 991 | management. Marks are now shown in nnir summary buffers. Rudimentary | 1022 | management. Marks are now shown in nnir summary buffers. |
| 992 | support for real (i.e. not ephemeral) nnir groups. | 1023 | Rudimentary support for real (i.e. not ephemeral) nnir groups. |
| 993 | (gnus-summary-make-nnir-group): New function for initiating searches | 1024 | (gnus-summary-make-nnir-group): New function for initiating searches |
| 994 | from a summary buffer. | 1025 | from a summary buffer. |
| 995 | 1026 | ||
| @@ -1018,8 +1049,8 @@ | |||
| 1018 | 2013-02-22 David Engster <deng@randomsample.de> | 1049 | 2013-02-22 David Engster <deng@randomsample.de> |
| 1019 | 1050 | ||
| 1020 | * gnus-registry.el (gnus-registry-save): Provide class name when | 1051 | * gnus-registry.el (gnus-registry-save): Provide class name when |
| 1021 | calling `eieio-persistent-read' to avoid "unsafe call" warning. Use | 1052 | calling `eieio-persistent-read' to avoid "unsafe call" warning. |
| 1022 | `condition-case' to stay compatible with older EIEIO versions which | 1053 | Use `condition-case' to stay compatible with older EIEIO versions which |
| 1023 | only accept one argument. | 1054 | only accept one argument. |
| 1024 | 1055 | ||
| 1025 | 2013-02-17 Daiki Ueno <ueno@gnu.org> | 1056 | 2013-02-17 Daiki Ueno <ueno@gnu.org> |
| @@ -5295,7 +5326,7 @@ | |||
| 5295 | a creation default, pass the whole port list down. It will be | 5326 | a creation default, pass the whole port list down. It will be |
| 5296 | completed. | 5327 | completed. |
| 5297 | 5328 | ||
| 5298 | * auth-source.el (auth-source-search): Updated docs to talk about | 5329 | * auth-source.el (auth-source-search): Update docs to talk about |
| 5299 | multiple creation choices. | 5330 | multiple creation choices. |
| 5300 | (auth-source-netrc-create): Accept a list as a value (from the search | 5331 | (auth-source-netrc-create): Accept a list as a value (from the search |
| 5301 | parameters) and do completion on that list. Keep a separate netrc line | 5332 | parameters) and do completion on that list. Keep a separate netrc line |
| @@ -5362,7 +5393,7 @@ | |||
| 5362 | (gnus-summary-exit): Kill the correct article buffer on exit from a | 5393 | (gnus-summary-exit): Kill the correct article buffer on exit from a |
| 5363 | `C-d' group. | 5394 | `C-d' group. |
| 5364 | 5395 | ||
| 5365 | * gnus-start.el (gnus-use-backend-marks): Removed, since it duplicates | 5396 | * gnus-start.el (gnus-use-backend-marks): Remove, since it duplicates |
| 5366 | gnus-propagate-marks. | 5397 | gnus-propagate-marks. |
| 5367 | 5398 | ||
| 5368 | * gnus-sum.el (gnus-summary-exit-no-update): Restore the group conf | 5399 | * gnus-sum.el (gnus-summary-exit-no-update): Restore the group conf |
| @@ -18399,7 +18430,7 @@ | |||
| 18399 | 18430 | ||
| 18400 | 2005-11-19 Kevin Greiner <kevin.greiner@compsol.cc> | 18431 | 2005-11-19 Kevin Greiner <kevin.greiner@compsol.cc> |
| 18401 | 18432 | ||
| 18402 | * gnus-sum.el (gnus-fetch-old-headers): Updated docs to warn that | 18433 | * gnus-sum.el (gnus-fetch-old-headers): Update docs to warn that |
| 18403 | it can seriously impact performance as it bypasses the agent's | 18434 | it can seriously impact performance as it bypasses the agent's |
| 18404 | local caches. | 18435 | local caches. |
| 18405 | 18436 | ||
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index e65b9fb99e4..b80aa3a24e9 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -3683,7 +3683,7 @@ function and want to see what the date was before converting." | |||
| 3683 | (walk-windows | 3683 | (walk-windows |
| 3684 | (lambda (w) | 3684 | (lambda (w) |
| 3685 | (set-buffer (window-buffer w)) | 3685 | (set-buffer (window-buffer w)) |
| 3686 | (when (eq major-mode 'gnus-article-mode) | 3686 | (when (derived-mode-p 'gnus-article-mode) |
| 3687 | (let ((old-line (count-lines (point-min) (point))) | 3687 | (let ((old-line (count-lines (point-min) (point))) |
| 3688 | (old-column (- (point) (line-beginning-position))) | 3688 | (old-column (- (point) (line-beginning-position))) |
| 3689 | (window-start (window-start w)) | 3689 | (window-start (window-start w)) |
| @@ -4455,7 +4455,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 4455 | (defvar bookmark-make-record-function) | 4455 | (defvar bookmark-make-record-function) |
| 4456 | (defvar shr-put-image-function) | 4456 | (defvar shr-put-image-function) |
| 4457 | 4457 | ||
| 4458 | (defun gnus-article-mode () | 4458 | (define-derived-mode gnus-article-mode fundamental-mode "Article" |
| 4459 | "Major mode for displaying an article. | 4459 | "Major mode for displaying an article. |
| 4460 | 4460 | ||
| 4461 | All normal editing commands are switched off. | 4461 | All normal editing commands are switched off. |
| @@ -4470,13 +4470,8 @@ commands: | |||
| 4470 | \\[gnus-article-mail]\t Send a reply to the address near point | 4470 | \\[gnus-article-mail]\t Send a reply to the address near point |
| 4471 | \\[gnus-article-describe-briefly]\t Describe the current mode briefly | 4471 | \\[gnus-article-describe-briefly]\t Describe the current mode briefly |
| 4472 | \\[gnus-info-find-node]\t Go to the Gnus info node" | 4472 | \\[gnus-info-find-node]\t Go to the Gnus info node" |
| 4473 | (interactive) | ||
| 4474 | (kill-all-local-variables) | ||
| 4475 | (gnus-simplify-mode-line) | 4473 | (gnus-simplify-mode-line) |
| 4476 | (setq mode-name "Article") | ||
| 4477 | (setq major-mode 'gnus-article-mode) | ||
| 4478 | (make-local-variable 'minor-mode-alist) | 4474 | (make-local-variable 'minor-mode-alist) |
| 4479 | (use-local-map gnus-article-mode-map) | ||
| 4480 | (when (gnus-visual-p 'article-menu 'menu) | 4475 | (when (gnus-visual-p 'article-menu 'menu) |
| 4481 | (gnus-article-make-menu-bar) | 4476 | (gnus-article-make-menu-bar) |
| 4482 | (when gnus-summary-tool-bar-map | 4477 | (when gnus-summary-tool-bar-map |
| @@ -4504,9 +4499,7 @@ commands: | |||
| 4504 | (buffer-disable-undo) | 4499 | (buffer-disable-undo) |
| 4505 | (setq buffer-read-only t | 4500 | (setq buffer-read-only t |
| 4506 | show-trailing-whitespace nil) | 4501 | show-trailing-whitespace nil) |
| 4507 | (set-syntax-table gnus-article-mode-syntax-table) | 4502 | (mm-enable-multibyte)) |
| 4508 | (mm-enable-multibyte) | ||
| 4509 | (gnus-run-mode-hooks 'gnus-article-mode-hook)) | ||
| 4510 | 4503 | ||
| 4511 | (defun gnus-article-setup-buffer () | 4504 | (defun gnus-article-setup-buffer () |
| 4512 | "Initialize the article buffer." | 4505 | "Initialize the article buffer." |
| @@ -4554,7 +4547,7 @@ commands: | |||
| 4554 | (setq gnus-article-mime-handle-alist nil) | 4547 | (setq gnus-article-mime-handle-alist nil) |
| 4555 | (buffer-disable-undo) | 4548 | (buffer-disable-undo) |
| 4556 | (setq buffer-read-only t) | 4549 | (setq buffer-read-only t) |
| 4557 | (unless (eq major-mode 'gnus-article-mode) | 4550 | (unless (derived-mode-p 'gnus-article-mode) |
| 4558 | (gnus-article-mode)) | 4551 | (gnus-article-mode)) |
| 4559 | (setq truncate-lines gnus-article-truncate-lines) | 4552 | (setq truncate-lines gnus-article-truncate-lines) |
| 4560 | (current-buffer)) | 4553 | (current-buffer)) |
| @@ -4603,7 +4596,7 @@ If ARTICLE is an id, HEADER should be the article headers. | |||
| 4603 | If ALL-HEADERS is non-nil, no headers are hidden." | 4596 | If ALL-HEADERS is non-nil, no headers are hidden." |
| 4604 | (save-excursion | 4597 | (save-excursion |
| 4605 | ;; Make sure we start in a summary buffer. | 4598 | ;; Make sure we start in a summary buffer. |
| 4606 | (unless (eq major-mode 'gnus-summary-mode) | 4599 | (unless (derived-mode-p 'gnus-summary-mode) |
| 4607 | (set-buffer gnus-summary-buffer)) | 4600 | (set-buffer gnus-summary-buffer)) |
| 4608 | (setq gnus-summary-buffer (current-buffer)) | 4601 | (setq gnus-summary-buffer (current-buffer)) |
| 4609 | (let* ((gnus-article (if header (mail-header-number header) article)) | 4602 | (let* ((gnus-article (if header (mail-header-number header) article)) |
| @@ -4714,7 +4707,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." | |||
| 4714 | (let ((gnus-article-buffer (current-buffer)) | 4707 | (let ((gnus-article-buffer (current-buffer)) |
| 4715 | buffer-read-only | 4708 | buffer-read-only |
| 4716 | (inhibit-read-only t)) | 4709 | (inhibit-read-only t)) |
| 4717 | (unless (eq major-mode 'gnus-article-mode) | 4710 | (unless (derived-mode-p 'gnus-article-mode) |
| 4718 | (gnus-article-mode)) | 4711 | (gnus-article-mode)) |
| 4719 | (setq buffer-read-only nil | 4712 | (setq buffer-read-only nil |
| 4720 | gnus-article-wash-types nil | 4713 | gnus-article-wash-types nil |
| @@ -4776,7 +4769,7 @@ If a prefix ARG is given, ask for a name for this sticky article buffer." | |||
| 4776 | "*")) | 4769 | "*")) |
| 4777 | (if (and (gnus-buffer-live-p new-art-buf-name) | 4770 | (if (and (gnus-buffer-live-p new-art-buf-name) |
| 4778 | (with-current-buffer new-art-buf-name | 4771 | (with-current-buffer new-art-buf-name |
| 4779 | (eq major-mode 'gnus-sticky-article-mode))) | 4772 | (derived-mode-p 'gnus-sticky-article-mode))) |
| 4780 | (switch-to-buffer new-art-buf-name) | 4773 | (switch-to-buffer new-art-buf-name) |
| 4781 | (setq new-art-buf-name (rename-buffer new-art-buf-name t))) | 4774 | (setq new-art-buf-name (rename-buffer new-art-buf-name t))) |
| 4782 | (gnus-sticky-article-mode)) | 4775 | (gnus-sticky-article-mode)) |
| @@ -4792,7 +4785,7 @@ If none is given, assume the current buffer and kill it if it has | |||
| 4792 | (unless buffer | 4785 | (unless buffer |
| 4793 | (setq buffer (current-buffer))) | 4786 | (setq buffer (current-buffer))) |
| 4794 | (with-current-buffer buffer | 4787 | (with-current-buffer buffer |
| 4795 | (when (eq major-mode 'gnus-sticky-article-mode) | 4788 | (when (derived-mode-p 'gnus-sticky-article-mode) |
| 4796 | (gnus-kill-buffer buffer)))) | 4789 | (gnus-kill-buffer buffer)))) |
| 4797 | 4790 | ||
| 4798 | (defun gnus-kill-sticky-article-buffers (arg) | 4791 | (defun gnus-kill-sticky-article-buffers (arg) |
| @@ -4801,11 +4794,11 @@ If a prefix ARG is given, ask for confirmation." | |||
| 4801 | (interactive "P") | 4794 | (interactive "P") |
| 4802 | (dolist (buf (gnus-buffers)) | 4795 | (dolist (buf (gnus-buffers)) |
| 4803 | (with-current-buffer buf | 4796 | (with-current-buffer buf |
| 4804 | (when (eq major-mode 'gnus-sticky-article-mode) | 4797 | (when (derived-mode-p 'gnus-sticky-article-mode) |
| 4805 | (if (not arg) | 4798 | (if (not arg) |
| 4806 | (gnus-kill-buffer buf) | 4799 | (gnus-kill-buffer buf) |
| 4807 | (when (yes-or-no-p (concat "Kill buffer " (buffer-name buf) "? ")) | 4800 | (when (yes-or-no-p (concat "Kill buffer " (buffer-name buf) "? ")) |
| 4808 | (gnus-kill-buffer buf))))))) | 4801 | (gnus-kill-buffer buf))))))) |
| 4809 | 4802 | ||
| 4810 | ;;; | 4803 | ;;; |
| 4811 | ;;; Gnus MIME viewing functions | 4804 | ;;; Gnus MIME viewing functions |
| @@ -4893,7 +4886,7 @@ General format specifiers can also be used. See Info node | |||
| 4893 | (defmacro gnus-bind-safe-url-regexp (&rest body) | 4886 | (defmacro gnus-bind-safe-url-regexp (&rest body) |
| 4894 | "Bind `mm-w3m-safe-url-regexp' according to `gnus-safe-html-newsgroups'." | 4887 | "Bind `mm-w3m-safe-url-regexp' according to `gnus-safe-html-newsgroups'." |
| 4895 | `(let ((mm-w3m-safe-url-regexp | 4888 | `(let ((mm-w3m-safe-url-regexp |
| 4896 | (let ((group (if (and (eq major-mode 'gnus-article-mode) | 4889 | (let ((group (if (and (derived-mode-p 'gnus-article-mode) |
| 4897 | (gnus-buffer-live-p | 4890 | (gnus-buffer-live-p |
| 4898 | gnus-article-current-summary)) | 4891 | gnus-article-current-summary)) |
| 4899 | (with-current-buffer gnus-article-current-summary | 4892 | (with-current-buffer gnus-article-current-summary |
| @@ -6477,7 +6470,7 @@ not have a face in `gnus-article-boring-faces'." | |||
| 6477 | 6470 | ||
| 6478 | (defun gnus-article-check-buffer () | 6471 | (defun gnus-article-check-buffer () |
| 6479 | "Beep if not in an article buffer." | 6472 | "Beep if not in an article buffer." |
| 6480 | (unless (equal major-mode 'gnus-article-mode) | 6473 | (unless (derived-mode-p 'gnus-article-mode) |
| 6481 | (error "Command invoked outside of a Gnus article buffer"))) | 6474 | (error "Command invoked outside of a Gnus article buffer"))) |
| 6482 | 6475 | ||
| 6483 | (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) | 6476 | (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) |
| @@ -6592,7 +6585,7 @@ not have a face in `gnus-article-boring-faces'." | |||
| 6592 | new-sum-point | 6585 | new-sum-point |
| 6593 | (window-live-p win) | 6586 | (window-live-p win) |
| 6594 | (with-current-buffer (window-buffer win) | 6587 | (with-current-buffer (window-buffer win) |
| 6595 | (eq major-mode 'gnus-summary-mode))) | 6588 | (derived-mode-p 'gnus-summary-mode))) |
| 6596 | (set-window-point win new-sum-point) | 6589 | (set-window-point win new-sum-point) |
| 6597 | (set-window-start win new-sum-start) | 6590 | (set-window-start win new-sum-start) |
| 6598 | (set-window-hscroll win new-sum-hscroll)))) | 6591 | (set-window-hscroll win new-sum-hscroll)))) |
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 7a3d273622a..c31cb1aef36 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el | |||
| @@ -190,7 +190,7 @@ So the cdr of each bookmark is an alist too.") | |||
| 190 | "Set a bookmark for this article." | 190 | "Set a bookmark for this article." |
| 191 | (interactive) | 191 | (interactive) |
| 192 | (gnus-bookmark-maybe-load-default-file) | 192 | (gnus-bookmark-maybe-load-default-file) |
| 193 | (if (or (not (eq major-mode 'gnus-summary-mode)) | 193 | (if (or (not (derived-mode-p 'gnus-summary-mode)) |
| 194 | (not gnus-article-current)) | 194 | (not gnus-article-current)) |
| 195 | (error "Please select an article in the Gnus summary buffer") | 195 | (error "Please select an article in the Gnus summary buffer") |
| 196 | (let* ((group (car gnus-article-current)) | 196 | (let* ((group (car gnus-article-current)) |
| @@ -473,7 +473,7 @@ That is, all information but the name." | |||
| 473 | ;; Been to lazy to use gnus-bookmark-save... | 473 | ;; Been to lazy to use gnus-bookmark-save... |
| 474 | (defalias 'gnus-bookmark-bmenu-save 'gnus-bookmark-write-file) | 474 | (defalias 'gnus-bookmark-bmenu-save 'gnus-bookmark-write-file) |
| 475 | 475 | ||
| 476 | (defun gnus-bookmark-bmenu-mode () | 476 | (define-derived-mode gnus-bookmark-bmenu-mode fundamental-mode "Bookmark Menu" |
| 477 | "Major mode for editing a list of Gnus bookmarks. | 477 | "Major mode for editing a list of Gnus bookmarks. |
| 478 | Each line describes one of the bookmarks in Gnus. | 478 | Each line describes one of the bookmarks in Gnus. |
| 479 | Letters do not insert themselves; instead, they are commands. | 479 | Letters do not insert themselves; instead, they are commands. |
| @@ -497,13 +497,8 @@ Gnus bookmarks names preceded by a \"*\" have annotations. | |||
| 497 | in another buffer. | 497 | in another buffer. |
| 498 | \\[gnus-bookmark-bmenu-show-all-annotations] -- show the annotations of all bookmarks in another buffer. | 498 | \\[gnus-bookmark-bmenu-show-all-annotations] -- show the annotations of all bookmarks in another buffer. |
| 499 | \\[gnus-bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark." | 499 | \\[gnus-bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark." |
| 500 | (kill-all-local-variables) | ||
| 501 | (use-local-map gnus-bookmark-bmenu-mode-map) | ||
| 502 | (setq truncate-lines t) | 500 | (setq truncate-lines t) |
| 503 | (setq buffer-read-only t) | 501 | (setq buffer-read-only t)) |
| 504 | (setq major-mode 'gnus-bookmark-bmenu-mode) | ||
| 505 | (setq mode-name "Bookmark Menu") | ||
| 506 | (gnus-run-mode-hooks 'gnus-bookmark-bmenu-mode-hook)) | ||
| 507 | 502 | ||
| 508 | ;; avoid compilation warnings | 503 | ;; avoid compilation warnings |
| 509 | (defvar gnus-bookmark-bmenu-toggle-infos nil) | 504 | (defvar gnus-bookmark-bmenu-toggle-infos nil) |
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index c8fb5b5dc73..247c081a20f 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | ;;; Widgets: | 34 | ;;; Widgets: |
| 35 | 35 | ||
| 36 | (defun gnus-custom-mode () | 36 | (define-derived-mode gnus-custom-mode fundamental-mode "Gnus Customize" |
| 37 | "Major mode for editing Gnus customization buffers. | 37 | "Major mode for editing Gnus customization buffers. |
| 38 | 38 | ||
| 39 | The following commands are available: | 39 | The following commands are available: |
| @@ -45,9 +45,6 @@ The following commands are available: | |||
| 45 | 45 | ||
| 46 | Entry to this mode calls the value of `gnus-custom-mode-hook' | 46 | Entry to this mode calls the value of `gnus-custom-mode-hook' |
| 47 | if that value is non-nil." | 47 | if that value is non-nil." |
| 48 | (kill-all-local-variables) | ||
| 49 | (setq major-mode 'gnus-custom-mode | ||
| 50 | mode-name "Gnus Customize") | ||
| 51 | (use-local-map widget-keymap) | 48 | (use-local-map widget-keymap) |
| 52 | ;; Emacs stuff: | 49 | ;; Emacs stuff: |
| 53 | (when (and (facep 'custom-button-face) | 50 | (when (and (facep 'custom-button-face) |
| @@ -63,8 +60,7 @@ if that value is non-nil." | |||
| 63 | (set (make-local-variable 'widget-push-button-prefix) "") | 60 | (set (make-local-variable 'widget-push-button-prefix) "") |
| 64 | (set (make-local-variable 'widget-push-button-suffix) "") | 61 | (set (make-local-variable 'widget-push-button-suffix) "") |
| 65 | (set (make-local-variable 'widget-link-prefix) "") | 62 | (set (make-local-variable 'widget-link-prefix) "") |
| 66 | (set (make-local-variable 'widget-link-suffix) "")) | 63 | (set (make-local-variable 'widget-link-suffix) ""))) |
| 67 | (gnus-run-mode-hooks 'gnus-custom-mode-hook)) | ||
| 68 | 64 | ||
| 69 | ;;; Group Customization: | 65 | ;;; Group Customization: |
| 70 | 66 | ||
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9533f5819a4..c8945e57531 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -1105,7 +1105,7 @@ When FORCE, rebuild the tool bar." | |||
| 1105 | (set (make-local-variable 'tool-bar-map) map)))) | 1105 | (set (make-local-variable 'tool-bar-map) map)))) |
| 1106 | gnus-group-tool-bar-map) | 1106 | gnus-group-tool-bar-map) |
| 1107 | 1107 | ||
| 1108 | (defun gnus-group-mode () | 1108 | (define-derived-mode gnus-group-mode fundamental-mode "Group" |
| 1109 | "Major mode for reading news. | 1109 | "Major mode for reading news. |
| 1110 | 1110 | ||
| 1111 | All normal editing commands are switched off. | 1111 | All normal editing commands are switched off. |
| @@ -1122,17 +1122,12 @@ For more in-depth information on this mode, read the manual (`\\[gnus-info-find- | |||
| 1122 | The following commands are available: | 1122 | The following commands are available: |
| 1123 | 1123 | ||
| 1124 | \\{gnus-group-mode-map}" | 1124 | \\{gnus-group-mode-map}" |
| 1125 | (interactive) | ||
| 1126 | (kill-all-local-variables) | ||
| 1127 | (when (gnus-visual-p 'group-menu 'menu) | 1125 | (when (gnus-visual-p 'group-menu 'menu) |
| 1128 | (gnus-group-make-menu-bar) | 1126 | (gnus-group-make-menu-bar) |
| 1129 | (gnus-group-make-tool-bar)) | 1127 | (gnus-group-make-tool-bar)) |
| 1130 | (gnus-simplify-mode-line) | 1128 | (gnus-simplify-mode-line) |
| 1131 | (setq major-mode 'gnus-group-mode) | ||
| 1132 | (setq mode-name "Group") | ||
| 1133 | (gnus-group-set-mode-line) | 1129 | (gnus-group-set-mode-line) |
| 1134 | (setq mode-line-process nil) | 1130 | (setq mode-line-process nil) |
| 1135 | (use-local-map gnus-group-mode-map) | ||
| 1136 | (buffer-disable-undo) | 1131 | (buffer-disable-undo) |
| 1137 | (setq truncate-lines t) | 1132 | (setq truncate-lines t) |
| 1138 | (setq buffer-read-only t | 1133 | (setq buffer-read-only t |
| @@ -1143,8 +1138,7 @@ The following commands are available: | |||
| 1143 | (when gnus-use-undo | 1138 | (when gnus-use-undo |
| 1144 | (gnus-undo-mode 1)) | 1139 | (gnus-undo-mode 1)) |
| 1145 | (when gnus-slave | 1140 | (when gnus-slave |
| 1146 | (gnus-slave-mode)) | 1141 | (gnus-slave-mode))) |
| 1147 | (gnus-run-mode-hooks 'gnus-group-mode-hook)) | ||
| 1148 | 1142 | ||
| 1149 | (defun gnus-update-group-mark-positions () | 1143 | (defun gnus-update-group-mark-positions () |
| 1150 | (save-excursion | 1144 | (save-excursion |
| @@ -1193,7 +1187,7 @@ The following commands are available: | |||
| 1193 | 1187 | ||
| 1194 | (defun gnus-group-setup-buffer () | 1188 | (defun gnus-group-setup-buffer () |
| 1195 | (set-buffer (gnus-get-buffer-create gnus-group-buffer)) | 1189 | (set-buffer (gnus-get-buffer-create gnus-group-buffer)) |
| 1196 | (unless (eq major-mode 'gnus-group-mode) | 1190 | (unless (derived-mode-p 'gnus-group-mode) |
| 1197 | (gnus-group-mode))) | 1191 | (gnus-group-mode))) |
| 1198 | 1192 | ||
| 1199 | (defun gnus-group-name-charset (method group) | 1193 | (defun gnus-group-name-charset (method group) |
| @@ -2147,7 +2141,7 @@ be permanent." | |||
| 2147 | 2141 | ||
| 2148 | (defun gnus-group-name-at-point () | 2142 | (defun gnus-group-name-at-point () |
| 2149 | "Return a group name from around point if it exists, or nil." | 2143 | "Return a group name from around point if it exists, or nil." |
| 2150 | (if (eq major-mode 'gnus-group-mode) | 2144 | (if (derived-mode-p 'gnus-group-mode) |
| 2151 | (let ((group (gnus-group-group-name))) | 2145 | (let ((group (gnus-group-group-name))) |
| 2152 | (when group | 2146 | (when group |
| 2153 | (gnus-group-decoded-name group))) | 2147 | (gnus-group-decoded-name group))) |
| @@ -3114,7 +3108,7 @@ If SOLID (the prefix), create a solid group." | |||
| 3114 | (gnus-group-read-ephemeral-group | 3108 | (gnus-group-read-ephemeral-group |
| 3115 | group method t | 3109 | group method t |
| 3116 | (cons (current-buffer) | 3110 | (cons (current-buffer) |
| 3117 | (if (eq major-mode 'gnus-summary-mode) 'summary 'group)))))) | 3111 | (if (derived-mode-p 'gnus-summary-mode) 'summary 'group)))))) |
| 3118 | 3112 | ||
| 3119 | (defvar nnrss-group-alist) | 3113 | (defvar nnrss-group-alist) |
| 3120 | (eval-when-compile | 3114 | (eval-when-compile |
| @@ -3229,7 +3223,7 @@ mail messages or news articles in files that have numeric names." | |||
| 3229 | (unless (gnus-group-read-ephemeral-group | 3223 | (unless (gnus-group-read-ephemeral-group |
| 3230 | name method t | 3224 | name method t |
| 3231 | (cons (current-buffer) | 3225 | (cons (current-buffer) |
| 3232 | (if (eq major-mode 'gnus-summary-mode) | 3226 | (if (derived-mode-p 'gnus-summary-mode) |
| 3233 | 'summary 'group))) | 3227 | 'summary 'group))) |
| 3234 | (error "Couldn't enter %s" dir)))) | 3228 | (error "Couldn't enter %s" dir)))) |
| 3235 | 3229 | ||
| @@ -4319,7 +4313,7 @@ The hook `gnus-suspend-gnus-hook' is called before actually suspending." | |||
| 4319 | (unless (or (eq buf group-buf) | 4313 | (unless (or (eq buf group-buf) |
| 4320 | (eq buf gnus-dribble-buffer) | 4314 | (eq buf gnus-dribble-buffer) |
| 4321 | (with-current-buffer buf | 4315 | (with-current-buffer buf |
| 4322 | (eq major-mode 'message-mode))) | 4316 | (derived-mode-p 'message-mode))) |
| 4323 | (gnus-kill-buffer buf))) | 4317 | (gnus-kill-buffer buf))) |
| 4324 | (setq gnus-backlog-articles nil) | 4318 | (setq gnus-backlog-articles nil) |
| 4325 | (gnus-kill-gnus-frames) | 4319 | (gnus-kill-gnus-frames) |
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index a946a586033..e4e1ec29ae9 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el | |||
| @@ -257,9 +257,9 @@ status will be retrieved from the first matching attendee record." | |||
| 257 | ((string= key "ATTENDEE") (update-attendee-status line)) | 257 | ((string= key "ATTENDEE") (update-attendee-status line)) |
| 258 | ((string= key "SUMMARY") (update-summary line)) | 258 | ((string= key "SUMMARY") (update-summary line)) |
| 259 | ((string= key "DTSTAMP") (update-dtstamp)) | 259 | ((string= key "DTSTAMP") (update-dtstamp)) |
| 260 | ((find key '("ORGANIZER" "DTSTART" "DTEND" | 260 | ((member key '("ORGANIZER" "DTSTART" "DTEND" |
| 261 | "LOCATION" "DURATION" "SEQUENCE" | 261 | "LOCATION" "DURATION" "SEQUENCE" |
| 262 | "RECURRENCE-ID" "UID")) line) | 262 | "RECURRENCE-ID" "UID")) line) |
| 263 | (t nil)))) | 263 | (t nil)))) |
| 264 | (when new-line | 264 | (when new-line |
| 265 | (push new-line reply-event-lines)))))) | 265 | (push new-line reply-event-lines)))))) |
| @@ -816,6 +816,8 @@ is searched." | |||
| 816 | (gnus-icalendar-show-org-agenda | 816 | (gnus-icalendar-show-org-agenda |
| 817 | (with-current-buffer gnus-article-buffer gnus-icalendar-event))) | 817 | (with-current-buffer gnus-article-buffer gnus-icalendar-event))) |
| 818 | 818 | ||
| 819 | (defvar gnus-mime-action-alist) ; gnus-art | ||
| 820 | |||
| 819 | (defun gnus-icalendar-setup () | 821 | (defun gnus-icalendar-setup () |
| 820 | (add-to-list 'mm-inlined-types "text/calendar") | 822 | (add-to-list 'mm-inlined-types "text/calendar") |
| 821 | (add-to-list 'mm-automatic-display "text/calendar") | 823 | (add-to-list 'mm-automatic-display "text/calendar") |
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index b3f06de0868..011288e280b 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el | |||
| @@ -75,20 +75,20 @@ of time." | |||
| 75 | ;;; Gnus Kill File Mode | 75 | ;;; Gnus Kill File Mode |
| 76 | ;;; | 76 | ;;; |
| 77 | 77 | ||
| 78 | (defvar gnus-kill-file-mode-map nil) | 78 | (defvar gnus-kill-file-mode-map |
| 79 | 79 | (let ((map (make-sparse-keymap))) | |
| 80 | (unless gnus-kill-file-mode-map | 80 | (set-keymap-parent map emacs-lisp-mode-map) |
| 81 | (gnus-define-keymap (setq gnus-kill-file-mode-map | 81 | (gnus-define-keymap map |
| 82 | (copy-keymap emacs-lisp-mode-map)) | 82 | "\C-c\C-k\C-s" gnus-kill-file-kill-by-subject |
| 83 | "\C-c\C-k\C-s" gnus-kill-file-kill-by-subject | 83 | "\C-c\C-k\C-a" gnus-kill-file-kill-by-author |
| 84 | "\C-c\C-k\C-a" gnus-kill-file-kill-by-author | 84 | "\C-c\C-k\C-t" gnus-kill-file-kill-by-thread |
| 85 | "\C-c\C-k\C-t" gnus-kill-file-kill-by-thread | 85 | "\C-c\C-k\C-x" gnus-kill-file-kill-by-xref |
| 86 | "\C-c\C-k\C-x" gnus-kill-file-kill-by-xref | 86 | "\C-c\C-a" gnus-kill-file-apply-buffer |
| 87 | "\C-c\C-a" gnus-kill-file-apply-buffer | 87 | "\C-c\C-e" gnus-kill-file-apply-last-sexp |
| 88 | "\C-c\C-e" gnus-kill-file-apply-last-sexp | 88 | "\C-c\C-c" gnus-kill-file-exit) |
| 89 | "\C-c\C-c" gnus-kill-file-exit)) | 89 | map)) |
| 90 | 90 | ||
| 91 | (defun gnus-kill-file-mode () | 91 | (define-derived-mode gnus-kill-file-mode emacs-lisp-mode "Kill" |
| 92 | "Major mode for editing kill files. | 92 | "Major mode for editing kill files. |
| 93 | 93 | ||
| 94 | If you are using this mode - you probably shouldn't. Kill files | 94 | If you are using this mode - you probably shouldn't. Kill files |
| @@ -151,15 +151,7 @@ which are marked as read in the previous Gnus sessions. Marks other | |||
| 151 | than `D' should be used for articles which should really be deleted. | 151 | than `D' should be used for articles which should really be deleted. |
| 152 | 152 | ||
| 153 | Entry to this mode calls emacs-lisp-mode-hook and | 153 | Entry to this mode calls emacs-lisp-mode-hook and |
| 154 | gnus-kill-file-mode-hook with no arguments, if that value is non-nil." | 154 | gnus-kill-file-mode-hook with no arguments, if that value is non-nil.") |
| 155 | (interactive) | ||
| 156 | (kill-all-local-variables) | ||
| 157 | (use-local-map gnus-kill-file-mode-map) | ||
| 158 | (set-syntax-table emacs-lisp-mode-syntax-table) | ||
| 159 | (setq major-mode 'gnus-kill-file-mode) | ||
| 160 | (setq mode-name "Kill") | ||
| 161 | (lisp-mode-variables nil) | ||
| 162 | (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) | ||
| 163 | 155 | ||
| 164 | (defun gnus-kill-file-edit-file (newsgroup) | 156 | (defun gnus-kill-file-edit-file (newsgroup) |
| 165 | "Begin editing a kill file for NEWSGROUP. | 157 | "Begin editing a kill file for NEWSGROUP. |
| @@ -175,10 +167,10 @@ If NEWSGROUP is nil, the global kill file is selected." | |||
| 175 | (let ((buffer (find-file-noselect file))) | 167 | (let ((buffer (find-file-noselect file))) |
| 176 | (cond ((get-buffer-window buffer) | 168 | (cond ((get-buffer-window buffer) |
| 177 | (pop-to-buffer buffer)) | 169 | (pop-to-buffer buffer)) |
| 178 | ((eq major-mode 'gnus-group-mode) | 170 | ((derived-mode-p 'gnus-group-mode) |
| 179 | (gnus-configure-windows 'group) ;Take all windows. | 171 | (gnus-configure-windows 'group) ;Take all windows. |
| 180 | (pop-to-buffer buffer)) | 172 | (pop-to-buffer buffer)) |
| 181 | ((eq major-mode 'gnus-summary-mode) | 173 | ((derived-mode-p 'gnus-summary-mode) |
| 182 | (gnus-configure-windows 'article) | 174 | (gnus-configure-windows 'article) |
| 183 | (pop-to-buffer gnus-article-buffer) | 175 | (pop-to-buffer gnus-article-buffer) |
| 184 | (bury-buffer gnus-article-buffer) | 176 | (bury-buffer gnus-article-buffer) |
| @@ -201,7 +193,7 @@ If NEWSGROUP is nil, the global kill file is selected." | |||
| 201 | ;; REGEXP: The string to kill. | 193 | ;; REGEXP: The string to kill. |
| 202 | (save-excursion | 194 | (save-excursion |
| 203 | (let (string) | 195 | (let (string) |
| 204 | (unless (eq major-mode 'gnus-kill-file-mode) | 196 | (unless (derived-mode-p 'gnus-kill-file-mode) |
| 205 | (gnus-kill-set-kill-buffer)) | 197 | (gnus-kill-set-kill-buffer)) |
| 206 | (unless dont-move | 198 | (unless dont-move |
| 207 | (goto-char (point-max))) | 199 | (goto-char (point-max))) |
| @@ -520,7 +512,7 @@ COMMAND must be a Lisp expression or a string representing a key sequence." | |||
| 520 | (setq kill-list (cdr kill-list)))) | 512 | (setq kill-list (cdr kill-list)))) |
| 521 | (gnus-execute field kill-list command nil (not all)))))) | 513 | (gnus-execute field kill-list command nil (not all)))))) |
| 522 | (switch-to-buffer old-buffer) | 514 | (switch-to-buffer old-buffer) |
| 523 | (when (and (eq major-mode 'gnus-kill-file-mode) regexp (not silent)) | 515 | (when (and (derived-mode-p 'gnus-kill-file-mode) regexp (not silent)) |
| 524 | (gnus-pp-gnus-kill | 516 | (gnus-pp-gnus-kill |
| 525 | (nconc (list 'gnus-kill field | 517 | (nconc (list 'gnus-kill field |
| 526 | (if (consp regexp) (list 'quote regexp) regexp)) | 518 | (if (consp regexp) (list 'quote regexp) regexp)) |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 69774587d80..2f151e570d7 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -244,6 +244,7 @@ For more in-depth information on this mode, read the manual | |||
| 244 | The following commands are available: | 244 | The following commands are available: |
| 245 | 245 | ||
| 246 | \\{gnus-server-mode-map}" | 246 | \\{gnus-server-mode-map}" |
| 247 | ;; FIXME: Use define-derived-mode. | ||
| 247 | (interactive) | 248 | (interactive) |
| 248 | (when (gnus-visual-p 'server-menu 'menu) | 249 | (when (gnus-visual-p 'server-menu 'menu) |
| 249 | (gnus-server-make-menu-bar)) | 250 | (gnus-server-make-menu-bar)) |
| @@ -869,7 +870,7 @@ claim them." | |||
| 869 | (gnus-message 5 "Connecting to %s...done" (nth 1 method)) | 870 | (gnus-message 5 "Connecting to %s...done" (nth 1 method)) |
| 870 | t)))) | 871 | t)))) |
| 871 | 872 | ||
| 872 | (defun gnus-browse-mode () | 873 | (define-derived-mode gnus-browse-mode fundamental-mode "Browse Server" |
| 873 | "Major mode for browsing a foreign server. | 874 | "Major mode for browsing a foreign server. |
| 874 | 875 | ||
| 875 | All normal editing commands are switched off. | 876 | All normal editing commands are switched off. |
| @@ -884,20 +885,14 @@ buffer. | |||
| 884 | 2) `\\[gnus-browse-read-group]' to read a group ephemerally. | 885 | 2) `\\[gnus-browse-read-group]' to read a group ephemerally. |
| 885 | 886 | ||
| 886 | 3) `\\[gnus-browse-exit]' to return to the group buffer." | 887 | 3) `\\[gnus-browse-exit]' to return to the group buffer." |
| 887 | (interactive) | ||
| 888 | (kill-all-local-variables) | ||
| 889 | (when (gnus-visual-p 'browse-menu 'menu) | 888 | (when (gnus-visual-p 'browse-menu 'menu) |
| 890 | (gnus-browse-make-menu-bar)) | 889 | (gnus-browse-make-menu-bar)) |
| 891 | (gnus-simplify-mode-line) | 890 | (gnus-simplify-mode-line) |
| 892 | (setq major-mode 'gnus-browse-mode) | ||
| 893 | (setq mode-name "Browse Server") | ||
| 894 | (setq mode-line-process nil) | 891 | (setq mode-line-process nil) |
| 895 | (use-local-map gnus-browse-mode-map) | ||
| 896 | (buffer-disable-undo) | 892 | (buffer-disable-undo) |
| 897 | (setq truncate-lines t) | 893 | (setq truncate-lines t) |
| 898 | (gnus-set-default-directory) | 894 | (gnus-set-default-directory) |
| 899 | (setq buffer-read-only t) | 895 | (setq buffer-read-only t)) |
| 900 | (gnus-run-mode-hooks 'gnus-browse-mode-hook)) | ||
| 901 | 896 | ||
| 902 | (defun gnus-browse-read-group (&optional no-article number) | 897 | (defun gnus-browse-read-group (&optional no-article number) |
| 903 | "Enter the group at the current line. | 898 | "Enter the group at the current line. |
| @@ -1022,7 +1017,7 @@ doing the deletion." | |||
| 1022 | (defun gnus-browse-exit () | 1017 | (defun gnus-browse-exit () |
| 1023 | "Quit browsing and return to the group buffer." | 1018 | "Quit browsing and return to the group buffer." |
| 1024 | (interactive) | 1019 | (interactive) |
| 1025 | (when (eq major-mode 'gnus-browse-mode) | 1020 | (when (derived-mode-p 'gnus-browse-mode) |
| 1026 | (gnus-kill-buffer (current-buffer))) | 1021 | (gnus-kill-buffer (current-buffer))) |
| 1027 | ;; Insert the newly subscribed groups in the group buffer. | 1022 | ;; Insert the newly subscribed groups in the group buffer. |
| 1028 | (with-current-buffer gnus-group-buffer | 1023 | (with-current-buffer gnus-group-buffer |
diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el index ec24f1f9670..58767cfcc7a 100644 --- a/lisp/gnus/score-mode.el +++ b/lisp/gnus/score-mode.el | |||
| @@ -40,13 +40,13 @@ | |||
| 40 | (defvar gnus-score-edit-exit-function nil | 40 | (defvar gnus-score-edit-exit-function nil |
| 41 | "Function run on exit from the score buffer.") | 41 | "Function run on exit from the score buffer.") |
| 42 | 42 | ||
| 43 | (defvar gnus-score-mode-map nil) | 43 | (defvar gnus-score-mode-map |
| 44 | (unless gnus-score-mode-map | 44 | (let ((map (make-sparse-keymap))) |
| 45 | (setq gnus-score-mode-map (make-sparse-keymap)) | 45 | (set-keymap-parent map emacs-lisp-mode-map) |
| 46 | (set-keymap-parent gnus-score-mode-map emacs-lisp-mode-map) | 46 | (define-key map "\C-c\C-c" 'gnus-score-edit-exit) |
| 47 | (define-key gnus-score-mode-map "\C-c\C-c" 'gnus-score-edit-exit) | 47 | (define-key map "\C-c\C-d" 'gnus-score-edit-insert-date) |
| 48 | (define-key gnus-score-mode-map "\C-c\C-d" 'gnus-score-edit-insert-date) | 48 | (define-key map "\C-c\C-p" 'gnus-score-pretty-print) |
| 49 | (define-key gnus-score-mode-map "\C-c\C-p" 'gnus-score-pretty-print)) | 49 | map)) |
| 50 | 50 | ||
| 51 | (defvar score-mode-syntax-table | 51 | (defvar score-mode-syntax-table |
| 52 | (let ((table (copy-syntax-table lisp-mode-syntax-table))) | 52 | (let ((table (copy-syntax-table lisp-mode-syntax-table))) |
| @@ -58,21 +58,13 @@ | |||
| 58 | (defvar score-mode-coding-system mm-universal-coding-system) | 58 | (defvar score-mode-coding-system mm-universal-coding-system) |
| 59 | 59 | ||
| 60 | ;;;###autoload | 60 | ;;;###autoload |
| 61 | (defun gnus-score-mode () | 61 | (define-derived-mode gnus-score-mode emacs-lisp-mode "Score" |
| 62 | "Mode for editing Gnus score files. | 62 | "Mode for editing Gnus score files. |
| 63 | This mode is an extended emacs-lisp mode. | 63 | This mode is an extended emacs-lisp mode. |
| 64 | 64 | ||
| 65 | \\{gnus-score-mode-map}" | 65 | \\{gnus-score-mode-map}" |
| 66 | (interactive) | ||
| 67 | (kill-all-local-variables) | ||
| 68 | (use-local-map gnus-score-mode-map) | ||
| 69 | (gnus-score-make-menu-bar) | 66 | (gnus-score-make-menu-bar) |
| 70 | (set-syntax-table score-mode-syntax-table) | 67 | (make-local-variable 'gnus-score-edit-exit-function)) |
| 71 | (setq major-mode 'gnus-score-mode) | ||
| 72 | (setq mode-name "Score") | ||
| 73 | (lisp-mode-variables nil) | ||
| 74 | (make-local-variable 'gnus-score-edit-exit-function) | ||
| 75 | (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) | ||
| 76 | 68 | ||
| 77 | (defun gnus-score-make-menu-bar () | 69 | (defun gnus-score-make-menu-bar () |
| 78 | (unless (boundp 'gnus-score-menu) | 70 | (unless (boundp 'gnus-score-menu) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index ce29505d6f2..8356a186f13 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -156,7 +156,7 @@ elisp byte-compiler." | |||
| 156 | (null buffer-file-name)) | 156 | (null buffer-file-name)) |
| 157 | italic) | 157 | italic) |
| 158 | (30 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face) | 158 | (30 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face) |
| 159 | (35 (eq major-mode 'dired-mode) font-lock-function-name-face)) | 159 | (35 (derived-mode-p 'dired-mode) font-lock-function-name-face)) |
| 160 | "An alist describing how to fontify buffers. | 160 | "An alist describing how to fontify buffers. |
| 161 | Each element should be of the form (PRIORITY FORM FACE), where | 161 | Each element should be of the form (PRIORITY FORM FACE), where |
| 162 | PRIORITY is an integer, FORM is an arbitrary form to evaluate in the | 162 | PRIORITY is an integer, FORM is an arbitrary form to evaluate in the |
| @@ -2358,7 +2358,7 @@ FORMATS is the value to use for `ibuffer-formats'. | |||
| 2358 | ;; We switch to the buffer's window in order to be able | 2358 | ;; We switch to the buffer's window in order to be able |
| 2359 | ;; to modify the value of point | 2359 | ;; to modify the value of point |
| 2360 | (select-window (get-buffer-window buf 0)) | 2360 | (select-window (get-buffer-window buf 0)) |
| 2361 | (or (eq major-mode 'ibuffer-mode) | 2361 | (or (derived-mode-p 'ibuffer-mode) |
| 2362 | (ibuffer-mode)) | 2362 | (ibuffer-mode)) |
| 2363 | (setq ibuffer-restore-window-config-on-quit other-window-p) | 2363 | (setq ibuffer-restore-window-config-on-quit other-window-p) |
| 2364 | (when shrink | 2364 | (when shrink |
| @@ -2383,7 +2383,7 @@ FORMATS is the value to use for `ibuffer-formats'. | |||
| 2383 | (message "Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help")))))) | 2383 | (message "Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help")))))) |
| 2384 | 2384 | ||
| 2385 | (put 'ibuffer-mode 'mode-class 'special) | 2385 | (put 'ibuffer-mode 'mode-class 'special) |
| 2386 | (defun ibuffer-mode () | 2386 | (define-derived-mode ibuffer-mode special-mode "IBuffer" |
| 2387 | "A major mode for viewing a list of buffers. | 2387 | "A major mode for viewing a list of buffers. |
| 2388 | In Ibuffer, you can conveniently perform many operations on the | 2388 | In Ibuffer, you can conveniently perform many operations on the |
| 2389 | currently open buffers, in addition to filtering your view to a | 2389 | currently open buffers, in addition to filtering your view to a |
| @@ -2564,10 +2564,6 @@ filter groups are displayed in this order of precedence. | |||
| 2564 | You may rearrange filter groups by using the regular | 2564 | You may rearrange filter groups by using the regular |
| 2565 | '\\[ibuffer-kill-line]' and '\\[ibuffer-yank]' pair. Yanked groups | 2565 | '\\[ibuffer-kill-line]' and '\\[ibuffer-yank]' pair. Yanked groups |
| 2566 | will be inserted before the group at point." | 2566 | will be inserted before the group at point." |
| 2567 | (kill-all-local-variables) | ||
| 2568 | (use-local-map ibuffer-mode-map) | ||
| 2569 | (setq major-mode 'ibuffer-mode) | ||
| 2570 | (setq mode-name "Ibuffer") | ||
| 2571 | ;; Include state info next to the mode name. | 2567 | ;; Include state info next to the mode name. |
| 2572 | (set (make-local-variable 'mode-line-process) | 2568 | (set (make-local-variable 'mode-line-process) |
| 2573 | '(" by " | 2569 | '(" by " |
| @@ -2627,13 +2623,12 @@ will be inserted before the group at point." | |||
| 2627 | (ibuffer-update-format) | 2623 | (ibuffer-update-format) |
| 2628 | (when ibuffer-default-directory | 2624 | (when ibuffer-default-directory |
| 2629 | (setq default-directory ibuffer-default-directory)) | 2625 | (setq default-directory ibuffer-default-directory)) |
| 2630 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) | 2626 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)) |
| 2631 | (run-mode-hooks 'ibuffer-mode-hook)) | ||
| 2632 | 2627 | ||
| 2633 | 2628 | ||
| 2634 | ;;; Start of automatically extracted autoloads. | 2629 | ;;; Start of automatically extracted autoloads. |
| 2635 | 2630 | ||
| 2636 | ;;;### (autoloads nil "ibuf-ext" "ibuf-ext.el" "d06b2735a74954e0c6922a811de7608c") | 2631 | ;;;### (autoloads nil "ibuf-ext" "ibuf-ext.el" "85795a4045d20654599b73b88e8e1bc9") |
| 2637 | ;;; Generated autoloads from ibuf-ext.el | 2632 | ;;; Generated autoloads from ibuf-ext.el |
| 2638 | 2633 | ||
| 2639 | (autoload 'ibuffer-auto-mode "ibuf-ext" "\ | 2634 | (autoload 'ibuffer-auto-mode "ibuf-ext" "\ |
diff --git a/lisp/info.el b/lisp/info.el index 65cd7eddcfd..93442689319 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -790,7 +790,7 @@ See a list of available Info commands in `Info-mode'." | |||
| 790 | 790 | ||
| 791 | (defun info-setup (file-or-node buffer) | 791 | (defun info-setup (file-or-node buffer) |
| 792 | "Display Info node FILE-OR-NODE in BUFFER." | 792 | "Display Info node FILE-OR-NODE in BUFFER." |
| 793 | (if (and buffer (not (eq major-mode 'Info-mode))) | 793 | (if (and buffer (not (derived-mode-p 'Info-mode))) |
| 794 | (Info-mode)) | 794 | (Info-mode)) |
| 795 | (if file-or-node | 795 | (if file-or-node |
| 796 | ;; If argument already contains parentheses, don't add another set | 796 | ;; If argument already contains parentheses, don't add another set |
| @@ -931,7 +931,7 @@ STRICT-CASE is non-nil)." | |||
| 931 | (info-initialize) | 931 | (info-initialize) |
| 932 | (setq filename (Info-find-file filename)) | 932 | (setq filename (Info-find-file filename)) |
| 933 | ;; Go into Info buffer. | 933 | ;; Go into Info buffer. |
| 934 | (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) | 934 | (or (derived-mode-p 'Info-mode) (switch-to-buffer "*info*")) |
| 935 | ;; Record the node we are leaving, if we were in one. | 935 | ;; Record the node we are leaving, if we were in one. |
| 936 | (and (not no-going-back) | 936 | (and (not no-going-back) |
| 937 | Info-current-file | 937 | Info-current-file |
| @@ -961,7 +961,7 @@ otherwise, that defaults to `Top'." | |||
| 961 | "Go to an Info node FILENAME and NODENAME, re-reading disk contents. | 961 | "Go to an Info node FILENAME and NODENAME, re-reading disk contents. |
| 962 | When *info* is already displaying FILENAME and NODENAME, the window position | 962 | When *info* is already displaying FILENAME and NODENAME, the window position |
| 963 | is preserved, if possible." | 963 | is preserved, if possible." |
| 964 | (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) | 964 | (or (derived-mode-p 'Info-mode) (switch-to-buffer "*info*")) |
| 965 | (let ((old-filename Info-current-file) | 965 | (let ((old-filename Info-current-file) |
| 966 | (old-nodename Info-current-node) | 966 | (old-nodename Info-current-node) |
| 967 | (window-selected (eq (selected-window) (get-buffer-window))) | 967 | (window-selected (eq (selected-window) (get-buffer-window))) |
| @@ -1065,7 +1065,7 @@ is non-nil)." | |||
| 1065 | 1065 | ||
| 1066 | (defun Info-find-node-2 (filename nodename &optional no-going-back strict-case) | 1066 | (defun Info-find-node-2 (filename nodename &optional no-going-back strict-case) |
| 1067 | (buffer-disable-undo (current-buffer)) | 1067 | (buffer-disable-undo (current-buffer)) |
| 1068 | (or (eq major-mode 'Info-mode) | 1068 | (or (derived-mode-p 'Info-mode) |
| 1069 | (Info-mode)) | 1069 | (Info-mode)) |
| 1070 | (widen) | 1070 | (widen) |
| 1071 | (setq Info-current-node nil) | 1071 | (setq Info-current-node nil) |
| @@ -2212,7 +2212,7 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat." | |||
| 2212 | (interactive) | 2212 | (interactive) |
| 2213 | ;; In case another window is currently selected | 2213 | ;; In case another window is currently selected |
| 2214 | (save-window-excursion | 2214 | (save-window-excursion |
| 2215 | (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) | 2215 | (or (derived-mode-p 'Info-mode) (switch-to-buffer "*info*")) |
| 2216 | (Info-goto-node (Info-extract-pointer "next")))) | 2216 | (Info-goto-node (Info-extract-pointer "next")))) |
| 2217 | 2217 | ||
| 2218 | (defun Info-prev () | 2218 | (defun Info-prev () |
| @@ -2220,7 +2220,7 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat." | |||
| 2220 | (interactive) | 2220 | (interactive) |
| 2221 | ;; In case another window is currently selected | 2221 | ;; In case another window is currently selected |
| 2222 | (save-window-excursion | 2222 | (save-window-excursion |
| 2223 | (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) | 2223 | (or (derived-mode-p 'Info-mode) (switch-to-buffer "*info*")) |
| 2224 | (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))) | 2224 | (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))) |
| 2225 | 2225 | ||
| 2226 | (defun Info-up (&optional same-file) | 2226 | (defun Info-up (&optional same-file) |
| @@ -2229,7 +2229,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 2229 | (interactive) | 2229 | (interactive) |
| 2230 | ;; In case another window is currently selected | 2230 | ;; In case another window is currently selected |
| 2231 | (save-window-excursion | 2231 | (save-window-excursion |
| 2232 | (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) | 2232 | (or (derived-mode-p 'Info-mode) (switch-to-buffer "*info*")) |
| 2233 | (let ((old-node Info-current-node) | 2233 | (let ((old-node Info-current-node) |
| 2234 | (old-file Info-current-file) | 2234 | (old-file Info-current-file) |
| 2235 | (node (Info-extract-pointer "up")) p) | 2235 | (node (Info-extract-pointer "up")) p) |
| @@ -4082,7 +4082,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'." | |||
| 4082 | (defun Info-menu-update () | 4082 | (defun Info-menu-update () |
| 4083 | "Update the Info menu for the current node." | 4083 | "Update the Info menu for the current node." |
| 4084 | (condition-case nil | 4084 | (condition-case nil |
| 4085 | (if (or (not (eq major-mode 'Info-mode)) | 4085 | (if (or (not (derived-mode-p 'Info-mode)) |
| 4086 | (equal (list Info-current-file Info-current-node) | 4086 | (equal (list Info-current-file Info-current-node) |
| 4087 | Info-menu-last-node)) | 4087 | Info-menu-last-node)) |
| 4088 | () | 4088 | () |
| @@ -4285,7 +4285,7 @@ Advanced commands: | |||
| 4285 | ;; When an Info buffer is killed, make sure the associated tags buffer | 4285 | ;; When an Info buffer is killed, make sure the associated tags buffer |
| 4286 | ;; is killed too. | 4286 | ;; is killed too. |
| 4287 | (defun Info-kill-buffer () | 4287 | (defun Info-kill-buffer () |
| 4288 | (and (eq major-mode 'Info-mode) | 4288 | (and (derived-mode-p 'Info-mode) |
| 4289 | Info-tag-table-buffer | 4289 | Info-tag-table-buffer |
| 4290 | (kill-buffer Info-tag-table-buffer))) | 4290 | (kill-buffer Info-tag-table-buffer))) |
| 4291 | 4291 | ||
| @@ -4302,10 +4302,11 @@ Advanced commands: | |||
| 4302 | (copy-marker (marker-position m))) | 4302 | (copy-marker (marker-position m))) |
| 4303 | (make-marker)))))) | 4303 | (make-marker)))))) |
| 4304 | 4304 | ||
| 4305 | (defvar Info-edit-map (let ((map (make-sparse-keymap))) | 4305 | (define-obsolete-variable-alias 'Info-edit-map 'Info-edit-mode-map "24.1") |
| 4306 | (set-keymap-parent map text-mode-map) | 4306 | (defvar Info-edit-mode-map (let ((map (make-sparse-keymap))) |
| 4307 | (define-key map "\C-c\C-c" 'Info-cease-edit) | 4307 | (set-keymap-parent map text-mode-map) |
| 4308 | map) | 4308 | (define-key map "\C-c\C-c" 'Info-cease-edit) |
| 4309 | map) | ||
| 4309 | "Local keymap used within `e' command of Info.") | 4310 | "Local keymap used within `e' command of Info.") |
| 4310 | 4311 | ||
| 4311 | (make-obsolete-variable 'Info-edit-map | 4312 | (make-obsolete-variable 'Info-edit-map |
| @@ -4315,19 +4316,14 @@ Advanced commands: | |||
| 4315 | ;; Info-edit mode is suitable only for specially formatted data. | 4316 | ;; Info-edit mode is suitable only for specially formatted data. |
| 4316 | (put 'Info-edit-mode 'mode-class 'special) | 4317 | (put 'Info-edit-mode 'mode-class 'special) |
| 4317 | 4318 | ||
| 4318 | (defun Info-edit-mode () | 4319 | (define-derived-mode Info-edit-mode text-mode "Info Edit" |
| 4319 | "Major mode for editing the contents of an Info node. | 4320 | "Major mode for editing the contents of an Info node. |
| 4320 | Like text mode with the addition of `Info-cease-edit' | 4321 | Like text mode with the addition of `Info-cease-edit' |
| 4321 | which returns to Info mode for browsing. | 4322 | which returns to Info mode for browsing. |
| 4322 | \\{Info-edit-map}" | 4323 | \\{Info-edit-map}" |
| 4323 | (use-local-map Info-edit-map) | ||
| 4324 | (setq major-mode 'Info-edit-mode) | ||
| 4325 | (setq mode-name "Info Edit") | ||
| 4326 | (kill-local-variable 'mode-line-buffer-identification) | ||
| 4327 | (setq buffer-read-only nil) | 4324 | (setq buffer-read-only nil) |
| 4328 | (force-mode-line-update) | 4325 | (force-mode-line-update) |
| 4329 | (buffer-enable-undo (current-buffer)) | 4326 | (buffer-enable-undo (current-buffer))) |
| 4330 | (run-mode-hooks 'Info-edit-mode-hook)) | ||
| 4331 | 4327 | ||
| 4332 | (make-obsolete 'Info-edit-mode | 4328 | (make-obsolete 'Info-edit-mode |
| 4333 | "editing Info nodes by hand is not recommended." "24.4") | 4329 | "editing Info nodes by hand is not recommended." "24.4") |
| @@ -4352,11 +4348,7 @@ This feature will be removed in future.") | |||
| 4352 | (and (buffer-modified-p) | 4348 | (and (buffer-modified-p) |
| 4353 | (y-or-n-p "Save the file? ") | 4349 | (y-or-n-p "Save the file? ") |
| 4354 | (save-buffer)) | 4350 | (save-buffer)) |
| 4355 | (use-local-map Info-mode-map) | 4351 | (Info-mode) |
| 4356 | (setq major-mode 'Info-mode) | ||
| 4357 | (setq mode-name "Info") | ||
| 4358 | (Info-set-mode-line) | ||
| 4359 | (setq buffer-read-only t) | ||
| 4360 | (force-mode-line-update) | 4352 | (force-mode-line-update) |
| 4361 | (and (marker-position Info-tag-table-marker) | 4353 | (and (marker-position Info-tag-table-marker) |
| 4362 | (buffer-modified-p) | 4354 | (buffer-modified-p) |
| @@ -4469,7 +4461,7 @@ COMMAND must be a symbol or string." | |||
| 4469 | ;; Get Info running, and pop to it in another window. | 4461 | ;; Get Info running, and pop to it in another window. |
| 4470 | (save-window-excursion | 4462 | (save-window-excursion |
| 4471 | (info)) | 4463 | (info)) |
| 4472 | (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) | 4464 | (or (derived-mode-p 'Info-mode) (pop-to-buffer "*info*")) |
| 4473 | ;; Bind Info-history to nil, to prevent the last Index node | 4465 | ;; Bind Info-history to nil, to prevent the last Index node |
| 4474 | ;; visited by Info-find-emacs-command-nodes from being | 4466 | ;; visited by Info-find-emacs-command-nodes from being |
| 4475 | ;; pushed onto the history. | 4467 | ;; pushed onto the history. |
| @@ -5133,7 +5125,7 @@ INDENT is the current indentation depth." | |||
| 5133 | NODESPEC is a string of the form: (file)node." | 5125 | NODESPEC is a string of the form: (file)node." |
| 5134 | ;; Set up a buffer we can use to fake-out Info. | 5126 | ;; Set up a buffer we can use to fake-out Info. |
| 5135 | (with-current-buffer (get-buffer-create " *info-browse-tmp*") | 5127 | (with-current-buffer (get-buffer-create " *info-browse-tmp*") |
| 5136 | (if (not (equal major-mode 'Info-mode)) | 5128 | (if (not (derived-mode-p 'Info-mode)) |
| 5137 | (Info-mode)) | 5129 | (Info-mode)) |
| 5138 | ;; Get the node into this buffer | 5130 | ;; Get the node into this buffer |
| 5139 | (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" nodespec)) | 5131 | (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" nodespec)) |
diff --git a/lisp/locate.el b/lisp/locate.el index ab0417070e7..99a99853da9 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -95,7 +95,7 @@ | |||
| 95 | ;; | 95 | ;; |
| 96 | ;; (defadvice dired-make-relative (before set-no-error activate) | 96 | ;; (defadvice dired-make-relative (before set-no-error activate) |
| 97 | ;; "For locate mode and Windows, don't return errors" | 97 | ;; "For locate mode and Windows, don't return errors" |
| 98 | ;; (if (and (eq major-mode 'locate-mode) | 98 | ;; (if (and (derived-mode-p 'locate-mode) |
| 99 | ;; (memq system-type '(windows-nt ms-dos))) | 99 | ;; (memq system-type '(windows-nt ms-dos))) |
| 100 | ;; (ad-set-arg 2 t) | 100 | ;; (ad-set-arg 2 t) |
| 101 | ;; )) | 101 | ;; )) |
| @@ -448,7 +448,7 @@ file name or is inside a subdirectory." | |||
| 448 | ;; Define a mode for locate | 448 | ;; Define a mode for locate |
| 449 | ;; Default directory is set to "/" so that dired commands, which | 449 | ;; Default directory is set to "/" so that dired commands, which |
| 450 | ;; expect to be in a tree, will work properly | 450 | ;; expect to be in a tree, will work properly |
| 451 | (defun locate-mode () | 451 | (define-derived-mode locate-mode special-mode "Locate" |
| 452 | "Major mode for the `*Locate*' buffer made by \\[locate]. | 452 | "Major mode for the `*Locate*' buffer made by \\[locate]. |
| 453 | \\<locate-mode-map>\ | 453 | \\<locate-mode-map>\ |
| 454 | In that buffer, you can use almost all the usual dired bindings. | 454 | In that buffer, you can use almost all the usual dired bindings. |
| @@ -463,39 +463,31 @@ Specific `locate-mode' commands, such as \\[locate-find-directory], | |||
| 463 | do not work in subdirectories. | 463 | do not work in subdirectories. |
| 464 | 464 | ||
| 465 | \\{locate-mode-map}" | 465 | \\{locate-mode-map}" |
| 466 | ;; Not to be called interactively. | ||
| 467 | (kill-all-local-variables) | ||
| 468 | ;; Avoid clobbering this variable | 466 | ;; Avoid clobbering this variable |
| 469 | (make-local-variable 'dired-subdir-alist) | 467 | (make-local-variable 'dired-subdir-alist) |
| 470 | (use-local-map locate-mode-map) | 468 | (setq default-directory "/" |
| 471 | (setq major-mode 'locate-mode | ||
| 472 | mode-name "Locate" | ||
| 473 | default-directory "/" | ||
| 474 | buffer-read-only t | 469 | buffer-read-only t |
| 475 | selective-display t) | 470 | selective-display t) |
| 476 | (dired-alist-add-1 default-directory (point-min-marker)) | 471 | (dired-alist-add-1 default-directory (point-min-marker)) |
| 477 | (set (make-local-variable 'dired-directory) "/") | 472 | (set (make-local-variable 'dired-directory) "/") |
| 478 | (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) | 473 | (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) |
| 479 | (setq dired-switches-alist nil) | 474 | (setq dired-switches-alist nil) |
| 480 | (make-local-variable 'directory-listing-before-filename-regexp) | ||
| 481 | ;; This should support both Unix and Windoze style names | 475 | ;; This should support both Unix and Windoze style names |
| 482 | (setq directory-listing-before-filename-regexp | 476 | (setq-local directory-listing-before-filename-regexp |
| 483 | (concat "^.\\(" | 477 | (concat "^.\\(" |
| 484 | (make-string (1- locate-filename-indentation) ?\s) | 478 | (make-string (1- locate-filename-indentation) ?\s) |
| 485 | "\\)\\|" | 479 | "\\)\\|" |
| 486 | (default-value 'directory-listing-before-filename-regexp))) | 480 | (default-value |
| 487 | (make-local-variable 'dired-actual-switches) | 481 | 'directory-listing-before-filename-regexp))) |
| 488 | (setq dired-actual-switches "") | 482 | (setq-local dired-actual-switches "") |
| 489 | (make-local-variable 'dired-permission-flags-regexp) | 483 | (setq-local dired-permission-flags-regexp |
| 490 | (setq dired-permission-flags-regexp | 484 | (concat "^.\\(" |
| 491 | (concat "^.\\(" | 485 | (make-string (1- locate-filename-indentation) ?\s) |
| 492 | (make-string (1- locate-filename-indentation) ?\s) | 486 | "\\)\\|" |
| 493 | "\\)\\|" | 487 | (default-value 'dired-permission-flags-regexp))) |
| 494 | (default-value 'dired-permission-flags-regexp))) | 488 | |
| 495 | (make-local-variable 'revert-buffer-function) | 489 | (setq-local revert-buffer-function #'locate-update) |
| 496 | (setq revert-buffer-function 'locate-update) | 490 | (setq-local page-delimiter "\n\n")) |
| 497 | (set (make-local-variable 'page-delimiter) "\n\n") | ||
| 498 | (run-mode-hooks 'locate-mode-hook)) | ||
| 499 | (put 'locate-mode 'derived-mode-parent 'dired-mode) | 491 | (put 'locate-mode 'derived-mode-parent 'dired-mode) |
| 500 | 492 | ||
| 501 | (defun locate-do-setup (search-string) | 493 | (defun locate-do-setup (search-string) |
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 5e01a7149a8..b2618ef42db 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el | |||
| @@ -344,19 +344,13 @@ nil." | |||
| 344 | (interactive) | 344 | (interactive) |
| 345 | (kill-buffer mspools-buffer)) | 345 | (kill-buffer mspools-buffer)) |
| 346 | 346 | ||
| 347 | (defun mspools-mode () | 347 | (define-derived-mode mspools-mode special-mode "MSpools" |
| 348 | "Major mode for output from mspools-show. | 348 | "Major mode for output from mspools-show. |
| 349 | \\<mspools-mode-map>Move point to one of the items in this buffer, then use | 349 | \\<mspools-mode-map>Move point to one of the items in this buffer, then use |
| 350 | \\[mspools-visit-spool] to go to the spool that the current line refers to. | 350 | \\[mspools-visit-spool] to go to the spool that the current line refers to. |
| 351 | \\[revert-buffer] to regenerate the list of spools. | 351 | \\[revert-buffer] to regenerate the list of spools. |
| 352 | \\{mspools-mode-map}" | 352 | \\{mspools-mode-map}" |
| 353 | (kill-all-local-variables) | 353 | (setq-local revert-buffer-function 'mspools-revert-buffer)) |
| 354 | (make-local-variable 'revert-buffer-function) | ||
| 355 | (setq revert-buffer-function 'mspools-revert-buffer) | ||
| 356 | (use-local-map mspools-mode-map) | ||
| 357 | (setq major-mode 'mspools-mode) | ||
| 358 | (setq mode-name "MSpools") | ||
| 359 | (run-mode-hooks 'mspools-mode-hook)) | ||
| 360 | 354 | ||
| 361 | (defun mspools-get-spool-files () | 355 | (defun mspools-get-spool-files () |
| 362 | "Find the list of spool files and display them in *spools* buffer." | 356 | "Find the list of spool files and display them in *spools* buffer." |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index aa244ddae81..bb4801a523d 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4768,7 +4768,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. | |||
| 4768 | 4768 | ||
| 4769 | ;;;*** | 4769 | ;;;*** |
| 4770 | 4770 | ||
| 4771 | ;;;### (autoloads nil "rmailsum" "rmailsum.el" "a9b3bbd9b82dd566524a1209b5cdb7dd") | 4771 | ;;;### (autoloads nil "rmailsum" "rmailsum.el" "9005bd5da3e21d1cc173e86fd9fec3c9") |
| 4772 | ;;; Generated autoloads from rmailsum.el | 4772 | ;;; Generated autoloads from rmailsum.el |
| 4773 | 4773 | ||
| 4774 | (autoload 'rmail-summary "rmailsum" "\ | 4774 | (autoload 'rmail-summary "rmailsum" "\ |
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 3a0a7824ad8..cced2231522 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -408,7 +408,7 @@ If FUNCTION is nil, includes all messages." | |||
| 408 | (unless rmail-buffer | 408 | (unless rmail-buffer |
| 409 | (error "No RMAIL buffer found")) | 409 | (error "No RMAIL buffer found")) |
| 410 | (let (mesg was-in-summary sumbuf) | 410 | (let (mesg was-in-summary sumbuf) |
| 411 | (if (eq major-mode 'rmail-summary-mode) | 411 | (if (derived-mode-p 'rmail-summary-mode) |
| 412 | (setq was-in-summary t)) | 412 | (setq was-in-summary t)) |
| 413 | (with-current-buffer rmail-buffer | 413 | (with-current-buffer rmail-buffer |
| 414 | (setq rmail-summary-buffer (rmail-new-summary-1 desc redo function args) | 414 | (setq rmail-summary-buffer (rmail-new-summary-1 desc redo function args) |
| @@ -1035,7 +1035,7 @@ Optional prefix ARG means undelete ARG previous messages." | |||
| 1035 | ;; Rmail Summary mode is suitable only for specially formatted data. | 1035 | ;; Rmail Summary mode is suitable only for specially formatted data. |
| 1036 | (put 'rmail-summary-mode 'mode-class 'special) | 1036 | (put 'rmail-summary-mode 'mode-class 'special) |
| 1037 | 1037 | ||
| 1038 | (defun rmail-summary-mode () | 1038 | (define-derived-mode rmail-summary-mode special-mode "RMAIL Summary" |
| 1039 | "Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary]. | 1039 | "Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary]. |
| 1040 | As commands are issued in the summary buffer, they are applied to the | 1040 | As commands are issued in the summary buffer, they are applied to the |
| 1041 | corresponding mail messages in the rmail buffer. | 1041 | corresponding mail messages in the rmail buffer. |
| @@ -1058,10 +1058,6 @@ Commands for sorting the summary: | |||
| 1058 | \\[rmail-summary-sort-by-correspondent] Sort by correspondent. | 1058 | \\[rmail-summary-sort-by-correspondent] Sort by correspondent. |
| 1059 | \\[rmail-summary-sort-by-lines] Sort by lines. | 1059 | \\[rmail-summary-sort-by-lines] Sort by lines. |
| 1060 | \\[rmail-summary-sort-by-labels] Sort by labels." | 1060 | \\[rmail-summary-sort-by-labels] Sort by labels." |
| 1061 | (interactive) | ||
| 1062 | (kill-all-local-variables) | ||
| 1063 | (setq major-mode 'rmail-summary-mode) | ||
| 1064 | (setq mode-name "RMAIL Summary") | ||
| 1065 | (setq truncate-lines t) | 1061 | (setq truncate-lines t) |
| 1066 | (setq buffer-read-only t) | 1062 | (setq buffer-read-only t) |
| 1067 | (set-syntax-table text-mode-syntax-table) | 1063 | (set-syntax-table text-mode-syntax-table) |
| @@ -1074,8 +1070,7 @@ Commands for sorting the summary: | |||
| 1074 | (make-local-variable 'revert-buffer-function) | 1070 | (make-local-variable 'revert-buffer-function) |
| 1075 | (make-local-variable 'font-lock-defaults) | 1071 | (make-local-variable 'font-lock-defaults) |
| 1076 | (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) | 1072 | (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) |
| 1077 | (rmail-summary-enable) | 1073 | (rmail-summary-enable)) |
| 1078 | (run-mode-hooks 'rmail-summary-mode-hook)) | ||
| 1079 | 1074 | ||
| 1080 | ;; Summary features need to be disabled during edit mode. | 1075 | ;; Summary features need to be disabled during edit mode. |
| 1081 | (defun rmail-summary-disable () | 1076 | (defun rmail-summary-disable () |
diff --git a/lisp/man.el b/lisp/man.el index 34131f43692..9eb0ccd719a 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -413,7 +413,7 @@ Otherwise, the value is whatever the function | |||
| 413 | 413 | ||
| 414 | (defvar Man-topic-history nil "Topic read history.") | 414 | (defvar Man-topic-history nil "Topic read history.") |
| 415 | 415 | ||
| 416 | (defvar man-mode-syntax-table | 416 | (defvar Man-mode-syntax-table |
| 417 | (let ((table (copy-syntax-table (standard-syntax-table)))) | 417 | (let ((table (copy-syntax-table (standard-syntax-table)))) |
| 418 | (modify-syntax-entry ?. "w" table) | 418 | (modify-syntax-entry ?. "w" table) |
| 419 | (modify-syntax-entry ?_ "w" table) | 419 | (modify-syntax-entry ?_ "w" table) |
| @@ -1350,7 +1350,7 @@ manpage command." | |||
| 1350 | 1350 | ||
| 1351 | (put 'Man-mode 'mode-class 'special) | 1351 | (put 'Man-mode 'mode-class 'special) |
| 1352 | 1352 | ||
| 1353 | (defun Man-mode () | 1353 | (define-derived-mode Man-mode fundamental-mode "Man" |
| 1354 | "A mode for browsing Un*x manual pages. | 1354 | "A mode for browsing Un*x manual pages. |
| 1355 | 1355 | ||
| 1356 | The following man commands are available in the buffer. Try | 1356 | The following man commands are available in the buffer. Try |
| @@ -1387,11 +1387,7 @@ The following variables may be of some use. Try | |||
| 1387 | 1387 | ||
| 1388 | The following key bindings are currently in effect in the buffer: | 1388 | The following key bindings are currently in effect in the buffer: |
| 1389 | \\{Man-mode-map}" | 1389 | \\{Man-mode-map}" |
| 1390 | (interactive) | 1390 | (setq buffer-auto-save-file-name nil |
| 1391 | (kill-all-local-variables) | ||
| 1392 | (setq major-mode 'Man-mode | ||
| 1393 | mode-name "Man" | ||
| 1394 | buffer-auto-save-file-name nil | ||
| 1395 | mode-line-buffer-identification | 1391 | mode-line-buffer-identification |
| 1396 | (list (default-value 'mode-line-buffer-identification) | 1392 | (list (default-value 'mode-line-buffer-identification) |
| 1397 | " {" 'Man-page-mode-string "}") | 1393 | " {" 'Man-page-mode-string "}") |
| @@ -1399,8 +1395,6 @@ The following key bindings are currently in effect in the buffer: | |||
| 1399 | buffer-read-only t) | 1395 | buffer-read-only t) |
| 1400 | (buffer-disable-undo) | 1396 | (buffer-disable-undo) |
| 1401 | (auto-fill-mode -1) | 1397 | (auto-fill-mode -1) |
| 1402 | (use-local-map Man-mode-map) | ||
| 1403 | (set-syntax-table man-mode-syntax-table) | ||
| 1404 | (setq imenu-generic-expression (list (list nil Man-heading-regexp 0))) | 1398 | (setq imenu-generic-expression (list (list nil Man-heading-regexp 0))) |
| 1405 | (set (make-local-variable 'outline-regexp) Man-heading-regexp) | 1399 | (set (make-local-variable 'outline-regexp) Man-heading-regexp) |
| 1406 | (set (make-local-variable 'outline-level) (lambda () 1)) | 1400 | (set (make-local-variable 'outline-level) (lambda () 1)) |
| @@ -1409,8 +1403,7 @@ The following key bindings are currently in effect in the buffer: | |||
| 1409 | (Man-build-page-list) | 1403 | (Man-build-page-list) |
| 1410 | (Man-strip-page-headers) | 1404 | (Man-strip-page-headers) |
| 1411 | (Man-unindent) | 1405 | (Man-unindent) |
| 1412 | (Man-goto-page 1 t) | 1406 | (Man-goto-page 1 t)) |
| 1413 | (run-mode-hooks 'Man-mode-hook)) | ||
| 1414 | 1407 | ||
| 1415 | (defsubst Man-build-section-alist () | 1408 | (defsubst Man-build-section-alist () |
| 1416 | "Build the list of manpage sections." | 1409 | "Build the list of manpage sections." |
diff --git a/lisp/mpc.el b/lisp/mpc.el index 825eb3c05d4..bd61c261246 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -491,10 +491,9 @@ to call FUN for any change whatsoever.") | |||
| 491 | (cancel-timer mpc--status-timer) | 491 | (cancel-timer mpc--status-timer) |
| 492 | (setq mpc--status-timer nil))) | 492 | (setq mpc--status-timer nil))) |
| 493 | (defun mpc--status-timer-run () | 493 | (defun mpc--status-timer-run () |
| 494 | (condition-case err | 494 | (with-demoted-errors "MPC: %s" |
| 495 | (when (process-get (mpc-proc) 'ready) | 495 | (when (process-get (mpc-proc) 'ready) |
| 496 | (with-local-quit (mpc-status-refresh))) | 496 | (with-local-quit (mpc-status-refresh))))) |
| 497 | (error (message "MPC: %s" err)))) | ||
| 498 | 497 | ||
| 499 | (defvar mpc--status-idle-timer nil) | 498 | (defvar mpc--status-idle-timer nil) |
| 500 | (defun mpc--status-idle-timer-start () | 499 | (defun mpc--status-idle-timer-start () |
| @@ -520,9 +519,8 @@ to call FUN for any change whatsoever.") | |||
| 520 | (run-with-idle-timer 10 t 'mpc--status-idle-timer-run)))) | 519 | (run-with-idle-timer 10 t 'mpc--status-idle-timer-run)))) |
| 521 | (defun mpc--status-idle-timer-run () | 520 | (defun mpc--status-idle-timer-run () |
| 522 | (when (process-get (mpc-proc) 'ready) | 521 | (when (process-get (mpc-proc) 'ready) |
| 523 | (condition-case err | 522 | (with-demoted-errors "MPC: %s" |
| 524 | (with-local-quit (mpc-status-refresh)) | 523 | (with-local-quit (mpc-status-refresh)))) |
| 525 | (error (message "MPC: %s" err)))) | ||
| 526 | (mpc--status-timer-start)) | 524 | (mpc--status-timer-start)) |
| 527 | 525 | ||
| 528 | (defun mpc--status-timers-refresh () | 526 | (defun mpc--status-timers-refresh () |
| @@ -999,9 +997,8 @@ If PLAYLIST is t or nil or missing, use the main playlist." | |||
| 999 | (`Cover | 997 | (`Cover |
| 1000 | (let* ((dir (file-name-directory (cdr (assq 'file info)))) | 998 | (let* ((dir (file-name-directory (cdr (assq 'file info)))) |
| 1001 | (cover (concat dir "cover.jpg")) | 999 | (cover (concat dir "cover.jpg")) |
| 1002 | (file (condition-case err | 1000 | (file (with-demoted-errors "MPC: %s" |
| 1003 | (mpc-file-local-copy cover) | 1001 | (mpc-file-local-copy cover))) |
| 1004 | (error (message "MPC: %s" err)))) | ||
| 1005 | image) | 1002 | image) |
| 1006 | ;; (debug) | 1003 | ;; (debug) |
| 1007 | (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred) | 1004 | (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred) |
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index a8a51b7d61b..57675a483b2 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | (define-key map "x" 'kill-this-buffer) | 44 | (define-key map "x" 'kill-this-buffer) |
| 45 | map)) | 45 | map)) |
| 46 | 46 | ||
| 47 | (defun eudc-hotlist-mode () | 47 | (define-derived-mode eudc-hotlist-mode fundamental-mode "EUDC-Servers" |
| 48 | "Major mode used to edit the hotlist of servers. | 48 | "Major mode used to edit the hotlist of servers. |
| 49 | 49 | ||
| 50 | These are the special commands of this mode: | 50 | These are the special commands of this mode: |
| @@ -54,18 +54,12 @@ These are the special commands of this mode: | |||
| 54 | t -- Transpose the server at point and the previous one | 54 | t -- Transpose the server at point and the previous one |
| 55 | q -- Commit the changes and quit. | 55 | q -- Commit the changes and quit. |
| 56 | x -- Quit without committing the changes." | 56 | x -- Quit without committing the changes." |
| 57 | (interactive) | ||
| 58 | (kill-all-local-variables) | ||
| 59 | (setq major-mode 'eudc-hotlist-mode) | ||
| 60 | (setq mode-name "EUDC-Servers") | ||
| 61 | (use-local-map eudc-hotlist-mode-map) | ||
| 62 | (when (featurep 'xemacs) | 57 | (when (featurep 'xemacs) |
| 63 | (setq mode-popup-menu eudc-hotlist-menu) | 58 | (setq mode-popup-menu eudc-hotlist-menu) |
| 64 | (when (featurep 'menubar) | 59 | (when (featurep 'menubar) |
| 65 | (set-buffer-menubar current-menubar) | 60 | (set-buffer-menubar current-menubar) |
| 66 | (add-submenu nil (cons "EUDC-Hotlist" (cdr (cdr eudc-hotlist-menu)))))) | 61 | (add-submenu nil (cons "EUDC-Hotlist" (cdr (cdr eudc-hotlist-menu)))))) |
| 67 | (setq buffer-read-only t) | 62 | (setq buffer-read-only t)) |
| 68 | (run-mode-hooks 'eudc-hotlist-mode-hook)) | ||
| 69 | 63 | ||
| 70 | ;;;###autoload | 64 | ;;;###autoload |
| 71 | (defun eudc-edit-hotlist () | 65 | (defun eudc-edit-hotlist () |
| @@ -76,10 +70,8 @@ These are the special commands of this mode: | |||
| 76 | (switch-to-buffer (get-buffer-create "*EUDC Servers*")) | 70 | (switch-to-buffer (get-buffer-create "*EUDC Servers*")) |
| 77 | (setq buffer-read-only nil) | 71 | (setq buffer-read-only nil) |
| 78 | (erase-buffer) | 72 | (erase-buffer) |
| 79 | (mapc (function | 73 | (dolist (entry eudc-server-hotlist) |
| 80 | (lambda (entry) | 74 | (setq proto-col (max (length (car entry)) proto-col))) |
| 81 | (setq proto-col (max (length (car entry)) proto-col)))) | ||
| 82 | eudc-server-hotlist) | ||
| 83 | (setq proto-col (+ 3 proto-col)) | 75 | (setq proto-col (+ 3 proto-col)) |
| 84 | (setq gap (make-string (- proto-col 6) ?\ )) | 76 | (setq gap (make-string (- proto-col 6) ?\ )) |
| 85 | (insert " EUDC Servers\n" | 77 | (insert " EUDC Servers\n" |
| @@ -89,17 +81,16 @@ These are the special commands of this mode: | |||
| 89 | "------" gap "--------\n" | 81 | "------" gap "--------\n" |
| 90 | "\n") | 82 | "\n") |
| 91 | (setq eudc-hotlist-list-beginning (point)) | 83 | (setq eudc-hotlist-list-beginning (point)) |
| 92 | (mapc (lambda (entry) | 84 | (dolist (entry eudc-server-hotlist) |
| 93 | (insert (car entry)) | 85 | (insert (car entry)) |
| 94 | (indent-to proto-col) | 86 | (indent-to proto-col) |
| 95 | (insert (symbol-name (cdr entry)) "\n")) | 87 | (insert (symbol-name (cdr entry)) "\n")) |
| 96 | eudc-server-hotlist) | 88 | (eudc-hotlist-mode))) |
| 97 | (eudc-hotlist-mode))) | ||
| 98 | 89 | ||
| 99 | (defun eudc-hotlist-add-server () | 90 | (defun eudc-hotlist-add-server () |
| 100 | "Add a new server to the list after current one." | 91 | "Add a new server to the list after current one." |
| 101 | (interactive) | 92 | (interactive) |
| 102 | (if (not (eq major-mode 'eudc-hotlist-mode)) | 93 | (if (not (derived-mode-p 'eudc-hotlist-mode)) |
| 103 | (error "Not in a EUDC hotlist edit buffer")) | 94 | (error "Not in a EUDC hotlist edit buffer")) |
| 104 | (let ((server (read-from-minibuffer "Server: ")) | 95 | (let ((server (read-from-minibuffer "Server: ")) |
| 105 | (protocol (completing-read "Protocol: " | 96 | (protocol (completing-read "Protocol: " |
| @@ -117,7 +108,7 @@ These are the special commands of this mode: | |||
| 117 | (defun eudc-hotlist-delete-server () | 108 | (defun eudc-hotlist-delete-server () |
| 118 | "Delete the server at point from the list." | 109 | "Delete the server at point from the list." |
| 119 | (interactive) | 110 | (interactive) |
| 120 | (if (not (eq major-mode 'eudc-hotlist-mode)) | 111 | (if (not (derived-mode-p 'eudc-hotlist-mode)) |
| 121 | (error "Not in a EUDC hotlist edit buffer")) | 112 | (error "Not in a EUDC hotlist edit buffer")) |
| 122 | (let ((buffer-read-only nil)) | 113 | (let ((buffer-read-only nil)) |
| 123 | (save-excursion | 114 | (save-excursion |
| @@ -130,7 +121,7 @@ These are the special commands of this mode: | |||
| 130 | (defun eudc-hotlist-quit-edit () | 121 | (defun eudc-hotlist-quit-edit () |
| 131 | "Quit the hotlist editing mode and save changes to the hotlist." | 122 | "Quit the hotlist editing mode and save changes to the hotlist." |
| 132 | (interactive) | 123 | (interactive) |
| 133 | (if (not (eq major-mode 'eudc-hotlist-mode)) | 124 | (if (not (derived-mode-p 'eudc-hotlist-mode)) |
| 134 | (error "Not in a EUDC hotlist edit buffer")) | 125 | (error "Not in a EUDC hotlist edit buffer")) |
| 135 | (let (hotlist) | 126 | (let (hotlist) |
| 136 | (goto-char eudc-hotlist-list-beginning) | 127 | (goto-char eudc-hotlist-list-beginning) |
| @@ -149,7 +140,7 @@ These are the special commands of this mode: | |||
| 149 | (defun eudc-hotlist-select-server () | 140 | (defun eudc-hotlist-select-server () |
| 150 | "Select the server at point as the current server." | 141 | "Select the server at point as the current server." |
| 151 | (interactive) | 142 | (interactive) |
| 152 | (if (not (eq major-mode 'eudc-hotlist-mode)) | 143 | (if (not (derived-mode-p 'eudc-hotlist-mode)) |
| 153 | (error "Not in a EUDC hotlist edit buffer")) | 144 | (error "Not in a EUDC hotlist edit buffer")) |
| 154 | (save-excursion | 145 | (save-excursion |
| 155 | (beginning-of-line) | 146 | (beginning-of-line) |
| @@ -163,7 +154,7 @@ These are the special commands of this mode: | |||
| 163 | (defun eudc-hotlist-transpose-servers () | 154 | (defun eudc-hotlist-transpose-servers () |
| 164 | "Swap the order of the server with the previous one in the list." | 155 | "Swap the order of the server with the previous one in the list." |
| 165 | (interactive) | 156 | (interactive) |
| 166 | (if (not (eq major-mode 'eudc-hotlist-mode)) | 157 | (if (not (derived-mode-p 'eudc-hotlist-mode)) |
| 167 | (error "Not in a EUDC hotlist edit buffer")) | 158 | (error "Not in a EUDC hotlist edit buffer")) |
| 168 | (let ((buffer-read-only nil)) | 159 | (let ((buffer-read-only nil)) |
| 169 | (save-excursion | 160 | (save-excursion |
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index c474ac9380d..453c19b27f9 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el | |||
| @@ -652,7 +652,7 @@ Each copy is added a new field containing one of the values of FIELD." | |||
| 652 | result)) | 652 | result)) |
| 653 | 653 | ||
| 654 | 654 | ||
| 655 | (defun eudc-mode () | 655 | (define-derived-mode eudc-mode special-mode "EUDC" |
| 656 | "Major mode used in buffers displaying the results of directory queries. | 656 | "Major mode used in buffers displaying the results of directory queries. |
| 657 | There is no sense in calling this command from a buffer other than | 657 | There is no sense in calling this command from a buffer other than |
| 658 | one containing the results of a directory query. | 658 | one containing the results of a directory query. |
| @@ -663,15 +663,9 @@ These are the special commands of EUDC mode: | |||
| 663 | n -- Move to next record. | 663 | n -- Move to next record. |
| 664 | p -- Move to previous record. | 664 | p -- Move to previous record. |
| 665 | b -- Insert record at point into the BBDB database." | 665 | b -- Insert record at point into the BBDB database." |
| 666 | (interactive) | ||
| 667 | (kill-all-local-variables) | ||
| 668 | (setq major-mode 'eudc-mode) | ||
| 669 | (setq mode-name "EUDC") | ||
| 670 | (use-local-map eudc-mode-map) | ||
| 671 | (if (not (featurep 'xemacs)) | 666 | (if (not (featurep 'xemacs)) |
| 672 | (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu)) | 667 | (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu)) |
| 673 | (setq mode-popup-menu (eudc-menu))) | 668 | (setq mode-popup-menu (eudc-menu)))) |
| 674 | (run-mode-hooks 'eudc-mode-hook)) | ||
| 675 | 669 | ||
| 676 | ;;}}} | 670 | ;;}}} |
| 677 | 671 | ||
| @@ -1084,7 +1078,7 @@ queries the server for the existing fields and displays a corresponding form." | |||
| 1084 | (defun eudc-move-to-next-record () | 1078 | (defun eudc-move-to-next-record () |
| 1085 | "Move to next record, in a buffer displaying directory query results." | 1079 | "Move to next record, in a buffer displaying directory query results." |
| 1086 | (interactive) | 1080 | (interactive) |
| 1087 | (if (not (eq major-mode 'eudc-mode)) | 1081 | (if (not (derived-mode-p 'eudc-mode)) |
| 1088 | (error "Not in a EUDC buffer") | 1082 | (error "Not in a EUDC buffer") |
| 1089 | (let ((pt (next-overlay-change (point)))) | 1083 | (let ((pt (next-overlay-change (point)))) |
| 1090 | (if (< pt (point-max)) | 1084 | (if (< pt (point-max)) |
| @@ -1094,7 +1088,7 @@ queries the server for the existing fields and displays a corresponding form." | |||
| 1094 | (defun eudc-move-to-previous-record () | 1088 | (defun eudc-move-to-previous-record () |
| 1095 | "Move to previous record, in a buffer displaying directory query results." | 1089 | "Move to previous record, in a buffer displaying directory query results." |
| 1096 | (interactive) | 1090 | (interactive) |
| 1097 | (if (not (eq major-mode 'eudc-mode)) | 1091 | (if (not (derived-mode-p 'eudc-mode)) |
| 1098 | (error "Not in a EUDC buffer") | 1092 | (error "Not in a EUDC buffer") |
| 1099 | (let ((pt (previous-overlay-change (point)))) | 1093 | (let ((pt (previous-overlay-change (point)))) |
| 1100 | (if (> pt (point-min)) | 1094 | (if (> pt (point-min)) |
| @@ -1122,7 +1116,7 @@ queries the server for the existing fields and displays a corresponding form." | |||
| 1122 | (overlay-get (car (overlays-at (point))) 'eudc-record)) | 1116 | (overlay-get (car (overlays-at (point))) 'eudc-record)) |
| 1123 | :help "Insert record at point into the BBDB database"] | 1117 | :help "Insert record at point into the BBDB database"] |
| 1124 | ["Insert All Records into BBDB" eudc-batch-export-records-to-bbdb | 1118 | ["Insert All Records into BBDB" eudc-batch-export-records-to-bbdb |
| 1125 | (and (eq major-mode 'eudc-mode) | 1119 | (and (derived-mode-p 'eudc-mode) |
| 1126 | (or (featurep 'bbdb) | 1120 | (or (featurep 'bbdb) |
| 1127 | (prog1 (locate-library "bbdb") (message "")))) | 1121 | (prog1 (locate-library "bbdb") (message "")))) |
| 1128 | :help "Insert all the records returned by a directory query into BBDB"] | 1122 | :help "Insert all the records returned by a directory query into BBDB"] |
diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index e6a5f8299ac..f2d404afa58 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el | |||
| @@ -757,31 +757,24 @@ VALUES may contain values for editable fields from current article." | |||
| 757 | map) | 757 | map) |
| 758 | "'mairix-searches-mode' keymap.") | 758 | "'mairix-searches-mode' keymap.") |
| 759 | 759 | ||
| 760 | (defvar mairix-searches-mode-font-lock-keywords) | 760 | (defvar mairix-searches-mode-font-lock-keywords |
| 761 | 761 | '(("^\\([0-9]+\\)" | |
| 762 | (defun mairix-searches-mode () | 762 | (1 font-lock-constant-face)) |
| 763 | ("^[0-9 ]+\\(Name:\\) \\(.*\\)" | ||
| 764 | (1 font-lock-keyword-face) (2 font-lock-string-face)) | ||
| 765 | ("^[ ]+\\(Query:\\) \\(.*\\) , " | ||
| 766 | (1 font-lock-keyword-face) (2 font-lock-string-face)) | ||
| 767 | (", \\(Threads:\\) \\(.*\\)" | ||
| 768 | (1 font-lock-keyword-face) (2 font-lock-constant-face)) | ||
| 769 | ("^\\([A-Z].*\\)$" | ||
| 770 | (1 font-lock-comment-face)) | ||
| 771 | ("^[ ]+\\(Folder:\\) \\(.*\\)" | ||
| 772 | (1 font-lock-keyword-face) (2 font-lock-string-face)))) | ||
| 773 | |||
| 774 | (define-derived-mode mairix-searches-mode fundamental-mode "mairix-searches" | ||
| 763 | "Major mode for editing mairix searches." | 775 | "Major mode for editing mairix searches." |
| 764 | (interactive) | 776 | :syntax-table text-mode-syntax-table |
| 765 | (kill-all-local-variables) | 777 | (setq-local font-lock-defaults '(mairix-searches-mode-font-lock-keywords))) |
| 766 | (setq major-mode 'mairix-searches-mode) | ||
| 767 | (setq mode-name "mairix-searches") | ||
| 768 | (set-syntax-table text-mode-syntax-table) | ||
| 769 | (use-local-map mairix-searches-mode-map) | ||
| 770 | (make-local-variable 'font-lock-defaults) | ||
| 771 | (setq mairix-searches-mode-font-lock-keywords | ||
| 772 | (list (list "^\\([0-9]+\\)" | ||
| 773 | '(1 font-lock-constant-face)) | ||
| 774 | (list "^[0-9 ]+\\(Name:\\) \\(.*\\)" | ||
| 775 | '(1 font-lock-keyword-face) '(2 font-lock-string-face)) | ||
| 776 | (list "^[ ]+\\(Query:\\) \\(.*\\) , " | ||
| 777 | '(1 font-lock-keyword-face) '(2 font-lock-string-face)) | ||
| 778 | (list ", \\(Threads:\\) \\(.*\\)" | ||
| 779 | '(1 font-lock-keyword-face) '(2 font-lock-constant-face)) | ||
| 780 | (list "^\\([A-Z].*\\)$" | ||
| 781 | '(1 font-lock-comment-face)) | ||
| 782 | (list "^[ ]+\\(Folder:\\) \\(.*\\)" | ||
| 783 | '(1 font-lock-keyword-face) '(2 font-lock-string-face)))) | ||
| 784 | (setq font-lock-defaults '(mairix-searches-mode-font-lock-keywords))) | ||
| 785 | 778 | ||
| 786 | (defun mairix-build-search-list () | 779 | (defun mairix-build-search-list () |
| 787 | "Display saved searches in current buffer." | 780 | "Display saved searches in current buffer." |
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index d6c8f6f557d..411d4dfdb43 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el | |||
| @@ -1909,13 +1909,9 @@ Return t if groups have changed, nil otherwise." | |||
| 1909 | map) | 1909 | map) |
| 1910 | "Mode map for newsticker treeview.") | 1910 | "Mode map for newsticker treeview.") |
| 1911 | 1911 | ||
| 1912 | (defun newsticker-treeview-mode () | 1912 | (define-derived-mode newsticker-treeview-mode fundamental-mode "Newsticker TV" |
| 1913 | "Major mode for Newsticker Treeview. | 1913 | "Major mode for Newsticker Treeview. |
| 1914 | \\{newsticker-treeview-mode-map}" | 1914 | \\{newsticker-treeview-mode-map}" |
| 1915 | (kill-all-local-variables) | ||
| 1916 | (use-local-map newsticker-treeview-mode-map) | ||
| 1917 | (setq major-mode 'newsticker-treeview-mode) | ||
| 1918 | (setq mode-name "Newsticker TV") | ||
| 1919 | (if (boundp 'tool-bar-map) | 1915 | (if (boundp 'tool-bar-map) |
| 1920 | (set (make-local-variable 'tool-bar-map) | 1916 | (set (make-local-variable 'tool-bar-map) |
| 1921 | newsticker-treeview-tool-bar-map)) | 1917 | newsticker-treeview-tool-bar-map)) |
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 1e05d8db336..08ae9574a33 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el | |||
| @@ -429,18 +429,12 @@ current buffer, this default action can be modified via | |||
| 429 | (put 'quickurl-list-mode 'mode-class 'special) | 429 | (put 'quickurl-list-mode 'mode-class 'special) |
| 430 | 430 | ||
| 431 | ;;;###autoload | 431 | ;;;###autoload |
| 432 | (defun quickurl-list-mode () | 432 | (define-derived-mode quickurl-list-mode fundamental-mode "quickurl list" |
| 433 | "A mode for browsing the quickurl URL list. | 433 | "A mode for browsing the quickurl URL list. |
| 434 | 434 | ||
| 435 | The key bindings for `quickurl-list-mode' are: | 435 | The key bindings for `quickurl-list-mode' are: |
| 436 | 436 | ||
| 437 | \\{quickurl-list-mode-map}" | 437 | \\{quickurl-list-mode-map}" |
| 438 | (interactive) | ||
| 439 | (kill-all-local-variables) | ||
| 440 | (use-local-map quickurl-list-mode-map) | ||
| 441 | (setq major-mode 'quickurl-list-mode | ||
| 442 | mode-name "quickurl list") | ||
| 443 | (run-mode-hooks 'quickurl-list-mode-hook) | ||
| 444 | (setq buffer-read-only t | 438 | (setq buffer-read-only t |
| 445 | truncate-lines t)) | 439 | truncate-lines t)) |
| 446 | 440 | ||
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index a5f59227ef7..595037ab943 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -137,7 +137,7 @@ | |||
| 137 | (insert-directory . tramp-adb-handle-insert-directory) | 137 | (insert-directory . tramp-adb-handle-insert-directory) |
| 138 | (insert-file-contents . tramp-handle-insert-file-contents) | 138 | (insert-file-contents . tramp-handle-insert-file-contents) |
| 139 | (load . tramp-handle-load) | 139 | (load . tramp-handle-load) |
| 140 | ;; `make-auto-save-file-name' performed by default handler. | 140 | (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) |
| 141 | (make-directory . tramp-adb-handle-make-directory) | 141 | (make-directory . tramp-adb-handle-make-directory) |
| 142 | (make-directory-internal . ignore) | 142 | (make-directory-internal . ignore) |
| 143 | (make-symbolic-link . ignore) | 143 | (make-symbolic-link . ignore) |
| @@ -407,9 +407,9 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." | |||
| 407 | (split-string | 407 | (split-string |
| 408 | (apply 'concat | 408 | (apply 'concat |
| 409 | (mapcar (lambda (s) | 409 | (mapcar (lambda (s) |
| 410 | (replace-regexp-in-string | 410 | (tramp-compat-replace-regexp-in-string |
| 411 | "\\(.\\)" " -\\1" | 411 | "\\(.\\)" " -\\1" |
| 412 | (replace-regexp-in-string "^-" "" s))) | 412 | (tramp-compat-replace-regexp-in-string "^-" "" s))) |
| 413 | ;; FIXME: Warning about removed switches (long and non-dash). | 413 | ;; FIXME: Warning about removed switches (long and non-dash). |
| 414 | (delq nil | 414 | (delq nil |
| 415 | (mapcar | 415 | (mapcar |
| @@ -1153,11 +1153,11 @@ connection if a previous connection has died for some reason." | |||
| 1153 | (read (current-buffer)))))) | 1153 | (read (current-buffer)))))) |
| 1154 | (when (and (stringp old-getprop) | 1154 | (when (and (stringp old-getprop) |
| 1155 | (not (string-equal old-getprop new-getprop))) | 1155 | (not (string-equal old-getprop new-getprop))) |
| 1156 | (tramp-cleanup vec) | ||
| 1157 | (tramp-message | 1156 | (tramp-message |
| 1158 | vec 3 | 1157 | vec 3 |
| 1159 | "Connection reset, because remote host changed from `%s' to `%s'" | 1158 | "Connection reset, because remote host changed from `%s' to `%s'" |
| 1160 | old-getprop new-getprop) | 1159 | old-getprop new-getprop) |
| 1160 | (tramp-cleanup-connection vec t) | ||
| 1161 | (tramp-adb-maybe-open-connection vec))) | 1161 | (tramp-adb-maybe-open-connection vec))) |
| 1162 | 1162 | ||
| 1163 | ;; Change user if indicated. | 1163 | ;; Change user if indicated. |
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index b89c5124721..b4e5e4ffd0f 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -289,7 +289,12 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 289 | (when (vectorp key) | 289 | (when (vectorp key) |
| 290 | (dotimes (i (length key)) | 290 | (dotimes (i (length key)) |
| 291 | (when (stringp (aref key i)) | 291 | (when (stringp (aref key i)) |
| 292 | (aset key i (substring-no-properties (aref key i)))))) | 292 | (aset key i |
| 293 | (funcall | ||
| 294 | ;; `substring-no-properties' does not exist in XEmacs. | ||
| 295 | (if (functionp 'substring-no-properties) | ||
| 296 | 'substring-no-properties 'identity) | ||
| 297 | (aref key i)))))) | ||
| 293 | (let ((tmp (format | 298 | (let ((tmp (format |
| 294 | "(%s %s)" | 299 | "(%s %s)" |
| 295 | (if (processp key) | 300 | (if (processp key) |
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 937db34a346..5015929534d 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -55,9 +55,11 @@ | |||
| 55 | (buffer-list)))) | 55 | (buffer-list)))) |
| 56 | 56 | ||
| 57 | ;;;###tramp-autoload | 57 | ;;;###tramp-autoload |
| 58 | (defun tramp-cleanup-connection (vec) | 58 | (defun tramp-cleanup-connection (vec &optional keep-debug keep-password) |
| 59 | "Flush all connection related objects. | 59 | "Flush all connection related objects. |
| 60 | This includes password cache, file cache, connection cache, buffers. | 60 | This includes password cache, file cache, connection cache, |
| 61 | buffers. KEEP-DEBUG non-nil preserves the debug buffer. | ||
| 62 | KEEP-PASSWORD non-nil preserves the password cache. | ||
| 61 | When called interactively, a Tramp connection has to be selected." | 63 | When called interactively, a Tramp connection has to be selected." |
| 62 | (interactive | 64 | (interactive |
| 63 | ;; When interactive, select the Tramp remote identification. | 65 | ;; When interactive, select the Tramp remote identification. |
| @@ -80,14 +82,15 @@ When called interactively, a Tramp connection has to be selected." | |||
| 80 | "Enter Tramp connection: " connections nil t | 82 | "Enter Tramp connection: " connections nil t |
| 81 | (try-completion "" connections))) | 83 | (try-completion "" connections))) |
| 82 | (when (and name (file-remote-p name)) | 84 | (when (and name (file-remote-p name)) |
| 83 | (with-parsed-tramp-file-name name nil v)))))) | 85 | (with-parsed-tramp-file-name name nil v)))) |
| 86 | nil nil)) | ||
| 84 | 87 | ||
| 85 | (if (not vec) | 88 | (if (not vec) |
| 86 | ;; Nothing to do. | 89 | ;; Nothing to do. |
| 87 | (message "No Tramp connection found.") | 90 | (message "No Tramp connection found.") |
| 88 | 91 | ||
| 89 | ;; Flush password cache. | 92 | ;; Flush password cache. |
| 90 | (tramp-clear-passwd vec) | 93 | (unless keep-password (tramp-clear-passwd vec)) |
| 91 | 94 | ||
| 92 | ;; Flush file cache. | 95 | ;; Flush file cache. |
| 93 | (tramp-flush-directory-property vec "") | 96 | (tramp-flush-directory-property vec "") |
| @@ -101,7 +104,8 @@ When called interactively, a Tramp connection has to be selected." | |||
| 101 | ;; Remove buffers. | 104 | ;; Remove buffers. |
| 102 | (dolist | 105 | (dolist |
| 103 | (buf (list (get-buffer (tramp-buffer-name vec)) | 106 | (buf (list (get-buffer (tramp-buffer-name vec)) |
| 104 | (get-buffer (tramp-debug-buffer-name vec)) | 107 | (unless keep-debug |
| 108 | (get-buffer (tramp-debug-buffer-name vec))) | ||
| 105 | (tramp-get-connection-property vec "process-buffer" nil))) | 109 | (tramp-get-connection-property vec "process-buffer" nil))) |
| 106 | (when (bufferp buf) (kill-buffer buf))))) | 110 | (when (bufferp buf) (kill-buffer buf))))) |
| 107 | 111 | ||
| @@ -190,7 +194,9 @@ This includes password cache, file cache, connection cache, buffers." | |||
| 190 | 194 | ||
| 191 | 'tramp-load-report-modules ; pre-hook | 195 | 'tramp-load-report-modules ; pre-hook |
| 192 | 'tramp-append-tramp-buffers ; post-hook | 196 | 'tramp-append-tramp-buffers ; post-hook |
| 193 | (propertize "\n" 'display "\ | 197 | (funcall |
| 198 | (if (functionp 'propertize) 'propertize 'progn) | ||
| 199 | "\n" 'display "\ | ||
| 194 | Enter your bug report in this message, including as much detail | 200 | Enter your bug report in this message, including as much detail |
| 195 | as you possibly can about the problem, what you did to cause it | 201 | as you possibly can about the problem, what you did to cause it |
| 196 | and what the local and remote machines are. | 202 | and what the local and remote machines are. |
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 8f9d9d8fee5..ca70c1384cb 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el | |||
| @@ -313,13 +313,21 @@ Not actually used. Use `(format \"%o\" i)' instead?" | |||
| 313 | "Like `copy-file' for Tramp files (compat function)." | 313 | "Like `copy-file' for Tramp files (compat function)." |
| 314 | (cond | 314 | (cond |
| 315 | (preserve-extended-attributes | 315 | (preserve-extended-attributes |
| 316 | (tramp-compat-funcall | 316 | (condition-case nil |
| 317 | 'copy-file filename newname ok-if-already-exists keep-date | 317 | (tramp-compat-funcall |
| 318 | preserve-uid-gid preserve-extended-attributes)) | 318 | 'copy-file filename newname ok-if-already-exists keep-date |
| 319 | preserve-uid-gid preserve-extended-attributes) | ||
| 320 | (wrong-number-of-arguments | ||
| 321 | (tramp-compat-copy-file | ||
| 322 | filename newname ok-if-already-exists keep-date preserve-uid-gid)))) | ||
| 319 | (preserve-uid-gid | 323 | (preserve-uid-gid |
| 320 | (tramp-compat-funcall | 324 | (condition-case nil |
| 321 | 'copy-file filename newname ok-if-already-exists keep-date | 325 | (tramp-compat-funcall |
| 322 | preserve-uid-gid)) | 326 | 'copy-file filename newname ok-if-already-exists keep-date |
| 327 | preserve-uid-gid) | ||
| 328 | (wrong-number-of-arguments | ||
| 329 | (tramp-compat-copy-file | ||
| 330 | filename newname ok-if-already-exists keep-date)))) | ||
| 323 | (t | 331 | (t |
| 324 | (copy-file filename newname ok-if-already-exists keep-date)))) | 332 | (copy-file filename newname ok-if-already-exists keep-date)))) |
| 325 | 333 | ||
| @@ -518,6 +526,58 @@ EOL-TYPE can be one of `dos', `unix', or `mac'." | |||
| 518 | "`dos', `unix', or `mac'"))))) | 526 | "`dos', `unix', or `mac'"))))) |
| 519 | (t (error "Can't change EOL conversion -- is MULE missing?")))) | 527 | (t (error "Can't change EOL conversion -- is MULE missing?")))) |
| 520 | 528 | ||
| 529 | ;; `replace-regexp-in-string' does not exist in XEmacs. | ||
| 530 | ;; Implementation is taken from Emacs 24. | ||
| 531 | (if (fboundp 'replace-regexp-in-string) | ||
| 532 | (defalias 'tramp-compat-replace-regexp-in-string 'replace-regexp-in-string) | ||
| 533 | (defun tramp-compat-replace-regexp-in-string | ||
| 534 | (regexp rep string &optional fixedcase literal subexp start) | ||
| 535 | "Replace all matches for REGEXP with REP in STRING. | ||
| 536 | |||
| 537 | Return a new string containing the replacements. | ||
| 538 | |||
| 539 | Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the | ||
| 540 | arguments with the same names of function `replace-match'. If START | ||
| 541 | is non-nil, start replacements at that index in STRING. | ||
| 542 | |||
| 543 | REP is either a string used as the NEWTEXT arg of `replace-match' or a | ||
| 544 | function. If it is a function, it is called with the actual text of each | ||
| 545 | match, and its value is used as the replacement text. When REP is called, | ||
| 546 | the match data are the result of matching REGEXP against a substring | ||
| 547 | of STRING. | ||
| 548 | |||
| 549 | To replace only the first match (if any), make REGEXP match up to \\' | ||
| 550 | and replace a sub-expression, e.g. | ||
| 551 | (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1) | ||
| 552 | => \" bar foo\"" | ||
| 553 | |||
| 554 | (let ((l (length string)) | ||
| 555 | (start (or start 0)) | ||
| 556 | matches str mb me) | ||
| 557 | (save-match-data | ||
| 558 | (while (and (< start l) (string-match regexp string start)) | ||
| 559 | (setq mb (match-beginning 0) | ||
| 560 | me (match-end 0)) | ||
| 561 | ;; If we matched the empty string, make sure we advance by one char | ||
| 562 | (when (= me mb) (setq me (min l (1+ mb)))) | ||
| 563 | ;; Generate a replacement for the matched substring. | ||
| 564 | ;; Operate only on the substring to minimize string consing. | ||
| 565 | ;; Set up match data for the substring for replacement; | ||
| 566 | ;; presumably this is likely to be faster than munging the | ||
| 567 | ;; match data directly in Lisp. | ||
| 568 | (string-match regexp (setq str (substring string mb me))) | ||
| 569 | (setq matches | ||
| 570 | (cons (replace-match (if (stringp rep) | ||
| 571 | rep | ||
| 572 | (funcall rep (match-string 0 str))) | ||
| 573 | fixedcase literal str subexp) | ||
| 574 | (cons (substring string start mb) ; unmatched prefix | ||
| 575 | matches))) | ||
| 576 | (setq start me)) | ||
| 577 | ;; Reconstruct a string from the pieces. | ||
| 578 | (setq matches (cons (substring string start l) matches)) ; leftover | ||
| 579 | (apply #'concat (nreverse matches)))))) | ||
| 580 | |||
| 521 | (add-hook 'tramp-unload-hook | 581 | (add-hook 'tramp-unload-hook |
| 522 | (lambda () | 582 | (lambda () |
| 523 | (unload-feature 'tramp-compat 'force))) | 583 | (unload-feature 'tramp-compat 'force))) |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index a1ead96eaea..e764e4767dd 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -453,7 +453,7 @@ Every entry is a list (NAME ADDRESS).") | |||
| 453 | (insert-directory . tramp-gvfs-handle-insert-directory) | 453 | (insert-directory . tramp-gvfs-handle-insert-directory) |
| 454 | (insert-file-contents . tramp-gvfs-handle-insert-file-contents) | 454 | (insert-file-contents . tramp-gvfs-handle-insert-file-contents) |
| 455 | (load . tramp-handle-load) | 455 | (load . tramp-handle-load) |
| 456 | ;; `make-auto-save-file-name' performed by default handler. | 456 | (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) |
| 457 | (make-directory . tramp-gvfs-handle-make-directory) | 457 | (make-directory . tramp-gvfs-handle-make-directory) |
| 458 | (make-directory-internal . ignore) | 458 | (make-directory-internal . ignore) |
| 459 | (make-symbolic-link . ignore) | 459 | (make-symbolic-link . ignore) |
| @@ -594,15 +594,19 @@ is no information where to trace the message.") | |||
| 594 | (and (tramp-tramp-file-p newname) | 594 | (and (tramp-tramp-file-p newname) |
| 595 | (not (tramp-gvfs-file-name-p newname)))) | 595 | (not (tramp-gvfs-file-name-p newname)))) |
| 596 | 596 | ||
| 597 | ;; We cannot copy directly. | 597 | ;; We cannot call `copy-file' directly. Use |
| 598 | ;; `tramp-compat-funcall' for backward compatibility (number | ||
| 599 | ;; of arguments). | ||
| 598 | (let ((tmpfile (tramp-compat-make-temp-file filename))) | 600 | (let ((tmpfile (tramp-compat-make-temp-file filename))) |
| 599 | (cond | 601 | (cond |
| 600 | (preserve-extended-attributes | 602 | (preserve-extended-attributes |
| 601 | (copy-file | 603 | (tramp-compat-funcall |
| 604 | 'copy-file | ||
| 602 | filename tmpfile t keep-date preserve-uid-gid | 605 | filename tmpfile t keep-date preserve-uid-gid |
| 603 | preserve-extended-attributes)) | 606 | preserve-extended-attributes)) |
| 604 | (preserve-uid-gid | 607 | (preserve-uid-gid |
| 605 | (copy-file filename tmpfile t keep-date preserve-uid-gid)) | 608 | (tramp-compat-funcall |
| 609 | 'copy-file filename tmpfile t keep-date preserve-uid-gid)) | ||
| 606 | (t | 610 | (t |
| 607 | (copy-file filename tmpfile t keep-date))) | 611 | (copy-file filename tmpfile t keep-date))) |
| 608 | (rename-file tmpfile newname ok-if-already-exists)) | 612 | (rename-file tmpfile newname ok-if-already-exists)) |
| @@ -950,7 +954,7 @@ is no information where to trace the message.") | |||
| 950 | (tramp-message proc 6 "%S\n%s" proc string) | 954 | (tramp-message proc 6 "%S\n%s" proc string) |
| 951 | (setq string (concat rest-string string) | 955 | (setq string (concat rest-string string) |
| 952 | ;; Attribute change is returned in unused wording. | 956 | ;; Attribute change is returned in unused wording. |
| 953 | string (replace-regexp-in-string | 957 | string (tramp-compat-replace-regexp-in-string |
| 954 | "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) | 958 | "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) |
| 955 | 959 | ||
| 956 | (while (string-match | 960 | (while (string-match |
| @@ -960,7 +964,7 @@ is no information where to trace the message.") | |||
| 960 | "Event = \\([^[:blank:]]+\\)[\n\r]+") | 964 | "Event = \\([^[:blank:]]+\\)[\n\r]+") |
| 961 | string) | 965 | string) |
| 962 | (let ((action (intern-soft | 966 | (let ((action (intern-soft |
| 963 | (replace-regexp-in-string | 967 | (tramp-compat-replace-regexp-in-string |
| 964 | "_" "-" (downcase (match-string 2 string))))) | 968 | "_" "-" (downcase (match-string 2 string))))) |
| 965 | (file (match-string 1 string))) | 969 | (file (match-string 1 string))) |
| 966 | (setq string (replace-match "" nil nil string)) | 970 | (setq string (replace-match "" nil nil string)) |
| @@ -1158,7 +1162,8 @@ is no information where to trace the message.") | |||
| 1158 | (defun tramp-gvfs-file-name (object-path) | 1162 | (defun tramp-gvfs-file-name (object-path) |
| 1159 | "Retrieve file name from D-Bus OBJECT-PATH." | 1163 | "Retrieve file name from D-Bus OBJECT-PATH." |
| 1160 | (dbus-unescape-from-identifier | 1164 | (dbus-unescape-from-identifier |
| 1161 | (replace-regexp-in-string "^.*/\\([^/]+\\)$" "\\1" object-path))) | 1165 | (tramp-compat-replace-regexp-in-string |
| 1166 | "^.*/\\([^/]+\\)$" "\\1" object-path))) | ||
| 1162 | 1167 | ||
| 1163 | (defun tramp-bluez-address (device) | 1168 | (defun tramp-bluez-address (device) |
| 1164 | "Return bluetooth device address from a given bluetooth DEVICE name." | 1169 | "Return bluetooth device address from a given bluetooth DEVICE name." |
| @@ -1709,11 +1714,13 @@ They are retrieved from the hal daemon." | |||
| 1709 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1714 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1710 | :system tramp-hal-service device tramp-hal-interface-device | 1715 | :system tramp-hal-service device tramp-hal-interface-device |
| 1711 | "PropertyExists" "sync.plugin") | 1716 | "PropertyExists" "sync.plugin") |
| 1712 | (pushnew | 1717 | (let ((prop |
| 1713 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1718 | (with-tramp-dbus-call-method |
| 1714 | :system tramp-hal-service device tramp-hal-interface-device | 1719 | tramp-gvfs-dbus-event-vector t |
| 1715 | "GetPropertyString" "pda.pocketpc.name") | 1720 | :system tramp-hal-service device tramp-hal-interface-device |
| 1716 | tramp-synce-devices :test #'equal))) | 1721 | "GetPropertyString" "pda.pocketpc.name"))) |
| 1722 | (unless (member prop tramp-synce-devices) | ||
| 1723 | (push prop tramp-synce-devices))))) | ||
| 1717 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) | 1724 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) |
| 1718 | tramp-synce-devices)) | 1725 | tramp-synce-devices)) |
| 1719 | 1726 | ||
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 53dbdbc45d4..e2c7461228f 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el | |||
| @@ -238,7 +238,7 @@ authentication is requested from proxy server, provide it." | |||
| 238 | tramp-gw-vector 6 "\n%s" | 238 | tramp-gw-vector 6 "\n%s" |
| 239 | (format | 239 | (format |
| 240 | "%s%s\r\n" command | 240 | "%s%s\r\n" command |
| 241 | (replace-regexp-in-string ;; no password in trace! | 241 | (tramp-compat-replace-regexp-in-string ;; no password in trace! |
| 242 | "Basic [^\r\n]+" "Basic xxxxx" authentication t))) | 242 | "Basic [^\r\n]+" "Basic xxxxx" authentication t))) |
| 243 | (with-current-buffer buffer | 243 | (with-current-buffer buffer |
| 244 | ;; Trap errors to be traced in the right trace buffer. Often, | 244 | ;; Trap errors to be traced in the right trace buffer. Often, |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8ca94122af1..f91cbb29a1d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -850,7 +850,7 @@ of command line.") | |||
| 850 | (insert-file-contents-literally | 850 | (insert-file-contents-literally |
| 851 | . tramp-sh-handle-insert-file-contents-literally) | 851 | . tramp-sh-handle-insert-file-contents-literally) |
| 852 | (load . tramp-handle-load) | 852 | (load . tramp-handle-load) |
| 853 | (make-auto-save-file-name . tramp-sh-handle-make-auto-save-file-name) | 853 | (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) |
| 854 | (make-directory . tramp-sh-handle-make-directory) | 854 | (make-directory . tramp-sh-handle-make-directory) |
| 855 | (make-symbolic-link . tramp-sh-handle-make-symbolic-link) | 855 | (make-symbolic-link . tramp-sh-handle-make-symbolic-link) |
| 856 | (process-file . tramp-sh-handle-process-file) | 856 | (process-file . tramp-sh-handle-process-file) |
| @@ -2978,48 +2978,6 @@ the result will be a local, non-Tramp, filename." | |||
| 2978 | (fset 'find-buffer-file-type find-buffer-file-type-function) | 2978 | (fset 'find-buffer-file-type find-buffer-file-type-function) |
| 2979 | (fmakunbound 'find-buffer-file-type))))) | 2979 | (fmakunbound 'find-buffer-file-type))))) |
| 2980 | 2980 | ||
| 2981 | (defun tramp-sh-handle-make-auto-save-file-name () | ||
| 2982 | "Like `make-auto-save-file-name' for Tramp files. | ||
| 2983 | Returns a file name in `tramp-auto-save-directory' for autosaving this file." | ||
| 2984 | (let ((tramp-auto-save-directory tramp-auto-save-directory) | ||
| 2985 | (buffer-file-name | ||
| 2986 | (tramp-subst-strs-in-string | ||
| 2987 | '(("_" . "|") | ||
| 2988 | ("/" . "_a") | ||
| 2989 | (":" . "_b") | ||
| 2990 | ("|" . "__") | ||
| 2991 | ("[" . "_l") | ||
| 2992 | ("]" . "_r")) | ||
| 2993 | (buffer-file-name)))) | ||
| 2994 | ;; File name must be unique. This is ensured with Emacs 22 (see | ||
| 2995 | ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for | ||
| 2996 | ;; all other cases we must do it ourselves. | ||
| 2997 | (when (boundp 'auto-save-file-name-transforms) | ||
| 2998 | (mapc | ||
| 2999 | (lambda (x) | ||
| 3000 | (when (and (string-match (car x) buffer-file-name) | ||
| 3001 | (not (car (cddr x)))) | ||
| 3002 | (setq tramp-auto-save-directory | ||
| 3003 | (or tramp-auto-save-directory | ||
| 3004 | (tramp-compat-temporary-file-directory))))) | ||
| 3005 | (symbol-value 'auto-save-file-name-transforms))) | ||
| 3006 | ;; Create directory. | ||
| 3007 | (when tramp-auto-save-directory | ||
| 3008 | (setq buffer-file-name | ||
| 3009 | (expand-file-name buffer-file-name tramp-auto-save-directory)) | ||
| 3010 | (unless (file-exists-p tramp-auto-save-directory) | ||
| 3011 | (make-directory tramp-auto-save-directory t))) | ||
| 3012 | ;; Run plain `make-auto-save-file-name'. There might be an advice when | ||
| 3013 | ;; it is not a magic file name operation (since Emacs 22). | ||
| 3014 | ;; We must deactivate it temporarily. | ||
| 3015 | (if (not (ad-is-active 'make-auto-save-file-name)) | ||
| 3016 | (tramp-run-real-handler 'make-auto-save-file-name nil) | ||
| 3017 | ;; else | ||
| 3018 | (ad-deactivate 'make-auto-save-file-name) | ||
| 3019 | (prog1 | ||
| 3020 | (tramp-run-real-handler 'make-auto-save-file-name nil) | ||
| 3021 | (ad-activate 'make-auto-save-file-name))))) | ||
| 3022 | |||
| 3023 | ;; CCC grok LOCKNAME | 2981 | ;; CCC grok LOCKNAME |
| 3024 | (defun tramp-sh-handle-write-region | 2982 | (defun tramp-sh-handle-write-region |
| 3025 | (start end filename &optional append visit lockname confirm) | 2983 | (start end filename &optional append visit lockname confirm) |
| @@ -3425,7 +3383,7 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 3425 | (tramp-message proc 6 "%S\n%s" proc string) | 3383 | (tramp-message proc 6 "%S\n%s" proc string) |
| 3426 | (setq string (concat rest-string string) | 3384 | (setq string (concat rest-string string) |
| 3427 | ;; Attribute change is returned in unused wording. | 3385 | ;; Attribute change is returned in unused wording. |
| 3428 | string (replace-regexp-in-string | 3386 | string (tramp-compat-replace-regexp-in-string |
| 3429 | "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) | 3387 | "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) |
| 3430 | 3388 | ||
| 3431 | (while (string-match | 3389 | (while (string-match |
| @@ -3439,7 +3397,7 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 3439 | (list | 3397 | (list |
| 3440 | proc | 3398 | proc |
| 3441 | (intern-soft | 3399 | (intern-soft |
| 3442 | (replace-regexp-in-string | 3400 | (tramp-compat-replace-regexp-in-string |
| 3443 | "_" "-" (downcase (match-string 4 string)))) | 3401 | "_" "-" (downcase (match-string 4 string)))) |
| 3444 | ;; File names are returned as absolute paths. We must | 3402 | ;; File names are returned as absolute paths. We must |
| 3445 | ;; add the remote prefix. | 3403 | ;; add the remote prefix. |
| @@ -3475,7 +3433,8 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 3475 | proc | 3433 | proc |
| 3476 | (mapcar | 3434 | (mapcar |
| 3477 | (lambda (x) | 3435 | (lambda (x) |
| 3478 | (intern-soft (replace-regexp-in-string "_" "-" (downcase x)))) | 3436 | (intern-soft |
| 3437 | (tramp-compat-replace-regexp-in-string "_" "-" (downcase x)))) | ||
| 3479 | (split-string (match-string 1 line) "," 'omit-nulls)) | 3438 | (split-string (match-string 1 line) "," 'omit-nulls)) |
| 3480 | (match-string 3 line)))) | 3439 | (match-string 3 line)))) |
| 3481 | ;; Usually, we would add an Emacs event now. Unfortunately, | 3440 | ;; Usually, we would add an Emacs event now. Unfortunately, |
| @@ -3846,11 +3805,12 @@ process to set up. VEC specifies the connection." | |||
| 3846 | vec "uname" | 3805 | vec "uname" |
| 3847 | (tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\"")))) | 3806 | (tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\"")))) |
| 3848 | (when (and (stringp old-uname) (not (string-equal old-uname new-uname))) | 3807 | (when (and (stringp old-uname) (not (string-equal old-uname new-uname))) |
| 3849 | (tramp-cleanup vec) | ||
| 3850 | (tramp-message | 3808 | (tramp-message |
| 3851 | vec 3 | 3809 | vec 3 |
| 3852 | "Connection reset, because remote host changed from `%s' to `%s'" | 3810 | "Connection reset, because remote host changed from `%s' to `%s'" |
| 3853 | old-uname new-uname) | 3811 | old-uname new-uname) |
| 3812 | ;; We want to keep the password. | ||
| 3813 | (tramp-cleanup-connection vec t t) | ||
| 3854 | (throw 'uname-changed (tramp-maybe-open-connection vec)))) | 3814 | (throw 'uname-changed (tramp-maybe-open-connection vec)))) |
| 3855 | 3815 | ||
| 3856 | ;; Check whether the remote host suffers from buggy | 3816 | ;; Check whether the remote host suffers from buggy |
| @@ -4252,7 +4212,7 @@ Gateway hops are already opened." | |||
| 4252 | ?h (or (tramp-file-name-host (car target-alist)) "")))) | 4212 | ?h (or (tramp-file-name-host (car target-alist)) "")))) |
| 4253 | (with-parsed-tramp-file-name proxy l | 4213 | (with-parsed-tramp-file-name proxy l |
| 4254 | ;; Add the hop. | 4214 | ;; Add the hop. |
| 4255 | (pushnew l target-alist :test #'equal) | 4215 | (push l target-alist) |
| 4256 | ;; Start next search. | 4216 | ;; Start next search. |
| 4257 | (setq choices tramp-default-proxies-alist))))) | 4217 | (setq choices tramp-default-proxies-alist))))) |
| 4258 | 4218 | ||
| @@ -4270,11 +4230,11 @@ Gateway hops are already opened." | |||
| 4270 | vec 'file-error | 4230 | vec 'file-error |
| 4271 | "Connection `%s' is not supported for gateway access." hop)) | 4231 | "Connection `%s' is not supported for gateway access." hop)) |
| 4272 | ;; Open the gateway connection. | 4232 | ;; Open the gateway connection. |
| 4273 | (pushnew | 4233 | (push |
| 4274 | (vector | 4234 | (vector |
| 4275 | (tramp-file-name-method hop) (tramp-file-name-user hop) | 4235 | (tramp-file-name-method hop) (tramp-file-name-user hop) |
| 4276 | (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil) | 4236 | (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil) |
| 4277 | target-alist :test #'equal) | 4237 | target-alist) |
| 4278 | ;; For the password prompt, we need the correct values. | 4238 | ;; For the password prompt, we need the correct values. |
| 4279 | ;; Therefore, we must remember the gateway vector. But we | 4239 | ;; Therefore, we must remember the gateway vector. But we |
| 4280 | ;; cannot do it as connection property, because it shouldn't | 4240 | ;; cannot do it as connection property, because it shouldn't |
| @@ -4328,68 +4288,68 @@ Does not do anything if a connection is already open, but re-opens the | |||
| 4328 | connection if a previous connection has died for some reason." | 4288 | connection if a previous connection has died for some reason." |
| 4329 | (tramp-check-proper-host vec) | 4289 | (tramp-check-proper-host vec) |
| 4330 | 4290 | ||
| 4331 | (catch 'uname-changed | 4291 | (let ((p (tramp-get-connection-process vec)) |
| 4332 | (let ((p (tramp-get-connection-process vec)) | 4292 | (process-name (tramp-get-connection-property vec "process-name" nil)) |
| 4333 | (process-name (tramp-get-connection-property vec "process-name" nil)) | 4293 | (process-environment (copy-sequence process-environment)) |
| 4334 | (process-environment (copy-sequence process-environment)) | 4294 | (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))) |
| 4335 | (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))) | 4295 | |
| 4336 | 4296 | ;; If Tramp opens the same connection within a short time frame, | |
| 4337 | ;; If Tramp opens the same connection within a short time frame, | 4297 | ;; there is a problem. We shall signal this. |
| 4338 | ;; there is a problem. We shall signal this. | 4298 | (unless (or (and p (processp p) (memq (process-status p) '(run open))) |
| 4339 | (unless (or (and p (processp p) (memq (process-status p) '(run open))) | 4299 | (not (equal (butlast (append vec nil) 2) |
| 4340 | (not (equal (butlast (append vec nil) 2) | 4300 | (car tramp-current-connection))) |
| 4341 | (car tramp-current-connection))) | 4301 | (> (tramp-time-diff |
| 4342 | (> (tramp-time-diff | 4302 | (current-time) (cdr tramp-current-connection)) |
| 4343 | (current-time) (cdr tramp-current-connection)) | 4303 | (or tramp-connection-min-time-diff 0))) |
| 4344 | (or tramp-connection-min-time-diff 0))) | 4304 | (throw 'suppress 'suppress)) |
| 4345 | (throw 'suppress 'suppress)) | 4305 | |
| 4346 | 4306 | ;; If too much time has passed since last command was sent, look | |
| 4347 | ;; If too much time has passed since last command was sent, look | 4307 | ;; whether process is still alive. If it isn't, kill it. When |
| 4348 | ;; whether process is still alive. If it isn't, kill it. When | 4308 | ;; using ssh, it can sometimes happen that the remote end has hung |
| 4349 | ;; using ssh, it can sometimes happen that the remote end has | 4309 | ;; up but the local ssh client doesn't recognize this until it |
| 4350 | ;; hung up but the local ssh client doesn't recognize this until | 4310 | ;; tries to send some data to the remote end. So that's why we |
| 4351 | ;; it tries to send some data to the remote end. So that's why | 4311 | ;; try to send a command from time to time, then look again |
| 4352 | ;; we try to send a command from time to time, then look again | 4312 | ;; whether the process is really alive. |
| 4353 | ;; whether the process is really alive. | 4313 | (condition-case nil |
| 4354 | (condition-case nil | 4314 | (when (and (> (tramp-time-diff |
| 4355 | (when (and (> (tramp-time-diff | 4315 | (current-time) |
| 4356 | (current-time) | 4316 | (tramp-get-connection-property |
| 4357 | (tramp-get-connection-property | 4317 | p "last-cmd-time" '(0 0 0))) |
| 4358 | p "last-cmd-time" '(0 0 0))) | 4318 | 60) |
| 4359 | 60) | 4319 | p (processp p) (memq (process-status p) '(run open))) |
| 4360 | p (processp p) (memq (process-status p) '(run open))) | 4320 | (tramp-send-command vec "echo are you awake" t t) |
| 4361 | (tramp-send-command vec "echo are you awake" t t) | 4321 | (unless (and (memq (process-status p) '(run open)) |
| 4362 | (unless (and (memq (process-status p) '(run open)) | 4322 | (tramp-wait-for-output p 10)) |
| 4363 | (tramp-wait-for-output p 10)) | 4323 | ;; The error will be caught locally. |
| 4364 | ;; The error will be caught locally. | 4324 | (tramp-error vec 'file-error "Awake did fail"))) |
| 4365 | (tramp-error vec 'file-error "Awake did fail"))) | 4325 | (file-error |
| 4366 | (file-error | 4326 | (tramp-cleanup-connection vec t) |
| 4367 | (tramp-cleanup vec) | 4327 | (setq p nil))) |
| 4368 | (setq p nil))) | 4328 | |
| 4369 | 4329 | ;; New connection must be opened. | |
| 4370 | ;; New connection must be opened. | 4330 | (condition-case err |
| 4371 | (condition-case err | 4331 | (unless (and p (processp p) (memq (process-status p) '(run open))) |
| 4372 | (unless (and p (processp p) (memq (process-status p) '(run open))) | 4332 | |
| 4373 | 4333 | ;; We call `tramp-get-buffer' in order to get a debug buffer | |
| 4374 | ;; We call `tramp-get-buffer' in order to get a debug | 4334 | ;; for messages from the beginning. |
| 4375 | ;; buffer for messages from the beginning. | 4335 | (tramp-get-buffer vec) |
| 4376 | (tramp-get-buffer vec) | 4336 | |
| 4377 | 4337 | ;; If `non-essential' is non-nil, don't reopen a new connection. | |
| 4378 | ;; If `non-essential' is non-nil, don't reopen a new connection. | 4338 | (when (and (boundp 'non-essential) (symbol-value 'non-essential)) |
| 4379 | (when (and (boundp 'non-essential) (symbol-value 'non-essential)) | 4339 | (throw 'non-essential 'non-essential)) |
| 4380 | (throw 'non-essential 'non-essential)) | 4340 | |
| 4381 | 4341 | (with-tramp-progress-reporter | |
| 4382 | (with-tramp-progress-reporter | 4342 | vec 3 |
| 4383 | vec 3 | 4343 | (if (zerop (length (tramp-file-name-user vec))) |
| 4384 | (if (zerop (length (tramp-file-name-user vec))) | 4344 | (format "Opening connection for %s using %s" |
| 4385 | (format "Opening connection for %s using %s" | ||
| 4386 | (tramp-file-name-host vec) | ||
| 4387 | (tramp-file-name-method vec)) | ||
| 4388 | (format "Opening connection for %s@%s using %s" | ||
| 4389 | (tramp-file-name-user vec) | ||
| 4390 | (tramp-file-name-host vec) | 4345 | (tramp-file-name-host vec) |
| 4391 | (tramp-file-name-method vec))) | 4346 | (tramp-file-name-method vec)) |
| 4347 | (format "Opening connection for %s@%s using %s" | ||
| 4348 | (tramp-file-name-user vec) | ||
| 4349 | (tramp-file-name-host vec) | ||
| 4350 | (tramp-file-name-method vec))) | ||
| 4392 | 4351 | ||
| 4352 | (catch 'uname-changed | ||
| 4393 | ;; Start new process. | 4353 | ;; Start new process. |
| 4394 | (when (and p (processp p)) | 4354 | (when (and p (processp p)) |
| 4395 | (delete-process p)) | 4355 | (delete-process p)) |
| @@ -4544,13 +4504,13 @@ connection if a previous connection has died for some reason." | |||
| 4544 | target-alist (cdr target-alist))) | 4504 | target-alist (cdr target-alist))) |
| 4545 | 4505 | ||
| 4546 | ;; Make initial shell settings. | 4506 | ;; Make initial shell settings. |
| 4547 | (tramp-open-connection-setup-interactive-shell p vec)))) | 4507 | (tramp-open-connection-setup-interactive-shell p vec))))) |
| 4548 | 4508 | ||
| 4549 | ;; When the user did interrupt, we must cleanup. | 4509 | ;; When the user did interrupt, we must cleanup. |
| 4550 | (quit | 4510 | (quit |
| 4551 | (tramp-cleanup vec) | 4511 | (tramp-cleanup-connection vec t) |
| 4552 | ;; Propagate the quit signal. | 4512 | ;; Propagate the quit signal. |
| 4553 | (signal (car err) (cdr err))))))) | 4513 | (signal (car err) (cdr err)))))) |
| 4554 | 4514 | ||
| 4555 | (defun tramp-send-command (vec command &optional neveropen nooutput) | 4515 | (defun tramp-send-command (vec command &optional neveropen nooutput) |
| 4556 | "Send the COMMAND to connection VEC. | 4516 | "Send the COMMAND to connection VEC. |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index f05a54f46f7..27f3bd41e9c 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -229,7 +229,7 @@ See `tramp-actions-before-shell' for more info.") | |||
| 229 | (insert-directory . tramp-smb-handle-insert-directory) | 229 | (insert-directory . tramp-smb-handle-insert-directory) |
| 230 | (insert-file-contents . tramp-handle-insert-file-contents) | 230 | (insert-file-contents . tramp-handle-insert-file-contents) |
| 231 | (load . tramp-handle-load) | 231 | (load . tramp-handle-load) |
| 232 | ;; `make-auto-save-file-name' performed by default handler. | 232 | (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) |
| 233 | (make-directory . tramp-smb-handle-make-directory) | 233 | (make-directory . tramp-smb-handle-make-directory) |
| 234 | (make-directory-internal . tramp-smb-handle-make-directory-internal) | 234 | (make-directory-internal . tramp-smb-handle-make-directory-internal) |
| 235 | (make-symbolic-link . tramp-smb-handle-make-symbolic-link) | 235 | (make-symbolic-link . tramp-smb-handle-make-symbolic-link) |
| @@ -403,7 +403,7 @@ pass to the OPERATION." | |||
| 403 | (port (tramp-file-name-port v)) | 403 | (port (tramp-file-name-port v)) |
| 404 | (share (tramp-smb-get-share v)) | 404 | (share (tramp-smb-get-share v)) |
| 405 | (localname (file-name-as-directory | 405 | (localname (file-name-as-directory |
| 406 | (replace-regexp-in-string | 406 | (tramp-compat-replace-regexp-in-string |
| 407 | "\\\\" "/" (tramp-smb-get-localname v)))) | 407 | "\\\\" "/" (tramp-smb-get-localname v)))) |
| 408 | (tmpdir (make-temp-name | 408 | (tmpdir (make-temp-name |
| 409 | (expand-file-name | 409 | (expand-file-name |
| @@ -537,7 +537,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | |||
| 537 | (unless (tramp-smb-send-command | 537 | (unless (tramp-smb-send-command |
| 538 | v (format "put \"%s\" \"%s\"" | 538 | v (format "put \"%s\" \"%s\"" |
| 539 | filename (tramp-smb-get-localname v))) | 539 | filename (tramp-smb-get-localname v))) |
| 540 | (tramp-error v 'file-error "Cannot copy `%s'" filename)))))) | 540 | (tramp-error |
| 541 | v 'file-error "Cannot copy `%s' to `%s'" filename newname)))))) | ||
| 541 | 542 | ||
| 542 | ;; KEEP-DATE handling. | 543 | ;; KEEP-DATE handling. |
| 543 | (when keep-date | 544 | (when keep-date |
| @@ -1151,7 +1152,8 @@ target of the symlink differ." | |||
| 1151 | (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) | 1152 | (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) |
| 1152 | 0 (format "Renaming %s to %s" filename newname) | 1153 | 0 (format "Renaming %s to %s" filename newname) |
| 1153 | 1154 | ||
| 1154 | (if (and (tramp-equal-remote filename newname) | 1155 | (if (and (not (file-exists-p newname)) |
| 1156 | (tramp-equal-remote filename newname) | ||
| 1155 | (string-equal | 1157 | (string-equal |
| 1156 | (tramp-smb-get-share (tramp-dissect-file-name filename)) | 1158 | (tramp-smb-get-share (tramp-dissect-file-name filename)) |
| 1157 | (tramp-smb-get-share (tramp-dissect-file-name newname)))) | 1159 | (tramp-smb-get-share (tramp-dissect-file-name newname)))) |
| @@ -1364,14 +1366,14 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)." | |||
| 1364 | (while (not (eobp)) | 1366 | (while (not (eobp)) |
| 1365 | (setq entry (tramp-smb-read-file-entry share)) | 1367 | (setq entry (tramp-smb-read-file-entry share)) |
| 1366 | (forward-line) | 1368 | (forward-line) |
| 1367 | (when entry (pushnew entry res :test #'equal)))) | 1369 | (when entry (push entry res)))) |
| 1368 | 1370 | ||
| 1369 | ;; Cache share entries. | 1371 | ;; Cache share entries. |
| 1370 | (unless share | 1372 | (unless share |
| 1371 | (tramp-set-connection-property v "share-cache" res))) | 1373 | (tramp-set-connection-property v "share-cache" res))) |
| 1372 | 1374 | ||
| 1373 | ;; Add directory itself. | 1375 | ;; Add directory itself. |
| 1374 | (pushnew '("" "drwxrwxrwx" 0 (0 0)) res :test #'equal) | 1376 | (push '("" "drwxrwxrwx" 0 (0 0)) res) |
| 1375 | 1377 | ||
| 1376 | ;; There's a very strange error (debugged with XEmacs 21.4.14) | 1378 | ;; There's a very strange error (debugged with XEmacs 21.4.14) |
| 1377 | ;; If there's no short delay, it returns nil. No idea about. | 1379 | ;; If there's no short delay, it returns nil. No idea about. |
| @@ -1719,11 +1721,15 @@ If ARGUMENT is non-nil, use it as argument for | |||
| 1719 | (error | 1721 | (error |
| 1720 | (with-current-buffer (tramp-get-connection-buffer vec) | 1722 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 1721 | (goto-char (point-min)) | 1723 | (goto-char (point-min)) |
| 1722 | (if (search-forward-regexp | 1724 | (if (and (boundp 'auth-sources) |
| 1723 | tramp-smb-wrong-passwd-regexp nil t) | 1725 | (symbol-value 'auth-sources) |
| 1726 | (search-forward-regexp | ||
| 1727 | tramp-smb-wrong-passwd-regexp nil t)) | ||
| 1724 | ;; Disable `auth-source' and `password-cache'. | 1728 | ;; Disable `auth-source' and `password-cache'. |
| 1729 | (tramp-message | ||
| 1730 | vec 3 "Retry connection with new password") | ||
| 1725 | (let (auth-sources) | 1731 | (let (auth-sources) |
| 1726 | (tramp-cleanup vec) | 1732 | (tramp-cleanup-connection vec t) |
| 1727 | (tramp-smb-maybe-open-connection vec argument)) | 1733 | (tramp-smb-maybe-open-connection vec argument)) |
| 1728 | ;; Propagate the error. | 1734 | ;; Propagate the error. |
| 1729 | (signal (car err) (cdr err))))))))))))) | 1735 | (signal (car err) (cdr err))))))))))))) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 727536b2e10..fe4f7b8bb54 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1222,10 +1222,11 @@ their replacement." | |||
| 1222 | ;; This works with the current set of `tramp-obsolete-methods'. | 1222 | ;; This works with the current set of `tramp-obsolete-methods'. |
| 1223 | ;; Must be improved, if their are more sophisticated replacements. | 1223 | ;; Must be improved, if their are more sophisticated replacements. |
| 1224 | (setq result (substring result 0 -1))) | 1224 | (setq result (substring result 0 -1))) |
| 1225 | ;; We must mark, whether a default value has been used. | 1225 | ;; We must mark, whether a default value has been used. Not |
| 1226 | (if (or method (null result)) | 1226 | ;; applicable for XEmacs. |
| 1227 | (if (or method (null result) (null (functionp 'propertize))) | ||
| 1227 | result | 1228 | result |
| 1228 | (propertize result 'tramp-default t)))) | 1229 | (tramp-compat-funcall 'propertize result 'tramp-default t)))) |
| 1229 | 1230 | ||
| 1230 | (defun tramp-find-user (method user host) | 1231 | (defun tramp-find-user (method user host) |
| 1231 | "Return the right user string to use. | 1232 | "Return the right user string to use. |
| @@ -1243,10 +1244,11 @@ This is USER, if non-nil. Otherwise, do a lookup in | |||
| 1243 | (setq choices nil))) | 1244 | (setq choices nil))) |
| 1244 | luser) | 1245 | luser) |
| 1245 | tramp-default-user))) | 1246 | tramp-default-user))) |
| 1246 | ;; We must mark, whether a default value has been used. | 1247 | ;; We must mark, whether a default value has been used. Not |
| 1247 | (if (or user (null result)) | 1248 | ;; applicable for XEmacs. |
| 1249 | (if (or user (null result) (null (functionp 'propertize))) | ||
| 1248 | result | 1250 | result |
| 1249 | (propertize result 'tramp-default t)))) | 1251 | (tramp-compat-funcall 'propertize result 'tramp-default t)))) |
| 1250 | 1252 | ||
| 1251 | (defun tramp-find-host (method user host) | 1253 | (defun tramp-find-host (method user host) |
| 1252 | "Return the right host string to use. | 1254 | "Return the right host string to use. |
| @@ -1641,7 +1643,7 @@ without a visible progress reporter." | |||
| 1641 | (declare (indent 3) (debug t)) | 1643 | (declare (indent 3) (debug t)) |
| 1642 | `(progn | 1644 | `(progn |
| 1643 | (tramp-message ,vec ,level "%s..." ,message) | 1645 | (tramp-message ,vec ,level "%s..." ,message) |
| 1644 | (let ((result "failed") | 1646 | (let ((cookie "failed") |
| 1645 | (tm | 1647 | (tm |
| 1646 | ;; We start a pulsing progress reporter after 3 seconds. Feature | 1648 | ;; We start a pulsing progress reporter after 3 seconds. Feature |
| 1647 | ;; introduced in Emacs 24.1. | 1649 | ;; introduced in Emacs 24.1. |
| @@ -1656,10 +1658,10 @@ without a visible progress reporter." | |||
| 1656 | #'tramp-progress-reporter-update pr))))))) | 1658 | #'tramp-progress-reporter-update pr))))))) |
| 1657 | (unwind-protect | 1659 | (unwind-protect |
| 1658 | ;; Execute the body. | 1660 | ;; Execute the body. |
| 1659 | (prog1 (progn ,@body) (setq result "done")) | 1661 | (prog1 (progn ,@body) (setq cookie "done")) |
| 1660 | ;; Stop progress reporter. | 1662 | ;; Stop progress reporter. |
| 1661 | (if tm (tramp-compat-funcall 'cancel-timer tm)) | 1663 | (if tm (tramp-compat-funcall 'cancel-timer tm)) |
| 1662 | (tramp-message ,vec ,level "%s...%s" ,message result))))) | 1664 | (tramp-message ,vec ,level "%s...%s" ,message cookie))))) |
| 1663 | 1665 | ||
| 1664 | (tramp-compat-font-lock-add-keywords | 1666 | (tramp-compat-font-lock-add-keywords |
| 1665 | 'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>")) | 1667 | 'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>")) |
| @@ -1710,19 +1712,6 @@ letter into the file name. This function removes it." | |||
| 1710 | (replace-match "/" nil t name) | 1712 | (replace-match "/" nil t name) |
| 1711 | name))) | 1713 | name))) |
| 1712 | 1714 | ||
| 1713 | (defun tramp-cleanup (vec) | ||
| 1714 | "Cleanup connection VEC, but keep the debug buffer." | ||
| 1715 | (with-current-buffer (tramp-get-debug-buffer vec) | ||
| 1716 | ;; Keep the debug buffer. | ||
| 1717 | (rename-buffer | ||
| 1718 | (generate-new-buffer-name tramp-temp-buffer-name) 'unique) | ||
| 1719 | (tramp-cleanup-connection vec) | ||
| 1720 | (if (= (point-min) (point-max)) | ||
| 1721 | (kill-buffer nil) | ||
| 1722 | (rename-buffer (tramp-debug-buffer-name vec) 'unique)) | ||
| 1723 | ;; We call `tramp-get-buffer' in order to keep the debug buffer. | ||
| 1724 | (tramp-get-buffer vec))) | ||
| 1725 | |||
| 1726 | ;;; Config Manipulation Functions: | 1715 | ;;; Config Manipulation Functions: |
| 1727 | 1716 | ||
| 1728 | ;;;###tramp-autoload | 1717 | ;;;###tramp-autoload |
| @@ -2145,7 +2134,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 2145 | (tramp-message | 2134 | (tramp-message |
| 2146 | v 1 "Suppress received in operation %s" | 2135 | v 1 "Suppress received in operation %s" |
| 2147 | (append (list operation) args)) | 2136 | (append (list operation) args)) |
| 2148 | (tramp-cleanup v) | 2137 | (tramp-cleanup-connection v t) |
| 2149 | (tramp-run-real-handler operation args))) | 2138 | (tramp-run-real-handler operation args))) |
| 2150 | (t result))) | 2139 | (t result))) |
| 2151 | 2140 | ||
| @@ -3920,6 +3909,48 @@ Return the local name of the temporary file." | |||
| 3920 | 3909 | ||
| 3921 | ;;; Auto saving to a special directory: | 3910 | ;;; Auto saving to a special directory: |
| 3922 | 3911 | ||
| 3912 | (defun tramp-handle-make-auto-save-file-name () | ||
| 3913 | "Like `make-auto-save-file-name' for Tramp files. | ||
| 3914 | Returns a file name in `tramp-auto-save-directory' for autosaving this file." | ||
| 3915 | (let ((tramp-auto-save-directory tramp-auto-save-directory) | ||
| 3916 | (buffer-file-name | ||
| 3917 | (tramp-subst-strs-in-string | ||
| 3918 | '(("_" . "|") | ||
| 3919 | ("/" . "_a") | ||
| 3920 | (":" . "_b") | ||
| 3921 | ("|" . "__") | ||
| 3922 | ("[" . "_l") | ||
| 3923 | ("]" . "_r")) | ||
| 3924 | (buffer-file-name)))) | ||
| 3925 | ;; File name must be unique. This is ensured with Emacs 22 (see | ||
| 3926 | ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for | ||
| 3927 | ;; all other cases we must do it ourselves. | ||
| 3928 | (when (boundp 'auto-save-file-name-transforms) | ||
| 3929 | (mapc | ||
| 3930 | (lambda (x) | ||
| 3931 | (when (and (string-match (car x) buffer-file-name) | ||
| 3932 | (not (car (cddr x)))) | ||
| 3933 | (setq tramp-auto-save-directory | ||
| 3934 | (or tramp-auto-save-directory | ||
| 3935 | (tramp-compat-temporary-file-directory))))) | ||
| 3936 | (symbol-value 'auto-save-file-name-transforms))) | ||
| 3937 | ;; Create directory. | ||
| 3938 | (when tramp-auto-save-directory | ||
| 3939 | (setq buffer-file-name | ||
| 3940 | (expand-file-name buffer-file-name tramp-auto-save-directory)) | ||
| 3941 | (unless (file-exists-p tramp-auto-save-directory) | ||
| 3942 | (make-directory tramp-auto-save-directory t))) | ||
| 3943 | ;; Run plain `make-auto-save-file-name'. There might be an advice when | ||
| 3944 | ;; it is not a magic file name operation (since Emacs 22). | ||
| 3945 | ;; We must deactivate it temporarily. | ||
| 3946 | (if (not (ad-is-active 'make-auto-save-file-name)) | ||
| 3947 | (tramp-run-real-handler 'make-auto-save-file-name nil) | ||
| 3948 | ;; else | ||
| 3949 | (ad-deactivate 'make-auto-save-file-name) | ||
| 3950 | (prog1 | ||
| 3951 | (tramp-run-real-handler 'make-auto-save-file-name nil) | ||
| 3952 | (ad-activate 'make-auto-save-file-name))))) | ||
| 3953 | |||
| 3923 | (unless (tramp-exists-file-name-handler 'make-auto-save-file-name) | 3954 | (unless (tramp-exists-file-name-handler 'make-auto-save-file-name) |
| 3924 | (defadvice make-auto-save-file-name | 3955 | (defadvice make-auto-save-file-name |
| 3925 | (around tramp-advice-make-auto-save-file-name () activate) | 3956 | (around tramp-advice-make-auto-save-file-name () activate) |
diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el index f25003e5652..16941167fb6 100644 --- a/lisp/obsolete/options.el +++ b/lisp/obsolete/options.el | |||
| @@ -88,7 +88,7 @@ The Custom feature is intended to make this obsolete." | |||
| 88 | ;; Edit Options mode is suitable only for specially formatted data. | 88 | ;; Edit Options mode is suitable only for specially formatted data. |
| 89 | (put 'Edit-options-mode 'mode-class 'special) | 89 | (put 'Edit-options-mode 'mode-class 'special) |
| 90 | 90 | ||
| 91 | (defun Edit-options-mode () | 91 | (define-derived-mode Edit-options-mode emacs-lisp-mode "Options" |
| 92 | "\\<Edit-options-mode-map>\ | 92 | "\\<Edit-options-mode-map>\ |
| 93 | Major mode for editing Emacs user option settings. | 93 | Major mode for editing Emacs user option settings. |
| 94 | Special commands are: | 94 | Special commands are: |
| @@ -100,17 +100,9 @@ Changed values made by these commands take effect immediately. | |||
| 100 | 100 | ||
| 101 | Each variable description is a paragraph. | 101 | Each variable description is a paragraph. |
| 102 | For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] move back and forward by paragraphs." | 102 | For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] move back and forward by paragraphs." |
| 103 | (kill-all-local-variables) | 103 | (setq-local paragraph-separate "[^\^@-\^?]") |
| 104 | (set-syntax-table emacs-lisp-mode-syntax-table) | 104 | (setq-local paragraph-start "\t") |
| 105 | (use-local-map Edit-options-mode-map) | 105 | (setq-local truncate-lines t)) |
| 106 | (make-local-variable 'paragraph-separate) | ||
| 107 | (setq paragraph-separate "[^\^@-\^?]") | ||
| 108 | (make-local-variable 'paragraph-start) | ||
| 109 | (setq paragraph-start "\t") | ||
| 110 | (setq truncate-lines t) | ||
| 111 | (setq major-mode 'Edit-options-mode) | ||
| 112 | (setq mode-name "Options") | ||
| 113 | (run-mode-hooks 'Edit-options-mode-hook)) | ||
| 114 | 106 | ||
| 115 | (defun Edit-options-set () (interactive) | 107 | (defun Edit-options-set () (interactive) |
| 116 | (Edit-options-modify | 108 | (Edit-options-modify |
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 2e3f500766f..4bd0c4ddcf4 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el | |||
| @@ -185,19 +185,8 @@ GRID is the grid of positions to click.") | |||
| 185 | 185 | ||
| 186 | ;; Gameplay functions. | 186 | ;; Gameplay functions. |
| 187 | 187 | ||
| 188 | (put '5x5-mode 'mode-class 'special) | 188 | (define-derived-mode 5x5-mode special-mode "5x5" |
| 189 | 189 | "A mode for playing `5x5'." | |
| 190 | (defun 5x5-mode () | ||
| 191 | "A mode for playing `5x5'. | ||
| 192 | |||
| 193 | The key bindings for `5x5-mode' are: | ||
| 194 | |||
| 195 | \\{5x5-mode-map}" | ||
| 196 | (kill-all-local-variables) | ||
| 197 | (use-local-map 5x5-mode-map) | ||
| 198 | (setq major-mode '5x5-mode | ||
| 199 | mode-name "5x5") | ||
| 200 | (run-mode-hooks '5x5-mode-hook) | ||
| 201 | (setq buffer-read-only t | 190 | (setq buffer-read-only t |
| 202 | truncate-lines t) | 191 | truncate-lines t) |
| 203 | (buffer-disable-undo)) | 192 | (buffer-disable-undo)) |
diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index d38f799756b..ce2c928db0d 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el | |||
| @@ -113,9 +113,8 @@ | |||
| 113 | map)) | 113 | map)) |
| 114 | 114 | ||
| 115 | ;; Blackbox mode is suitable only for specially formatted data. | 115 | ;; Blackbox mode is suitable only for specially formatted data. |
| 116 | (put 'blackbox-mode 'mode-class 'special) | ||
| 117 | 116 | ||
| 118 | (defun blackbox-mode () | 117 | (define-derived-mode blackbox-mode special-mode "Blackbox" |
| 119 | "Major mode for playing blackbox. | 118 | "Major mode for playing blackbox. |
| 120 | To learn how to play blackbox, see the documentation for function `blackbox'. | 119 | To learn how to play blackbox, see the documentation for function `blackbox'. |
| 121 | 120 | ||
| @@ -124,13 +123,7 @@ The usual mnemonic keys move the cursor around the box. | |||
| 124 | 123 | ||
| 125 | \\[bb-romp] -- send in a ray from point, or toggle a ball at point | 124 | \\[bb-romp] -- send in a ray from point, or toggle a ball at point |
| 126 | \\[bb-done] -- end game and get score" | 125 | \\[bb-done] -- end game and get score" |
| 127 | (interactive) | 126 | (setq truncate-lines t)) |
| 128 | (kill-all-local-variables) | ||
| 129 | (use-local-map blackbox-mode-map) | ||
| 130 | (setq truncate-lines t) | ||
| 131 | (setq major-mode 'blackbox-mode) | ||
| 132 | (setq mode-name "Blackbox") | ||
| 133 | (run-mode-hooks 'blackbox-mode-hook)) | ||
| 134 | 127 | ||
| 135 | ;;;###autoload | 128 | ;;;###autoload |
| 136 | (defun blackbox (num) | 129 | (defun blackbox (num) |
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 665e98a69b2..ca7a4013796 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el | |||
| @@ -1108,25 +1108,24 @@ Set `bubbles--col-offset' and `bubbles--row-offset'." | |||
| 1108 | Use optional parameter POS instead of point if given." | 1108 | Use optional parameter POS instead of point if given." |
| 1109 | (when bubbles--playing | 1109 | (when bubbles--playing |
| 1110 | (unless pos (setq pos (point))) | 1110 | (unless pos (setq pos (point))) |
| 1111 | (condition-case err | 1111 | (with-demoted-errors "Bubbles: Internal error %s" |
| 1112 | (let ((char (char-after pos)) | 1112 | (let ((char (char-after pos)) |
| 1113 | (inhibit-read-only t) | 1113 | (inhibit-read-only t) |
| 1114 | (row (bubbles--row (point))) | 1114 | (row (bubbles--row (point))) |
| 1115 | (col (bubbles--col (point)))) | 1115 | (col (bubbles--col (point)))) |
| 1116 | (add-text-properties (point-min) (point-max) | 1116 | (add-text-properties (point-min) (point-max) |
| 1117 | '(face default active nil)) | 1117 | '(face default active nil)) |
| 1118 | (let ((count 0)) | 1118 | (let ((count 0)) |
| 1119 | (when (and row col (not (eq char (bubbles--empty-char)))) | 1119 | (when (and row col (not (eq char (bubbles--empty-char)))) |
| 1120 | (setq count (bubbles--mark-direct-neighbours row col char)) | 1120 | (setq count (bubbles--mark-direct-neighbours row col char)) |
| 1121 | (unless (> count 1) | 1121 | (unless (> count 1) |
| 1122 | (add-text-properties (point-min) (point-max) | 1122 | (add-text-properties (point-min) (point-max) |
| 1123 | '(face default active nil)) | 1123 | '(face default active nil)) |
| 1124 | (setq count 0))) | 1124 | (setq count 0))) |
| 1125 | (bubbles--update-neighbourhood-score count)) | 1125 | (bubbles--update-neighbourhood-score count)) |
| 1126 | (put-text-property (point-min) (point-max) 'pointer 'arrow) | 1126 | (put-text-property (point-min) (point-max) 'pointer 'arrow) |
| 1127 | (bubbles--update-faces-or-images) | 1127 | (bubbles--update-faces-or-images) |
| 1128 | (sit-for 0)) | 1128 | (sit-for 0))))) |
| 1129 | (error (message "Bubbles: Internal error %s" err))))) | ||
| 1130 | 1129 | ||
| 1131 | (defun bubbles--neighbourhood-available () | 1130 | (defun bubbles--neighbourhood-available () |
| 1132 | "Return t if another valid neighborhood is available." | 1131 | "Return t if another valid neighborhood is available." |
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index cf86d7a9de5..8ee633e3917 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el | |||
| @@ -233,10 +233,8 @@ | |||
| 233 | (put 'landmark-mode 'intangible 1) | 233 | (put 'landmark-mode 'intangible 1) |
| 234 | ;; This one is for when they set view-read-only to t: Landmark cannot | 234 | ;; This one is for when they set view-read-only to t: Landmark cannot |
| 235 | ;; allow View Mode to be activated in its buffer. | 235 | ;; allow View Mode to be activated in its buffer. |
| 236 | (put 'landmark-mode 'mode-class 'special) | 236 | (define-derived-mode landmark-mode special-mode "Lm" |
| 237 | 237 | "Major mode for playing Lm against Emacs. | |
| 238 | (defun landmark-mode () | ||
| 239 | "Major mode for playing Landmark against Emacs. | ||
| 240 | You and Emacs play in turn by marking a free square. You mark it with X | 238 | You and Emacs play in turn by marking a free square. You mark it with X |
| 241 | and Emacs marks it with O. The winner is the first to get five contiguous | 239 | and Emacs marks it with O. The winner is the first to get five contiguous |
| 242 | marks horizontally, vertically or in diagonal. | 240 | marks horizontally, vertically or in diagonal. |
| @@ -247,16 +245,9 @@ Other useful commands: | |||
| 247 | \\{landmark-mode-map} | 245 | \\{landmark-mode-map} |
| 248 | Entry to this mode calls the value of `landmark-mode-hook' if that value | 246 | Entry to this mode calls the value of `landmark-mode-hook' if that value |
| 249 | is non-nil. One interesting value is `turn-on-font-lock'." | 247 | is non-nil. One interesting value is `turn-on-font-lock'." |
| 250 | (interactive) | ||
| 251 | (kill-all-local-variables) | ||
| 252 | (setq major-mode 'landmark-mode | ||
| 253 | mode-name "Landmark") | ||
| 254 | (landmark-display-statistics) | 248 | (landmark-display-statistics) |
| 255 | (use-local-map landmark-mode-map) | 249 | (setq-local font-lock-defaults '(landmark-font-lock-keywords t)) |
| 256 | (make-local-variable 'font-lock-defaults) | 250 | (setq buffer-read-only t)) |
| 257 | (setq font-lock-defaults '(landmark-font-lock-keywords t) | ||
| 258 | buffer-read-only t) | ||
| 259 | (run-mode-hooks 'landmark-mode-hook)) | ||
| 260 | 251 | ||
| 261 | 252 | ||
| 262 | ;;;_ + THE SCORE TABLE. | 253 | ;;;_ + THE SCORE TABLE. |
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index e4e627a5293..f4c26bfc6c4 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el | |||
| @@ -94,7 +94,9 @@ The value t means never ding, and `error' means only ding on wrong input." | |||
| 94 | map) | 94 | map) |
| 95 | "Local keymap to use in Mult Puzzle.") | 95 | "Local keymap to use in Mult Puzzle.") |
| 96 | 96 | ||
| 97 | (defun mpuz-mode () | 97 | |
| 98 | |||
| 99 | (define-derived-mode mpuz-mode fundamental-mode "Mult Puzzle" | ||
| 98 | "Multiplication puzzle mode. | 100 | "Multiplication puzzle mode. |
| 99 | 101 | ||
| 100 | You have to guess which letters stand for which digits in the | 102 | You have to guess which letters stand for which digits in the |
| @@ -106,13 +108,7 @@ then the digit. Thus, to guess that A=3, type `A 3'. | |||
| 106 | To leave the game to do other editing work, just switch buffers. | 108 | To leave the game to do other editing work, just switch buffers. |
| 107 | Then you may resume the game with M-x mpuz. | 109 | Then you may resume the game with M-x mpuz. |
| 108 | You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." | 110 | You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." |
| 109 | (interactive) | 111 | (setq tab-width 30)) |
| 110 | (kill-all-local-variables) | ||
| 111 | (setq major-mode 'mpuz-mode | ||
| 112 | mode-name "Mult Puzzle" | ||
| 113 | tab-width 30) | ||
| 114 | (use-local-map mpuz-mode-map) | ||
| 115 | (run-mode-hooks 'mpuz-mode-hook)) | ||
| 116 | 112 | ||
| 117 | 113 | ||
| 118 | ;; Some variables for statistics | 114 | ;; Some variables for statistics |
diff --git a/lisp/play/snake.el b/lisp/play/snake.el index 85acfb116d2..4c110914298 100644 --- a/lisp/play/snake.el +++ b/lisp/play/snake.el | |||
| @@ -353,21 +353,13 @@ Argument SNAKE-BUFFER is the name of the buffer." | |||
| 353 | 353 | ||
| 354 | (put 'snake-mode 'mode-class 'special) | 354 | (put 'snake-mode 'mode-class 'special) |
| 355 | 355 | ||
| 356 | (defun snake-mode () | 356 | (define-derived-mode snake-mode special-mode "Snake" |
| 357 | "A mode for playing Snake. | 357 | "A mode for playing Snake." |
| 358 | |||
| 359 | Snake mode keybindings: | ||
| 360 | \\{snake-mode-map} | ||
| 361 | " | ||
| 362 | (kill-all-local-variables) | ||
| 363 | 358 | ||
| 364 | (add-hook 'kill-buffer-hook 'gamegrid-kill-timer nil t) | 359 | (add-hook 'kill-buffer-hook 'gamegrid-kill-timer nil t) |
| 365 | 360 | ||
| 366 | (use-local-map snake-null-map) | 361 | (use-local-map snake-null-map) |
| 367 | 362 | ||
| 368 | (setq major-mode 'snake-mode) | ||
| 369 | (setq mode-name "Snake") | ||
| 370 | |||
| 371 | (unless (featurep 'emacs) | 363 | (unless (featurep 'emacs) |
| 372 | (setq mode-popup-menu | 364 | (setq mode-popup-menu |
| 373 | '("Snake Commands" | 365 | '("Snake Commands" |
| @@ -382,9 +374,7 @@ Snake mode keybindings: | |||
| 382 | (setq gamegrid-use-glyphs snake-use-glyphs-flag) | 374 | (setq gamegrid-use-glyphs snake-use-glyphs-flag) |
| 383 | (setq gamegrid-use-color snake-use-color-flag) | 375 | (setq gamegrid-use-color snake-use-color-flag) |
| 384 | 376 | ||
| 385 | (gamegrid-init (snake-display-options)) | 377 | (gamegrid-init (snake-display-options))) |
| 386 | |||
| 387 | (run-mode-hooks 'snake-mode-hook)) | ||
| 388 | 378 | ||
| 389 | ;;;###autoload | 379 | ;;;###autoload |
| 390 | (defun snake () | 380 | (defun snake () |
diff --git a/lisp/play/spook.el b/lisp/play/spook.el index 08c31d3878b..d2ecd3a62cc 100644 --- a/lisp/play/spook.el +++ b/lisp/play/spook.el | |||
| @@ -69,10 +69,6 @@ | |||
| 69 | "Checking authorization..." | 69 | "Checking authorization..." |
| 70 | "Checking authorization...Approved")) | 70 | "Checking authorization...Approved")) |
| 71 | 71 | ||
| 72 | ;; Note: the implementation that used to take up most of this file has been | ||
| 73 | ;; cleaned up, generalized, gratuitously broken by esr, and now resides in | ||
| 74 | ;; cookie1.el. | ||
| 75 | |||
| 76 | (provide 'spook) | 72 | (provide 'spook) |
| 77 | 73 | ||
| 78 | ;;; spook.el ends here | 74 | ;;; spook.el ends here |
diff --git a/lisp/profiler.el b/lisp/profiler.el index 609a0308cf0..93ab10015ea 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el | |||
| @@ -256,10 +256,9 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." | |||
| 256 | (defun profiler-calltree-find (tree entry) | 256 | (defun profiler-calltree-find (tree entry) |
| 257 | "Return a child tree of ENTRY under TREE." | 257 | "Return a child tree of ENTRY under TREE." |
| 258 | (let (result (children (profiler-calltree-children tree))) | 258 | (let (result (children (profiler-calltree-children tree))) |
| 259 | ;; FIXME: Use `assoc'. | ||
| 260 | (while (and children (null result)) | 259 | (while (and children (null result)) |
| 261 | (let ((child (car children))) | 260 | (let ((child (car children))) |
| 262 | (when (equal (profiler-calltree-entry child) entry) | 261 | (when (function-equal (profiler-calltree-entry child) entry) |
| 263 | (setq result child)) | 262 | (setq result child)) |
| 264 | (setq children (cdr children)))) | 263 | (setq children (cdr children)))) |
| 265 | result)) | 264 | result)) |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 1e8d6cba8c4..e977a415d62 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1594,10 +1594,6 @@ Key bindings: | |||
| 1594 | ;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode)) | 1594 | ;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode)) |
| 1595 | ;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode)) | 1595 | ;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode)) |
| 1596 | 1596 | ||
| 1597 | ;;; Autoload directives must be on the top level, so we construct an | ||
| 1598 | ;;; autoload form instead. | ||
| 1599 | ;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code." t) | ||
| 1600 | |||
| 1601 | (c-define-abbrev-table 'awk-mode-abbrev-table | 1597 | (c-define-abbrev-table 'awk-mode-abbrev-table |
| 1602 | '(("else" "else" c-electric-continued-statement 0) | 1598 | '(("else" "else" c-electric-continued-statement 0) |
| 1603 | ("while" "while" c-electric-continued-statement 0)) | 1599 | ("while" "while" c-electric-continued-statement 0)) |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 770e78bb3b1..8a7d1e77bd2 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -412,15 +412,15 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', | |||
| 412 | "use cperl-vc-rcs-header or cperl-vc-sccs-header instead." | 412 | "use cperl-vc-rcs-header or cperl-vc-sccs-header instead." |
| 413 | "22.1") | 413 | "22.1") |
| 414 | 414 | ||
| 415 | (defcustom cperl-clobber-mode-lists | 415 | ;; (defcustom cperl-clobber-mode-lists |
| 416 | (not | 416 | ;; (not |
| 417 | (and | 417 | ;; (and |
| 418 | (boundp 'interpreter-mode-alist) | 418 | ;; (boundp 'interpreter-mode-alist) |
| 419 | (assoc "miniperl" interpreter-mode-alist) | 419 | ;; (assoc "miniperl" interpreter-mode-alist) |
| 420 | (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist))) | 420 | ;; (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist))) |
| 421 | "*Whether to install us into `interpreter-' and `extension' mode lists." | 421 | ;; "*Whether to install us into `interpreter-' and `extension' mode lists." |
| 422 | :type 'boolean | 422 | ;; :type 'boolean |
| 423 | :group 'cperl) | 423 | ;; :group 'cperl) |
| 424 | 424 | ||
| 425 | (defcustom cperl-info-on-command-no-prompt nil | 425 | (defcustom cperl-info-on-command-no-prompt nil |
| 426 | "*Not-nil (and non-null) means not to prompt on C-h f. | 426 | "*Not-nil (and non-null) means not to prompt on C-h f. |
| @@ -6535,7 +6535,7 @@ side-effect of memorizing only. Examples in `cperl-style-examples'." | |||
| 6535 | (eval '(mode-compile)))) ; Avoid a warning | 6535 | (eval '(mode-compile)))) ; Avoid a warning |
| 6536 | 6536 | ||
| 6537 | (declare-function Info-find-node "info" | 6537 | (declare-function Info-find-node "info" |
| 6538 | (filename nodename &optional no-going-back)) | 6538 | (filename nodename &optional no-going-back strict-case)) |
| 6539 | 6539 | ||
| 6540 | (defun cperl-info-buffer (type) | 6540 | (defun cperl-info-buffer (type) |
| 6541 | ;; Returns buffer with documentation. Creates if missing. | 6541 | ;; Returns buffer with documentation. Creates if missing. |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index a305393c7d8..7b08df8b85f 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -269,16 +269,15 @@ file modes." | |||
| 269 | (save-restriction | 269 | (save-restriction |
| 270 | (widen) | 270 | (widen) |
| 271 | (string= "#!" (buffer-substring (point-min) (+ 2 (point-min))))) | 271 | (string= "#!" (buffer-substring (point-min) (+ 2 (point-min))))) |
| 272 | (condition-case nil | 272 | ;; Eg file-modes can return nil (bug#9879). It should not, |
| 273 | (let* ((current-mode (file-modes (buffer-file-name))) | 273 | ;; in this context, but we should handle it all the same. |
| 274 | (add-mode (logand ?\111 (default-file-modes)))) | 274 | (with-demoted-errors "Unable to make file executable: %s" |
| 275 | (or (/= (logand ?\111 current-mode) 0) | 275 | (let* ((current-mode (file-modes (buffer-file-name))) |
| 276 | (zerop add-mode) | 276 | (add-mode (logand ?\111 (default-file-modes)))) |
| 277 | (set-file-modes (buffer-file-name) | 277 | (or (/= (logand ?\111 current-mode) 0) |
| 278 | (logior current-mode add-mode)))) | 278 | (zerop add-mode) |
| 279 | ;; Eg file-modes can return nil (bug#9879). It should not, | 279 | (set-file-modes (buffer-file-name) |
| 280 | ;; in this context, but we should handle it all the same. | 280 | (logior current-mode add-mode))))))) |
| 281 | (error (message "Unable to make file executable"))))) | ||
| 282 | 281 | ||
| 283 | (provide 'executable) | 282 | (provide 'executable) |
| 284 | 283 | ||
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index de1c26a7fa7..f20a57940be 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -1581,6 +1581,9 @@ code line." | |||
| 1581 | :group 'octave | 1581 | :group 'octave |
| 1582 | :version "24.4") | 1582 | :version "24.4") |
| 1583 | 1583 | ||
| 1584 | ;; Used in a mode derived from help-mode. | ||
| 1585 | (declare-function help-button-action "help-mode" (button)) | ||
| 1586 | |||
| 1584 | (define-button-type 'octave-help-file | 1587 | (define-button-type 'octave-help-file |
| 1585 | 'follow-link t | 1588 | 'follow-link t |
| 1586 | 'action #'help-button-action | 1589 | 'action #'help-button-action |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index be151bf8114..5f919bf495f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -225,7 +225,7 @@ | |||
| 225 | ;;;###autoload | 225 | ;;;###autoload |
| 226 | (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) | 226 | (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) |
| 227 | ;;;###autoload | 227 | ;;;###autoload |
| 228 | (add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) | 228 | (add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*") 'python-mode)) |
| 229 | 229 | ||
| 230 | (defgroup python nil | 230 | (defgroup python nil |
| 231 | "Python Language's flying circus support for Emacs." | 231 | "Python Language's flying circus support for Emacs." |
| @@ -2140,7 +2140,7 @@ the python shell: | |||
| 2140 | 1. When Optional Argument NOMAIN is non-nil everything under an | 2140 | 1. When Optional Argument NOMAIN is non-nil everything under an |
| 2141 | \"if __name__ == '__main__'\" block will be removed. | 2141 | \"if __name__ == '__main__'\" block will be removed. |
| 2142 | 2. When a subregion of the buffer is sent, it takes care of | 2142 | 2. When a subregion of the buffer is sent, it takes care of |
| 2143 | appending extra whitelines so tracebacks are correct. | 2143 | appending extra empty lines so tracebacks are correct. |
| 2144 | 3. Wraps indented regions under an \"if True:\" block so the | 2144 | 3. Wraps indented regions under an \"if True:\" block so the |
| 2145 | interpreter evaluates them correctly." | 2145 | interpreter evaluates them correctly." |
| 2146 | (let ((substring (buffer-substring-no-properties start end)) | 2146 | (let ((substring (buffer-substring-no-properties start end)) |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 0f868255589..902616e3023 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1377,6 +1377,7 @@ If the result is do-end block, it will always be multiline." | |||
| 1377 | ;; Unusual code layout confuses the byte-compiler. | 1377 | ;; Unusual code layout confuses the byte-compiler. |
| 1378 | (declare-function ruby-syntax-propertize-expansion "ruby-mode" ()) | 1378 | (declare-function ruby-syntax-propertize-expansion "ruby-mode" ()) |
| 1379 | (declare-function ruby-syntax-expansion-allowed-p "ruby-mode" (parse-state)) | 1379 | (declare-function ruby-syntax-expansion-allowed-p "ruby-mode" (parse-state)) |
| 1380 | (declare-function ruby-syntax-propertize-function "ruby-mode" (start end)) | ||
| 1380 | 1381 | ||
| 1381 | (if (eval-when-compile (fboundp #'syntax-propertize-rules)) | 1382 | (if (eval-when-compile (fboundp #'syntax-propertize-rules)) |
| 1382 | ;; New code that works independently from font-lock. | 1383 | ;; New code that works independently from font-lock. |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 292bc2369a6..3ea2afb6fc3 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -2170,11 +2170,18 @@ the visited file executable, and NO-QUERY-FLAG (the second argument) | |||
| 2170 | controls whether to query about making the visited file executable. | 2170 | controls whether to query about making the visited file executable. |
| 2171 | 2171 | ||
| 2172 | Calls the value of `sh-set-shell-hook' if set." | 2172 | Calls the value of `sh-set-shell-hook' if set." |
| 2173 | (interactive (list (completing-read (format "Shell \(default %s\): " | 2173 | (interactive (list (completing-read |
| 2174 | sh-shell-file) | 2174 | (format "Shell \(default %s\): " |
| 2175 | interpreter-mode-alist | 2175 | sh-shell-file) |
| 2176 | (lambda (x) (eq (cdr x) 'sh-mode)) | 2176 | ;; This used to use interpreter-mode-alist, but that is |
| 2177 | nil nil nil sh-shell-file) | 2177 | ;; no longer appropriate now that uses regexps. |
| 2178 | ;; Maybe there could be a separate variable that lists | ||
| 2179 | ;; the shells, used here and to construct i-mode-alist. | ||
| 2180 | ;; But the following is probably good enough: | ||
| 2181 | (append (mapcar (lambda (e) (symbol-name (car e))) | ||
| 2182 | sh-ancestor-alist) | ||
| 2183 | '("csh" "rc" "sh")) | ||
| 2184 | nil nil nil nil sh-shell-file) | ||
| 2178 | (eq executable-query 'function) | 2185 | (eq executable-query 'function) |
| 2179 | t)) | 2186 | t)) |
| 2180 | (if (string-match "\\.exe\\'" shell) | 2187 | (if (string-match "\\.exe\\'" shell) |
diff --git a/lisp/reveal.el b/lisp/reveal.el index 92c1178041c..6740f7e923f 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el | |||
| @@ -72,27 +72,26 @@ Each element has the form (WINDOW . OVERLAY).") | |||
| 72 | ;; - we only refresh spots in the current window. | 72 | ;; - we only refresh spots in the current window. |
| 73 | ;; FIXME: do we actually know that (current-buffer) = (window-buffer) ? | 73 | ;; FIXME: do we actually know that (current-buffer) = (window-buffer) ? |
| 74 | (with-local-quit | 74 | (with-local-quit |
| 75 | (condition-case err | 75 | (with-demoted-errors "Reveal: %s" |
| 76 | (let ((old-ols | 76 | (let ((old-ols |
| 77 | (delq nil | 77 | (delq nil |
| 78 | (mapcar | 78 | (mapcar |
| 79 | (lambda (x) | 79 | (lambda (x) |
| 80 | ;; We refresh any spot in the current window as well | 80 | ;; We refresh any spot in the current window as well |
| 81 | ;; as any spots associated with a dead window or | 81 | ;; as any spots associated with a dead window or |
| 82 | ;; a window which does not show this buffer any more. | 82 | ;; a window which does not show this buffer any more. |
| 83 | (cond | 83 | (cond |
| 84 | ((eq (car x) (selected-window)) (cdr x)) | 84 | ((eq (car x) (selected-window)) (cdr x)) |
| 85 | ((not (and (window-live-p (car x)) | 85 | ((not (and (window-live-p (car x)) |
| 86 | (eq (window-buffer (car x)) (current-buffer)))) | 86 | (eq (window-buffer (car x)) (current-buffer)))) |
| 87 | ;; Adopt this since it's owned by a window that's | 87 | ;; Adopt this since it's owned by a window that's |
| 88 | ;; either not live or at least not showing this | 88 | ;; either not live or at least not showing this |
| 89 | ;; buffer any more. | 89 | ;; buffer any more. |
| 90 | (setcar x (selected-window)) | 90 | (setcar x (selected-window)) |
| 91 | (cdr x)))) | 91 | (cdr x)))) |
| 92 | reveal-open-spots)))) | 92 | reveal-open-spots)))) |
| 93 | (setq old-ols (reveal-open-new-overlays old-ols)) | 93 | (setq old-ols (reveal-open-new-overlays old-ols)) |
| 94 | (reveal-close-old-overlays old-ols)) | 94 | (reveal-close-old-overlays old-ols))))) |
| 95 | (error (message "Reveal: %s" err))))) | ||
| 96 | 95 | ||
| 97 | (defun reveal-open-new-overlays (old-ols) | 96 | (defun reveal-open-new-overlays (old-ols) |
| 98 | (let ((repeat t)) | 97 | (let ((repeat t)) |
diff --git a/lisp/savehist.el b/lisp/savehist.el index 374e57feb1f..379818b2707 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | 49 | ||
| 50 | (require 'custom) | 50 | (require 'custom) |
| 51 | (eval-when-compile | 51 | (eval-when-compile |
| 52 | (require 'cl)) | 52 | (if (featurep 'xemacs) (require 'cl))) |
| 53 | 53 | ||
| 54 | ;; User variables | 54 | ;; User variables |
| 55 | 55 | ||
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 2ddac6d6c43..e070a7da489 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -255,8 +255,9 @@ may have changed\) back to `save-place-alist'." | |||
| 255 | (insert-file-contents file) | 255 | (insert-file-contents file) |
| 256 | (goto-char (point-min)) | 256 | (goto-char (point-min)) |
| 257 | (setq save-place-alist | 257 | (setq save-place-alist |
| 258 | (car (read-from-string | 258 | (with-demoted-errors "Error reading save-place-file: %S" |
| 259 | (buffer-substring (point-min) (point-max))))) | 259 | (car (read-from-string |
| 260 | (buffer-substring (point-min) (point-max)))))) | ||
| 260 | 261 | ||
| 261 | ;; If there is a limit, and we're over it, then we'll | 262 | ;; If there is a limit, and we're over it, then we'll |
| 262 | ;; have to truncate the end of the list: | 263 | ;; have to truncate the end of the list: |
diff --git a/lisp/shell.el b/lisp/shell.el index 3ca2564b65c..2047543f288 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*- | 1 | ;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1993-1997, 2000-2013 Free Software Foundation, | 3 | ;; Copyright (C) 1988, 1993-1997, 2000-2013 Free Software Foundation, Inc. |
| 4 | ;; Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 5 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| 7 | ;; Simon Marshall <simon@gnu.org> | 6 | ;; Simon Marshall <simon@gnu.org> |
| @@ -792,7 +791,7 @@ and `shell-pushd-dunique' control the behavior of the relevant command. | |||
| 792 | Environment variables are expanded, see function `substitute-in-file-name'." | 791 | Environment variables are expanded, see function `substitute-in-file-name'." |
| 793 | (if shell-dirtrackp | 792 | (if shell-dirtrackp |
| 794 | ;; We fail gracefully if we think the command will fail in the shell. | 793 | ;; We fail gracefully if we think the command will fail in the shell. |
| 795 | (condition-case nil | 794 | (with-demoted-errors "Couldn't cd: %s" |
| 796 | (let ((start (progn (string-match | 795 | (let ((start (progn (string-match |
| 797 | (concat "^" shell-command-separator-regexp) | 796 | (concat "^" shell-command-separator-regexp) |
| 798 | str) ; skip whitespace | 797 | str) ; skip whitespace |
| @@ -825,8 +824,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 825 | (setq start (progn (string-match shell-command-separator-regexp | 824 | (setq start (progn (string-match shell-command-separator-regexp |
| 826 | str end) | 825 | str end) |
| 827 | ;; skip again | 826 | ;; skip again |
| 828 | (match-end 0))))) | 827 | (match-end 0)))))))) |
| 829 | (error "Couldn't cd")))) | ||
| 830 | 828 | ||
| 831 | (defun shell-unquote-argument (string) | 829 | (defun shell-unquote-argument (string) |
| 832 | "Remove all kinds of shell quoting from STRING." | 830 | "Remove all kinds of shell quoting from STRING." |
| @@ -908,7 +906,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 908 | (cond ((> num (length shell-dirstack)) | 906 | (cond ((> num (length shell-dirstack)) |
| 909 | (message "Directory stack not that deep.")) | 907 | (message "Directory stack not that deep.")) |
| 910 | ((= num 0) | 908 | ((= num 0) |
| 911 | (error (message "Couldn't cd"))) | 909 | (error "Couldn't cd")) |
| 912 | (shell-pushd-dextract | 910 | (shell-pushd-dextract |
| 913 | (let ((dir (nth (1- num) shell-dirstack))) | 911 | (let ((dir (nth (1- num) shell-dirstack))) |
| 914 | (shell-process-popd arg) | 912 | (shell-process-popd arg) |
| @@ -1015,12 +1013,11 @@ command again." | |||
| 1015 | ds)) | 1013 | ds)) |
| 1016 | (setq i (match-end 0))) | 1014 | (setq i (match-end 0))) |
| 1017 | (let ((ds (nreverse ds))) | 1015 | (let ((ds (nreverse ds))) |
| 1018 | (condition-case nil | 1016 | (with-demoted-errors "Couldn't cd: %s" |
| 1019 | (progn (shell-cd (car ds)) | 1017 | (shell-cd (car ds)) |
| 1020 | (setq shell-dirstack (cdr ds) | 1018 | (setq shell-dirstack (cdr ds) |
| 1021 | shell-last-dir (car shell-dirstack)) | 1019 | shell-last-dir (car shell-dirstack)) |
| 1022 | (shell-dirstack-message)) | 1020 | (shell-dirstack-message))))) |
| 1023 | (error (message "Couldn't cd")))))) | ||
| 1024 | (if started-at-pmark (goto-char (marker-position pmark))))) | 1021 | (if started-at-pmark (goto-char (marker-position pmark))))) |
| 1025 | 1022 | ||
| 1026 | ;; For your typing convenience: | 1023 | ;; For your typing convenience: |
diff --git a/lisp/simple.el b/lisp/simple.el index c5e5b313b7b..593f36d1ee1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1231,7 +1231,7 @@ is a string to insert in the minibuffer before reading. | |||
| 1231 | Such arguments are used as in `read-from-minibuffer'.)" | 1231 | Such arguments are used as in `read-from-minibuffer'.)" |
| 1232 | ;; Used for interactive spec `x'. | 1232 | ;; Used for interactive spec `x'. |
| 1233 | (read-from-minibuffer prompt initial-contents minibuffer-local-map | 1233 | (read-from-minibuffer prompt initial-contents minibuffer-local-map |
| 1234 | t minibuffer-history)) | 1234 | t 'minibuffer-history)) |
| 1235 | 1235 | ||
| 1236 | (defun eval-minibuffer (prompt &optional initial-contents) | 1236 | (defun eval-minibuffer (prompt &optional initial-contents) |
| 1237 | "Return value of Lisp expression read using the minibuffer. | 1237 | "Return value of Lisp expression read using the minibuffer. |
| @@ -3180,12 +3180,18 @@ see other processes running on the system, use `list-system-processes'." | |||
| 3180 | nil) | 3180 | nil) |
| 3181 | 3181 | ||
| 3182 | (defvar universal-argument-map | 3182 | (defvar universal-argument-map |
| 3183 | (let ((map (make-sparse-keymap))) | 3183 | (let ((map (make-sparse-keymap)) |
| 3184 | (define-key map [t] 'universal-argument-other-key) | 3184 | (universal-argument-minus |
| 3185 | (define-key map (vector meta-prefix-char t) 'universal-argument-other-key) | 3185 | ;; For backward compatibility, minus with no modifiers is an ordinary |
| 3186 | (define-key map [switch-frame] nil) | 3186 | ;; command if digits have already been entered. |
| 3187 | `(menu-item "" negative-argument | ||
| 3188 | :filter ,(lambda (cmd) | ||
| 3189 | (if (integerp prefix-arg) nil cmd))))) | ||
| 3190 | (define-key map [switch-frame] | ||
| 3191 | (lambda (e) (interactive "e") | ||
| 3192 | (handle-switch-frame e) (universal-argument--mode))) | ||
| 3187 | (define-key map [?\C-u] 'universal-argument-more) | 3193 | (define-key map [?\C-u] 'universal-argument-more) |
| 3188 | (define-key map [?-] 'universal-argument-minus) | 3194 | (define-key map [?-] universal-argument-minus) |
| 3189 | (define-key map [?0] 'digit-argument) | 3195 | (define-key map [?0] 'digit-argument) |
| 3190 | (define-key map [?1] 'digit-argument) | 3196 | (define-key map [?1] 'digit-argument) |
| 3191 | (define-key map [?2] 'digit-argument) | 3197 | (define-key map [?2] 'digit-argument) |
| @@ -3206,30 +3212,12 @@ see other processes running on the system, use `list-system-processes'." | |||
| 3206 | (define-key map [kp-7] 'digit-argument) | 3212 | (define-key map [kp-7] 'digit-argument) |
| 3207 | (define-key map [kp-8] 'digit-argument) | 3213 | (define-key map [kp-8] 'digit-argument) |
| 3208 | (define-key map [kp-9] 'digit-argument) | 3214 | (define-key map [kp-9] 'digit-argument) |
| 3209 | (define-key map [kp-subtract] 'universal-argument-minus) | 3215 | (define-key map [kp-subtract] universal-argument-minus) |
| 3210 | map) | 3216 | map) |
| 3211 | "Keymap used while processing \\[universal-argument].") | 3217 | "Keymap used while processing \\[universal-argument].") |
| 3212 | 3218 | ||
| 3213 | (defvar universal-argument-num-events nil | 3219 | (defun universal-argument--mode () |
| 3214 | "Number of argument-specifying events read by `universal-argument'. | 3220 | (set-temporary-overlay-map universal-argument-map)) |
| 3215 | `universal-argument-other-key' uses this to discard those events | ||
| 3216 | from (this-command-keys), and reread only the final command.") | ||
| 3217 | |||
| 3218 | (defvar saved-overriding-map t | ||
| 3219 | "The saved value of `overriding-terminal-local-map'. | ||
| 3220 | That variable gets restored to this value on exiting \"universal | ||
| 3221 | argument mode\".") | ||
| 3222 | |||
| 3223 | (defun save&set-overriding-map (map) | ||
| 3224 | "Set `overriding-terminal-local-map' to MAP." | ||
| 3225 | (when (eq saved-overriding-map t) | ||
| 3226 | (setq saved-overriding-map overriding-terminal-local-map) | ||
| 3227 | (setq overriding-terminal-local-map map))) | ||
| 3228 | |||
| 3229 | (defun restore-overriding-map () | ||
| 3230 | "Restore `overriding-terminal-local-map' to its saved value." | ||
| 3231 | (setq overriding-terminal-local-map saved-overriding-map) | ||
| 3232 | (setq saved-overriding-map t)) | ||
| 3233 | 3221 | ||
| 3234 | (defun universal-argument () | 3222 | (defun universal-argument () |
| 3235 | "Begin a numeric argument for the following command. | 3223 | "Begin a numeric argument for the following command. |
| @@ -3243,33 +3231,27 @@ which is different in effect from any particular numeric argument. | |||
| 3243 | These commands include \\[set-mark-command] and \\[start-kbd-macro]." | 3231 | These commands include \\[set-mark-command] and \\[start-kbd-macro]." |
| 3244 | (interactive) | 3232 | (interactive) |
| 3245 | (setq prefix-arg (list 4)) | 3233 | (setq prefix-arg (list 4)) |
| 3246 | (setq universal-argument-num-events (length (this-command-keys))) | 3234 | (universal-argument--mode)) |
| 3247 | (save&set-overriding-map universal-argument-map)) | ||
| 3248 | 3235 | ||
| 3249 | ;; A subsequent C-u means to multiply the factor by 4 if we've typed | ||
| 3250 | ;; nothing but C-u's; otherwise it means to terminate the prefix arg. | ||
| 3251 | (defun universal-argument-more (arg) | 3236 | (defun universal-argument-more (arg) |
| 3237 | ;; A subsequent C-u means to multiply the factor by 4 if we've typed | ||
| 3238 | ;; nothing but C-u's; otherwise it means to terminate the prefix arg. | ||
| 3252 | (interactive "P") | 3239 | (interactive "P") |
| 3253 | (if (consp arg) | 3240 | (setq prefix-arg (if (consp arg) |
| 3254 | (setq prefix-arg (list (* 4 (car arg)))) | 3241 | (list (* 4 (car arg))) |
| 3255 | (if (eq arg '-) | 3242 | (if (eq arg '-) |
| 3256 | (setq prefix-arg (list -4)) | 3243 | (list -4) |
| 3257 | (setq prefix-arg arg) | 3244 | arg))) |
| 3258 | (restore-overriding-map))) | 3245 | (when (consp prefix-arg) (universal-argument--mode))) |
| 3259 | (setq universal-argument-num-events (length (this-command-keys)))) | ||
| 3260 | 3246 | ||
| 3261 | (defun negative-argument (arg) | 3247 | (defun negative-argument (arg) |
| 3262 | "Begin a negative numeric argument for the next command. | 3248 | "Begin a negative numeric argument for the next command. |
| 3263 | \\[universal-argument] following digits or minus sign ends the argument." | 3249 | \\[universal-argument] following digits or minus sign ends the argument." |
| 3264 | (interactive "P") | 3250 | (interactive "P") |
| 3265 | (cond ((integerp arg) | 3251 | (setq prefix-arg (cond ((integerp arg) (- arg)) |
| 3266 | (setq prefix-arg (- arg))) | 3252 | ((eq arg '-) nil) |
| 3267 | ((eq arg '-) | 3253 | (t '-))) |
| 3268 | (setq prefix-arg nil)) | 3254 | (universal-argument--mode)) |
| 3269 | (t | ||
| 3270 | (setq prefix-arg '-))) | ||
| 3271 | (setq universal-argument-num-events (length (this-command-keys))) | ||
| 3272 | (save&set-overriding-map universal-argument-map)) | ||
| 3273 | 3255 | ||
| 3274 | (defun digit-argument (arg) | 3256 | (defun digit-argument (arg) |
| 3275 | "Part of the numeric argument for the next command. | 3257 | "Part of the numeric argument for the next command. |
| @@ -3279,37 +3261,15 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." | |||
| 3279 | last-command-event | 3261 | last-command-event |
| 3280 | (get last-command-event 'ascii-character))) | 3262 | (get last-command-event 'ascii-character))) |
| 3281 | (digit (- (logand char ?\177) ?0))) | 3263 | (digit (- (logand char ?\177) ?0))) |
| 3282 | (cond ((integerp arg) | 3264 | (setq prefix-arg (cond ((integerp arg) |
| 3283 | (setq prefix-arg (+ (* arg 10) | 3265 | (+ (* arg 10) |
| 3284 | (if (< arg 0) (- digit) digit)))) | 3266 | (if (< arg 0) (- digit) digit))) |
| 3285 | ((eq arg '-) | 3267 | ((eq arg '-) |
| 3286 | ;; Treat -0 as just -, so that -01 will work. | 3268 | ;; Treat -0 as just -, so that -01 will work. |
| 3287 | (setq prefix-arg (if (zerop digit) '- (- digit)))) | 3269 | (if (zerop digit) '- (- digit))) |
| 3288 | (t | 3270 | (t |
| 3289 | (setq prefix-arg digit)))) | 3271 | digit)))) |
| 3290 | (setq universal-argument-num-events (length (this-command-keys))) | 3272 | (universal-argument--mode)) |
| 3291 | (save&set-overriding-map universal-argument-map)) | ||
| 3292 | |||
| 3293 | ;; For backward compatibility, minus with no modifiers is an ordinary | ||
| 3294 | ;; command if digits have already been entered. | ||
| 3295 | (defun universal-argument-minus (arg) | ||
| 3296 | (interactive "P") | ||
| 3297 | (if (integerp arg) | ||
| 3298 | (universal-argument-other-key arg) | ||
| 3299 | (negative-argument arg))) | ||
| 3300 | |||
| 3301 | ;; Anything else terminates the argument and is left in the queue to be | ||
| 3302 | ;; executed as a command. | ||
| 3303 | (defun universal-argument-other-key (arg) | ||
| 3304 | (interactive "P") | ||
| 3305 | (setq prefix-arg arg) | ||
| 3306 | (let* ((key (this-command-keys)) | ||
| 3307 | (keylist (listify-key-sequence key))) | ||
| 3308 | (setq unread-command-events | ||
| 3309 | (append (nthcdr universal-argument-num-events keylist) | ||
| 3310 | unread-command-events))) | ||
| 3311 | (reset-this-command-lengths) | ||
| 3312 | (restore-overriding-map)) | ||
| 3313 | 3273 | ||
| 3314 | 3274 | ||
| 3315 | (defvar filter-buffer-substring-functions nil | 3275 | (defvar filter-buffer-substring-functions nil |
diff --git a/lisp/subr.el b/lisp/subr.el index 0a28d4778d4..7df1e86b5bf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3350,16 +3350,22 @@ even if this catches the signal." | |||
| 3350 | (define-obsolete-function-alias 'condition-case-no-debug | 3350 | (define-obsolete-function-alias 'condition-case-no-debug |
| 3351 | 'condition-case-unless-debug "24.1") | 3351 | 'condition-case-unless-debug "24.1") |
| 3352 | 3352 | ||
| 3353 | (defmacro with-demoted-errors (&rest body) | 3353 | (defmacro with-demoted-errors (format &rest body) |
| 3354 | "Run BODY and demote any errors to simple messages. | 3354 | "Run BODY and demote any errors to simple messages. |
| 3355 | If `debug-on-error' is non-nil, run BODY without catching its errors. | 3355 | If `debug-on-error' is non-nil, run BODY without catching its errors. |
| 3356 | This is to be used around code which is not expected to signal an error | 3356 | This is to be used around code which is not expected to signal an error |
| 3357 | but which should be robust in the unexpected case that an error is signaled." | 3357 | but which should be robust in the unexpected case that an error is signaled. |
| 3358 | (declare (debug t) (indent 0)) | 3358 | For backward compatibility, if FORMAT is not a constant string, it |
| 3359 | (let ((err (make-symbol "err"))) | 3359 | is assumed to be part of BODY, in which case the message format |
| 3360 | used is \"Error: %S\"." | ||
| 3361 | (declare (debug t) (indent 1)) | ||
| 3362 | (let ((err (make-symbol "err")) | ||
| 3363 | (format (if (and (stringp format) body) format | ||
| 3364 | (prog1 "Error: %S" | ||
| 3365 | (if format (push format body)))))) | ||
| 3360 | `(condition-case-unless-debug ,err | 3366 | `(condition-case-unless-debug ,err |
| 3361 | (progn ,@body) | 3367 | ,(macroexp-progn body) |
| 3362 | (error (message "Error: %S" ,err) nil)))) | 3368 | (error (message ,format ,err) nil)))) |
| 3363 | 3369 | ||
| 3364 | (defmacro combine-after-change-calls (&rest body) | 3370 | (defmacro combine-after-change-calls (&rest body) |
| 3365 | "Execute BODY, but don't call the after-change functions till the end. | 3371 | "Execute BODY, but don't call the after-change functions till the end. |
| @@ -3901,12 +3907,27 @@ This function is called directly from the C code." | |||
| 3901 | (mapc #'funcall (cdr a-l-element)))) | 3907 | (mapc #'funcall (cdr a-l-element)))) |
| 3902 | ;; Complain when the user uses obsolete files. | 3908 | ;; Complain when the user uses obsolete files. |
| 3903 | (when (string-match-p "/obsolete/[^/]*\\'" abs-file) | 3909 | (when (string-match-p "/obsolete/[^/]*\\'" abs-file) |
| 3904 | (run-with-timer 0 nil | 3910 | ;; Maybe we should just use display-warning? This seems yucky... |
| 3905 | (lambda (file) | 3911 | (let* ((file (file-name-nondirectory abs-file)) |
| 3906 | (message "Package %s is obsolete!" | 3912 | (msg (format "Package %s is obsolete!" |
| 3907 | (substring file 0 | 3913 | (substring file 0 |
| 3908 | (string-match "\\.elc?\\>" file)))) | 3914 | (string-match "\\.elc?\\>" file))))) |
| 3909 | (file-name-nondirectory abs-file))) | 3915 | ;; Cribbed from cl--compiling-file. |
| 3916 | (if (and (boundp 'byte-compile--outbuffer) | ||
| 3917 | (bufferp (symbol-value 'byte-compile--outbuffer)) | ||
| 3918 | (equal (buffer-name (symbol-value 'byte-compile--outbuffer)) | ||
| 3919 | " *Compiler Output*")) | ||
| 3920 | ;; Don't warn about obsolete files using other obsolete files. | ||
| 3921 | (unless (and (stringp byte-compile-current-file) | ||
| 3922 | (string-match-p "/obsolete/[^/]*\\'" | ||
| 3923 | (expand-file-name | ||
| 3924 | byte-compile-current-file | ||
| 3925 | byte-compile-root-dir))) | ||
| 3926 | (byte-compile-log-warning msg)) | ||
| 3927 | (run-with-timer 0 nil | ||
| 3928 | (lambda (msg) | ||
| 3929 | (message "%s" msg)) msg)))) | ||
| 3930 | |||
| 3910 | ;; Finally, run any other hook. | 3931 | ;; Finally, run any other hook. |
| 3911 | (run-hook-with-args 'after-load-functions abs-file)) | 3932 | (run-hook-with-args 'after-load-functions abs-file)) |
| 3912 | 3933 | ||
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index b92ca1244fb..b4693a5451a 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -104,7 +104,6 @@ The properties returned may include `top', `left', `height', and `width'." | |||
| 104 | (define-key global-map [?\s-~] 'ns-prev-frame) | 104 | (define-key global-map [?\s-~] 'ns-prev-frame) |
| 105 | (define-key global-map [?\s--] 'center-line) | 105 | (define-key global-map [?\s--] 'center-line) |
| 106 | (define-key global-map [?\s-:] 'ispell) | 106 | (define-key global-map [?\s-:] 'ispell) |
| 107 | (define-key global-map [?\s-\;] 'ispell-next) | ||
| 108 | (define-key global-map [?\s-?] 'info) | 107 | (define-key global-map [?\s-?] 'info) |
| 109 | (define-key global-map [?\s-^] 'kill-some-buffers) | 108 | (define-key global-map [?\s-^] 'kill-some-buffers) |
| 110 | (define-key global-map [?\s-&] 'kill-this-buffer) | 109 | (define-key global-map [?\s-&] 'kill-this-buffer) |
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 96831cea9a6..e5229bd3f0a 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; pc-win.el --- setup support for `PC windows' (whatever that is) | 1 | ;;; pc-win.el --- setup support for `PC windows' (whatever that is) |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1996-1997, 1999, 2001-2013 Free Software | 3 | ;; Copyright (C) 1994, 1996-1997, 1999, 2001-2013 |
| 4 | ;; Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Morten Welinder <terra@diku.dk> | 6 | ;; Author: Morten Welinder <terra@diku.dk> |
| 7 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -238,9 +238,8 @@ is not used)." | |||
| 238 | (if x-select-enable-clipboard | 238 | (if x-select-enable-clipboard |
| 239 | (let (text) | 239 | (let (text) |
| 240 | ;; Don't die if x-get-selection signals an error. | 240 | ;; Don't die if x-get-selection signals an error. |
| 241 | (condition-case c | 241 | (with-demoted-errors "w16-get-clipboard-data:%s" |
| 242 | (setq text (w16-get-clipboard-data)) | 242 | (setq text (w16-get-clipboard-data))) |
| 243 | (error (message "w16-get-clipboard-data:%s" c))) | ||
| 244 | (if (string= text "") (setq text nil)) | 243 | (if (string= text "") (setq text nil)) |
| 245 | (cond | 244 | (cond |
| 246 | ((not text) nil) | 245 | ((not text) nil) |
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 9ab592587c9..fc47bf0fc10 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -1481,7 +1481,7 @@ When called interactively, displays the version." | |||
| 1481 | (format "Ediff %s of %s" ediff-version ediff-date))) | 1481 | (format "Ediff %s of %s" ediff-version ediff-date))) |
| 1482 | 1482 | ||
| 1483 | ;; info is run first, and will autoload info.el. | 1483 | ;; info is run first, and will autoload info.el. |
| 1484 | (declare-function Info-goto-node "info" (nodename &optional fork)) | 1484 | (declare-function Info-goto-node "info" (nodename &optional fork strict-case)) |
| 1485 | 1485 | ||
| 1486 | ;;;###autoload | 1486 | ;;;###autoload |
| 1487 | (defun ediff-documentation (&optional node) | 1487 | (defun ediff-documentation (&optional node) |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 5f5416dc2ff..00604088c17 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -320,11 +320,10 @@ in the repository root directory of FILE." | |||
| 320 | ("^Using saved parent location: \\(.+\\)" 1 nil nil 0)) | 320 | ("^Using saved parent location: \\(.+\\)" 1 nil nil 0)) |
| 321 | "Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.") | 321 | "Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.") |
| 322 | 322 | ||
| 323 | ;; Follows vc-bzr-(async-)command, which uses vc-do-(async-)command | 323 | ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. |
| 324 | ;; from vc-dispatcher. | ||
| 325 | (declare-function vc-exec-after "vc-dispatcher" (code)) | 324 | (declare-function vc-exec-after "vc-dispatcher" (code)) |
| 326 | ;; Follows vc-exec-after. | ||
| 327 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) | 325 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) |
| 326 | (declare-function vc-compilation-mode "vc-dispatcher" (backend)) | ||
| 328 | 327 | ||
| 329 | (defun vc-bzr-pull (prompt) | 328 | (defun vc-bzr-pull (prompt) |
| 330 | "Pull changes into the current Bzr branch. | 329 | "Pull changes into the current Bzr branch. |
| @@ -354,6 +353,7 @@ prompt for the Bzr command to run." | |||
| 354 | (setq vc-bzr-program (car args) | 353 | (setq vc-bzr-program (car args) |
| 355 | command (cadr args) | 354 | command (cadr args) |
| 356 | args (cddr args))) | 355 | args (cddr args))) |
| 356 | (require 'vc-dispatcher) | ||
| 357 | (let ((buf (apply 'vc-bzr-async-command command args))) | 357 | (let ((buf (apply 'vc-bzr-async-command command args))) |
| 358 | (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr))) | 358 | (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr))) |
| 359 | (vc-set-async-update buf)))) | 359 | (vc-set-async-update buf)))) |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 931193c46e0..11a30991391 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -1226,10 +1226,11 @@ is non-nil." | |||
| 1226 | table (lambda () (vc-cvs-revision-table (car files)))))) | 1226 | table (lambda () (vc-cvs-revision-table (car files)))))) |
| 1227 | table)) | 1227 | table)) |
| 1228 | 1228 | ||
| 1229 | (defun vc-cvs-ignore (file) | 1229 | (defun vc-cvs-ignore (file &optional _directory _remove) |
| 1230 | "Ignore FILE under CVS." | 1230 | "Ignore FILE under CVS." |
| 1231 | (cvs-append-to-ignore (file-name-directory file) file)) | 1231 | (cvs-append-to-ignore (file-name-directory file) file)) |
| 1232 | 1232 | ||
| 1233 | ;; FIXME This should be in the vc-cvs- namespace if it is to live here. | ||
| 1233 | (defun cvs-append-to-ignore (dir str &optional old-dir) | 1234 | (defun cvs-append-to-ignore (dir str &optional old-dir) |
| 1234 | "In DIR, add STR to the .cvsignore file. | 1235 | "In DIR, add STR to the .cvsignore file. |
| 1235 | If OLD-DIR is non-nil, then this is a directory that we don't want | 1236 | If OLD-DIR is non-nil, then this is a directory that we don't want |
| @@ -1245,7 +1246,9 @@ to hear about anymore." | |||
| 1245 | (goto-char (point-max)) | 1246 | (goto-char (point-max)) |
| 1246 | (unless (bolp) (insert "\n")) | 1247 | (unless (bolp) (insert "\n")) |
| 1247 | (insert str (if old-dir "/\n" "\n")) | 1248 | (insert str (if old-dir "/\n" "\n")) |
| 1248 | (if cvs-sort-ignore-file (sort-lines nil (point-min) (point-max))) | 1249 | ;; FIXME this is a pcvs variable. |
| 1250 | (if (bound-and-true-p cvs-sort-ignore-file) | ||
| 1251 | (sort-lines nil (point-min) (point-max))) | ||
| 1249 | (save-buffer))) | 1252 | (save-buffer))) |
| 1250 | 1253 | ||
| 1251 | (provide 'vc-cvs) | 1254 | (provide 'vc-cvs) |
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 7888752553e..62fb72d0fbc 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el | |||
| @@ -398,6 +398,8 @@ Display the buffer in some window, but don't select it." | |||
| 398 | (set (make-local-variable 'compilation-error-regexp-alist) | 398 | (set (make-local-variable 'compilation-error-regexp-alist) |
| 399 | error-regexp-alist))) | 399 | error-regexp-alist))) |
| 400 | 400 | ||
| 401 | (declare-function vc-dir-refresh "vc-dir" ()) | ||
| 402 | |||
| 401 | (defun vc-set-async-update (process-buffer) | 403 | (defun vc-set-async-update (process-buffer) |
| 402 | "Set a `vc-exec-after' action appropriate to the current buffer. | 404 | "Set a `vc-exec-after' action appropriate to the current buffer. |
| 403 | This action will update the current buffer after the current | 405 | This action will update the current buffer after the current |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index a4ce3a2c46c..e730db17526 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -706,6 +706,9 @@ It is based on `log-edit-mode', and has Git-specific extensions.") | |||
| 706 | '(("^ \\(.+\\) |" 1 nil nil 0)) | 706 | '(("^ \\(.+\\) |" 1 nil nil 0)) |
| 707 | "Value of `compilation-error-regexp-alist' in *vc-git* buffers.") | 707 | "Value of `compilation-error-regexp-alist' in *vc-git* buffers.") |
| 708 | 708 | ||
| 709 | ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. | ||
| 710 | (declare-function vc-compilation-mode "vc-dispatcher" (backend)) | ||
| 711 | |||
| 709 | (defun vc-git-pull (prompt) | 712 | (defun vc-git-pull (prompt) |
| 710 | "Pull changes into the current Git branch. | 713 | "Pull changes into the current Git branch. |
| 711 | Normally, this runs \"git pull\". If PROMPT is non-nil, prompt | 714 | Normally, this runs \"git pull\". If PROMPT is non-nil, prompt |
| @@ -725,6 +728,7 @@ for the Git command to run." | |||
| 725 | (setq git-program (car args) | 728 | (setq git-program (car args) |
| 726 | command (cadr args) | 729 | command (cadr args) |
| 727 | args (cddr args))) | 730 | args (cddr args))) |
| 731 | (require 'vc-dispatcher) | ||
| 728 | (apply 'vc-do-async-command buffer root git-program command args) | 732 | (apply 'vc-do-async-command buffer root git-program command args) |
| 729 | (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git))) | 733 | (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git))) |
| 730 | (vc-set-async-update buffer))) | 734 | (vc-set-async-update buffer))) |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index afc76c09742..36f27548123 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -234,12 +234,12 @@ RESULT is a list of conses (FILE . STATE) for directory DIR." | |||
| 234 | (vc-run-delayed | 234 | (vc-run-delayed |
| 235 | (vc-svn-after-dir-status callback remote)))) | 235 | (vc-svn-after-dir-status callback remote)))) |
| 236 | 236 | ||
| 237 | (defun vc-svn-dir-status-files (dir files _default-state callback) | 237 | (defun vc-svn-dir-status-files (_dir files _default-state callback) |
| 238 | (apply 'vc-svn-command (current-buffer) 'async nil "status" files) | 238 | (apply 'vc-svn-command (current-buffer) 'async nil "status" files) |
| 239 | (vc-run-delayed | 239 | (vc-run-delayed |
| 240 | (vc-svn-after-dir-status callback))) | 240 | (vc-svn-after-dir-status callback))) |
| 241 | 241 | ||
| 242 | (defun vc-svn-dir-extra-headers (dir) | 242 | (defun vc-svn-dir-extra-headers (_dir) |
| 243 | "Generate extra status headers for a Subversion working copy." | 243 | "Generate extra status headers for a Subversion working copy." |
| 244 | (let (process-file-side-effects) | 244 | (let (process-file-side-effects) |
| 245 | (vc-svn-command "*vc*" 0 nil "info")) | 245 | (vc-svn-command "*vc*" 0 nil "info")) |
| @@ -352,7 +352,7 @@ This is only possible if SVN is responsible for FILE's directory.") | |||
| 352 | (concat "-r" rev)) | 352 | (concat "-r" rev)) |
| 353 | (vc-switches 'SVN 'checkout)))) | 353 | (vc-switches 'SVN 'checkout)))) |
| 354 | 354 | ||
| 355 | (defun vc-svn-ignore (file &optional directory remove) | 355 | (defun vc-svn-ignore (file &optional _directory _remove) |
| 356 | "Ignore FILE under Subversion. | 356 | "Ignore FILE under Subversion. |
| 357 | FILE is a file wildcard, relative to the root directory of DIRECTORY." | 357 | FILE is a file wildcard, relative to the root directory of DIRECTORY." |
| 358 | (vc-svn-command t 0 file "propedit" "svn:ignore")) | 358 | (vc-svn-command t 0 file "propedit" "svn:ignore")) |
| @@ -593,7 +593,7 @@ NAME is assumed to be a URL." | |||
| 593 | (vc-svn-command nil 0 dir "copy" name) | 593 | (vc-svn-command nil 0 dir "copy" name) |
| 594 | (when branchp (vc-svn-retrieve-tag dir name nil))) | 594 | (when branchp (vc-svn-retrieve-tag dir name nil))) |
| 595 | 595 | ||
| 596 | (defun vc-svn-retrieve-tag (dir name update) | 596 | (defun vc-svn-retrieve-tag (dir name _update) |
| 597 | "Retrieve a tag at and below DIR. | 597 | "Retrieve a tag at and below DIR. |
| 598 | NAME is the name of the tag; if it is empty, do a `svn update'. | 598 | NAME is the name of the tag; if it is empty, do a `svn update'. |
| 599 | If UPDATE is non-nil, then update (resynch) any affected buffers. | 599 | If UPDATE is non-nil, then update (resynch) any affected buffers. |
| @@ -674,19 +674,23 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 674 | 674 | ||
| 675 | (defun vc-svn-parse-status (&optional filename) | 675 | (defun vc-svn-parse-status (&optional filename) |
| 676 | "Parse output of \"svn status\" command in the current buffer. | 676 | "Parse output of \"svn status\" command in the current buffer. |
| 677 | Set file properties accordingly. Unless FILENAME is non-nil, parse only | 677 | Set file properties accordingly. If FILENAME is non-nil, return its status." |
| 678 | information about FILENAME and return its status." | 678 | (let (multifile file status propstat) |
| 679 | (let (file status propstat) | ||
| 680 | (goto-char (point-min)) | 679 | (goto-char (point-min)) |
| 681 | (while (re-search-forward | 680 | (while (re-search-forward |
| 682 | ;; Ignore the files with status X. | 681 | ;; Ignore the files with status X. |
| 683 | "^\\(?:\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t) | 682 | "^\\(?:\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t) |
| 684 | ;; If the username contains spaces, the output format is ambiguous, | 683 | ;; If the username contains spaces, the output format is ambiguous, |
| 685 | ;; so don't trust the output's filename unless we have to. | 684 | ;; so don't trust the output's filename unless we have to. |
| 686 | (setq file (or filename | 685 | (setq file (or (unless multifile filename) |
| 687 | (expand-file-name | 686 | (expand-file-name |
| 688 | (buffer-substring (point) (line-end-position))))) | 687 | (buffer-substring (point) (line-end-position)))) |
| 689 | (setq status (char-after (line-beginning-position)) | 688 | ;; If we are parsing the result of running status on a directory, |
| 689 | ;; there could be multiple files in the output. | ||
| 690 | ;; We assume that filename, if supplied, applies to the first | ||
| 691 | ;; listed file (ie, the directory). Bug#15322. | ||
| 692 | multifile t | ||
| 693 | status (char-after (line-beginning-position)) | ||
| 690 | ;; Status of the item's properties ([ MC]). | 694 | ;; Status of the item's properties ([ MC]). |
| 691 | propstat (char-after (1+ (line-beginning-position)))) | 695 | propstat (char-after (1+ (line-beginning-position)))) |
| 692 | (if (eq status ??) | 696 | (if (eq status ??) |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 39e3fbdc29a..fa5c87d44e3 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -965,7 +965,8 @@ Within directories, only files already under version control are noticed." | |||
| 965 | "Deduce a set of files and a backend to which to apply an operation. | 965 | "Deduce a set of files and a backend to which to apply an operation. |
| 966 | Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). | 966 | Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). |
| 967 | 967 | ||
| 968 | If we're in VC-dir mode, FILESET is the list of marked files. | 968 | If we're in VC-dir mode, FILESET is the list of marked files, |
| 969 | or the directory if no files are marked. | ||
| 969 | Otherwise, if in a buffer visiting a version-controlled file, | 970 | Otherwise, if in a buffer visiting a version-controlled file, |
| 970 | FILESET is a single-file fileset containing that file. | 971 | FILESET is a single-file fileset containing that file. |
| 971 | Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file | 972 | Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file |
diff --git a/lisp/w32-common-fns.el b/lisp/w32-common-fns.el index 9f3501a01d7..5d8d7171860 100644 --- a/lisp/w32-common-fns.el +++ b/lisp/w32-common-fns.el | |||
| @@ -107,9 +107,8 @@ Consult the selection. Treat empty strings as if they were unset." | |||
| 107 | (if x-select-enable-clipboard | 107 | (if x-select-enable-clipboard |
| 108 | (let (text) | 108 | (let (text) |
| 109 | ;; Don't die if x-get-selection signals an error. | 109 | ;; Don't die if x-get-selection signals an error. |
| 110 | (condition-case c | 110 | (with-demoted-errors "w32-get-clipboard-data:%s" |
| 111 | (setq text (w32-get-clipboard-data)) | 111 | (setq text (w32-get-clipboard-data))) |
| 112 | (error (message "w32-get-clipboard-data:%s" c))) | ||
| 113 | (if (string= text "") (setq text nil)) | 112 | (if (string= text "") (setq text nil)) |
| 114 | (cond | 113 | (cond |
| 115 | ((not text) nil) | 114 | ((not text) nil) |
diff --git a/src/ChangeLog b/src/ChangeLog index 7f4c3f731f4..b4d1c2b67df 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,156 @@ | |||
| 1 | 2013-09-12 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * charset.c (char_charset): Document an exception for char-charset. | ||
| 4 | |||
| 5 | 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 6 | |||
| 7 | * xterm.h (x_display_info): New field last_user_time... | ||
| 8 | * xterm.c (toplevel): ...to replace static last_user_time. | ||
| 9 | (handle_one_xevent, x_ewmh_activate_frame): Adjust users. | ||
| 10 | |||
| 11 | 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 12 | |||
| 13 | * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip | ||
| 14 | scroll bar values to prevent thumb from disappear and update comment. | ||
| 15 | |||
| 16 | 2013-09-11 Glenn Morris <rgm@gnu.org> | ||
| 17 | |||
| 18 | * emacs.c (usage_message): Possessive apostrophe tweak. | ||
| 19 | |||
| 20 | 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 21 | |||
| 22 | * nsterm.m (syms_of_nsterm): Use Qns. | ||
| 23 | * w32fns.c (Fx_open_connection): Remove old '#if 0' code. | ||
| 24 | * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32. | ||
| 25 | * xfns.c (x_display_info_for_name, Fx_open_connection): | ||
| 26 | Remove old '#if 0' code. | ||
| 27 | (syms_of_xfns): Use Qx. | ||
| 28 | * termhooks.h (fullscreen_hook): Remove the leftover. | ||
| 29 | (struct terminal): Fix typo in comment. | ||
| 30 | |||
| 31 | 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 32 | |||
| 33 | Cleaning up a few X scroll bar bits. | ||
| 34 | * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member. | ||
| 35 | * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]: | ||
| 36 | New member last_seen_part, going to replace... | ||
| 37 | * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part. | ||
| 38 | (xt_action_hook) [USE_LUCID]: Adjust user. | ||
| 39 | (xm_scroll_callback, xg_scroll_callback): Do not bloat with | ||
| 40 | Lucid-specific scroll bar support. | ||
| 41 | (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part | ||
| 42 | to int and adjust to use last_seen_part member. | ||
| 43 | (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user. | ||
| 44 | (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]: | ||
| 45 | Initialize last_seen_part. | ||
| 46 | |||
| 47 | 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 48 | |||
| 49 | * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when | ||
| 50 | insert-buffer-substring an empty string. | ||
| 51 | |||
| 52 | 2013-09-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 53 | |||
| 54 | * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out, | ||
| 55 | avoiding a GCC warning. | ||
| 56 | |||
| 57 | 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 58 | |||
| 59 | Ifdef away frame tool bar code when it is not really used. | ||
| 60 | * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]: | ||
| 61 | Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string | ||
| 62 | and minimize_tool_bar_window_p under the above. | ||
| 63 | (fset_current_tool_bar_string, fset_desired_tool_bar_string) | ||
| 64 | (fset_tool_bar_window): Likewise. | ||
| 65 | * dispnew.c (clear_current_matrices, clear_desired_matrices) | ||
| 66 | (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame) | ||
| 67 | (change_frame_size_1): | ||
| 68 | * window.c (window_from_coordinates, Frecenter): Adjust users. | ||
| 69 | * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar | ||
| 70 | code is not really used. | ||
| 71 | * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line) | ||
| 72 | (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info) | ||
| 73 | (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight) | ||
| 74 | [!USE_GTK && !HAVE_NS]: Define as such. | ||
| 75 | (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face) | ||
| 76 | (note_mouse_highlight, expose_frame): | ||
| 77 | * xfns.c (x_set_tool_bar_lines): | ||
| 78 | * xterm.c (handle_one_xevent): Adjust users. | ||
| 79 | |||
| 80 | 2013-09-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 81 | |||
| 82 | Fix corruption with multiple emacsclient -t instances (Bug#15222). | ||
| 83 | This bug was introduced by my 2013-08-26 patch, which incorrectly | ||
| 84 | assumed that the terminfo implementation doesn't use termcap buffers. | ||
| 85 | * term.c (init_tty) [TERMINFO]: Remove optimization, as | ||
| 86 | these buffers apparently are used after all. | ||
| 87 | * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too. | ||
| 88 | (struct tty_display_info): Define members termcap_term_buffer and | ||
| 89 | termcap_strings_buffer even if TERMINFO. | ||
| 90 | |||
| 91 | 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 92 | |||
| 93 | Fix last change. | ||
| 94 | * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient | ||
| 95 | 'usage' docstring entry to pacify make-docfile. | ||
| 96 | |||
| 97 | 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com> | ||
| 98 | |||
| 99 | Change comparison functions =, <, >, <=, >= to take many arguments. | ||
| 100 | * data.c: Change comparison functions' interface and implementation. | ||
| 101 | * lisp.h: Make arithcompare available for efficient two arg | ||
| 102 | comparisons. | ||
| 103 | * bytecode.c: Use arithcompare. | ||
| 104 | * fileio.c: Use new interface. | ||
| 105 | |||
| 106 | 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 107 | |||
| 108 | * keyboard.c (read_char): Don't break immediate_echo (bug#15332). | ||
| 109 | |||
| 110 | 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 111 | |||
| 112 | * eval.c (Feval): Document the new use of `lexical'. | ||
| 113 | |||
| 114 | 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 115 | |||
| 116 | Review and drop old frame resize hack. | ||
| 117 | * frame.h (struct frame): Remove force_flush_display_p. | ||
| 118 | * dispnew.c (update_frame): Adjust user and don't call | ||
| 119 | flush_frame here. The comment has said that there was an issues | ||
| 120 | with redisplaying fringes, but I don't see any differences with | ||
| 121 | and without this hack. Hopefully we can continue without it. | ||
| 122 | * xdisp.c (clear_garbaged_frames): Adjust user and do not clear | ||
| 123 | current frame matrices twice if resized_p is set. | ||
| 124 | |||
| 125 | 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 126 | |||
| 127 | Do not populate pure Xism x_sync to other ports. | ||
| 128 | * frame.h (x_sync): Move under HAVE_X_WINDOWS. | ||
| 129 | * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such. | ||
| 130 | * nsfns.m, w32xfns.c (x_sync): Remove no-op. | ||
| 131 | * w32term.h (x_sync): Remove prototype. | ||
| 132 | |||
| 133 | 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 134 | |||
| 135 | Cleanup frame flushing. | ||
| 136 | * dispextern.h (struct redisplay_interface): | ||
| 137 | Drop flush_display_optional because flush_display is enough | ||
| 138 | for X and flushing via RIF is just a no-op for others. | ||
| 139 | * frame.h (flush_frame): New function. | ||
| 140 | * dispnew.c (update_frame): | ||
| 141 | * minibuf.c (read_minibuf): | ||
| 142 | * xdisp.c (echo_area_display, redisplay_preserve_echo_area): | ||
| 143 | Use it. | ||
| 144 | * keyboard.c (detect_input_pending_run_timers): Do not flush | ||
| 145 | all frames but selected one in redisplay_preserve_echo_area. | ||
| 146 | * nsterm.m (ns_flush): Remove no-op. | ||
| 147 | (ns_redisplay_interface): Adjust user. | ||
| 148 | * w32term.h (x_flush): Remove no-op. | ||
| 149 | (w32_redisplay_interface): Adjust user. | ||
| 150 | * xterm.c (x_flush): Simplify because we do not flush all | ||
| 151 | frames at once any more. Adjust comment. | ||
| 152 | (x_redisplay_interface): Adjust user. | ||
| 153 | |||
| 1 | 2013-09-07 Paul Eggert <eggert@cs.ucla.edu> | 154 | 2013-09-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 155 | ||
| 3 | Port --without-x --enable-gcc-warnings to Fedora 19. | 156 | Port --without-x --enable-gcc-warnings to Fedora 19. |
diff --git a/src/bytecode.c b/src/bytecode.c index e0e7b22ea13..3ac8b452fbe 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -1367,7 +1367,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1367 | Lisp_Object v1; | 1367 | Lisp_Object v1; |
| 1368 | BEFORE_POTENTIAL_GC (); | 1368 | BEFORE_POTENTIAL_GC (); |
| 1369 | v1 = POP; | 1369 | v1 = POP; |
| 1370 | TOP = Fgtr (TOP, v1); | 1370 | TOP = arithcompare (TOP, v1, ARITH_GRTR); |
| 1371 | AFTER_POTENTIAL_GC (); | 1371 | AFTER_POTENTIAL_GC (); |
| 1372 | NEXT; | 1372 | NEXT; |
| 1373 | } | 1373 | } |
| @@ -1377,7 +1377,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1377 | Lisp_Object v1; | 1377 | Lisp_Object v1; |
| 1378 | BEFORE_POTENTIAL_GC (); | 1378 | BEFORE_POTENTIAL_GC (); |
| 1379 | v1 = POP; | 1379 | v1 = POP; |
| 1380 | TOP = Flss (TOP, v1); | 1380 | TOP = arithcompare (TOP, v1, ARITH_LESS); |
| 1381 | AFTER_POTENTIAL_GC (); | 1381 | AFTER_POTENTIAL_GC (); |
| 1382 | NEXT; | 1382 | NEXT; |
| 1383 | } | 1383 | } |
| @@ -1387,7 +1387,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1387 | Lisp_Object v1; | 1387 | Lisp_Object v1; |
| 1388 | BEFORE_POTENTIAL_GC (); | 1388 | BEFORE_POTENTIAL_GC (); |
| 1389 | v1 = POP; | 1389 | v1 = POP; |
| 1390 | TOP = Fleq (TOP, v1); | 1390 | TOP = arithcompare (TOP, v1, ARITH_LESS_OR_EQUAL); |
| 1391 | AFTER_POTENTIAL_GC (); | 1391 | AFTER_POTENTIAL_GC (); |
| 1392 | NEXT; | 1392 | NEXT; |
| 1393 | } | 1393 | } |
| @@ -1397,7 +1397,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1397 | Lisp_Object v1; | 1397 | Lisp_Object v1; |
| 1398 | BEFORE_POTENTIAL_GC (); | 1398 | BEFORE_POTENTIAL_GC (); |
| 1399 | v1 = POP; | 1399 | v1 = POP; |
| 1400 | TOP = Fgeq (TOP, v1); | 1400 | TOP = arithcompare (TOP, v1, ARITH_GRTR_OR_EQUAL); |
| 1401 | AFTER_POTENTIAL_GC (); | 1401 | AFTER_POTENTIAL_GC (); |
| 1402 | NEXT; | 1402 | NEXT; |
| 1403 | } | 1403 | } |
diff --git a/src/charset.c b/src/charset.c index eedf65faa6c..d46cb445f85 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -2053,6 +2053,8 @@ CH in the charset. */) | |||
| 2053 | 2053 | ||
| 2054 | DEFUN ("char-charset", Fchar_charset, Schar_charset, 1, 2, 0, | 2054 | DEFUN ("char-charset", Fchar_charset, Schar_charset, 1, 2, 0, |
| 2055 | doc: /* Return the charset of highest priority that contains CH. | 2055 | doc: /* Return the charset of highest priority that contains CH. |
| 2056 | ASCII characters are an exception: for them, this function always | ||
| 2057 | returns `ascii'. | ||
| 2056 | If optional 2nd arg RESTRICTION is non-nil, it is a list of charsets | 2058 | If optional 2nd arg RESTRICTION is non-nil, it is a list of charsets |
| 2057 | from which to find the charset. It may also be a coding system. In | 2059 | from which to find the charset. It may also be a coding system. In |
| 2058 | that case, find the charset from what supported by that coding system. */) | 2060 | that case, find the charset from what supported by that coding system. */) |
diff --git a/src/data.c b/src/data.c index 9f4bd1f1c02..51b0266eca1 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2255,10 +2255,8 @@ bool-vector. IDX starts at 0. */) | |||
| 2255 | 2255 | ||
| 2256 | /* Arithmetic functions */ | 2256 | /* Arithmetic functions */ |
| 2257 | 2257 | ||
| 2258 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; | 2258 | Lisp_Object |
| 2259 | 2259 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum Arith_Comparison comparison) | |
| 2260 | static Lisp_Object | ||
| 2261 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | ||
| 2262 | { | 2260 | { |
| 2263 | double f1 = 0, f2 = 0; | 2261 | double f1 = 0, f2 = 0; |
| 2264 | bool floatp = 0; | 2262 | bool floatp = 0; |
| @@ -2275,32 +2273,32 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | |||
| 2275 | 2273 | ||
| 2276 | switch (comparison) | 2274 | switch (comparison) |
| 2277 | { | 2275 | { |
| 2278 | case equal: | 2276 | case ARITH_EQUAL: |
| 2279 | if (floatp ? f1 == f2 : XINT (num1) == XINT (num2)) | 2277 | if (floatp ? f1 == f2 : XINT (num1) == XINT (num2)) |
| 2280 | return Qt; | 2278 | return Qt; |
| 2281 | return Qnil; | 2279 | return Qnil; |
| 2282 | 2280 | ||
| 2283 | case notequal: | 2281 | case ARITH_NOTEQUAL: |
| 2284 | if (floatp ? f1 != f2 : XINT (num1) != XINT (num2)) | 2282 | if (floatp ? f1 != f2 : XINT (num1) != XINT (num2)) |
| 2285 | return Qt; | 2283 | return Qt; |
| 2286 | return Qnil; | 2284 | return Qnil; |
| 2287 | 2285 | ||
| 2288 | case less: | 2286 | case ARITH_LESS: |
| 2289 | if (floatp ? f1 < f2 : XINT (num1) < XINT (num2)) | 2287 | if (floatp ? f1 < f2 : XINT (num1) < XINT (num2)) |
| 2290 | return Qt; | 2288 | return Qt; |
| 2291 | return Qnil; | 2289 | return Qnil; |
| 2292 | 2290 | ||
| 2293 | case less_or_equal: | 2291 | case ARITH_LESS_OR_EQUAL: |
| 2294 | if (floatp ? f1 <= f2 : XINT (num1) <= XINT (num2)) | 2292 | if (floatp ? f1 <= f2 : XINT (num1) <= XINT (num2)) |
| 2295 | return Qt; | 2293 | return Qt; |
| 2296 | return Qnil; | 2294 | return Qnil; |
| 2297 | 2295 | ||
| 2298 | case grtr: | 2296 | case ARITH_GRTR: |
| 2299 | if (floatp ? f1 > f2 : XINT (num1) > XINT (num2)) | 2297 | if (floatp ? f1 > f2 : XINT (num1) > XINT (num2)) |
| 2300 | return Qt; | 2298 | return Qt; |
| 2301 | return Qnil; | 2299 | return Qnil; |
| 2302 | 2300 | ||
| 2303 | case grtr_or_equal: | 2301 | case ARITH_GRTR_OR_EQUAL: |
| 2304 | if (floatp ? f1 >= f2 : XINT (num1) >= XINT (num2)) | 2302 | if (floatp ? f1 >= f2 : XINT (num1) >= XINT (num2)) |
| 2305 | return Qt; | 2303 | return Qt; |
| 2306 | return Qnil; | 2304 | return Qnil; |
| @@ -2310,48 +2308,65 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | |||
| 2310 | } | 2308 | } |
| 2311 | } | 2309 | } |
| 2312 | 2310 | ||
| 2313 | DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, | 2311 | static Lisp_Object |
| 2314 | doc: /* Return t if two args, both numbers or markers, are equal. */) | 2312 | arithcompare_driver (ptrdiff_t nargs, Lisp_Object *args, |
| 2315 | (register Lisp_Object num1, Lisp_Object num2) | 2313 | enum Arith_Comparison comparison) |
| 2316 | { | 2314 | { |
| 2317 | return arithcompare (num1, num2, equal); | 2315 | for (ptrdiff_t argnum = 1; argnum < nargs; ++argnum) |
| 2316 | { | ||
| 2317 | if (EQ (Qnil, arithcompare (args[argnum-1], args[argnum], comparison))) | ||
| 2318 | return Qnil; | ||
| 2319 | } | ||
| 2320 | return Qt; | ||
| 2318 | } | 2321 | } |
| 2319 | 2322 | ||
| 2320 | DEFUN ("<", Flss, Slss, 2, 2, 0, | 2323 | DEFUN ("=", Feqlsign, Seqlsign, 1, MANY, 0, |
| 2321 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) | 2324 | doc: /* Return t if args, all numbers or markers, are equal. |
| 2322 | (register Lisp_Object num1, Lisp_Object num2) | 2325 | usage: (= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2326 | (ptrdiff_t nargs, Lisp_Object *args) | ||
| 2323 | { | 2327 | { |
| 2324 | return arithcompare (num1, num2, less); | 2328 | return arithcompare_driver (nargs, args, ARITH_EQUAL); |
| 2325 | } | 2329 | } |
| 2326 | 2330 | ||
| 2327 | DEFUN (">", Fgtr, Sgtr, 2, 2, 0, | 2331 | DEFUN ("<", Flss, Slss, 1, MANY, 0, |
| 2328 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) | 2332 | doc: /* Return t if each arg is less than the next arg. All must be numbers or markers. |
| 2329 | (register Lisp_Object num1, Lisp_Object num2) | 2333 | usage: (< NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2334 | (ptrdiff_t nargs, Lisp_Object *args) | ||
| 2330 | { | 2335 | { |
| 2331 | return arithcompare (num1, num2, grtr); | 2336 | return arithcompare_driver (nargs, args, ARITH_LESS); |
| 2332 | } | 2337 | } |
| 2333 | 2338 | ||
| 2334 | DEFUN ("<=", Fleq, Sleq, 2, 2, 0, | 2339 | DEFUN (">", Fgtr, Sgtr, 1, MANY, 0, |
| 2335 | doc: /* Return t if first arg is less than or equal to second arg. | 2340 | doc: /* Return t if each arg is greater than the next arg. All must be numbers or markers. |
| 2336 | Both must be numbers or markers. */) | 2341 | usage: (> NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2337 | (register Lisp_Object num1, Lisp_Object num2) | 2342 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2338 | { | 2343 | { |
| 2339 | return arithcompare (num1, num2, less_or_equal); | 2344 | return arithcompare_driver (nargs, args, ARITH_GRTR); |
| 2340 | } | 2345 | } |
| 2341 | 2346 | ||
| 2342 | DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, | 2347 | DEFUN ("<=", Fleq, Sleq, 1, MANY, 0, |
| 2343 | doc: /* Return t if first arg is greater than or equal to second arg. | 2348 | doc: /* Return t if each arg is less than or equal to the next arg. |
| 2344 | Both must be numbers or markers. */) | 2349 | All must be numbers or markers. |
| 2345 | (register Lisp_Object num1, Lisp_Object num2) | 2350 | usage: (<= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2351 | (ptrdiff_t nargs, Lisp_Object *args) | ||
| 2352 | { | ||
| 2353 | return arithcompare_driver (nargs, args, ARITH_LESS_OR_EQUAL); | ||
| 2354 | } | ||
| 2355 | |||
| 2356 | DEFUN (">=", Fgeq, Sgeq, 1, MANY, 0, | ||
| 2357 | doc: /* Return t if each arg is greater than or equal to the next arg. | ||
| 2358 | All must be numbers or markers. | ||
| 2359 | usage: (= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | ||
| 2360 | (ptrdiff_t nargs, Lisp_Object *args) | ||
| 2346 | { | 2361 | { |
| 2347 | return arithcompare (num1, num2, grtr_or_equal); | 2362 | return arithcompare_driver (nargs, args, ARITH_GRTR_OR_EQUAL); |
| 2348 | } | 2363 | } |
| 2349 | 2364 | ||
| 2350 | DEFUN ("/=", Fneq, Sneq, 2, 2, 0, | 2365 | DEFUN ("/=", Fneq, Sneq, 2, 2, 0, |
| 2351 | doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) | 2366 | doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) |
| 2352 | (register Lisp_Object num1, Lisp_Object num2) | 2367 | (register Lisp_Object num1, Lisp_Object num2) |
| 2353 | { | 2368 | { |
| 2354 | return arithcompare (num1, num2, notequal); | 2369 | return arithcompare (num1, num2, ARITH_NOTEQUAL); |
| 2355 | } | 2370 | } |
| 2356 | 2371 | ||
| 2357 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | 2372 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, |
diff --git a/src/dispextern.h b/src/dispextern.h index f15da1e6564..67de6bffabf 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2796,11 +2796,6 @@ struct redisplay_interface | |||
| 2796 | /* Flush the display of frame F. For X, this is XFlush. */ | 2796 | /* Flush the display of frame F. For X, this is XFlush. */ |
| 2797 | void (*flush_display) (struct frame *f); | 2797 | void (*flush_display) (struct frame *f); |
| 2798 | 2798 | ||
| 2799 | /* Flush the display of frame F if non-NULL. This is called | ||
| 2800 | during redisplay, and should be NULL on systems which flush | ||
| 2801 | automatically before reading input. */ | ||
| 2802 | void (*flush_display_optional) (struct frame *f); | ||
| 2803 | |||
| 2804 | /* Clear the mouse highlight in window W, if there is any. */ | 2799 | /* Clear the mouse highlight in window W, if there is any. */ |
| 2805 | void (*clear_window_mouse_face) (struct window *w); | 2800 | void (*clear_window_mouse_face) (struct window *w); |
| 2806 | 2801 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index 00abf65248c..2b16e881c80 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -783,9 +783,11 @@ clear_current_matrices (register struct frame *f) | |||
| 783 | clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix); | 783 | clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix); |
| 784 | #endif | 784 | #endif |
| 785 | 785 | ||
| 786 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 786 | /* Clear the matrix of the tool-bar window, if any. */ | 787 | /* Clear the matrix of the tool-bar window, if any. */ |
| 787 | if (WINDOWP (f->tool_bar_window)) | 788 | if (WINDOWP (f->tool_bar_window)) |
| 788 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix); | 789 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix); |
| 790 | #endif | ||
| 789 | 791 | ||
| 790 | /* Clear current window matrices. */ | 792 | /* Clear current window matrices. */ |
| 791 | eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); | 793 | eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); |
| @@ -806,8 +808,10 @@ clear_desired_matrices (register struct frame *f) | |||
| 806 | clear_glyph_matrix (XWINDOW (f->menu_bar_window)->desired_matrix); | 808 | clear_glyph_matrix (XWINDOW (f->menu_bar_window)->desired_matrix); |
| 807 | #endif | 809 | #endif |
| 808 | 810 | ||
| 811 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 809 | if (WINDOWP (f->tool_bar_window)) | 812 | if (WINDOWP (f->tool_bar_window)) |
| 810 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix); | 813 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix); |
| 814 | #endif | ||
| 811 | 815 | ||
| 812 | /* Do it for window matrices. */ | 816 | /* Do it for window matrices. */ |
| 813 | eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); | 817 | eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); |
| @@ -2041,10 +2045,9 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f) | |||
| 2041 | /* Allocate/reallocate window matrices. */ | 2045 | /* Allocate/reallocate window matrices. */ |
| 2042 | allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); | 2046 | allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| 2043 | 2047 | ||
| 2044 | #ifdef HAVE_X_WINDOWS | 2048 | #if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) |
| 2045 | /* Allocate/ reallocate matrices of the dummy window used to display | 2049 | /* Allocate/ reallocate matrices of the dummy window used to display |
| 2046 | the menu bar under X when no X toolkit support is available. */ | 2050 | the menu bar under X when no X toolkit support is available. */ |
| 2047 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) | ||
| 2048 | { | 2051 | { |
| 2049 | /* Allocate a dummy window if not already done. */ | 2052 | /* Allocate a dummy window if not already done. */ |
| 2050 | struct window *w; | 2053 | struct window *w; |
| @@ -2068,10 +2071,9 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f) | |||
| 2068 | w->total_cols = FRAME_TOTAL_COLS (f); | 2071 | w->total_cols = FRAME_TOTAL_COLS (f); |
| 2069 | allocate_matrices_for_window_redisplay (w); | 2072 | allocate_matrices_for_window_redisplay (w); |
| 2070 | } | 2073 | } |
| 2071 | #endif /* not USE_X_TOOLKIT && not USE_GTK */ | 2074 | #endif |
| 2072 | #endif /* HAVE_X_WINDOWS */ | ||
| 2073 | 2075 | ||
| 2074 | #ifndef USE_GTK | 2076 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) |
| 2075 | { | 2077 | { |
| 2076 | /* Allocate/ reallocate matrices of the tool bar window. If we | 2078 | /* Allocate/ reallocate matrices of the tool bar window. If we |
| 2077 | don't have a tool bar window yet, make one. */ | 2079 | don't have a tool bar window yet, make one. */ |
| @@ -2145,6 +2147,7 @@ free_glyphs (struct frame *f) | |||
| 2145 | } | 2147 | } |
| 2146 | #endif | 2148 | #endif |
| 2147 | 2149 | ||
| 2150 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 2148 | /* Free the tool bar window and its glyph matrices. */ | 2151 | /* Free the tool bar window and its glyph matrices. */ |
| 2149 | if (!NILP (f->tool_bar_window)) | 2152 | if (!NILP (f->tool_bar_window)) |
| 2150 | { | 2153 | { |
| @@ -2154,6 +2157,7 @@ free_glyphs (struct frame *f) | |||
| 2154 | w->desired_matrix = w->current_matrix = NULL; | 2157 | w->desired_matrix = w->current_matrix = NULL; |
| 2155 | fset_tool_bar_window (f, Qnil); | 2158 | fset_tool_bar_window (f, Qnil); |
| 2156 | } | 2159 | } |
| 2160 | #endif | ||
| 2157 | 2161 | ||
| 2158 | /* Release frame glyph matrices. Reset fields to zero in | 2162 | /* Release frame glyph matrices. Reset fields to zero in |
| 2159 | case we are called a second time. */ | 2163 | case we are called a second time. */ |
| @@ -3036,6 +3040,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) | |||
| 3036 | update_window (XWINDOW (f->menu_bar_window), 1); | 3040 | update_window (XWINDOW (f->menu_bar_window), 1); |
| 3037 | #endif | 3041 | #endif |
| 3038 | 3042 | ||
| 3043 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 3039 | /* Update the tool-bar window, if present. */ | 3044 | /* Update the tool-bar window, if present. */ |
| 3040 | if (WINDOWP (f->tool_bar_window)) | 3045 | if (WINDOWP (f->tool_bar_window)) |
| 3041 | { | 3046 | { |
| @@ -3056,21 +3061,11 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) | |||
| 3056 | fset_desired_tool_bar_string (f, tem); | 3061 | fset_desired_tool_bar_string (f, tem); |
| 3057 | } | 3062 | } |
| 3058 | } | 3063 | } |
| 3059 | 3064 | #endif | |
| 3060 | 3065 | ||
| 3061 | /* Update windows. */ | 3066 | /* Update windows. */ |
| 3062 | paused_p = update_window_tree (root_window, force_p); | 3067 | paused_p = update_window_tree (root_window, force_p); |
| 3063 | update_end (f); | 3068 | update_end (f); |
| 3064 | |||
| 3065 | /* This flush is a performance bottleneck under X, | ||
| 3066 | and it doesn't seem to be necessary anyway (in general). | ||
| 3067 | It is necessary when resizing the window with the mouse, or | ||
| 3068 | at least the fringes are not redrawn in a timely manner. ++kfs */ | ||
| 3069 | if (f->force_flush_display_p) | ||
| 3070 | { | ||
| 3071 | FRAME_RIF (f)->flush_display (f); | ||
| 3072 | f->force_flush_display_p = 0; | ||
| 3073 | } | ||
| 3074 | } | 3069 | } |
| 3075 | else | 3070 | else |
| 3076 | { | 3071 | { |
| @@ -5498,8 +5493,10 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth, | |||
| 5498 | if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) | 5493 | if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) |
| 5499 | FrameCols (FRAME_TTY (f)) = newwidth; | 5494 | FrameCols (FRAME_TTY (f)) = newwidth; |
| 5500 | 5495 | ||
| 5496 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 5501 | if (WINDOWP (f->tool_bar_window)) | 5497 | if (WINDOWP (f->tool_bar_window)) |
| 5502 | XWINDOW (f->tool_bar_window)->total_cols = newwidth; | 5498 | XWINDOW (f->tool_bar_window)->total_cols = newwidth; |
| 5499 | #endif | ||
| 5503 | } | 5500 | } |
| 5504 | 5501 | ||
| 5505 | FRAME_LINES (f) = newheight; | 5502 | FRAME_LINES (f) = newheight; |
diff --git a/src/emacs.c b/src/emacs.c index 05384145330..dc4c23b3991 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Fully extensible Emacs, running on Unix, intended for GNU. | 1 | /* Fully extensible Emacs, running on Unix, intended for GNU. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2013 Free Software | 3 | Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2013 |
| 4 | Foundation, Inc. | 4 | Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -310,7 +310,7 @@ example, -batch as well as --batch. You can use any unambiguous\n\ | |||
| 310 | abbreviation for a --option.\n\ | 310 | abbreviation for a --option.\n\ |
| 311 | \n\ | 311 | \n\ |
| 312 | Various environment variables and window system resources also affect\n\ | 312 | Various environment variables and window system resources also affect\n\ |
| 313 | Emacs' operation. See the main documentation.\n\ | 313 | the operation of Emacs. See the main documentation.\n\ |
| 314 | \n\ | 314 | \n\ |
| 315 | Report bugs to bug-gnu-emacs@gnu.org. First, please see the Bugs\n\ | 315 | Report bugs to bug-gnu-emacs@gnu.org. First, please see the Bugs\n\ |
| 316 | section of the Emacs manual or the file BUGS.\n" | 316 | section of the Emacs manual or the file BUGS.\n" |
diff --git a/src/eval.c b/src/eval.c index 9db4d1fd81b..6e964f6604b 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2033,7 +2033,9 @@ it is defines a macro. */) | |||
| 2033 | 2033 | ||
| 2034 | DEFUN ("eval", Feval, Seval, 1, 2, 0, | 2034 | DEFUN ("eval", Feval, Seval, 1, 2, 0, |
| 2035 | doc: /* Evaluate FORM and return its value. | 2035 | doc: /* Evaluate FORM and return its value. |
| 2036 | If LEXICAL is t, evaluate using lexical scoping. */) | 2036 | If LEXICAL is t, evaluate using lexical scoping. |
| 2037 | LEXICAL can also be an actual lexical environment, in the form of an | ||
| 2038 | alist mapping symbols to their value. */) | ||
| 2037 | (Lisp_Object form, Lisp_Object lexical) | 2039 | (Lisp_Object form, Lisp_Object lexical) |
| 2038 | { | 2040 | { |
| 2039 | ptrdiff_t count = SPECPDL_INDEX (); | 2041 | ptrdiff_t count = SPECPDL_INDEX (); |
diff --git a/src/fileio.c b/src/fileio.c index 0e6113f349d..1a2bdfa237c 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5121,7 +5121,8 @@ DEFUN ("car-less-than-car", Fcar_less_than_car, Scar_less_than_car, 2, 2, 0, | |||
| 5121 | doc: /* Return t if (car A) is numerically less than (car B). */) | 5121 | doc: /* Return t if (car A) is numerically less than (car B). */) |
| 5122 | (Lisp_Object a, Lisp_Object b) | 5122 | (Lisp_Object a, Lisp_Object b) |
| 5123 | { | 5123 | { |
| 5124 | return Flss (Fcar (a), Fcar (b)); | 5124 | Lisp_Object args[2] = { Fcar (a), Fcar (b), }; |
| 5125 | return Flss (2, args); | ||
| 5125 | } | 5126 | } |
| 5126 | 5127 | ||
| 5127 | /* Build the complete list of annotations appropriate for writing out | 5128 | /* Build the complete list of annotations appropriate for writing out |
diff --git a/src/frame.c b/src/frame.c index 0f1560df157..692d224866c 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1108,7 +1108,7 @@ other_visible_frames (struct frame *f) | |||
| 1108 | 1108 | ||
| 1109 | /* Verify that we can still talk to the frame's X window, | 1109 | /* Verify that we can still talk to the frame's X window, |
| 1110 | and note any recent change in visibility. */ | 1110 | and note any recent change in visibility. */ |
| 1111 | #ifdef HAVE_WINDOW_SYSTEM | 1111 | #ifdef HAVE_X_WINDOWS |
| 1112 | if (FRAME_WINDOW_P (XFRAME (this))) | 1112 | if (FRAME_WINDOW_P (XFRAME (this))) |
| 1113 | x_sync (XFRAME (this)); | 1113 | x_sync (XFRAME (this)); |
| 1114 | #endif | 1114 | #endif |
diff --git a/src/frame.h b/src/frame.h index 3dfbac15709..3aea0cfa27c 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -145,9 +145,15 @@ struct frame | |||
| 145 | Lisp_Object menu_bar_window; | 145 | Lisp_Object menu_bar_window; |
| 146 | #endif | 146 | #endif |
| 147 | 147 | ||
| 148 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 148 | /* A window used to display the tool-bar of a frame. */ | 149 | /* A window used to display the tool-bar of a frame. */ |
| 149 | Lisp_Object tool_bar_window; | 150 | Lisp_Object tool_bar_window; |
| 150 | 151 | ||
| 152 | /* Desired and current contents displayed in that window. */ | ||
| 153 | Lisp_Object desired_tool_bar_string; | ||
| 154 | Lisp_Object current_tool_bar_string; | ||
| 155 | #endif | ||
| 156 | |||
| 151 | /* Desired and current tool-bar items. */ | 157 | /* Desired and current tool-bar items. */ |
| 152 | Lisp_Object tool_bar_items; | 158 | Lisp_Object tool_bar_items; |
| 153 | 159 | ||
| @@ -155,10 +161,6 @@ struct frame | |||
| 155 | tool bar only supports top. */ | 161 | tool bar only supports top. */ |
| 156 | Lisp_Object tool_bar_position; | 162 | Lisp_Object tool_bar_position; |
| 157 | 163 | ||
| 158 | /* Desired and current contents displayed in tool_bar_window. */ | ||
| 159 | Lisp_Object desired_tool_bar_string; | ||
| 160 | Lisp_Object current_tool_bar_string; | ||
| 161 | |||
| 162 | /* Beyond here, there should be no more Lisp_Object components. */ | 164 | /* Beyond here, there should be no more Lisp_Object components. */ |
| 163 | 165 | ||
| 164 | /* Cache of realized faces. */ | 166 | /* Cache of realized faces. */ |
| @@ -185,10 +187,6 @@ struct frame | |||
| 185 | Clear the frame in clear_garbaged_frames if set. */ | 187 | Clear the frame in clear_garbaged_frames if set. */ |
| 186 | unsigned resized_p : 1; | 188 | unsigned resized_p : 1; |
| 187 | 189 | ||
| 188 | /* Set to non-zero in when we want for force a flush_display in | ||
| 189 | update_frame, usually after resizing the frame. */ | ||
| 190 | unsigned force_flush_display_p : 1; | ||
| 191 | |||
| 192 | /* Set to non-zero if the default face for the frame has been | 190 | /* Set to non-zero if the default face for the frame has been |
| 193 | realized. Reset to zero whenever the default face changes. | 191 | realized. Reset to zero whenever the default face changes. |
| 194 | Used to see the difference between a font change and face change. */ | 192 | Used to see the difference between a font change and face change. */ |
| @@ -201,9 +199,11 @@ struct frame | |||
| 201 | /* Set to non-zero when current redisplay has updated frame. */ | 199 | /* Set to non-zero when current redisplay has updated frame. */ |
| 202 | unsigned updated_p : 1; | 200 | unsigned updated_p : 1; |
| 203 | 201 | ||
| 202 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 204 | /* Set to non-zero to minimize tool-bar height even when | 203 | /* Set to non-zero to minimize tool-bar height even when |
| 205 | auto-resize-tool-bar is set to grow-only. */ | 204 | auto-resize-tool-bar is set to grow-only. */ |
| 206 | unsigned minimize_tool_bar_window_p : 1; | 205 | unsigned minimize_tool_bar_window_p : 1; |
| 206 | #endif | ||
| 207 | 207 | ||
| 208 | #if defined (USE_GTK) || defined (HAVE_NS) | 208 | #if defined (USE_GTK) || defined (HAVE_NS) |
| 209 | /* Nonzero means using a tool bar that comes from the toolkit. */ | 209 | /* Nonzero means using a tool bar that comes from the toolkit. */ |
| @@ -459,16 +459,6 @@ fset_condemned_scroll_bars (struct frame *f, Lisp_Object val) | |||
| 459 | f->condemned_scroll_bars = val; | 459 | f->condemned_scroll_bars = val; |
| 460 | } | 460 | } |
| 461 | FRAME_INLINE void | 461 | FRAME_INLINE void |
| 462 | fset_current_tool_bar_string (struct frame *f, Lisp_Object val) | ||
| 463 | { | ||
| 464 | f->current_tool_bar_string = val; | ||
| 465 | } | ||
| 466 | FRAME_INLINE void | ||
| 467 | fset_desired_tool_bar_string (struct frame *f, Lisp_Object val) | ||
| 468 | { | ||
| 469 | f->desired_tool_bar_string = val; | ||
| 470 | } | ||
| 471 | FRAME_INLINE void | ||
| 472 | fset_face_alist (struct frame *f, Lisp_Object val) | 462 | fset_face_alist (struct frame *f, Lisp_Object val) |
| 473 | { | 463 | { |
| 474 | f->face_alist = val; | 464 | f->face_alist = val; |
| @@ -540,11 +530,23 @@ fset_tool_bar_position (struct frame *f, Lisp_Object val) | |||
| 540 | { | 530 | { |
| 541 | f->tool_bar_position = val; | 531 | f->tool_bar_position = val; |
| 542 | } | 532 | } |
| 533 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 543 | FRAME_INLINE void | 534 | FRAME_INLINE void |
| 544 | fset_tool_bar_window (struct frame *f, Lisp_Object val) | 535 | fset_tool_bar_window (struct frame *f, Lisp_Object val) |
| 545 | { | 536 | { |
| 546 | f->tool_bar_window = val; | 537 | f->tool_bar_window = val; |
| 547 | } | 538 | } |
| 539 | FRAME_INLINE void | ||
| 540 | fset_current_tool_bar_string (struct frame *f, Lisp_Object val) | ||
| 541 | { | ||
| 542 | f->current_tool_bar_string = val; | ||
| 543 | } | ||
| 544 | FRAME_INLINE void | ||
| 545 | fset_desired_tool_bar_string (struct frame *f, Lisp_Object val) | ||
| 546 | { | ||
| 547 | f->desired_tool_bar_string = val; | ||
| 548 | } | ||
| 549 | #endif /* HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS */ | ||
| 548 | 550 | ||
| 549 | #define NUMVAL(X) ((INTEGERP (X) || FLOATP (X)) ? XFLOATINT (X) : -1) | 551 | #define NUMVAL(X) ((INTEGERP (X) || FLOATP (X)) ? XFLOATINT (X) : -1) |
| 550 | 552 | ||
| @@ -1243,7 +1245,6 @@ extern Lisp_Object display_x_get_resource (Display_Info *, | |||
| 1243 | extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p); | 1245 | extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p); |
| 1244 | extern void x_set_window_size (struct frame *f, int change_grav, | 1246 | extern void x_set_window_size (struct frame *f, int change_grav, |
| 1245 | int cols, int rows); | 1247 | int cols, int rows); |
| 1246 | extern void x_sync (struct frame *); | ||
| 1247 | extern Lisp_Object x_get_focus_frame (struct frame *); | 1248 | extern Lisp_Object x_get_focus_frame (struct frame *); |
| 1248 | extern void x_set_mouse_position (struct frame *f, int h, int v); | 1249 | extern void x_set_mouse_position (struct frame *f, int h, int v); |
| 1249 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | 1250 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); |
| @@ -1269,13 +1270,24 @@ extern void x_wm_set_icon_position (struct frame *, int, int); | |||
| 1269 | #if !defined USE_X_TOOLKIT | 1270 | #if !defined USE_X_TOOLKIT |
| 1270 | extern char *x_get_resource_string (const char *, const char *); | 1271 | extern char *x_get_resource_string (const char *, const char *); |
| 1271 | #endif | 1272 | #endif |
| 1272 | #endif | 1273 | extern void x_sync (struct frame *); |
| 1274 | #endif /* HAVE_X_WINDOWS */ | ||
| 1273 | 1275 | ||
| 1274 | extern void x_query_colors (struct frame *f, XColor *, int); | 1276 | extern void x_query_colors (struct frame *f, XColor *, int); |
| 1275 | extern void x_query_color (struct frame *f, XColor *); | 1277 | extern void x_query_color (struct frame *f, XColor *); |
| 1276 | 1278 | ||
| 1277 | #endif /* HAVE_WINDOW_SYSTEM */ | 1279 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1278 | 1280 | ||
| 1281 | |||
| 1282 | FRAME_INLINE void | ||
| 1283 | flush_frame (struct frame *f) | ||
| 1284 | { | ||
| 1285 | struct redisplay_interface *rif = FRAME_RIF (f); | ||
| 1286 | |||
| 1287 | if (rif && rif->flush_display) | ||
| 1288 | rif->flush_display (f); | ||
| 1289 | } | ||
| 1290 | |||
| 1279 | /*********************************************************************** | 1291 | /*********************************************************************** |
| 1280 | Multimonitor data | 1292 | Multimonitor data |
| 1281 | ***********************************************************************/ | 1293 | ***********************************************************************/ |
diff --git a/src/insdel.c b/src/insdel.c index f746fd34330..ebd096a2927 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1057,6 +1057,9 @@ insert_from_buffer_1 (struct buffer *buf, | |||
| 1057 | ptrdiff_t outgoing_nbytes = incoming_nbytes; | 1057 | ptrdiff_t outgoing_nbytes = incoming_nbytes; |
| 1058 | INTERVAL intervals; | 1058 | INTERVAL intervals; |
| 1059 | 1059 | ||
| 1060 | if (nchars == 0) | ||
| 1061 | return; | ||
| 1062 | |||
| 1060 | /* Make OUTGOING_NBYTES describe the text | 1063 | /* Make OUTGOING_NBYTES describe the text |
| 1061 | as it will be inserted in this buffer. */ | 1064 | as it will be inserted in this buffer. */ |
| 1062 | 1065 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index ed70e288c84..020c8859941 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2596,10 +2596,8 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2596 | 2596 | ||
| 2597 | if (/* There currently is something in the echo area. */ | 2597 | if (/* There currently is something in the echo area. */ |
| 2598 | !NILP (echo_area_buffer[0]) | 2598 | !NILP (echo_area_buffer[0]) |
| 2599 | && (/* And it's either not from echoing. */ | 2599 | && (/* It's an echo from a different kboard. */ |
| 2600 | !EQ (echo_area_buffer[0], echo_message_buffer) | 2600 | echo_kboard != current_kboard |
| 2601 | /* Or it's an echo from a different kboard. */ | ||
| 2602 | || echo_kboard != current_kboard | ||
| 2603 | /* Or we explicitly allow overwriting whatever there is. */ | 2601 | /* Or we explicitly allow overwriting whatever there is. */ |
| 2604 | || ok_to_echo_at_next_pause == NULL)) | 2602 | || ok_to_echo_at_next_pause == NULL)) |
| 2605 | cancel_echoing (); | 2603 | cancel_echoing (); |
| @@ -9873,20 +9871,7 @@ detect_input_pending_run_timers (bool do_display) | |||
| 9873 | get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); | 9871 | get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); |
| 9874 | 9872 | ||
| 9875 | if (old_timers_run != timers_run && do_display) | 9873 | if (old_timers_run != timers_run && do_display) |
| 9876 | { | 9874 | redisplay_preserve_echo_area (8); |
| 9877 | redisplay_preserve_echo_area (8); | ||
| 9878 | /* The following fixes a bug when using lazy-lock with | ||
| 9879 | lazy-lock-defer-on-the-fly set to t, i.e. when fontifying | ||
| 9880 | from an idle timer function. The symptom of the bug is that | ||
| 9881 | the cursor sometimes doesn't become visible until the next X | ||
| 9882 | event is processed. --gerd. */ | ||
| 9883 | { | ||
| 9884 | Lisp_Object tail, frame; | ||
| 9885 | FOR_EACH_FRAME (tail, frame) | ||
| 9886 | if (FRAME_RIF (XFRAME (frame))) | ||
| 9887 | FRAME_RIF (XFRAME (frame))->flush_display (XFRAME (frame)); | ||
| 9888 | } | ||
| 9889 | } | ||
| 9890 | 9875 | ||
| 9891 | return input_pending; | 9876 | return input_pending; |
| 9892 | } | 9877 | } |
diff --git a/src/lisp.h b/src/lisp.h index 38b538d9bc2..2b1af1faa19 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3160,6 +3160,16 @@ EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST; | |||
| 3160 | /* Defined in data.c. */ | 3160 | /* Defined in data.c. */ |
| 3161 | extern Lisp_Object indirect_function (Lisp_Object); | 3161 | extern Lisp_Object indirect_function (Lisp_Object); |
| 3162 | extern Lisp_Object find_symbol_value (Lisp_Object); | 3162 | extern Lisp_Object find_symbol_value (Lisp_Object); |
| 3163 | enum Arith_Comparison { | ||
| 3164 | ARITH_EQUAL, | ||
| 3165 | ARITH_NOTEQUAL, | ||
| 3166 | ARITH_LESS, | ||
| 3167 | ARITH_GRTR, | ||
| 3168 | ARITH_LESS_OR_EQUAL, | ||
| 3169 | ARITH_GRTR_OR_EQUAL | ||
| 3170 | }; | ||
| 3171 | extern Lisp_Object arithcompare (Lisp_Object num1, Lisp_Object num2, | ||
| 3172 | enum Arith_Comparison comparison); | ||
| 3163 | 3173 | ||
| 3164 | /* Convert the integer I to an Emacs representation, either the integer | 3174 | /* Convert the integer I to an Emacs representation, either the integer |
| 3165 | itself, or a cons of two or three integers, or if all else fails a float. | 3175 | itself, or a cons of two or three integers, or if all else fails a float. |
diff --git a/src/minibuf.c b/src/minibuf.c index 7403fc6c32d..cc6f234f7da 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -672,12 +672,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 672 | XWINDOW (minibuf_window)->cursor.x = 0; | 672 | XWINDOW (minibuf_window)->cursor.x = 0; |
| 673 | XWINDOW (minibuf_window)->must_be_updated_p = 1; | 673 | XWINDOW (minibuf_window)->must_be_updated_p = 1; |
| 674 | update_frame (XFRAME (selected_frame), 1, 1); | 674 | update_frame (XFRAME (selected_frame), 1, 1); |
| 675 | { | 675 | flush_frame (XFRAME (XWINDOW (minibuf_window)->frame)); |
| 676 | struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame); | ||
| 677 | struct redisplay_interface *rif = FRAME_RIF (f); | ||
| 678 | if (rif && rif->flush_display) | ||
| 679 | rif->flush_display (f); | ||
| 680 | } | ||
| 681 | } | 676 | } |
| 682 | 677 | ||
| 683 | /* Make minibuffer contents into a string. */ | 678 | /* Make minibuffer contents into a string. */ |
diff --git a/src/nsfns.m b/src/nsfns.m index fc276c2b12d..f021e834d59 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -2231,15 +2231,6 @@ x_get_focus_frame (struct frame *frame) | |||
| 2231 | return nsfocus; | 2231 | return nsfocus; |
| 2232 | } | 2232 | } |
| 2233 | 2233 | ||
| 2234 | void | ||
| 2235 | x_sync (struct frame *f) | ||
| 2236 | { | ||
| 2237 | /* XXX Not implemented XXX */ | ||
| 2238 | return; | ||
| 2239 | } | ||
| 2240 | |||
| 2241 | |||
| 2242 | |||
| 2243 | /* ========================================================================== | 2234 | /* ========================================================================== |
| 2244 | 2235 | ||
| 2245 | Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'. | 2236 | Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'. |
diff --git a/src/nsterm.m b/src/nsterm.m index 31053ca7a0d..59627a38087 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -801,18 +801,6 @@ ns_update_end (struct frame *f) | |||
| 801 | NSTRACE (ns_update_end); | 801 | NSTRACE (ns_update_end); |
| 802 | } | 802 | } |
| 803 | 803 | ||
| 804 | |||
| 805 | static void | ||
| 806 | ns_flush (struct frame *f) | ||
| 807 | /* -------------------------------------------------------------------------- | ||
| 808 | external (RIF) call | ||
| 809 | NS impl is no-op since currently we flush in ns_update_end and elsewhere | ||
| 810 | -------------------------------------------------------------------------- */ | ||
| 811 | { | ||
| 812 | NSTRACE (ns_flush); | ||
| 813 | } | ||
| 814 | |||
| 815 | |||
| 816 | static void | 804 | static void |
| 817 | ns_focus (struct frame *f, NSRect *r, int n) | 805 | ns_focus (struct frame *f, NSRect *r, int n) |
| 818 | /* -------------------------------------------------------------------------- | 806 | /* -------------------------------------------------------------------------- |
| @@ -3963,8 +3951,7 @@ static struct redisplay_interface ns_redisplay_interface = | |||
| 3963 | ns_after_update_window_line, | 3951 | ns_after_update_window_line, |
| 3964 | ns_update_window_begin, | 3952 | ns_update_window_begin, |
| 3965 | ns_update_window_end, | 3953 | ns_update_window_end, |
| 3966 | ns_flush, | 3954 | 0, /* flush_display */ |
| 3967 | 0, /* flush_display_optional */ | ||
| 3968 | x_clear_window_mouse_face, | 3955 | x_clear_window_mouse_face, |
| 3969 | x_get_glyph_overhangs, | 3956 | x_get_glyph_overhangs, |
| 3970 | x_fix_overlapping_area, | 3957 | x_fix_overlapping_area, |
| @@ -7446,6 +7433,6 @@ variable `x-use-underline-position-properties', which is usually at the | |||
| 7446 | baseline level. The default value is nil. */); | 7433 | baseline level. The default value is nil. */); |
| 7447 | x_underline_at_descent_line = 0; | 7434 | x_underline_at_descent_line = 0; |
| 7448 | 7435 | ||
| 7449 | /* Tell emacs about this window system. */ | 7436 | /* Tell Emacs about this window system. */ |
| 7450 | Fprovide (intern ("ns"), Qnil); | 7437 | Fprovide (Qns, Qnil); |
| 7451 | } | 7438 | } |
diff --git a/src/term.c b/src/term.c index 0270c1eefa6..fd5ea5a1b8d 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2917,12 +2917,8 @@ dissociate_if_controlling_tty (int fd) | |||
| 2917 | struct terminal * | 2917 | struct terminal * |
| 2918 | init_tty (const char *name, const char *terminal_type, bool must_succeed) | 2918 | init_tty (const char *name, const char *terminal_type, bool must_succeed) |
| 2919 | { | 2919 | { |
| 2920 | #ifdef TERMINFO | ||
| 2921 | char **address = 0; | ||
| 2922 | #else | ||
| 2923 | char *area; | 2920 | char *area; |
| 2924 | char **address = &area; | 2921 | char **address = &area; |
| 2925 | #endif | ||
| 2926 | int status; | 2922 | int status; |
| 2927 | struct tty_display_info *tty = NULL; | 2923 | struct tty_display_info *tty = NULL; |
| 2928 | struct terminal *terminal = NULL; | 2924 | struct terminal *terminal = NULL; |
| @@ -3013,13 +3009,9 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) | |||
| 3013 | /* On some systems, tgetent tries to access the controlling | 3009 | /* On some systems, tgetent tries to access the controlling |
| 3014 | terminal. */ | 3010 | terminal. */ |
| 3015 | block_tty_out_signal (); | 3011 | block_tty_out_signal (); |
| 3016 | #ifdef TERMINFO | ||
| 3017 | status = tgetent (0, terminal_type); | ||
| 3018 | #else | ||
| 3019 | status = tgetent (tty->termcap_term_buffer, terminal_type); | 3012 | status = tgetent (tty->termcap_term_buffer, terminal_type); |
| 3020 | if (tty->termcap_term_buffer[TERMCAP_BUFFER_SIZE - 1]) | 3013 | if (tty->termcap_term_buffer[TERMCAP_BUFFER_SIZE - 1]) |
| 3021 | emacs_abort (); | 3014 | emacs_abort (); |
| 3022 | #endif | ||
| 3023 | unblock_tty_out_signal (); | 3015 | unblock_tty_out_signal (); |
| 3024 | 3016 | ||
| 3025 | if (status < 0) | 3017 | if (status < 0) |
| @@ -3050,9 +3042,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 3050 | terminal_type); | 3042 | terminal_type); |
| 3051 | } | 3043 | } |
| 3052 | 3044 | ||
| 3053 | #ifndef TERMINFO | ||
| 3054 | area = tty->termcap_strings_buffer; | 3045 | area = tty->termcap_strings_buffer; |
| 3055 | #endif | ||
| 3056 | tty->TS_ins_line = tgetstr ("al", address); | 3046 | tty->TS_ins_line = tgetstr ("al", address); |
| 3057 | tty->TS_ins_multi_lines = tgetstr ("AL", address); | 3047 | tty->TS_ins_multi_lines = tgetstr ("AL", address); |
| 3058 | tty->TS_bell = tgetstr ("bl", address); | 3048 | tty->TS_bell = tgetstr ("bl", address); |
diff --git a/src/termchar.h b/src/termchar.h index 687f7fbd119..11cea34df23 100644 --- a/src/termchar.h +++ b/src/termchar.h | |||
| @@ -30,9 +30,7 @@ struct tty_output | |||
| 30 | /* There is nothing else here at the moment... */ | 30 | /* There is nothing else here at the moment... */ |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | #ifndef TERMINFO | ||
| 34 | enum { TERMCAP_BUFFER_SIZE = 4096 }; | 33 | enum { TERMCAP_BUFFER_SIZE = 4096 }; |
| 35 | #endif | ||
| 36 | 34 | ||
| 37 | /* Parameters that are shared between frames on the same tty device. */ | 35 | /* Parameters that are shared between frames on the same tty device. */ |
| 38 | 36 | ||
| @@ -78,7 +76,6 @@ struct tty_display_info | |||
| 78 | mouse-face. */ | 76 | mouse-face. */ |
| 79 | Mouse_HLInfo mouse_highlight; | 77 | Mouse_HLInfo mouse_highlight; |
| 80 | 78 | ||
| 81 | #ifndef TERMINFO | ||
| 82 | /* Buffer used internally by termcap (see tgetent in the Termcap | 79 | /* Buffer used internally by termcap (see tgetent in the Termcap |
| 83 | manual). Only init_tty should use this. */ | 80 | manual). Only init_tty should use this. */ |
| 84 | char termcap_term_buffer[TERMCAP_BUFFER_SIZE]; | 81 | char termcap_term_buffer[TERMCAP_BUFFER_SIZE]; |
| @@ -86,7 +83,6 @@ struct tty_display_info | |||
| 86 | /* Buffer storing terminal description strings (see tgetstr in the | 83 | /* Buffer storing terminal description strings (see tgetstr in the |
| 87 | Termcap manual). Only init_tty should use this. */ | 84 | Termcap manual). Only init_tty should use this. */ |
| 88 | char termcap_strings_buffer[TERMCAP_BUFFER_SIZE]; | 85 | char termcap_strings_buffer[TERMCAP_BUFFER_SIZE]; |
| 89 | #endif | ||
| 90 | 86 | ||
| 91 | /* Strings, numbers and flags taken from the termcap entry. */ | 87 | /* Strings, numbers and flags taken from the termcap entry. */ |
| 92 | 88 | ||
diff --git a/src/termhooks.h b/src/termhooks.h index 77f98938edb..a050c3292c2 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -31,6 +31,7 @@ INLINE_HEADER_BEGIN | |||
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | enum scroll_bar_part { | 33 | enum scroll_bar_part { |
| 34 | scroll_bar_nowhere = -1, | ||
| 34 | scroll_bar_above_handle, | 35 | scroll_bar_above_handle, |
| 35 | scroll_bar_handle, | 36 | scroll_bar_handle, |
| 36 | scroll_bar_below_handle, | 37 | scroll_bar_below_handle, |
| @@ -42,11 +43,6 @@ enum scroll_bar_part { | |||
| 42 | scroll_bar_move_ratio | 43 | scroll_bar_move_ratio |
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 45 | /* If the value of the frame parameter changed, whis hook is called. | ||
| 46 | For example, if going from fullscreen to not fullscreen this hook | ||
| 47 | may do something OS dependent, like extended window manager hints on X11. */ | ||
| 48 | extern void (*fullscreen_hook) (struct frame *f); | ||
| 49 | |||
| 50 | /* Output method of a terminal (and frames on this terminal, respectively). */ | 46 | /* Output method of a terminal (and frames on this terminal, respectively). */ |
| 51 | 47 | ||
| 52 | enum output_method | 48 | enum output_method |
| @@ -498,7 +494,7 @@ struct terminal | |||
| 498 | windows. */ | 494 | windows. */ |
| 499 | void (*frame_raise_lower_hook) (struct frame *f, int raise_flag); | 495 | void (*frame_raise_lower_hook) (struct frame *f, int raise_flag); |
| 500 | 496 | ||
| 501 | /* If the value of the frame parameter changed, whis hook is called. | 497 | /* If the value of the frame parameter changed, this hook is called. |
| 502 | For example, if going from fullscreen to not fullscreen this hook | 498 | For example, if going from fullscreen to not fullscreen this hook |
| 503 | may do something OS dependent, like extended window manager hints on X11. */ | 499 | may do something OS dependent, like extended window manager hints on X11. */ |
| 504 | void (*fullscreen_hook) (struct frame *f); | 500 | void (*fullscreen_hook) (struct frame *f); |
diff --git a/src/w32fns.c b/src/w32fns.c index 58c63d959ef..a8b444e0409 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -5201,11 +5201,6 @@ terminate Emacs if we can't open the connection. | |||
| 5201 | if (! NILP (xrm_string)) | 5201 | if (! NILP (xrm_string)) |
| 5202 | CHECK_STRING (xrm_string); | 5202 | CHECK_STRING (xrm_string); |
| 5203 | 5203 | ||
| 5204 | #if 0 | ||
| 5205 | if (! EQ (Vwindow_system, intern ("w32"))) | ||
| 5206 | error ("Not using Microsoft Windows"); | ||
| 5207 | #endif | ||
| 5208 | |||
| 5209 | /* Allow color mapping to be defined externally; first look in user's | 5204 | /* Allow color mapping to be defined externally; first look in user's |
| 5210 | HOME directory, then in Emacs etc dir for a file called rgb.txt. */ | 5205 | HOME directory, then in Emacs etc dir for a file called rgb.txt. */ |
| 5211 | { | 5206 | { |
diff --git a/src/w32proc.c b/src/w32proc.c index dabaa62f71c..221b42fb7b2 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -1144,7 +1144,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app, | |||
| 1144 | return FALSE; | 1144 | return FALSE; |
| 1145 | } | 1145 | } |
| 1146 | 1146 | ||
| 1147 | /* create_child doesn't know what emacs' file handle will be for waiting | 1147 | /* create_child doesn't know what emacs's file handle will be for waiting |
| 1148 | on output from the child, so we need to make this additional call | 1148 | on output from the child, so we need to make this additional call |
| 1149 | to register the handle with the process | 1149 | to register the handle with the process |
| 1150 | This way the select emulator knows how to match file handles with | 1150 | This way the select emulator knows how to match file handles with |
diff --git a/src/w32term.c b/src/w32term.c index 532ded7cdad..d47509e4ece 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -6258,11 +6258,6 @@ w32_make_rdb (char *xrm_option) | |||
| 6258 | return buffer; | 6258 | return buffer; |
| 6259 | } | 6259 | } |
| 6260 | 6260 | ||
| 6261 | void | ||
| 6262 | x_flush (struct frame * f) | ||
| 6263 | { /* Nothing to do */ } | ||
| 6264 | |||
| 6265 | |||
| 6266 | extern frame_parm_handler w32_frame_parm_handlers[]; | 6261 | extern frame_parm_handler w32_frame_parm_handlers[]; |
| 6267 | 6262 | ||
| 6268 | static struct redisplay_interface w32_redisplay_interface = | 6263 | static struct redisplay_interface w32_redisplay_interface = |
| @@ -6276,8 +6271,7 @@ static struct redisplay_interface w32_redisplay_interface = | |||
| 6276 | x_after_update_window_line, | 6271 | x_after_update_window_line, |
| 6277 | x_update_window_begin, | 6272 | x_update_window_begin, |
| 6278 | x_update_window_end, | 6273 | x_update_window_end, |
| 6279 | x_flush, | 6274 | 0, /* flush_display */ |
| 6280 | 0, /* flush_display_optional */ | ||
| 6281 | x_clear_window_mouse_face, | 6275 | x_clear_window_mouse_face, |
| 6282 | x_get_glyph_overhangs, | 6276 | x_get_glyph_overhangs, |
| 6283 | x_fix_overlapping_area, | 6277 | x_fix_overlapping_area, |
| @@ -6344,7 +6338,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo) | |||
| 6344 | terminal like X does. */ | 6338 | terminal like X does. */ |
| 6345 | terminal->kboard = xmalloc (sizeof (KBOARD)); | 6339 | terminal->kboard = xmalloc (sizeof (KBOARD)); |
| 6346 | init_kboard (terminal->kboard); | 6340 | init_kboard (terminal->kboard); |
| 6347 | kset_window_system (terminal->kboard, intern ("w32")); | 6341 | kset_window_system (terminal->kboard, Qw32); |
| 6348 | terminal->kboard->next_kboard = all_kboards; | 6342 | terminal->kboard->next_kboard = all_kboards; |
| 6349 | all_kboards = terminal->kboard; | 6343 | all_kboards = terminal->kboard; |
| 6350 | /* Don't let the initial kboard remain current longer than necessary. | 6344 | /* Don't let the initial kboard remain current longer than necessary. |
| @@ -6697,5 +6691,6 @@ With MS Windows or Nextstep, the value is t. */); | |||
| 6697 | staticpro (&last_mouse_motion_frame); | 6691 | staticpro (&last_mouse_motion_frame); |
| 6698 | last_mouse_motion_frame = Qnil; | 6692 | last_mouse_motion_frame = Qnil; |
| 6699 | 6693 | ||
| 6700 | Fprovide (intern_c_string ("w32"), Qnil); | 6694 | /* Tell Emacs about this window system. */ |
| 6695 | Fprovide (Qw32, Qnil); | ||
| 6701 | } | 6696 | } |
diff --git a/src/w32term.h b/src/w32term.h index 41c5c71832a..b4818f69aee 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -211,7 +211,6 @@ extern void x_set_window_size (struct frame *f, int change_grav, | |||
| 211 | int cols, int rows); | 211 | int cols, int rows); |
| 212 | extern int x_display_pixel_height (struct w32_display_info *); | 212 | extern int x_display_pixel_height (struct w32_display_info *); |
| 213 | extern int x_display_pixel_width (struct w32_display_info *); | 213 | extern int x_display_pixel_width (struct w32_display_info *); |
| 214 | extern void x_sync (struct frame *); | ||
| 215 | extern Lisp_Object x_get_focus_frame (struct frame *); | 214 | extern Lisp_Object x_get_focus_frame (struct frame *); |
| 216 | extern void x_set_mouse_position (struct frame *f, int h, int v); | 215 | extern void x_set_mouse_position (struct frame *f, int h, int v); |
| 217 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | 216 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); |
diff --git a/src/w32xfns.c b/src/w32xfns.c index 19c6b72bf89..7629e49caf8 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -333,9 +333,3 @@ drain_message_queue (void) | |||
| 333 | } | 333 | } |
| 334 | return retval; | 334 | return retval; |
| 335 | } | 335 | } |
| 336 | |||
| 337 | /* x_sync is a no-op on W32. */ | ||
| 338 | void | ||
| 339 | x_sync (struct frame *f) | ||
| 340 | { | ||
| 341 | } | ||
diff --git a/src/window.c b/src/window.c index 6a52ed7e166..677cb991025 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1379,6 +1379,7 @@ window_from_coordinates (struct frame *f, int x, int y, | |||
| 1379 | cw.window = &window, cw.x = x, cw.y = y; cw.part = part; | 1379 | cw.window = &window, cw.x = x, cw.y = y; cw.part = part; |
| 1380 | foreach_window (f, check_window_containing, &cw); | 1380 | foreach_window (f, check_window_containing, &cw); |
| 1381 | 1381 | ||
| 1382 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 1382 | /* If not found above, see if it's in the tool bar window, if a tool | 1383 | /* If not found above, see if it's in the tool bar window, if a tool |
| 1383 | bar exists. */ | 1384 | bar exists. */ |
| 1384 | if (NILP (window) | 1385 | if (NILP (window) |
| @@ -1391,6 +1392,7 @@ window_from_coordinates (struct frame *f, int x, int y, | |||
| 1391 | *part = ON_TEXT; | 1392 | *part = ON_TEXT; |
| 1392 | window = f->tool_bar_window; | 1393 | window = f->tool_bar_window; |
| 1393 | } | 1394 | } |
| 1395 | #endif | ||
| 1394 | 1396 | ||
| 1395 | return window; | 1397 | return window; |
| 1396 | } | 1398 | } |
| @@ -5112,9 +5114,9 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5112 | /* Invalidate pixel data calculated for all compositions. */ | 5114 | /* Invalidate pixel data calculated for all compositions. */ |
| 5113 | for (i = 0; i < n_compositions; i++) | 5115 | for (i = 0; i < n_compositions; i++) |
| 5114 | composition_table[i]->font = NULL; | 5116 | composition_table[i]->font = NULL; |
| 5115 | 5117 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | |
| 5116 | WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1; | 5118 | WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1; |
| 5117 | 5119 | #endif | |
| 5118 | Fredraw_frame (WINDOW_FRAME (w)); | 5120 | Fredraw_frame (WINDOW_FRAME (w)); |
| 5119 | SET_FRAME_GARBAGED (WINDOW_XFRAME (w)); | 5121 | SET_FRAME_GARBAGED (WINDOW_XFRAME (w)); |
| 5120 | } | 5122 | } |
diff --git a/src/window.h b/src/window.h index f5ae81149b3..a419bf7e7f0 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -525,10 +525,13 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 525 | #endif | 525 | #endif |
| 526 | 526 | ||
| 527 | /* 1 if W is a tool bar window. */ | 527 | /* 1 if W is a tool bar window. */ |
| 528 | 528 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) | |
| 529 | #define WINDOW_TOOL_BAR_P(W) \ | 529 | #define WINDOW_TOOL_BAR_P(W) \ |
| 530 | (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \ | 530 | (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \ |
| 531 | && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window)) | 531 | && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window)) |
| 532 | #else | ||
| 533 | #define WINDOW_TOOL_BAR_P(W) (0) | ||
| 534 | #endif | ||
| 532 | 535 | ||
| 533 | /* Return the frame y-position at which window W starts. | 536 | /* Return the frame y-position at which window W starts. |
| 534 | This includes a header line, if any. */ | 537 | This includes a header line, if any. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index d5def065936..58316a0667f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -913,11 +913,8 @@ static int in_ellipses_for_invisible_text_p (struct display_pos *, | |||
| 913 | #ifdef HAVE_WINDOW_SYSTEM | 913 | #ifdef HAVE_WINDOW_SYSTEM |
| 914 | 914 | ||
| 915 | static void x_consider_frame_title (Lisp_Object); | 915 | static void x_consider_frame_title (Lisp_Object); |
| 916 | static int tool_bar_lines_needed (struct frame *, int *); | ||
| 917 | static void update_tool_bar (struct frame *, int); | 916 | static void update_tool_bar (struct frame *, int); |
| 918 | static void build_desired_tool_bar_string (struct frame *f); | ||
| 919 | static int redisplay_tool_bar (struct frame *); | 917 | static int redisplay_tool_bar (struct frame *); |
| 920 | static void display_tool_bar_line (struct it *, int); | ||
| 921 | static void notice_overwritten_cursor (struct window *, | 918 | static void notice_overwritten_cursor (struct window *, |
| 922 | enum glyph_row_area, | 919 | enum glyph_row_area, |
| 923 | int, int, int, int); | 920 | int, int, int, int); |
| @@ -10767,11 +10764,9 @@ clear_garbaged_frames (void) | |||
| 10767 | if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f)) | 10764 | if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f)) |
| 10768 | { | 10765 | { |
| 10769 | if (f->resized_p) | 10766 | if (f->resized_p) |
| 10770 | { | 10767 | redraw_frame (f); |
| 10771 | redraw_frame (f); | 10768 | else |
| 10772 | f->force_flush_display_p = 1; | 10769 | clear_current_matrices (f); |
| 10773 | } | ||
| 10774 | clear_current_matrices (f); | ||
| 10775 | changed_count++; | 10770 | changed_count++; |
| 10776 | f->garbaged = 0; | 10771 | f->garbaged = 0; |
| 10777 | f->resized_p = 0; | 10772 | f->resized_p = 0; |
| @@ -10859,7 +10854,7 @@ echo_area_display (int update_frame_p) | |||
| 10859 | Can do with a display update of the echo area, | 10854 | Can do with a display update of the echo area, |
| 10860 | unless we displayed some mode lines. */ | 10855 | unless we displayed some mode lines. */ |
| 10861 | update_single_window (w, 1); | 10856 | update_single_window (w, 1); |
| 10862 | FRAME_RIF (f)->flush_display (f); | 10857 | flush_frame (f); |
| 10863 | } | 10858 | } |
| 10864 | else | 10859 | else |
| 10865 | update_frame (f, 1, 1); | 10860 | update_frame (f, 1, 1); |
| @@ -11568,6 +11563,7 @@ update_tool_bar (struct frame *f, int save_match_data) | |||
| 11568 | } | 11563 | } |
| 11569 | } | 11564 | } |
| 11570 | 11565 | ||
| 11566 | #if ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 11571 | 11567 | ||
| 11572 | /* Set F->desired_tool_bar_string to a Lisp string representing frame | 11568 | /* Set F->desired_tool_bar_string to a Lisp string representing frame |
| 11573 | F's desired tool-bar contents. F->tool_bar_items must have | 11569 | F's desired tool-bar contents. F->tool_bar_items must have |
| @@ -11905,6 +11901,11 @@ tool_bar_lines_needed (struct frame *f, int *n_rows) | |||
| 11905 | return (it.current_y + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f); | 11901 | return (it.current_y + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f); |
| 11906 | } | 11902 | } |
| 11907 | 11903 | ||
| 11904 | #endif /* !USE_GTK && !HAVE_NS */ | ||
| 11905 | |||
| 11906 | #if defined USE_GTK || defined HAVE_NS | ||
| 11907 | EXFUN (Ftool_bar_lines_needed, 1) ATTRIBUTE_CONST; | ||
| 11908 | #endif | ||
| 11908 | 11909 | ||
| 11909 | DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed, | 11910 | DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed, |
| 11910 | 0, 1, 0, | 11911 | 0, 1, 0, |
| @@ -11912,9 +11913,10 @@ DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed, | |||
| 11912 | If FRAME is nil or omitted, use the selected frame. */) | 11913 | If FRAME is nil or omitted, use the selected frame. */) |
| 11913 | (Lisp_Object frame) | 11914 | (Lisp_Object frame) |
| 11914 | { | 11915 | { |
| 11916 | int nlines = 0; | ||
| 11917 | #if ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 11915 | struct frame *f = decode_any_frame (frame); | 11918 | struct frame *f = decode_any_frame (frame); |
| 11916 | struct window *w; | 11919 | struct window *w; |
| 11917 | int nlines = 0; | ||
| 11918 | 11920 | ||
| 11919 | if (WINDOWP (f->tool_bar_window) | 11921 | if (WINDOWP (f->tool_bar_window) |
| 11920 | && (w = XWINDOW (f->tool_bar_window), | 11922 | && (w = XWINDOW (f->tool_bar_window), |
| @@ -11927,7 +11929,7 @@ If FRAME is nil or omitted, use the selected frame. */) | |||
| 11927 | nlines = tool_bar_lines_needed (f, NULL); | 11929 | nlines = tool_bar_lines_needed (f, NULL); |
| 11928 | } | 11930 | } |
| 11929 | } | 11931 | } |
| 11930 | 11932 | #endif | |
| 11931 | return make_number (nlines); | 11933 | return make_number (nlines); |
| 11932 | } | 11934 | } |
| 11933 | 11935 | ||
| @@ -11938,15 +11940,17 @@ If FRAME is nil or omitted, use the selected frame. */) | |||
| 11938 | static int | 11940 | static int |
| 11939 | redisplay_tool_bar (struct frame *f) | 11941 | redisplay_tool_bar (struct frame *f) |
| 11940 | { | 11942 | { |
| 11941 | struct window *w; | ||
| 11942 | struct it it; | ||
| 11943 | struct glyph_row *row; | ||
| 11944 | |||
| 11945 | #if defined (USE_GTK) || defined (HAVE_NS) | 11943 | #if defined (USE_GTK) || defined (HAVE_NS) |
| 11944 | |||
| 11946 | if (FRAME_EXTERNAL_TOOL_BAR (f)) | 11945 | if (FRAME_EXTERNAL_TOOL_BAR (f)) |
| 11947 | update_frame_tool_bar (f); | 11946 | update_frame_tool_bar (f); |
| 11948 | return 0; | 11947 | return 0; |
| 11949 | #endif | 11948 | |
| 11949 | #else /* !USE_GTK && !HAVE_NS */ | ||
| 11950 | |||
| 11951 | struct window *w; | ||
| 11952 | struct it it; | ||
| 11953 | struct glyph_row *row; | ||
| 11950 | 11954 | ||
| 11951 | /* If frame hasn't a tool-bar window or if it is zero-height, don't | 11955 | /* If frame hasn't a tool-bar window or if it is zero-height, don't |
| 11952 | do anything. This means you must start with tool-bar-lines | 11956 | do anything. This means you must start with tool-bar-lines |
| @@ -12102,8 +12106,11 @@ redisplay_tool_bar (struct frame *f) | |||
| 12102 | 12106 | ||
| 12103 | f->minimize_tool_bar_window_p = 0; | 12107 | f->minimize_tool_bar_window_p = 0; |
| 12104 | return 0; | 12108 | return 0; |
| 12109 | |||
| 12110 | #endif /* USE_GTK || HAVE_NS */ | ||
| 12105 | } | 12111 | } |
| 12106 | 12112 | ||
| 12113 | #if ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 12107 | 12114 | ||
| 12108 | /* Get information about the tool-bar item which is displayed in GLYPH | 12115 | /* Get information about the tool-bar item which is displayed in GLYPH |
| 12109 | on frame F. Return in *PROP_IDX the index where tool-bar item | 12116 | on frame F. Return in *PROP_IDX the index where tool-bar item |
| @@ -12347,6 +12354,8 @@ note_tool_bar_highlight (struct frame *f, int x, int y) | |||
| 12347 | help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_CAPTION); | 12354 | help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_CAPTION); |
| 12348 | } | 12355 | } |
| 12349 | 12356 | ||
| 12357 | #endif /* !USE_GTK && !HAVE_NS */ | ||
| 12358 | |||
| 12350 | #endif /* HAVE_WINDOW_SYSTEM */ | 12359 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 12351 | 12360 | ||
| 12352 | 12361 | ||
| @@ -13645,9 +13654,7 @@ redisplay_preserve_echo_area (int from_where) | |||
| 13645 | else | 13654 | else |
| 13646 | redisplay_internal (); | 13655 | redisplay_internal (); |
| 13647 | 13656 | ||
| 13648 | if (FRAME_RIF (SELECTED_FRAME ()) != NULL | 13657 | flush_frame (SELECTED_FRAME ()); |
| 13649 | && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional) | ||
| 13650 | FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL); | ||
| 13651 | } | 13658 | } |
| 13652 | 13659 | ||
| 13653 | 13660 | ||
| @@ -26695,10 +26702,13 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) | |||
| 26695 | /* Change the mouse cursor. */ | 26702 | /* Change the mouse cursor. */ |
| 26696 | if (FRAME_WINDOW_P (f)) | 26703 | if (FRAME_WINDOW_P (f)) |
| 26697 | { | 26704 | { |
| 26705 | #if ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 26698 | if (draw == DRAW_NORMAL_TEXT | 26706 | if (draw == DRAW_NORMAL_TEXT |
| 26699 | && !EQ (hlinfo->mouse_face_window, f->tool_bar_window)) | 26707 | && !EQ (hlinfo->mouse_face_window, f->tool_bar_window)) |
| 26700 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); | 26708 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); |
| 26701 | else if (draw == DRAW_MOUSE_FACE) | 26709 | else |
| 26710 | #endif | ||
| 26711 | if (draw == DRAW_MOUSE_FACE) | ||
| 26702 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); | 26712 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); |
| 26703 | else | 26713 | else |
| 26704 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->nontext_cursor); | 26714 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->nontext_cursor); |
| @@ -28036,7 +28046,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 28036 | w = XWINDOW (window); | 28046 | w = XWINDOW (window); |
| 28037 | frame_to_window_pixel_xy (w, &x, &y); | 28047 | frame_to_window_pixel_xy (w, &x, &y); |
| 28038 | 28048 | ||
| 28039 | #ifdef HAVE_WINDOW_SYSTEM | 28049 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) |
| 28040 | /* Handle tool-bar window differently since it doesn't display a | 28050 | /* Handle tool-bar window differently since it doesn't display a |
| 28041 | buffer. */ | 28051 | buffer. */ |
| 28042 | if (EQ (window, f->tool_bar_window)) | 28052 | if (EQ (window, f->tool_bar_window)) |
| @@ -28949,9 +28959,11 @@ expose_frame (struct frame *f, int x, int y, int w, int h) | |||
| 28949 | TRACE ((stderr, "(%d, %d, %d, %d)\n", r.x, r.y, r.width, r.height)); | 28959 | TRACE ((stderr, "(%d, %d, %d, %d)\n", r.x, r.y, r.width, r.height)); |
| 28950 | mouse_face_overwritten_p = expose_window_tree (XWINDOW (f->root_window), &r); | 28960 | mouse_face_overwritten_p = expose_window_tree (XWINDOW (f->root_window), &r); |
| 28951 | 28961 | ||
| 28962 | #if ! defined (USE_GTK) && ! defined (HAVE_NS) | ||
| 28952 | if (WINDOWP (f->tool_bar_window)) | 28963 | if (WINDOWP (f->tool_bar_window)) |
| 28953 | mouse_face_overwritten_p | 28964 | mouse_face_overwritten_p |
| 28954 | |= expose_window (XWINDOW (f->tool_bar_window), &r); | 28965 | |= expose_window (XWINDOW (f->tool_bar_window), &r); |
| 28966 | #endif | ||
| 28955 | 28967 | ||
| 28956 | #ifdef HAVE_X_WINDOWS | 28968 | #ifdef HAVE_X_WINDOWS |
| 28957 | #ifndef MSDOS | 28969 | #ifndef MSDOS |
diff --git a/src/xfns.c b/src/xfns.c index 4e8442dd3a3..74bc7a8b1d0 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1031,7 +1031,7 @@ x_set_border_pixel (struct frame *f, int pix) | |||
| 1031 | Note: this is done in two routines because of the way X10 works. | 1031 | Note: this is done in two routines because of the way X10 works. |
| 1032 | 1032 | ||
| 1033 | Note: under X11, this is normally the province of the window manager, | 1033 | Note: under X11, this is normally the province of the window manager, |
| 1034 | and so emacs' border colors may be overridden. */ | 1034 | and so emacs's border colors may be overridden. */ |
| 1035 | 1035 | ||
| 1036 | static void | 1036 | static void |
| 1037 | x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 1037 | x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| @@ -1215,8 +1215,11 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | |||
| 1215 | void | 1215 | void |
| 1216 | x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | 1216 | x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1217 | { | 1217 | { |
| 1218 | int delta, nlines, root_height; | 1218 | int nlines; |
| 1219 | #if ! defined (USE_GTK) | ||
| 1220 | int delta, root_height; | ||
| 1219 | Lisp_Object root_window; | 1221 | Lisp_Object root_window; |
| 1222 | #endif | ||
| 1220 | 1223 | ||
| 1221 | /* Treat tool bars like menu bars. */ | 1224 | /* Treat tool bars like menu bars. */ |
| 1222 | if (FRAME_MINIBUF_ONLY_P (f)) | 1225 | if (FRAME_MINIBUF_ONLY_P (f)) |
| @@ -1229,6 +1232,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | |||
| 1229 | nlines = 0; | 1232 | nlines = 0; |
| 1230 | 1233 | ||
| 1231 | #ifdef USE_GTK | 1234 | #ifdef USE_GTK |
| 1235 | |||
| 1232 | FRAME_TOOL_BAR_LINES (f) = 0; | 1236 | FRAME_TOOL_BAR_LINES (f) = 0; |
| 1233 | if (nlines) | 1237 | if (nlines) |
| 1234 | { | 1238 | { |
| @@ -1245,8 +1249,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | |||
| 1245 | FRAME_EXTERNAL_TOOL_BAR (f) = 0; | 1249 | FRAME_EXTERNAL_TOOL_BAR (f) = 0; |
| 1246 | } | 1250 | } |
| 1247 | 1251 | ||
| 1248 | return; | 1252 | #else /* !USE_GTK */ |
| 1249 | #endif | ||
| 1250 | 1253 | ||
| 1251 | /* Make sure we redisplay all windows in this frame. */ | 1254 | /* Make sure we redisplay all windows in this frame. */ |
| 1252 | ++windows_or_buffers_changed; | 1255 | ++windows_or_buffers_changed; |
| @@ -1301,7 +1304,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | |||
| 1301 | } | 1304 | } |
| 1302 | 1305 | ||
| 1303 | run_window_configuration_change_hook (f); | 1306 | run_window_configuration_change_hook (f); |
| 1304 | 1307 | #endif /* USE_GTK */ | |
| 1305 | } | 1308 | } |
| 1306 | 1309 | ||
| 1307 | 1310 | ||
| @@ -4431,11 +4434,6 @@ x_display_info_for_name (Lisp_Object name) | |||
| 4431 | 4434 | ||
| 4432 | CHECK_STRING (name); | 4435 | CHECK_STRING (name); |
| 4433 | 4436 | ||
| 4434 | #if 0 | ||
| 4435 | if (! EQ (Vinitial_window_system, intern ("x"))) | ||
| 4436 | error ("Not using X Windows"); /* That doesn't stop us anymore. */ | ||
| 4437 | #endif | ||
| 4438 | |||
| 4439 | for (dpyinfo = x_display_list, names = x_display_name_list; | 4437 | for (dpyinfo = x_display_list, names = x_display_name_list; |
| 4440 | dpyinfo; | 4438 | dpyinfo; |
| 4441 | dpyinfo = dpyinfo->next, names = XCDR (names)) | 4439 | dpyinfo = dpyinfo->next, names = XCDR (names)) |
| @@ -4479,11 +4477,6 @@ terminate Emacs if we can't open the connection. | |||
| 4479 | if (! NILP (xrm_string)) | 4477 | if (! NILP (xrm_string)) |
| 4480 | CHECK_STRING (xrm_string); | 4478 | CHECK_STRING (xrm_string); |
| 4481 | 4479 | ||
| 4482 | #if 0 | ||
| 4483 | if (! EQ (Vinitial_window_system, intern ("x"))) | ||
| 4484 | error ("Not using X Windows"); /* That doesn't stop us anymore. */ | ||
| 4485 | #endif | ||
| 4486 | |||
| 4487 | xrm_option = NILP (xrm_string) ? 0 : SSDATA (xrm_string); | 4480 | xrm_option = NILP (xrm_string) ? 0 : SSDATA (xrm_string); |
| 4488 | 4481 | ||
| 4489 | validate_x_resource_name (); | 4482 | validate_x_resource_name (); |
| @@ -6296,7 +6289,8 @@ Otherwise use Emacs own tooltip implementation. | |||
| 6296 | When using Gtk+ tooltips, the tooltip face is not used. */); | 6289 | When using Gtk+ tooltips, the tooltip face is not used. */); |
| 6297 | x_gtk_use_system_tooltips = 1; | 6290 | x_gtk_use_system_tooltips = 1; |
| 6298 | 6291 | ||
| 6299 | Fprovide (intern_c_string ("x"), Qnil); | 6292 | /* Tell Emacs about this window system. */ |
| 6293 | Fprovide (Qx, Qnil); | ||
| 6300 | 6294 | ||
| 6301 | #ifdef USE_X_TOOLKIT | 6295 | #ifdef USE_X_TOOLKIT |
| 6302 | Fprovide (intern_c_string ("x-toolkit"), Qnil); | 6296 | Fprovide (intern_c_string ("x-toolkit"), Qnil); |
diff --git a/src/xterm.c b/src/xterm.c index 2f3d5ca7a01..c28ca824063 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -230,10 +230,6 @@ static Lisp_Object last_mouse_scroll_bar; | |||
| 230 | 230 | ||
| 231 | static Time last_mouse_movement_time; | 231 | static Time last_mouse_movement_time; |
| 232 | 232 | ||
| 233 | /* Time for last user interaction as returned in X events. */ | ||
| 234 | |||
| 235 | static Time last_user_time; | ||
| 236 | |||
| 237 | /* Incremented by XTread_socket whenever it really tries to read | 233 | /* Incremented by XTread_socket whenever it really tries to read |
| 238 | events. */ | 234 | events. */ |
| 239 | 235 | ||
| @@ -334,29 +330,19 @@ static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t); | |||
| 334 | static void x_initialize (void); | 330 | static void x_initialize (void); |
| 335 | 331 | ||
| 336 | 332 | ||
| 337 | /* Flush display of frame F, or of all frames if F is null. */ | 333 | /* Flush display of frame F. */ |
| 338 | 334 | ||
| 339 | static void | 335 | static void |
| 340 | x_flush (struct frame *f) | 336 | x_flush (struct frame *f) |
| 341 | { | 337 | { |
| 338 | eassert (f && FRAME_X_P (f)); | ||
| 342 | /* Don't call XFlush when it is not safe to redisplay; the X | 339 | /* Don't call XFlush when it is not safe to redisplay; the X |
| 343 | connection may be broken. */ | 340 | connection may be broken. */ |
| 344 | if (!NILP (Vinhibit_redisplay)) | 341 | if (!NILP (Vinhibit_redisplay)) |
| 345 | return; | 342 | return; |
| 346 | 343 | ||
| 347 | block_input (); | 344 | block_input (); |
| 348 | if (f) | 345 | XFlush (FRAME_X_DISPLAY (f)); |
| 349 | { | ||
| 350 | eassert (FRAME_X_P (f)); | ||
| 351 | XFlush (FRAME_X_DISPLAY (f)); | ||
| 352 | } | ||
| 353 | else | ||
| 354 | { | ||
| 355 | /* Flush all displays and so all frames on them. */ | ||
| 356 | struct x_display_info *xdi; | ||
| 357 | for (xdi = x_display_list; xdi; xdi = xdi->next) | ||
| 358 | XFlush (xdi->display); | ||
| 359 | } | ||
| 360 | unblock_input (); | 346 | unblock_input (); |
| 361 | } | 347 | } |
| 362 | 348 | ||
| @@ -4091,10 +4077,6 @@ static void x_set_toolkit_scroll_bar_thumb (struct scroll_bar *, | |||
| 4091 | 4077 | ||
| 4092 | static Lisp_Object window_being_scrolled; | 4078 | static Lisp_Object window_being_scrolled; |
| 4093 | 4079 | ||
| 4094 | /* Last scroll bar part sent in xm_scroll_callback. */ | ||
| 4095 | |||
| 4096 | static int last_scroll_bar_part; | ||
| 4097 | |||
| 4098 | /* Whether this is an Xaw with arrow-scrollbars. This should imply | 4080 | /* Whether this is an Xaw with arrow-scrollbars. This should imply |
| 4099 | that movements of 1/20 of the screen size are mapped to up/down. */ | 4081 | that movements of 1/20 of the screen size are mapped to up/down. */ |
| 4100 | 4082 | ||
| @@ -4136,20 +4118,23 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name, | |||
| 4136 | && WINDOWP (window_being_scrolled)) | 4118 | && WINDOWP (window_being_scrolled)) |
| 4137 | { | 4119 | { |
| 4138 | struct window *w; | 4120 | struct window *w; |
| 4121 | struct scroll_bar *bar; | ||
| 4139 | 4122 | ||
| 4140 | x_send_scroll_bar_event (window_being_scrolled, | 4123 | x_send_scroll_bar_event (window_being_scrolled, |
| 4141 | scroll_bar_end_scroll, 0, 0); | 4124 | scroll_bar_end_scroll, 0, 0); |
| 4142 | w = XWINDOW (window_being_scrolled); | 4125 | w = XWINDOW (window_being_scrolled); |
| 4126 | bar = XSCROLL_BAR (w->vertical_scroll_bar); | ||
| 4143 | 4127 | ||
| 4144 | if (XSCROLL_BAR (w->vertical_scroll_bar)->dragging != -1) | 4128 | if (bar->dragging != -1) |
| 4145 | { | 4129 | { |
| 4146 | XSCROLL_BAR (w->vertical_scroll_bar)->dragging = -1; | 4130 | bar->dragging = -1; |
| 4147 | /* The thumb size is incorrect while dragging: fix it. */ | 4131 | /* The thumb size is incorrect while dragging: fix it. */ |
| 4148 | set_vertical_scroll_bar (w); | 4132 | set_vertical_scroll_bar (w); |
| 4149 | } | 4133 | } |
| 4150 | window_being_scrolled = Qnil; | 4134 | window_being_scrolled = Qnil; |
| 4151 | last_scroll_bar_part = -1; | 4135 | #if defined (USE_LUCID) |
| 4152 | 4136 | bar->last_seen_part = scroll_bar_nowhere; | |
| 4137 | #endif | ||
| 4153 | /* Xt timeouts no longer needed. */ | 4138 | /* Xt timeouts no longer needed. */ |
| 4154 | toolkit_scroll_bar_interaction = 0; | 4139 | toolkit_scroll_bar_interaction = 0; |
| 4155 | } | 4140 | } |
| @@ -4333,7 +4318,6 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 4333 | if (part >= 0) | 4318 | if (part >= 0) |
| 4334 | { | 4319 | { |
| 4335 | window_being_scrolled = bar->window; | 4320 | window_being_scrolled = bar->window; |
| 4336 | last_scroll_bar_part = part; | ||
| 4337 | x_send_scroll_bar_event (bar->window, part, portion, whole); | 4321 | x_send_scroll_bar_event (bar->window, part, portion, whole); |
| 4338 | } | 4322 | } |
| 4339 | } | 4323 | } |
| @@ -4394,7 +4378,6 @@ xg_scroll_callback (GtkRange *range, | |||
| 4394 | if (part >= 0) | 4378 | if (part >= 0) |
| 4395 | { | 4379 | { |
| 4396 | window_being_scrolled = bar->window; | 4380 | window_being_scrolled = bar->window; |
| 4397 | last_scroll_bar_part = part; | ||
| 4398 | x_send_scroll_bar_event (bar->window, part, portion, whole); | 4381 | x_send_scroll_bar_event (bar->window, part, portion, whole); |
| 4399 | } | 4382 | } |
| 4400 | 4383 | ||
| @@ -4436,7 +4419,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 4436 | float top = *top_addr; | 4419 | float top = *top_addr; |
| 4437 | float shown; | 4420 | float shown; |
| 4438 | int whole, portion, height; | 4421 | int whole, portion, height; |
| 4439 | int part; | 4422 | enum scroll_bar_part part; |
| 4440 | 4423 | ||
| 4441 | /* Get the size of the thumb, a value between 0 and 1. */ | 4424 | /* Get the size of the thumb, a value between 0 and 1. */ |
| 4442 | block_input (); | 4425 | block_input (); |
| @@ -4458,7 +4441,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 4458 | 4441 | ||
| 4459 | window_being_scrolled = bar->window; | 4442 | window_being_scrolled = bar->window; |
| 4460 | bar->dragging = portion; | 4443 | bar->dragging = portion; |
| 4461 | last_scroll_bar_part = part; | 4444 | bar->last_seen_part = part; |
| 4462 | x_send_scroll_bar_event (bar->window, part, portion, whole); | 4445 | x_send_scroll_bar_event (bar->window, part, portion, whole); |
| 4463 | } | 4446 | } |
| 4464 | 4447 | ||
| @@ -4478,7 +4461,7 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 4478 | /* The position really is stored cast to a pointer. */ | 4461 | /* The position really is stored cast to a pointer. */ |
| 4479 | int position = (intptr_t) call_data; | 4462 | int position = (intptr_t) call_data; |
| 4480 | Dimension height; | 4463 | Dimension height; |
| 4481 | int part; | 4464 | enum scroll_bar_part part; |
| 4482 | 4465 | ||
| 4483 | /* Get the height of the scroll bar. */ | 4466 | /* Get the height of the scroll bar. */ |
| 4484 | block_input (); | 4467 | block_input (); |
| @@ -4497,7 +4480,7 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 4497 | 4480 | ||
| 4498 | window_being_scrolled = bar->window; | 4481 | window_being_scrolled = bar->window; |
| 4499 | bar->dragging = -1; | 4482 | bar->dragging = -1; |
| 4500 | last_scroll_bar_part = part; | 4483 | bar->last_seen_part = part; |
| 4501 | x_send_scroll_bar_event (bar->window, part, position, height); | 4484 | x_send_scroll_bar_event (bar->window, part, position, height); |
| 4502 | } | 4485 | } |
| 4503 | 4486 | ||
| @@ -4807,16 +4790,25 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio | |||
| 4807 | NULL); | 4790 | NULL); |
| 4808 | 4791 | ||
| 4809 | /* Massage the top+shown values. */ | 4792 | /* Massage the top+shown values. */ |
| 4810 | if (bar->dragging == -1 || last_scroll_bar_part == scroll_bar_down_arrow) | 4793 | if (bar->dragging == -1 || bar->last_seen_part == scroll_bar_down_arrow) |
| 4811 | top = max (0, min (1, top)); | 4794 | top = max (0, min (1, top)); |
| 4812 | else | 4795 | else |
| 4813 | top = old_top; | 4796 | top = old_top; |
| 4797 | #if ! defined (HAVE_XAW3D) | ||
| 4798 | /* With Xaw, 'top' values too closer to 1.0 may | ||
| 4799 | cause the thumb to disappear. Fix that. */ | ||
| 4800 | top = min (top, 0.99f); | ||
| 4801 | #endif | ||
| 4814 | /* Keep two pixels available for moving the thumb down. */ | 4802 | /* Keep two pixels available for moving the thumb down. */ |
| 4815 | shown = max (0, min (1 - top - (2.0f / height), shown)); | 4803 | shown = max (0, min (1 - top - (2.0f / height), shown)); |
| 4804 | #if ! defined (HAVE_XAW3D) | ||
| 4805 | /* Likewise with too small 'shown'. */ | ||
| 4806 | shown = max (shown, 0.01f); | ||
| 4807 | #endif | ||
| 4816 | 4808 | ||
| 4817 | /* If the call to XawScrollbarSetThumb below doesn't seem to work, | 4809 | /* If the call to XawScrollbarSetThumb below doesn't seem to |
| 4818 | check that your system's configuration file contains a define | 4810 | work, check that 'NARROWPROTO' is defined in src/config.h. |
| 4819 | for `NARROWPROTO'. See s/freebsd.h for an example. */ | 4811 | If this is not so, most likely you need to fix configure. */ |
| 4820 | if (top != old_top || shown != old_shown) | 4812 | if (top != old_top || shown != old_shown) |
| 4821 | { | 4813 | { |
| 4822 | if (bar->dragging == -1) | 4814 | if (bar->dragging == -1) |
| @@ -4912,6 +4904,9 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height) | |||
| 4912 | bar->end = 0; | 4904 | bar->end = 0; |
| 4913 | bar->dragging = -1; | 4905 | bar->dragging = -1; |
| 4914 | bar->fringe_extended_p = 0; | 4906 | bar->fringe_extended_p = 0; |
| 4907 | #if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID) | ||
| 4908 | bar->last_seen_part = scroll_bar_nowhere; | ||
| 4909 | #endif | ||
| 4915 | 4910 | ||
| 4916 | /* Add bar to its frame's list of scroll bars. */ | 4911 | /* Add bar to its frame's list of scroll bars. */ |
| 4917 | bar->next = FRAME_SCROLL_BARS (f); | 4912 | bar->next = FRAME_SCROLL_BARS (f); |
| @@ -5980,7 +5975,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 5980 | break; | 5975 | break; |
| 5981 | 5976 | ||
| 5982 | case SelectionNotify: | 5977 | case SelectionNotify: |
| 5983 | last_user_time = event.xselection.time; | 5978 | dpyinfo->last_user_time = event.xselection.time; |
| 5984 | #ifdef USE_X_TOOLKIT | 5979 | #ifdef USE_X_TOOLKIT |
| 5985 | if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) | 5980 | if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) |
| 5986 | goto OTHER; | 5981 | goto OTHER; |
| @@ -5989,7 +5984,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 5989 | break; | 5984 | break; |
| 5990 | 5985 | ||
| 5991 | case SelectionClear: /* Someone has grabbed ownership. */ | 5986 | case SelectionClear: /* Someone has grabbed ownership. */ |
| 5992 | last_user_time = event.xselectionclear.time; | 5987 | dpyinfo->last_user_time = event.xselectionclear.time; |
| 5993 | #ifdef USE_X_TOOLKIT | 5988 | #ifdef USE_X_TOOLKIT |
| 5994 | if (! x_window_to_frame (dpyinfo, event.xselectionclear.window)) | 5989 | if (! x_window_to_frame (dpyinfo, event.xselectionclear.window)) |
| 5995 | goto OTHER; | 5990 | goto OTHER; |
| @@ -6005,7 +6000,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6005 | break; | 6000 | break; |
| 6006 | 6001 | ||
| 6007 | case SelectionRequest: /* Someone wants our selection. */ | 6002 | case SelectionRequest: /* Someone wants our selection. */ |
| 6008 | last_user_time = event.xselectionrequest.time; | 6003 | dpyinfo->last_user_time = event.xselectionrequest.time; |
| 6009 | #ifdef USE_X_TOOLKIT | 6004 | #ifdef USE_X_TOOLKIT |
| 6010 | if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) | 6005 | if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) |
| 6011 | goto OTHER; | 6006 | goto OTHER; |
| @@ -6024,7 +6019,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6024 | break; | 6019 | break; |
| 6025 | 6020 | ||
| 6026 | case PropertyNotify: | 6021 | case PropertyNotify: |
| 6027 | last_user_time = event.xproperty.time; | 6022 | dpyinfo->last_user_time = event.xproperty.time; |
| 6028 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); | 6023 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); |
| 6029 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) | 6024 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) |
| 6030 | if (x_handle_net_wm_state (f, &event.xproperty) | 6025 | if (x_handle_net_wm_state (f, &event.xproperty) |
| @@ -6224,7 +6219,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6224 | 6219 | ||
| 6225 | case KeyPress: | 6220 | case KeyPress: |
| 6226 | 6221 | ||
| 6227 | last_user_time = event.xkey.time; | 6222 | dpyinfo->last_user_time = event.xkey.time; |
| 6228 | ignore_next_mouse_click_timeout = 0; | 6223 | ignore_next_mouse_click_timeout = 0; |
| 6229 | 6224 | ||
| 6230 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 6225 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| @@ -6235,6 +6230,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6235 | 6230 | ||
| 6236 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); | 6231 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); |
| 6237 | 6232 | ||
| 6233 | #if ! defined (USE_GTK) | ||
| 6238 | /* If mouse-highlight is an integer, input clears out | 6234 | /* If mouse-highlight is an integer, input clears out |
| 6239 | mouse highlighting. */ | 6235 | mouse highlighting. */ |
| 6240 | if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) | 6236 | if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) |
| @@ -6244,6 +6240,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6244 | clear_mouse_face (hlinfo); | 6240 | clear_mouse_face (hlinfo); |
| 6245 | hlinfo->mouse_face_hidden = 1; | 6241 | hlinfo->mouse_face_hidden = 1; |
| 6246 | } | 6242 | } |
| 6243 | #endif | ||
| 6247 | 6244 | ||
| 6248 | #if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS | 6245 | #if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS |
| 6249 | if (f == 0) | 6246 | if (f == 0) |
| @@ -6553,7 +6550,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6553 | #endif | 6550 | #endif |
| 6554 | 6551 | ||
| 6555 | case KeyRelease: | 6552 | case KeyRelease: |
| 6556 | last_user_time = event.xkey.time; | 6553 | dpyinfo->last_user_time = event.xkey.time; |
| 6557 | #ifdef HAVE_X_I18N | 6554 | #ifdef HAVE_X_I18N |
| 6558 | /* Don't dispatch this event since XtDispatchEvent calls | 6555 | /* Don't dispatch this event since XtDispatchEvent calls |
| 6559 | XFilterEvent, and two calls in a row may freeze the | 6556 | XFilterEvent, and two calls in a row may freeze the |
| @@ -6564,7 +6561,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6564 | #endif | 6561 | #endif |
| 6565 | 6562 | ||
| 6566 | case EnterNotify: | 6563 | case EnterNotify: |
| 6567 | last_user_time = event.xcrossing.time; | 6564 | dpyinfo->last_user_time = event.xcrossing.time; |
| 6568 | x_detect_focus_change (dpyinfo, &event, &inev.ie); | 6565 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6569 | 6566 | ||
| 6570 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); | 6567 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); |
| @@ -6589,7 +6586,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6589 | goto OTHER; | 6586 | goto OTHER; |
| 6590 | 6587 | ||
| 6591 | case LeaveNotify: | 6588 | case LeaveNotify: |
| 6592 | last_user_time = event.xcrossing.time; | 6589 | dpyinfo->last_user_time = event.xcrossing.time; |
| 6593 | x_detect_focus_change (dpyinfo, &event, &inev.ie); | 6590 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6594 | 6591 | ||
| 6595 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); | 6592 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); |
| @@ -6623,7 +6620,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6623 | 6620 | ||
| 6624 | case MotionNotify: | 6621 | case MotionNotify: |
| 6625 | { | 6622 | { |
| 6626 | last_user_time = event.xmotion.time; | 6623 | dpyinfo->last_user_time = event.xmotion.time; |
| 6627 | previous_help_echo_string = help_echo_string; | 6624 | previous_help_echo_string = help_echo_string; |
| 6628 | help_echo_string = Qnil; | 6625 | help_echo_string = Qnil; |
| 6629 | 6626 | ||
| @@ -6766,9 +6763,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6766 | by the rest of Emacs, we put it here. */ | 6763 | by the rest of Emacs, we put it here. */ |
| 6767 | bool tool_bar_p = 0; | 6764 | bool tool_bar_p = 0; |
| 6768 | 6765 | ||
| 6769 | memset (&compose_status, 0, sizeof (compose_status)); | 6766 | memset (&compose_status, 0, sizeof (compose_status)); |
| 6770 | last_mouse_glyph_frame = 0; | 6767 | last_mouse_glyph_frame = 0; |
| 6771 | last_user_time = event.xbutton.time; | 6768 | dpyinfo->last_user_time = event.xbutton.time; |
| 6772 | 6769 | ||
| 6773 | if (dpyinfo->grabbed | 6770 | if (dpyinfo->grabbed |
| 6774 | && last_mouse_frame | 6771 | && last_mouse_frame |
| @@ -6783,6 +6780,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6783 | #endif | 6780 | #endif |
| 6784 | if (f) | 6781 | if (f) |
| 6785 | { | 6782 | { |
| 6783 | #if ! defined (USE_GTK) | ||
| 6786 | /* Is this in the tool-bar? */ | 6784 | /* Is this in the tool-bar? */ |
| 6787 | if (WINDOWP (f->tool_bar_window) | 6785 | if (WINDOWP (f->tool_bar_window) |
| 6788 | && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window))) | 6786 | && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window))) |
| @@ -6795,13 +6793,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6795 | tool_bar_p = EQ (window, f->tool_bar_window); | 6793 | tool_bar_p = EQ (window, f->tool_bar_window); |
| 6796 | 6794 | ||
| 6797 | if (tool_bar_p && event.xbutton.button < 4) | 6795 | if (tool_bar_p && event.xbutton.button < 4) |
| 6798 | { | 6796 | handle_tool_bar_click |
| 6799 | handle_tool_bar_click (f, x, y, | 6797 | (f, x, y, event.xbutton.type == ButtonPress, |
| 6800 | event.xbutton.type == ButtonPress, | 6798 | x_x_to_emacs_modifiers (dpyinfo, event.xbutton.state)); |
| 6801 | x_x_to_emacs_modifiers (dpyinfo, | ||
| 6802 | event.xbutton.state)); | ||
| 6803 | } | ||
| 6804 | } | 6799 | } |
| 6800 | #endif /* !USE_GTK */ | ||
| 6805 | 6801 | ||
| 6806 | if (!tool_bar_p) | 6802 | if (!tool_bar_p) |
| 6807 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 6803 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| @@ -7361,9 +7357,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, | |||
| 7361 | #endif | 7357 | #endif |
| 7362 | } | 7358 | } |
| 7363 | 7359 | ||
| 7364 | #ifndef XFlush | ||
| 7365 | XFlush (FRAME_X_DISPLAY (f)); | 7360 | XFlush (FRAME_X_DISPLAY (f)); |
| 7366 | #endif | ||
| 7367 | } | 7361 | } |
| 7368 | 7362 | ||
| 7369 | 7363 | ||
| @@ -8861,8 +8855,9 @@ x_ewmh_activate_frame (struct frame *f) | |||
| 8861 | Lisp_Object frame; | 8855 | Lisp_Object frame; |
| 8862 | XSETFRAME (frame, f); | 8856 | XSETFRAME (frame, f); |
| 8863 | x_send_client_event (frame, make_number (0), frame, | 8857 | x_send_client_event (frame, make_number (0), frame, |
| 8864 | dpyinfo->Xatom_net_active_window, | 8858 | dpyinfo->Xatom_net_active_window, |
| 8865 | make_number (32), list2i (1, last_user_time)); | 8859 | make_number (32), |
| 8860 | list2i (1, dpyinfo->last_user_time)); | ||
| 8866 | } | 8861 | } |
| 8867 | } | 8862 | } |
| 8868 | 8863 | ||
| @@ -10384,11 +10379,6 @@ static struct redisplay_interface x_redisplay_interface = | |||
| 10384 | x_update_window_begin, | 10379 | x_update_window_begin, |
| 10385 | x_update_window_end, | 10380 | x_update_window_end, |
| 10386 | x_flush, | 10381 | x_flush, |
| 10387 | #ifdef XFlush | ||
| 10388 | x_flush, | ||
| 10389 | #else | ||
| 10390 | 0, /* flush_display_optional */ | ||
| 10391 | #endif | ||
| 10392 | x_clear_window_mouse_face, | 10382 | x_clear_window_mouse_face, |
| 10393 | x_get_glyph_overhangs, | 10383 | x_get_glyph_overhangs, |
| 10394 | x_fix_overlapping_area, | 10384 | x_fix_overlapping_area, |
diff --git a/src/xterm.h b/src/xterm.h index 883a249629d..bdc8523009a 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -301,6 +301,9 @@ struct x_display_info | |||
| 301 | minibuffer. */ | 301 | minibuffer. */ |
| 302 | struct frame *x_highlight_frame; | 302 | struct frame *x_highlight_frame; |
| 303 | 303 | ||
| 304 | /* Time of last user interaction as returned in X events on this display. */ | ||
| 305 | Time last_user_time; | ||
| 306 | |||
| 304 | /* The gray pixmap. */ | 307 | /* The gray pixmap. */ |
| 305 | Pixmap gray; | 308 | Pixmap gray; |
| 306 | 309 | ||
| @@ -801,6 +804,11 @@ struct scroll_bar | |||
| 801 | being dragged, this is -1. */ | 804 | being dragged, this is -1. */ |
| 802 | int dragging; | 805 | int dragging; |
| 803 | 806 | ||
| 807 | #if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID) | ||
| 808 | /* Last scroll bar part seen in xaw_jump_callback and xaw_scroll_callback. */ | ||
| 809 | enum scroll_bar_part last_seen_part; | ||
| 810 | #endif | ||
| 811 | |||
| 804 | /* 1 if the background of the fringe that is adjacent to a scroll | 812 | /* 1 if the background of the fringe that is adjacent to a scroll |
| 805 | bar is extended to the gap between the fringe and the bar. */ | 813 | bar is extended to the gap between the fringe and the bar. */ |
| 806 | unsigned fringe_extended_p : 1; | 814 | unsigned fringe_extended_p : 1; |
diff --git a/test/automated/data-tests.el b/test/automated/data-tests.el new file mode 100644 index 00000000000..2298fa3fe71 --- /dev/null +++ b/test/automated/data-tests.el | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | ;;; data-tests.el --- tests for src/data.c | ||
| 2 | |||
| 3 | ;; Copyright (C) 2013 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; This program is free software: you can redistribute it and/or | ||
| 8 | ;; modify it under the terms of the GNU General Public License as | ||
| 9 | ;; published by the Free Software Foundation, either version 3 of the | ||
| 10 | ;; License, or (at your option) any later version. | ||
| 11 | ;; | ||
| 12 | ;; This program is distributed in the hope that it will be useful, but | ||
| 13 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | ;; General Public License for more details. | ||
| 16 | ;; | ||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with this program. If not, see `http://www.gnu.org/licenses/'. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | |||
| 22 | ;;; Code: | ||
| 23 | |||
| 24 | (ert-deftest data-tests-= () | ||
| 25 | (should-error (=)) | ||
| 26 | (should (= 1)) | ||
| 27 | (should (= 2 2)) | ||
| 28 | (should (= 9 9 9 9 9 9 9 9 9)) | ||
| 29 | (should-not (apply #'= '(3 8 3))) | ||
| 30 | (should-error (= 9 9 'foo)) | ||
| 31 | ;; Short circuits before getting to bad arg | ||
| 32 | (should-not (= 9 8 'foo))) | ||
| 33 | |||
| 34 | (ert-deftest data-tests-< () | ||
| 35 | (should-error (<)) | ||
| 36 | (should (< 1)) | ||
| 37 | (should (< 2 3)) | ||
| 38 | (should (< -6 -1 0 2 3 4 8 9 999)) | ||
| 39 | (should-not (apply #'< '(3 8 3))) | ||
| 40 | (should-error (< 9 10 'foo)) | ||
| 41 | ;; Short circuits before getting to bad arg | ||
| 42 | (should-not (< 9 8 'foo))) | ||
| 43 | |||
| 44 | (ert-deftest data-tests-> () | ||
| 45 | (should-error (>)) | ||
| 46 | (should (> 1)) | ||
| 47 | (should (> 3 2)) | ||
| 48 | (should (> 6 1 0 -2 -3 -4 -8 -9 -999)) | ||
| 49 | (should-not (apply #'> '(3 8 3))) | ||
| 50 | (should-error (> 9 8 'foo)) | ||
| 51 | ;; Short circuits before getting to bad arg | ||
| 52 | (should-not (> 8 9 'foo))) | ||
| 53 | |||
| 54 | (ert-deftest data-tests-<= () | ||
| 55 | (should-error (<=)) | ||
| 56 | (should (<= 1)) | ||
| 57 | (should (<= 2 3)) | ||
| 58 | (should (<= -6 -1 -1 0 0 0 2 3 4 8 999)) | ||
| 59 | (should-not (apply #'<= '(3 8 3 3))) | ||
| 60 | (should-error (<= 9 10 'foo)) | ||
| 61 | ;; Short circuits before getting to bad arg | ||
| 62 | (should-not (<= 9 8 'foo))) | ||
| 63 | |||
| 64 | (ert-deftest data-tests->= () | ||
| 65 | (should-error (>=)) | ||
| 66 | (should (>= 1)) | ||
| 67 | (should (>= 3 2)) | ||
| 68 | (should (>= 666 1 0 0 -2 -3 -3 -3 -4 -8 -8 -9 -999)) | ||
| 69 | (should-not (apply #'>= '(3 8 3))) | ||
| 70 | (should-error (>= 9 8 'foo)) | ||
| 71 | ;; Short circuits before getting to bad arg | ||
| 72 | (should-not (>= 8 9 'foo))) | ||
| 73 | |||
| 74 | ;;; data-tests.el ends here | ||
| 75 | |||