changeset 4918:c914214b788d

Automatic merge
author Ben Wing <ben@xemacs.org>
date Wed, 03 Feb 2010 02:56:21 -0600
parents bedf3747a6d7 (diff) fce43cb76a1c (current diff)
children a96517f26e3a d2ec55325515
files src/ChangeLog src/toolbar-common.c src/toolbar-common.h src/xgccache.c src/xgccache.h
diffstat 15 files changed, 149 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Wed Feb 03 02:46:50 2010 -0600
+++ b/lib-src/ChangeLog	Wed Feb 03 02:56:21 2010 -0600
@@ -1,3 +1,7 @@
+2010-02-01  Vin Shelton  <acs@xemacs.org>
+
+	* make-mswin-unicode.pl: Add description of override.
+
 2010-01-30  Ben Wing  <ben@xemacs.org>
 
 	* make-mswin-unicode.pl:
--- a/lib-src/make-mswin-unicode.pl	Wed Feb 03 02:46:50 2010 -0600
+++ b/lib-src/make-mswin-unicode.pl	Wed Feb 03 02:56:21 2010 -0600
@@ -63,6 +63,8 @@
 yes indicates a function to be automatically Unicode-encapsulated.
    (All parameters either need no special processing or are LPTSTR or
    LPCTSTR.)
+override indidates a function where the prototype can be overridden
+   due to errors in Cygwin or Visual Studio.
 soon indicates a function that should be automatically Unicode-encapsulated,
    but we're not ready to process it yet.
 no indicates a function we don't support (it will be #defined to cause
--- a/lisp/ChangeLog	Wed Feb 03 02:46:50 2010 -0600
+++ b/lisp/ChangeLog	Wed Feb 03 02:56:21 2010 -0600
@@ -1,3 +1,21 @@
+2010-02-01  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* loadhist.el (symbol-file):
+	If #'built-in-symbol-file returns a Lisp file name, and
+	source-lisp is readable, construct a full pathname to include
+	that. Otherwise use lisp-directory, as we used to.
+	* loadup.el:
+	Delete load-history entries for those files in
+	preloaded-file-list; unloading the associated features makes very
+	little sense, and the symbol file information can be had from DOC.
+
+2010-02-01  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* cl-macs.el (equalp):
+	Remove special treatment for an #'equalp with a single character
+	constant argument, it was incorrect (it used #'downcase instead of
+	#'canoncase).
+
 2010-02-01  Ben Wing  <ben@xemacs.org>
 
 	* cl-extra.el:
--- a/lisp/cl-macs.el	Wed Feb 03 02:46:50 2010 -0600
+++ b/lisp/cl-macs.el	Wed Feb 03 02:56:21 2010 -0600
@@ -3412,12 +3412,6 @@
 	     ;; No need to protect against multiple evaluation here:
 	     `(and (member ,original-y '("" #* [])) t))
 	    (t form)))
-	  ((unordered-check (and (characterp x) (not (cl-const-expr-p y))))
-	   `(,@let-form
-	     (or (eq ,x ,y)
-		 ;; eq has a bytecode, char-equal doesn't.
-		 (and (characterp ,y)
-		      (eq (downcase ,x) (downcase ,y))))))
 	  ((unordered-check (and (numberp x) (not (cl-const-expr-p y))))
 	   `(,@let-form
 	     (and (numberp ,y)
--- a/lisp/loadhist.el	Wed Feb 03 02:46:50 2010 -0600
+++ b/lisp/loadhist.el	Wed Feb 03 02:56:21 2010 -0600
@@ -90,7 +90,10 @@
         ;; This is a bit heuristic, but shouldn't realistically be a
         ;; problem:
         (if (string-match "\.elc?$" built-in-file)
-            (concat lisp-directory built-in-file)
+            (concat (if (file-readable-p source-lisp)
+			source-lisp
+		      lisp-directory)
+		    built-in-file)
           (concat source-directory "/src/" built-in-file))))))
 
 (defun feature-symbols (feature)
--- a/lisp/loadup.el	Wed Feb 03 02:46:50 2010 -0600
+++ b/lisp/loadup.el	Wed Feb 03 02:56:21 2010 -0600
@@ -218,8 +218,12 @@
 ;; See also "site-load" above.
 (when (stringp site-start-file)
   (load "site-init" t))
-;; Add information from this file to the load history:
-(setq load-history (cons (nreverse current-load-list) load-history)
+
+;; Add information from this file to the load history. Delete information
+;; for those files in preloaded-file-list; the symbol file information can
+;; be taken from DOC, and #'unload-feature makes very little sense for
+;; dumped functionality.
+(setq load-history (cons (nreverse current-load-list) (last load-history))
       ;; Clear current-load-list; this (and adding information to
       ;; load-history) is normally done in lread.c after reading the
       ;; entirety of a file, something which never happens for loadup.el.
@@ -227,12 +231,6 @@
 ;; Make the path to this file look a little nicer: 
 (setcar (car load-history) (file-truename (caar load-history)))
 
-;; Make #'find-function behave better with dumped files.
-(let ((source-lisp (concat "^" (regexp-quote source-lisp))))
-  (mapc
-   #'(lambda (elt) (setcar elt (replace-in-string (car elt) source-lisp "")))
-   load-history))
-
 (garbage-collect)
 
 ;;; At this point, we're ready to resume undo recording for scratch.
--- a/src/ChangeLog	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/ChangeLog	Wed Feb 03 02:56:21 2010 -0600
@@ -1,3 +1,33 @@
+2010-02-02  Ben Wing  <ben@xemacs.org>
+
+	* bytecode.c (execute_rare_opcode):
+	* lisp.h (abort_with_msg): New.
+	When aborting due to unknown opcode, output more descriptive msg.
+
+2010-02-01  Vin Shelton  <acs@xemacs.org>
+
+	* intl-encap-win32.c: Added description of override keyword.
+	Fix 2nd arg to CreateMDIWindowW.
+
+	* intl-auto-encap-win32.c:
+	* intl-auto-encap-win32.h: Fix 2nd arg to qxeCreateMDIWindow.
+
+2010-02-01  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* fns.c (internal_equalp):
+	Use bytecode_arithcompare, which takes two args, instead of
+	passing a stack pointer to Feqlsign.
+	Use CANONCASE(), not DOWNCASE(), for case-insensitive character
+	comparison.
+	Correct a comment here.
+	* casefiddle.c (casify_object): New operation in this function,
+	CASE_CANONICALIZE.
+	(Fcanoncase): New function, used for case-insensitive comparison.
+	* lisp.h:
+	Make Fcanoncase, bytecode_arithcompare visible here.
+	* bytecode.c (bytecode_arithcompare):
+	Make this visible to other files.
+
 2010-02-03  Ben Wing  <ben@xemacs.org>
 
 	* Makefile.in.in:
@@ -327,6 +357,16 @@
 	* keymap.c (keymap_hash):
 	Implement.
 	
+2010-02-01  Ben Wing  <ben@xemacs.org>
+
+	* syntax.c:
+	* syntax.c (scan_lists):
+	* syntax.c (syms_of_syntax):
+	Declare `scan-error' as a type of `syntax-error'.  In `scan-lists'
+	et al., don't signal a syntax error but instead a `scan-error', and
+	pass a couple of integer arguments, for GNU compatibility.  Fixes
+	problems with typing double-quote in texinfo.el.
+
 2010-01-31  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* symbols.c (Fspecial_operator_p, syms_of_symbols):
--- a/src/bytecode.c	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/bytecode.c	Wed Feb 03 02:56:21 2010 -0600
@@ -330,7 +330,7 @@
 
 /* We have our own two-argument versions of various arithmetic ops.
    Only two-argument arithmetic operations have their own byte codes. */
-static int
+int
 bytecode_arithcompare (Lisp_Object obj1, Lisp_Object obj2)
 {
 #ifdef WITH_NUMBER_TYPES
@@ -1738,7 +1738,11 @@
       }
 
     default:
-      ABORT();
+      {
+	Ascbyte msg[100];
+	sprintf (msg, "Unknown opcode %d", opcode);
+	abort_with_msg (msg);
+      }
       break;
     }
   return stack_ptr;
--- a/src/casefiddle.c	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/casefiddle.c	Wed Feb 03 02:56:21 2010 -0600
@@ -28,7 +28,8 @@
 #include "insdel.h"
 #include "syntax.h"
 
-enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP};
+enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP,
+                  CASE_CANONICALIZE};
 
 static Lisp_Object
 casify_object (enum case_action flag, Lisp_Object string_or_char,
@@ -43,7 +44,19 @@
       Ichar c;
       CHECK_CHAR_COERCE_INT (string_or_char);
       c = XCHAR (string_or_char);
-      c = (flag == CASE_DOWN) ? DOWNCASE (buf, c) : UPCASE (buf, c);
+      if (flag == CASE_DOWN)
+	{
+	  c = DOWNCASE (buf, c);
+	}
+      else if (flag == CASE_UP)
+	{
+	  c = UPCASE (buf, c);
+	}
+      else
+	{
+	  c = CANONCASE (buf, c);
+	}
+
       return make_char (c);
     }
 
@@ -68,6 +81,9 @@
 	    case CASE_DOWN:
 	      c = DOWNCASE (buf, c);
 	      break;
+	    case CASE_CANONICALIZE:
+	      c = CANONCASE (buf, c);
+	      break;
 	    case CASE_CAPITALIZE:
 	    case CASE_CAPITALIZE_UP:
 	      wordp_prev = wordp;
@@ -119,6 +135,23 @@
   return casify_object (CASE_DOWN, string_or_char, buffer);
 }
 
+DEFUN ("canoncase", Fcanoncase, 1, 2, 0, /*
+Convert STRING-OR-CHAR to its canonical lowercase form and return that.
+
+STRING-OR-CHAR may be a character or string.  The result has the same type.
+STRING-OR-CHAR is not altered--the value is a copy.
+
+Optional second arg BUFFER specifies which buffer's case tables to use,
+and defaults to the current buffer.
+
+For any N characters that are equivalent in case-insensitive searching,
+their canonical lowercase character will be the same.
+*/
+       (string_or_char, buffer))
+{
+  return casify_object (CASE_CANONICALIZE, string_or_char, buffer);
+}
+
 DEFUN ("capitalize", Fcapitalize, 1, 2, 0, /*
 Convert STRING-OR-CHAR to capitalized form and return that.
 This means that each word's first character is upper case
@@ -331,6 +364,7 @@
 {
   DEFSUBR (Fupcase);
   DEFSUBR (Fdowncase);
+  DEFSUBR (Fcanoncase);
   DEFSUBR (Fcapitalize);
   DEFSUBR (Fupcase_initials);
   DEFSUBR (Fupcase_region);
--- a/src/fns.c	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/fns.c	Wed Feb 03 02:56:21 2010 -0600
@@ -2888,15 +2888,12 @@
   /* 2. If both numbers, compare with `='. */
   if (NUMBERP (obj1) && NUMBERP (obj2))
     {
-      Lisp_Object args[2];
-      args[0] = obj1;
-      args[1] = obj2;
-      return !NILP (Feqlsign (2, args));
+      return (0 == bytecode_arithcompare (obj1, obj2));
     }
 
   /* 3. If characters, compare case-insensitively. */
   if (CHARP (obj1) && CHARP (obj2))
-    return DOWNCASE (0, XCHAR (obj1)) == DOWNCASE (0, XCHAR (obj2));
+    return CANONCASE (0, XCHAR (obj1)) == CANONCASE (0, XCHAR (obj2));
 
   /* 4. If arrays of different types, compare their lengths, and
         then compare element-by-element. */
@@ -2909,7 +2906,7 @@
 	EMACS_INT i;
 	EMACS_INT l1 = XINT (Flength (obj1));
 	EMACS_INT l2 = XINT (Flength (obj2));
-	/* Both arrays, but of different types */
+	/* Both arrays, but of different lengths */
 	if (l1 != l2)
 	  return 0;
 	for (i = 0; i < l1; i++)
--- a/src/intl-auto-encap-win32.c	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/intl-auto-encap-win32.c	Wed Feb 03 02:56:21 2010 -0600
@@ -947,16 +947,16 @@
          Header file claims:
            WINUSERAPI HWND WINAPI CreateMDIWindow(LPCWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM)
          Overridden with:
-           HWND CreateMDIWindow(LPWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM)
+           HWND CreateMDIWindow(LPWSTR,LPWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM)
          Differences in return-type qualifiers, e.g. WINAPI, are not important.
  */
 HWND
-qxeCreateMDIWindow (Extbyte * arg1, const Extbyte * arg2, DWORD arg3, int arg4, int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9, LPARAM arg10)
-{
-  if (XEUNICODE_P)
-    return CreateMDIWindowW ((LPWSTR) arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
-  else
-    return CreateMDIWindowA ((LPSTR) arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+qxeCreateMDIWindow (Extbyte * arg1, Extbyte * arg2, DWORD arg3, int arg4, int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9, LPARAM arg10)
+{
+  if (XEUNICODE_P)
+    return CreateMDIWindowW ((LPWSTR) arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+  else
+    return CreateMDIWindowA ((LPSTR) arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
 }
 
 HWND
--- a/src/intl-auto-encap-win32.h	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/intl-auto-encap-win32.h	Wed Feb 03 02:56:21 2010 -0600
@@ -661,7 +661,7 @@
 #undef CreateMDIWindow
 #define CreateMDIWindow error_use_qxeCreateMDIWindow_or_CreateMDIWindowA_and_CreateMDIWindowW
 #endif
-HWND qxeCreateMDIWindow (Extbyte * arg1, const Extbyte * arg2, DWORD arg3, int arg4, int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9, LPARAM arg10);
+HWND qxeCreateMDIWindow (Extbyte * arg1, Extbyte * arg2, DWORD arg3, int arg4, int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9, LPARAM arg10);
 
 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
 #undef CreateWindowEx
--- a/src/intl-encap-win32.c	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/intl-encap-win32.c	Wed Feb 03 02:56:21 2010 -0600
@@ -51,6 +51,8 @@
 yes indicates a function to be automatically Unicode-encapsulated.
    (All parameters either need no special processing or are LPTSTR or
    LPCTSTR.)
+override indidates a function where the prototype can be overridden
+   due to errors in Cygwin or Visual Studio.
 soon indicates a function that should be automatically Unicode-encapsulated,
    but we're not ready to process it yet.
 no indicates a function we don't support (it will be #defined to cause
@@ -429,7 +431,7 @@
 yes DlgDirSelectComboBoxEx
 yes DefFrameProc
 no DefMDIChildProc return value is conditionalized on _MAC, messes up parser
-override HWND CreateMDIWindowW(LPWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM); error arg 1, VS6 prototype, missing const
+override HWND CreateMDIWindowW(LPWSTR,LPWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM); error arg 1, VS6 prototype, missing const
 yes WinHelp
 no ChangeDisplaySettings split-sized LPDEVMODE
 no ChangeDisplaySettingsEx split-sized LPDEVMODE; NT 5.0/Win98+ only
--- a/src/lisp.h	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/lisp.h	Wed Feb 03 02:56:21 2010 -0600
@@ -1253,7 +1253,8 @@
 /* Highly dubious kludge */
 /*   (thanks, Jamie, I feel better now -- ben) */
 MODULE_API void assert_failed (const Ascbyte *, int, const Ascbyte *);
-#define ABORT() (assert_failed (__FILE__, __LINE__, "ABORT()"))
+#define ABORT() assert_failed (__FILE__, __LINE__, "ABORT()")
+#define abort_with_msg(msg) assert_failed (__FILE__, __LINE__, msg)
 
 /* This used to be ((void) (0)) but that triggers lots of unused variable
    warnings.  It's pointless to force all that code to be rewritten, with
@@ -4388,6 +4389,7 @@
 
 /* Defined in casefiddle.c */
 EXFUN (Fdowncase, 2);
+EXFUN (Fcanoncase, 2);
 EXFUN (Fupcase, 2);
 EXFUN (Fupcase_initials, 2);
 EXFUN (Fupcase_initials_region, 3);
@@ -5119,6 +5121,7 @@
 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object);
 Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
 Lisp_Object bytecode_nconc2 (Lisp_Object *);
+int bytecode_arithcompare (Lisp_Object obj1, Lisp_Object obj2);
 void check_losing_bytecode (const char *, Lisp_Object);
 
 Lisp_Object add_suffix_to_symbol (Lisp_Object symbol,
--- a/src/syntax.c	Wed Feb 03 02:46:50 2010 -0600
+++ b/src/syntax.c	Wed Feb 03 02:56:21 2010 -0600
@@ -69,6 +69,8 @@
 /* A value that is guaranteed not be in a syntax table. */
 Lisp_Object Vbogus_syntax_table_value;
 
+Lisp_Object Qscan_error;
+
 static void syntax_cache_table_was_changed (struct buffer *buf);
 
 /* This is the internal form of the parse state used in parse-partial-sexp.  */
@@ -1353,6 +1355,7 @@
   int syncode;
   int min_depth = depth;    /* Err out if depth gets less than this. */
   struct syntax_cache *scache;
+  Charbpos last_good = from;
   
   if (depth > 0) min_depth = 0;
 
@@ -1370,6 +1373,8 @@
 	  c = BUF_FETCH_CHAR (buf, from);
 	  syncode = SYNTAX_CODE_FROM_CACHE (scache, c);
 	  code = SYNTAX_FROM_CODE (syncode);
+	  if (depth == min_depth)
+	    last_good = from;
 	  from++;
 
 	  /* a 1-char comment start sequence */
@@ -1483,8 +1488,9 @@
 	      {
 		if (noerror)
 		  return Qnil;
-		syntax_error ("Containing expression ends prematurely",
-			      Qunbound);
+		signal_error_2 (Qscan_error,
+				"Containing expression ends prematurely",
+				make_int (last_good), make_int (from));
 	      }
 	    break;
 
@@ -1656,8 +1662,9 @@
 	      {
 		if (noerror)
 		  return Qnil;
-		syntax_error ("Containing expression ends prematurely",
-			      Qunbound);
+		signal_error_2 (Qscan_error,
+				"Containing expression ends prematurely",
+				make_int (last_good), make_int (from));
 	      }
 	    break;
 
@@ -1727,7 +1734,8 @@
 
 lose:
   if (!noerror)
-    syntax_error ("Unbalanced parentheses", Qunbound);
+    signal_error_2 (Qscan_error, "Unbalanced parentheses",
+		    make_int (last_good), make_int (from));
   return Qnil;
 }
 
@@ -2418,6 +2426,8 @@
   DEFSUBR (Fscan_sexps);
   DEFSUBR (Fbackward_prefix_chars);
   DEFSUBR (Fparse_partial_sexp);
+
+  DEFERROR_STANDARD (Qscan_error, Qsyntax_error);
 }
 
 void