diff options
| author | Karoly Lorentey | 2006-05-20 10:32:11 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-05-20 10:32:11 +0000 |
| commit | aabd1a8b138a7f5907c3bb0bbd40932fa7b8e9fe (patch) | |
| tree | 7db1ed5481ec4ec6b43271d0ea57c032c22f60fc | |
| parent | 9f97e26d01003a17b861505d535c89ad73799b7e (diff) | |
| parent | 689840b9224725a0beae741aaaa325d7edb2244c (diff) | |
| download | emacs-aabd1a8b138a7f5907c3bb0bbd40932fa7b8e9fe.tar.gz emacs-aabd1a8b138a7f5907c3bb0bbd40932fa7b8e9fe.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-285
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-286
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-287
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-288
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-102
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-558
44 files changed, 1217 insertions, 418 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-05-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * configure.in: Add check for ALSA. | ||
| 4 | * configure: Regenerate. | ||
| 5 | |||
| 1 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | 6 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * Makefile.in (INFO_FILES): Remove emacs-xtra. | 8 | * Makefile.in (INFO_FILES): Remove emacs-xtra. |
| @@ -2,7 +2,7 @@ | |||
| 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
| 3 | # Generated by GNU Autoconf 2.59. | 3 | # Generated by GNU Autoconf 2.59. |
| 4 | # | 4 | # |
| 5 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | 5 | # Copyright (C) 2003 Free Software Foundation, Inc. |
| 6 | # This configure script is free software; the Free Software Foundation | 6 | # This configure script is free software; the Free Software Foundation |
| 7 | # gives unlimited permission to copy, distribute and modify it. | 7 | # gives unlimited permission to copy, distribute and modify it. |
| 8 | ## --------------------- ## | 8 | ## --------------------- ## |
| @@ -310,7 +310,7 @@ ac_includes_default="\ | |||
| 310 | # include <unistd.h> | 310 | # include <unistd.h> |
| 311 | #endif" | 311 | #endif" |
| 312 | 312 | ||
| 313 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO GZIP_PROG LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS GETOPT_H GETOPTOBJS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' | 313 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO GZIP_PROG LIBSOUND PKG_CONFIG ALSA_CFLAGS ALSA_LIBS CFLAGS_SOUND SET_MAKE GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS GETOPT_H GETOPTOBJS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' |
| 314 | ac_subst_files='' | 314 | ac_subst_files='' |
| 315 | 315 | ||
| 316 | # Initialize some variables set by options. | 316 | # Initialize some variables set by options. |
| @@ -5151,6 +5151,10 @@ rm -f conftest* | |||
| 5151 | fi | 5151 | fi |
| 5152 | 5152 | ||
| 5153 | 5153 | ||
| 5154 | |||
| 5155 | |||
| 5156 | |||
| 5157 | |||
| 5154 | if test "${with_sound}" != "no"; then | 5158 | if test "${with_sound}" != "no"; then |
| 5155 | # Sound support for GNU/Linux and the free BSDs. | 5159 | # Sound support for GNU/Linux and the free BSDs. |
| 5156 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | 5160 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
| @@ -5611,6 +5615,117 @@ else | |||
| 5611 | fi | 5615 | fi |
| 5612 | 5616 | ||
| 5613 | 5617 | ||
| 5618 | |||
| 5619 | ALSA_REQUIRED=1.0.0 | ||
| 5620 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | ||
| 5621 | if test "X${with_pkg_config_prog}" != X; then | ||
| 5622 | PKG_CONFIG="${with_pkg_config_prog}" | ||
| 5623 | fi | ||
| 5624 | |||
| 5625 | succeeded=no | ||
| 5626 | |||
| 5627 | if test -z "$PKG_CONFIG"; then | ||
| 5628 | # Extract the first word of "pkg-config", so it can be a program name with args. | ||
| 5629 | set dummy pkg-config; ac_word=$2 | ||
| 5630 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
| 5631 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
| 5632 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then | ||
| 5633 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 5634 | else | ||
| 5635 | case $PKG_CONFIG in | ||
| 5636 | [\\/]* | ?:[\\/]*) | ||
| 5637 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | ||
| 5638 | ;; | ||
| 5639 | *) | ||
| 5640 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
| 5641 | for as_dir in $PATH | ||
| 5642 | do | ||
| 5643 | IFS=$as_save_IFS | ||
| 5644 | test -z "$as_dir" && as_dir=. | ||
| 5645 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 5646 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
| 5647 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | ||
| 5648 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
| 5649 | break 2 | ||
| 5650 | fi | ||
| 5651 | done | ||
| 5652 | done | ||
| 5653 | |||
| 5654 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | ||
| 5655 | ;; | ||
| 5656 | esac | ||
| 5657 | fi | ||
| 5658 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | ||
| 5659 | |||
| 5660 | if test -n "$PKG_CONFIG"; then | ||
| 5661 | echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 | ||
| 5662 | echo "${ECHO_T}$PKG_CONFIG" >&6 | ||
| 5663 | else | ||
| 5664 | echo "$as_me:$LINENO: result: no" >&5 | ||
| 5665 | echo "${ECHO_T}no" >&6 | ||
| 5666 | fi | ||
| 5667 | |||
| 5668 | fi | ||
| 5669 | |||
| 5670 | if test "$PKG_CONFIG" = "no" ; then | ||
| 5671 | HAVE_ALSA=no | ||
| 5672 | else | ||
| 5673 | PKG_CONFIG_MIN_VERSION=0.9.0 | ||
| 5674 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | ||
| 5675 | echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5 | ||
| 5676 | echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6 | ||
| 5677 | |||
| 5678 | if $PKG_CONFIG --exists "$ALSA_MODULES" ; then | ||
| 5679 | echo "$as_me:$LINENO: result: yes" >&5 | ||
| 5680 | echo "${ECHO_T}yes" >&6 | ||
| 5681 | succeeded=yes | ||
| 5682 | |||
| 5683 | echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5 | ||
| 5684 | echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6 | ||
| 5685 | ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"` | ||
| 5686 | echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5 | ||
| 5687 | echo "${ECHO_T}$ALSA_CFLAGS" >&6 | ||
| 5688 | |||
| 5689 | echo "$as_me:$LINENO: checking ALSA_LIBS" >&5 | ||
| 5690 | echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6 | ||
| 5691 | ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"` | ||
| 5692 | echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5 | ||
| 5693 | echo "${ECHO_T}$ALSA_LIBS" >&6 | ||
| 5694 | else | ||
| 5695 | echo "$as_me:$LINENO: result: no" >&5 | ||
| 5696 | echo "${ECHO_T}no" >&6 | ||
| 5697 | ALSA_CFLAGS="" | ||
| 5698 | ALSA_LIBS="" | ||
| 5699 | ## If we have a custom action on failure, don't print errors, but | ||
| 5700 | ## do set a variable so people can do so. | ||
| 5701 | ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` | ||
| 5702 | |||
| 5703 | fi | ||
| 5704 | |||
| 5705 | |||
| 5706 | |||
| 5707 | else | ||
| 5708 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | ||
| 5709 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | ||
| 5710 | fi | ||
| 5711 | fi | ||
| 5712 | |||
| 5713 | if test $succeeded = yes; then | ||
| 5714 | HAVE_ALSA=yes | ||
| 5715 | else | ||
| 5716 | HAVE_ALSA=no | ||
| 5717 | fi | ||
| 5718 | |||
| 5719 | if test $HAVE_ALSA = yes; then | ||
| 5720 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | ||
| 5721 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | ||
| 5722 | |||
| 5723 | cat >>confdefs.h <<\_ACEOF | ||
| 5724 | #define HAVE_ALSA 1 | ||
| 5725 | _ACEOF | ||
| 5726 | |||
| 5727 | fi | ||
| 5728 | |||
| 5614 | fi | 5729 | fi |
| 5615 | 5730 | ||
| 5616 | 5731 | ||
| @@ -10132,8 +10247,6 @@ echo "${ECHO_T}before 5" >&6 | |||
| 10132 | fi | 10247 | fi |
| 10133 | fi | 10248 | fi |
| 10134 | 10249 | ||
| 10135 | |||
| 10136 | |||
| 10137 | HAVE_GTK=no | 10250 | HAVE_GTK=no |
| 10138 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then | 10251 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then |
| 10139 | if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then | 10252 | if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then |
| @@ -10195,10 +10308,11 @@ fi | |||
| 10195 | fi | 10308 | fi |
| 10196 | 10309 | ||
| 10197 | if test "$PKG_CONFIG" = "no" ; then | 10310 | if test "$PKG_CONFIG" = "no" ; then |
| 10198 | echo "*** The pkg-config script could not be found. Make sure it is" | 10311 | { { echo "$as_me:$LINENO: error: |
| 10199 | echo "*** in your path, or give the full path to pkg-config with" | 10312 | *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5 |
| 10200 | echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." | 10313 | echo "$as_me: error: |
| 10201 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." | 10314 | *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;} |
| 10315 | { (exit 1); exit 1; }; } | ||
| 10202 | else | 10316 | else |
| 10203 | PKG_CONFIG_MIN_VERSION=0.9.0 | 10317 | PKG_CONFIG_MIN_VERSION=0.9.0 |
| 10204 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | 10318 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
| @@ -10222,6 +10336,8 @@ echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6 | |||
| 10222 | echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 | 10336 | echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 |
| 10223 | echo "${ECHO_T}$GTK_LIBS" >&6 | 10337 | echo "${ECHO_T}$GTK_LIBS" >&6 |
| 10224 | else | 10338 | else |
| 10339 | echo "$as_me:$LINENO: result: no" >&5 | ||
| 10340 | echo "${ECHO_T}no" >&6 | ||
| 10225 | GTK_CFLAGS="" | 10341 | GTK_CFLAGS="" |
| 10226 | GTK_LIBS="" | 10342 | GTK_LIBS="" |
| 10227 | ## If we have a custom action on failure, don't print errors, but | 10343 | ## If we have a custom action on failure, don't print errors, but |
| @@ -23374,8 +23490,11 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |||
| 23374 | s,@INSTALL_INFO@,$INSTALL_INFO,;t t | 23490 | s,@INSTALL_INFO@,$INSTALL_INFO,;t t |
| 23375 | s,@GZIP_PROG@,$GZIP_PROG,;t t | 23491 | s,@GZIP_PROG@,$GZIP_PROG,;t t |
| 23376 | s,@LIBSOUND@,$LIBSOUND,;t t | 23492 | s,@LIBSOUND@,$LIBSOUND,;t t |
| 23377 | s,@SET_MAKE@,$SET_MAKE,;t t | ||
| 23378 | s,@PKG_CONFIG@,$PKG_CONFIG,;t t | 23493 | s,@PKG_CONFIG@,$PKG_CONFIG,;t t |
| 23494 | s,@ALSA_CFLAGS@,$ALSA_CFLAGS,;t t | ||
| 23495 | s,@ALSA_LIBS@,$ALSA_LIBS,;t t | ||
| 23496 | s,@CFLAGS_SOUND@,$CFLAGS_SOUND,;t t | ||
| 23497 | s,@SET_MAKE@,$SET_MAKE,;t t | ||
| 23379 | s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t | 23498 | s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t |
| 23380 | s,@GTK_LIBS@,$GTK_LIBS,;t t | 23499 | s,@GTK_LIBS@,$GTK_LIBS,;t t |
| 23381 | s,@ALLOCA@,$ALLOCA,;t t | 23500 | s,@ALLOCA@,$ALLOCA,;t t |
diff --git a/configure.in b/configure.in index 2ac813fe933..3b83aa8e95a 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1480,12 +1480,83 @@ AC_CONFIG_LIBOBJ_DIR(src) | |||
| 1480 | dnl Do this early because it can frob feature test macros for Unix-98 &c. | 1480 | dnl Do this early because it can frob feature test macros for Unix-98 &c. |
| 1481 | AC_SYS_LARGEFILE | 1481 | AC_SYS_LARGEFILE |
| 1482 | 1482 | ||
| 1483 | |||
| 1484 | dnl This function defintion taken from Gnome 2.0 | ||
| 1485 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) | ||
| 1486 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page | ||
| 1487 | dnl also defines GSTUFF_PKG_ERRORS on error | ||
| 1488 | AC_DEFUN([PKG_CHECK_MODULES], [ | ||
| 1489 | succeeded=no | ||
| 1490 | |||
| 1491 | if test -z "$PKG_CONFIG"; then | ||
| 1492 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | ||
| 1493 | fi | ||
| 1494 | |||
| 1495 | if test "$PKG_CONFIG" = "no" ; then | ||
| 1496 | ifelse([$4], , [AC_MSG_ERROR([ | ||
| 1497 | *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4]) | ||
| 1498 | else | ||
| 1499 | PKG_CONFIG_MIN_VERSION=0.9.0 | ||
| 1500 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | ||
| 1501 | AC_MSG_CHECKING(for $2) | ||
| 1502 | |||
| 1503 | if $PKG_CONFIG --exists "$2" ; then | ||
| 1504 | AC_MSG_RESULT(yes) | ||
| 1505 | succeeded=yes | ||
| 1506 | |||
| 1507 | AC_MSG_CHECKING($1_CFLAGS) | ||
| 1508 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` | ||
| 1509 | AC_MSG_RESULT($$1_CFLAGS) | ||
| 1510 | |||
| 1511 | AC_MSG_CHECKING($1_LIBS) | ||
| 1512 | $1_LIBS=`$PKG_CONFIG --libs "$2"` | ||
| 1513 | AC_MSG_RESULT($$1_LIBS) | ||
| 1514 | else | ||
| 1515 | AC_MSG_RESULT(no) | ||
| 1516 | $1_CFLAGS="" | ||
| 1517 | $1_LIBS="" | ||
| 1518 | ## If we have a custom action on failure, don't print errors, but | ||
| 1519 | ## do set a variable so people can do so. | ||
| 1520 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | ||
| 1521 | ifelse([$4], ,echo $$1_PKG_ERRORS,) | ||
| 1522 | fi | ||
| 1523 | |||
| 1524 | AC_SUBST($1_CFLAGS) | ||
| 1525 | AC_SUBST($1_LIBS) | ||
| 1526 | else | ||
| 1527 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | ||
| 1528 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | ||
| 1529 | fi | ||
| 1530 | fi | ||
| 1531 | |||
| 1532 | if test $succeeded = yes; then | ||
| 1533 | ifelse([$3], , :, [$3]) | ||
| 1534 | else | ||
| 1535 | ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) | ||
| 1536 | fi | ||
| 1537 | ]) | ||
| 1538 | |||
| 1539 | |||
| 1483 | if test "${with_sound}" != "no"; then | 1540 | if test "${with_sound}" != "no"; then |
| 1484 | # Sound support for GNU/Linux and the free BSDs. | 1541 | # Sound support for GNU/Linux and the free BSDs. |
| 1485 | AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) | 1542 | AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) |
| 1486 | # Emulation library used on NetBSD. | 1543 | # Emulation library used on NetBSD. |
| 1487 | AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) | 1544 | AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) |
| 1488 | AC_SUBST(LIBSOUND) | 1545 | AC_SUBST(LIBSOUND) |
| 1546 | |||
| 1547 | ALSA_REQUIRED=1.0.0 | ||
| 1548 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | ||
| 1549 | dnl Check if --with-pkg-config-prog has been given. | ||
| 1550 | if test "X${with_pkg_config_prog}" != X; then | ||
| 1551 | PKG_CONFIG="${with_pkg_config_prog}" | ||
| 1552 | fi | ||
| 1553 | PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) | ||
| 1554 | if test $HAVE_ALSA = yes; then | ||
| 1555 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | ||
| 1556 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | ||
| 1557 | AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) | ||
| 1558 | fi | ||
| 1559 | AC_SUBST(CFLAGS_SOUND) | ||
| 1489 | fi | 1560 | fi |
| 1490 | 1561 | ||
| 1491 | dnl checks for header files | 1562 | dnl checks for header files |
| @@ -1943,62 +2014,6 @@ fail; | |||
| 1943 | fi | 2014 | fi |
| 1944 | fi | 2015 | fi |
| 1945 | 2016 | ||
| 1946 | dnl This function defintion taken from Gnome 2.0 | ||
| 1947 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) | ||
| 1948 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page | ||
| 1949 | dnl also defines GSTUFF_PKG_ERRORS on error | ||
| 1950 | AC_DEFUN([PKG_CHECK_MODULES], [ | ||
| 1951 | succeeded=no | ||
| 1952 | |||
| 1953 | if test -z "$PKG_CONFIG"; then | ||
| 1954 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | ||
| 1955 | fi | ||
| 1956 | |||
| 1957 | if test "$PKG_CONFIG" = "no" ; then | ||
| 1958 | echo "*** The pkg-config script could not be found. Make sure it is" | ||
| 1959 | echo "*** in your path, or give the full path to pkg-config with" | ||
| 1960 | echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." | ||
| 1961 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." | ||
| 1962 | else | ||
| 1963 | PKG_CONFIG_MIN_VERSION=0.9.0 | ||
| 1964 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | ||
| 1965 | AC_MSG_CHECKING(for $2) | ||
| 1966 | |||
| 1967 | if $PKG_CONFIG --exists "$2" ; then | ||
| 1968 | AC_MSG_RESULT(yes) | ||
| 1969 | succeeded=yes | ||
| 1970 | |||
| 1971 | AC_MSG_CHECKING($1_CFLAGS) | ||
| 1972 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` | ||
| 1973 | AC_MSG_RESULT($$1_CFLAGS) | ||
| 1974 | |||
| 1975 | AC_MSG_CHECKING($1_LIBS) | ||
| 1976 | $1_LIBS=`$PKG_CONFIG --libs "$2"` | ||
| 1977 | AC_MSG_RESULT($$1_LIBS) | ||
| 1978 | else | ||
| 1979 | $1_CFLAGS="" | ||
| 1980 | $1_LIBS="" | ||
| 1981 | ## If we have a custom action on failure, don't print errors, but | ||
| 1982 | ## do set a variable so people can do so. | ||
| 1983 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | ||
| 1984 | ifelse([$4], ,echo $$1_PKG_ERRORS,) | ||
| 1985 | fi | ||
| 1986 | |||
| 1987 | AC_SUBST($1_CFLAGS) | ||
| 1988 | AC_SUBST($1_LIBS) | ||
| 1989 | else | ||
| 1990 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | ||
| 1991 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | ||
| 1992 | fi | ||
| 1993 | fi | ||
| 1994 | |||
| 1995 | if test $succeeded = yes; then | ||
| 1996 | ifelse([$3], , :, [$3]) | ||
| 1997 | else | ||
| 1998 | ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) | ||
| 1999 | fi | ||
| 2000 | ]) | ||
| 2001 | |||
| 2002 | HAVE_GTK=no | 2017 | HAVE_GTK=no |
| 2003 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then | 2018 | if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then |
| 2004 | if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then | 2019 | if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then |
| @@ -2920,6 +2935,9 @@ AH_BOTTOM([ | |||
| 2920 | #ifdef HAVE_SOUNDCARD_H | 2935 | #ifdef HAVE_SOUNDCARD_H |
| 2921 | #define HAVE_SOUND 1 | 2936 | #define HAVE_SOUND 1 |
| 2922 | #endif | 2937 | #endif |
| 2938 | #ifdef HAVE_ALSA | ||
| 2939 | #define HAVE_SOUND 1 | ||
| 2940 | #endif | ||
| 2923 | #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ | 2941 | #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ |
| 2924 | 2942 | ||
| 2925 | /* If using GNU, then support inline function declarations. */ | 2943 | /* If using GNU, then support inline function declarations. */ |
| @@ -135,6 +135,8 @@ to the FSF. | |||
| 135 | 135 | ||
| 136 | * Other features we would like: | 136 | * Other features we would like: |
| 137 | 137 | ||
| 138 | ** Remove the default toggling behavior of minor modes when called from elisp | ||
| 139 | rather than interactively. This a trivial one-liner in easy-mode.el. | ||
| 138 | ** Create a category of errors called `user-error' for errors which are | 140 | ** Create a category of errors called `user-error' for errors which are |
| 139 | typically due to pilot errors and should thus be in debug-ignored-errors. | 141 | typically due to pilot errors and should thus be in debug-ignored-errors. |
| 140 | 142 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85e397cbe29..7732edb6b24 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,8 +1,81 @@ | |||
| 1 | 2006-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * term/mac-win.el (mac-bytes-to-digits): Remove function. | ||
| 4 | (mac-handle-toolbar-switch-mode): Use coercion instead of it. | ||
| 5 | |||
| 6 | 2006-05-19 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * calendar/diary-lib.el (diary-bahai-date) | ||
| 9 | (list-bahai-diary-entries, mark-bahai-diary-entries) | ||
| 10 | (mark-bahai-calendar-date-pattern): Not interactive. | ||
| 11 | (add-to-diary-list): New optional arg LITERAL. Doc fix. | ||
| 12 | (diary-entries-list): Change format of 4th element in each entry. | ||
| 13 | (diary-list-entries): Use add-to-diary-list. | ||
| 14 | (diary-goto-entry): Handle the case where the buffer visiting the | ||
| 15 | diary has been killed. | ||
| 16 | (fancy-diary-display): Add 'locator to button rather than 'marker. | ||
| 17 | Only generate temp-face when there are marks to apply. | ||
| 18 | (list-sexp-diary-entries): Pass literal to add-to-diary-list. | ||
| 19 | (diary-fancy-date-pattern): New variable. | ||
| 20 | (diary-time-regexp): Doc fix. | ||
| 21 | (diary-anniversary, diary-time): New faces. | ||
| 22 | (fancy-diary-font-lock-keywords): Use diary-fancy-date-pattern and | ||
| 23 | diary-time-regexp. Add font-lock-multiline property where needed. | ||
| 24 | Use new faces diary-anniversary and diary-time. | ||
| 25 | (diary-fancy-font-lock-fontify-region-function): New function, to | ||
| 26 | handle multiline font-lock pattern in fancy diary. | ||
| 27 | (fancy-diary-display-mode): Set font-lock-fontify-region-function. | ||
| 28 | (diary-font-lock-keywords): Tweak time regexp. Use new face | ||
| 29 | diary-time. | ||
| 30 | |||
| 31 | 2006-05-19 Alexander Shopov <ash@contact.bg> (tiny change) | ||
| 32 | |||
| 33 | * international/code-pages.el (mik): Table corrected. | ||
| 34 | |||
| 35 | 2006-05-18 Kim F. Storm <storm@cua.dk> | ||
| 36 | |||
| 37 | * progmodes/grep.el (grep-find): Don't check grep-find-command | ||
| 38 | before running command (breaks non-interactive usage). | ||
| 39 | |||
| 40 | 2006-05-18 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 41 | |||
| 42 | * emacs-lisp/ewoc.el (ewoc--adjust): New func. | ||
| 43 | (ewoc--insert-new-node): Don't insert trailing newline. | ||
| 44 | Instead, adjust succesor nodes' start markers. | ||
| 45 | (ewoc--refresh-node): Delete all text from current node's start | ||
| 46 | marker to the next one's; adjust successor nodes' start markers. | ||
| 47 | (ewoc--create): Doc fixes. | ||
| 48 | (ewoc--refresh): Don't insert newline. | ||
| 49 | (ewoc--set-hf): Use `ewoc--set-buffer-bind-dll-let*'. | ||
| 50 | * pcvs.el (cvs-make-cvs-buffer): Specify | ||
| 51 | extra newline for ewoc's header and footer. | ||
| 52 | (cvs-update-header): Update initial header recognition. | ||
| 53 | Append newline to final header and footer values. | ||
| 54 | * pcvs-info.el (cvs-fileinfo-pp): Insert trailing newline. | ||
| 55 | |||
| 56 | 2006-05-17 Richard Stallman <rms@gnu.org> | ||
| 57 | |||
| 58 | * files.el (file-name-extension): Doc fix. | ||
| 59 | |||
| 60 | 2006-05-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 61 | |||
| 62 | * shell.el (shell-dirtrack-mode): Make it into a proper minor mode, so | ||
| 63 | we can explicitly enable/disable rather than toggle. | ||
| 64 | (shell-mode): Use it. | ||
| 65 | (shell-cd): Don't try to reproduce what `cd' does. | ||
| 66 | |||
| 67 | 2006-05-17 Kim F. Storm <storm@cua.dk> | ||
| 68 | |||
| 69 | * ido.el (ido-read-internal): Use only nondirectory part of | ||
| 70 | default item. | ||
| 71 | |||
| 1 | 2006-05-17 Thien-Thi Nguyen <ttn@gnu.org> | 72 | 2006-05-17 Thien-Thi Nguyen <ttn@gnu.org> |
| 2 | 73 | ||
| 3 | * emacs-lisp/ewoc.el (ewoc-data): Add docstring. | 74 | * emacs-lisp/ewoc.el (ewoc-data): Add docstring. |
| 4 | (ewoc-nth): Doc fix. | 75 | (ewoc-nth): Doc fix. |
| 5 | 76 | ||
| 77 | (ewoc-map, ewoc-invalidate): Compute PP before looping. | ||
| 78 | |||
| 6 | 2006-05-16 Eli Zaretskii <eliz@gnu.org> | 79 | 2006-05-16 Eli Zaretskii <eliz@gnu.org> |
| 7 | 80 | ||
| 8 | * international/mule.el (auto-coding-alist): Add .lha to files | 81 | * international/mule.el (auto-coding-alist): Add .lha to files |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index c27939b8075..95588fccd92 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -121,20 +121,16 @@ The holidays are those in the list `calendar-holidays'.") | |||
| 121 | "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.") | 121 | "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.") |
| 122 | 122 | ||
| 123 | (autoload 'diary-bahai-date "cal-bahai" | 123 | (autoload 'diary-bahai-date "cal-bahai" |
| 124 | "Baha'i calendar equivalent of date diary entry." | 124 | "Baha'i calendar equivalent of date diary entry.") |
| 125 | t) | ||
| 126 | 125 | ||
| 127 | (autoload 'list-bahai-diary-entries "cal-bahai" | 126 | (autoload 'list-bahai-diary-entries "cal-bahai" |
| 128 | "Add any Baha'i date entries from the diary file to `diary-entries-list'." | 127 | "Add any Baha'i date entries from the diary file to `diary-entries-list'.") |
| 129 | t) | ||
| 130 | 128 | ||
| 131 | (autoload 'mark-bahai-diary-entries "cal-bahai" | 129 | (autoload 'mark-bahai-diary-entries "cal-bahai" |
| 132 | "Mark days in the calendar window that have Baha'i date diary entries." | 130 | "Mark days in the calendar window that have Baha'i date diary entries.") |
| 133 | t) | ||
| 134 | 131 | ||
| 135 | (autoload 'mark-bahai-calendar-date-pattern "cal-bahai" | 132 | (autoload 'mark-bahai-calendar-date-pattern "cal-bahai" |
| 136 | "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR." | 133 | "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR.") |
| 137 | t) | ||
| 138 | 134 | ||
| 139 | (autoload 'diary-hebrew-date "cal-hebrew" | 135 | (autoload 'diary-hebrew-date "cal-hebrew" |
| 140 | "Hebrew calendar equivalent of date diary entry.") | 136 | "Hebrew calendar equivalent of date diary entry.") |
| @@ -323,6 +319,42 @@ number of days of diary entries displayed." | |||
| 323 | (integer :tag "Saturday"))) | 319 | (integer :tag "Saturday"))) |
| 324 | :group 'diary) | 320 | :group 'diary) |
| 325 | 321 | ||
| 322 | |||
| 323 | (defvar diary-modify-entry-list-string-function nil | ||
| 324 | "Function applied to entry string before putting it into the entries list. | ||
| 325 | Can be used by programs integrating a diary list into other buffers (e.g. | ||
| 326 | org.el and planner.el) to modify the string or add properties to it. | ||
| 327 | The function takes a string argument and must return a string.") | ||
| 328 | |||
| 329 | (defun add-to-diary-list (date string specifier &optional marker | ||
| 330 | globcolor literal) | ||
| 331 | "Add an entry to `diary-entries-list'. | ||
| 332 | Do nothing if DATE or STRING is nil. DATE is the (MONTH DAY | ||
| 333 | YEAR) for which the entry applies; STRING is the text of the | ||
| 334 | entry as it will appear in the diary (i.e. with any format | ||
| 335 | strings such as \"%d\" expanded); SPECIFIER is the date part of | ||
| 336 | the entry as it appears in the diary-file; LITERAL is the entry | ||
| 337 | as it appears in the diary-file (i.e. before expansion). If | ||
| 338 | LITERAL is nil, it is taken to be the same as STRING. | ||
| 339 | |||
| 340 | The entry is added to the list as (DATE STRING SPECIFIER LOCATOR | ||
| 341 | GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL), | ||
| 342 | FILENAME being the file containing the diary entry." | ||
| 343 | (when (and date string) | ||
| 344 | (if diary-file-name-prefix | ||
| 345 | (let ((prefix (funcall diary-file-name-prefix-function | ||
| 346 | (buffer-file-name)))) | ||
| 347 | (or (string= prefix "") | ||
| 348 | (setq string (format "[%s] %s" prefix string))))) | ||
| 349 | (and diary-modify-entry-list-string-function | ||
| 350 | (setq string (funcall diary-modify-entry-list-string-function | ||
| 351 | string))) | ||
| 352 | (setq diary-entries-list | ||
| 353 | (append diary-entries-list | ||
| 354 | (list (list date string specifier | ||
| 355 | (list marker (buffer-file-name) literal) | ||
| 356 | globcolor)))))) | ||
| 357 | |||
| 326 | (define-obsolete-function-alias 'list-diary-entries 'diary-list-entries) | 358 | (define-obsolete-function-alias 'list-diary-entries 'diary-list-entries) |
| 327 | (defun diary-list-entries (date number &optional list-only) | 359 | (defun diary-list-entries (date number &optional list-only) |
| 328 | "Create and display a buffer containing the relevant lines in `diary-file'. | 360 | "Create and display a buffer containing the relevant lines in `diary-file'. |
| @@ -468,9 +500,7 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list." | |||
| 468 | (copy-marker entry-start) (nth 1 temp))))))) | 500 | (copy-marker entry-start) (nth 1 temp))))))) |
| 469 | (or entry-found | 501 | (or entry-found |
| 470 | (not diary-list-include-blanks) | 502 | (not diary-list-include-blanks) |
| 471 | (setq diary-entries-list | 503 | (add-to-diary-list date "" "" "" "")) |
| 472 | (append diary-entries-list | ||
| 473 | (list (list date "" "" "" ""))))) | ||
| 474 | (setq date | 504 | (setq date |
| 475 | (calendar-gregorian-from-absolute | 505 | (calendar-gregorian-from-absolute |
| 476 | (1+ (calendar-absolute-from-gregorian date)))) | 506 | (1+ (calendar-absolute-from-gregorian date)))) |
| @@ -577,10 +607,27 @@ changing the variable `diary-include-string'." | |||
| 577 | 'face 'diary-button) | 607 | 'face 'diary-button) |
| 578 | 608 | ||
| 579 | (defun diary-goto-entry (button) | 609 | (defun diary-goto-entry (button) |
| 580 | (let ((marker (button-get button 'marker))) | 610 | (let* ((locator (button-get button 'locator)) |
| 581 | (when marker | 611 | (marker (car locator)) |
| 582 | (pop-to-buffer (marker-buffer marker)) | 612 | markbuf file) |
| 583 | (goto-char (marker-position marker))))) | 613 | ;; If marker pointing to diary location is valid, use that. |
| 614 | (if (and marker (setq markbuf (marker-buffer marker))) | ||
| 615 | (progn | ||
| 616 | (pop-to-buffer markbuf) | ||
| 617 | (goto-char (marker-position marker))) | ||
| 618 | ;; Marker is invalid (eg buffer has been killed). | ||
| 619 | (or (and (setq file (cadr locator)) | ||
| 620 | (file-exists-p file) | ||
| 621 | (find-file-other-window file) | ||
| 622 | (progn | ||
| 623 | (when (eq major-mode default-major-mode) (diary-mode)) | ||
| 624 | (goto-char (point-min)) | ||
| 625 | (if (re-search-forward (format "%s.*\\(%s\\)" | ||
| 626 | (regexp-quote (nth 2 locator)) | ||
| 627 | (regexp-quote (nth 3 locator))) | ||
| 628 | nil t) | ||
| 629 | (goto-char (match-beginning 1))))) | ||
| 630 | (message "Unable to locate this diary entry"))))) | ||
| 584 | 631 | ||
| 585 | (defun fancy-diary-display () | 632 | (defun fancy-diary-display () |
| 586 | "Prepare a diary buffer with relevant entries in a fancy, noneditable form. | 633 | "Prepare a diary buffer with relevant entries in a fancy, noneditable form. |
| @@ -666,37 +713,45 @@ This function is provided for optional use as the `diary-display-hook'." | |||
| 666 | 713 | ||
| 667 | (setq entry (car (cdr (car entry-list)))) | 714 | (setq entry (car (cdr (car entry-list)))) |
| 668 | (if (< 0 (length entry)) | 715 | (if (< 0 (length entry)) |
| 669 | (progn | 716 | (let ((this-entry (car entry-list)) |
| 670 | (if (nth 3 (car entry-list)) | 717 | this-loc) |
| 718 | (if (setq this-loc (nth 3 this-entry)) | ||
| 671 | (insert-button (concat entry "\n") | 719 | (insert-button (concat entry "\n") |
| 672 | 'marker (nth 3 (car entry-list)) | 720 | ;; (MARKER FILENAME SPECIFIER LITERAL) |
| 721 | 'locator (list (car this-loc) | ||
| 722 | (cadr this-loc) | ||
| 723 | (nth 2 this-entry) | ||
| 724 | (or (nth 2 this-loc) | ||
| 725 | (nth 1 this-entry))) | ||
| 673 | :type 'diary-entry) | 726 | :type 'diary-entry) |
| 674 | (insert entry ?\n)) | 727 | (insert entry ?\n)) |
| 675 | (save-excursion | 728 | (save-excursion |
| 676 | (let* ((marks (nth 4 (car entry-list))) | 729 | (let* ((marks (nth 4 this-entry)) |
| 677 | (temp-face (make-symbol | 730 | (faceinfo marks) |
| 678 | (apply | 731 | temp-face) |
| 679 | 'concat "temp-face-" | 732 | (when marks |
| 680 | (mapcar (lambda (sym) | 733 | (setq temp-face (make-symbol |
| 681 | (if (stringp sym) | 734 | (apply |
| 682 | sym | 735 | 'concat "temp-face-" |
| 683 | (symbol-name sym))) | 736 | (mapcar (lambda (sym) |
| 684 | marks)))) | 737 | (if (stringp sym) |
| 685 | (faceinfo marks)) | 738 | sym |
| 686 | (make-face temp-face) | 739 | (symbol-name sym))) |
| 687 | ;; Remove :face info from the marks, | 740 | marks)))) |
| 688 | ;; copy the face info into temp-face | 741 | (make-face temp-face) |
| 689 | (while (setq faceinfo (memq :face faceinfo)) | 742 | ;; Remove :face info from the marks, |
| 690 | (copy-face (read (nth 1 faceinfo)) temp-face) | 743 | ;; copy the face info into temp-face |
| 691 | (setcar faceinfo nil) | 744 | (while (setq faceinfo (memq :face faceinfo)) |
| 692 | (setcar (cdr faceinfo) nil)) | 745 | (copy-face (read (nth 1 faceinfo)) temp-face) |
| 693 | (setq marks (delq nil marks)) | 746 | (setcar faceinfo nil) |
| 694 | ;; Apply the font aspects. | 747 | (setcar (cdr faceinfo) nil)) |
| 695 | (apply 'set-face-attribute temp-face nil marks) | 748 | (setq marks (delq nil marks)) |
| 696 | (search-backward entry) | 749 | ;; Apply the font aspects. |
| 697 | (overlay-put | 750 | (apply 'set-face-attribute temp-face nil marks) |
| 698 | (make-overlay (match-beginning 0) (match-end 0)) | 751 | (search-backward entry) |
| 699 | 'face temp-face))))) | 752 | (overlay-put |
| 753 | (make-overlay (match-beginning 0) (match-end 0)) | ||
| 754 | 'face temp-face)))))) | ||
| 700 | (setq entry-list (cdr entry-list)))) | 755 | (setq entry-list (cdr entry-list)))) |
| 701 | (set-buffer-modified-p nil) | 756 | (set-buffer-modified-p nil) |
| 702 | (goto-char (point-min)) | 757 | (goto-char (point-min)) |
| @@ -1350,7 +1405,7 @@ best if they are nonmarking." | |||
| 1350 | (setq line-start (point))) | 1405 | (setq line-start (point))) |
| 1351 | (setq specifier | 1406 | (setq specifier |
| 1352 | (buffer-substring-no-properties (1+ line-start) (point)) | 1407 | (buffer-substring-no-properties (1+ line-start) (point)) |
| 1353 | entry-start (1+ line-start)) | 1408 | entry-start (1+ line-start)) |
| 1354 | (forward-char 1) | 1409 | (forward-char 1) |
| 1355 | (if (and (or (char-equal (preceding-char) ?\^M) | 1410 | (if (and (or (char-equal (preceding-char) ?\^M) |
| 1356 | (char-equal (preceding-char) ?\n)) | 1411 | (char-equal (preceding-char) ?\n)) |
| @@ -1367,24 +1422,26 @@ best if they are nonmarking." | |||
| 1367 | (while (string-match "[\^M]" entry) | 1422 | (while (string-match "[\^M]" entry) |
| 1368 | (aset entry (match-beginning 0) ?\n ))) | 1423 | (aset entry (match-beginning 0) ?\n ))) |
| 1369 | (let ((diary-entry (diary-sexp-entry sexp entry date)) | 1424 | (let ((diary-entry (diary-sexp-entry sexp entry date)) |
| 1370 | temp) | 1425 | temp literal) |
| 1371 | (setq entry (if (consp diary-entry) | 1426 | (setq literal entry ; before evaluation |
| 1372 | (cdr diary-entry) | 1427 | entry (if (consp diary-entry) |
| 1373 | diary-entry)) | 1428 | (cdr diary-entry) |
| 1429 | diary-entry)) | ||
| 1374 | (if diary-entry | 1430 | (if diary-entry |
| 1375 | (progn | 1431 | (progn |
| 1376 | (remove-overlays line-start (point) 'invisible 'diary) | 1432 | (remove-overlays line-start (point) 'invisible 'diary) |
| 1377 | (if (< 0 (length entry)) | 1433 | (if (< 0 (length entry)) |
| 1378 | (setq temp (diary-pull-attrs entry file-glob-attrs) | 1434 | (setq temp (diary-pull-attrs entry file-glob-attrs) |
| 1379 | entry (nth 0 temp) | 1435 | entry (nth 0 temp) |
| 1380 | marks (nth 1 temp))))) | 1436 | marks (nth 1 temp))))) |
| 1381 | (add-to-diary-list date | 1437 | (add-to-diary-list date |
| 1382 | entry | 1438 | entry |
| 1383 | specifier | 1439 | specifier |
| 1384 | (if entry-start (copy-marker entry-start) | 1440 | (if entry-start (copy-marker entry-start) |
| 1385 | nil) | 1441 | nil) |
| 1386 | marks) | 1442 | marks |
| 1387 | (setq entry-found (or entry-found diary-entry))))) | 1443 | literal) |
| 1444 | (setq entry-found (or entry-found diary-entry))))) | ||
| 1388 | entry-found)) | 1445 | entry-found)) |
| 1389 | 1446 | ||
| 1390 | (defun diary-sexp-entry (sexp entry date) | 1447 | (defun diary-sexp-entry (sexp entry date) |
| @@ -1636,28 +1693,6 @@ marked on the calendar." | |||
| 1636 | (or (diary-remind sexp (car days) marking) | 1693 | (or (diary-remind sexp (car days) marking) |
| 1637 | (diary-remind sexp (cdr days) marking)))))) | 1694 | (diary-remind sexp (cdr days) marking)))))) |
| 1638 | 1695 | ||
| 1639 | (defvar diary-modify-entry-list-string-function nil | ||
| 1640 | "Function applied to entry string before putting it into the entries list. | ||
| 1641 | Can be used by programs integrating a diary list into other buffers (e.g. | ||
| 1642 | org.el and planner.el) to modify the string or add properties to it. | ||
| 1643 | The function takes a string argument and must return a string.") | ||
| 1644 | |||
| 1645 | (defun add-to-diary-list (date string specifier &optional marker globcolor) | ||
| 1646 | "Add the entry (DATE STRING SPECIFIER MARKER GLOBCOLOR) to `diary-entries-list'. | ||
| 1647 | Do nothing if DATE or STRING is nil." | ||
| 1648 | (when (and date string) | ||
| 1649 | (if diary-file-name-prefix | ||
| 1650 | (let ((prefix (funcall diary-file-name-prefix-function | ||
| 1651 | (buffer-file-name)))) | ||
| 1652 | (or (string= prefix "") | ||
| 1653 | (setq string (format "[%s] %s" prefix string))))) | ||
| 1654 | (and diary-modify-entry-list-string-function | ||
| 1655 | (setq string (funcall diary-modify-entry-list-string-function | ||
| 1656 | string))) | ||
| 1657 | (setq diary-entries-list | ||
| 1658 | (append diary-entries-list | ||
| 1659 | (list (list date string specifier marker globcolor)))))) | ||
| 1660 | |||
| 1661 | (defun diary-redraw-calendar () | 1696 | (defun diary-redraw-calendar () |
| 1662 | "If `calendar-buffer' is live and diary entries are marked, redraw it." | 1697 | "If `calendar-buffer' is live and diary entries are marked, redraw it." |
| 1663 | (and mark-diary-entries-in-calendar | 1698 | (and mark-diary-entries-in-calendar |
| @@ -1796,36 +1831,86 @@ Prefix arg will make the entry nonmarking." | |||
| 1796 | (if diary-header-line-flag | 1831 | (if diary-header-line-flag |
| 1797 | (setq header-line-format diary-header-line-format))) | 1832 | (setq header-line-format diary-header-line-format))) |
| 1798 | 1833 | ||
| 1799 | (define-derived-mode fancy-diary-display-mode fundamental-mode | ||
| 1800 | "Diary" | ||
| 1801 | "Major mode used while displaying diary entries using Fancy Display." | ||
| 1802 | (set (make-local-variable 'font-lock-defaults) | ||
| 1803 | '(fancy-diary-font-lock-keywords t)) | ||
| 1804 | (local-set-key "q" 'quit-window)) | ||
| 1805 | 1834 | ||
| 1835 | (defvar diary-fancy-date-pattern | ||
| 1836 | (concat | ||
| 1837 | (let ((dayname (diary-name-pattern calendar-day-name-array nil t)) | ||
| 1838 | (monthname (diary-name-pattern calendar-month-name-array nil t)) | ||
| 1839 | (day "[0-9]+") | ||
| 1840 | (month "[0-9]+") | ||
| 1841 | (year "-?[0-9]+")) | ||
| 1842 | (mapconcat 'eval calendar-date-display-form "")) | ||
| 1843 | ;; Optional ": holiday name" after the date. | ||
| 1844 | "\\(: .*\\)?") | ||
| 1845 | "Regular expression matching a date header in Fancy Diary.") | ||
| 1846 | |||
| 1847 | (defconst diary-time-regexp | ||
| 1848 | ;; Accepted formats: 10:00 10.00 10h00 10h 10am 10:00am 10.00am | ||
| 1849 | ;; Use of "." as a separator annoyingly matches numbers, eg "123.45". | ||
| 1850 | ;; Hence often prefix this with "\\(^\\|\\s-\\)." | ||
| 1851 | (concat "[0-9]?[0-9]\\([AaPp][mM]\\|\\(" | ||
| 1852 | "[Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]" | ||
| 1853 | "\\)\\([AaPp][Mm]\\)?\\)") | ||
| 1854 | "Regular expression matching a time of day.") | ||
| 1855 | |||
| 1856 | (defface diary-anniversary '((t :inherit font-lock-keyword-face)) | ||
| 1857 | "Face used for anniversaries in the diary." | ||
| 1858 | :version "22.1" | ||
| 1859 | :group 'diary) | ||
| 1860 | |||
| 1861 | (defface diary-time '((t :inherit font-lock-variable-name-face)) | ||
| 1862 | "Face used for times of day in the diary." | ||
| 1863 | :version "22.1" | ||
| 1864 | :group 'diary) | ||
| 1806 | 1865 | ||
| 1807 | (defvar fancy-diary-font-lock-keywords | 1866 | (defvar fancy-diary-font-lock-keywords |
| 1808 | (list | 1867 | (list |
| 1809 | (cons | 1868 | (list |
| 1810 | (concat | 1869 | ;; Any number of " other holiday name" lines, followed by "==" line. |
| 1811 | (let ((dayname (diary-name-pattern calendar-day-name-array nil t)) | 1870 | (concat diary-fancy-date-pattern "\\(\n +.*\\)*\n=+$") |
| 1812 | (monthname (diary-name-pattern calendar-month-name-array nil t)) | 1871 | '(0 (progn (put-text-property (match-beginning 0) (match-end 0) |
| 1813 | (day "[0-9]+") | 1872 | 'font-lock-multiline t) |
| 1814 | (month "[0-9]+") | 1873 | diary-face))) |
| 1815 | (year "-?[0-9]+")) | 1874 | '("^.*\\([aA]nniversary\\|[bB]irthday\\).*$" . 'diary-anniversary) |
| 1816 | (mapconcat 'eval calendar-date-display-form "")) | ||
| 1817 | "\\(\\(: .*\\)\\|\\(\n +.*\\)\\)*\n=+$") | ||
| 1818 | 'diary-face) | ||
| 1819 | '("^.*anniversary.*$" . font-lock-keyword-face) | ||
| 1820 | '("^.*birthday.*$" . font-lock-keyword-face) | ||
| 1821 | '("^.*Yahrzeit.*$" . font-lock-reference-face) | 1875 | '("^.*Yahrzeit.*$" . font-lock-reference-face) |
| 1822 | '("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face) | 1876 | '("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face) |
| 1823 | '("^Day.*omer.*$" . font-lock-builtin-face) | 1877 | '("^Day.*omer.*$" . font-lock-builtin-face) |
| 1824 | '("^Parashat.*$" . font-lock-comment-face) | 1878 | '("^Parashat.*$" . font-lock-comment-face) |
| 1825 | '("^[ \t]*[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?" | 1879 | `(,(format "\\(^\\|\\s-\\)%s\\(-%s\\)?" diary-time-regexp |
| 1826 | . font-lock-variable-name-face)) | 1880 | diary-time-regexp) . 'diary-time)) |
| 1827 | "Keywords to highlight in fancy diary display") | 1881 | "Keywords to highlight in fancy diary display") |
| 1828 | 1882 | ||
| 1883 | ;; If region looks like it might start or end in the middle of a | ||
| 1884 | ;; multiline pattern, extend the region to encompass the whole pattern. | ||
| 1885 | (defun diary-fancy-font-lock-fontify-region-function (beg end &optional verbose) | ||
| 1886 | "Function to use for `font-lock-fontify-region-function' in Fancy Diary. | ||
| 1887 | Needed to handle multiline keyword in `fancy-diary-font-lock-keywords'." | ||
| 1888 | (goto-char beg) | ||
| 1889 | (forward-line 0) | ||
| 1890 | (if (looking-at "=+$") (forward-line -1)) | ||
| 1891 | (while (and (looking-at " +[^ ]") | ||
| 1892 | (zerop (forward-line -1)))) | ||
| 1893 | ;; This check not essential. | ||
| 1894 | (if (looking-at diary-fancy-date-pattern) | ||
| 1895 | (setq beg (line-beginning-position))) | ||
| 1896 | (goto-char end) | ||
| 1897 | (forward-line 0) | ||
| 1898 | (while (and (looking-at " +[^ ]") | ||
| 1899 | (zerop (forward-line 1)))) | ||
| 1900 | (if (looking-at "=+$") | ||
| 1901 | (setq end (line-beginning-position 2))) | ||
| 1902 | (font-lock-default-fontify-region beg end verbose)) | ||
| 1903 | |||
| 1904 | (define-derived-mode fancy-diary-display-mode fundamental-mode | ||
| 1905 | "Diary" | ||
| 1906 | "Major mode used while displaying diary entries using Fancy Display." | ||
| 1907 | (set (make-local-variable 'font-lock-defaults) | ||
| 1908 | '(fancy-diary-font-lock-keywords | ||
| 1909 | t nil nil nil | ||
| 1910 | (font-lock-fontify-region-function | ||
| 1911 | . diary-fancy-font-lock-fontify-region-function))) | ||
| 1912 | (local-set-key "q" 'quit-window)) | ||
| 1913 | |||
| 1829 | 1914 | ||
| 1830 | (defun diary-font-lock-sexps (limit) | 1915 | (defun diary-font-lock-sexps (limit) |
| 1831 | "Recognize sexp diary entry for font-locking." | 1916 | "Recognize sexp diary entry for font-locking." |
| @@ -1877,13 +1962,6 @@ names." | |||
| 1877 | (eval-when-compile (require 'cal-hebrew) | 1962 | (eval-when-compile (require 'cal-hebrew) |
| 1878 | (require 'cal-islam)) | 1963 | (require 'cal-islam)) |
| 1879 | 1964 | ||
| 1880 | (defconst diary-time-regexp | ||
| 1881 | ;; Formats that should be accepted: | ||
| 1882 | ;; 10:00 10.00 10h00 10h 10am 10:00am 10.00am | ||
| 1883 | (concat "[0-9]?[0-9]\\([AaPp][mM]\\|\\(" | ||
| 1884 | "[Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]" | ||
| 1885 | "\\)\\([AaPp][Mm]\\)?\\)")) | ||
| 1886 | |||
| 1887 | (defvar diary-font-lock-keywords | 1965 | (defvar diary-font-lock-keywords |
| 1888 | (append | 1966 | (append |
| 1889 | (diary-font-lock-date-forms calendar-month-name-array | 1967 | (diary-font-lock-date-forms calendar-month-name-array |
| @@ -1924,10 +2002,9 @@ names." | |||
| 1924 | "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)") | 2002 | "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)") |
| 1925 | '(1 font-lock-reference-face)) | 2003 | '(1 font-lock-reference-face)) |
| 1926 | '(diary-font-lock-sexps . font-lock-keyword-face) | 2004 | '(diary-font-lock-sexps . font-lock-keyword-face) |
| 1927 | (cons | 2005 | `(,(concat "\\(^\\|\\s-\\)" |
| 1928 | (concat ;; "^[ \t]+" | 2006 | diary-time-regexp "\\(-" diary-time-regexp "\\)?") |
| 1929 | diary-time-regexp "\\(-" diary-time-regexp "\\)?") | 2007 | . 'diary-time))) |
| 1930 | 'font-lock-function-name-face))) | ||
| 1931 | "Forms to highlight in `diary-mode'.") | 2008 | "Forms to highlight in `diary-mode'.") |
| 1932 | 2009 | ||
| 1933 | 2010 | ||
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index fa85ce21fb0..7742de944cb 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el | |||
| @@ -205,6 +205,22 @@ BUT if it is the header or the footer in EWOC return nil instead." | |||
| 205 | (eq node (ewoc--footer ewoc))) | 205 | (eq node (ewoc--footer ewoc))) |
| 206 | node)) | 206 | node)) |
| 207 | 207 | ||
| 208 | (defun ewoc--adjust (beg end node) | ||
| 209 | ;; "Manually reseat" markers for NODE and its successors (including footer | ||
| 210 | ;; and dll), in the case where they originally shared start position with | ||
| 211 | ;; BEG, to END. BEG and END are buffer positions describing NODE's left | ||
| 212 | ;; neighbor. This operation is functionally equivalent to temporarily | ||
| 213 | ;; setting these nodes' markers' insertion type to t around the pretty-print | ||
| 214 | ;; call that precedes the call to `ewoc-adjust', and then changing them back | ||
| 215 | ;; to nil. | ||
| 216 | (when (< beg end) | ||
| 217 | (let (m) | ||
| 218 | (while (and (= beg (setq m (ewoc--node-start-marker node))) | ||
| 219 | (progn | ||
| 220 | (set-marker m end) | ||
| 221 | (not (eq dll node)))) | ||
| 222 | (setq node (ewoc--node-right node)))))) | ||
| 223 | |||
| 208 | (defun ewoc--insert-new-node (node data pretty-printer) | 224 | (defun ewoc--insert-new-node (node data pretty-printer) |
| 209 | "Insert before NODE a new node for DATA, displayed by PRETTY-PRINTER. | 225 | "Insert before NODE a new node for DATA, displayed by PRETTY-PRINTER. |
| 210 | Call PRETTY-PRINTER with point at NODE's start, thus pushing back | 226 | Call PRETTY-PRINTER with point at NODE's start, thus pushing back |
| @@ -215,29 +231,26 @@ NODE and leaving the new node's start there. Return the new node." | |||
| 215 | (pos (marker-position m)) | 231 | (pos (marker-position m)) |
| 216 | (elemnode (ewoc--node-create m data))) | 232 | (elemnode (ewoc--node-create m data))) |
| 217 | (goto-char pos) | 233 | (goto-char pos) |
| 218 | ;; Insert the trailing newline using insert-before-markers | ||
| 219 | ;; so that the start position for the next element is updated. | ||
| 220 | (insert-before-markers ?\n) | ||
| 221 | ;; Move back, and call the pretty-printer. | ||
| 222 | (backward-char 1) | ||
| 223 | (funcall pretty-printer data) | 234 | (funcall pretty-printer data) |
| 224 | (setf (marker-position m) pos | 235 | (setf (marker-position m) pos |
| 225 | (ewoc--node-left elemnode) (ewoc--node-left node) | 236 | (ewoc--node-left elemnode) (ewoc--node-left node) |
| 226 | (ewoc--node-right elemnode) node | 237 | (ewoc--node-right elemnode) node |
| 227 | (ewoc--node-right (ewoc--node-left node)) elemnode | 238 | (ewoc--node-right (ewoc--node-left node)) elemnode |
| 228 | (ewoc--node-left node) elemnode) | 239 | (ewoc--node-left node) elemnode) |
| 240 | (ewoc--adjust pos (point) node) | ||
| 229 | elemnode))) | 241 | elemnode))) |
| 230 | 242 | ||
| 231 | (defun ewoc--refresh-node (pp node) | 243 | (defun ewoc--refresh-node (pp node) |
| 232 | "Redisplay the element represented by NODE using the pretty-printer PP." | 244 | "Redisplay the element represented by NODE using the pretty-printer PP." |
| 233 | (let ((inhibit-read-only t)) | 245 | (let ((inhibit-read-only t) |
| 246 | (m (ewoc--node-start-marker node)) | ||
| 247 | (R (ewoc--node-right node))) | ||
| 234 | ;; First, remove the string from the buffer: | 248 | ;; First, remove the string from the buffer: |
| 235 | (delete-region (ewoc--node-start-marker node) | 249 | (delete-region m (ewoc--node-start-marker R)) |
| 236 | (1- (marker-position | ||
| 237 | (ewoc--node-start-marker (ewoc--node-right node))))) | ||
| 238 | ;; Calculate and insert the string. | 250 | ;; Calculate and insert the string. |
| 239 | (goto-char (ewoc--node-start-marker node)) | 251 | (goto-char m) |
| 240 | (funcall pp (ewoc--node-data node)))) | 252 | (funcall pp (ewoc--node-data node)) |
| 253 | (ewoc--adjust m (point) R))) | ||
| 241 | 254 | ||
| 242 | ;;; =========================================================================== | 255 | ;;; =========================================================================== |
| 243 | ;;; Public members of the Ewoc package | 256 | ;;; Public members of the Ewoc package |
| @@ -251,14 +264,12 @@ The ewoc will be inserted in the current buffer at the current position. | |||
| 251 | PRETTY-PRINTER should be a function that takes one argument, an | 264 | PRETTY-PRINTER should be a function that takes one argument, an |
| 252 | element, and inserts a string representing it in the buffer (at | 265 | element, and inserts a string representing it in the buffer (at |
| 253 | point). The string PRETTY-PRINTER inserts may be empty or span | 266 | point). The string PRETTY-PRINTER inserts may be empty or span |
| 254 | several lines. A trailing newline will always be inserted | 267 | several lines. The PRETTY-PRINTER should use `insert', and not |
| 255 | automatically. The PRETTY-PRINTER should use `insert', and not | ||
| 256 | `insert-before-markers'. | 268 | `insert-before-markers'. |
| 257 | 269 | ||
| 258 | Optional second argument HEADER is a string that will always be | 270 | Optional second and third arguments HEADER and FOOTER are strings, |
| 259 | present at the top of the ewoc. HEADER should end with a | 271 | possibly empty, that will always be present at the top and bottom, |
| 260 | newline. Optional third argument FOOTER is similar, and will | 272 | respectively, of the ewoc." |
| 261 | be inserted at the bottom of the ewoc." | ||
| 262 | (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)) | 273 | (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)) |
| 263 | (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) | 274 | (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) |
| 264 | (setf (ewoc--node-left dummy-node) dummy-node) | 275 | (setf (ewoc--node-left dummy-node) dummy-node) |
| @@ -352,11 +363,12 @@ If more than two arguments are given, the remaining | |||
| 352 | arguments will be passed to MAP-FUNCTION." | 363 | arguments will be passed to MAP-FUNCTION." |
| 353 | (ewoc--set-buffer-bind-dll-let* ewoc | 364 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 354 | ((footer (ewoc--footer ewoc)) | 365 | ((footer (ewoc--footer ewoc)) |
| 366 | (pp (ewoc--pretty-printer ewoc)) | ||
| 355 | (node (ewoc--node-nth dll 1))) | 367 | (node (ewoc--node-nth dll 1))) |
| 356 | (save-excursion | 368 | (save-excursion |
| 357 | (while (not (eq node footer)) | 369 | (while (not (eq node footer)) |
| 358 | (if (apply map-function (ewoc--node-data node) args) | 370 | (if (apply map-function (ewoc--node-data node) args) |
| 359 | (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)) | 371 | (ewoc--refresh-node pp node)) |
| 360 | (setq node (ewoc--node-next dll node)))))) | 372 | (setq node (ewoc--node-next dll node)))))) |
| 361 | 373 | ||
| 362 | (defun ewoc-filter (ewoc predicate &rest args) | 374 | (defun ewoc-filter (ewoc predicate &rest args) |
| @@ -465,10 +477,11 @@ If the EWOC is empty, nil is returned." | |||
| 465 | (defun ewoc-invalidate (ewoc &rest nodes) | 477 | (defun ewoc-invalidate (ewoc &rest nodes) |
| 466 | "Call EWOC's pretty-printer for each element in NODES. | 478 | "Call EWOC's pretty-printer for each element in NODES. |
| 467 | Delete current text first, thus effecting a \"refresh\"." | 479 | Delete current text first, thus effecting a \"refresh\"." |
| 468 | (ewoc--set-buffer-bind-dll ewoc | 480 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 481 | ((pp (ewoc--pretty-printer ewoc))) | ||
| 469 | (save-excursion | 482 | (save-excursion |
| 470 | (dolist (node nodes) | 483 | (dolist (node nodes) |
| 471 | (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))) | 484 | (ewoc--refresh-node pp node))))) |
| 472 | 485 | ||
| 473 | (defun ewoc-goto-prev (ewoc arg) | 486 | (defun ewoc-goto-prev (ewoc arg) |
| 474 | "Move point to the ARGth previous element in EWOC. | 487 | "Move point to the ARGth previous element in EWOC. |
| @@ -525,7 +538,6 @@ number of elements needs to be refreshed." | |||
| 525 | (while (not (eq node footer)) | 538 | (while (not (eq node footer)) |
| 526 | (set-marker (ewoc--node-start-marker node) (point)) | 539 | (set-marker (ewoc--node-start-marker node) (point)) |
| 527 | (funcall pp (ewoc--node-data node)) | 540 | (funcall pp (ewoc--node-data node)) |
| 528 | (insert "\n") | ||
| 529 | (setq node (ewoc--node-next dll node))))) | 541 | (setq node (ewoc--node-next dll node))))) |
| 530 | (set-marker (ewoc--node-start-marker footer) (point)))) | 542 | (set-marker (ewoc--node-start-marker footer) (point)))) |
| 531 | 543 | ||
| @@ -564,11 +576,14 @@ Return nil if the buffer has been deleted." | |||
| 564 | 576 | ||
| 565 | (defun ewoc-set-hf (ewoc header footer) | 577 | (defun ewoc-set-hf (ewoc header footer) |
| 566 | "Set the HEADER and FOOTER of EWOC." | 578 | "Set the HEADER and FOOTER of EWOC." |
| 567 | (setf (ewoc--node-data (ewoc--header ewoc)) header) | 579 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 568 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) | 580 | ((head (ewoc--header ewoc)) |
| 569 | (save-excursion | 581 | (foot (ewoc--footer ewoc))) |
| 570 | (ewoc--refresh-node 'insert (ewoc--header ewoc)) | 582 | (setf (ewoc--node-data head) header |
| 571 | (ewoc--refresh-node 'insert (ewoc--footer ewoc)))) | 583 | (ewoc--node-data foot) footer) |
| 584 | (save-excursion | ||
| 585 | (ewoc--refresh-node 'insert head) | ||
| 586 | (ewoc--refresh-node 'insert foot)))) | ||
| 572 | 587 | ||
| 573 | 588 | ||
| 574 | (provide 'ewoc) | 589 | (provide 'ewoc) |
diff --git a/lisp/files.el b/lisp/files.el index 4d9fca8bf36..4e8c5623183 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3063,6 +3063,7 @@ except that a leading `.', if any, doesn't count." | |||
| 3063 | (defun file-name-extension (filename &optional period) | 3063 | (defun file-name-extension (filename &optional period) |
| 3064 | "Return FILENAME's final \"extension\". | 3064 | "Return FILENAME's final \"extension\". |
| 3065 | The extension, in a file name, is the part that follows the last `.', | 3065 | The extension, in a file name, is the part that follows the last `.', |
| 3066 | excluding version numbers and backup suffixes, | ||
| 3066 | except that a leading `.', if any, doesn't count. | 3067 | except that a leading `.', if any, doesn't count. |
| 3067 | Return nil for extensionless file names such as `foo'. | 3068 | Return nil for extensionless file names such as `foo'. |
| 3068 | Return the empty string for file names such as `foo.'. | 3069 | Return the empty string for file names such as `foo.'. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7f0f248c7cf..1e5bfa23ed3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2006-05-18 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-save-article-mail): Clarify doc string. | ||
| 4 | (gnus-summary-expire-articles-now): Shorten prompt. | ||
| 5 | |||
| 6 | * gmm-utils.el (wid-edit): Require. | ||
| 7 | (defun-gmm): Renamed from `gmm-defun-compat'. | ||
| 8 | (gmm-image-search-load-path): Use it. | ||
| 9 | (gmm-image-load-path-for-library): Use it. Sync with `mh-compat.el'. | ||
| 10 | |||
| 1 | 2006-05-04 Stefan Monnier <monnier@iro.umontreal.ca> | 11 | 2006-05-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 12 | ||
| 3 | * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment. | 13 | * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment. |
| @@ -4112,6 +4122,7 @@ See ChangeLog.2 for earlier changes. | |||
| 4112 | 4122 | ||
| 4113 | ;; Local Variables: | 4123 | ;; Local Variables: |
| 4114 | ;; coding: iso-2022-7bit | 4124 | ;; coding: iso-2022-7bit |
| 4125 | ;; fill-column: 79 | ||
| 4115 | ;; End: | 4126 | ;; End: |
| 4116 | 4127 | ||
| 4117 | ;;; arch-tag: 3f33a3e7-090d-492b-bedd-02a1417d32b4 | 4128 | ;;; arch-tag: 3f33a3e7-090d-492b-bedd-02a1417d32b4 |
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index 4db811053ec..f314d0e81d7 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | ;;; Code: | 31 | ;;; Code: |
| 32 | 32 | ||
| 33 | ;; (require 'wid-edit) | 33 | (require 'wid-edit) |
| 34 | 34 | ||
| 35 | (defgroup gmm nil | 35 | (defgroup gmm nil |
| 36 | "Utility functions for Gnus, Message and MML" | 36 | "Utility functions for Gnus, Message and MML" |
| @@ -279,11 +279,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST." | |||
| 279 | icon-list)) | 279 | icon-list)) |
| 280 | tool-bar-map)) | 280 | tool-bar-map)) |
| 281 | 281 | ||
| 282 | ;; WARNING: The following is subject to change. Don't rely on it yet. | 282 | (defmacro defun-gmm (name function arg-list &rest body) |
| 283 | |||
| 284 | ;; From MH-E without modifications: | ||
| 285 | |||
| 286 | (defmacro gmm-defun-compat (name function arg-list &rest body) | ||
| 287 | "Create function NAME. | 283 | "Create function NAME. |
| 288 | If FUNCTION exists, then NAME becomes an alias for FUNCTION. | 284 | If FUNCTION exists, then NAME becomes an alias for FUNCTION. |
| 289 | Otherwise, create function NAME with ARG-LIST and BODY." | 285 | Otherwise, create function NAME with ARG-LIST and BODY." |
| @@ -292,21 +288,19 @@ Otherwise, create function NAME with ARG-LIST and BODY." | |||
| 292 | `(defalias ',name ',function) | 288 | `(defalias ',name ',function) |
| 293 | `(defun ,name ,arg-list ,@body)))) | 289 | `(defun ,name ,arg-list ,@body)))) |
| 294 | 290 | ||
| 295 | (gmm-defun-compat gmm-image-search-load-path | 291 | (defun-gmm gmm-image-search-load-path |
| 296 | image-search-load-path (file &optional path) | 292 | image-search-load-path (file &optional path) |
| 297 | "Emacs 21 and XEmacs don't have `image-search-load-path'. | 293 | "Emacs 21 and XEmacs don't have `image-search-load-path'. |
| 298 | This function returns nil on those systems." | 294 | This function returns nil on those systems." |
| 299 | nil) | 295 | nil) |
| 300 | 296 | ||
| 301 | ;; From MH-E with modifications: | 297 | ;; Cf. `mh-image-load-path-for-library' in `mh-compat.el'. |
| 302 | |||
| 303 | ;; Don't use `gmm-defun-compat' until API changes in | ||
| 304 | ;; `image-load-path-for-library' in Emacs CVS are completed. | ||
| 305 | 298 | ||
| 306 | (defun gmm-image-load-path-for-library (library image &optional path no-error) | 299 | (defun-gmm gmm-image-load-path-for-library |
| 307 | "Return a suitable search path for images relative to LIBRARY. | 300 | image-load-path-for-library (library image &optional path no-error) |
| 301 | "Return a suitable search path for images used by LIBRARY. | ||
| 308 | 302 | ||
| 309 | First it searches for IMAGE in `image-load-path' (excluding | 303 | It searches for IMAGE in `image-load-path' (excluding |
| 310 | \"`data-directory'/images\") and `load-path', followed by a path | 304 | \"`data-directory'/images\") and `load-path', followed by a path |
| 311 | suitable for LIBRARY, which includes \"../../etc/images\" and | 305 | suitable for LIBRARY, which includes \"../../etc/images\" and |
| 312 | \"../etc/images\" relative to the library file itself, and then | 306 | \"../etc/images\" relative to the library file itself, and then |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index daecb1701cd..5208ae27eb9 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9507,7 +9507,7 @@ deleted forever, right now." | |||
| 9507 | (interactive) | 9507 | (interactive) |
| 9508 | (or gnus-expert-user | 9508 | (or gnus-expert-user |
| 9509 | (gnus-yes-or-no-p | 9509 | (gnus-yes-or-no-p |
| 9510 | "Are you really, really, really sure you want to delete all these messages? ") | 9510 | "Are you really, really sure you want to delete all expirable messages? ") |
| 9511 | (error "Phew!")) | 9511 | (error "Phew!")) |
| 9512 | (gnus-summary-expire-articles t)) | 9512 | (gnus-summary-expire-articles t)) |
| 9513 | 9513 | ||
| @@ -11043,7 +11043,7 @@ If HEADERS (the symbolic prefix), include the headers, too." | |||
| 11043 | (gnus-configure-windows 'pipe)))) | 11043 | (gnus-configure-windows 'pipe)))) |
| 11044 | 11044 | ||
| 11045 | (defun gnus-summary-save-article-mail (&optional arg) | 11045 | (defun gnus-summary-save-article-mail (&optional arg) |
| 11046 | "Append the current article to an mail file. | 11046 | "Append the current article to a Unix mail box file. |
| 11047 | If N is a positive number, save the N next articles. | 11047 | If N is a positive number, save the N next articles. |
| 11048 | If N is a negative number, save the N previous articles. | 11048 | If N is a negative number, save the N previous articles. |
| 11049 | If N is nil and any articles have been marked with the process mark, | 11049 | If N is nil and any articles have been marked with the process mark, |
diff --git a/lisp/ido.el b/lisp/ido.el index a622a7e6275..d03c002d597 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -1778,7 +1778,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise." | |||
| 1778 | "Perform the `ido-read-buffer' and `ido-read-file-name' functions. | 1778 | "Perform the `ido-read-buffer' and `ido-read-file-name' functions. |
| 1779 | Return the name of a buffer or file selected. | 1779 | Return the name of a buffer or file selected. |
| 1780 | PROMPT is the prompt to give to the user. | 1780 | PROMPT is the prompt to give to the user. |
| 1781 | DEFAULT if given is the default directory to start with. | 1781 | DEFAULT if given is the default item to start with. |
| 1782 | If REQUIRE-MATCH is non-nil, an existing file must be selected. | 1782 | If REQUIRE-MATCH is non-nil, an existing file must be selected. |
| 1783 | If INITIAL is non-nil, it specifies the initial input string." | 1783 | If INITIAL is non-nil, it specifies the initial input string." |
| 1784 | (let | 1784 | (let |
| @@ -1822,7 +1822,10 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 1822 | (cond | 1822 | (cond |
| 1823 | ((eq item 'buffer) | 1823 | ((eq item 'buffer) |
| 1824 | (if (bufferp default) (buffer-name default) default)) | 1824 | (if (bufferp default) (buffer-name default) default)) |
| 1825 | ((stringp default) default) | 1825 | ((stringp default) |
| 1826 | (if (memq item '(file dir)) | ||
| 1827 | (file-name-nondirectory default) | ||
| 1828 | default)) | ||
| 1826 | ((eq item 'file) | 1829 | ((eq item 'file) |
| 1827 | (and ido-enable-last-directory-history | 1830 | (and ido-enable-last-directory-history |
| 1828 | (let ((d (assoc ido-current-directory ido-last-directory-list))) | 1831 | (let ((d (assoc ido-current-directory ido-last-directory-list))) |
diff --git a/lisp/international/code-pages.el b/lisp/international/code-pages.el index 359773ac346..13181268b36 100644 --- a/lisp/international/code-pages.el +++ b/lisp/international/code-pages.el | |||
| @@ -4489,7 +4489,7 @@ Return an updated `non-iso-charset-alist'." | |||
| 4489 | 4489 | ||
| 4490 | ;; Suggested by Anton Zinoviev <anton@lml.bas.bg>: Bulgarian DOS | 4490 | ;; Suggested by Anton Zinoviev <anton@lml.bas.bg>: Bulgarian DOS |
| 4491 | ;; codepage. Table at | 4491 | ;; codepage. Table at |
| 4492 | ;; <URL:http://czyborra.com/charsets/bulgarian-mik.txt.gz>. | 4492 | ;; <http://en.wikipedia.org/wiki/MIK_Code_page>. |
| 4493 | ;;;###autoload(autoload-coding-system 'mik '(require 'code-pages)) | 4493 | ;;;###autoload(autoload-coding-system 'mik '(require 'code-pages)) |
| 4494 | (cp-make-coding-system | 4494 | (cp-make-coding-system |
| 4495 | mik | 4495 | mik |
| @@ -4497,7 +4497,7 @@ Return an updated `non-iso-charset-alist'." | |||
| 4497 | ?Ч ?Ш ?Щ ?Ъ ?Ы ?Ь ?Р?Ю ?Я ?а ?б ?в ?г ?д ?е ?ж ?з ?и ?й ?к ?л ?м ?н | 4497 | ?Ч ?Ш ?Щ ?Ъ ?Ы ?Ь ?Р?Ю ?Я ?а ?б ?в ?г ?д ?е ?ж ?з ?и ?й ?к ?л ?м ?н |
| 4498 | ?о ?п ?Ñ€ ?Ñ ?Ñ‚ ?у ?Ñ„ ?Ñ… ?ц ?ч ?ш ?щ ?ÑŠ ?Ñ‹ ?ÑŒ ?Ñ ?ÑŽ ?Ñ ?â”” ?â”´ ?┬ ?├ ?─ | 4498 | ?о ?п ?Ñ€ ?Ñ ?Ñ‚ ?у ?Ñ„ ?Ñ… ?ц ?ч ?ш ?щ ?ÑŠ ?Ñ‹ ?ÑŒ ?Ñ ?ÑŽ ?Ñ ?â”” ?â”´ ?┬ ?├ ?─ |
| 4499 | ?┼ ?╣ ?║ ?╚ ?╔ ?╩ ?╦ ?╠?╠?╬ ?┠?░ ?▒ ?▓ ?│ ?┤ ?№ ?§ ?╗ ?╠?┘ ?┌ ?█ | 4499 | ?┼ ?╣ ?║ ?╚ ?╔ ?╩ ?╦ ?╠?╠?╬ ?┠?░ ?▒ ?▓ ?│ ?┤ ?№ ?§ ?╗ ?╠?┘ ?┌ ?█ |
| 4500 | ?▄ ?▌ ?■?▀ ?α ?β ?Γ ?π ?Σ ?σ ?μ ?τ ?Φ ?Θ ?Ω ?δ ?∞ ?∅ ?∈ ?∩ ?≡ ?± ?≥ | 4500 | ?▄ ?▌ ?■?▀ ?α ?ß ?Γ ?π ?Σ ?σ ?µ ?τ ?Φ ?Θ ?Ω ?δ ?∞ ?φ ?ε ?∩ ?≡ ?± ?≥ |
| 4501 | ?≤ ?⌠?⌡ ?÷ ?≈ ?° ?∙ ?· ?√ ?⿠?² ?■? ]) | 4501 | ?≤ ?⌠?⌡ ?÷ ?≈ ?° ?∙ ?· ?√ ?⿠?² ?■? ]) |
| 4502 | (coding-system-put 'mik 'mime-charset nil) | 4502 | (coding-system-put 'mik 'mime-charset nil) |
| 4503 | 4503 | ||
diff --git a/lisp/pcvs-info.el b/lisp/pcvs-info.el index 4aaa5add58d..085f294e6fb 100644 --- a/lisp/pcvs-info.el +++ b/lisp/pcvs-info.el | |||
| @@ -379,7 +379,8 @@ For use by the cookie package." | |||
| 379 | ;; or nothing | 379 | ;; or nothing |
| 380 | ""))) | 380 | ""))) |
| 381 | (format "%-11s %s %-11s %-11s %s" | 381 | (format "%-11s %s %-11s %-11s %s" |
| 382 | side status type base file))))))) | 382 | side status type base file)))) |
| 383 | "\n"))) | ||
| 383 | 384 | ||
| 384 | 385 | ||
| 385 | (defun cvs-fileinfo-update (fi fi-new) | 386 | (defun cvs-fileinfo-update (fi fi-new) |
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index b9d04522181..7209c135e52 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -467,7 +467,7 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 467 | (cvs-mode) | 467 | (cvs-mode) |
| 468 | (set (make-local-variable 'list-buffers-directory) buffer-name) | 468 | (set (make-local-variable 'list-buffers-directory) buffer-name) |
| 469 | ;;(set (make-local-variable 'cvs-temp-buffer) (cvs-temp-buffer)) | 469 | ;;(set (make-local-variable 'cvs-temp-buffer) (cvs-temp-buffer)) |
| 470 | (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n" ""))) | 470 | (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n\n" "\n"))) |
| 471 | (set (make-local-variable 'cvs-cookies) cookies) | 471 | (set (make-local-variable 'cvs-cookies) cookies) |
| 472 | (add-hook 'kill-buffer-hook | 472 | (add-hook 'kill-buffer-hook |
| 473 | (lambda () | 473 | (lambda () |
| @@ -618,7 +618,7 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 618 | (str (car hf)) | 618 | (str (car hf)) |
| 619 | (done "") | 619 | (done "") |
| 620 | (tin (ewoc-nth cvs-cookies 0))) | 620 | (tin (ewoc-nth cvs-cookies 0))) |
| 621 | (if (eq (length str) 1) (setq str "")) | 621 | (if (eq (length str) 2) (setq str "")) |
| 622 | ;; look for the first *real* fileinfo (to determine emptyness) | 622 | ;; look for the first *real* fileinfo (to determine emptyness) |
| 623 | (while | 623 | (while |
| 624 | (and tin | 624 | (and tin |
| @@ -633,6 +633,7 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 633 | (setq str (replace-match "" t t str)) | 633 | (setq str (replace-match "" t t str)) |
| 634 | (if (zerop (length str)) (setq str "\n")) | 634 | (if (zerop (length str)) (setq str "\n")) |
| 635 | (setq done (concat "-- last cmd: " cmd " --")))) | 635 | (setq done (concat "-- last cmd: " cmd " --")))) |
| 636 | (setq str (concat str "\n") done (concat done "\n")) | ||
| 636 | ;; set the new header and footer | 637 | ;; set the new header and footer |
| 637 | (ewoc-set-hf cvs-cookies | 638 | (ewoc-set-hf cvs-cookies |
| 638 | str (concat "\n--------------------- " | 639 | str (concat "\n--------------------- " |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 410a973d1b4..d207094cafe 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -553,7 +553,7 @@ easily repeat a find command." | |||
| 553 | (read-string | 553 | (read-string |
| 554 | "compile.el: No `grep-find-command' command available. Press RET.") | 554 | "compile.el: No `grep-find-command' command available. Press RET.") |
| 555 | (list nil)))) | 555 | (list nil)))) |
| 556 | (when (and grep-find-command command-args) | 556 | (when command-args |
| 557 | (let ((null-device nil)) ; see grep | 557 | (let ((null-device nil)) ; see grep |
| 558 | (grep command-args)))) | 558 | (grep command-args)))) |
| 559 | 559 | ||
diff --git a/lisp/shell.el b/lisp/shell.el index 71b5862feb6..bfa9565e8d4 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -150,7 +150,7 @@ This is a fine thing to set in your `.emacs' file." | |||
| 150 | :group 'shell) | 150 | :group 'shell) |
| 151 | 151 | ||
| 152 | (defcustom shell-completion-fignore nil | 152 | (defcustom shell-completion-fignore nil |
| 153 | "*List of suffixes to be disregarded during file/command completion. | 153 | "List of suffixes to be disregarded during file/command completion. |
| 154 | This variable is used to initialize `comint-completion-fignore' in the shell | 154 | This variable is used to initialize `comint-completion-fignore' in the shell |
| 155 | buffer. The default is nil, for compatibility with most shells. | 155 | buffer. The default is nil, for compatibility with most shells. |
| 156 | Some people like (\"~\" \"#\" \"%\"). | 156 | Some people like (\"~\" \"#\" \"%\"). |
| @@ -199,19 +199,19 @@ shell buffer. | |||
| 199 | This is a fine thing to set in your `.emacs' file.") | 199 | This is a fine thing to set in your `.emacs' file.") |
| 200 | 200 | ||
| 201 | (defcustom shell-command-regexp "[^;&|\n]+" | 201 | (defcustom shell-command-regexp "[^;&|\n]+" |
| 202 | "*Regexp to match a single command within a pipeline. | 202 | "Regexp to match a single command within a pipeline. |
| 203 | This is used for directory tracking and does not do a perfect job." | 203 | This is used for directory tracking and does not do a perfect job." |
| 204 | :type 'regexp | 204 | :type 'regexp |
| 205 | :group 'shell) | 205 | :group 'shell) |
| 206 | 206 | ||
| 207 | (defcustom shell-command-separator-regexp "[;&|\n \t]*" | 207 | (defcustom shell-command-separator-regexp "[;&|\n \t]*" |
| 208 | "*Regexp to match a single command within a pipeline. | 208 | "Regexp to match a single command within a pipeline. |
| 209 | This is used for directory tracking and does not do a perfect job." | 209 | This is used for directory tracking and does not do a perfect job." |
| 210 | :type 'regexp | 210 | :type 'regexp |
| 211 | :group 'shell) | 211 | :group 'shell) |
| 212 | 212 | ||
| 213 | (defcustom shell-completion-execonly t | 213 | (defcustom shell-completion-execonly t |
| 214 | "*If non-nil, use executable files only for completion candidates. | 214 | "If non-nil, use executable files only for completion candidates. |
| 215 | This mirrors the optional behavior of tcsh. | 215 | This mirrors the optional behavior of tcsh. |
| 216 | 216 | ||
| 217 | Detecting executability of files may slow command completion considerably." | 217 | Detecting executability of files may slow command completion considerably." |
| @@ -219,35 +219,35 @@ Detecting executability of files may slow command completion considerably." | |||
| 219 | :group 'shell) | 219 | :group 'shell) |
| 220 | 220 | ||
| 221 | (defcustom shell-popd-regexp "popd" | 221 | (defcustom shell-popd-regexp "popd" |
| 222 | "*Regexp to match subshell commands equivalent to popd." | 222 | "Regexp to match subshell commands equivalent to popd." |
| 223 | :type 'regexp | 223 | :type 'regexp |
| 224 | :group 'shell-directories) | 224 | :group 'shell-directories) |
| 225 | 225 | ||
| 226 | (defcustom shell-pushd-regexp "pushd" | 226 | (defcustom shell-pushd-regexp "pushd" |
| 227 | "*Regexp to match subshell commands equivalent to pushd." | 227 | "Regexp to match subshell commands equivalent to pushd." |
| 228 | :type 'regexp | 228 | :type 'regexp |
| 229 | :group 'shell-directories) | 229 | :group 'shell-directories) |
| 230 | 230 | ||
| 231 | (defcustom shell-pushd-tohome nil | 231 | (defcustom shell-pushd-tohome nil |
| 232 | "*If non-nil, make pushd with no arg behave as \"pushd ~\" (like cd). | 232 | "If non-nil, make pushd with no arg behave as \"pushd ~\" (like cd). |
| 233 | This mirrors the optional behavior of tcsh." | 233 | This mirrors the optional behavior of tcsh." |
| 234 | :type 'boolean | 234 | :type 'boolean |
| 235 | :group 'shell-directories) | 235 | :group 'shell-directories) |
| 236 | 236 | ||
| 237 | (defcustom shell-pushd-dextract nil | 237 | (defcustom shell-pushd-dextract nil |
| 238 | "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top. | 238 | "If non-nil, make \"pushd +n\" pop the nth dir to the stack top. |
| 239 | This mirrors the optional behavior of tcsh." | 239 | This mirrors the optional behavior of tcsh." |
| 240 | :type 'boolean | 240 | :type 'boolean |
| 241 | :group 'shell-directories) | 241 | :group 'shell-directories) |
| 242 | 242 | ||
| 243 | (defcustom shell-pushd-dunique nil | 243 | (defcustom shell-pushd-dunique nil |
| 244 | "*If non-nil, make pushd only add unique directories to the stack. | 244 | "If non-nil, make pushd only add unique directories to the stack. |
| 245 | This mirrors the optional behavior of tcsh." | 245 | This mirrors the optional behavior of tcsh." |
| 246 | :type 'boolean | 246 | :type 'boolean |
| 247 | :group 'shell-directories) | 247 | :group 'shell-directories) |
| 248 | 248 | ||
| 249 | (defcustom shell-cd-regexp "cd" | 249 | (defcustom shell-cd-regexp "cd" |
| 250 | "*Regexp to match subshell commands equivalent to cd." | 250 | "Regexp to match subshell commands equivalent to cd." |
| 251 | :type 'regexp | 251 | :type 'regexp |
| 252 | :group 'shell-directories) | 252 | :group 'shell-directories) |
| 253 | 253 | ||
| @@ -256,19 +256,19 @@ This mirrors the optional behavior of tcsh." | |||
| 256 | ; NetWare allows the five chars between upper and lower alphabetics. | 256 | ; NetWare allows the five chars between upper and lower alphabetics. |
| 257 | "[]a-zA-Z^_`\\[\\\\]:" | 257 | "[]a-zA-Z^_`\\[\\\\]:" |
| 258 | nil) | 258 | nil) |
| 259 | "*If non-nil, is regexp used to track drive changes." | 259 | "If non-nil, is regexp used to track drive changes." |
| 260 | :type '(choice regexp | 260 | :type '(choice regexp |
| 261 | (const nil)) | 261 | (const nil)) |
| 262 | :group 'shell-directories) | 262 | :group 'shell-directories) |
| 263 | 263 | ||
| 264 | (defcustom shell-dirtrack-verbose t | 264 | (defcustom shell-dirtrack-verbose t |
| 265 | "*If non-nil, show the directory stack following directory change. | 265 | "If non-nil, show the directory stack following directory change. |
| 266 | This is effective only if directory tracking is enabled." | 266 | This is effective only if directory tracking is enabled." |
| 267 | :type 'boolean | 267 | :type 'boolean |
| 268 | :group 'shell-directories) | 268 | :group 'shell-directories) |
| 269 | 269 | ||
| 270 | (defcustom explicit-shell-file-name nil | 270 | (defcustom explicit-shell-file-name nil |
| 271 | "*If non-nil, is file name to use for explicitly requested inferior shell." | 271 | "If non-nil, is file name to use for explicitly requested inferior shell." |
| 272 | :type '(choice (const :tag "None" nil) file) | 272 | :type '(choice (const :tag "None" nil) file) |
| 273 | :group 'shell) | 273 | :group 'shell) |
| 274 | 274 | ||
| @@ -278,7 +278,7 @@ This is effective only if directory tracking is enabled." | |||
| 278 | ;; than us about what terminal modes to use. | 278 | ;; than us about what terminal modes to use. |
| 279 | '("-i" "-T") | 279 | '("-i" "-T") |
| 280 | '("-i")) | 280 | '("-i")) |
| 281 | "*Args passed to inferior shell by M-x shell, if the shell is csh. | 281 | "Args passed to inferior shell by \\[shell], if the shell is csh. |
| 282 | Value is a list of strings, which may be nil." | 282 | Value is a list of strings, which may be nil." |
| 283 | :type '(repeat (string :tag "Argument")) | 283 | :type '(repeat (string :tag "Argument")) |
| 284 | :group 'shell) | 284 | :group 'shell) |
| @@ -296,13 +296,13 @@ Value is a list of strings, which may be nil." | |||
| 296 | (shell-command-to-string (concat prog " --noediting")))) | 296 | (shell-command-to-string (concat prog " --noediting")))) |
| 297 | '("-i") | 297 | '("-i") |
| 298 | '("--noediting" "-i"))) | 298 | '("--noediting" "-i"))) |
| 299 | "*Args passed to inferior shell by M-x shell, if the shell is bash. | 299 | "Args passed to inferior shell by \\[shell], if the shell is bash. |
| 300 | Value is a list of strings, which may be nil." | 300 | Value is a list of strings, which may be nil." |
| 301 | :type '(repeat (string :tag "Argument")) | 301 | :type '(repeat (string :tag "Argument")) |
| 302 | :group 'shell) | 302 | :group 'shell) |
| 303 | 303 | ||
| 304 | (defcustom shell-input-autoexpand 'history | 304 | (defcustom shell-input-autoexpand 'history |
| 305 | "*If non-nil, expand input command history references on completion. | 305 | "If non-nil, expand input command history references on completion. |
| 306 | This mirrors the optional behavior of tcsh (its autoexpand and histlit). | 306 | This mirrors the optional behavior of tcsh (its autoexpand and histlit). |
| 307 | 307 | ||
| 308 | If the value is `input', then the expansion is seen on input. | 308 | If the value is `input', then the expansion is seen on input. |
| @@ -433,9 +433,7 @@ buffer." | |||
| 433 | (setq shell-dirstack nil) | 433 | (setq shell-dirstack nil) |
| 434 | (make-local-variable 'shell-last-dir) | 434 | (make-local-variable 'shell-last-dir) |
| 435 | (setq shell-last-dir nil) | 435 | (setq shell-last-dir nil) |
| 436 | (make-local-variable 'shell-dirtrackp) | 436 | (shell-dirtrack-mode 1) |
| 437 | (setq shell-dirtrackp t) | ||
| 438 | (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t) | ||
| 439 | (setq comint-input-autoexpand shell-input-autoexpand) | 437 | (setq comint-input-autoexpand shell-input-autoexpand) |
| 440 | ;; This is not really correct, since the shell buffer does not really | 438 | ;; This is not really correct, since the shell buffer does not really |
| 441 | ;; edit this directory. But it is useful in the buffer list and menus. | 439 | ;; edit this directory. But it is useful in the buffer list and menus. |
| @@ -558,48 +556,48 @@ Otherwise, one argument `-i' is passed to the shell. | |||
| 558 | (shell-mode))) | 556 | (shell-mode))) |
| 559 | buffer) | 557 | buffer) |
| 560 | 558 | ||
| 561 | ;;; Don't do this when shell.el is loaded, only while dumping. | 559 | ;; Don't do this when shell.el is loaded, only while dumping. |
| 562 | ;;;###autoload (add-hook 'same-window-buffer-names "*shell*") | 560 | ;;;###autoload (add-hook 'same-window-buffer-names "*shell*") |
| 563 | 561 | ||
| 564 | ;;; Directory tracking | 562 | ;;; Directory tracking |
| 565 | ;;; | 563 | ;; |
| 566 | ;;; This code provides the shell mode input sentinel | 564 | ;; This code provides the shell mode input sentinel |
| 567 | ;;; SHELL-DIRECTORY-TRACKER | 565 | ;; SHELL-DIRECTORY-TRACKER |
| 568 | ;;; that tracks cd, pushd, and popd commands issued to the shell, and | 566 | ;; that tracks cd, pushd, and popd commands issued to the shell, and |
| 569 | ;;; changes the current directory of the shell buffer accordingly. | 567 | ;; changes the current directory of the shell buffer accordingly. |
| 570 | ;;; | 568 | ;; |
| 571 | ;;; This is basically a fragile hack, although it's more accurate than | 569 | ;; This is basically a fragile hack, although it's more accurate than |
| 572 | ;;; the version in Emacs 18's shell.el. It has the following failings: | 570 | ;; the version in Emacs 18's shell.el. It has the following failings: |
| 573 | ;;; 1. It doesn't know about the cdpath shell variable. | 571 | ;; 1. It doesn't know about the cdpath shell variable. |
| 574 | ;;; 2. It cannot infallibly deal with command sequences, though it does well | 572 | ;; 2. It cannot infallibly deal with command sequences, though it does well |
| 575 | ;;; with these and with ignoring commands forked in another shell with ()s. | 573 | ;; with these and with ignoring commands forked in another shell with ()s. |
| 576 | ;;; 3. More generally, any complex command is going to throw it. Otherwise, | 574 | ;; 3. More generally, any complex command is going to throw it. Otherwise, |
| 577 | ;;; you'd have to build an entire shell interpreter in Emacs Lisp. Failing | 575 | ;; you'd have to build an entire shell interpreter in Emacs Lisp. Failing |
| 578 | ;;; that, there's no way to catch shell commands where cd's are buried | 576 | ;; that, there's no way to catch shell commands where cd's are buried |
| 579 | ;;; inside conditional expressions, aliases, and so forth. | 577 | ;; inside conditional expressions, aliases, and so forth. |
| 580 | ;;; | 578 | ;; |
| 581 | ;;; The whole approach is a crock. Shell aliases mess it up. File sourcing | 579 | ;; The whole approach is a crock. Shell aliases mess it up. File sourcing |
| 582 | ;;; messes it up. You run other processes under the shell; these each have | 580 | ;; messes it up. You run other processes under the shell; these each have |
| 583 | ;;; separate working directories, and some have commands for manipulating | 581 | ;; separate working directories, and some have commands for manipulating |
| 584 | ;;; their w.d.'s (e.g., the lcd command in ftp). Some of these programs have | 582 | ;; their w.d.'s (e.g., the lcd command in ftp). Some of these programs have |
| 585 | ;;; commands that do *not* affect the current w.d. at all, but look like they | 583 | ;; commands that do *not* affect the current w.d. at all, but look like they |
| 586 | ;;; do (e.g., the cd command in ftp). In shells that allow you job | 584 | ;; do (e.g., the cd command in ftp). In shells that allow you job |
| 587 | ;;; control, you can switch between jobs, all having different w.d.'s. So | 585 | ;; control, you can switch between jobs, all having different w.d.'s. So |
| 588 | ;;; simply saying %3 can shift your w.d.. | 586 | ;; simply saying %3 can shift your w.d.. |
| 589 | ;;; | 587 | ;; |
| 590 | ;;; The solution is to relax, not stress out about it, and settle for | 588 | ;; The solution is to relax, not stress out about it, and settle for |
| 591 | ;;; a hack that works pretty well in typical circumstances. Remember | 589 | ;; a hack that works pretty well in typical circumstances. Remember |
| 592 | ;;; that a half-assed solution is more in keeping with the spirit of Unix, | 590 | ;; that a half-assed solution is more in keeping with the spirit of Unix, |
| 593 | ;;; anyway. Blech. | 591 | ;; anyway. Blech. |
| 594 | ;;; | 592 | ;; |
| 595 | ;;; One good hack not implemented here for users of programmable shells | 593 | ;; One good hack not implemented here for users of programmable shells |
| 596 | ;;; is to program up the shell w.d. manipulation commands to output | 594 | ;; is to program up the shell w.d. manipulation commands to output |
| 597 | ;;; a coded command sequence to the tty. Something like | 595 | ;; a coded command sequence to the tty. Something like |
| 598 | ;;; ESC | <cwd> | | 596 | ;; ESC | <cwd> | |
| 599 | ;;; where <cwd> is the new current working directory. Then trash the | 597 | ;; where <cwd> is the new current working directory. Then trash the |
| 600 | ;;; directory tracking machinery currently used in this package, and | 598 | ;; directory tracking machinery currently used in this package, and |
| 601 | ;;; replace it with a process filter that watches for and strips out | 599 | ;; replace it with a process filter that watches for and strips out |
| 602 | ;;; these messages. | 600 | ;; these messages. |
| 603 | 601 | ||
| 604 | (defun shell-directory-tracker (str) | 602 | (defun shell-directory-tracker (str) |
| 605 | "Tracks cd, pushd and popd commands issued to the shell. | 603 | "Tracks cd, pushd and popd commands issued to the shell. |
| @@ -607,8 +605,8 @@ This function is called on each input passed to the shell. | |||
| 607 | It watches for cd, pushd and popd commands and sets the buffer's | 605 | It watches for cd, pushd and popd commands and sets the buffer's |
| 608 | default directory to track these commands. | 606 | default directory to track these commands. |
| 609 | 607 | ||
| 610 | You may toggle this tracking on and off with M-x dirtrack-mode. | 608 | You may toggle this tracking on and off with \\[dirtrack-mode]. |
| 611 | If Emacs gets confused, you can resync with the shell with M-x dirs. | 609 | If Emacs gets confused, you can resync with the shell with \\[dirs]. |
| 612 | 610 | ||
| 613 | See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp', | 611 | See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp', |
| 614 | and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', | 612 | and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', |
| @@ -677,7 +675,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 677 | (setq string (replace-match "" nil nil string))))) | 675 | (setq string (replace-match "" nil nil string))))) |
| 678 | string))) | 676 | string))) |
| 679 | 677 | ||
| 680 | ;;; popd [+n] | 678 | ;; popd [+n] |
| 681 | (defun shell-process-popd (arg) | 679 | (defun shell-process-popd (arg) |
| 682 | (let ((num (or (shell-extract-num arg) 0))) | 680 | (let ((num (or (shell-extract-num arg) 0))) |
| 683 | (cond ((and num (= num 0) shell-dirstack) | 681 | (cond ((and num (= num 0) shell-dirstack) |
| @@ -703,7 +701,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 703 | ;; For relative name we assume default-directory already has the prefix. | 701 | ;; For relative name we assume default-directory already has the prefix. |
| 704 | (expand-file-name dir)))) | 702 | (expand-file-name dir)))) |
| 705 | 703 | ||
| 706 | ;;; cd [dir] | 704 | ;; cd [dir] |
| 707 | (defun shell-process-cd (arg) | 705 | (defun shell-process-cd (arg) |
| 708 | (let ((new-dir (cond ((zerop (length arg)) (concat comint-file-name-prefix | 706 | (let ((new-dir (cond ((zerop (length arg)) (concat comint-file-name-prefix |
| 709 | "~")) | 707 | "~")) |
| @@ -713,7 +711,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 713 | (shell-cd new-dir) | 711 | (shell-cd new-dir) |
| 714 | (shell-dirstack-message))) | 712 | (shell-dirstack-message))) |
| 715 | 713 | ||
| 716 | ;;; pushd [+n | dir] | 714 | ;; pushd [+n | dir] |
| 717 | (defun shell-process-pushd (arg) | 715 | (defun shell-process-pushd (arg) |
| 718 | (let ((num (shell-extract-num arg))) | 716 | (let ((num (shell-extract-num arg))) |
| 719 | (cond ((zerop (length arg)) | 717 | (cond ((zerop (length arg)) |
| @@ -762,26 +760,25 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 762 | (and (string-match "^\\+[1-9][0-9]*$" str) | 760 | (and (string-match "^\\+[1-9][0-9]*$" str) |
| 763 | (string-to-number str))) | 761 | (string-to-number str))) |
| 764 | 762 | ||
| 765 | 763 | (defvaralias 'shell-dirtrack-mode 'shell-dirtrackp) | |
| 766 | (defun shell-dirtrack-mode () | 764 | (define-minor-mode shell-dirtrack-mode |
| 767 | "Turn directory tracking on and off in a shell buffer." | 765 | "Turn directory tracking on and off in a shell buffer." |
| 768 | (interactive) | 766 | nil nil nil |
| 769 | (if (setq shell-dirtrackp (not shell-dirtrackp)) | 767 | (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) |
| 770 | (setq list-buffers-directory default-directory) | 768 | (if shell-dirtrack-mode |
| 771 | (setq list-buffers-directory nil)) | 769 | (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t) |
| 772 | (message "Directory tracking %s" (if shell-dirtrackp "ON" "OFF"))) | 770 | (remove-hook 'comint-input-filter-functions 'shell-directory-tracker t))) |
| 773 | 771 | ||
| 774 | ;;; For your typing convenience: | 772 | ;; For your typing convenience: |
| 775 | (defalias 'shell-dirtrack-toggle 'shell-dirtrack-mode) | 773 | (defalias 'shell-dirtrack-toggle 'shell-dirtrack-mode) ;??Convenience?? |
| 776 | (defalias 'dirtrack-toggle 'shell-dirtrack-mode) | 774 | (defalias 'dirtrack-toggle 'shell-dirtrack-mode) |
| 777 | (defalias 'dirtrack-mode 'shell-dirtrack-mode) | 775 | (defalias 'dirtrack-mode 'shell-dirtrack-mode) |
| 778 | 776 | ||
| 779 | (defun shell-cd (dir) | 777 | (defun shell-cd (dir) |
| 780 | "Do normal `cd' to DIR, and set `list-buffers-directory'." | 778 | "Do normal `cd' to DIR, and set `list-buffers-directory'." |
| 779 | (cd dir) | ||
| 781 | (if shell-dirtrackp | 780 | (if shell-dirtrackp |
| 782 | (setq list-buffers-directory (file-name-as-directory | 781 | (setq list-buffers-directory default-directory))) |
| 783 | (expand-file-name dir)))) | ||
| 784 | (cd dir)) | ||
| 785 | 782 | ||
| 786 | (defun shell-resync-dirs () | 783 | (defun shell-resync-dirs () |
| 787 | "Resync the buffer's idea of the current directory stack. | 784 | "Resync the buffer's idea of the current directory stack. |
| @@ -841,15 +838,15 @@ command again." | |||
| 841 | (shell-dirstack-message)) | 838 | (shell-dirstack-message)) |
| 842 | (error (message "Couldn't cd"))))))) | 839 | (error (message "Couldn't cd"))))))) |
| 843 | 840 | ||
| 844 | ;;; For your typing convenience: | 841 | ;; For your typing convenience: |
| 845 | (defalias 'dirs 'shell-resync-dirs) | 842 | (defalias 'dirs 'shell-resync-dirs) |
| 846 | 843 | ||
| 847 | 844 | ||
| 848 | ;;; Show the current dirstack on the message line. | 845 | ;; Show the current dirstack on the message line. |
| 849 | ;;; Pretty up dirs a bit by changing "/usr/jqr/foo" to "~/foo". | 846 | ;; Pretty up dirs a bit by changing "/usr/jqr/foo" to "~/foo". |
| 850 | ;;; (This isn't necessary if the dirlisting is generated with a simple "dirs".) | 847 | ;; (This isn't necessary if the dirlisting is generated with a simple "dirs".) |
| 851 | ;;; All the commands that mung the buffer's dirstack finish by calling | 848 | ;; All the commands that mung the buffer's dirstack finish by calling |
| 852 | ;;; this guy. | 849 | ;; this guy. |
| 853 | (defun shell-dirstack-message () | 850 | (defun shell-dirstack-message () |
| 854 | (when shell-dirtrack-verbose | 851 | (when shell-dirtrack-verbose |
| 855 | (let* ((msg "") | 852 | (let* ((msg "") |
| @@ -1076,5 +1073,5 @@ Returns t if successful." | |||
| 1076 | 1073 | ||
| 1077 | (provide 'shell) | 1074 | (provide 'shell) |
| 1078 | 1075 | ||
| 1079 | ;;; arch-tag: bcb5f12a-c1f4-4aea-a809-2504bd5bd797 | 1076 | ;; arch-tag: bcb5f12a-c1f4-4aea-a809-2504bd5bd797 |
| 1080 | ;;; shell.el ends here | 1077 | ;;; shell.el ends here |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 3e8abb6c0d0..88b91b74aa4 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1585,17 +1585,6 @@ in `selection-converter-alist', which see." | |||
| 1585 | (ash (lsh result extended-sign-len) (- extended-sign-len)) | 1585 | (ash (lsh result extended-sign-len) (- extended-sign-len)) |
| 1586 | result))) | 1586 | result))) |
| 1587 | 1587 | ||
| 1588 | (defun mac-bytes-to-digits (bytes &optional from to) | ||
| 1589 | (or from (setq from 0)) | ||
| 1590 | (or to (setq to (length bytes))) | ||
| 1591 | (let ((len (- to from)) | ||
| 1592 | (val 0.0)) | ||
| 1593 | (dotimes (i len) | ||
| 1594 | (setq val (+ (* val 256.0) | ||
| 1595 | (aref bytes (+ from (if (eq (byteorder) ?B) i | ||
| 1596 | (- len i 1))))))) | ||
| 1597 | (format "%.0f" val))) | ||
| 1598 | |||
| 1599 | (defun mac-ae-selection-range (ae) | 1588 | (defun mac-ae-selection-range (ae) |
| 1600 | ;; #pragma options align=mac68k | 1589 | ;; #pragma options align=mac68k |
| 1601 | ;; typedef struct SelectionRange { | 1590 | ;; typedef struct SelectionRange { |
| @@ -1693,7 +1682,8 @@ modifiers, it changes global tool-bar visibility setting." | |||
| 1693 | (if (and modifiers (not (string= modifiers "\000\000\000\000"))) | 1682 | (if (and modifiers (not (string= modifiers "\000\000\000\000"))) |
| 1694 | ;; Globally toggle tool-bar-mode if some modifier key is pressed. | 1683 | ;; Globally toggle tool-bar-mode if some modifier key is pressed. |
| 1695 | (tool-bar-mode) | 1684 | (tool-bar-mode) |
| 1696 | (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae)))) | 1685 | (let ((window-id |
| 1686 | (mac-coerce-ae-data "long" (cdr (mac-ae-parameter ae)) "TEXT")) | ||
| 1697 | (rest (frame-list)) | 1687 | (rest (frame-list)) |
| 1698 | frame) | 1688 | frame) |
| 1699 | (while (and (null frame) rest) | 1689 | (while (and (null frame) rest) |
diff --git a/lispintro/ChangeLog b/lispintro/ChangeLog index 753aec71d80..731e734f78c 100644 --- a/lispintro/ChangeLog +++ b/lispintro/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2006-05-19 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp-intro.texi (Digression concerning error): Fix typo. | ||
| 4 | |||
| 1 | 2005-09-16 Romain Francoise <romain@orebokech.com> | 5 | 2005-09-16 Romain Francoise <romain@orebokech.com> |
| 2 | 6 | ||
| 3 | * emacs-lisp-intro.texi (GNU Free Documentation License): | 7 | * emacs-lisp-intro.texi (GNU Free Documentation License): |
diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index c7fef17061f..f941f3e44ba 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi | |||
| @@ -18278,7 +18278,7 @@ But a human expects to attempt this sort of thing, if only to find out | |||
| 18278 | whether the kill ring is full or empty. This is an act of | 18278 | whether the kill ring is full or empty. This is an act of |
| 18279 | exploration. | 18279 | exploration. |
| 18280 | 18280 | ||
| 18281 | (From the human point of view, the act of exploration and discovery is | 18281 | From the human point of view, the act of exploration and discovery is |
| 18282 | not necessarily an error, and therefore should not be labelled as one, | 18282 | not necessarily an error, and therefore should not be labelled as one, |
| 18283 | even in the bowels of a computer. As it is, the code in Emacs implies | 18283 | even in the bowels of a computer. As it is, the code in Emacs implies |
| 18284 | that a human who is acting virtuously, by exploring his or her | 18284 | that a human who is acting virtuously, by exploring his or her |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index caf04b086a7..39bf92c54d1 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-05-17 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * minibuf.texi (Minibuffer History): Clarify. | ||
| 4 | |||
| 5 | * searching.texi (Regexp Special): Clarify nested regexp warning. | ||
| 6 | |||
| 1 | 2006-05-16 Kim F. Storm <storm@cua.dk> | 7 | 2006-05-16 Kim F. Storm <storm@cua.dk> |
| 2 | 8 | ||
| 3 | * minibuf.texi (Minibuffer History): Update add-to-history. | 9 | * minibuf.texi (Minibuffer History): Update add-to-history. |
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 73cc0817d9b..f69cf03deac 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi | |||
| @@ -450,19 +450,17 @@ history list symbol. The variable @code{history-delete-duplicates} | |||
| 450 | specifies whether to delete duplicates in history. | 450 | specifies whether to delete duplicates in history. |
| 451 | 451 | ||
| 452 | @defun add-to-history history-var newelt &optional maxelt keep-all | 452 | @defun add-to-history history-var newelt &optional maxelt keep-all |
| 453 | This function adds a new element @var{newelt}, if non-empty, to the | 453 | This function adds a new element @var{newelt}, if it isn't the empty |
| 454 | history list stored in the variable @var{history-var}, and returns the | 454 | string, to the history list stored in the variable @var{history-var}, |
| 455 | updated history list. By default, the list length is limited by the | 455 | and returns the updated history list. It limits the list length to |
| 456 | value specified by @code{history-length} (described below), but the | 456 | the value of @var{maxelt} (if non-@code{nil}) or @code{history-length} |
| 457 | optional argument @var{maxelt} overrides that. The possible values of | 457 | (described below). The possible values of @var{maxelt} have the same |
| 458 | @var{maxelt} have the same meaning as the values of | 458 | meaning as the values of @code{history-length}. |
| 459 | @code{history-length}. | 459 | |
| 460 | 460 | Normally, @code{add-to-history} removes duplicate members from the | |
| 461 | Duplicate members are removed from the history list, if | 461 | history list if @code{history-delete-duplicates} is non-@code{nil}. |
| 462 | @code{history-delete-duplicates} is non-@code{nil}. | 462 | However, if @var{keep-all} is non-@code{nil}, that says not to remove |
| 463 | 463 | duplicates, and to add @var{newelt} to the list even if it is empty. | |
| 464 | If @var{keep-all} is non-@code{nil}, even an empty or duplicate | ||
| 465 | @var{newelt} element is added to the history list. | ||
| 466 | @end defun | 464 | @end defun |
| 467 | 465 | ||
| 468 | @defvar history-length | 466 | @defvar history-length |
diff --git a/lispref/searching.texi b/lispref/searching.texi index 644376f5cdd..505122fdd16 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi | |||
| @@ -306,9 +306,10 @@ matching @samp{ca*ar} against the string @samp{caaar}, the @samp{a*} | |||
| 306 | first tries to match all three @samp{a}s; but the rest of the pattern is | 306 | first tries to match all three @samp{a}s; but the rest of the pattern is |
| 307 | @samp{ar} and there is only @samp{r} left to match, so this try fails. | 307 | @samp{ar} and there is only @samp{r} left to match, so this try fails. |
| 308 | The next alternative is for @samp{a*} to match only two @samp{a}s. With | 308 | The next alternative is for @samp{a*} to match only two @samp{a}s. With |
| 309 | this choice, the rest of the regexp matches successfully.@refill | 309 | this choice, the rest of the regexp matches successfully. |
| 310 | 310 | ||
| 311 | Nested repetition operators take a long time, or even forever, if they | 311 | @strong{Warning:} Nested repetition operators take a long time, |
| 312 | or even forever, if they | ||
| 312 | lead to ambiguous matching. For example, trying to match the regular | 313 | lead to ambiguous matching. For example, trying to match the regular |
| 313 | expression @samp{\(x+y*\)*a} against the string | 314 | expression @samp{\(x+y*\)*a} against the string |
| 314 | @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz} could take hours before it | 315 | @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz} could take hours before it |
| @@ -316,7 +317,8 @@ ultimately fails. Emacs must try each way of grouping the 35 | |||
| 316 | @samp{x}s before concluding that none of them can work. Even worse, | 317 | @samp{x}s before concluding that none of them can work. Even worse, |
| 317 | @samp{\(x*\)*} can match the null string in infinitely many ways, so | 318 | @samp{\(x*\)*} can match the null string in infinitely many ways, so |
| 318 | it causes an infinite loop. To avoid these problems, check nested | 319 | it causes an infinite loop. To avoid these problems, check nested |
| 319 | repetitions carefully. | 320 | repetitions carefully, to make sure that they do not cause combinatorial |
| 321 | explosions in backtracking. | ||
| 320 | 322 | ||
| 321 | @item @samp{+} | 323 | @item @samp{+} |
| 322 | @cindex @samp{+} in regexp | 324 | @cindex @samp{+} in regexp |
diff --git a/mac/ChangeLog b/mac/ChangeLog index 80e30045dda..a17f456ae6f 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2006-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * makefile.MPW (SOME_MACHINE_LISP): Add fringe.elc. | ||
| 4 | |||
| 1 | 2006-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 5 | 2006-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 6 | ||
| 3 | * inc/config.h (pid_t): Define to int. | 7 | * inc/config.h (pid_t): Define to int. |
diff --git a/mac/makefile.MPW b/mac/makefile.MPW index 6dc10cbbc81..ab62673a559 100644 --- a/mac/makefile.MPW +++ b/mac/makefile.MPW | |||
| @@ -1115,8 +1115,8 @@ SOME_MACHINE_LISP = {Lisp}mouse.elc ¶ | |||
| 1115 | {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶ | 1115 | {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶ |
| 1116 | {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶ | 1116 | {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶ |
| 1117 | {Lisp}tooltip.elc {Lisp}image.elc ¶ | 1117 | {Lisp}tooltip.elc {Lisp}image.elc ¶ |
| 1118 | {Lisp}dnd.elc {Lisp}mwheel.elc ¶ | 1118 | {Lisp}fringe.elc {Lisp}dnd.elc ¶ |
| 1119 | {Lisp}tool-bar.elc ¶ | 1119 | {Lisp}mwheel.elc {Lisp}tool-bar.elc ¶ |
| 1120 | {Lisp}x-dnd.elc ¶ | 1120 | {Lisp}x-dnd.elc ¶ |
| 1121 | {Lisp}international:ccl.elc ¶ | 1121 | {Lisp}international:ccl.elc ¶ |
| 1122 | {Lisp}international:codepage.elc ¶ | 1122 | {Lisp}international:codepage.elc ¶ |
diff --git a/man/ChangeLog b/man/ChangeLog index 90f3f8a0a27..1f716090c73 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2006-05-18 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus.texi (Saving Articles): Clarify gnus-summary-save-article-mail. | ||
| 4 | |||
| 5 | 2006-05-17 Richard Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * files.texi (Diff Mode): Mention C-x `. | ||
| 8 | |||
| 9 | 2006-05-08 Richard Stallman <rms@gnu.org> | ||
| 10 | |||
| 11 | * custom.texi (Disabling): Textual cleanups. | ||
| 12 | |||
| 1 | 2006-05-12 Reiner Steib <Reiner.Steib@gmx.de> | 13 | 2006-05-12 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 14 | ||
| 3 | * message.texi (Interface): Add tool bar customization. | 15 | * message.texi (Interface): Add tool bar customization. |
| @@ -6222,6 +6234,7 @@ | |||
| 6222 | 6234 | ||
| 6223 | ;; Local Variables: | 6235 | ;; Local Variables: |
| 6224 | ;; coding: iso-2022-7bit | 6236 | ;; coding: iso-2022-7bit |
| 6237 | ;; fill-column: 79 | ||
| 6225 | ;; End: | 6238 | ;; End: |
| 6226 | 6239 | ||
| 6227 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, | 6240 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, |
diff --git a/man/files.texi b/man/files.texi index 6f38f18b1cb..65edbc22e36 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -2333,8 +2333,10 @@ diff-mode}. | |||
| 2333 | One general feature of Diff mode is that manual edits to the patch | 2333 | One general feature of Diff mode is that manual edits to the patch |
| 2334 | automatically correct line numbers, including those in the hunk | 2334 | automatically correct line numbers, including those in the hunk |
| 2335 | header, so that you can actually apply the edited patch. Diff mode | 2335 | header, so that you can actually apply the edited patch. Diff mode |
| 2336 | also provides the following commands to navigate, manipulate and apply | 2336 | treats each hunk location as an ``error message'', so that you can use |
| 2337 | parts of patches: | 2337 | commands such as @kbd{C-x '} to visit the corresponding source |
| 2338 | locations. It also provides the following commands to navigate, | ||
| 2339 | manipulate and apply parts of patches: | ||
| 2338 | 2340 | ||
| 2339 | @table @kbd | 2341 | @table @kbd |
| 2340 | @item M-n | 2342 | @item M-n |
diff --git a/man/gnus.texi b/man/gnus.texi index 9623bc468d9..b1654b8302f 100644 --- a/man/gnus.texi +++ b/man/gnus.texi | |||
| @@ -7377,7 +7377,7 @@ Save the current article using the default article saver | |||
| 7377 | @item O m | 7377 | @item O m |
| 7378 | @kindex O m (Summary) | 7378 | @kindex O m (Summary) |
| 7379 | @findex gnus-summary-save-article-mail | 7379 | @findex gnus-summary-save-article-mail |
| 7380 | Save the current article in mail format | 7380 | Save the current article in a Unix mail box (mbox) file |
| 7381 | (@code{gnus-summary-save-article-mail}). | 7381 | (@code{gnus-summary-save-article-mail}). |
| 7382 | 7382 | ||
| 7383 | @item O r | 7383 | @item O r |
diff --git a/src/ChangeLog b/src/ChangeLog index 1a58d0b5905..5acc6313bbb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2006-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * frame.c (x_set_border_width): Remove #ifndef MAC_OS. | ||
| 4 | |||
| 5 | * image.c [MAC_OS] (gif_load): Allocate Lisp string first. | ||
| 6 | |||
| 7 | * macfns.c (Fx_focus_frame): Don't check dpyinfo->x_focus_frame. | ||
| 8 | |||
| 9 | * macterm.c (XTread_socket) [TARGET_API_MAC_CARBON && MAC_OSX]: | ||
| 10 | Forward keyUp events to toolbox_dispatcher. | ||
| 11 | |||
| 12 | * window.c (foreach_window): Check WINDOWP (FRAME_ROOT_WINDOW (f)). | ||
| 13 | |||
| 14 | 2006-05-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 15 | |||
| 16 | * config.in: Regenerated (HAVE_ALSA). | ||
| 17 | |||
| 18 | * sound.c (alsa_sound_perror, alsa_open, alsa_period_size) | ||
| 19 | (alsa_configure, alsa_close, alsa_choose_format, alsa_write) | ||
| 20 | (snd_error_quiet, alsa_init): New functions. | ||
| 21 | (vox_init): Return 0 if unable to open device. | ||
| 22 | (Fplay_sound_internal): Test for alsa first and use vox (oss) as | ||
| 23 | a fallback. | ||
| 24 | (struct sound_device): Add period_size. | ||
| 25 | (wav_play, au_play): Use period_size if set. | ||
| 26 | |||
| 27 | * Makefile.in (CFLAGS_SOUND): New flags for ALSA | ||
| 28 | (ALL_CFLAGS): Add CFLAGS_SOUND | ||
| 29 | |||
| 30 | 2006-05-18 Kenichi Handa <handa@m17n.org> | ||
| 31 | |||
| 32 | * callproc.c (Fcall_process): Reject encoding arguments by | ||
| 33 | ascii-incompatible coding systems (e.g. utf-16). | ||
| 34 | |||
| 35 | * coding.c (Qascii_incompatible): New variable. | ||
| 36 | (syms_of_coding): Setup Qascii_incompatible. | ||
| 37 | (setup_coding_system): Be sure to initialize coding->common_flags. | ||
| 38 | Check `ascii-incompatible' property of the coding system. | ||
| 39 | |||
| 40 | * coding.h (CODING_ASCII_INCOMPATIBLE_MASK): New macro. | ||
| 41 | |||
| 42 | 2006-05-18 Kim F. Storm <storm@cua.dk> | ||
| 43 | |||
| 44 | * xdisp.c (display_tool_bar_line): Restore entire tool-bar geometry when | ||
| 45 | backtracking in case last image doesn't fit on line. | ||
| 46 | |||
| 47 | 2006-05-18 MIYOSHI Masanori <miyoshi@meadowy.org> (tiny change) | ||
| 48 | |||
| 49 | * xdisp.c (display_tool_bar_line): Don't adjust tool-bar height by more than | ||
| 50 | height of one frame default line. | ||
| 51 | |||
| 1 | 2006-05-16 Kim F. Storm <storm@cua.dk> | 52 | 2006-05-16 Kim F. Storm <storm@cua.dk> |
| 2 | 53 | ||
| 3 | * xterm.c (handle_one_xevent): Check that f is not NULL before | 54 | * xterm.c (handle_one_xevent): Check that f is not NULL before |
| @@ -17012,8 +17063,7 @@ | |||
| 17012 | (Fapropos_internal): Initialize them and clear them out. | 17063 | (Fapropos_internal): Initialize them and clear them out. |
| 17013 | Don't GCPRO them. | 17064 | Don't GCPRO them. |
| 17014 | 17065 | ||
| 17015 | * buffer.c (syms_of_buffer) <scroll-up-aggressively, scroll-down-aggressively>: | 17066 | * buffer.c (syms_of_buffer) <scroll-up|down-aggressively>: Doc fixes. |
| 17016 | Doc fixes. | ||
| 17017 | 17067 | ||
| 17018 | * lisp.h: New misc type Lisp_Save_Value. | 17068 | * lisp.h: New misc type Lisp_Save_Value. |
| 17019 | (enum Lisp_Misc_Type): Add Lisp_Misc_Save_Value. | 17069 | (enum Lisp_Misc_Type): Add Lisp_Misc_Save_Value. |
diff --git a/src/Makefile.in b/src/Makefile.in index d5ae100dc0f..89096b93b2d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -280,7 +280,7 @@ TOOLKIT_DEFINES = | |||
| 280 | 280 | ||
| 281 | /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM | 281 | /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM |
| 282 | since it may have -I options that should override those two. */ | 282 | since it may have -I options that should override those two. */ |
| 283 | ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS} | 283 | ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${CFLAGS} |
| 284 | .c.o: | 284 | .c.o: |
| 285 | $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< | 285 | $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< |
| 286 | 286 | ||
| @@ -453,6 +453,7 @@ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM | |||
| 453 | #endif /* not HAVE_X_WINDOWS */ | 453 | #endif /* not HAVE_X_WINDOWS */ |
| 454 | 454 | ||
| 455 | LIBSOUND= @LIBSOUND@ | 455 | LIBSOUND= @LIBSOUND@ |
| 456 | CFLAGS_SOUND= @CFLAGS_SOUND@ | ||
| 456 | 457 | ||
| 457 | #ifndef ORDINARY_LINK | 458 | #ifndef ORDINARY_LINK |
| 458 | /* Fix linking if compiled with GCC. */ | 459 | /* Fix linking if compiled with GCC. */ |
diff --git a/src/buffer.c b/src/buffer.c index baa977ab853..6317c14d393 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2495,10 +2495,10 @@ swap_out_buffer_local_variables (b) | |||
| 2495 | Return the number found, and store them in a vector in *VEC_PTR. | 2495 | Return the number found, and store them in a vector in *VEC_PTR. |
| 2496 | Store in *LEN_PTR the size allocated for the vector. | 2496 | Store in *LEN_PTR the size allocated for the vector. |
| 2497 | Store in *NEXT_PTR the next position after POS where an overlay starts, | 2497 | Store in *NEXT_PTR the next position after POS where an overlay starts, |
| 2498 | or ZV if there are no more overlays. | 2498 | or ZV if there are no more overlays between POS and ZV. |
| 2499 | Store in *PREV_PTR the previous position before POS where an overlay ends, | 2499 | Store in *PREV_PTR the previous position before POS where an overlay ends, |
| 2500 | or where an overlay starts which ends at or after POS; | 2500 | or where an overlay starts which ends at or after POS; |
| 2501 | or BEGV if there are no such overlays. | 2501 | or BEGV if there are no such overlays from BEGV to POS. |
| 2502 | NEXT_PTR and/or PREV_PTR may be 0, meaning don't store that info. | 2502 | NEXT_PTR and/or PREV_PTR may be 0, meaning don't store that info. |
| 2503 | 2503 | ||
| 2504 | *VEC_PTR and *LEN_PTR should contain a valid vector and size | 2504 | *VEC_PTR and *LEN_PTR should contain a valid vector and size |
| @@ -3969,7 +3969,8 @@ or between BEG and END. */) | |||
| 3969 | DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, | 3969 | DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, |
| 3970 | 1, 1, 0, | 3970 | 1, 1, 0, |
| 3971 | doc: /* Return the next position after POS where an overlay starts or ends. | 3971 | doc: /* Return the next position after POS where an overlay starts or ends. |
| 3972 | If there are no more overlay boundaries after POS, return (point-max). */) | 3972 | If there are no overlay boundaries from POS to (point-max), |
| 3973 | the value is (point-max). */) | ||
| 3973 | (pos) | 3974 | (pos) |
| 3974 | Lisp_Object pos; | 3975 | Lisp_Object pos; |
| 3975 | { | 3976 | { |
| @@ -4010,7 +4011,8 @@ If there are no more overlay boundaries after POS, return (point-max). */) | |||
| 4010 | DEFUN ("previous-overlay-change", Fprevious_overlay_change, | 4011 | DEFUN ("previous-overlay-change", Fprevious_overlay_change, |
| 4011 | Sprevious_overlay_change, 1, 1, 0, | 4012 | Sprevious_overlay_change, 1, 1, 0, |
| 4012 | doc: /* Return the previous position before POS where an overlay starts or ends. | 4013 | doc: /* Return the previous position before POS where an overlay starts or ends. |
| 4013 | If there are no more overlay boundaries before POS, return (point-min). */) | 4014 | If there are no overlay boundaries from (point-min) to POS, |
| 4015 | the value is (point-min). */) | ||
| 4014 | (pos) | 4016 | (pos) |
| 4015 | Lisp_Object pos; | 4017 | Lisp_Object pos; |
| 4016 | { | 4018 | { |
diff --git a/src/callproc.c b/src/callproc.c index 25c79bf926c..fb187d757d5 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -302,6 +302,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 302 | val = Qnil; | 302 | val = Qnil; |
| 303 | } | 303 | } |
| 304 | setup_coding_system (Fcheck_coding_system (val), &argument_coding); | 304 | setup_coding_system (Fcheck_coding_system (val), &argument_coding); |
| 305 | if (argument_coding.common_flags & CODING_ASCII_INCOMPATIBLE_MASK) | ||
| 306 | setup_coding_system (Qraw_text, &argument_coding); | ||
| 305 | if (argument_coding.eol_type == CODING_EOL_UNDECIDED) | 307 | if (argument_coding.eol_type == CODING_EOL_UNDECIDED) |
| 306 | argument_coding.eol_type = system_eol_type; | 308 | argument_coding.eol_type = system_eol_type; |
| 307 | } | 309 | } |
diff --git a/src/coding.c b/src/coding.c index a83aadfd468..659b52b93fb 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -365,6 +365,7 @@ Lisp_Object Qno_conversion, Qundecided; | |||
| 365 | Lisp_Object Qcoding_system_history; | 365 | Lisp_Object Qcoding_system_history; |
| 366 | Lisp_Object Qsafe_chars; | 366 | Lisp_Object Qsafe_chars; |
| 367 | Lisp_Object Qvalid_codes; | 367 | Lisp_Object Qvalid_codes; |
| 368 | Lisp_Object Qascii_incompatible; | ||
| 368 | 369 | ||
| 369 | extern Lisp_Object Qinsert_file_contents, Qwrite_region; | 370 | extern Lisp_Object Qinsert_file_contents, Qwrite_region; |
| 370 | Lisp_Object Qcall_process, Qcall_process_region; | 371 | Lisp_Object Qcall_process, Qcall_process_region; |
| @@ -3621,7 +3622,10 @@ setup_coding_system (coding_system, coding) | |||
| 3621 | = CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; | 3622 | = CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; |
| 3622 | } | 3623 | } |
| 3623 | else | 3624 | else |
| 3624 | coding->eol_type = CODING_EOL_LF; | 3625 | { |
| 3626 | coding->common_flags = 0; | ||
| 3627 | coding->eol_type = CODING_EOL_LF; | ||
| 3628 | } | ||
| 3625 | 3629 | ||
| 3626 | coding_type = XVECTOR (coding_spec)->contents[0]; | 3630 | coding_type = XVECTOR (coding_spec)->contents[0]; |
| 3627 | /* Try short cut. */ | 3631 | /* Try short cut. */ |
| @@ -3681,6 +3685,12 @@ setup_coding_system (coding_system, coding) | |||
| 3681 | if (!NILP (val)) | 3685 | if (!NILP (val)) |
| 3682 | coding->composing = COMPOSITION_NO; | 3686 | coding->composing = COMPOSITION_NO; |
| 3683 | 3687 | ||
| 3688 | /* If the coding system is ascii-incompatible, record it in | ||
| 3689 | common_flags. */ | ||
| 3690 | val = Fplist_get (plist, Qascii_incompatible); | ||
| 3691 | if (! NILP (val)) | ||
| 3692 | coding->common_flags |= CODING_ASCII_INCOMPATIBLE_MASK; | ||
| 3693 | |||
| 3684 | switch (XFASTINT (coding_type)) | 3694 | switch (XFASTINT (coding_type)) |
| 3685 | { | 3695 | { |
| 3686 | case 0: | 3696 | case 0: |
| @@ -7820,6 +7830,9 @@ syms_of_coding () | |||
| 7820 | Qvalid_codes = intern ("valid-codes"); | 7830 | Qvalid_codes = intern ("valid-codes"); |
| 7821 | staticpro (&Qvalid_codes); | 7831 | staticpro (&Qvalid_codes); |
| 7822 | 7832 | ||
| 7833 | Qascii_incompatible = intern ("ascii-incompatible"); | ||
| 7834 | staticpro (&Qascii_incompatible); | ||
| 7835 | |||
| 7823 | Qemacs_mule = intern ("emacs-mule"); | 7836 | Qemacs_mule = intern ("emacs-mule"); |
| 7824 | staticpro (&Qemacs_mule); | 7837 | staticpro (&Qemacs_mule); |
| 7825 | 7838 | ||
diff --git a/src/coding.h b/src/coding.h index cac11d1514c..be68753acb2 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -443,10 +443,12 @@ struct coding_system | |||
| 443 | Lisp_Object translation_table_for_encode; | 443 | Lisp_Object translation_table_for_encode; |
| 444 | }; | 444 | }; |
| 445 | 445 | ||
| 446 | #define CODING_REQUIRE_FLUSHING_MASK 1 | 446 | /* Mask bits for (struct coding_system *)->common_flags. */ |
| 447 | #define CODING_REQUIRE_DECODING_MASK 2 | 447 | #define CODING_REQUIRE_FLUSHING_MASK 0x01 |
| 448 | #define CODING_REQUIRE_ENCODING_MASK 4 | 448 | #define CODING_REQUIRE_DECODING_MASK 0x02 |
| 449 | #define CODING_REQUIRE_DETECTION_MASK 8 | 449 | #define CODING_REQUIRE_ENCODING_MASK 0x04 |
| 450 | #define CODING_REQUIRE_DETECTION_MASK 0x08 | ||
| 451 | #define CODING_ASCII_INCOMPATIBLE_MASK 0x10 | ||
| 450 | 452 | ||
| 451 | /* Return 1 if the coding system CODING requires specific code to be | 453 | /* Return 1 if the coding system CODING requires specific code to be |
| 452 | attached at the tail of converted text. */ | 454 | attached at the tail of converted text. */ |
diff --git a/src/config.in b/src/config.in index ddbbbce97d2..51f4aaa07fa 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -87,6 +87,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 87 | */ | 87 | */ |
| 88 | #undef HAVE_ALLOCA_H | 88 | #undef HAVE_ALLOCA_H |
| 89 | 89 | ||
| 90 | /* Define to 1 if ALSA is available. */ | ||
| 91 | #undef HAVE_ALSA | ||
| 92 | |||
| 90 | /* Define to 1 if you have the `bcmp' function. */ | 93 | /* Define to 1 if you have the `bcmp' function. */ |
| 91 | #undef HAVE_BCMP | 94 | #undef HAVE_BCMP |
| 92 | 95 | ||
| @@ -949,6 +952,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 949 | #ifdef HAVE_SOUNDCARD_H | 952 | #ifdef HAVE_SOUNDCARD_H |
| 950 | #define HAVE_SOUND 1 | 953 | #define HAVE_SOUND 1 |
| 951 | #endif | 954 | #endif |
| 955 | #ifdef HAVE_ALSA | ||
| 956 | #define HAVE_SOUND 1 | ||
| 957 | #endif | ||
| 952 | #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ | 958 | #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ |
| 953 | 959 | ||
| 954 | /* If using GNU, then support inline function declarations. */ | 960 | /* If using GNU, then support inline function declarations. */ |
diff --git a/src/frame.c b/src/frame.c index 094453ed33e..f29bca1796f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3443,10 +3443,8 @@ x_set_border_width (f, arg, oldval) | |||
| 3443 | if (XINT (arg) == f->border_width) | 3443 | if (XINT (arg) == f->border_width) |
| 3444 | return; | 3444 | return; |
| 3445 | 3445 | ||
| 3446 | #ifndef MAC_OS | ||
| 3447 | if (FRAME_X_WINDOW (f) != 0) | 3446 | if (FRAME_X_WINDOW (f) != 0) |
| 3448 | error ("Cannot change the border width of a frame"); | 3447 | error ("Cannot change the border width of a frame"); |
| 3449 | #endif /* MAC_TODO */ | ||
| 3450 | 3448 | ||
| 3451 | f->border_width = XINT (arg); | 3449 | f->border_width = XINT (arg); |
| 3452 | } | 3450 | } |
diff --git a/src/image.c b/src/image.c index b71f31e3b50..b8a640a9391 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8069,18 +8069,18 @@ gif_load (f, img) | |||
| 8069 | /* Save GIF image extension data for `image-extension-data'. | 8069 | /* Save GIF image extension data for `image-extension-data'. |
| 8070 | Format is (count IMAGES 0xf9 GRAPHIC_CONTROL_EXTENSION_BLOCK). */ | 8070 | Format is (count IMAGES 0xf9 GRAPHIC_CONTROL_EXTENSION_BLOCK). */ |
| 8071 | { | 8071 | { |
| 8072 | unsigned char gce[4]; | 8072 | Lisp_Object gce = make_uninit_string (4); |
| 8073 | int centisec = ((float)duration / time_scale) * 100.0f + 0.5f; | 8073 | int centisec = ((float)duration / time_scale) * 100.0f + 0.5f; |
| 8074 | 8074 | ||
| 8075 | /* Fill the delay time field. */ | 8075 | /* Fill the delay time field. */ |
| 8076 | gce[1] = centisec & 0xff; | 8076 | SSET (gce, 1, centisec & 0xff); |
| 8077 | gce[2] = (centisec >> 8) & 0xff; | 8077 | SSET (gce, 2, (centisec >> 8) & 0xff); |
| 8078 | /* We don't know about other fields. */ | 8078 | /* We don't know about other fields. */ |
| 8079 | gce[0] = gce[3] = 0; | 8079 | SSET (gce, 0, 0); |
| 8080 | SSET (gce, 3, 0); | ||
| 8080 | 8081 | ||
| 8081 | img->data.lisp_val = list4 (Qcount, make_number (nsamples), | 8082 | img->data.lisp_val = list4 (Qcount, make_number (nsamples), |
| 8082 | make_number (0xf9), | 8083 | make_number (0xf9), gce); |
| 8083 | make_unibyte_string (gce, 4)); | ||
| 8084 | } | 8084 | } |
| 8085 | 8085 | ||
| 8086 | /* Maybe fill in the background field while we have ximg handy. */ | 8086 | /* Maybe fill in the background field while we have ximg handy. */ |
diff --git a/src/macfns.c b/src/macfns.c index ab23865507b..577167e6fe3 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -2829,26 +2829,22 @@ FRAME nil means use the selected frame. */) | |||
| 2829 | Lisp_Object frame; | 2829 | Lisp_Object frame; |
| 2830 | { | 2830 | { |
| 2831 | struct frame *f = check_x_frame (frame); | 2831 | struct frame *f = check_x_frame (frame); |
| 2832 | struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); | ||
| 2833 | 2832 | ||
| 2834 | if (dpyinfo->x_focus_frame != f) | 2833 | BLOCK_INPUT; |
| 2835 | { | ||
| 2836 | BLOCK_INPUT; | ||
| 2837 | #ifdef MAC_OSX | 2834 | #ifdef MAC_OSX |
| 2838 | ActivateWindow (ActiveNonFloatingWindow (), false); | 2835 | ActivateWindow (ActiveNonFloatingWindow (), false); |
| 2839 | ActivateWindow (FRAME_MAC_WINDOW (f), true); | 2836 | ActivateWindow (FRAME_MAC_WINDOW (f), true); |
| 2840 | #else | 2837 | #else |
| 2841 | #if !TARGET_API_MAC_CARBON | 2838 | #if !TARGET_API_MAC_CARBON |
| 2842 | /* SelectWindow (Non-Carbon) does not issue deactivate events if | 2839 | /* SelectWindow (Non-Carbon) does not issue deactivate events if the |
| 2843 | the possibly inactive window that is to be selected is | 2840 | possibly inactive window that is to be selected is already the |
| 2844 | already the frontmost one. */ | 2841 | frontmost one. */ |
| 2845 | SendBehind (FRAME_MAC_WINDOW (f), NULL); | 2842 | SendBehind (FRAME_MAC_WINDOW (f), NULL); |
| 2846 | #endif | 2843 | #endif |
| 2847 | /* This brings the window to the front. */ | 2844 | /* This brings the window to the front. */ |
| 2848 | SelectWindow (FRAME_MAC_WINDOW (f)); | 2845 | SelectWindow (FRAME_MAC_WINDOW (f)); |
| 2849 | #endif | 2846 | #endif |
| 2850 | UNBLOCK_INPUT; | 2847 | UNBLOCK_INPUT; |
| 2851 | } | ||
| 2852 | 2848 | ||
| 2853 | return Qnil; | 2849 | return Qnil; |
| 2854 | } | 2850 | } |
diff --git a/src/macterm.c b/src/macterm.c index beaecfdc790..68959758e98 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -10333,6 +10333,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10333 | break; | 10333 | break; |
| 10334 | 10334 | ||
| 10335 | case keyDown: | 10335 | case keyDown: |
| 10336 | case keyUp: | ||
| 10336 | case autoKey: | 10337 | case autoKey: |
| 10337 | { | 10338 | { |
| 10338 | int keycode = (er.message & keyCodeMask) >> 8; | 10339 | int keycode = (er.message & keyCodeMask) >> 8; |
| @@ -10354,6 +10355,8 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10354 | != eventNotHandledErr) | 10355 | != eventNotHandledErr) |
| 10355 | break; | 10356 | break; |
| 10356 | #endif | 10357 | #endif |
| 10358 | if (er.what == keyUp) | ||
| 10359 | break; | ||
| 10357 | 10360 | ||
| 10358 | #if 0 | 10361 | #if 0 |
| 10359 | if (dpyinfo->x_focus_frame == NULL) | 10362 | if (dpyinfo->x_focus_frame == NULL) |
diff --git a/src/sound.c b/src/sound.c index 0fbeceb4b9e..2ceefd3bce3 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -73,6 +73,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 73 | #ifdef HAVE_SOUNDCARD_H | 73 | #ifdef HAVE_SOUNDCARD_H |
| 74 | #include <soundcard.h> | 74 | #include <soundcard.h> |
| 75 | #endif | 75 | #endif |
| 76 | #ifdef HAVE_ALSA | ||
| 77 | #include <asoundlib.h> | ||
| 78 | #endif | ||
| 79 | |||
| 76 | /* END: Non Windows Includes */ | 80 | /* END: Non Windows Includes */ |
| 77 | 81 | ||
| 78 | #else /* WINDOWSNT */ | 82 | #else /* WINDOWSNT */ |
| @@ -121,6 +125,9 @@ static int parse_sound P_ ((Lisp_Object, Lisp_Object *)); | |||
| 121 | #ifndef DEFAULT_SOUND_DEVICE | 125 | #ifndef DEFAULT_SOUND_DEVICE |
| 122 | #define DEFAULT_SOUND_DEVICE "/dev/dsp" | 126 | #define DEFAULT_SOUND_DEVICE "/dev/dsp" |
| 123 | #endif | 127 | #endif |
| 128 | #ifndef DEFAULT_ALSA_SOUND_DEVICE | ||
| 129 | #define DEFAULT_ALSA_SOUND_DEVICE "default" | ||
| 130 | #endif | ||
| 124 | 131 | ||
| 125 | 132 | ||
| 126 | /* Structure forward declarations. */ | 133 | /* Structure forward declarations. */ |
| @@ -227,6 +234,10 @@ struct sound_device | |||
| 227 | void (* choose_format) P_ ((struct sound_device *sd, | 234 | void (* choose_format) P_ ((struct sound_device *sd, |
| 228 | struct sound *s)); | 235 | struct sound *s)); |
| 229 | 236 | ||
| 237 | /* Return a preferred data size in bytes to be sent to write (below) | ||
| 238 | each time. 2048 is used if this is NULL. */ | ||
| 239 | int (* period_size) P_ ((struct sound_device *sd)); | ||
| 240 | |||
| 230 | /* Write NYBTES bytes from BUFFER to device SD. */ | 241 | /* Write NYBTES bytes from BUFFER to device SD. */ |
| 231 | void (* write) P_ ((struct sound_device *sd, const char *buffer, | 242 | void (* write) P_ ((struct sound_device *sd, const char *buffer, |
| 232 | int nbytes)); | 243 | int nbytes)); |
| @@ -280,7 +291,7 @@ static void vox_open P_ ((struct sound_device *)); | |||
| 280 | static void vox_configure P_ ((struct sound_device *)); | 291 | static void vox_configure P_ ((struct sound_device *)); |
| 281 | static void vox_close P_ ((struct sound_device *sd)); | 292 | static void vox_close P_ ((struct sound_device *sd)); |
| 282 | static void vox_choose_format P_ ((struct sound_device *, struct sound *)); | 293 | static void vox_choose_format P_ ((struct sound_device *, struct sound *)); |
| 283 | static void vox_init P_ ((struct sound_device *)); | 294 | static int vox_init P_ ((struct sound_device *)); |
| 284 | static void vox_write P_ ((struct sound_device *, const char *, int)); | 295 | static void vox_write P_ ((struct sound_device *, const char *, int)); |
| 285 | static void find_sound_type P_ ((struct sound *)); | 296 | static void find_sound_type P_ ((struct sound *)); |
| 286 | static u_int32_t le2hl P_ ((u_int32_t)); | 297 | static u_int32_t le2hl P_ ((u_int32_t)); |
| @@ -604,7 +615,7 @@ wav_play (s, sd) | |||
| 604 | { | 615 | { |
| 605 | char *buffer; | 616 | char *buffer; |
| 606 | int nbytes; | 617 | int nbytes; |
| 607 | int blksize = 2048; | 618 | int blksize = sd->period_size ? sd->period_size (sd) : 2048; |
| 608 | 619 | ||
| 609 | buffer = (char *) alloca (blksize); | 620 | buffer = (char *) alloca (blksize); |
| 610 | lseek (s->fd, sizeof *header, SEEK_SET); | 621 | lseek (s->fd, sizeof *header, SEEK_SET); |
| @@ -633,7 +644,8 @@ enum au_encoding | |||
| 633 | AU_ENCODING_32, | 644 | AU_ENCODING_32, |
| 634 | AU_ENCODING_IEEE32, | 645 | AU_ENCODING_IEEE32, |
| 635 | AU_ENCODING_IEEE64, | 646 | AU_ENCODING_IEEE64, |
| 636 | AU_COMPRESSED = 23 | 647 | AU_COMPRESSED = 23, |
| 648 | AU_ENCODING_ALAW_8 = 27 | ||
| 637 | }; | 649 | }; |
| 638 | 650 | ||
| 639 | 651 | ||
| @@ -689,7 +701,7 @@ au_play (s, sd) | |||
| 689 | SBYTES (s->data) - header->data_offset); | 701 | SBYTES (s->data) - header->data_offset); |
| 690 | else | 702 | else |
| 691 | { | 703 | { |
| 692 | int blksize = 2048; | 704 | int blksize = sd->period_size ? sd->period_size (sd) : 2048; |
| 693 | char *buffer; | 705 | char *buffer; |
| 694 | int nbytes; | 706 | int nbytes; |
| 695 | 707 | ||
| @@ -868,16 +880,33 @@ vox_choose_format (sd, s) | |||
| 868 | /* Initialize device SD. Set up the interface functions in the device | 880 | /* Initialize device SD. Set up the interface functions in the device |
| 869 | structure. */ | 881 | structure. */ |
| 870 | 882 | ||
| 871 | static void | 883 | static int |
| 872 | vox_init (sd) | 884 | vox_init (sd) |
| 873 | struct sound_device *sd; | 885 | struct sound_device *sd; |
| 874 | { | 886 | { |
| 887 | char *file; | ||
| 888 | int fd; | ||
| 889 | |||
| 890 | /* Open the sound device. Default is /dev/dsp. */ | ||
| 891 | if (sd->file) | ||
| 892 | file = sd->file; | ||
| 893 | else | ||
| 894 | file = DEFAULT_SOUND_DEVICE; | ||
| 895 | fd = emacs_open (file, O_WRONLY, 0); | ||
| 896 | if (fd >= 0) | ||
| 897 | emacs_close (fd); | ||
| 898 | else | ||
| 899 | return 0; | ||
| 900 | |||
| 875 | sd->fd = -1; | 901 | sd->fd = -1; |
| 876 | sd->open = vox_open; | 902 | sd->open = vox_open; |
| 877 | sd->close = vox_close; | 903 | sd->close = vox_close; |
| 878 | sd->configure = vox_configure; | 904 | sd->configure = vox_configure; |
| 879 | sd->choose_format = vox_choose_format; | 905 | sd->choose_format = vox_choose_format; |
| 880 | sd->write = vox_write; | 906 | sd->write = vox_write; |
| 907 | sd->period_size = NULL; | ||
| 908 | |||
| 909 | return 1; | ||
| 881 | } | 910 | } |
| 882 | 911 | ||
| 883 | /* Write NBYTES bytes from BUFFER to device SD. */ | 912 | /* Write NBYTES bytes from BUFFER to device SD. */ |
| @@ -893,6 +922,359 @@ vox_write (sd, buffer, nbytes) | |||
| 893 | sound_perror ("Error writing to sound device"); | 922 | sound_perror ("Error writing to sound device"); |
| 894 | } | 923 | } |
| 895 | 924 | ||
| 925 | #ifdef HAVE_ALSA | ||
| 926 | /*********************************************************************** | ||
| 927 | ALSA Driver Interface | ||
| 928 | ***********************************************************************/ | ||
| 929 | |||
| 930 | /* This driver is available on GNU/Linux. */ | ||
| 931 | |||
| 932 | static void | ||
| 933 | alsa_sound_perror (msg, err) | ||
| 934 | char *msg; | ||
| 935 | int err; | ||
| 936 | { | ||
| 937 | error ("%s: %s", msg, snd_strerror (err)); | ||
| 938 | } | ||
| 939 | |||
| 940 | struct alsa_params | ||
| 941 | { | ||
| 942 | snd_pcm_t *handle; | ||
| 943 | snd_pcm_hw_params_t *hwparams; | ||
| 944 | snd_pcm_sw_params_t *swparams; | ||
| 945 | snd_pcm_uframes_t period_size; | ||
| 946 | }; | ||
| 947 | |||
| 948 | /* Open device SD. If SD->file is non-null, open that device, | ||
| 949 | otherwise use a default device name. */ | ||
| 950 | |||
| 951 | static void | ||
| 952 | alsa_open (sd) | ||
| 953 | struct sound_device *sd; | ||
| 954 | { | ||
| 955 | char *file; | ||
| 956 | struct alsa_params *p; | ||
| 957 | int err; | ||
| 958 | |||
| 959 | /* Open the sound device. Default is "default". */ | ||
| 960 | if (sd->file) | ||
| 961 | file = sd->file; | ||
| 962 | else | ||
| 963 | file = DEFAULT_ALSA_SOUND_DEVICE; | ||
| 964 | |||
| 965 | p = xmalloc (sizeof (*p)); | ||
| 966 | p->handle = NULL; | ||
| 967 | p->hwparams = NULL; | ||
| 968 | p->swparams = NULL; | ||
| 969 | |||
| 970 | sd->fd = -1; | ||
| 971 | sd->data = p; | ||
| 972 | |||
| 973 | |||
| 974 | if ((err = snd_pcm_open (&p->handle, file, SND_PCM_STREAM_PLAYBACK, 0)) < 0) | ||
| 975 | alsa_sound_perror (file, err); | ||
| 976 | } | ||
| 977 | |||
| 978 | static int | ||
| 979 | alsa_period_size (sd) | ||
| 980 | struct sound_device *sd; | ||
| 981 | { | ||
| 982 | struct alsa_params *p = (struct alsa_params *) sd->data; | ||
| 983 | return p->period_size; | ||
| 984 | } | ||
| 985 | |||
| 986 | static void | ||
| 987 | alsa_configure (sd) | ||
| 988 | struct sound_device *sd; | ||
| 989 | { | ||
| 990 | int val, err, dir; | ||
| 991 | struct alsa_params *p = (struct alsa_params *) sd->data; | ||
| 992 | snd_pcm_uframes_t buffer_size; | ||
| 993 | |||
| 994 | xassert (p->handle != 0); | ||
| 995 | |||
| 996 | if ((err = snd_pcm_hw_params_malloc (&p->hwparams)) < 0) | ||
| 997 | alsa_sound_perror ("Could not allocate hardware parameter structure", err); | ||
| 998 | |||
| 999 | if ((err = snd_pcm_sw_params_malloc (&p->swparams)) < 0) | ||
| 1000 | alsa_sound_perror ("Could not allocate software parameter structure", err); | ||
| 1001 | |||
| 1002 | if ((err = snd_pcm_hw_params_any (p->handle, p->hwparams)) < 0) | ||
| 1003 | alsa_sound_perror ("Could not initialize hardware parameter structure", err); | ||
| 1004 | |||
| 1005 | if ((err = snd_pcm_hw_params_set_access (p->handle, p->hwparams, | ||
| 1006 | SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) | ||
| 1007 | alsa_sound_perror ("Could not set access type", err); | ||
| 1008 | |||
| 1009 | val = sd->format; | ||
| 1010 | if ((err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val)) < 0) | ||
| 1011 | alsa_sound_perror ("Could not set sound format", err); | ||
| 1012 | |||
| 1013 | val = sd->sample_rate; | ||
| 1014 | if ((err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &val, 0)) | ||
| 1015 | < 0) | ||
| 1016 | alsa_sound_perror ("Could not set sample rate", err); | ||
| 1017 | |||
| 1018 | val = sd->channels; | ||
| 1019 | if ((err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val)) < 0) | ||
| 1020 | alsa_sound_perror ("Could not set channel count", err); | ||
| 1021 | |||
| 1022 | |||
| 1023 | err = snd_pcm_hw_params_get_period_size (p->hwparams, &p->period_size, &dir); | ||
| 1024 | if (err < 0) | ||
| 1025 | alsa_sound_perror ("Unable to get period size for playback", err); | ||
| 1026 | |||
| 1027 | err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size); | ||
| 1028 | if (err < 0) | ||
| 1029 | alsa_sound_perror("Unable to get buffer size for playback", err); | ||
| 1030 | |||
| 1031 | if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) | ||
| 1032 | alsa_sound_perror ("Could not set parameters", err); | ||
| 1033 | |||
| 1034 | err = snd_pcm_sw_params_current (p->handle, p->swparams); | ||
| 1035 | if (err < 0) | ||
| 1036 | alsa_sound_perror ("Unable to determine current swparams for playback", | ||
| 1037 | err); | ||
| 1038 | |||
| 1039 | /* Start the transfer when the buffer is almost full */ | ||
| 1040 | err = snd_pcm_sw_params_set_start_threshold (p->handle, p->swparams, | ||
| 1041 | (buffer_size / p->period_size) | ||
| 1042 | * p->period_size); | ||
| 1043 | if (err < 0) | ||
| 1044 | alsa_sound_perror ("Unable to set start threshold mode for playback", err); | ||
| 1045 | |||
| 1046 | /* Allow the transfer when at least period_size samples can be processed */ | ||
| 1047 | err = snd_pcm_sw_params_set_avail_min (p->handle, p->swparams, p->period_size); | ||
| 1048 | if (err < 0) | ||
| 1049 | alsa_sound_perror ("Unable to set avail min for playback", err); | ||
| 1050 | |||
| 1051 | /* Align all transfers to 1 period */ | ||
| 1052 | err = snd_pcm_sw_params_set_xfer_align (p->handle, p->swparams, | ||
| 1053 | p->period_size); | ||
| 1054 | if (err < 0) | ||
| 1055 | alsa_sound_perror ("Unable to set transfer align for playback", err); | ||
| 1056 | |||
| 1057 | err = snd_pcm_sw_params (p->handle, p->swparams); | ||
| 1058 | if (err < 0) | ||
| 1059 | alsa_sound_perror ("Unable to set sw params for playback\n", err); | ||
| 1060 | |||
| 1061 | snd_pcm_hw_params_free (p->hwparams); | ||
| 1062 | p->hwparams = NULL; | ||
| 1063 | snd_pcm_sw_params_free (p->swparams); | ||
| 1064 | p->swparams = NULL; | ||
| 1065 | |||
| 1066 | if ((err = snd_pcm_prepare (p->handle)) < 0) | ||
| 1067 | alsa_sound_perror ("Could not prepare audio interface for use", err); | ||
| 1068 | |||
| 1069 | if (sd->volume > 0) | ||
| 1070 | { | ||
| 1071 | int chn; | ||
| 1072 | snd_mixer_t *handle; | ||
| 1073 | snd_mixer_elem_t *e; | ||
| 1074 | char *file = sd->file ? sd->file : DEFAULT_ALSA_SOUND_DEVICE; | ||
| 1075 | |||
| 1076 | if (snd_mixer_open (&handle, 0) >= 0) | ||
| 1077 | { | ||
| 1078 | if (snd_mixer_attach (handle, file) >= 0 | ||
| 1079 | && snd_mixer_load (handle) >= 0 | ||
| 1080 | && snd_mixer_selem_register (handle, NULL, NULL) >= 0) | ||
| 1081 | for (e = snd_mixer_first_elem (handle); | ||
| 1082 | e; | ||
| 1083 | e = snd_mixer_elem_next (e)) | ||
| 1084 | { | ||
| 1085 | if (snd_mixer_selem_has_playback_volume (e)) | ||
| 1086 | { | ||
| 1087 | long pmin, pmax; | ||
| 1088 | snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax); | ||
| 1089 | long vol = pmin + (sd->volume * (pmax - pmin)) / 100; | ||
| 1090 | |||
| 1091 | for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++) | ||
| 1092 | snd_mixer_selem_set_playback_volume (e, chn, vol); | ||
| 1093 | } | ||
| 1094 | } | ||
| 1095 | snd_mixer_close(handle); | ||
| 1096 | } | ||
| 1097 | } | ||
| 1098 | } | ||
| 1099 | |||
| 1100 | |||
| 1101 | /* Close device SD if it is open. */ | ||
| 1102 | |||
| 1103 | static void | ||
| 1104 | alsa_close (sd) | ||
| 1105 | struct sound_device *sd; | ||
| 1106 | { | ||
| 1107 | struct alsa_params *p = (struct alsa_params *) sd->data; | ||
| 1108 | if (p) | ||
| 1109 | { | ||
| 1110 | if (p->hwparams) | ||
| 1111 | snd_pcm_hw_params_free (p->hwparams); | ||
| 1112 | if (p->swparams) | ||
| 1113 | snd_pcm_sw_params_free (p->swparams); | ||
| 1114 | if (p->handle) | ||
| 1115 | { | ||
| 1116 | snd_pcm_drain(p->handle); | ||
| 1117 | snd_pcm_close (p->handle); | ||
| 1118 | } | ||
| 1119 | free (p); | ||
| 1120 | } | ||
| 1121 | } | ||
| 1122 | |||
| 1123 | /* Choose device-dependent format for device SD from sound file S. */ | ||
| 1124 | |||
| 1125 | static void | ||
| 1126 | alsa_choose_format (sd, s) | ||
| 1127 | struct sound_device *sd; | ||
| 1128 | struct sound *s; | ||
| 1129 | { | ||
| 1130 | struct alsa_params *p = (struct alsa_params *) sd->data; | ||
| 1131 | if (s->type == RIFF) | ||
| 1132 | { | ||
| 1133 | struct wav_header *h = (struct wav_header *) s->header; | ||
| 1134 | if (h->precision == 8) | ||
| 1135 | sd->format = SND_PCM_FORMAT_U8; | ||
| 1136 | else if (h->precision == 16) | ||
| 1137 | sd->format = SND_PCM_FORMAT_S16_LE; | ||
| 1138 | else | ||
| 1139 | error ("Unsupported WAV file format"); | ||
| 1140 | } | ||
| 1141 | else if (s->type == SUN_AUDIO) | ||
| 1142 | { | ||
| 1143 | struct au_header *header = (struct au_header *) s->header; | ||
| 1144 | switch (header->encoding) | ||
| 1145 | { | ||
| 1146 | case AU_ENCODING_ULAW_8: | ||
| 1147 | sd->format = SND_PCM_FORMAT_MU_LAW; | ||
| 1148 | break; | ||
| 1149 | case AU_ENCODING_ALAW_8: | ||
| 1150 | sd->format = SND_PCM_FORMAT_A_LAW; | ||
| 1151 | break; | ||
| 1152 | case AU_ENCODING_IEEE32: | ||
| 1153 | sd->format = SND_PCM_FORMAT_FLOAT_BE; | ||
| 1154 | break; | ||
| 1155 | case AU_ENCODING_IEEE64: | ||
| 1156 | sd->format = SND_PCM_FORMAT_FLOAT64_BE; | ||
| 1157 | break; | ||
| 1158 | case AU_ENCODING_8: | ||
| 1159 | sd->format = SND_PCM_FORMAT_S8; | ||
| 1160 | break; | ||
| 1161 | case AU_ENCODING_16: | ||
| 1162 | sd->format = SND_PCM_FORMAT_S16_BE; | ||
| 1163 | break; | ||
| 1164 | case AU_ENCODING_24: | ||
| 1165 | sd->format = SND_PCM_FORMAT_S24_BE; | ||
| 1166 | break; | ||
| 1167 | case AU_ENCODING_32: | ||
| 1168 | sd->format = SND_PCM_FORMAT_S32_BE; | ||
| 1169 | break; | ||
| 1170 | |||
| 1171 | default: | ||
| 1172 | error ("Unsupported AU file format"); | ||
| 1173 | } | ||
| 1174 | } | ||
| 1175 | else | ||
| 1176 | abort (); | ||
| 1177 | } | ||
| 1178 | |||
| 1179 | |||
| 1180 | /* Write NBYTES bytes from BUFFER to device SD. */ | ||
| 1181 | |||
| 1182 | static void | ||
| 1183 | alsa_write (sd, buffer, nbytes) | ||
| 1184 | struct sound_device *sd; | ||
| 1185 | const char *buffer; | ||
| 1186 | int nbytes; | ||
| 1187 | { | ||
| 1188 | struct alsa_params *p = (struct alsa_params *) sd->data; | ||
| 1189 | |||
| 1190 | /* The the third parameter to snd_pcm_writei is frames, not bytes. */ | ||
| 1191 | int fact = snd_pcm_format_size (sd->format, 1) * sd->channels; | ||
| 1192 | int nwritten = 0; | ||
| 1193 | int err; | ||
| 1194 | |||
| 1195 | while (nwritten < nbytes) | ||
| 1196 | { | ||
| 1197 | if ((err = snd_pcm_writei (p->handle, | ||
| 1198 | buffer + nwritten, | ||
| 1199 | (nbytes - nwritten)/fact)) < 0) | ||
| 1200 | { | ||
| 1201 | fprintf(stderr, "Err %d/%s\n", err, snd_strerror(err)); | ||
| 1202 | if (err == -EPIPE) | ||
| 1203 | { /* under-run */ | ||
| 1204 | err = snd_pcm_prepare (p->handle); | ||
| 1205 | if (err < 0) | ||
| 1206 | alsa_sound_perror ("Can't recover from underrun, prepare failed", | ||
| 1207 | err); | ||
| 1208 | } | ||
| 1209 | else if (err == -ESTRPIPE) | ||
| 1210 | { | ||
| 1211 | while ((err = snd_pcm_resume (p->handle)) == -EAGAIN) | ||
| 1212 | sleep(1); /* wait until the suspend flag is released */ | ||
| 1213 | if (err < 0) | ||
| 1214 | { | ||
| 1215 | err = snd_pcm_prepare (p->handle); | ||
| 1216 | if (err < 0) | ||
| 1217 | alsa_sound_perror ("Can't recover from suspend, " | ||
| 1218 | "prepare failed", | ||
| 1219 | err); | ||
| 1220 | } | ||
| 1221 | } | ||
| 1222 | else | ||
| 1223 | alsa_sound_perror ("Error writing to sound device", err); | ||
| 1224 | |||
| 1225 | } | ||
| 1226 | else | ||
| 1227 | nwritten += err * fact; | ||
| 1228 | } | ||
| 1229 | } | ||
| 1230 | |||
| 1231 | static void | ||
| 1232 | snd_error_quiet (file, line, function, err, fmt) | ||
| 1233 | const char *file; | ||
| 1234 | int line; | ||
| 1235 | const char *function; | ||
| 1236 | int err; | ||
| 1237 | const char *fmt; | ||
| 1238 | { | ||
| 1239 | } | ||
| 1240 | |||
| 1241 | /* Initialize device SD. Set up the interface functions in the device | ||
| 1242 | structure. */ | ||
| 1243 | |||
| 1244 | static int | ||
| 1245 | alsa_init (sd) | ||
| 1246 | struct sound_device *sd; | ||
| 1247 | { | ||
| 1248 | char *file; | ||
| 1249 | snd_pcm_t *handle; | ||
| 1250 | int err; | ||
| 1251 | |||
| 1252 | /* Open the sound device. Default is "default". */ | ||
| 1253 | if (sd->file) | ||
| 1254 | file = sd->file; | ||
| 1255 | else | ||
| 1256 | file = DEFAULT_ALSA_SOUND_DEVICE; | ||
| 1257 | |||
| 1258 | snd_lib_error_set_handler ((snd_lib_error_handler_t) snd_error_quiet); | ||
| 1259 | err = snd_pcm_open (&handle, file, SND_PCM_STREAM_PLAYBACK, 0); | ||
| 1260 | snd_lib_error_set_handler (NULL); | ||
| 1261 | if (err < 0) | ||
| 1262 | return 0; | ||
| 1263 | |||
| 1264 | sd->fd = -1; | ||
| 1265 | sd->open = alsa_open; | ||
| 1266 | sd->close = alsa_close; | ||
| 1267 | sd->configure = alsa_configure; | ||
| 1268 | sd->choose_format = alsa_choose_format; | ||
| 1269 | sd->write = alsa_write; | ||
| 1270 | sd->period_size = alsa_period_size; | ||
| 1271 | |||
| 1272 | return 1; | ||
| 1273 | } | ||
| 1274 | |||
| 1275 | #endif /* HAVE_ALSA */ | ||
| 1276 | |||
| 1277 | |||
| 896 | /* END: Non Windows functions */ | 1278 | /* END: Non Windows functions */ |
| 897 | #else /* WINDOWSNT */ | 1279 | #else /* WINDOWSNT */ |
| 898 | 1280 | ||
| @@ -1056,10 +1438,11 @@ Internal use only, use `play-sound' instead.\n */) | |||
| 1056 | args[1] = sound; | 1438 | args[1] = sound; |
| 1057 | Frun_hook_with_args (2, args); | 1439 | Frun_hook_with_args (2, args); |
| 1058 | 1440 | ||
| 1059 | /* There is only one type of device we currently support, the VOX | 1441 | #ifdef HAVE_ALSA |
| 1060 | sound driver. Set up the device interface functions for that | 1442 | if (!alsa_init (current_sound_device)) |
| 1061 | device. */ | 1443 | #endif |
| 1062 | vox_init (current_sound_device); | 1444 | if (!vox_init (current_sound_device)) |
| 1445 | error ("No usable sound device driver found"); | ||
| 1063 | 1446 | ||
| 1064 | /* Open the device. */ | 1447 | /* Open the device. */ |
| 1065 | current_sound_device->open (current_sound_device); | 1448 | current_sound_device->open (current_sound_device); |
diff --git a/src/window.c b/src/window.c index 966960edd90..5dced198811 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -6798,7 +6798,9 @@ foreach_window (f, fn, user_data) | |||
| 6798 | int (* fn) P_ ((struct window *, void *)); | 6798 | int (* fn) P_ ((struct window *, void *)); |
| 6799 | void *user_data; | 6799 | void *user_data; |
| 6800 | { | 6800 | { |
| 6801 | foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data); | 6801 | /* Fdelete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ |
| 6802 | if (WINDOWP (FRAME_ROOT_WINDOW (f))) | ||
| 6803 | foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data); | ||
| 6802 | } | 6804 | } |
| 6803 | 6805 | ||
| 6804 | 6806 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index a271d64fdbb..32255f92da7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -9492,7 +9492,8 @@ display_tool_bar_line (it, height) | |||
| 9492 | 9492 | ||
| 9493 | while (it->current_x < max_x) | 9493 | while (it->current_x < max_x) |
| 9494 | { | 9494 | { |
| 9495 | int x_before, x, n_glyphs_before, i, nglyphs; | 9495 | int x, n_glyphs_before, i, nglyphs; |
| 9496 | struct it it_before; | ||
| 9496 | 9497 | ||
| 9497 | /* Get the next display element. */ | 9498 | /* Get the next display element. */ |
| 9498 | if (!get_next_display_element (it)) | 9499 | if (!get_next_display_element (it)) |
| @@ -9504,22 +9505,23 @@ display_tool_bar_line (it, height) | |||
| 9504 | } | 9505 | } |
| 9505 | 9506 | ||
| 9506 | /* Produce glyphs. */ | 9507 | /* Produce glyphs. */ |
| 9507 | x_before = it->current_x; | 9508 | n_glyphs_before = row->used[TEXT_AREA]; |
| 9508 | n_glyphs_before = it->glyph_row->used[TEXT_AREA]; | 9509 | it_before = *it; |
| 9510 | |||
| 9509 | PRODUCE_GLYPHS (it); | 9511 | PRODUCE_GLYPHS (it); |
| 9510 | 9512 | ||
| 9511 | nglyphs = it->glyph_row->used[TEXT_AREA] - n_glyphs_before; | 9513 | nglyphs = row->used[TEXT_AREA] - n_glyphs_before; |
| 9512 | i = 0; | 9514 | i = 0; |
| 9513 | x = x_before; | 9515 | x = it_before.current_x; |
| 9514 | while (i < nglyphs) | 9516 | while (i < nglyphs) |
| 9515 | { | 9517 | { |
| 9516 | struct glyph *glyph = row->glyphs[TEXT_AREA] + n_glyphs_before + i; | 9518 | struct glyph *glyph = row->glyphs[TEXT_AREA] + n_glyphs_before + i; |
| 9517 | 9519 | ||
| 9518 | if (x + glyph->pixel_width > max_x) | 9520 | if (x + glyph->pixel_width > max_x) |
| 9519 | { | 9521 | { |
| 9520 | /* Glyph doesn't fit on line. */ | 9522 | /* Glyph doesn't fit on line. Backtrack. */ |
| 9521 | it->glyph_row->used[TEXT_AREA] = n_glyphs_before + i; | 9523 | row->used[TEXT_AREA] = n_glyphs_before; |
| 9522 | it->current_x = x; | 9524 | *it = it_before; |
| 9523 | goto out; | 9525 | goto out; |
| 9524 | } | 9526 | } |
| 9525 | 9527 | ||
| @@ -9550,6 +9552,8 @@ display_tool_bar_line (it, height) | |||
| 9550 | /* Make line the desired height and center it vertically. */ | 9552 | /* Make line the desired height and center it vertically. */ |
| 9551 | if ((height -= it->max_ascent + it->max_descent) > 0) | 9553 | if ((height -= it->max_ascent + it->max_descent) > 0) |
| 9552 | { | 9554 | { |
| 9555 | /* Don't add more than one line height. */ | ||
| 9556 | height %= FRAME_LINE_HEIGHT (it->f); | ||
| 9553 | it->max_ascent += height / 2; | 9557 | it->max_ascent += height / 2; |
| 9554 | it->max_descent += (height + 1) / 2; | 9558 | it->max_descent += (height + 1) / 2; |
| 9555 | } | 9559 | } |
diff --git a/src/xfaces.c b/src/xfaces.c index fc2c8a768bf..15556ca88f8 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -6400,6 +6400,12 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth) | |||
| 6400 | { | 6400 | { |
| 6401 | int i; | 6401 | int i; |
| 6402 | 6402 | ||
| 6403 | /* Any font is better than no font. */ | ||
| 6404 | if (! font1) | ||
| 6405 | return 0; | ||
| 6406 | if (! font2) | ||
| 6407 | return 1; | ||
| 6408 | |||
| 6403 | for (i = 0; i < DIM (font_sort_order); ++i) | 6409 | for (i = 0; i < DIM (font_sort_order); ++i) |
| 6404 | { | 6410 | { |
| 6405 | int xlfd_idx = font_sort_order[i]; | 6411 | int xlfd_idx = font_sort_order[i]; |
| @@ -6644,29 +6650,19 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike) | |||
| 6644 | if (needs_overstrike) | 6650 | if (needs_overstrike) |
| 6645 | *needs_overstrike = 0; | 6651 | *needs_overstrike = 0; |
| 6646 | 6652 | ||
| 6647 | /* Start with the first non-scalable font in the list. */ | 6653 | best = NULL; |
| 6648 | for (i = 0; i < nfonts; ++i) | ||
| 6649 | if (!font_scalable_p (fonts + i)) | ||
| 6650 | break; | ||
| 6651 | 6654 | ||
| 6652 | /* Find the best match among the non-scalable fonts. */ | 6655 | /* Find the best match among the non-scalable fonts. */ |
| 6653 | if (i < nfonts) | 6656 | for (i = 1; i < nfonts; ++i) |
| 6654 | { | 6657 | if (!font_scalable_p (fonts + i) |
| 6655 | best = fonts + i; | 6658 | && better_font_p (specified, fonts + i, best, 1, avgwidth)) |
| 6656 | 6659 | { | |
| 6657 | for (i = 1; i < nfonts; ++i) | 6660 | best = fonts + i; |
| 6658 | if (!font_scalable_p (fonts + i) | ||
| 6659 | && better_font_p (specified, fonts + i, best, 1, avgwidth)) | ||
| 6660 | { | ||
| 6661 | best = fonts + i; | ||
| 6662 | 6661 | ||
| 6663 | exact_p = exact_face_match_p (specified, best, avgwidth); | 6662 | exact_p = exact_face_match_p (specified, best, avgwidth); |
| 6664 | if (exact_p) | 6663 | if (exact_p) |
| 6665 | break; | 6664 | break; |
| 6666 | } | 6665 | } |
| 6667 | } | ||
| 6668 | else | ||
| 6669 | best = NULL; | ||
| 6670 | 6666 | ||
| 6671 | /* Unless we found an exact match among non-scalable fonts, see if | 6667 | /* Unless we found an exact match among non-scalable fonts, see if |
| 6672 | we can find a better match among scalable fonts. */ | 6668 | we can find a better match among scalable fonts. */ |
| @@ -6690,8 +6686,7 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike) | |||
| 6690 | for (i = 0; i < nfonts; ++i) | 6686 | for (i = 0; i < nfonts; ++i) |
| 6691 | if (font_scalable_p (fonts + i)) | 6687 | if (font_scalable_p (fonts + i)) |
| 6692 | { | 6688 | { |
| 6693 | if (best == NULL | 6689 | if (better_font_p (specified, fonts + i, best, 0, 0) |
| 6694 | || better_font_p (specified, fonts + i, best, 0, 0) | ||
| 6695 | || (!non_scalable_has_exact_height_p | 6690 | || (!non_scalable_has_exact_height_p |
| 6696 | && !better_font_p (specified, best, fonts + i, 0, 0))) | 6691 | && !better_font_p (specified, best, fonts + i, 0, 0))) |
| 6697 | { | 6692 | { |
| @@ -6719,6 +6714,10 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike) | |||
| 6719 | } | 6714 | } |
| 6720 | } | 6715 | } |
| 6721 | 6716 | ||
| 6717 | /* We should have found SOME font. */ | ||
| 6718 | if (best == NULL) | ||
| 6719 | abort (); | ||
| 6720 | |||
| 6722 | if (font_scalable_p (best)) | 6721 | if (font_scalable_p (best)) |
| 6723 | font_name = build_scalable_font_name (f, best, pt); | 6722 | font_name = build_scalable_font_name (f, best, pt); |
| 6724 | else | 6723 | else |
diff --git a/src/xterm.c b/src/xterm.c index 1c07c56241e..2070c65d76a 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6097,6 +6097,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6097 | 6097 | ||
| 6098 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); | 6098 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); |
| 6099 | 6099 | ||
| 6100 | /* If mouse-highlight is an integer, input clears out | ||
| 6101 | mouse highlighting. */ | ||
| 6100 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) | 6102 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) |
| 6101 | && (f == 0 | 6103 | && (f == 0 |
| 6102 | || !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))) | 6104 | || !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))) |