diff options
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | autogen/config.in | 3 | ||||
| -rwxr-xr-x | autogen/configure | 45 | ||||
| -rw-r--r-- | configure.in | 28 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/package.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/lists.texi | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 67 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 17 | ||||
| -rw-r--r-- | lisp/dired.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 116 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 6 | ||||
| -rw-r--r-- | lisp/help.el | 58 | ||||
| -rw-r--r-- | lisp/isearch.el | 51 | ||||
| -rw-r--r-- | lisp/mail/smtpmail.el | 7 | ||||
| -rw-r--r-- | lisp/mpc.el | 14 | ||||
| -rw-r--r-- | lisp/newcomment.el | 6 | ||||
| -rw-r--r-- | lisp/replace.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/bibtex.el | 50 | ||||
| -rw-r--r-- | lisp/window.el | 49 | ||||
| -rw-r--r-- | src/ChangeLog | 20 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/doprnt.c | 4 | ||||
| -rw-r--r-- | src/indent.c | 2 | ||||
| -rw-r--r-- | src/w32term.c | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 2 | ||||
| -rw-r--r-- | src/xselect.c | 8 | ||||
| -rw-r--r-- | src/xterm.c | 8 | ||||
| -rw-r--r-- | src/xterm.h | 1 |
32 files changed, 410 insertions, 193 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-09-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.in: Make configure work with recent GNUsteps. | ||
| 4 | (_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE. | ||
| 5 | (GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed. | ||
| 6 | (C_SWITCH_X_SYSTEM): Enable GNUstep to find its headers. | ||
| 7 | |||
| 1 | 2011-09-11 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2011-09-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | Merge from gnulib, porting to Tru64. | 10 | Merge from gnulib, porting to Tru64. |
diff --git a/autogen/config.in b/autogen/config.in index bfec2882534..3b88849a1e7 100644 --- a/autogen/config.in +++ b/autogen/config.in | |||
| @@ -1172,6 +1172,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1172 | /* Define to 1 if on MINIX. */ | 1172 | /* Define to 1 if on MINIX. */ |
| 1173 | #undef _MINIX | 1173 | #undef _MINIX |
| 1174 | 1174 | ||
| 1175 | /* Define if GNUstep uses ObjC exceptions. */ | ||
| 1176 | #undef _NATIVE_OBJC_EXCEPTIONS | ||
| 1177 | |||
| 1175 | /* The _Noreturn keyword of draft C1X. */ | 1178 | /* The _Noreturn keyword of draft C1X. */ |
| 1176 | #ifndef _Noreturn | 1179 | #ifndef _Noreturn |
| 1177 | # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ | 1180 | # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ |
diff --git a/autogen/configure b/autogen/configure index 6ae1560c238..a0b73bb96c4 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -9977,6 +9977,7 @@ tmp_CFLAGS="$CFLAGS" | |||
| 9977 | CPPFLAGS="$CPPFLAGS -x objective-c" | 9977 | CPPFLAGS="$CPPFLAGS -x objective-c" |
| 9978 | CFLAGS="$CFLAGS -x objective-c" | 9978 | CFLAGS="$CFLAGS -x objective-c" |
| 9979 | TEMACS_LDFLAGS2="\${LDFLAGS}" | 9979 | TEMACS_LDFLAGS2="\${LDFLAGS}" |
| 9980 | GNU_OBJC_CFLAGS= | ||
| 9980 | if test "${with_ns}" != no; then | 9981 | if test "${with_ns}" != no; then |
| 9981 | if test "${opsys}" = darwin; then | 9982 | if test "${opsys}" = darwin; then |
| 9982 | NS_IMPL_COCOA=yes | 9983 | NS_IMPL_COCOA=yes |
| @@ -10004,7 +10005,45 @@ if test "${with_ns}" != no; then | |||
| 10004 | LIB_STANDARD= | 10005 | LIB_STANDARD= |
| 10005 | START_FILES= | 10006 | START_FILES= |
| 10006 | TEMACS_LDFLAGS2= | 10007 | TEMACS_LDFLAGS2= |
| 10008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 | ||
| 10009 | $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } | ||
| 10010 | if test "${emacs_cv_objc_exceptions+set}" = set; then : | ||
| 10011 | $as_echo_n "(cached) " >&6 | ||
| 10012 | else | ||
| 10013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 10014 | /* end confdefs.h. */ | ||
| 10015 | #include <GNUstepBase/GSConfig.h> | ||
| 10016 | int | ||
| 10017 | main () | ||
| 10018 | { | ||
| 10019 | #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 | ||
| 10020 | 1; | ||
| 10021 | #else | ||
| 10022 | fail; | ||
| 10023 | #endif | ||
| 10024 | ; | ||
| 10025 | return 0; | ||
| 10026 | } | ||
| 10027 | _ACEOF | ||
| 10028 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 10029 | emacs_cv_objc_exceptions=yes | ||
| 10030 | else | ||
| 10031 | emacs_cv_objc_exceptions=no | ||
| 10032 | fi | ||
| 10033 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 10034 | fi | ||
| 10035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 | ||
| 10036 | $as_echo "$emacs_cv_objc_exceptions" >&6; } | ||
| 10037 | if test $emacs_cv_objc_exceptions = yes; then | ||
| 10038 | |||
| 10039 | $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h | ||
| 10040 | |||
| 10041 | GNU_OBJC_CFLAGS="-fobjc-exceptions" | ||
| 10042 | fi | ||
| 10007 | fi | 10043 | fi |
| 10044 | |||
| 10045 | CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" | ||
| 10046 | |||
| 10008 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | 10047 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" |
| 10009 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : | 10048 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : |
| 10010 | HAVE_NS=yes | 10049 | HAVE_NS=yes |
| @@ -13693,7 +13732,6 @@ $as_echo "#define HAVE_NS 1" >>confdefs.h | |||
| 13693 | 13732 | ||
| 13694 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h | 13733 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h |
| 13695 | 13734 | ||
| 13696 | GNU_OBJC_CFLAGS= | ||
| 13697 | fi | 13735 | fi |
| 13698 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | 13736 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then |
| 13699 | 13737 | ||
| @@ -13701,8 +13739,9 @@ $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h | |||
| 13701 | 13739 | ||
| 13702 | # See also .m.o rule in Makefile.in */ | 13740 | # See also .m.o rule in Makefile.in */ |
| 13703 | # FIXME: are all these flags really needed? Document here why. */ | 13741 | # FIXME: are all these flags really needed? Document here why. */ |
| 13704 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | 13742 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" |
| 13705 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | 13743 | ## Extra CFLAGS applied to src/*.m files. |
| 13744 | GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | ||
| 13706 | fi | 13745 | fi |
| 13707 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | 13746 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then |
| 13708 | 13747 | ||
diff --git a/configure.in b/configure.in index 07fad40944d..3bcabd2fec0 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1491,6 +1491,7 @@ tmp_CFLAGS="$CFLAGS" | |||
| 1491 | CPPFLAGS="$CPPFLAGS -x objective-c" | 1491 | CPPFLAGS="$CPPFLAGS -x objective-c" |
| 1492 | CFLAGS="$CFLAGS -x objective-c" | 1492 | CFLAGS="$CFLAGS -x objective-c" |
| 1493 | TEMACS_LDFLAGS2="\${LDFLAGS}" | 1493 | TEMACS_LDFLAGS2="\${LDFLAGS}" |
| 1494 | GNU_OBJC_CFLAGS= | ||
| 1494 | dnl I don't think it's especially important, but src/Makefile.in | 1495 | dnl I don't think it's especially important, but src/Makefile.in |
| 1495 | dnl (now the only user of ns_appdir) used to go to the trouble of adding a | 1496 | dnl (now the only user of ns_appdir) used to go to the trouble of adding a |
| 1496 | dnl trailing "/" to it, so now we do it here. | 1497 | dnl trailing "/" to it, so now we do it here. |
| @@ -1523,7 +1524,28 @@ if test "${with_ns}" != no; then | |||
| 1523 | LIB_STANDARD= | 1524 | LIB_STANDARD= |
| 1524 | START_FILES= | 1525 | START_FILES= |
| 1525 | TEMACS_LDFLAGS2= | 1526 | TEMACS_LDFLAGS2= |
| 1527 | dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1. | ||
| 1528 | dnl If they had chosen to either define it or not, we could have | ||
| 1529 | dnl just used AC_CHECK_DECL here. | ||
| 1530 | AC_CACHE_CHECK(if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS, | ||
| 1531 | emacs_cv_objc_exceptions, | ||
| 1532 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <GNUstepBase/GSConfig.h>]], | ||
| 1533 | [[#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 | ||
| 1534 | 1; | ||
| 1535 | #else | ||
| 1536 | fail; | ||
| 1537 | #endif]])], emacs_cv_objc_exceptions=yes, emacs_cv_objc_exceptions=no ) ) | ||
| 1538 | if test $emacs_cv_objc_exceptions = yes; then | ||
| 1539 | dnl _NATIVE_OBJC_EXCEPTIONS is used by the GNUstep headers. | ||
| 1540 | AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1, | ||
| 1541 | [Define if GNUstep uses ObjC exceptions.]) | ||
| 1542 | GNU_OBJC_CFLAGS="-fobjc-exceptions" | ||
| 1543 | fi | ||
| 1526 | fi | 1544 | fi |
| 1545 | |||
| 1546 | dnl This is only used while we test the NS headers, it gets reset below. | ||
| 1547 | CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" | ||
| 1548 | |||
| 1527 | AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], | 1549 | AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], |
| 1528 | [AC_MSG_ERROR([`--with-ns' was specified, but the include | 1550 | [AC_MSG_ERROR([`--with-ns' was specified, but the include |
| 1529 | files are missing or cannot be compiled.])]) | 1551 | files are missing or cannot be compiled.])]) |
| @@ -2605,14 +2627,14 @@ if test "${HAVE_NS}" = "yes"; then | |||
| 2605 | AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) | 2627 | AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) |
| 2606 | if test "${NS_IMPL_COCOA}" = "yes"; then | 2628 | if test "${NS_IMPL_COCOA}" = "yes"; then |
| 2607 | AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.]) | 2629 | AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.]) |
| 2608 | GNU_OBJC_CFLAGS= | ||
| 2609 | fi | 2630 | fi |
| 2610 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | 2631 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then |
| 2611 | AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) | 2632 | AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) |
| 2612 | # See also .m.o rule in Makefile.in */ | 2633 | # See also .m.o rule in Makefile.in */ |
| 2613 | # FIXME: are all these flags really needed? Document here why. */ | 2634 | # FIXME: are all these flags really needed? Document here why. */ |
| 2614 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | 2635 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" |
| 2615 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | 2636 | ## Extra CFLAGS applied to src/*.m files. |
| 2637 | GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | ||
| 2616 | fi | 2638 | fi |
| 2617 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | 2639 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then |
| 2618 | AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) | 2640 | AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 5fba9eda3b0..d87493d57b3 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-09-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * package.texi (Package Menu): Add package-menu-mark-upgrades. | ||
| 4 | |||
| 1 | 2011-09-12 Eric Hanchrow <eric.hanchrow@gmail.com> | 5 | 2011-09-12 Eric Hanchrow <eric.hanchrow@gmail.com> |
| 2 | 6 | ||
| 3 | * frames.texi (Frame Commands): Note that delete-other-frames only | 7 | * frames.texi (Frame Commands): Note that delete-other-frames only |
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 739a8ce6c65..b342cbbf18c 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi | |||
| @@ -107,6 +107,12 @@ entails. | |||
| 107 | Remove any installation or deletion mark previously added to the | 107 | Remove any installation or deletion mark previously added to the |
| 108 | current line by an @kbd{i} or @kbd{d} command. | 108 | current line by an @kbd{i} or @kbd{d} command. |
| 109 | 109 | ||
| 110 | @item U | ||
| 111 | Mark all package with a newer available version for ``upgrading'' | ||
| 112 | (@code{package-menu-mark-upgrades}). This places an installation mark | ||
| 113 | on the new available versions, and a deletion mark on the old | ||
| 114 | installed versions. | ||
| 115 | |||
| 110 | @item x | 116 | @item x |
| 111 | Download and install all packages marked with @kbd{i}, and their | 117 | Download and install all packages marked with @kbd{i}, and their |
| 112 | dependencies; also, delete all packages marked with @kbd{d} | 118 | dependencies; also, delete all packages marked with @kbd{d} |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4873680d0a1..71dc8a8ff89 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-09-14 Dani Moncayo <dmoncayo@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * lists.texi (Sets And Lists): Fix typo. (Bug#9393) | ||
| 4 | |||
| 1 | 2011-09-11 Juanma Barranquero <lekktu@gmail.com> | 5 | 2011-09-11 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * processes.texi (Network Servers): Clarify what the process | 7 | * processes.texi (Network Servers): Clarify what the process |
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 7a530b602e0..056c924e72c 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -1454,7 +1454,7 @@ For example: | |||
| 1454 | l | 1454 | l |
| 1455 | @result{} ((2) (1)) | 1455 | @result{} ((2) (1)) |
| 1456 | ;; @r{If you want to change @code{l} reliably,} | 1456 | ;; @r{If you want to change @code{l} reliably,} |
| 1457 | ;; @r{write @code{(setq l (delete elt l))}.} | 1457 | ;; @r{write @code{(setq l (delete '(2) l))}.} |
| 1458 | @end group | 1458 | @end group |
| 1459 | @group | 1459 | @group |
| 1460 | (setq l '((2) (1) (2))) | 1460 | (setq l '((2) (1) (2))) |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53ef2a1bbcd..91ffbcff96b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,70 @@ | |||
| 1 | 2011-09-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el (package-alist): Fix risky-local-variable | ||
| 4 | declaration. | ||
| 5 | (package--add-to-archive-contents): If there is a duplicate entry | ||
| 6 | with an older version, remove it. | ||
| 7 | (package-menu-mark-delete, package-menu-mark-install) | ||
| 8 | (package-menu-mark-unmark): Make unused args optional. | ||
| 9 | (package-menu-mark-obsolete-for-deletion): Use | ||
| 10 | package-menu-get-status instead of a regexp search. | ||
| 11 | (package-menu-get-status): Use tabulated-list-entry. | ||
| 12 | (package-menu-mark-upgrades): New command. | ||
| 13 | (package-menu-mode-map): Bind it to U. Add it to menu bar. | ||
| 14 | (package-menu-execute): Do installation before deletion. | ||
| 15 | (package-menu-refresh, package-menu-execute): Use derived-mode-p | ||
| 16 | instead of checking major-mode. | ||
| 17 | (package-menu--find-upgrades): New function. | ||
| 18 | |||
| 19 | 2011-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 20 | |||
| 21 | * mail/smtpmail.el (smtpmail-send-command): Don't include AUTH | ||
| 22 | passwords in the log buffer. | ||
| 23 | (smtpmail-process-filter): Update the process marker so that the | ||
| 24 | "broken by peer" status message is inserted in the right place. | ||
| 25 | |||
| 26 | 2011-09-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 27 | |||
| 28 | * textmodes/bibtex.el (bibtex-complete-string-cleanup) | ||
| 29 | (bibtex-complete-crossref-cleanup): Adjust to accommodate needs of | ||
| 30 | bibtex-completion-at-point-function. | ||
| 31 | (bibtex-completion-at-point-function): Use them. | ||
| 32 | |||
| 33 | * newcomment.el (comment-add, comment-valid-prefix-p): Docfix. | ||
| 34 | |||
| 35 | * mpc.el (mpc-constraints-tag-lookup): New function. | ||
| 36 | (mpc-constraints-restore): Use it to make jumping to "album=Foo" apply | ||
| 37 | also to browser "album|playlist". | ||
| 38 | |||
| 39 | 2011-09-14 Juri Linkov <juri@jurta.org> | ||
| 40 | |||
| 41 | * isearch.el (isearch-fail-pos): Add new arg `msg'. Doc fix. | ||
| 42 | (isearch-edit-string): Use length of `isearch-string' when | ||
| 43 | `isearch-fail-pos' returns nil. | ||
| 44 | (isearch-message): Remove duplicate code and call | ||
| 45 | `isearch-fail-pos' with arg `t'. | ||
| 46 | |||
| 47 | 2011-09-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 48 | |||
| 49 | * replace.el (occur-mode-goto-occurrence): Don't force using other | ||
| 50 | window (Bug#9499). | ||
| 51 | |||
| 52 | * dired-aux.el (dired-do-chmod): Don't provide initial input. | ||
| 53 | |||
| 54 | 2011-09-14 Martin Rudalics <rudalics@gmx.at> | ||
| 55 | |||
| 56 | * window.el (display-buffer-window): Remove. | ||
| 57 | (display-buffer-record-window): Use help-setup window parameter | ||
| 58 | instead of variable display-buffer-window. | ||
| 59 | (display-buffer-function, special-display-buffer-names) | ||
| 60 | (special-display-function): Mention help-setup parameter instead | ||
| 61 | of display-buffer-window in doc-string. | ||
| 62 | * help.el (help-window-setup): New argument help-window. | ||
| 63 | Use help-window-setup parameter instead of display-buffer-window. | ||
| 64 | Reword some messages. | ||
| 65 | (with-help-window): Pass window used for displaying the buffer | ||
| 66 | to help-window-setup. Don't set display-buffer-window. | ||
| 67 | |||
| 1 | 2011-09-13 Glenn Morris <rgm@gnu.org> | 68 | 2011-09-13 Glenn Morris <rgm@gnu.org> |
| 2 | 69 | ||
| 3 | * emacs-lisp/debug.el (debugger-make-xrefs): | 70 | * emacs-lisp/debug.el (debugger-make-xrefs): |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 2f2d28e596c..b09096978fd 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -285,11 +285,8 @@ Symbolic modes like `g+w' are allowed." | |||
| 285 | (match-string 3 modestr))))) | 285 | (match-string 3 modestr))))) |
| 286 | (modes (dired-mark-read-string | 286 | (modes (dired-mark-read-string |
| 287 | "Change mode of %s to: " | 287 | "Change mode of %s to: " |
| 288 | ;; Insert initial input if there's only one file. | 288 | nil 'chmod arg files default)) |
| 289 | (unless (cadr files) default) | ||
| 290 | 'chmod arg files default)) | ||
| 291 | num-modes) | 289 | num-modes) |
| 292 | |||
| 293 | (cond ((equal modes "") | 290 | (cond ((equal modes "") |
| 294 | ;; We used to treat empty input as DEFAULT, but that is not | 291 | ;; We used to treat empty input as DEFAULT, but that is not |
| 295 | ;; such a good idea (Bug#9361). | 292 | ;; such a good idea (Bug#9361). |
| @@ -388,7 +385,7 @@ Uses the shell command coming from variables `lpr-command' and | |||
| 388 | (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) | 385 | (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) |
| 389 | 386 | ||
| 390 | (defun dired-mark-read-string (prompt initial op-symbol arg files | 387 | (defun dired-mark-read-string (prompt initial op-symbol arg files |
| 391 | &optional standard-value) | 388 | &optional default-value) |
| 392 | "Read args for a Dired marked-files command, prompting with PROMPT. | 389 | "Read args for a Dired marked-files command, prompting with PROMPT. |
| 393 | Return the user input (a string). | 390 | Return the user input (a string). |
| 394 | 391 | ||
| @@ -397,14 +394,14 @@ OP-SYMBOL is an operation symbol (see `dired-no-confirm'). | |||
| 397 | ARG is normally the prefix argument for the calling command. | 394 | ARG is normally the prefix argument for the calling command. |
| 398 | FILES should be a list of file names. | 395 | FILES should be a list of file names. |
| 399 | 396 | ||
| 400 | STANDARD-VALUE, if non-nil, should be a \"standard\" value or | 397 | DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list |
| 401 | list of such values, available via history commands. Note that | 398 | of such values, available via history commands. Note that if the |
| 402 | if the user enters empty input, this function returns the empty | 399 | user enters empty input, this function returns the empty string, |
| 403 | string, not STANDARD-VALUE." | 400 | not DEFAULT-VALUE." |
| 404 | (dired-mark-pop-up nil op-symbol files | 401 | (dired-mark-pop-up nil op-symbol files |
| 405 | 'read-from-minibuffer | 402 | 'read-from-minibuffer |
| 406 | (format prompt (dired-mark-prompt arg files)) | 403 | (format prompt (dired-mark-prompt arg files)) |
| 407 | initial nil nil nil standard-value)) | 404 | initial nil nil nil default-value)) |
| 408 | 405 | ||
| 409 | ;;; Cleaning a directory: flagging some backups for deletion. | 406 | ;;; Cleaning a directory: flagging some backups for deletion. |
| 410 | 407 | ||
diff --git a/lisp/dired.el b/lisp/dired.el index 3428f5bef8b..f01e195f9ec 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3663,7 +3663,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3663 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3663 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3664 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3664 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3665 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3665 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3666 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbc9babe193843cad535d73492326c48") | 3666 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "0ffe89ae728efb341dfacff6c85e2ba4") |
| 3667 | ;;; Generated autoloads from dired-aux.el | 3667 | ;;; Generated autoloads from dired-aux.el |
| 3668 | 3668 | ||
| 3669 | (autoload 'dired-diff "dired-aux" "\ | 3669 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index caf0ec2e8b8..f0b1537e2b3 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -309,7 +309,7 @@ The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. | |||
| 309 | This variable is set automatically by `package-load-descriptor', | 309 | This variable is set automatically by `package-load-descriptor', |
| 310 | called via `package-initialize'. To change which packages are | 310 | called via `package-initialize'. To change which packages are |
| 311 | loaded and/or activated, customize `package-load-list'.") | 311 | loaded and/or activated, customize `package-load-list'.") |
| 312 | (put 'package-archive-contents 'risky-local-variable t) | 312 | (put 'package-alist 'risky-local-variable t) |
| 313 | 313 | ||
| 314 | (defvar package-activated-list nil | 314 | (defvar package-activated-list nil |
| 315 | "List of the names of currently activated packages.") | 315 | "List of the names of currently activated packages.") |
| @@ -820,13 +820,19 @@ If the archive version is too new, signal an error." | |||
| 820 | "Add the PACKAGE from the given ARCHIVE if necessary. | 820 | "Add the PACKAGE from the given ARCHIVE if necessary. |
| 821 | Also, add the originating archive to the end of the package vector." | 821 | Also, add the originating archive to the end of the package vector." |
| 822 | (let* ((name (car package)) | 822 | (let* ((name (car package)) |
| 823 | (version (aref (cdr package) 0)) | 823 | (version (package-desc-vers (cdr package))) |
| 824 | (entry (cons (car package) | 824 | (entry (cons name |
| 825 | (vconcat (cdr package) (vector archive)))) | 825 | (vconcat (cdr package) (vector archive)))) |
| 826 | (existing-package (cdr (assq name package-archive-contents)))) | 826 | (existing-package (assq name package-archive-contents))) |
| 827 | (when (or (not existing-package) | 827 | (cond ((not existing-package) |
| 828 | (version-list-< (aref existing-package 0) version)) | 828 | (add-to-list 'package-archive-contents entry)) |
| 829 | (add-to-list 'package-archive-contents entry)))) | 829 | ((version-list-< (package-desc-vers (cdr existing-package)) |
| 830 | version) | ||
| 831 | ;; Replace the entry with this one. | ||
| 832 | (setq package-archive-contents | ||
| 833 | (cons entry | ||
| 834 | (delq existing-package | ||
| 835 | package-archive-contents))))))) | ||
| 830 | 836 | ||
| 831 | (defun package-download-transaction (package-list) | 837 | (defun package-download-transaction (package-list) |
| 832 | "Download and install all the packages in PACKAGE-LIST. | 838 | "Download and install all the packages in PACKAGE-LIST. |
| @@ -1269,6 +1275,7 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." | |||
| 1269 | (define-key map "\177" 'package-menu-backup-unmark) | 1275 | (define-key map "\177" 'package-menu-backup-unmark) |
| 1270 | (define-key map "d" 'package-menu-mark-delete) | 1276 | (define-key map "d" 'package-menu-mark-delete) |
| 1271 | (define-key map "i" 'package-menu-mark-install) | 1277 | (define-key map "i" 'package-menu-mark-install) |
| 1278 | (define-key map "U" 'package-menu-mark-upgrades) | ||
| 1272 | (define-key map "r" 'package-menu-refresh) | 1279 | (define-key map "r" 'package-menu-refresh) |
| 1273 | (define-key map "~" 'package-menu-mark-obsolete-for-deletion) | 1280 | (define-key map "~" 'package-menu-mark-obsolete-for-deletion) |
| 1274 | (define-key map "x" 'package-menu-execute) | 1281 | (define-key map "x" 'package-menu-execute) |
| @@ -1298,6 +1305,9 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." | |||
| 1298 | (define-key menu-map [mi] | 1305 | (define-key menu-map [mi] |
| 1299 | '(menu-item "Mark for install" package-menu-mark-install | 1306 | '(menu-item "Mark for install" package-menu-mark-install |
| 1300 | :help "Mark a package for installation and move to the next line")) | 1307 | :help "Mark a package for installation and move to the next line")) |
| 1308 | (define-key menu-map [mupgrades] | ||
| 1309 | '(menu-item "Mark upgradable packages" package-menu-mark-upgrades | ||
| 1310 | :help "Mark packages that have a newer version for upgrading")) | ||
| 1301 | (define-key menu-map [s3] '("--")) | 1311 | (define-key menu-map [s3] '("--")) |
| 1302 | (define-key menu-map [mg] | 1312 | (define-key menu-map [mg] |
| 1303 | '(menu-item "Update package list" revert-buffer | 1313 | '(menu-item "Update package list" revert-buffer |
| @@ -1422,7 +1432,7 @@ identifier (NAME . VERSION-LIST)." | |||
| 1422 | This fetches the contents of each archive specified in | 1432 | This fetches the contents of each archive specified in |
| 1423 | `package-archives', and then refreshes the package menu." | 1433 | `package-archives', and then refreshes the package menu." |
| 1424 | (interactive) | 1434 | (interactive) |
| 1425 | (unless (eq major-mode 'package-menu-mode) | 1435 | (unless (derived-mode-p 'package-menu-mode) |
| 1426 | (error "The current buffer is not a Package Menu")) | 1436 | (error "The current buffer is not a Package Menu")) |
| 1427 | (package-refresh-contents) | 1437 | (package-refresh-contents) |
| 1428 | (package-menu--generate t t)) | 1438 | (package-menu--generate t t)) |
| @@ -1437,21 +1447,21 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 1437 | (describe-package package)))) | 1447 | (describe-package package)))) |
| 1438 | 1448 | ||
| 1439 | ;; fixme numeric argument | 1449 | ;; fixme numeric argument |
| 1440 | (defun package-menu-mark-delete (num) | 1450 | (defun package-menu-mark-delete (&optional num) |
| 1441 | "Mark a package for deletion and move to the next line." | 1451 | "Mark a package for deletion and move to the next line." |
| 1442 | (interactive "p") | 1452 | (interactive "p") |
| 1443 | (if (member (package-menu-get-status) '("installed" "obsolete")) | 1453 | (if (member (package-menu-get-status) '("installed" "obsolete")) |
| 1444 | (tabulated-list-put-tag "D" t) | 1454 | (tabulated-list-put-tag "D" t) |
| 1445 | (forward-line))) | 1455 | (forward-line))) |
| 1446 | 1456 | ||
| 1447 | (defun package-menu-mark-install (num) | 1457 | (defun package-menu-mark-install (&optional num) |
| 1448 | "Mark a package for installation and move to the next line." | 1458 | "Mark a package for installation and move to the next line." |
| 1449 | (interactive "p") | 1459 | (interactive "p") |
| 1450 | (if (string-equal (package-menu-get-status) "available") | 1460 | (if (string-equal (package-menu-get-status) "available") |
| 1451 | (tabulated-list-put-tag "I" t) | 1461 | (tabulated-list-put-tag "I" t) |
| 1452 | (forward-line))) | 1462 | (forward-line))) |
| 1453 | 1463 | ||
| 1454 | (defun package-menu-mark-unmark (num) | 1464 | (defun package-menu-mark-unmark (&optional num) |
| 1455 | "Clear any marks on a package and move to the next line." | 1465 | "Clear any marks on a package and move to the next line." |
| 1456 | (interactive "p") | 1466 | (interactive "p") |
| 1457 | (tabulated-list-put-tag " " t)) | 1467 | (tabulated-list-put-tag " " t)) |
| @@ -1467,9 +1477,8 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 1467 | (interactive) | 1477 | (interactive) |
| 1468 | (save-excursion | 1478 | (save-excursion |
| 1469 | (goto-char (point-min)) | 1479 | (goto-char (point-min)) |
| 1470 | (forward-line 2) | ||
| 1471 | (while (not (eobp)) | 1480 | (while (not (eobp)) |
| 1472 | (if (looking-at ".*\\s obsolete\\s ") | 1481 | (if (equal (package-menu-get-status) "obsolete") |
| 1473 | (tabulated-list-put-tag "D" t) | 1482 | (tabulated-list-put-tag "D" t) |
| 1474 | (forward-line 1))))) | 1483 | (forward-line 1))))) |
| 1475 | 1484 | ||
| @@ -1482,17 +1491,66 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 1482 | 'package-menu-view-commentary 'package-menu-describe-package "24.1") | 1491 | 'package-menu-view-commentary 'package-menu-describe-package "24.1") |
| 1483 | 1492 | ||
| 1484 | (defun package-menu-get-status () | 1493 | (defun package-menu-get-status () |
| 1485 | (save-excursion | 1494 | (let* ((pkg (tabulated-list-get-id)) |
| 1486 | (if (looking-at ". [^ \t]*[ \t]*[^ \t]*[ \t]*\\([^ \t]*\\)") | 1495 | (entry (and pkg (assq pkg tabulated-list-entries)))) |
| 1487 | (match-string 1) | 1496 | (if entry |
| 1497 | (aref (cadr entry) 2) | ||
| 1488 | ""))) | 1498 | ""))) |
| 1489 | 1499 | ||
| 1500 | (defun package-menu--find-upgrades () | ||
| 1501 | (let (installed available upgrades) | ||
| 1502 | ;; Build list of installed/available packages in this buffer. | ||
| 1503 | (dolist (entry tabulated-list-entries) | ||
| 1504 | ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC]) | ||
| 1505 | (let ((pkg (car entry)) | ||
| 1506 | (status (aref (cadr entry) 2)) | ||
| 1507 | old) | ||
| 1508 | (cond ((equal status "installed") | ||
| 1509 | (push pkg installed)) | ||
| 1510 | ((equal status "available") | ||
| 1511 | (push pkg available))))) | ||
| 1512 | ;; Loop through list of installed packages, finding upgrades | ||
| 1513 | (dolist (pkg installed) | ||
| 1514 | (let ((avail-pkg (assq (car pkg) available))) | ||
| 1515 | (and avail-pkg | ||
| 1516 | (version-list-< (cdr pkg) (cdr avail-pkg)) | ||
| 1517 | (push avail-pkg upgrades)))) | ||
| 1518 | upgrades)) | ||
| 1519 | |||
| 1520 | (defun package-menu-mark-upgrades () | ||
| 1521 | "Mark all upgradable packages in the Package Menu. | ||
| 1522 | For each installed package with a newer version available, place | ||
| 1523 | an (I)nstall flag on the available version and a (D)elete flag on | ||
| 1524 | the installed version. A subsequent \\[package-menu-execute] | ||
| 1525 | call will upgrade the package." | ||
| 1526 | (interactive) | ||
| 1527 | (unless (derived-mode-p 'package-menu-mode) | ||
| 1528 | (error "The current buffer is not a Package Menu")) | ||
| 1529 | (let ((upgrades (package-menu--find-upgrades))) | ||
| 1530 | (if (null upgrades) | ||
| 1531 | (message "No packages to upgrade.") | ||
| 1532 | (widen) | ||
| 1533 | (save-excursion | ||
| 1534 | (goto-char (point-min)) | ||
| 1535 | (while (not (eobp)) | ||
| 1536 | (let* ((pkg (tabulated-list-get-id)) | ||
| 1537 | (upgrade (assq (car pkg) upgrades))) | ||
| 1538 | (cond ((null upgrade) | ||
| 1539 | (forward-line 1)) | ||
| 1540 | ((equal pkg upgrade) | ||
| 1541 | (package-menu-mark-install)) | ||
| 1542 | (t | ||
| 1543 | (package-menu-mark-delete)))))) | ||
| 1544 | (message "%d package%s marked for upgrading." | ||
| 1545 | (length upgrades) | ||
| 1546 | (if (= (length upgrades) 1) "" "s"))))) | ||
| 1547 | |||
| 1490 | (defun package-menu-execute () | 1548 | (defun package-menu-execute () |
| 1491 | "Perform marked Package Menu actions. | 1549 | "Perform marked Package Menu actions. |
| 1492 | Packages marked for installation are downloaded and installed; | 1550 | Packages marked for installation are downloaded and installed; |
| 1493 | packages marked for deletion are removed." | 1551 | packages marked for deletion are removed." |
| 1494 | (interactive) | 1552 | (interactive) |
| 1495 | (unless (eq major-mode 'package-menu-mode) | 1553 | (unless (derived-mode-p 'package-menu-mode) |
| 1496 | (error "The current buffer is not in Package Menu mode")) | 1554 | (error "The current buffer is not in Package Menu mode")) |
| 1497 | (let (install-list delete-list cmd id) | 1555 | (let (install-list delete-list cmd id) |
| 1498 | (save-excursion | 1556 | (save-excursion |
| @@ -1509,6 +1567,14 @@ packages marked for deletion are removed." | |||
| 1509 | ((eq cmd ?I) | 1567 | ((eq cmd ?I) |
| 1510 | (push (car id) install-list)))) | 1568 | (push (car id) install-list)))) |
| 1511 | (forward-line))) | 1569 | (forward-line))) |
| 1570 | (when install-list | ||
| 1571 | (if (yes-or-no-p | ||
| 1572 | (if (= (length install-list) 1) | ||
| 1573 | (format "Install package `%s'? " (car install-list)) | ||
| 1574 | (format "Install these %d packages (%s)? " | ||
| 1575 | (length install-list) | ||
| 1576 | (mapconcat 'symbol-name install-list ", ")))) | ||
| 1577 | (mapc 'package-install install-list))) | ||
| 1512 | ;; Delete packages, prompting if necessary. | 1578 | ;; Delete packages, prompting if necessary. |
| 1513 | (when delete-list | 1579 | (when delete-list |
| 1514 | (if (yes-or-no-p | 1580 | (if (yes-or-no-p |
| @@ -1527,14 +1593,6 @@ packages marked for deletion are removed." | |||
| 1527 | (package-delete (car elt) (cdr elt)) | 1593 | (package-delete (car elt) (cdr elt)) |
| 1528 | (error (message (cadr err))))) | 1594 | (error (message (cadr err))))) |
| 1529 | (error "Aborted"))) | 1595 | (error "Aborted"))) |
| 1530 | (when install-list | ||
| 1531 | (if (yes-or-no-p | ||
| 1532 | (if (= (length install-list) 1) | ||
| 1533 | (format "Install package `%s'? " (car install-list)) | ||
| 1534 | (format "Install these %d packages (%s)? " | ||
| 1535 | (length install-list) | ||
| 1536 | (mapconcat 'symbol-name install-list ", ")))) | ||
| 1537 | (mapc 'package-install install-list))) | ||
| 1538 | ;; If we deleted anything, regenerate `package-alist'. This is done | 1596 | ;; If we deleted anything, regenerate `package-alist'. This is done |
| 1539 | ;; automatically if we installed a package. | 1597 | ;; automatically if we installed a package. |
| 1540 | (and delete-list (null install-list) | 1598 | (and delete-list (null install-list) |
| @@ -1597,7 +1655,13 @@ The list is displayed in a buffer named `*Packages*'." | |||
| 1597 | (package-menu--generate nil t)) | 1655 | (package-menu--generate nil t)) |
| 1598 | ;; The package menu buffer has keybindings. If the user types | 1656 | ;; The package menu buffer has keybindings. If the user types |
| 1599 | ;; `M-x list-packages', that suggests it should become current. | 1657 | ;; `M-x list-packages', that suggests it should become current. |
| 1600 | (switch-to-buffer buf))) | 1658 | (switch-to-buffer buf)) |
| 1659 | (let ((upgrades (package-menu--find-upgrades))) | ||
| 1660 | (if upgrades | ||
| 1661 | (message "%d package%s can be upgraded; type `%s' to mark them for upgrading." | ||
| 1662 | (length upgrades) | ||
| 1663 | (if (= (length upgrades) 1) "" "s") | ||
| 1664 | (substitute-command-keys "\\[package-menu-mark-upgrades]"))))) | ||
| 1601 | 1665 | ||
| 1602 | ;;;###autoload | 1666 | ;;;###autoload |
| 1603 | (defalias 'package-list-packages 'list-packages) | 1667 | (defalias 'package-list-packages 'list-packages) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a89dc713dd8..211c4455717 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-09-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-read-group-1): Bump the "Retrieving" | ||
| 4 | message level. | ||
| 5 | |||
| 6 | 2011-09-15 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 7 | |||
| 8 | * message.el (message-read-from-minibuffer): Make abbrev expansion work. | ||
| 9 | |||
| 1 | 2011-09-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | 10 | 2011-09-12 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 11 | ||
| 3 | * gnus.el (gnus-interactive-exit): Update defcustom spec. | 12 | * gnus.el (gnus-interactive-exit): Update defcustom spec. |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 8651b583757..423de352453 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -3961,7 +3961,7 @@ If NO-DISPLAY, don't generate a summary buffer." | |||
| 3961 | ;; (when (and (not (gnus-group-native-p group)) | 3961 | ;; (when (and (not (gnus-group-native-p group)) |
| 3962 | ;; (not (gnus-gethash group gnus-newsrc-hashtb))) | 3962 | ;; (not (gnus-gethash group gnus-newsrc-hashtb))) |
| 3963 | ;; (error "Dead non-native groups can't be entered")) | 3963 | ;; (error "Dead non-native groups can't be entered")) |
| 3964 | (gnus-message 5 "Retrieving newsgroup: %s..." | 3964 | (gnus-message 7 "Retrieving newsgroup: %s..." |
| 3965 | (gnus-group-decoded-name group)) | 3965 | (gnus-group-decoded-name group)) |
| 3966 | (let* ((new-group (gnus-summary-setup-buffer group)) | 3966 | (let* ((new-group (gnus-summary-setup-buffer group)) |
| 3967 | (quit-config (gnus-group-quit-config group)) | 3967 | (quit-config (gnus-group-quit-config group)) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index f78e2b0339d..8dac0fd7afe 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -8068,10 +8068,10 @@ regexp VARSTR." | |||
| 8068 | (defun message-read-from-minibuffer (prompt &optional initial-contents) | 8068 | (defun message-read-from-minibuffer (prompt &optional initial-contents) |
| 8069 | "Read from the minibuffer while providing abbrev expansion." | 8069 | "Read from the minibuffer while providing abbrev expansion." |
| 8070 | (if (fboundp 'mail-abbrevs-setup) | 8070 | (if (fboundp 'mail-abbrevs-setup) |
| 8071 | (let ((mail-abbrev-mode-regexp "") | 8071 | (let ((minibuffer-setup-hook 'mail-abbrevs-setup) |
| 8072 | (minibuffer-setup-hook 'mail-abbrevs-setup) | ||
| 8073 | (minibuffer-local-map message-minibuffer-local-map)) | 8072 | (minibuffer-local-map message-minibuffer-local-map)) |
| 8074 | (read-from-minibuffer prompt initial-contents)) | 8073 | (flet ((mail-abbrev-in-expansion-header-p nil t)) |
| 8074 | (read-from-minibuffer prompt initial-contents))) | ||
| 8075 | (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) | 8075 | (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) |
| 8076 | (minibuffer-local-map message-minibuffer-local-map)) | 8076 | (minibuffer-local-map message-minibuffer-local-map)) |
| 8077 | (read-string prompt initial-contents)))) | 8077 | (read-string prompt initial-contents)))) |
diff --git a/lisp/help.el b/lisp/help.el index ca8f76515cf..0c8d67106d3 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1060,14 +1060,13 @@ window." | |||
| 1060 | (message "%s" | 1060 | (message "%s" |
| 1061 | (substitute-command-keys (concat quit-part scroll-part))))) | 1061 | (substitute-command-keys (concat quit-part scroll-part))))) |
| 1062 | 1062 | ||
| 1063 | (defun help-window-setup () | 1063 | (defun help-window-setup (help-window) |
| 1064 | "Set up help window for `with-help-window'. | 1064 | "Set up help window for `with-help-window'. |
| 1065 | This relies on `display-buffer-window' being correctly set up by | 1065 | HELP-WINDOW is the window used for displaying the help buffer." |
| 1066 | `display-buffer'." | 1066 | (let* ((help-buffer (when (window-live-p help-window) |
| 1067 | (let* ((help-window (car-safe display-buffer-window)) | ||
| 1068 | (help-buffer (when (window-live-p help-window) | ||
| 1069 | (window-buffer help-window))) | 1067 | (window-buffer help-window))) |
| 1070 | (help-value (cdr-safe display-buffer-window))) | 1068 | (help-setup (when (window-live-p help-window) |
| 1069 | (window-parameter help-window 'help-setup)))) | ||
| 1071 | (when help-buffer | 1070 | (when help-buffer |
| 1072 | ;; Handle `help-window-point-marker'. | 1071 | ;; Handle `help-window-point-marker'. |
| 1073 | (when (eq (marker-buffer help-window-point-marker) help-buffer) | 1072 | (when (eq (marker-buffer help-window-point-marker) help-buffer) |
| @@ -1078,6 +1077,7 @@ This relies on `display-buffer-window' being correctly set up by | |||
| 1078 | (cond | 1077 | (cond |
| 1079 | ((or (eq help-window (selected-window)) | 1078 | ((or (eq help-window (selected-window)) |
| 1080 | (and (or (eq help-window-select t) | 1079 | (and (or (eq help-window-select t) |
| 1080 | (eq help-setup 'new-frame) | ||
| 1081 | (and (eq help-window-select 'other) | 1081 | (and (eq help-window-select 'other) |
| 1082 | (eq (window-frame help-window) (selected-frame)) | 1082 | (eq (window-frame help-window) (selected-frame)) |
| 1083 | (> (length (window-list nil 'no-mini)) 2))) | 1083 | (> (length (window-list nil 'no-mini)) 2))) |
| @@ -1085,13 +1085,12 @@ This relies on `display-buffer-window' being correctly set up by | |||
| 1085 | ;; The help window is or gets selected ... | 1085 | ;; The help window is or gets selected ... |
| 1086 | (help-window-display-message | 1086 | (help-window-display-message |
| 1087 | (cond | 1087 | (cond |
| 1088 | ((eq help-value 'new-window) | 1088 | ((eq help-setup 'new-window) |
| 1089 | ;; ... and is new, ... | 1089 | ;; ... and is new, ... |
| 1090 | "Type \"q\" to delete this window") | 1090 | "Type \"q\" to delete help window") |
| 1091 | ((eq help-value 'new-frame) | 1091 | ((eq help-setup 'new-frame) |
| 1092 | ;; ... is on a new frame ... | 1092 | "Type \"q\" to delete help frame") |
| 1093 | "Type \"q\" to delete this frame") | 1093 | ((eq help-setup 'reuse-other) |
| 1094 | ((eq help-value 'reuse-other-window) | ||
| 1095 | ;; ... or displayed some other buffer before. | 1094 | ;; ... or displayed some other buffer before. |
| 1096 | "Type \"q\" to restore previous buffer")) | 1095 | "Type \"q\" to restore previous buffer")) |
| 1097 | help-window t)) | 1096 | help-window t)) |
| @@ -1101,15 +1100,22 @@ This relies on `display-buffer-window' being correctly set up by | |||
| 1101 | ;; other one is the selected one. | 1100 | ;; other one is the selected one. |
| 1102 | (help-window-display-message | 1101 | (help-window-display-message |
| 1103 | (cond | 1102 | (cond |
| 1104 | ((eq help-value 'new-window) | 1103 | ((eq help-setup 'new-window) |
| 1105 | "Type \\[delete-other-windows] to delete the help window") | 1104 | "Type \\[delete-other-windows] to delete the help window") |
| 1106 | ((eq help-value 'reuse-other-window) | 1105 | ((eq help-setup 'reuse-other) |
| 1107 | "Type \"q\" in other window to quit")) | 1106 | "Type \"q\" in help window to restore its previous buffer")) |
| 1108 | help-window 'other)) | 1107 | help-window 'other)) |
| 1109 | (t | 1108 | (t |
| 1110 | ;; Not much to say here. | 1109 | ;; The help window is not selected ... |
| 1111 | (help-window-display-message | 1110 | (help-window-display-message |
| 1112 | "Type \"q\" in help window to quit" help-window)))))) | 1111 | (cond |
| 1112 | ((eq help-setup 'new-window) | ||
| 1113 | ;; ... and is new, ... | ||
| 1114 | "Type \"q\" in help window to delete it") | ||
| 1115 | ((eq help-setup 'reuse-other) | ||
| 1116 | ;; ... or displayed some other buffer before. | ||
| 1117 | "Type \"q\" in help window to restore previous buffer")) | ||
| 1118 | help-window)))))) | ||
| 1113 | 1119 | ||
| 1114 | ;; `with-help-window' is a wrapper for `with-output-to-temp-buffer' | 1120 | ;; `with-help-window' is a wrapper for `with-output-to-temp-buffer' |
| 1115 | ;; providing the following additional twists: | 1121 | ;; providing the following additional twists: |
| @@ -1134,18 +1140,18 @@ You can specify where and how to show the buffer by binding the | |||
| 1134 | variable `temp-buffer-show-specifiers' to an appropriate value." | 1140 | variable `temp-buffer-show-specifiers' to an appropriate value." |
| 1135 | (declare (indent 1) (debug t)) | 1141 | (declare (indent 1) (debug t)) |
| 1136 | `(progn | 1142 | `(progn |
| 1137 | ;; Reset `display-buffer-window': `display-buffer' is | ||
| 1138 | ;; supposed to set this to the window displaying the buffer plus | ||
| 1139 | ;; some additional information. | ||
| 1140 | (setq display-buffer-window nil) | ||
| 1141 | ;; Make `help-window-point-marker' point nowhere. The only place | 1143 | ;; Make `help-window-point-marker' point nowhere. The only place |
| 1142 | ;; where this should be set to a buffer position is within BODY. | 1144 | ;; where this should be set to a buffer position is within BODY. |
| 1143 | (set-marker help-window-point-marker nil) | 1145 | (set-marker help-window-point-marker nil) |
| 1144 | (prog1 | 1146 | (let* (help-window |
| 1145 | ;; Return value returned by `with-output-to-temp-buffer'. | 1147 | (temp-buffer-show-hook |
| 1146 | (with-output-to-temp-buffer ,buffer-name | 1148 | (cons (lambda () (setq help-window (selected-window))) |
| 1147 | (progn ,@body)) | 1149 | temp-buffer-show-hook))) |
| 1148 | (when display-buffer-window (help-window-setup))))) | 1150 | ;; Return value returned by `with-output-to-temp-buffer'. |
| 1151 | (prog1 | ||
| 1152 | (with-output-to-temp-buffer ,buffer-name | ||
| 1153 | (progn ,@body)) | ||
| 1154 | (help-window-setup help-window))))) | ||
| 1149 | 1155 | ||
| 1150 | ;; Called from C, on encountering `help-char' when reading a char. | 1156 | ;; Called from C, on encountering `help-char' when reading a char. |
| 1151 | ;; Don't print to *Help*; that would clobber Help history. | 1157 | ;; Don't print to *Help*; that would clobber Help history. |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 00ed9b4aed2..e07f1429119 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1063,21 +1063,24 @@ nonincremental search instead via `isearch-edit-string'." | |||
| 1063 | 1063 | ||
| 1064 | (defvar minibuffer-history-symbol) ;; from external package gmhist.el | 1064 | (defvar minibuffer-history-symbol) ;; from external package gmhist.el |
| 1065 | 1065 | ||
| 1066 | (defun isearch-fail-pos () | 1066 | (defun isearch-fail-pos (&optional msg) |
| 1067 | "Position of first mismatch in search string, or its length if none." | 1067 | "Return position of first mismatch in search string, or nil if none. |
| 1068 | (let ((cmds isearch-cmds)) | 1068 | If MSG is non-nil, use `isearch-message', otherwise `isearch-string'." |
| 1069 | (if (and isearch-success (not isearch-error)) | 1069 | (let ((cmds isearch-cmds) |
| 1070 | (length isearch-message) | 1070 | (curr-msg (if msg isearch-message isearch-string)) |
| 1071 | succ-msg) | ||
| 1072 | (when (or (not isearch-success) isearch-error) | ||
| 1071 | (while (or (not (isearch-success-state (car cmds))) | 1073 | (while (or (not (isearch-success-state (car cmds))) |
| 1072 | (isearch-error-state (car cmds))) | 1074 | (isearch-error-state (car cmds))) |
| 1073 | (pop cmds)) | 1075 | (pop cmds)) |
| 1074 | (let ((succ-msg (and cmds (isearch-message-state (car cmds))))) | 1076 | (setq succ-msg (and cmds (if msg (isearch-message-state (car cmds)) |
| 1075 | (if (and (stringp succ-msg) | 1077 | (isearch-string-state (car cmds))))) |
| 1076 | (< (length succ-msg) (length isearch-message)) | 1078 | (if (and (stringp succ-msg) |
| 1077 | (equal succ-msg | 1079 | (< (length succ-msg) (length curr-msg)) |
| 1078 | (substring isearch-message 0 (length succ-msg)))) | 1080 | (equal succ-msg |
| 1079 | (length succ-msg) | 1081 | (substring curr-msg 0 (length succ-msg)))) |
| 1080 | 0))))) | 1082 | (length succ-msg) |
| 1083 | 0)))) | ||
| 1081 | 1084 | ||
| 1082 | (defun isearch-edit-string () | 1085 | (defun isearch-edit-string () |
| 1083 | "Edit the search string in the minibuffer. | 1086 | "Edit the search string in the minibuffer. |
| @@ -1169,7 +1172,8 @@ The following additional command keys are active while editing. | |||
| 1169 | (setq isearch-new-string | 1172 | (setq isearch-new-string |
| 1170 | (read-from-minibuffer | 1173 | (read-from-minibuffer |
| 1171 | (isearch-message-prefix nil nil isearch-nonincremental) | 1174 | (isearch-message-prefix nil nil isearch-nonincremental) |
| 1172 | (cons isearch-string (1+ (isearch-fail-pos))) | 1175 | (cons isearch-string (1+ (or (isearch-fail-pos) |
| 1176 | (length isearch-string)))) | ||
| 1173 | minibuffer-local-isearch-map nil | 1177 | minibuffer-local-isearch-map nil |
| 1174 | (if isearch-regexp | 1178 | (if isearch-regexp |
| 1175 | (cons 'regexp-search-ring | 1179 | (cons 'regexp-search-ring |
| @@ -2174,22 +2178,11 @@ If there is no completion possible, say so and continue searching." | |||
| 2174 | ;; Generate and print the message string. | 2178 | ;; Generate and print the message string. |
| 2175 | (let ((cursor-in-echo-area ellipsis) | 2179 | (let ((cursor-in-echo-area ellipsis) |
| 2176 | (m isearch-message) | 2180 | (m isearch-message) |
| 2177 | (cmds isearch-cmds) | 2181 | (fail-pos (isearch-fail-pos t))) |
| 2178 | succ-msg) | 2182 | ;; Highlight failed part |
| 2179 | (when (or (not isearch-success) isearch-error) | 2183 | (when fail-pos |
| 2180 | ;; Highlight failed part | 2184 | (setq m (copy-sequence m)) |
| 2181 | (while (or (not (isearch-success-state (car cmds))) | 2185 | (add-text-properties fail-pos (length m) '(face isearch-fail) m) |
| 2182 | (isearch-error-state (car cmds))) | ||
| 2183 | (pop cmds)) | ||
| 2184 | (setq succ-msg (and cmds (isearch-message-state (car cmds))) | ||
| 2185 | m (copy-sequence m)) | ||
| 2186 | (add-text-properties | ||
| 2187 | (if (and (stringp succ-msg) | ||
| 2188 | (< (length succ-msg) (length m)) | ||
| 2189 | (equal succ-msg (substring m 0 (length succ-msg)))) | ||
| 2190 | (length succ-msg) | ||
| 2191 | 0) | ||
| 2192 | (length m) '(face isearch-fail) m) | ||
| 2193 | ;; Highlight failed trailing whitespace | 2186 | ;; Highlight failed trailing whitespace |
| 2194 | (when (string-match " +$" m) | 2187 | (when (string-match " +$" m) |
| 2195 | (add-text-properties (match-beginning 0) (match-end 0) | 2188 | (add-text-properties (match-beginning 0) (match-end 0) |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 544570a1bc3..9fe19581e81 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -835,7 +835,8 @@ The list is in preference order.") | |||
| 835 | (defun smtpmail-process-filter (process output) | 835 | (defun smtpmail-process-filter (process output) |
| 836 | (with-current-buffer (process-buffer process) | 836 | (with-current-buffer (process-buffer process) |
| 837 | (goto-char (point-max)) | 837 | (goto-char (point-max)) |
| 838 | (insert output))) | 838 | (insert output) |
| 839 | (set-marker (process-mark process) (point)))) | ||
| 839 | 840 | ||
| 840 | (defun smtpmail-read-response (process) | 841 | (defun smtpmail-read-response (process) |
| 841 | (let ((case-fold-search nil) | 842 | (let ((case-fold-search nil) |
| @@ -891,8 +892,8 @@ The list is in preference order.") | |||
| 891 | 892 | ||
| 892 | (defun smtpmail-send-command (process command) | 893 | (defun smtpmail-send-command (process command) |
| 893 | (goto-char (point-max)) | 894 | (goto-char (point-max)) |
| 894 | (if (= (aref command 0) ?P) | 895 | (if (string-match "\\`AUTH [A-Z]+ " command) |
| 895 | (insert "PASS <omitted>\r\n") | 896 | (insert (match-string 0 command) "<omitted>\r\n") |
| 896 | (insert command "\r\n")) | 897 | (insert command "\r\n")) |
| 897 | (setq smtpmail-read-point (point)) | 898 | (setq smtpmail-read-point (point)) |
| 898 | (process-send-string process command) | 899 | (process-send-string process command) |
diff --git a/lisp/mpc.el b/lisp/mpc.el index 932fb5926fd..8854d4e908f 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -1349,6 +1349,16 @@ when constructing the set of constraints." | |||
| 1349 | (push (cons tag select) constraints))) | 1349 | (push (cons tag select) constraints))) |
| 1350 | constraints)) | 1350 | constraints)) |
| 1351 | 1351 | ||
| 1352 | (defun mpc-constraints-tag-lookup (buffer-tag constraints) | ||
| 1353 | (let (res) | ||
| 1354 | (dolist (constraint constraints) | ||
| 1355 | (when (or (eq (car constraint) buffer-tag) | ||
| 1356 | (and (string-match "|" (symbol-name buffer-tag)) | ||
| 1357 | (member (symbol-name (car constraint)) | ||
| 1358 | (split-string (symbol-name buffer-tag) "|")))) | ||
| 1359 | (setq res (cdr constraint)))) | ||
| 1360 | res)) | ||
| 1361 | |||
| 1352 | (defun mpc-constraints-restore (constraints) | 1362 | (defun mpc-constraints-restore (constraints) |
| 1353 | (let ((search (assq 'Search constraints))) | 1363 | (let ((search (assq 'Search constraints))) |
| 1354 | (setq mpc--song-search (cadr search)) | 1364 | (setq mpc--song-search (cadr search)) |
| @@ -1357,10 +1367,10 @@ when constructing the set of constraints." | |||
| 1357 | (setq buf (cdr buf)) | 1367 | (setq buf (cdr buf)) |
| 1358 | (when (buffer-live-p buf) | 1368 | (when (buffer-live-p buf) |
| 1359 | (let* ((tag (buffer-local-value 'mpc-tag buf)) | 1369 | (let* ((tag (buffer-local-value 'mpc-tag buf)) |
| 1360 | (constraint (assq tag constraints))) | 1370 | (constraint (mpc-constraints-tag-lookup tag constraints))) |
| 1361 | (when tag | 1371 | (when tag |
| 1362 | (with-current-buffer buf | 1372 | (with-current-buffer buf |
| 1363 | (mpc-select-restore (cdr constraint))))))) | 1373 | (mpc-select-restore constraint)))))) |
| 1364 | (mpc-selection-refresh)) | 1374 | (mpc-selection-refresh)) |
| 1365 | 1375 | ||
| 1366 | ;; I don't get the ring.el code. I think it doesn't do what I need, but | 1376 | ;; I don't get the ring.el code. I think it doesn't do what I need, but |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index a1d77ccc6e0..8c0d7b25939 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -987,8 +987,8 @@ indentation to be kept as it was before narrowing." | |||
| 987 | (setq ,bindent (- ,bindent n))))))))))) | 987 | (setq ,bindent (- ,bindent n))))))))))) |
| 988 | 988 | ||
| 989 | (defun comment-add (arg) | 989 | (defun comment-add (arg) |
| 990 | "Compute the number of extra comment starter characters | 990 | "Compute the number of extra comment starter characters. |
| 991 | \(extra semicolons in Lisp mode, extra stars in C mode, etc.) | 991 | \(Extra semicolons in Lisp mode, extra stars in C mode, etc.) |
| 992 | If ARG is non-nil, just follow ARG. | 992 | If ARG is non-nil, just follow ARG. |
| 993 | If the comment starter is multi-char, just follow ARG. | 993 | If the comment starter is multi-char, just follow ARG. |
| 994 | Otherwise obey `comment-add'." | 994 | Otherwise obey `comment-add'." |
| @@ -1243,7 +1243,7 @@ This has no effect in modes that do not define a comment syntax." | |||
| 1243 | :group 'comment) | 1243 | :group 'comment) |
| 1244 | 1244 | ||
| 1245 | (defun comment-valid-prefix-p (prefix compos) | 1245 | (defun comment-valid-prefix-p (prefix compos) |
| 1246 | "Check that the adaptive-fill-prefix is consistent with the context. | 1246 | "Check that the adaptive fill prefix is consistent with the context. |
| 1247 | PREFIX is the prefix (presumably guessed by `adaptive-fill-mode'). | 1247 | PREFIX is the prefix (presumably guessed by `adaptive-fill-mode'). |
| 1248 | COMPOS is the position of the beginning of the comment we're in, or nil | 1248 | COMPOS is the position of the beginning of the comment we're in, or nil |
| 1249 | if we're not inside a comment." | 1249 | if we're not inside a comment." |
diff --git a/lisp/replace.el b/lisp/replace.el index ee430fd9855..70175cf205c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -940,7 +940,7 @@ To return to ordinary Occur mode, use \\[occur-mode]." | |||
| 940 | (save-excursion | 940 | (save-excursion |
| 941 | (goto-char (posn-point (event-end event))) | 941 | (goto-char (posn-point (event-end event))) |
| 942 | (occur-mode-find-occurrence)))))) | 942 | (occur-mode-find-occurrence)))))) |
| 943 | (pop-to-buffer (marker-buffer pos) t) | 943 | (pop-to-buffer (marker-buffer pos)) |
| 944 | (goto-char pos) | 944 | (goto-char pos) |
| 945 | (run-hooks 'occur-mode-find-occurrence-hook))) | 945 | (run-hooks 'occur-mode-find-occurrence-hook))) |
| 946 | 946 | ||
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 3efb2f158c0..741b6cd904c 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -3068,24 +3068,28 @@ When called interactively, FORCE is t, CURRENT is t if current buffer uses | |||
| 3068 | (message "No BibTeX buffers defined"))) | 3068 | (message "No BibTeX buffers defined"))) |
| 3069 | buffer-list)) | 3069 | buffer-list)) |
| 3070 | 3070 | ||
| 3071 | (defun bibtex-complete-string-cleanup (str compl) | 3071 | (defun bibtex-complete-string-cleanup (compl) (lambda (str status) ;Curried. |
| 3072 | "Cleanup after inserting string STR. | 3072 | "Cleanup after inserting string STR. |
| 3073 | Remove enclosing field delimiters for STR. Display message with | 3073 | Remove enclosing field delimiters for STR. Display message with |
| 3074 | expansion of STR using expansion list COMPL." | 3074 | expansion of STR using expansion list COMPL." |
| 3075 | ;; point is at position inside field where completion was requested | 3075 | (when (memq status '(exact finished sole)) |
| 3076 | (save-excursion | 3076 | (let ((abbr (cdr (assoc-string str compl t)))) |
| 3077 | (let ((abbr (cdr (if (stringp str) | 3077 | (when abbr |
| 3078 | (assoc-string str compl t))))) | 3078 | (message "%s = abbreviation for `%s'" str abbr))) |
| 3079 | (if abbr (message "Abbreviation for `%s'" abbr)) | 3079 | (when (eq status 'finished) |
| 3080 | (bibtex-remove-delimiters)))) | 3080 | (save-excursion (bibtex-remove-delimiters)))))) |
| 3081 | 3081 | ||
| 3082 | (defun bibtex-complete-crossref-cleanup (key) | 3082 | (defun bibtex-complete-crossref-cleanup (buf) (lambda (key status) ;Curried. |
| 3083 | "Display summary message on entry KEY after completion of a crossref key. | 3083 | "Display summary message on entry KEY after completion of a crossref key. |
| 3084 | Use `bibtex-summary-function' to generate summary." | 3084 | Use `bibtex-summary-function' to generate summary." |
| 3085 | (save-excursion | 3085 | (when (memq status '(exact sole finished)) |
| 3086 | (if (and (stringp key) | 3086 | (let ((summary |
| 3087 | (bibtex-search-entry key t)) | 3087 | (with-current-buffer buf |
| 3088 | (message "Ref: %s" (funcall bibtex-summary-function))))) | 3088 | (save-excursion |
| 3089 | (if (bibtex-search-entry key t) | ||
| 3090 | (funcall bibtex-summary-function)))))) | ||
| 3091 | (when summary | ||
| 3092 | (message "%s %s" key summary)))))) | ||
| 3089 | 3093 | ||
| 3090 | (defun bibtex-copy-summary-as-kill (&optional arg) | 3094 | (defun bibtex-copy-summary-as-kill (&optional arg) |
| 3091 | "Push summery of current BibTeX entry to kill ring. | 3095 | "Push summery of current BibTeX entry to kill ring. |
| @@ -4985,16 +4989,7 @@ entries from minibuffer." | |||
| 4985 | (t (let ((completion-ignore-case nil)) | 4989 | (t (let ((completion-ignore-case nil)) |
| 4986 | (complete-with-action | 4990 | (complete-with-action |
| 4987 | a (bibtex-global-key-alist) s p))))) | 4991 | a (bibtex-global-key-alist) s p))))) |
| 4988 | :exit-function | 4992 | :exit-function (bibtex-complete-crossref-cleanup buf)))) |
| 4989 | (lambda (string status) | ||
| 4990 | (when (memq status '(exact sole finished)) | ||
| 4991 | (let ((summary | ||
| 4992 | (with-current-buffer buf | ||
| 4993 | (save-excursion | ||
| 4994 | (if (bibtex-search-entry string) | ||
| 4995 | (funcall bibtex-summary-function)))))) | ||
| 4996 | (when summary | ||
| 4997 | (message "%s %s" string summary)))))))) | ||
| 4998 | 4993 | ||
| 4999 | ((eq compl 'string) | 4994 | ((eq compl 'string) |
| 5000 | ;; String key completion: no cleanup needed. | 4995 | ;; String key completion: no cleanup needed. |
| @@ -5011,14 +5006,7 @@ entries from minibuffer." | |||
| 5011 | ((eq a 'metadata) `(metadata (category . bibtex-string))) | 5006 | ((eq a 'metadata) `(metadata (category . bibtex-string))) |
| 5012 | (t (let ((completion-ignore-case t)) | 5007 | (t (let ((completion-ignore-case t)) |
| 5013 | (complete-with-action a compl s p))))) | 5008 | (complete-with-action a compl s p))))) |
| 5014 | :exit-function | 5009 | :exit-function (bibtex-complete-string-cleanup compl)))))) |
| 5015 | (lambda (string status) | ||
| 5016 | (when (memq status '(exact finished sole)) | ||
| 5017 | (let ((abbr (cdr (assoc-string string compl t)))) | ||
| 5018 | (when abbr | ||
| 5019 | (message "%s = abbreviation for `%s'" string abbr)))) | ||
| 5020 | (when (eq status 'finished) | ||
| 5021 | (save-excursion (bibtex-remove-delimiters))))))))) | ||
| 5022 | 5010 | ||
| 5023 | (defun bibtex-String (&optional key) | 5011 | (defun bibtex-String (&optional key) |
| 5024 | "Insert a new BibTeX @String entry with key KEY." | 5012 | "Insert a new BibTeX @String entry with key KEY." |
diff --git a/lisp/window.el b/lisp/window.el index 3a229a4e447..24d95f367e4 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -3785,17 +3785,6 @@ subwindows can get as small as `window-safe-min-height' and | |||
| 3785 | (window-state-put-2 ignore)) | 3785 | (window-state-put-2 ignore)) |
| 3786 | (window-check frame)))) | 3786 | (window-check frame)))) |
| 3787 | 3787 | ||
| 3788 | (defvar display-buffer-window nil | ||
| 3789 | "Window used by `display-buffer' and related information. | ||
| 3790 | After `display-buffer' displays a buffer in some window this | ||
| 3791 | variable is a cons cell whose car denotes the window used to | ||
| 3792 | display the buffer. The cdr is supposed to be one of the symbols | ||
| 3793 | `reuse-buffer-window', `reuse-other-window', `new-window' or | ||
| 3794 | `new-frame'. | ||
| 3795 | |||
| 3796 | See the function `display-buffer-record-window' for how this | ||
| 3797 | variable can be assigned a value.") | ||
| 3798 | |||
| 3799 | (defun display-buffer-record-window (type window buffer) | 3788 | (defun display-buffer-record-window (type window buffer) |
| 3800 | "Record information for window used by `display-buffer'. | 3789 | "Record information for window used by `display-buffer'. |
| 3801 | TYPE must be one of the symbols reuse-window, pop-up-window, or | 3790 | TYPE must be one of the symbols reuse-window, pop-up-window, or |
| @@ -3804,15 +3793,13 @@ pop-up-frame. WINDOW is the window used for or created by the | |||
| 3804 | displayed." | 3793 | displayed." |
| 3805 | (cond | 3794 | (cond |
| 3806 | ((eq type 'reuse-window) | 3795 | ((eq type 'reuse-window) |
| 3807 | ;; In `display-buffer-window' record whether we used a window on the | 3796 | ;; In `help-setup' window parameter record whether we used a window |
| 3808 | ;; same buffer or another one. | 3797 | ;; on the same buffer or another one. |
| 3809 | (if (eq (window-buffer window) buffer) | 3798 | (set-window-parameter |
| 3810 | (setq display-buffer-window | 3799 | window 'help-setup |
| 3811 | (cons window 'reuse-buffer-window)) | 3800 | (if (eq (window-buffer window) buffer) 'reuse-same 'reuse-other)) |
| 3812 | (setq display-buffer-window | 3801 | ;; In `quit-restore' parameter record information about the old |
| 3813 | (cons window 'reuse-other-window))) | 3802 | ;; buffer unless such information exists already. |
| 3814 | ;; In quit-restore parameter record information about the old buffer | ||
| 3815 | ;; unless such information exists already. | ||
| 3816 | (unless (window-parameter window 'quit-restore) | 3803 | (unless (window-parameter window 'quit-restore) |
| 3817 | (set-window-parameter | 3804 | (set-window-parameter |
| 3818 | window 'quit-restore | 3805 | window 'quit-restore |
| @@ -3820,15 +3807,15 @@ displayed." | |||
| 3820 | (window-point window) buffer | 3807 | (window-point window) buffer |
| 3821 | (window-total-size window) (selected-window))))) | 3808 | (window-total-size window) (selected-window))))) |
| 3822 | ((eq type 'pop-up-window) | 3809 | ((eq type 'pop-up-window) |
| 3823 | ;; In `display-buffer-window' record window as new. | 3810 | ;; In `help-setup' window parameter record window as new. |
| 3824 | (setq display-buffer-window (cons window 'new-window)) | 3811 | (set-window-parameter window 'help-setup 'new-window) |
| 3825 | ;; In `quit-restore' parameter record that we popped up this window, | 3812 | ;; In `quit-restore' parameter record that we popped up this window, |
| 3826 | ;; its buffer, and which window was selected before. | 3813 | ;; its buffer, and which window was selected before. |
| 3827 | (set-window-parameter | 3814 | (set-window-parameter |
| 3828 | window 'quit-restore (list 'new-window buffer (selected-window)))) | 3815 | window 'quit-restore (list 'new-window buffer (selected-window)))) |
| 3829 | ((eq type 'pop-up-frame) | 3816 | ((eq type 'pop-up-frame) |
| 3830 | ;; In `display-buffer-window' record window as on new frame. | 3817 | ;; In `help-setup' window parameter record window as on new frame. |
| 3831 | (setq display-buffer-window (cons window 'new-frame)) | 3818 | (set-window-parameter window 'help-setup 'new-frame) |
| 3832 | ;; In `quit-restore' parameter record that we popped up this window | 3819 | ;; In `quit-restore' parameter record that we popped up this window |
| 3833 | ;; on a new frame, the buffer, and which window was selected before. | 3820 | ;; on a new frame, the buffer, and which window was selected before. |
| 3834 | (set-window-parameter | 3821 | (set-window-parameter |
| @@ -3841,9 +3828,8 @@ means that the currently selected window is not acceptable. It | |||
| 3841 | should choose or create a window, display the specified buffer in | 3828 | should choose or create a window, display the specified buffer in |
| 3842 | it, and return the window. | 3829 | it, and return the window. |
| 3843 | 3830 | ||
| 3844 | The function specified here is responsible for setting the value | 3831 | The function specified here is responsible for setting the |
| 3845 | of `display-buffer-window' and the quit-restore parameter of the | 3832 | quit-restore and help-setup parameters of the window used." |
| 3846 | window used." | ||
| 3847 | :type '(choice | 3833 | :type '(choice |
| 3848 | (const nil) | 3834 | (const nil) |
| 3849 | (function :tag "function")) | 3835 | (function :tag "function")) |
| @@ -3913,8 +3899,8 @@ second. If `special-display-function' specifies some other | |||
| 3913 | function, that function is called with the buffer named | 3899 | function, that function is called with the buffer named |
| 3914 | BUFFER-NAME as first, and the element's cdr as second argument. | 3900 | BUFFER-NAME as first, and the element's cdr as second argument. |
| 3915 | In any case, that function is responsible for setting the value | 3901 | In any case, that function is responsible for setting the value |
| 3916 | of `display-buffer-window' and the quit-restore parameter of the | 3902 | The function specified here is responsible for setting the |
| 3917 | window used. | 3903 | quit-restore and help-setup parameters of the window used. |
| 3918 | 3904 | ||
| 3919 | If this variable appears \"not to work\", because you added a | 3905 | If this variable appears \"not to work\", because you added a |
| 3920 | name to it but the corresponding buffer is displayed in the | 3906 | name to it but the corresponding buffer is displayed in the |
| @@ -4115,9 +4101,8 @@ A buffer is special when its name is either listed in | |||
| 4115 | `special-display-buffer-names' or matches a regexp in | 4101 | `special-display-buffer-names' or matches a regexp in |
| 4116 | `special-display-regexps'. | 4102 | `special-display-regexps'. |
| 4117 | 4103 | ||
| 4118 | The function specified here is responsible for setting the value | 4104 | The function specified here is responsible for setting the |
| 4119 | of `display-buffer-window' and the quit-restore parameter of the | 4105 | quit-restore and help-setup parameters of the window used." |
| 4120 | window used." | ||
| 4121 | :type 'function | 4106 | :type 'function |
| 4122 | :group 'frames) | 4107 | :group 'frames) |
| 4123 | 4108 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 9f8361153a1..3dbddc9b215 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2011-09-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Remove unused external symbols. | ||
| 4 | * dispextern.h (calc_pixel_width_or_height): Remove decl. | ||
| 5 | * xdisp.c (calc_pixel_width_or_height): Now static. | ||
| 6 | * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove. | ||
| 7 | * indent.c (check_display_width): | ||
| 8 | * w32term.c: Fix comment to match code. | ||
| 9 | * xterm.c, xterm.h (x_catching_errors): Remove. | ||
| 10 | |||
| 11 | 2011-09-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 12 | |||
| 13 | * xselect.c: Use signed conversions more consistently (Bug#9498). | ||
| 14 | (selection_data_to_lisp_data): Assume incoming selection data are | ||
| 15 | signed integers, not unsigned. This is to be consistent with | ||
| 16 | outgoing selection data, which was modified to use signed integers | ||
| 17 | in as part of the fix to Bug#9196 in response to Jan D.'s comment | ||
| 18 | in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11 | ||
| 19 | expects long, not unsigned long. | ||
| 20 | |||
| 1 | 2011-09-14 Eli Zaretskii <eliz@gnu.org> | 21 | 2011-09-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 22 | ||
| 3 | * xdisp.c (try_window_reusing_current_matrix): Fix incorrect | 23 | * xdisp.c (try_window_reusing_current_matrix): Fix incorrect |
diff --git a/src/dispextern.h b/src/dispextern.h index bc75dc5d2e6..8a1d8e7948e 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3064,8 +3064,6 @@ extern struct frame *last_mouse_frame; | |||
| 3064 | extern int last_tool_bar_item; | 3064 | extern int last_tool_bar_item; |
| 3065 | extern void reseat_at_previous_visible_line_start (struct it *); | 3065 | extern void reseat_at_previous_visible_line_start (struct it *); |
| 3066 | extern Lisp_Object lookup_glyphless_char_display (int, struct it *); | 3066 | extern Lisp_Object lookup_glyphless_char_display (int, struct it *); |
| 3067 | extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, | ||
| 3068 | struct font *, int, int *); | ||
| 3069 | extern EMACS_INT compute_display_string_pos (struct text_pos *, | 3067 | extern EMACS_INT compute_display_string_pos (struct text_pos *, |
| 3070 | struct bidi_string_data *, | 3068 | struct bidi_string_data *, |
| 3071 | int, int *); | 3069 | int, int *); |
diff --git a/src/doprnt.c b/src/doprnt.c index 8db7c0f2ada..b4d13c59137 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -486,6 +486,8 @@ esprintf (char *buf, char const *format, ...) | |||
| 486 | return nbytes; | 486 | return nbytes; |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | #if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT | ||
| 490 | |||
| 489 | /* Format to buffer *BUF of positive size *BUFSIZE, reallocating *BUF | 491 | /* Format to buffer *BUF of positive size *BUFSIZE, reallocating *BUF |
| 490 | and updating *BUFSIZE if the buffer is too small, and otherwise | 492 | and updating *BUFSIZE if the buffer is too small, and otherwise |
| 491 | behaving line esprintf. When reallocating, free *BUF unless it is | 493 | behaving line esprintf. When reallocating, free *BUF unless it is |
| @@ -505,6 +507,8 @@ exprintf (char **buf, ptrdiff_t *bufsize, | |||
| 505 | return nbytes; | 507 | return nbytes; |
| 506 | } | 508 | } |
| 507 | 509 | ||
| 510 | #endif | ||
| 511 | |||
| 508 | /* Act like exprintf, except take a va_list. */ | 512 | /* Act like exprintf, except take a va_list. */ |
| 509 | ptrdiff_t | 513 | ptrdiff_t |
| 510 | evxprintf (char **buf, ptrdiff_t *bufsize, | 514 | evxprintf (char **buf, ptrdiff_t *bufsize, |
diff --git a/src/indent.c b/src/indent.c index bae9ab1b46d..e00d2152577 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -471,7 +471,7 @@ check_display_width (EMACS_INT pos, EMACS_INT col, EMACS_INT *endpos) | |||
| 471 | if (CONSP (val = get_char_property_and_overlay | 471 | if (CONSP (val = get_char_property_and_overlay |
| 472 | (make_number (pos), Qdisplay, Qnil, &overlay)) | 472 | (make_number (pos), Qdisplay, Qnil, &overlay)) |
| 473 | && EQ (Qspace, XCAR (val))) | 473 | && EQ (Qspace, XCAR (val))) |
| 474 | { /* FIXME: Use calc_pixel_width_or_height, as in term.c. */ | 474 | { /* FIXME: Use calc_pixel_width_or_height. */ |
| 475 | Lisp_Object plist = XCDR (val), prop; | 475 | Lisp_Object plist = XCDR (val), prop; |
| 476 | int width = -1; | 476 | int width = -1; |
| 477 | 477 | ||
diff --git a/src/w32term.c b/src/w32term.c index 98c4a391953..8d9d8f72029 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5197,7 +5197,6 @@ x_catch_errors (dpy) | |||
| 5197 | x_catch_errors_unwind (old_val) | 5197 | x_catch_errors_unwind (old_val) |
| 5198 | x_check_errors (dpy, format) | 5198 | x_check_errors (dpy, format) |
| 5199 | x_fully_uncatch_errors () | 5199 | x_fully_uncatch_errors () |
| 5200 | x_catching_errors () | ||
| 5201 | x_had_errors_p (dpy) | 5200 | x_had_errors_p (dpy) |
| 5202 | x_clear_errors (dpy) | 5201 | x_clear_errors (dpy) |
| 5203 | x_uncatch_errors (dpy, count) | 5202 | x_uncatch_errors (dpy, count) |
diff --git a/src/xdisp.c b/src/xdisp.c index 241571cd9df..32007f52f4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21398,7 +21398,7 @@ else if the text is replaced by an ellipsis. */) | |||
| 21398 | ? XFLOATINT (X) \ | 21398 | ? XFLOATINT (X) \ |
| 21399 | : - 1) | 21399 | : - 1) |
| 21400 | 21400 | ||
| 21401 | int | 21401 | static int |
| 21402 | calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, | 21402 | calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, |
| 21403 | struct font *font, int width_p, int *align_to) | 21403 | struct font *font, int width_p, int *align_to) |
| 21404 | { | 21404 | { |
diff --git a/src/xselect.c b/src/xselect.c index 241622e81b3..29e8552bb9c 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1685,9 +1685,9 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, | |||
| 1685 | convert it to a cons of integers, 16 bits in each half. | 1685 | convert it to a cons of integers, 16 bits in each half. |
| 1686 | */ | 1686 | */ |
| 1687 | else if (format == 32 && size == sizeof (int)) | 1687 | else if (format == 32 && size == sizeof (int)) |
| 1688 | return INTEGER_TO_CONS (((unsigned int *) data) [0]); | 1688 | return INTEGER_TO_CONS (((int *) data) [0]); |
| 1689 | else if (format == 16 && size == sizeof (short)) | 1689 | else if (format == 16 && size == sizeof (short)) |
| 1690 | return make_number (((unsigned short *) data) [0]); | 1690 | return make_number (((short *) data) [0]); |
| 1691 | 1691 | ||
| 1692 | /* Convert any other kind of data to a vector of numbers, represented | 1692 | /* Convert any other kind of data to a vector of numbers, represented |
| 1693 | as above (as an integer, or a cons of two 16 bit integers.) | 1693 | as above (as an integer, or a cons of two 16 bit integers.) |
| @@ -1699,7 +1699,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, | |||
| 1699 | v = Fmake_vector (make_number (size / 2), make_number (0)); | 1699 | v = Fmake_vector (make_number (size / 2), make_number (0)); |
| 1700 | for (i = 0; i < size / 2; i++) | 1700 | for (i = 0; i < size / 2; i++) |
| 1701 | { | 1701 | { |
| 1702 | EMACS_INT j = ((unsigned short *) data) [i]; | 1702 | EMACS_INT j = ((short *) data) [i]; |
| 1703 | Faset (v, make_number (i), make_number (j)); | 1703 | Faset (v, make_number (i), make_number (j)); |
| 1704 | } | 1704 | } |
| 1705 | return v; | 1705 | return v; |
| @@ -1711,7 +1711,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, | |||
| 1711 | make_number (0)); | 1711 | make_number (0)); |
| 1712 | for (i = 0; i < size / X_LONG_SIZE; i++) | 1712 | for (i = 0; i < size / X_LONG_SIZE; i++) |
| 1713 | { | 1713 | { |
| 1714 | unsigned int j = ((unsigned int *) data) [i]; | 1714 | int j = ((int *) data) [i]; |
| 1715 | Faset (v, make_number (i), INTEGER_TO_CONS (j)); | 1715 | Faset (v, make_number (i), INTEGER_TO_CONS (j)); |
| 1716 | } | 1716 | } |
| 1717 | return v; | 1717 | return v; |
diff --git a/src/xterm.c b/src/xterm.c index 29f1a85d2c6..0c096e8f729 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -7700,14 +7700,6 @@ x_fully_uncatch_errors (void) | |||
| 7700 | } | 7700 | } |
| 7701 | #endif | 7701 | #endif |
| 7702 | 7702 | ||
| 7703 | /* Nonzero if x_catch_errors has been done and not yet canceled. */ | ||
| 7704 | |||
| 7705 | int | ||
| 7706 | x_catching_errors (void) | ||
| 7707 | { | ||
| 7708 | return x_error_message != 0; | ||
| 7709 | } | ||
| 7710 | |||
| 7711 | #if 0 | 7703 | #if 0 |
| 7712 | static unsigned int x_wire_count; | 7704 | static unsigned int x_wire_count; |
| 7713 | x_trace_wire (void) | 7705 | x_trace_wire (void) |
diff --git a/src/xterm.h b/src/xterm.h index 5c9365c1269..11d5d50d952 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -958,7 +958,6 @@ extern void x_catch_errors (Display *); | |||
| 958 | extern void x_check_errors (Display *, const char *) | 958 | extern void x_check_errors (Display *, const char *) |
| 959 | ATTRIBUTE_FORMAT_PRINTF (2, 0); | 959 | ATTRIBUTE_FORMAT_PRINTF (2, 0); |
| 960 | extern int x_had_errors_p (Display *); | 960 | extern int x_had_errors_p (Display *); |
| 961 | extern int x_catching_errors (void); | ||
| 962 | extern void x_uncatch_errors (void); | 961 | extern void x_uncatch_errors (void); |
| 963 | extern void x_clear_errors (Display *); | 962 | extern void x_clear_errors (Display *); |
| 964 | extern void x_set_window_size (struct frame *, int, int, int); | 963 | extern void x_set_window_size (struct frame *, int, int, int); |