changeset 108116:8cf84fb217cc

merge trunk
author Kenichi Handa <handa@etlken>
date Mon, 26 Apr 2010 10:22:02 +0900
parents cd095471cdae (current diff) 641672d44942 (diff)
children fb2072139c80
files
diffstat 26 files changed, 148 insertions(+), 229 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Mon Apr 26 09:23:02 2010 +0900
+++ b/etc/NEWS	Mon Apr 26 10:22:02 2010 +0900
@@ -30,6 +30,10 @@
 These provide no new functionality, they just remove the need to edit
 lib-src/Makefile by hand in order to use the associated features.
 
+---
+** There is a new configure option --with-crt-dir.
+This is only useful if your crt*.o files are in a non-standard location.
+
 ** Configure links against libselinux if it is found.
 You can disable this by using --without-selinux.
 
--- a/lisp/ChangeLog	Mon Apr 26 09:23:02 2010 +0900
+++ b/lisp/ChangeLog	Mon Apr 26 10:22:02 2010 +0900
@@ -1,3 +1,8 @@
+2010-04-25  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* tool-bar.el (tool-bar-local-item-from-menu): Revert unintended
+	checkin in rev 100010.
+
 2010-04-24  Glenn Morris  <rgm@gnu.org>
 
 	* emacs-lisp/authors.el (authors-obsolete-files-regexps):
--- a/lisp/composite.el	Mon Apr 26 09:23:02 2010 +0900
+++ b/lisp/composite.el	Mon Apr 26 10:22:02 2010 +0900
@@ -299,16 +299,16 @@
     (compose-string-internal str 0 (length str) components)))
 
 (defun find-composition (pos &optional limit string detail-p)
-  "Return information about a composition at or nearest to buffer position POS.
+  "Return information about a composition at or near buffer position POS.
 
 If the character at POS has `composition' property, the value is a list
-of FROM, TO, and VALID-P.
+\(FROM TO VALID-P).
 
 FROM and TO specify the range of text that has the same `composition'
 property, VALID-P is t if this composition is valid, and nil if not.
 
 If there's no composition at POS, and the optional 2nd argument LIMIT
-is non-nil, search for a composition toward LIMIT.
+is non-nil, search for a composition toward the position given by LIMIT.
 
 If no composition is found, return nil.
 
@@ -316,8 +316,9 @@
 composition in; nil means the current buffer.
 
 If a valid composition is found and the optional 4th argument DETAIL-P
-is non-nil, the return value is a list of FROM, TO, COMPONENTS,
-RELATIVE-P, MOD-FUNC, and WIDTH.
+is non-nil, the return value is a list of the form
+
+   (FROM TO COMPONENTS RELATIVE-P MOD-FUNC WIDTH)
 
 COMPONENTS is a vector of integers, the meaning depends on RELATIVE-P.
 
@@ -334,9 +335,9 @@
 When Automatic Compostion mode is on, this function also finds a
 chunk of text that is automatically composed.  If such a chunk is
 found closer to POS than the position that has `composition'
-property, the value is a list of FROM, TO, and a glyph gstring
-the specify how the chunk is composed.  See the function
-`composition-get-gstring' for the format of the glyph string."
+property, the value is a list of FROM, TO, and a glyph-string
+that specifies how the chunk is to be composed.  See the function
+`composition-get-gstring' for the format of the glyph-string."
   (let ((result (find-composition-internal pos limit string detail-p)))
     (if (and detail-p (> (length result) 3) (nth 2 result) (not (nth 3 result)))
 	;; This is a valid rule-base composition.
--- a/lisp/tool-bar.el	Mon Apr 26 09:23:02 2010 +0900
+++ b/lisp/tool-bar.el	Mon Apr 26 10:22:02 2010 +0900
@@ -243,24 +243,24 @@
                 ;; Last element in the bound key sequence:
                 (kk (aref k (1- (length k)))))
             (if (and (keymapp m)
-                     (symbolp kk))      ;FIXME: Why?  --Stef
+                     (symbolp kk))
                 (setq submap m
                       key kk)))))
-    (when submap
-      (let ((defn nil))
-        ;; Here, we're essentially doing a "lookup-key without get_keyelt".
-        (map-keymap (lambda (k b) (if (eq k key) (setq defn b)))
-                    submap)
+    (when (and (symbolp submap) (boundp submap))
+      (setq submap (eval submap)))
+    (let ((defn (assq key (cdr submap))))
+      (if (eq (cadr defn) 'menu-item)
+          (define-key-after in-map (vector key)
+            (append (cdr defn) (list :image image-exp) props))
+        (setq defn (cdr defn))
         (define-key-after in-map (vector key)
-          (if (eq (car defn) 'menu-item)
-              (append (cdr defn) (list :image image-exp) props)
-            (let ((rest (cdr defn)))
-              ;; If the rest of the definition starts
-              ;; with a list of menu cache info, get rid of that.
-              (if (and (consp rest) (consp (car rest)))
-                  (setq rest (cdr rest)))
-              (append `(menu-item ,(car defn) ,rest)
-                      (list :image image-exp) props))))))))
+          (let ((rest (cdr defn)))
+            ;; If the rest of the definition starts
+            ;; with a list of menu cache info, get rid of that.
+            (if (and (consp rest) (consp (car rest)))
+                (setq rest (cdr rest)))
+            (append `(menu-item ,(car defn) ,rest)
+                    (list :image image-exp) props)))))))
 
 ;;; Set up some global items.  Additions/deletions up for grabs.
 
--- a/src/.gdbinit	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/.gdbinit	Mon Apr 26 10:22:02 2010 +0900
@@ -21,6 +21,8 @@
 
 # Force loading of symbols, enough to give us gdb_valbits etc.
 set main
+# With some compilers, we need this to give us struct Lisp_Symbol etc.:
+set Fmake_symbol
 
 # Find lwlib source files too.
 dir ../lwlib
--- a/src/ChangeLog	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/ChangeLog	Mon Apr 26 10:22:02 2010 +0900
@@ -1,3 +1,50 @@
+2010-04-25  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove all NO_ARG_ARRAY uses.
+	* fns.c (concat2, concat3, nconc2):
+	* eval.c (apply1, call1, call2, call3, call4, call5, call6)
+	(call7): Remove NO_ARG_ARRAY usage, assume it's always true.
+	* m/xtensa.h (NO_ARG_ARRAY):
+	* m/template.h (NO_ARG_ARRAY):
+	* m/sparc.h (NO_ARG_ARRAY):
+	* m/sh3.h (NO_ARG_ARRAY):
+	* m/mips.h (NO_ARG_ARRAY):
+	* m/macppc.h (NO_ARG_ARRAY):
+	* m/iris4d.h (NO_ARG_ARRAY):
+	* m/intel386.h (NO_ARG_ARRAY):
+	* m/ibms390x.h (NO_ARG_ARRAY):
+	* m/ibms390.h (NO_ARG_ARRAY):
+	* m/ibmrs6000.h (NO_ARG_ARRAY):
+	* m/ia64.h (NO_ARG_ARRAY):
+	* m/hp800.h (NO_ARG_ARRAY):
+	* m/arm.h (NO_ARG_ARRAY):
+	* m/amdx86-64.h (NO_ARG_ARRAY):
+	* m/alpha.h (NO_ARG_ARRAY): Remove definition.
+
+2010-04-25  Eli Zaretskii  <eliz@gnu.org>
+
+	* xdisp.c (display_line): Don't assume 2nd call to
+	get_next_display_element cannot return zero.  (Bug#6030)
+	(iterate_out_of_display_property): New function, body from pop_it.
+	(pop_it): Use it.
+
+2010-04-24  Glenn Morris  <rgm@gnu.org>
+
+	* m/amdx86-64.h (START_FILES, LIB_STANDARD) [__OpenBSD__]:
+	For clarity, revert to using fixed /usr/lib rather than $CRT_DIR.
+	(START_FILES, LIB_STANDARD) [__FreeBSD__]: Merge into the generic case,
+	since CRT_DIR defaults to /usr/lib.  Suggested by Dan Nicolaescu.
+
+2010-04-24  Eli Zaretskii  <eliz@gnu.org>
+
+	* xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
+	use `get_next_display_element' and `set_iterator_to_next' to
+	advance to the next character, when looking for the character that
+	begins the next row.
+
+	* .gdbinit: Add a "set Fmake_symbol" line to force GDB to load the
+	definition of "struct Lisp_Symbol".
+
 2010-04-24  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (CRT_DIR): New variable, set by configure.
@@ -48,8 +95,7 @@
 
 2010-04-23  Eli Zaretskii  <eliz@gnu.org>
 
-	Support `display' text properties and overlay strings in bidi
-	buffers.
+	Support `display' text properties and overlay strings in bidi buffers.
 	* xdisp.c (pop_it): When the stack is popped after displaying
 	from a string, bidi-iterate to exit from the text portion covered
 	by the `display' property or overlay.  (Bug#5988, bug#5920)
--- a/src/composite.c	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/composite.c	Mon Apr 26 10:22:02 2010 +0900
@@ -74,8 +74,8 @@
 	composition rules to tell how to compose (2N+2)th element with
 	the previously composed 2N glyphs.
 
-   COMPONENTS-VEC -- Vector of integers.  In relative composition, the
-	elements are characters to be composed.  In rule-base
+   COMPONENTS-VEC -- Vector of integers.  In a relative composition,
+	the elements are the characters to be composed.  In a rule-base
 	composition, the elements are characters or encoded
 	composition rules.
 
@@ -95,13 +95,13 @@
    get_composition_id checks the validity of `composition' property,
    and, if valid, assigns a new ID, registers the information in
    composition_hash_table and composition_table, and changes the form
-   of the property value.  If the property is invalid, return -1
-   without changing the property value.
+   of the property value.  If the property is invalid,
+   get_composition_id returns -1 without changing the property value.
 
-   We use two tables to keep information about composition;
+   We use two tables to keep the information about composition;
    composition_hash_table and composition_table.
 
-   The former is a hash table in which keys are COMPONENTS-VECs and
+   The former is a hash table whose keys are COMPONENTS-VECs and
    values are the corresponding COMPOSITION-IDs.  This hash table is
    weak, but as each key (COMPONENTS-VEC) is also kept as a value of the
    `composition' property, it won't be collected as garbage until all
@@ -162,8 +162,8 @@
 Lisp_Object Qauto_composition_function;
 Lisp_Object Vcomposition_function_table;
 
-/* Maxinum number of characters to lookback to check
-   auto-composition.  */
+/* Maximum number of characters to look back for
+   auto-compositions.  */
 #define MAX_AUTO_COMPOSITION_LOOKBACK 3
 
 EXFUN (Fremove_list_of_text_properties, 4);
@@ -1011,7 +1011,7 @@
 
 /* Update cmp_it->stop_pos to the next position after CHARPOS (and
    BYTEPOS) where character composition may happen.  If BYTEPOS is
-   negative, compoute it.  If it is a static composition, set
+   negative, compute it.  If it is a static composition, set
    cmp_it->ch to -1.  Otherwise, set cmp_it->ch to the character that
    triggers a automatic composition.  */
 
@@ -1241,7 +1241,7 @@
   unsigned char *p;
 };
 
-/* Update the members of POSTION to the next character boundary.  */
+/* Update the members of POSITION to the next character boundary.  */
 #define FORWARD_CHAR(POSITION, STOP)					\
   do {									\
     (POSITION).pos++;							\
@@ -1257,7 +1257,7 @@
       }									\
   } while (0)
 
-/* Update the members of POSTION to the previous character boundary.  */
+/* Update the members of POSITION to the previous character boundary.  */
 #define BACKWARD_CHAR(POSITION, STOP)		\
   do {						\
     if ((POSITION).pos == STOP)			\
@@ -1429,7 +1429,7 @@
 	    }
 	  if (need_adjustment)
 	    {
-	      /* As we have called Lisp, there's a possibilily that
+	      /* As we have called Lisp, there's a possibility that
 		 buffer/string is relocated.  */
 	      if (NILP (string))
 		cur.p  = BYTE_POS_ADDR (cur.pos_byte);
--- a/src/eval.c	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/eval.c	Mon Apr 26 10:22:02 2010 +0900
@@ -2786,7 +2786,6 @@
   if (NILP (arg))
     RETURN_UNGCPRO (Ffuncall (1, &fn));
   gcpro1.nvars = 2;
-#ifdef NO_ARG_ARRAY
   {
     Lisp_Object args[2];
     args[0] = fn;
@@ -2794,9 +2793,6 @@
     gcpro1.var = args;
     RETURN_UNGCPRO (Fapply (2, args));
   }
-#else /* not NO_ARG_ARRAY */
-  RETURN_UNGCPRO (Fapply (2, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn on no arguments */
@@ -2817,7 +2813,6 @@
      Lisp_Object fn, arg1;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[2];
 
   args[0] = fn;
@@ -2825,11 +2820,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 2;
   RETURN_UNGCPRO (Ffuncall (2, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 2;
-  RETURN_UNGCPRO (Ffuncall (2, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn with 2 arguments arg1, arg2 */
@@ -2839,7 +2829,6 @@
      Lisp_Object fn, arg1, arg2;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[3];
   args[0] = fn;
   args[1] = arg1;
@@ -2847,11 +2836,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 3;
   RETURN_UNGCPRO (Ffuncall (3, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 3;
-  RETURN_UNGCPRO (Ffuncall (3, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn with 3 arguments arg1, arg2, arg3 */
@@ -2861,7 +2845,6 @@
      Lisp_Object fn, arg1, arg2, arg3;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[4];
   args[0] = fn;
   args[1] = arg1;
@@ -2870,11 +2853,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 4;
   RETURN_UNGCPRO (Ffuncall (4, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 4;
-  RETURN_UNGCPRO (Ffuncall (4, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */
@@ -2884,7 +2862,6 @@
      Lisp_Object fn, arg1, arg2, arg3, arg4;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[5];
   args[0] = fn;
   args[1] = arg1;
@@ -2894,11 +2871,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 5;
   RETURN_UNGCPRO (Ffuncall (5, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 5;
-  RETURN_UNGCPRO (Ffuncall (5, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */
@@ -2908,7 +2880,6 @@
      Lisp_Object fn, arg1, arg2, arg3, arg4, arg5;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[6];
   args[0] = fn;
   args[1] = arg1;
@@ -2919,11 +2890,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 6;
   RETURN_UNGCPRO (Ffuncall (6, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 6;
-  RETURN_UNGCPRO (Ffuncall (6, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */
@@ -2933,7 +2899,6 @@
      Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[7];
   args[0] = fn;
   args[1] = arg1;
@@ -2945,11 +2910,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 7;
   RETURN_UNGCPRO (Ffuncall (7, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 7;
-  RETURN_UNGCPRO (Ffuncall (7, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */
@@ -2959,7 +2919,6 @@
      Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7;
 {
   struct gcpro gcpro1;
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[8];
   args[0] = fn;
   args[1] = arg1;
@@ -2972,11 +2931,6 @@
   GCPRO1 (args[0]);
   gcpro1.nvars = 8;
   RETURN_UNGCPRO (Ffuncall (8, args));
-#else /* not NO_ARG_ARRAY */
-  GCPRO1 (fn);
-  gcpro1.nvars = 8;
-  RETURN_UNGCPRO (Ffuncall (8, &fn));
-#endif /* not NO_ARG_ARRAY */
 }
 
 /* The caller should GCPRO all the elements of ARGS.  */
--- a/src/fns.c	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/fns.c	Mon Apr 26 10:22:02 2010 +0900
@@ -392,14 +392,10 @@
 concat2 (s1, s2)
      Lisp_Object s1, s2;
 {
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[2];
   args[0] = s1;
   args[1] = s2;
   return concat (2, args, Lisp_String, 0);
-#else
-  return concat (2, &s1, Lisp_String, 0);
-#endif /* NO_ARG_ARRAY */
 }
 
 /* ARGSUSED */
@@ -407,15 +403,11 @@
 concat3 (s1, s2, s3)
      Lisp_Object s1, s2, s3;
 {
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[3];
   args[0] = s1;
   args[1] = s2;
   args[2] = s3;
   return concat (3, args, Lisp_String, 0);
-#else
-  return concat (3, &s1, Lisp_String, 0);
-#endif /* NO_ARG_ARRAY */
 }
 
 DEFUN ("append", Fappend, Sappend, 0, MANY, 0,
@@ -2344,14 +2336,10 @@
 nconc2 (s1, s2)
      Lisp_Object s1, s2;
 {
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[2];
   args[0] = s1;
   args[1] = s2;
   return Fnconc (2, args);
-#else
-  return Fnconc (2, &s1);
-#endif /* NO_ARG_ARRAY */
 }
 
 DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0,
--- a/src/m/alpha.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/alpha.h	Mon Apr 26 10:22:02 2010 +0900
@@ -41,11 +41,6 @@
 
 #undef WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.  */
 
--- a/src/m/amdx86-64.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/amdx86-64.h	Mon Apr 26 10:22:02 2010 +0900
@@ -38,11 +38,6 @@
 
 #undef WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically:
    Ones defined so far include vax, m68000, ns16000, pyramid,
@@ -72,30 +67,12 @@
 /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
 #undef DATA_SEG_BITS
 
-#ifdef __FreeBSD__
-
-/* The libraries for binaries native to the build host's architecture are
-   installed under /usr/lib in FreeBSD, and the ones that need special paths
-   are 32-bit compatibility libraries (installed under /usr/lib32).  To build
-   a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib.  */
+#ifdef __OpenBSD__
 
 #undef START_FILES
-#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
-
-/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
-   The reason is that some functions in libgcc.a call functions from libc.a,
-   and some libc.a functions need functions from libgcc.a.  Since most
-   versions of ld are one-pass linkers, we need to mention -lgcc twice,
-   or else we risk getting unresolved externals.  */
+#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o
 #undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
-
-#elif defined(__OpenBSD__)
-
-#undef START_FILES
-#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o
-#undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o
 
 #elif defined(__NetBSD__)
 
@@ -110,19 +87,25 @@
 
 /* LIB_STANDARD and START_FILES set correctly in s/darwin.h */
 
-#else /* !__OpenBSD__ && !__FreeBSD__ && !__NetBSD__ && !SOLARIS2
-         && !__APPLE__ */
+#else /* !__OpenBSD__ && !__NetBSD__ && !SOLARIS2 && !__APPLE__ */
+/* CRT_DIR defaults to /usr/lib.  On GNU/Linux, it may be /usr/lib64.
+   On FreeBSD, the libraries for binaries native to the build host's
+   architecture are installed under /usr/lib, and the ones that need
+   special paths are 32-bit compatibility libraries (installed under
+   /usr/lib32).  So to build a native binary of Emacs on FreeBSD/amd64
+   we can just point to /usr/lib.
+ */
+#undef START_FILES
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
 /* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
    The reason is that some functions in libgcc.a call functions from libc.a,
    and some libc.a functions need functions from libgcc.a.  Since most
    versions of ld are one-pass linkers, we need to mention -lgcc twice,
    or else we risk getting unresolved externals.  */
-#undef START_FILES
 #undef LIB_STANDARD
-#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
 #define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
 
-#endif /* __FreeBSD__ */
+#endif /* __OpenBSD__ */
 #endif /* !i386 */
 
 /* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e
--- a/src/m/arm.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/arm.h	Mon Apr 26 10:22:02 2010 +0900
@@ -24,16 +24,6 @@
 
 #undef WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  We can't
- * do this on the arm with gcc, since the first 4 args are in registers.  */
-
-#ifdef __GNUC__
-#define NO_ARG_ARRAY
-#else
-#undef NO_ARG_ARRAY
-#endif
-
 #define NO_REMAP
 
 /* armin76@gentoo.org reported that the lgcc_s flag is necessary to
--- a/src/m/hp800.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/hp800.h	Mon Apr 26 10:22:02 2010 +0900
@@ -27,11 +27,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the bit field into an int.  In other words, if bit fields
    are always unsigned.
--- a/src/m/ia64.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/ia64.h	Mon Apr 26 10:22:02 2010 +0900
@@ -26,11 +26,6 @@
 
 #undef WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
-   group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.  */
 
--- a/src/m/ibmrs6000.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/ibmrs6000.h	Mon Apr 26 10:22:02 2010 +0900
@@ -22,11 +22,6 @@
    operating system this machine is likely to run.
    USUAL-OPSYS="aix3-1"  */
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.  */
 
--- a/src/m/ibms390.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/ibms390.h	Mon Apr 26 10:22:02 2010 +0900
@@ -27,11 +27,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
--- a/src/m/ibms390x.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/ibms390x.h	Mon Apr 26 10:22:02 2010 +0900
@@ -40,11 +40,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Define the type to use.  */
 #define EMACS_INT long
 #define EMACS_UINT unsigned long
--- a/src/m/intel386.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/intel386.h	Mon Apr 26 10:22:02 2010 +0900
@@ -39,11 +39,6 @@
 
 #undef WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-/* #define NO_ARG_ARRAY */
-
 #ifdef USG
 #define TEXT_START 0
 #endif /* USG */
@@ -51,7 +46,6 @@
 #ifdef WINDOWSNT
 #define VIRT_ADDR_VARIES
 #define DATA_START 	get_data_start ()
-#define NO_ARG_ARRAY
 #endif
 
 #ifdef GNU_LINUX
--- a/src/m/iris4d.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/iris4d.h	Mon Apr 26 10:22:02 2010 +0900
@@ -23,11 +23,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the bit field into an int.  In other words, if bit fields
    are always unsigned.
--- a/src/m/macppc.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/macppc.h	Mon Apr 26 10:22:02 2010 +0900
@@ -22,11 +22,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Data type of load average, as read out of kmem.  */
 
 #define LOAD_AVE_TYPE long
--- a/src/m/mips.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/mips.h	Mon Apr 26 10:22:02 2010 +0900
@@ -33,11 +33,6 @@
 #define WORDS_BIG_ENDIAN
 #endif
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
--- a/src/m/sh3.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/sh3.h	Mon Apr 26 10:22:02 2010 +0900
@@ -4,7 +4,5 @@
 # define WORDS_BIG_ENDIAN
 #endif
 
-#define NO_ARG_ARRAY
-
 /* arch-tag: 1b01b84f-f044-4afa-aa4b-caa54ec38966
    (do not change this comment) */
--- a/src/m/sparc.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/sparc.h	Mon Apr 26 10:22:02 2010 +0900
@@ -31,11 +31,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* __sparc__ is defined by the compiler by default.  */
 
 /* XINT must explicitly sign-extend
--- a/src/m/template.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/template.h	Mon Apr 26 10:22:02 2010 +0900
@@ -27,11 +27,6 @@
 
 #define WORDS_BIG_ENDIAN
 
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments.  */
-
-#define NO_ARG_ARRAY
-
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.
    Ones defined so far include m68k and many others */
--- a/src/m/xtensa.h	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/m/xtensa.h	Mon Apr 26 10:22:02 2010 +0900
@@ -2,8 +2,6 @@
 
 Add a license notice if this grows to > 10 lines of code.  */
 
-#define NO_ARG_ARRAY
-
 #ifdef __LITTLE_ENDIAN
 #undef WORDS_BIG_ENDIAN
 #else
--- a/src/xdisp.c	Mon Apr 26 09:23:02 2010 +0900
+++ b/src/xdisp.c	Mon Apr 26 10:22:02 2010 +0900
@@ -5259,6 +5259,33 @@
   ++it->sp;
 }
 
+static void
+iterate_out_of_display_property (it)
+     struct it *it;
+{
+  /* Maybe initialize paragraph direction.  If we are at the beginning
+     of a new paragraph, next_element_from_buffer may not have a
+     chance to do that.  */
+  if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
+    bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
+  /* prev_stop can be zero, so check against BEGV as well.  */
+  while (it->bidi_it.charpos >= BEGV
+	 && it->prev_stop <= it->bidi_it.charpos
+	 && it->bidi_it.charpos < CHARPOS (it->position))
+    bidi_get_next_char_visually (&it->bidi_it);
+  /* Record the stop_pos we just crossed, for when we cross it
+     back, maybe.  */
+  if (it->bidi_it.charpos > CHARPOS (it->position))
+    it->prev_stop = CHARPOS (it->position);
+  /* If we ended up not where pop_it put us, resync IT's
+     positional members with the bidi iterator. */
+  if (it->bidi_it.charpos != CHARPOS (it->position))
+    {
+      SET_TEXT_POS (it->position,
+		    it->bidi_it.charpos, it->bidi_it.bytepos);
+      it->current.pos = it->position;
+    }
+}
 
 /* Restore IT's settings from IT->stack.  Called, for example, when no
    more overlay strings must be processed, and we return to delivering
@@ -5309,25 +5336,7 @@
 	     determine the paragraph base direction if the overlay we
 	     just processed is at the beginning of a new
 	     paragraph.  */
-	  if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
-	    bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
-	  /* prev_stop can be zero, so check against BEGV as well.  */
-	  while (it->bidi_it.charpos >= BEGV
-		 && it->prev_stop <= it->bidi_it.charpos
-		 && it->bidi_it.charpos < CHARPOS (it->position))
-	    bidi_get_next_char_visually (&it->bidi_it);
-	  /* Record the stop_pos we just crossed, for when we cross it
-	     back, maybe.  */
-	  if (it->bidi_it.charpos > CHARPOS (it->position))
-	    it->prev_stop = CHARPOS (it->position);
-	  /* If we ended up not where pop_it put us, resync IT's
-	     positional members with the bidi iterator. */
-	  if (it->bidi_it.charpos != CHARPOS (it->position))
-	    {
-	      SET_TEXT_POS (it->position,
-			    it->bidi_it.charpos, it->bidi_it.bytepos);
-	      it->current.pos = it->position;
-	    }
+	  iterate_out_of_display_property (it);
 	}
       break;
     case GET_FROM_STRING:
@@ -17969,17 +17978,19 @@
 	}
       else if (row->used[TEXT_AREA] && max_pos)
 	{
-	  SET_TEXT_POS (tpos, max_pos + 1, CHAR_TO_BYTE (max_pos + 1));
+	  SET_TEXT_POS (tpos, max_pos, CHAR_TO_BYTE (max_pos));
+	  save_it = *it;
+	  it->bidi_p = 0;
+	  reseat (it, tpos, 0);
+	  if (!get_next_display_element (it))
+	    abort ();	/* row at ZV was already handled above */
+	  set_iterator_to_next (it, 1);
 	  row_end = it->current;
-	  row_end.pos = tpos;
 	  /* If the character at max_pos+1 is a newline, skip that as
 	     well.  Note that this may skip some invisible text.  */
-	  if (FETCH_CHAR (tpos.bytepos) == '\n'
-	      || (FETCH_CHAR (tpos.bytepos) == '\r' && it->selective))
-	    {
-	      save_it = *it;
-	      it->bidi_p = 0;
-	      reseat_1 (it, tpos, 0);
+	  if (get_next_display_element (it)
+	      && ITERATOR_AT_END_OF_LINE_P (it))
+	    {
 	      set_iterator_to_next (it, 1);
 	      /* Record the position after the newline of a continued
 		 row.  We will need that to set ROW->end of the last
@@ -17994,7 +18005,6 @@
 		  row_end = it->current;
 		  save_it.eol_pos.charpos = save_it.eol_pos.bytepos = 0;
 		}
-	      *it = save_it;
 	    }
 	  else if (!row->continued_p
 		   && MATRIX_ROW_CONTINUATION_LINE_P (row)
@@ -18008,6 +18018,7 @@
 	      row_end.pos = it->eol_pos;
 	      it->eol_pos.charpos = it->eol_pos.bytepos = 0;
 	    }
+	  *it = save_it;
 	  row->end = row_end;
 	}
     }