changeset 523:cd662ad69f40

[xemacs-hg @ 2001-05-09 13:43:49 by ben] regex.c: fix error compiling regexps with back-references in them. xemacs.mak: do not warn about gtk when we're not trying to compile with it. font.el, gtk-widget-accessors.el, widgets-gtk.el, x-font-menu.el: fix byte-compilation warnings. etags.c: temporary fix to avoid crashes with new regex code. PROBLEMS: i swear i already committed this.
author ben
date Wed, 09 May 2001 13:43:58 +0000
parents 19559cacc941
children 1f4790508db6
files lib-src/ChangeLog lib-src/etags.c lisp/ChangeLog lisp/auto-autoloads.el lisp/font.el lisp/gtk-widget-accessors.el lisp/widgets-gtk.el lisp/x-font-menu.el nt/ChangeLog nt/xemacs.mak src/ChangeLog src/regex.c
diffstat 12 files changed, 78 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Wed May 09 11:48:28 2001 +0000
+++ b/lib-src/ChangeLog	Wed May 09 13:43:58 2001 +0000
@@ -1,3 +1,8 @@
+2001-05-09  Ben Wing  <ben@xemacs.org>
+
+	* etags.c (add_regex):
+	temporary fix to avoid crashes with new regex code.
+
 2001-05-09  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.5.1 "anise" is released.
--- a/lib-src/etags.c	Wed May 09 11:48:28 2001 +0000
+++ b/lib-src/etags.c	Wed May 09 13:43:58 2001 +0000
@@ -5163,6 +5163,8 @@
   (void) scan_separators (name);
 
   patbuf = xnew (1, struct re_pattern_buffer);
+  memset (patbuf, 0, sizeof (struct re_pattern_buffer));
+
   /* Translation table to fold case if appropriate. */
   patbuf->translate = (ignore_case) ? lc_trans : NULL;
   patbuf->fastmap = NULL;
--- a/lisp/ChangeLog	Wed May 09 11:48:28 2001 +0000
+++ b/lisp/ChangeLog	Wed May 09 13:43:58 2001 +0000
@@ -1,3 +1,24 @@
+2001-05-09  Ben Wing  <ben@xemacs.org>
+
+	* font.el (bold): New.
+	* font.el (italic): New.
+	* font.el (oblique): New.
+	* font.el (dim): New.
+	* font.el (underline): New.
+	* font.el (overline): New.
+	* font.el (linethrough): New.
+	* font.el (strikethru): New.
+	* font.el (reverse): New.
+	* font.el (blink): New.
+	* font.el (smallcaps): New.
+	* font.el (bigcaps): New.
+	* font.el (dropcaps): New.
+	* gtk-widget-accessors.el (import-widget-accessors):
+	* widgets-gtk.el (gtk-widget-instantiate-internal):
+	* x-font-menu.el (x-font-menu-font-data): New.
+	* x-font-menu.el (x-font-menu-load-font):
+	fix byte-compilation warnings.
+
 2001-05-09  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.5.1 "anise" is released.
--- a/lisp/auto-autoloads.el	Wed May 09 11:48:28 2001 +0000
+++ b/lisp/auto-autoloads.el	Wed May 09 13:43:58 2001 +0000
@@ -1982,7 +1982,7 @@
 
 ;;;***
 
-;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el")
+;;;### (autoloads (x-font-menu-font-data x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el")
 
 (autoload 'x-reset-device-font-menus "x-font-menu" "\
 Generates the `Font', `Size', and `Weight' submenus for the Options menu.
@@ -1992,7 +1992,7 @@
 when they are selected for the first time.  If you add fonts to your system, 
 or if you change your font path, you can call this to re-initialize the menus." nil nil)
 
-(defun* x-font-menu-font-data (face dcache) (defvar x-font-regexp) (defvar x-font-regexp-foundry-and-family) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant)))
+(autoload 'x-font-menu-font-data "x-font-menu" nil nil nil)
 
 ;;;***
 
--- a/lisp/font.el	Wed May 09 11:48:28 2001 +0000
+++ b/lisp/font.el	Wed May 09 13:43:58 2001 +0000
@@ -33,7 +33,9 @@
 (globally-declare-fboundp
  '(x-list-fonts
    mswindows-list-fonts ns-list-fonts internal-facep fontsetp get-font-info
-   get-fontset-info mswindows-define-rgb-color cancel-function-timers))
+   get-fontset-info mswindows-define-rgb-color cancel-function-timers
+   ;; #### perhaps we should rewrite font-warn to avoid the warning
+   font-warn))
 
 (globally-declare-boundp
  '(global-face-data
@@ -222,20 +224,19 @@
 					(format "font-%s-mask" attr)))))))
        )))
 
-(let ((mask 0))
-  (define-new-mask bold        (setq mask (1+ mask)))
-  (define-new-mask italic      (setq mask (1+ mask)))
-  (define-new-mask oblique     (setq mask (1+ mask)))
-  (define-new-mask dim         (setq mask (1+ mask)))
-  (define-new-mask underline   (setq mask (1+ mask)))
-  (define-new-mask overline    (setq mask (1+ mask)))
-  (define-new-mask linethrough (setq mask (1+ mask)))
-  (define-new-mask strikethru  (setq mask (1+ mask)))
-  (define-new-mask reverse     (setq mask (1+ mask)))
-  (define-new-mask blink       (setq mask (1+ mask)))
-  (define-new-mask smallcaps   (setq mask (1+ mask)))
-  (define-new-mask bigcaps     (setq mask (1+ mask)))
-  (define-new-mask dropcaps    (setq mask (1+ mask))))
+(define-new-mask bold        1)
+(define-new-mask italic      2)
+(define-new-mask oblique     3)
+(define-new-mask dim         4)
+(define-new-mask underline   5)
+(define-new-mask overline    6)
+(define-new-mask linethrough 7)
+(define-new-mask strikethru  8)
+(define-new-mask reverse     9)
+(define-new-mask blink       10)
+(define-new-mask smallcaps   11)
+(define-new-mask bigcaps     12)
+(define-new-mask dropcaps    13)
 
 (defvar font-caps-display-table
   (let ((table (make-display-table))
--- a/lisp/gtk-widget-accessors.el	Wed May 09 11:48:28 2001 +0000
+++ b/lisp/gtk-widget-accessors.el	Wed May 09 13:43:58 2001 +0000
@@ -107,6 +107,7 @@
 
 (defun import-widget-accessors (file syms-function-name &rest description)
   "Import multiple widgets, and emit a suitable vars_of_foo() function for them.\n"
+  (declare (special c-mode-common-hook c-mode-hook))
   (let ((c-mode-common-hook nil)
 	(c-mode-hook nil))
     (find-file file))
--- a/lisp/widgets-gtk.el	Wed May 09 11:48:28 2001 +0000
+++ b/lisp/widgets-gtk.el	Wed May 09 13:43:58 2001 +0000
@@ -134,7 +134,6 @@
 					     (gtk-widget-get-style
 					      (frame-property nil 'text-widget))))
 		 widget)
-    (setq x widget)
     widget))
 
 (defun gtk-widget-property-internal ()
--- a/lisp/x-font-menu.el	Wed May 09 11:48:28 2001 +0000
+++ b/lisp/x-font-menu.el	Wed May 09 13:43:58 2001 +0000
@@ -190,7 +190,7 @@
 ;; If the user didn't specify one (with "-dt-*-*", for example)
 ;; get the truename and use the possibly suboptimal data from that.
 ;;;###autoload
-(defun* x-font-menu-font-data (face dcache)
+(defun x-font-menu-font-data (face dcache)
   (let* ((case-fold-search t)
 	 (domain (if font-menu-this-frame-only-p
 				  (selected-frame)
@@ -207,21 +207,22 @@
 	       (string-match x-font-regexp-foundry-and-family truename))
       (setq family (capitalize (match-string 1 truename)))
       (setq entry  (vassoc family (aref dcache 0))))
-    (when (null entry)
-      (return-from x-font-menu-font-data (make-vector 5 nil)))
-    
-    (when (string-match x-font-regexp name)
-      (setq weight (capitalize    (match-string 1 name)))
-      (setq size   (string-to-int (match-string 6 name))))
+
+    (if (null entry)
+	(make-vector 5 nil)
+
+      (when (string-match x-font-regexp name)
+	(setq weight (capitalize    (match-string 1 name)))
+	(setq size   (string-to-int (match-string 6 name))))
       
-    (when (string-match x-font-regexp truename)
-      (when (not (member weight (aref entry 1)))
-	(setq weight (capitalize (match-string 1 truename))))
-      (when (not (member size   (aref entry 2)))
-	(setq size (string-to-int (match-string 6 truename))))
-      (setq slant (capitalize (match-string 2 truename))))
+      (when (string-match x-font-regexp truename)
+	(when (not (member weight (aref entry 1)))
+	  (setq weight (capitalize (match-string 1 truename))))
+	(when (not (member size   (aref entry 2)))
+	  (setq size (string-to-int (match-string 6 truename))))
+	(setq slant (capitalize (match-string 2 truename))))
       
-    (vector entry family size weight slant)))
+      (vector entry family size weight slant))))
 
 (defun x-font-menu-load-font (family weight size slant resolution)
   "Try to load a font with the requested properties.
--- a/nt/ChangeLog	Wed May 09 11:48:28 2001 +0000
+++ b/nt/ChangeLog	Wed May 09 13:43:58 2001 +0000
@@ -1,3 +1,8 @@
+2001-05-09  Ben Wing  <ben@xemacs.org>
+
+	* xemacs.mak (OS):
+	do not warn about gtk when we're not trying to compile with it.
+
 2001-05-09  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.5.1 "anise" is released.
--- a/nt/xemacs.mak	Wed May 09 11:48:28 2001 +0000
+++ b/nt/xemacs.mak	Wed May 09 13:43:58 2001 +0000
@@ -1500,19 +1500,10 @@
 !endif
 !if $(HAVE_GTK)
   --------------------------------------------------------------------
-  WARNING: Compiling WITHOUT GTK support.
-  WARNING: As of xemacs-21.2-b44
-  WARNING: gtk-xemacs is not supported on MSWindows (mingw or msvc).
-  WARNING: Yes, we know that gtk has been ported to native MSWindows
-  WARNING: but XEmacs is not yet ready to use that port.
-  --------------------------------------------------------------------
-!else
-  --------------------------------------------------------------------
-  WARNING: Compiling without GTK support.
-  WARNING: As of xemacs-21.2-b44
-  WARNING: gtk-xemacs is not supported on MSWindows (mingw or msvc).
-  WARNING: Yes, we know that gtk has been ported to native MSWindows
-  WARNING: but XEmacs is not yet ready to use that port.
+  WARNING: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
+  WARNING: gtk-xemacs is not currently supported on MSWindows (mingw or msvc).
+  WARNING: Yes, we know that gtk has been ported to native MSWindows, but
+  WARNING: XEmacs is not yet ready to use that port.
   --------------------------------------------------------------------
 !endif
 !if $(HAVE_XPM)
--- a/src/ChangeLog	Wed May 09 11:48:28 2001 +0000
+++ b/src/ChangeLog	Wed May 09 13:43:58 2001 +0000
@@ -1,3 +1,8 @@
+2001-05-09  Ben Wing  <ben@xemacs.org>
+
+	* regex.c (regex_compile):
+	fix error compiling regexps with back-references in them.
+
 2001-05-09  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.5.1 "anise" is released.
--- a/src/regex.c	Wed May 09 11:48:28 2001 +0000
+++ b/src/regex.c	Wed May 09 13:43:58 2001 +0000
@@ -3087,6 +3087,8 @@
 			else
 			  PATUNFETCH;
 		      }
+		    else
+		      PATUNFETCH;
 		  }
 		  
 		if (reg > bufp->re_nsub)