Mercurial > emacs
changeset 108193:3fc390a10afb
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 27 Apr 2010 23:38:41 +0000 |
parents | 27c366fe4d1f (current diff) c46b2d0614cb (diff) |
children | b393c00787bb |
files | |
diffstat | 16 files changed, 182 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Apr 27 06:45:13 2010 +0000 +++ b/ChangeLog Tue Apr 27 23:38:41 2010 +0000 @@ -1,3 +1,17 @@ +2010-04-27 Glenn Morris <rgm@gnu.org> + + * configure.in (LIBXTR6): New output variable. Move unixware special + case here from src/s/unixware.h. + + * configure.in (LUCID_LIBW, MOTIF_LIBW): No longer substitute + in Makefiles. + (TOOLKIT_LIBW): New output variable, replacing LUCID_LIBW/MOTIF_LIBW. + + * configure.in (HAVE_MOTIF_2_1): Remove unused variable. + (LIBXP): No longer substitute in Makefiles. + (MOTIF_LIBW): New output variable. Move system-specific settings here + from src/s files. + 2010-04-27 Dan Nicolaescu <dann@ics.uci.edu> Reduce CPP usage.
--- a/admin/CPP-DEFINES Tue Apr 27 06:45:13 2010 +0000 +++ b/admin/CPP-DEFINES Tue Apr 27 23:38:41 2010 +0000 @@ -235,7 +235,6 @@ LIBXMU LIB_GCC LIB_MATH -LIB_MOTIF LIB_STANDARD LINKER LINUX_VERSION_CODE @@ -251,7 +250,6 @@ MUST_UNDEF__STDC__ NEED_BSDTTY NEED_ERRNO -NEED_LIBW NEED_UNISTD_H NLIST_STRUCT NOT_C_CODE
--- a/configure Tue Apr 27 06:45:13 2010 +0000 +++ b/configure Tue Apr 27 23:38:41 2010 +0000 @@ -723,8 +723,7 @@ GCONF_CFLAGS GCONF_LIBS LIBSELINUX_LIBS -LUCID_LIBW -LIBXP +LIBXTR6 FONTCONFIG_CFLAGS FONTCONFIG_LIBS XFT_CFLAGS @@ -794,6 +793,7 @@ XMENU_OBJ XOBJ WIDGET_OBJ +TOOLKIT_LIBW LTLIBOBJS' ac_subst_files='' ac_user_opts=' @@ -13011,9 +13011,9 @@ fi fi - X_TOOLKIT_TYPE=$USE_X_TOOLKIT +LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:$LINENO: checking X11 toolkit version" >&5 $as_echo_n "checking X11 toolkit version... " >&6; } @@ -13081,6 +13081,11 @@ #define HAVE_X11XTR6 1 _ACEOF + LIBXTR6="-lSM -lICE" + case "$opsys" in + ## Use libw.a along with X11R6 Xt. + unixware) LIBXTR6="$LIBXTR6 -lw" ;; + esac else { $as_echo "$as_me:$LINENO: result: before 6" >&5 $as_echo "before 6" >&6; } @@ -13170,6 +13175,7 @@ test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" fi + # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. if test "${HAVE_X11}" = "yes"; then if test "${USE_X_TOOLKIT}" != "none"; then @@ -13307,7 +13313,6 @@ fi { $as_echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5 $as_echo "$emacs_cv_motif_version_2_1" >&6; } - HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 if test $emacs_cv_motif_version_2_1 = yes; then { $as_echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } @@ -13453,7 +13458,6 @@ - USE_TOOLKIT_SCROLL_BARS=no if test "${with_toolkit_scroll_bars}" != "no"; then if test "${USE_X_TOOLKIT}" != "none"; then @@ -25888,6 +25892,7 @@ +## Used in lwlib/Makefile.in. @@ -25954,6 +25959,7 @@ WIDGET_OBJ= +MOTIF_LIBW= if test "${USE_X_TOOLKIT}" != "none" ; then WIDGET_OBJ=widget.o @@ -25973,8 +25979,35 @@ #define USE_MOTIF 1 _ACEOF - fi -fi + MOTIF_LIBW=-lXm + case "$opsys" in + gnu-linux) + ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. + MOTIF_LIBW="$MOTIF_LIBW -lXpm" + ;; + + unixware) + ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> + ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. + MOTIF_LIBW="MOTIF_LIBW -lXimp" + ;; + + aix4-2) + ## olson@mcs.anl.gov says -li18n is needed by -lXm. + MOTIF_LIBW="$MOTIF_LIBW -li18n" + ;; + esac + MOTIF_LIBW="$MOTIF_LIBW $LIBXP" + fi +fi + + +case "$USE_X_TOOLKIT" in + MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; + LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; + *) TOOLKIT_LIBW= ;; +esac + if test "${HAVE_X11}" = "yes" ; then
--- a/configure.in Tue Apr 27 06:45:13 2010 +0000 +++ b/configure.in Tue Apr 27 23:38:41 2010 +0000 @@ -1830,10 +1830,10 @@ fi fi fi -AC_SUBST(LUCID_LIBW) X_TOOLKIT_TYPE=$USE_X_TOOLKIT +LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then AC_MSG_CHECKING(X11 toolkit version) AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, @@ -1847,6 +1847,11 @@ AC_MSG_RESULT(6 or newer) AC_DEFINE(HAVE_X11XTR6, 1, [Define to 1 if you have the X11R6 or newer version of Xt.]) + LIBXTR6="-lSM -lICE" + case "$opsys" in + ## Use libw.a along with X11R6 Xt. + unixware) LIBXTR6="$LIBXTR6 -lw" ;; + esac else AC_MSG_RESULT(before 6) fi @@ -1862,6 +1867,7 @@ AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" fi +AC_SUBST(LIBXTR6) # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. if test "${HAVE_X11}" = "yes"; then @@ -1880,7 +1886,6 @@ Motif version prior to 2.1. #endif], emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) - HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 if test $emacs_cv_motif_version_2_1 = yes; then AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp) else @@ -1909,7 +1914,6 @@ fi fi fi -AC_SUBST(LIBXP) dnl Use toolkit scroll bars if configured for GTK or X toolkit and either dnl using Motif or Xaw3d is available, and unless @@ -2769,6 +2773,7 @@ AC_SUBST(C_SWITCH_X_SITE) AC_SUBST(C_SWITCH_X_SYSTEM) AC_SUBST(CFLAGS) +## Used in lwlib/Makefile.in. AC_SUBST(X_TOOLKIT_TYPE) AC_SUBST(machfile) AC_SUBST(opsysfile) @@ -2820,6 +2825,7 @@ AC_SUBST(XOBJ) WIDGET_OBJ= +MOTIF_LIBW= if test "${USE_X_TOOLKIT}" != "none" ; then WIDGET_OBJ=widget.o AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.]) @@ -2827,9 +2833,36 @@ AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.]) elif test "${USE_X_TOOLKIT}" = "MOTIF"; then AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.]) + MOTIF_LIBW=-lXm + case "$opsys" in + gnu-linux) + ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. + MOTIF_LIBW="$MOTIF_LIBW -lXpm" + ;; + + unixware) + ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> + ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. + MOTIF_LIBW="MOTIF_LIBW -lXimp" + ;; + + aix4-2) + ## olson@mcs.anl.gov says -li18n is needed by -lXm. + MOTIF_LIBW="$MOTIF_LIBW -li18n" + ;; + esac + MOTIF_LIBW="$MOTIF_LIBW $LIBXP" fi fi AC_SUBST(WIDGET_OBJ) + +case "$USE_X_TOOLKIT" in + MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; + LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; + *) TOOLKIT_LIBW= ;; +esac +AC_SUBST(TOOLKIT_LIBW) + if test "${HAVE_X11}" = "yes" ; then AC_DEFINE(HAVE_X11, 1, [Define to 1 if you want to use version 11 of X windows.
--- a/lisp/ChangeLog Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/ChangeLog Tue Apr 27 23:38:41 2010 +0000 @@ -1,3 +1,36 @@ +2010-04-27 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): + Avoid re-enabling a minor mode after the user turned the minor mode + off if MODE-enable-in-buffers is run twice (typically once from + fundamental-mode's after-change-major-mode-hook and a second time from + run-mode-hook's own after-change-major-mode-hook). + + * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. + +2010-04-27 Sam Steingold <sds@gnu.org> + + * progmodes/bug-reference.el (bug-reference-url-format): Mark as + `safe-local-variable' if the value is a string or a function, as + documented and implemented on 2010-04-02. + +2010-04-27 Juanma Barranquero <lekktu@gmail.com> + + * ido.el (ido-buffer-internal): Bind `ido-use-virtual-buffers' to nil + when method is 'kill. + +2010-04-27 Agustín Martín <agustin.martin@hispalinux.es> + + * ispell.el (ispell-init-process): Fix personal dictionary condition + in default directory check. + (ispell-init-process,ispell-kill-ispell,kill-buffer-hook): + Kill ispell process when killing its associated buffer. + +2010-04-27 Jan Djärv <jan.h.d@swipnet.se> + + * desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists, + but we aren't using it. + 2010-04-25 Jan Djärv <jan.h.d@swipnet.se> * tool-bar.el (tool-bar-local-item-from-menu): Revert unintended
--- a/lisp/desktop.el Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/desktop.el Tue Apr 27 23:38:41 2010 +0000 @@ -620,7 +620,10 @@ (when (and desktop-save-mode (let ((exists (file-exists-p (desktop-full-file-name)))) (or (eq desktop-save t) - (and exists (memq desktop-save '(ask-if-new if-exists))) + (and exists (eq desktop-save 'if-exists)) + ;; If it exists, but we aren't using it, we are going + ;; to ask for a new directory below. + (and exists desktop-dirname (eq desktop-save 'ask-if-new)) (and (or (memq desktop-save '(ask ask-if-new)) (and exists (eq desktop-save 'ask-if-exists)))
--- a/lisp/emacs-lisp/easy-mmode.el Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/emacs-lisp/easy-mmode.el Tue Apr 27 23:38:41 2010 +0000 @@ -361,13 +361,14 @@ (dolist (buf ,MODE-buffers) (when (buffer-live-p buf) (with-current-buffer buf - (if ,mode - (unless (eq ,MODE-major-mode major-mode) - (,mode -1) - (,turn-on) - (setq ,MODE-major-mode major-mode)) - (,turn-on) - (setq ,MODE-major-mode major-mode)))))) + (unless (eq ,MODE-major-mode major-mode) + (if ,mode + (progn + (,mode -1) + (,turn-on) + (setq ,MODE-major-mode major-mode)) + (,turn-on) + (setq ,MODE-major-mode major-mode))))))) (put ',MODE-enable-in-buffers 'definition-name ',global-mode) (defun ,MODE-check-buffers ()
--- a/lisp/emacs-lisp/lisp.el Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/emacs-lisp/lisp.el Tue Apr 27 23:38:41 2010 +0000 @@ -624,9 +624,12 @@ (interactive) (let* ((data (lisp-completion-at-point predicate)) (plist (nthcdr 3 data))) - (let ((completion-annotate-function (plist-get plist :annotate-function))) - (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) - (plist-get plist :predicate))))) + (if (null data) + (minibuffer-message "Nothing to complete") + (let ((completion-annotate-function + (plist-get plist :annotate-function))) + (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) + (plist-get plist :predicate)))))) (defun lisp-completion-at-point (&optional predicate)
--- a/lisp/ido.el Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/ido.el Tue Apr 27 23:38:41 2010 +0000 @@ -2183,7 +2183,9 @@ (ido-current-directory nil) (ido-directory-nonreadable nil) (ido-directory-too-big nil) - (ido-use-virtual-buffers ido-use-virtual-buffers) + (ido-use-virtual-buffers (if (eq method 'kill) + nil ;; Don't consider virtual buffers for killing + ido-use-virtual-buffers)) (require-match (confirm-nonexistent-file-or-buffer)) (buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default require-match initial))
--- a/lisp/progmodes/bug-reference.el Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/progmodes/bug-reference.el Tue Apr 27 23:38:41 2010 +0000 @@ -51,7 +51,8 @@ There is no default setting for this, it must be set per file.") ;;;###autoload -(put 'bug-reference-url-format 'safe-local-variable 'stringp) +(put 'bug-reference-url-format 'safe-local-variable + (lambda (s) (or (stringp s) (functionp s)))) (defconst bug-reference-bug-regexp "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\)"
--- a/lisp/textmodes/ispell.el Tue Apr 27 06:45:13 2010 +0000 +++ b/lisp/textmodes/ispell.el Tue Apr 27 23:38:41 2010 +0000 @@ -1334,6 +1334,9 @@ (defvar ispell-process-directory nil "The directory where `ispell-process' was started.") +(defvar ispell-process-buffer-name nil + "The buffer where `ispell-process' was started.") + (defvar ispell-filter nil "Output filter from piped calls to Ispell.") @@ -2614,9 +2617,11 @@ "Check status of Ispell process and start if necessary." (if (and ispell-process (eq (ispell-process-status) 'run) - ;; If we're using a personal dictionary, ensure - ;; we're in the same default directory! - (or (not ispell-personal-dictionary) + ;; Unless we are using an explicit personal dictionary, + ;; ensure we're in the same default directory! + ;; Restart check for personal dictionary is done in + ;; `ispell-internal-change-dictionary', called from `ispell-buffer-local-dict' + (or (or ispell-local-pdict ispell-personal-dictionary) (equal ispell-process-directory default-directory))) (setq ispell-filter nil ispell-filter-continue nil) ;; may need to restart to select new personal dictionary. @@ -2628,7 +2633,8 @@ ispell-process-directory default-directory ispell-process (ispell-start-process) ispell-filter nil - ispell-filter-continue nil) + ispell-filter-continue nil + ispell-process-buffer-name (buffer-name)) (if ispell-async-processp (set-process-filter ispell-process 'ispell-filter)) ;; protect against bogus binding of `enable-multibyte-characters' in XEmacs @@ -2689,10 +2695,16 @@ (kill-buffer ispell-session-buffer) (setq ispell-output-buffer nil ispell-session-buffer nil)) + (setq ispell-process-buffer-name nil) (setq ispell-process nil) (message "Ispell process killed") nil)) +;; Kill ispell process when killing its associated buffer +(add-hook 'kill-buffer-hook + '(lambda () + (if (equal ispell-process-buffer-name (buffer-name)) + (ispell-kill-ispell t)))) ;;; ispell-change-dictionary is set in some people's hooks. Maybe this should ;;; call ispell-init-process rather than wait for a spell checking command?
--- a/src/ChangeLog Tue Apr 27 06:45:13 2010 +0000 +++ b/src/ChangeLog Tue Apr 27 23:38:41 2010 +0000 @@ -1,3 +1,18 @@ +2010-04-27 Glenn Morris <rgm@gnu.org> + + * Makefile.in (LIBXTR6): Set with configure, not cpp. + * s/unixware.h (NEED_LIBW): Remove definition. + + * Makefile.in (LUCID_LIBW, MOTIF_LIBW): Remove, replacing by... + (TOOLKIT_LIBW): New, set by configure. + (@X_TOOLKIT_TYPE@): No longer define it. + + * Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW. + (MOTIF_LIBW): Set with configure, not cpp. + * s/aix4-2.h (LIB_MOTIF): + * s/gnu-linux.h (LIB_MOTIF): + * s/unixware.h (LIB_MOTIF): Move to configure.in. + 2010-04-27 Dan Nicolaescu <dann@ics.uci.edu> Reduce CPP usage.
--- a/src/Makefile.in Tue Apr 27 06:45:13 2010 +0000 +++ b/src/Makefile.in Tue Apr 27 23:38:41 2010 +0000 @@ -86,13 +86,14 @@ GTK_OBJ=@GTK_OBJ@ -LIBXP=@LIBXP@ LIBXSM=@LIBXSM@ +LIBXTR6=@LIBXTR6@ + XMENU_OBJ=@XMENU_OBJ@ XOBJ=@XOBJ@ -LUCID_LIBW=@LUCID_LIBW@ +TOOLKIT_LIBW=@TOOLKIT_LIBW@ LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ @@ -255,21 +256,7 @@ #endif /* not HAVE_MENUS */ #ifdef USE_X_TOOLKIT -# define @X_TOOLKIT_TYPE@ -# ifdef LIB_MOTIF -MOTIF_LIBW= LIB_MOTIF $(LIBXP) -# else -MOTIF_LIBW= -lXm $(LIBXP) -# endif -LIBW=$(@X_TOOLKIT_TYPE@_LIBW) - -#ifdef HAVE_X11XTR6 -#ifdef NEED_LIBW -LIBXTR6 = -lSM -lICE -lw -#else -LIBXTR6 = -lSM -lICE -#endif -#endif +LIBW=$(TOOLKIT_LIBW) #ifndef LIBXMU #define LIBXMU -lXmu
--- a/src/s/aix4-2.h Tue Apr 27 06:45:13 2010 +0000 +++ b/src/s/aix4-2.h Tue Apr 27 23:38:41 2010 +0000 @@ -135,9 +135,6 @@ #define POSIX_SIGNALS #undef sigmask -/* olson@mcs.anl.gov says -li18n is needed by -lXm. */ -#define LIB_MOTIF -lXm -li18n - #ifndef HAVE_LIBXMU #define LIBXMU @@ -148,7 +145,7 @@ /* On AIX Emacs uses the gmalloc.c malloc implementation. But given the way this system works, libc functions that return malloced memory use the libc malloc implementation. Calling xfree or - xrealloc on the results of such functions results in a crash. + xrealloc on the results of such functions results in a crash. One solution for this could be to define SYSTEM_MALLOC here, but that does not currently work on this system.
--- a/src/s/gnu-linux.h Tue Apr 27 06:45:13 2010 +0000 +++ b/src/s/gnu-linux.h Tue Apr 27 23:38:41 2010 +0000 @@ -197,9 +197,6 @@ anyone's still using Emacs on those. --fx 2002-12-14 */ /* #define C_SWITCH_SYSTEM -D_BSD_SOURCE */ -/* Paul Abrahams <abrahams@equinox.shaysnet.com> says this is needed. */ -#define LIB_MOTIF -lXm -lXpm - #ifdef HAVE_LIBNCURSES #define TERMINFO #define LIBS_TERMCAP -lncurses
--- a/src/s/unixware.h Tue Apr 27 06:45:13 2010 +0000 +++ b/src/s/unixware.h Tue Apr 27 23:38:41 2010 +0000 @@ -56,17 +56,6 @@ pty_name[sizeof(pty_name) - 1] = 0; \ } -/* Use libw.a along with X11R6 Xt. */ -#define NEED_LIBW - -/* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp - is needed in UNIX_SV ... 4.2 1.1.2. */ -#define LIB_MOTIF -lXm -lXimp - -/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6 - (do not change this comment) */ - - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long