changeset 109192:95b466c28f77

Merge from mainline.
author Katsumi Yamaoka <katsumi@flagship2>
date Thu, 13 May 2010 12:10:13 +0000
parents 64abd7e87411 (current diff) 20b6e2c2c069 (diff)
children a0ac80ce32db
files
diffstat 19 files changed, 247 insertions(+), 159 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed May 12 14:09:25 2010 +0000
+++ b/ChangeLog	Thu May 13 12:10:13 2010 +0000
@@ -1,3 +1,11 @@
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in: Fix some paren typos.
+
+	* configure.in (OLDXMENU, LIBXMENU): Set to empty if !HAVE_MENUS.
+
+	* configure.in (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Do not define.
+
 2010-05-12  Glenn Morris  <rgm@gnu.org>
 
 	* configure.in (LIB_SRC_EXTRA_INSTALLABLES): Remove, unused.
--- a/configure	Wed May 12 14:09:25 2010 +0000
+++ b/configure	Thu May 13 12:10:13 2010 +0000
@@ -6484,7 +6484,7 @@
     START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
     ;;
   netbsd | openbsd )
-    if test -f $(CRT_DIR)/crti.o; then
+    if test -f $CRT_DIR/crti.o; then
 	LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
         START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
     else
@@ -26313,27 +26313,31 @@
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## Unused?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
+## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
+## end of LIBX_BASE, but nothing ever set it.
 
 
 
@@ -26374,16 +26378,6 @@
 _ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
-_ACEOF
-
-
 XMENU_OBJ=
 XOBJ=
 if test "${HAVE_X_WINDOWS}" = "yes" ; then
@@ -26480,7 +26474,7 @@
   LIBX_OTHER=
 fi
 
-if test "$HAVE_GTK" = "yes"; then
+if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
   OLDXMENU=
   LIBXMENU=
 fi
@@ -26584,13 +26578,13 @@
         ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
         ## immediately undefine it again and redefine it to empty.
         ## Was the C_SWITCH_X_SITE part really necessary?
-##      LIB_GCC=`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
+##      LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
         LIB_GCC=
       fi
       ;;
 
     ## Ask GCC where to find libgcc.a.
-    *) LIB_GCC=`$(CC) -print-libgcc-file-name 2> /dev/null` ;;
+    *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
   esac
 fi
 
--- a/configure.in	Wed May 12 14:09:25 2010 +0000
+++ b/configure.in	Thu May 13 12:10:13 2010 +0000
@@ -1094,7 +1094,7 @@
     START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
     ;;
   netbsd | openbsd )
-    if test -f $(CRT_DIR)/crti.o; then
+    if test -f $CRT_DIR/crti.o; then
 	LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
         START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
     else
@@ -3012,6 +3012,7 @@
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
 AC_SUBST(version)
 AC_SUBST(configuration)
+## Unused?
 AC_SUBST(canonical)
 AC_SUBST(srcdir)
 AC_SUBST(prefix)
@@ -3033,6 +3034,9 @@
 AC_SUBST(gamedir)
 AC_SUBST(gameuser)
 AC_SUBST(unexec)
+## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
+## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
+## end of LIBX_BASE, but nothing ever set it.
 AC_SUBST(LD_SWITCH_X_SITE)
 AC_SUBST(C_SWITCH_X_SITE)
 AC_SUBST(C_SWITCH_X_SYSTEM)
@@ -3060,18 +3064,6 @@
 		   [Define to the used machine dependent file.])
 AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}",
 		   [Define to the used os dependent file.])
-AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE},
-[Define LD_SWITCH_X_SITE to contain any special flags your loader
- may need to deal with X Windows.  For instance, if you've defined
- HAVE_X_WINDOWS above and your X libraries aren't in a place that
- your loader can find on its own, you might want to add "-L/..." or
- something similar.])
-AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE,  ${C_SWITCH_X_SITE},
-[Define C_SWITCH_X_SITE to contain any special flags your compiler
- may need to deal with X Windows.  For instance, if you've defined
- HAVE_X_WINDOWS above and your X include files aren't in a place
- that your compiler can find on its own, you might want to add
- "-I/..." or something similar.])
 
 XMENU_OBJ=
 XOBJ=
@@ -3152,7 +3144,7 @@
   LIBX_OTHER=
 fi
 
-if test "$HAVE_GTK" = "yes"; then
+if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
   OLDXMENU=
   LIBXMENU=
 fi
@@ -3250,13 +3242,13 @@
         ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
         ## immediately undefine it again and redefine it to empty.
         ## Was the C_SWITCH_X_SITE part really necessary?
-##      LIB_GCC=`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
+##      LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
         LIB_GCC=
       fi
       ;;
 
     ## Ask GCC where to find libgcc.a.
-    *) LIB_GCC=`$(CC) -print-libgcc-file-name 2> /dev/null` ;;
+    *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
   esac
 fi                              dnl if $GCC
 AC_SUBST(LIB_GCC)
--- a/lisp/ChangeLog	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/ChangeLog	Thu May 13 12:10:13 2010 +0000
@@ -1,3 +1,16 @@
+2010-05-13  Agustín Martín  <agustin.martin@hispalinux.es>
+
+	* ispell.el (ispell-init-process): Do not kill ispell process
+	everytime when spellchecking from the minibuffer (bug#6143).
+
+2010-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/sh-script.el (sh-mode): Use define-derived-mode.
+
+	* dos-fns.el: Add "dos-" prefix for namespace control.
+	(convert-standard-filename): Define as alias for
+	dos-convert-standard-filename but only if applicable.
+
 2010-05-12  Alan Mackenzie  <acm@muc.de>
 
 	* progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
--- a/lisp/dos-fns.el	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/dos-fns.el	Thu May 13 12:10:13 2010 +0000
@@ -31,7 +31,7 @@
 (declare-function msdos-long-file-names "msdos.c")
 
 ;; This overrides a trivial definition in files.el.
-(defun convert-standard-filename (filename)
+(defun dos-convert-standard-filename (filename)
   "Convert a standard file's name to something suitable for the current OS.
 This means to guarantee valid names and perhaps to canonicalize
 certain patterns.
@@ -48,7 +48,7 @@
     (let ((flen (length filename)))
       ;; If FILENAME has a trailing slash, remove it and recurse.
       (if (memq (aref filename (1- flen)) '(?/ ?\\))
-	  (concat (convert-standard-filename
+	  (concat (dos-convert-standard-filename
 		   (substring filename 0 (1- flen)))
 		  "/")
 	(let* (;; ange-ftp gets in the way for names like "/foo:bar".
@@ -122,12 +122,17 @@
 		(aset string (1- (length string)) lastchar))))
 	  (concat (if (and (stringp dir)
 			   (memq (aref dir dlen-m-1) '(?/ ?\\)))
-		      (concat (convert-standard-filename
+		      (concat (dos-convert-standard-filename
 			       (substring dir 0 dlen-m-1))
 			      "/")
-		    (convert-standard-filename dir))
+		    (dos-convert-standard-filename dir))
 		  string))))))
 
+;; Only redirect convert-standard-filename if it has a chance of working,
+;; otherwise loading dos-fns.el might make your non-DOS Emacs misbehave.
+(when (fboundp 'msdos-long-file-names)
+  (defalias 'convert-standard-filename 'dos-convert-standard-filename))
+
 (defun dos-8+3-filename (filename)
   "Truncate FILENAME to DOS 8+3 limits."
   (if (or (not (stringp filename))
@@ -188,12 +193,12 @@
 
 ;; This is for the sake of standard file names elsewhere in Emacs that
 ;; are defined as constant strings or via defconst, and whose
-;; conversion via `convert-standard-filename' does not give good
+;; conversion via `dos-convert-standard-filename' does not give good
 ;; enough results.
 (defun dosified-file-name (file-name)
   "Return a variant of FILE-NAME that is valid on MS-DOS filesystems.
 
-This function is for those rare cases where `convert-standard-filename'
+This function is for those rare cases where `dos-convert-standard-filename'
 does not do a job that is good enough, e.g. if you need to preserve the
 file-name extension.  It recognizes only certain specific file names
 that are used in Emacs Lisp sources; any other file name will be
@@ -209,13 +214,13 @@
 (defvar msdos-shells)
 
 ;; Override settings chosen at startup.
-(defun set-default-process-coding-system ()
+(defun dos-set-default-process-coding-system ()
   (setq default-process-coding-system
 	(if (default-value 'enable-multibyte-characters)
 	    '(undecided-dos . undecided-dos)
 	  '(raw-text-dos . raw-text-dos))))
 
-(add-hook 'before-init-hook 'set-default-process-coding-system)
+(add-hook 'before-init-hook 'dos-set-default-process-coding-system)
 
 ;; File names defined in preloaded packages can be incorrect or
 ;; invalid if long file names were available during dumping, but not
@@ -232,17 +237,17 @@
 
 (add-hook 'before-init-hook 'dos-reevaluate-defcustoms)
 
-(defvar register-name-alist
+(defvar dos-register-name-alist
   '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
     (cflag . 6) (flags . 7)
     (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
     (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1))))
 
-(defun make-register ()
+(defun dos-make-register ()
   (make-vector 8 0))
 
-(defun register-value (regs name)
-  (let ((where (cdr (assoc name register-name-alist))))
+(defun dos-register-value (regs name)
+  (let ((where (cdr (assoc name dos-register-name-alist))))
     (cond ((consp where)
 	   (let ((tem (aref regs (car where))))
 	     (if (zerop (cdr where))
@@ -252,10 +257,10 @@
 	   (aref regs where))
 	  (t nil))))
 
-(defun set-register-value (regs name value)
+(defun dos-set-register-value (regs name value)
   (and (numberp value)
        (>= value 0)
-       (let ((where (cdr (assoc name register-name-alist))))
+       (let ((where (cdr (assoc name dos-register-name-alist))))
 	 (cond ((consp where)
 		(let ((tem (aref regs (car where)))
 		      (value (logand value 255)))
@@ -268,18 +273,18 @@
 		(aset regs where (logand value 65535))))))
   regs)
 
-(defsubst intdos (regs)
+(defsubst dos-intdos (regs)
   (int86 33 regs))
 
 ;; Backward compatibility for obsolescent functions which
 ;; set screen size.
 
-(defun mode25 ()
+(defun dos-mode25 ()
   "Changes the number of screen rows to 25."
   (interactive)
   (set-frame-size (selected-frame) 80 25))
 
-(defun mode4350 ()
+(defun dos-mode4350 ()
   "Changes the number of rows to 43 or 50.
 Emacs always tries to set the screen height to 50 rows first.
 If this fails, it will try to set it to 43 rows, on the assumption
--- a/lisp/gnus/ChangeLog	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/gnus/ChangeLog	Thu May 13 12:10:13 2010 +0000
@@ -1,3 +1,14 @@
+2010-05-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt)
+	* mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers
+	generated within the mm-with-unibyte-current-buffer macro.
+
+2010-05-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-bind-safe-url-regexp): Bind mm-w3m-safe-url-regexp
+	to nil when we're in a mml-preview buffer and no group is selected.
+
 2010-05-12  Andreas Seltenreich  <seltenreich@gmx.de>
 
 	* gnus-sum.el (gnus-summary-read-group-1): Don't jump to next group
--- a/lisp/gnus/gnus-art.el	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/gnus/gnus-art.el	Thu May 13 12:10:13 2010 +0000
@@ -4822,7 +4822,11 @@
 			   (with-current-buffer gnus-article-current-summary
 			     gnus-newsgroup-name)
 			 gnus-newsgroup-name)))
-	    (if (cond ((stringp gnus-safe-html-newsgroups)
+	    (if (cond ((not group)
+		       ;; Maybe we're in a mml-preview buffer
+		       ;; and no group is selected.
+		       t)
+		      ((stringp gnus-safe-html-newsgroups)
 		       (string-match gnus-safe-html-newsgroups group))
 		      ((consp gnus-safe-html-newsgroups)
 		       (member group gnus-safe-html-newsgroups)))
--- a/lisp/gnus/mml1991.el	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/gnus/mml1991.el	Thu May 13 12:10:13 2010 +0000
@@ -145,6 +145,7 @@
       (delete-region (point-min) (point)))
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+	(inline (mm-disable-multibyte))
 	(setq cipher (current-buffer))
 	(insert-buffer-substring text)
 	(unless (mc-encrypt-generic
@@ -225,6 +226,7 @@
       (delete-region (point-min) (point)))
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+	(inline (mm-disable-multibyte))
 	(flet ((gpg-encrypt-func
 		(sign plaintext ciphertext result recipients &optional
 		      passphrase sign-with-key armor textmode)
--- a/lisp/gnus/mml2015.el	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/gnus/mml2015.el	Thu May 13 12:10:13 2010 +0000
@@ -680,6 +680,7 @@
 	cipher)
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+	(mm-disable-multibyte)
 	;; set up a function to call the correct gpg encrypt routine
 	;; with the right arguments. (FIXME: this should be done
 	;; differently.)
--- a/lisp/progmodes/sh-script.el	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/progmodes/sh-script.el	Thu May 13 12:10:13 2010 +0000
@@ -1480,7 +1480,7 @@
 ;; mode-command and utility functions
 
 ;;;###autoload
-(defun sh-mode ()
+(define-derived-mode sh-mode prog-mode "Shell-script"
   "Major mode for editing shell scripts.
 This mode works for many shells, since they all have roughly the same syntax,
 as far as commands, arguments, variables, pipes, comments etc. are concerned.
@@ -1533,11 +1533,6 @@
 
 If your shell gives error messages with line numbers, you can use \\[executable-interpret]
 with your script for an edit-interpret-debug cycle."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'sh-mode
-	mode-name "Shell-script")
-  (use-local-map sh-mode-map)
   (make-local-variable 'skeleton-end-hook)
   (make-local-variable 'paragraph-start)
   (make-local-variable 'paragraph-separate)
@@ -1613,8 +1608,7 @@
           "sh")
          (t
           sh-shell-file))
-   nil nil)
-  (run-mode-hooks 'sh-mode-hook))
+   nil nil))
 
 ;;;###autoload
 (defalias 'shell-script-mode 'sh-mode)
--- a/lisp/textmodes/ispell.el	Wed May 12 14:09:25 2010 +0000
+++ b/lisp/textmodes/ispell.el	Thu May 13 12:10:13 2010 +0000
@@ -2630,11 +2630,22 @@
 	     (or ispell-local-dictionary ispell-dictionary "default"))
     (sit-for 0)
     (setq ispell-library-directory (ispell-check-version)
-	  ispell-process-directory default-directory
 	  ispell-process (ispell-start-process)
 	  ispell-filter nil
-	  ispell-filter-continue nil
-	  ispell-process-buffer-name (buffer-name))
+	  ispell-filter-continue nil)
+    ;; When spellchecking minibuffer contents, make sure ispell process
+    ;; is not restarted every time the minibuffer is killed.
+    (if (window-minibuffer-p)
+	(if (fboundp 'minibuffer-selected-window)
+	    ;; Assign ispell process to parent buffer
+	    (setq ispell-process-directory default-directory
+		  ispell-process-buffer-name (window-buffer (minibuffer-selected-window)))
+	  ;; Force `ispell-process-directory' to $HOME and use a dummy name
+	  (setq ispell-process-directory (expand-file-name "~/")
+		ispell-process-buffer-name " * Minibuffer-has-spellcheck-enabled"))
+      ;; Not in a minibuffer
+      (setq ispell-process-directory default-directory
+	    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
--- a/msdos/ChangeLog	Wed May 12 14:09:25 2010 +0000
+++ b/msdos/ChangeLog	Thu May 13 12:10:13 2010 +0000
@@ -1,3 +1,17 @@
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* sed1x.inp (OLDXMENU): Edit to ${oldXMenudir}libXMenu11.a.
+	(LIBXMENU): Edit to ${OLDXMENU}.
+	(LIBX_OTHER): Edit to ${LIBXT} ${LIBX_EXTRA}.
+
+	* sed1v2.inp (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD)
+	(FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS, FREETYPE_LIBS)
+	(LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS, M17N_FLT_LIBS)
+	(GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBRESOLV, LIBGPM):
+	Edit to empty,
+	(LIB_MATH): Edit to -lm.
+	(UNEXEC_OBJ): Edit to unexec.o.
+
 2010-05-12  Glenn Morris  <rgm@gnu.org>
 
 	* sed3v2.inp (INSTALLABLES): No more @LIB_SRC_EXTRA_INSTALLABLES@.
--- a/msdos/sed1v2.inp	Wed May 12 14:09:25 2010 +0000
+++ b/msdos/sed1v2.inp	Thu May 13 12:10:13 2010 +0000
@@ -38,13 +38,15 @@
 /^CPPFLAGS *=/s/@[^@\n]*@//
 /^LDFLAGS *=/s/@[^@\n]*@//
 /^LIBS *=/s/@[^@\n]*@//
-s/@LIB_MATH@/-lm/
 /^LIBES *=/,/^ *$/ {
   s/@[^@\n]*@//g
 }
 /^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/
 /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
 /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@//
+/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@//
+/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
+#/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@//
 /^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
 /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
 /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@//
@@ -52,12 +54,22 @@
 /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@//
 /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
 /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
+/^LIB_STANDARD *=/s/@LIB_STANDARD@//
+/^LIB_MATH *=/s/@LIB_MATH@/-lm/
 /^LIBTIFF *=/s/@LIBTIFF@//
 /^LIBJPEG *=/s/@LIBJPEG@//
 /^LIBPNG *=/s/@LIBPNG@//
 /^LIBGIF *=/s/@LIBGIF@//
 /^LIBXPM *=/s/@LIBXPM@//
 /^XFT_LIBS *=/s/@XFT_LIBS@//
+/^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@//
+/^FONTCONFIG_LIBS *=/s/@FONTCONFIG_LIBS@//
+/^FREETYPE_CFLAGS *=/s/@FREETYPE_CFLAGS@//
+/^FREETYPE_LIBS *=/s/@FREETYPE_LIBS@//
+/^LIBOTF_CFLAGS *=/s/@LIBOTF_CFLAGS@//
+/^LIBOTF_LIBS *=/s/@LIBOTF_LIBS@//
+/^M17N_FLT_CFLAGS *=/s/@M17N_FLT_CFLAGS@//
+/^M17N_FLT_LIBS *=/s/@M17N_FLT_LIBS@//
 /^DBUS_CFLAGS *=/s/@DBUS_CFLAGS@//
 /^DBUS_LIBS *=/s/@DBUS_LIBS@//
 /^DBUS_OBJ *=/s/@DBUS_OBJ@//
@@ -79,16 +91,20 @@
 /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@//
 /^NS_OBJ *=/s/@NS_OBJ@//
 /^NS_SUPPORT *=/s/@NS_SUPPORT@//
+/^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@//
+/^GNUSTEP_SYSTEM_LIBRARIES *=/s/@GNUSTEP_SYSTEM_LIBRARIES@//
+/^LIBRESOLV *=/s/@LIBRESOLV@//
 /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@//
 /^GETLOADAVG_LIBS *=/s/@[^@\n]*@//
 /^START_FILES *=/s/@START_FILES@//
 /^OTHER_FILES *=/s/@OTHER_FILES@//
 /^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/
 /^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o ftfont.o xftfont.o ftxfont.o/
+/^LIBGPM *=/s/@LIBGPM@//
 /^EXEEXT *=/s/@EXEEXT@/.exe/
 /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
 /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
-s/@unexec@/unexec.o/g
+/^UNEXEC_OBJ *=/s/@unexec@/unexec.o/
 /^version *=/s/@[^@\n]*@//
 /^M_FILE *=/s!@[^@\n]*@!m/intel386.h!
 /^S_FILE *=/s!@[^@\n]*@!s/msdos.h!
--- a/msdos/sed1x.inp	Wed May 12 14:09:25 2010 +0000
+++ b/msdos/sed1x.inp	Thu May 13 12:10:13 2010 +0000
@@ -4,7 +4,9 @@
 s!^	cd \${oldXMenudir}; \${MAKE}.*$!	${MAKE} -C ${oldXMenudir}.!
 s!^	@true *$!	@rem!
 s/DOC/DOC-X/g
-#/^LIBXMENU *=/s!= *!= ../oldxmenu/!
+/^OLDXMENU *=/s!@OLDXMENU@!${oldXMenudir}libXMenu11.a!
+/^LIBXMENU *=/s!@LIBXMENU@!${OLDXMENU}!
+/^LIBX_OTHER *=/s!@LIBX_OTHER@!${LIBXT} ${LIBX_EXTRA}!
 /^LIBS_SYSTEM *=/s!= *!= -lxext -lsys!
 /^temacs *:/s!OLDXMENU!LIBXMENU!
 
--- a/nt/ChangeLog	Wed May 12 14:09:25 2010 +0000
+++ b/nt/ChangeLog	Thu May 13 12:10:13 2010 +0000
@@ -1,3 +1,7 @@
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* config.nt (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Remove undefs.
+
 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 
 	* Version 23.2 released.
--- a/nt/config.nt	Wed May 12 14:09:25 2010 +0000
+++ b/nt/config.nt	Thu May 13 12:10:13 2010 +0000
@@ -1,6 +1,7 @@
 /* GNU Emacs site configuration template file.  -*- C -*-
-   Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
-     2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
+  2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -318,20 +319,6 @@
 
 #define subprocesses
 
-/* Define LD_SWITCH_X_SITE to contain any special flags your loader
-   may need to deal with X Windows.  For instance, if you've defined
-   HAVE_X_WINDOWS above and your X libraries aren't in a place that
-   your loader can find on its own, you might want to add "-L/..." or
-   something similar.  */
-#undef LD_SWITCH_X_SITE
-
-/* Define C_SWITCH_X_SITE to contain any special flags your compiler
-   may need to deal with X Windows.  For instance, if you've defined
-   HAVE_X_WINDOWS above and your X include files aren't in a place
-   that your compiler can find on its own, you might want to add
-   "-I/..." or something similar.  */
-#undef C_SWITCH_X_SITE
-
 /* Define STACK_DIRECTION here, but not if m/foo.h did.  */
 #ifndef STACK_DIRECTION
 #undef STACK_DIRECTION
--- a/src/ChangeLog	Wed May 12 14:09:25 2010 +0000
+++ b/src/ChangeLog	Thu May 13 12:10:13 2010 +0000
@@ -1,3 +1,28 @@
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (FONT_DRIVERS): Place with other HAVE_X_WINDOWS stuff.
+	(TOOLTIP_SUPPORT): Place with other HAVE_WINDOW_SYSTEM stuff.
+
+	* Makefile.in (FONT_DRIVERS): If HAVE_X_WINDOWS is defined,
+	HAVE_WINDOW_SYSTEM must be too.
+
+	* Makefile.in (WINNT_SUPPORT): Remove, nt build does not use this file.
+	(lisp): Remove WINNT_SUPPORT.
+
+	* Makefile.in (OLDXMENU, LIBXMENU) [!HAVE_MENUS]:
+	Let configure set these variables (to empty) in this case as well.
+
+	* Makefile.in (LD_SWITCH_X_SITE): Define as a variable, not via cpp.
+	(LIBX_BASE): Use $LD_SWITCH_X_SITE.
+
+	* Makefile.in (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD)
+	(LIB_MATH, FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS)
+	(FREETYPE_LIBS, LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS)
+	(M17N_FLT_LIBS, GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBGPM)
+	(LIBRESOLV, UNEXEC_OBJ): For clarity, define variables to hold
+	the values output by configure.
+	(ALL_CFLAGS, obj, LIBES, temacs${EXEEXT}): Use the above variables.
+
 2010-05-12  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (YMF_PASS_LDFLAGS, LD, LINKER): Simplify the logic.
--- a/src/Makefile.in	Wed May 12 14:09:25 2010 +0000
+++ b/src/Makefile.in	Thu May 13 12:10:13 2010 +0000
@@ -72,19 +72,44 @@
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
 ## System-specific CFLAGS.
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
+
+## Currently only set if NS_IMPL_GNUSTEP.
+## C_SWITCH_X_SITE may override this.
+C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
+
+## Define C_SWITCH_X_SITE to contain any special flags your compiler
+## may need to deal with X Windows.  For instance, if you've defined
+## HAVE_X_WINDOWS and your X include files aren't in a place that your
+## compiler can find on its own, you might want to add "-I/..." or
+## something similar.  This is normally set by configure.
+## This is used before C_SWITCH_X_SYSTEM and may override it.
+C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
+
+## Define LD_SWITCH_X_SITE to contain any special flags your loader
+## may need to deal with X Windows.  For instance, if your X libraries
+## aren't in a place that your loader can find on its own, you might
+## want to add "-L/..." or something similar.  Only used if
+## HAVE_X_WINDOWS.
+## FIXME? configure sets a value for this, but it has never been
+## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE.
+LD_SWITCH_X_SITE=
+
 ## This holds any special options for linking temacs only (ie, not
 ## used by configure).  Not used elsewhere because it sometimes
 ## contains options that have to do with using Emacs's crt0, 
 ## which are only good with temacs.
 LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
+
 ## Next two must come before LD_SWITCH_SYSTEM.
 ## If needed, a -R option that says where to find X windows at run time.
 LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
 ## As above, but using -rpath instead.
 LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
+
 ## System-specific LDFLAGS.
 LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
 LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@
+
 ## Flags to pass to ld only for temacs.
 TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS)
 
@@ -94,6 +119,12 @@
 ## Where to find libgcc.a, if using gcc and necessary.
 LIB_GCC=@LIB_GCC@
 
+## May use $CRT_DIR.
+LIB_STANDARD=@LIB_STANDARD@
+
+## -lm, or empty.
+LIB_MATH=@LIB_MATH@
+
 LIBTIFF=@LIBTIFF@
 LIBJPEG=@LIBJPEG@
 LIBPNG=@LIBPNG@
@@ -102,6 +133,15 @@
 XFT_LIBS=@XFT_LIBS@
 LIBX_EXTRA=$(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
 
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+LIBOTF_CFLAGS = @LIBOTF_CFLAGS@
+LIBOTF_LIBS = @LIBOTF_LIBS@
+M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
+M17N_FLT_LIBS = @M17N_FLT_LIBS@
+
 DBUS_CFLAGS = @DBUS_CFLAGS@
 DBUS_LIBS = @DBUS_LIBS@
 DBUS_OBJ = @DBUS_OBJ@
@@ -145,13 +185,17 @@
 
 NS_OBJ=@NS_OBJ@
 NS_SUPPORT=@NS_SUPPORT@
+## Next two only set if NS_IMPL_GNUSTEP.
+GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
+GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@
 
-## Only used if HAVE_X_WINDOWS and HAVE_WINDOW_SYSTEM.
+## Only used if HAVE_X_WINDOWS.
 FONT_OBJ=@FONT_OBJ@
 
 ## ${lispsource}mouse.elc if HAVE_GPM, otherwise empty.
 ## Not used if HAVE_MOUSE.
 GPM_MOUSE_SUPPORT=@GPM_MOUSE_SUPPORT@
+LIBGPM = @LIBGPM@
 
 BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \
   ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
@@ -160,6 +204,9 @@
 X_WINDOW_SUPPORT=${lispsource}x-dnd.elc ${lispsource}term/common-win.elc \
   ${lispsource}term/x-win.elc ${lispsource}dynamic-setting.elc
 
+## -lresolv, or empty.
+LIBRESOLV = @LIBRESOLV@
+
 LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
 
 INTERVALS_H = dispextern.h intervals.h composite.h
@@ -170,6 +217,8 @@
 
 START_FILES = @START_FILES@
 
+UNEXEC_OBJ = @unexec@
+
 # ========================== start of cpp stuff =======================
 /* From here on, comments must be done in C syntax.  */
 
@@ -201,11 +250,6 @@
    do not let it interfere with this file.  */
 #undef register
 
-/* This macro is for switches specifically related to X Windows.  */
-#ifndef LD_SWITCH_X_SITE
-#define LD_SWITCH_X_SITE
-#endif
-
 #ifdef NS_IMPL_GNUSTEP
 /* Pull in stuff from GNUstep-make. */
 FOUNDATION_LIB=gnu
@@ -227,10 +271,10 @@
    the information in ``config.h''.  */
 
 /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
-   since it may have -I options that should override those two.  */
+   since it may have -I options that should override those.  */
 /* MYCPPFLAGS only referenced in etc/DEBUG.  */
-ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
-ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
+ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS}
+ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 
 .SUFFIXES: .m
 .c.o:
@@ -245,20 +289,13 @@
 	$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
 
 #ifdef HAVE_X_WINDOWS
-/* This test needs to say in cpp for the time being, since s/msdos.h
-   defines HAVE_MENUS, and does not use the configure script.  */
-#ifdef HAVE_MENUS
 OLDXMENU=@OLDXMENU@
 LIBXMENU=@LIBXMENU@
-#else /* not HAVE_MENUS */
-OLDXMENU=
-LIBXMENU=
-#endif /* not HAVE_MENUS */
-
 LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER)
-LIBX_BASE=$(LIBXMENU) LD_SWITCH_X_SITE
+LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
 LIBX_OTHER=@LIBX_OTHER@
-#endif /* not HAVE_X_WINDOWS */
+FONT_DRIVERS=$(FONT_OBJ)
+#endif /* HAVE_X_WINDOWS */
 
 
 /* A macro which other sections of Makefile can redefine to munge the
@@ -317,12 +354,6 @@
 ns_appsrc=@ns_appsrc@
 #endif  /* HAVE_NS */
 
-#ifdef HAVE_WINDOW_SYSTEM
-#ifdef HAVE_X_WINDOWS
-FONT_DRIVERS=$(FONT_OBJ)
-#endif /* HAVE_X_WINDOWS */
-#endif /* HAVE_WINDOW_SYSTEM */
-
 /* lastfile must follow all files
    whose initialized data areas should be dumped as pure by dump-emacs.  */
 obj=    dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
@@ -334,7 +365,7 @@
 	cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
 	alloc.o data.o doc.o editfns.o callint.o \
 	eval.o floatfns.o fns.o font.o print.o lread.o \
-	syntax.o @unexec@ bytecode.o \
+	syntax.o $(UNEXEC_OBJ) bytecode.o \
 	process.o callproc.o \
 	region-cache.o sound.o atimer.o \
 	doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
@@ -391,29 +422,16 @@
 #endif
 
 #ifdef HAVE_WINDOW_SYSTEM
+#define TOOLTIP_SUPPORT ${lispsource}tooltip.elc
 #ifdef HAVE_X_WINDOWS
 #define WINDOW_SUPPORT $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT)
 #else
 #define WINDOW_SUPPORT $(BASE_WINDOW_SUPPORT)
-#endif
-#else
-#define WINDOW_SUPPORT
-#endif
-
-#ifdef WINDOWSNT
-#define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
-  ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \
-  ${lispsource}w32-fns.elc ${lispsource}term/common-win.elc \
-  ${lispsource}term/w32-win.elc
-#else
-#define WINNT_SUPPORT
-#endif
-
-#ifdef HAVE_WINDOW_SYSTEM
-#define TOOLTIP_SUPPORT ${lispsource}tooltip.elc
+#endif /* HAVE_X_WINDOWS */
 #else
 #define TOOLTIP_SUPPORT
-#endif
+#define WINDOW_SUPPORT
+#endif /* HAVE_WINDOW_SYSTEM */
 
 /* This is the platform-specific list of Lisp files loaded into the
    dumped Emacs.  It is arranged like this because it is easier to generate
@@ -513,7 +531,6 @@
 	${lispsource}epa-hook.elc \
 	TOOLTIP_SUPPORT \
 	MSDOS_SUPPORT \
-	WINNT_SUPPORT \
 	WINDOW_SUPPORT \
 	${NS_SUPPORT} \
 	${lispsource}widget.elc \
@@ -634,10 +651,10 @@
    with GCC, we might need gnulib again after them.  */
 
 LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
-   $(RSVG_LIBS) $(DBUS_LIBS) @LIBGPM@ @LIBRESOLV@ $(LIBS_SYSTEM) \
+   $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
    $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
-   @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
-   $(GNULIB_VAR) @LIB_MATH@ @LIB_STANDARD@ $(GNULIB_VAR)
+   $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
+   $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR)
 
 all: emacs${EXEEXT} $(OTHER_FILES)
 
@@ -682,7 +699,7 @@
 temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
 #ifdef NS_IMPL_GNUSTEP
 	$(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
-	-L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \
+	-L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \
 	-lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
 	${obj} ${otherobj} ${LIBES}
 #else
--- a/src/config.in	Wed May 12 14:09:25 2010 +0000
+++ b/src/config.in	Thu May 13 12:10:13 2010 +0000
@@ -44,12 +44,6 @@
 /* Define to 1 if using `getloadavg.c'. */
 #undef C_GETLOADAVG
 
-/* Define C_SWITCH_X_SITE to contain any special flags your compiler may need
-   to deal with X Windows. For instance, if you've defined HAVE_X_WINDOWS
-   above and your X include files aren't in a place that your compiler can
-   find on its own, you might want to add "-I/..." or something similar. */
-#undef C_SWITCH_X_SITE
-
 /* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
 #undef DGUX
 
@@ -804,12 +798,6 @@
 /* Define to use Kerberos 5 instead of Kerberos 4. */
 #undef KERBEROS5
 
-/* Define LD_SWITCH_X_SITE to contain any special flags your loader may need
-   to deal with X Windows. For instance, if you've defined HAVE_X_WINDOWS
-   above and your X libraries aren't in a place that your loader can find on
-   its own, you might want to add "-L/..." or something similar. */
-#undef LD_SWITCH_X_SITE
-
 /* Define to 1 if localtime caches TZ. */
 #undef LOCALTIME_CACHE