File xemacs.patch of Package xemacs

diff -Nru xemacs-21.5.20.orig/.pkgextract xemacs-21.5.20/.pkgextract
--- xemacs-21.5.20.orig/.pkgextract	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/.pkgextract	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,12 @@
+(cd ../; tar xkfI xemacs-21.4.3-info.tar.bz2)
+rm -f    mule-packages
+rm -f    xemacs-packages
+tar xkfI ../xemacs-mule-sumo-2001-04-08.tar.bz2
+rm -f    lib-src/pstogif
+tar xkfI ../xemacs-sumo-2001-04-08.tar.bz2
+patch -p0 -s --suffix=.vm    < ../xemacs-sumo-2000-01-24-vm.patch
+patch -p0 -s --suffix=.ilisp < ../xemacs-sumo-2000-09-04-ilisp.patch
+patch -p0 -s --suffix=.ispell  < ../xemacs-sumo-2000-09-04-ispell.patch
+patch -p0 -s --suffix=.mc  < ../xemacs-sumo-2000-09-04-mc.patch
+patch -p0 -s --suffix=.conf  < ../xemacs-21.4.3-autoconf.patch
+find lisp/ etc/ -name '*.elc' | xargs -r rm -f
diff -Nru xemacs-21.5.20.orig/lib-src/gnuclient.c xemacs-21.5.20/lib-src/gnuclient.c
--- xemacs-21.5.20.orig/lib-src/gnuclient.c	2004-12-07 00:23:41.000000000 +0100
+++ xemacs-21.5.20/lib-src/gnuclient.c	2005-05-12 14:38:20.000000000 +0200
@@ -223,7 +223,7 @@
 /* Encase the string in quotes, escape all the backslashes and quotes
    in string.  */
 static char *
-clean_string (const char *s)
+clean_string (char *s)
 {
   int i = 0;
   char *p, *res;
diff -Nru xemacs-21.5.20.orig/lib-src/mmencode.c xemacs-21.5.20/lib-src/mmencode.c
--- xemacs-21.5.20.orig/lib-src/mmencode.c	2001-08-13 06:45:48.000000000 +0200
+++ xemacs-21.5.20/lib-src/mmencode.c	2005-05-12 14:38:20.000000000 +0200
@@ -20,6 +20,11 @@
 #include <string.h>
 #include <errno.h>
 
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+
 static void
 output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
 
@@ -427,6 +432,32 @@
     }    
 }
 
+/* not safe on nfs filesystems, but this is close */
+FILE *
+safeopen(char *filename, char *mode)
+{
+#ifdef MSDOS
+    return fopen(filename, mode);
+#else
+    int fd;
+    int flags;
+
+    if(mode[0] == 'w') {
+	flags = O_EXCL | O_CREAT | O_WRONLY;
+    }
+    else {
+	flags = O_RDONLY;
+    }
+    
+    fd = open(filename, flags);
+    
+    if(fd == -1) {
+	return (FILE *)0;
+    }
+    
+    return fdopen(fd, mode);
+#endif
+}
 
 /*
 Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
@@ -453,6 +484,7 @@
 int main(int argc, char *argv[])
 {
     int encode = 1, which = BASE64, i, portablenewlines = 0;
+    struct stat fpstat;
     FILE *fp = stdin;
     FILE *fpo = stdout;
 
@@ -464,7 +496,7 @@
 			fprintf(stderr, "mimencode: -o requires a file name.\n");
 			exit(-1);
 		    }
-		    fpo = fopen(argv[i], "w");
+		    fpo = safeopen(argv[i], "w");
 		    if (!fpo) {
 			perror(argv[i]);
 			exit(-1);
@@ -497,7 +529,7 @@
                 setmode(fileno(fpo), O_BINARY);
             } /* else */
 #else
-            fp = fopen(argv[i], "r");
+            fp = safeopen(argv[i], "r");
 #endif /* WIN32_NATIVE */
             if (!fp) {
                 perror(argv[i]);
@@ -507,6 +539,12 @@
     }
 #ifdef WIN32_NATIVE
     if (fp == stdin) setmode(fileno(fp), O_BINARY);
+#else
+    if(fstat(fileno(fp), &fpstat) == -1) {
+	perror("fstat");
+	exit(3);
+    }
+    fchmod(fileno(fpo), fpstat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO));
 #endif /* WIN32_NATIVE */
     if (which == BASE64) {
         if (encode) {
diff -Nru xemacs-21.5.20.orig/lib-src/pop.c xemacs-21.5.20/lib-src/pop.c
--- xemacs-21.5.20.orig/lib-src/pop.c	2004-09-20 21:19:11.000000000 +0200
+++ xemacs-21.5.20/lib-src/pop.c	2005-05-12 14:38:20.000000000 +0200
@@ -129,16 +129,20 @@
 #define POP_PORT 110
 #define KPOP_PORT 1109
 #if defined(WIN32_NATIVE) || defined(CYGWIN)
-#define POP_SERVICE "pop3"	/* we don't want the POP2 port! */
+#  define POP_SERVICE "pop3"	/* we don't want the POP2 port! */
 #else
-#define POP_SERVICE "pop"
+#  ifdef  linux
+#    define POP_SERVICE "pop3"
+#  else
+#    define POP_SERVICE "pop"
+#  endif
 #endif
 #ifdef KERBEROS
-#ifdef KRB5
-#define KPOP_SERVICE "k5pop"
-#else
-#define KPOP_SERVICE "kpop"
-#endif
+#  ifdef KRB5
+#    define KPOP_SERVICE "k5pop"
+#  else
+#    define KPOP_SERVICE "kpop"
+#  endif
 #endif
 
 char pop_error[ERROR_MAX];
diff -Nru xemacs-21.5.20.orig/lib-src/vcdiff xemacs-21.5.20/lib-src/vcdiff
--- xemacs-21.5.20.orig/lib-src/vcdiff	1996-12-18 23:42:33.000000000 +0100
+++ xemacs-21.5.20/lib-src/vcdiff	2005-05-12 14:38:20.000000000 +0200
@@ -62,6 +62,17 @@
 
 
 rev1= rev2= status=0
+rev1=/tmp/geta$$
+rev2=/tmp/getb$$
+rm -f $rev1 $rev2
+if test -e $rev1 -o -e $rev2 ; then
+	echo "$0: temporaray files exists." 1>&2
+	exit 1
+fi
+if test -n "`type -p mktemp`" ; then
+	rev1="`mktemp ${rev1}.XXXXXX`" || exit 1
+	rev2="`mktemp ${rev2}.XXXXXX`" || exit 1
+fi
 trap 'status=2; exit' 1 2 13 15
 trap 'rm -f $rev1 $rev2 || status=2; exit $status' 0
 
@@ -79,14 +90,12 @@
 	case $f in
 	s.* | */s.*)
 		if
-			rev1=/tmp/geta$$
 			get -s -p -k $sid1 "$f" > $rev1 &&
 			case $sid2 in
 			'')
 				workfile=`expr " /$f" : '.*/s.\(.*\)'`
 				;;
 			*)
-				rev2=/tmp/getb$$
 				get -s -p -k $sid2 "$f" > $rev2
 				workfile=$rev2
 			esac
diff -Nru xemacs-21.5.20.orig/lisp/default.el xemacs-21.5.20/lisp/default.el
--- xemacs-21.5.20.orig/lisp/default.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/lisp/default.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,9 @@
+;(require 'tex-site)
+(setq-default TeX-master nil)
+; Users private libaries 
+; (setq TeX-macro-private '("~/lib/tex-lib/"))
+;    AUC-TeX-Macros
+; (setq TeX-style-private   "~/lib/xemacs/site-lisp/auctex/style/")
+;    Autom. Auc-TeX-Macros
+; (setq TeX-auto-private    "~/lib/xemacs/site-lisp/auctex/auto/")
+
diff -Nru xemacs-21.5.20.orig/lisp/dumped-lisp.el xemacs-21.5.20/lisp/dumped-lisp.el
--- xemacs-21.5.20.orig/lisp/dumped-lisp.el	2005-02-10 04:26:15.000000000 +0100
+++ xemacs-21.5.20/lisp/dumped-lisp.el	2005-05-12 14:38:20.000000000 +0200
@@ -38,6 +38,7 @@
        "cl"
        "cl-extra"
        "cl-seq"
+       "cl-macs"		; Avoid autoloading of kernel functions
        "widget"
        "custom"		; Before the world so everything can be
 			; customized
@@ -310,6 +311,7 @@
         ;;     "sun-eos-menubar"))
        "loadhist"		; Must be dumped before loaddefs is loaded
        "loaddefs"		; <=== autoloads get loaded here
+       "disp-table"
 	))
 
 (setq preloaded-file-list
diff -Nru xemacs-21.5.20.orig/lisp/find-paths.el xemacs-21.5.20/lisp/find-paths.el
--- xemacs-21.5.20.orig/lisp/find-paths.el	2005-01-15 16:17:36.000000000 +0100
+++ xemacs-21.5.20/lisp/find-paths.el	2005-05-12 14:42:37.000000000 +0200
@@ -325,7 +325,7 @@
 
 (defun construct-emacs-version-name ()
   "Construct a string from the raw XEmacs version number."
-  (concat emacs-program-name "-" emacs-program-version))
+  (concat emacs-program-name "/" emacs-program-version))
 
 (defun paths-directories-which-exist (directories)
   "Return the directories among DIRECTORIES.
diff -Nru xemacs-21.5.20.orig/lisp/mule/cyrillic.el xemacs-21.5.20/lisp/mule/cyrillic.el
--- xemacs-21.5.20.orig/lisp/mule/cyrillic.el	2002-03-21 08:30:21.000000000 +0100
+++ xemacs-21.5.20/lisp/mule/cyrillic.el	2005-05-12 14:38:20.000000000 +0200
@@ -32,6 +32,9 @@
 ;; Windows-1251 support deleted because XEmacs has automatic support.
 
 ;;; Code:
+(eval-when-compile
+  (setq max-lisp-eval-depth (+ 800 max-lisp-eval-depth))
+  (setq max-specpdl-size (+ 2000 max-specpdl-size)))
 
 ;; Cyrillic syntax
 (modify-syntax-entry 'cyrillic-iso8859-5 "w")
diff -Nru xemacs-21.5.20.orig/lisp/site-init.el xemacs-21.5.20/lisp/site-init.el
--- xemacs-21.5.20.orig/lisp/site-init.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/lisp/site-init.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,17 @@
+;;;;
+;;; xemacs-21.1.14/lisp/site-init.el
+;;; Author: Werner Fink <werner@suse.de>
+;;  CONFIGURATION see source code
+;;;;
+(garbage-collect)
+
+(setq gnus-default-nntp-server "news")
+(setq w3-directory (concat "/usr/share/xemacs/" emacs-program-version "/lisp/w3"))
+
+(garbage-collect)
+(garbage-collect)
+(garbage-collect)
+(garbage-collect)
+(garbage-collect)
+
+;;; site-init.el ends here
diff -Nru xemacs-21.5.20.orig/lisp/x-win-xfree86.el xemacs-21.5.20/lisp/x-win-xfree86.el
--- xemacs-21.5.20.orig/lisp/x-win-xfree86.el	2001-05-05 00:42:19.000000000 +0200
+++ xemacs-21.5.20/lisp/x-win-xfree86.el	2005-05-12 14:38:20.000000000 +0200
@@ -65,6 +65,10 @@
       ;; define also the control, meta, and meta-control versions.
       (loop for mods in '(() (control) (meta) (meta control)) do
 	(define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)])
-	))))
-
+	)))
+;; Begin insert
+;; <werner@suse.de> set Symbol delete == [delete] to delete-char
+    (load "term/func-keys" t t)
+;; End insert
+)
 ;;; x-win-xfree86.el ends here
diff -Nru xemacs-21.5.20.orig/site-packages/lisp/term/func-keys.el xemacs-21.5.20/site-packages/lisp/term/func-keys.el
--- xemacs-21.5.20.orig/site-packages/lisp/term/func-keys.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/site-packages/lisp/term/func-keys.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,101 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; term/func-keys.el for site-lisp path in xemacs-21.4.12
+;;; Copyright (c) 1996-2003 SuSE Gmbh Nuernberg, Germany
+;;;
+;;; Author: Werner Fink  <werner@suse.de>, No warranty of any kind
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; num block
+;; kp-f1 .. kp-f4 and kp-tab not found on MF-102
+  (global-set-key [(kp-f1)]   esc-map) ; Escape
+  (global-set-key [(kp-f2)]  'undo) ; Undo
+  (global-set-key [(kp-f3)]  'isearch-forward) ; Search
+  (global-set-key [(kp-f4)]  'kill-line) ; Kill-Line
+  (global-set-key [(kp-tab)] 'indent-for-tab-command)
+  (global-set-key [(kp-0)]   "0")   ; 0
+  (global-set-key [(kp-1)]   "1")   ; 1
+  (global-set-key [(kp-2)]   "2")   ; 2
+  (global-set-key [(kp-3)]   "3")   ; 3
+  (global-set-key [(kp-4)]   "4")   ; 4
+  (global-set-key [(kp-5)]   "5")   ; 5
+  (global-set-key [(kp-6)]   "6")   ; 6
+  (global-set-key [(kp-7)]   "7")   ; 7
+  (global-set-key [(kp-8)]   "8")   ; 8
+  (global-set-key [(kp-9)]   "9")   ; 9
+  (global-set-key [(kp-multiply)]  "*") ; `+'
+  (global-set-key [(kp-add)]       "+") ; `+'
+  (global-set-key [(kp-divide)]    "/") ; `/'
+;; german fault:
+(defvar lang-environment "en_us"
+  "The value of the environment variable \"LANG\"
+used to set appropriate keypad. Default value is \"en_us\".
+If \"LANG\" is set to \"de\" or some other aliases
+(see /usr/X11R6/lib/X11/locale/) the keypad decimal is
+chosen to \",\".
+                            Your SuSE-Team")
+;
+(let ((lang (getenv "LANG")))
+    (if (null lang)
+	(setq lang-environment "en_us")
+      (setq lang-environment lang)))
+;;
+; (if (string-match "^\\(de$\\|de_\\|GER_DE\\|german\\)" lang-environment)
+;     (progn
+;       (global-set-key [(kp-decimal)]   ",")  ; `,' german decimal
+;       (global-set-key [(kp-separator)] ".")) ; `.' german separator
+;     (global-set-key [(kp-decimal)]   ".")
+;     (global-set-key [(kp-separator)] ","))
+  (global-set-key [(kp-decimal)]   ".")
+  (global-set-key [(kp-separator)] ",")
+  (global-set-key [(kp-subtract)]  "-") ; `-'
+  (global-set-key [(kp-enter)]     'newline)           ; Linefeed
+  (global-set-key [(kp-home)]      'beginning-of-line) ; home
+  (global-set-key [(kp-up)]        'previous-line)     ; up
+  (global-set-key [(kp-prior)]     'scroll-down)       ; ppg
+  (global-set-key [(kp-left)]      'backward-char)     ; left
+  (global-set-key [(kp-begin)]     'beginning-of-line) ; first
+  (global-set-key [(kp-right)]     'forward-char)      ; right
+  (global-set-key [(kp-end)]       'end-of-line)       ; end
+  (global-set-key [(kp-down)]      'next-line)         ; down
+  (global-set-key [(kp-next)]      'scroll-up)         ; npg
+  (global-set-key [(kp-insert)]    'overwrite-mode)    ; insert/ovwrt
+;;
+;; Backspace, Delete and any thing else
+;;
+(if (not (eq 'x (console-type)))
+      nil
+  ;;
+  ;; Overriding the BS/DEL/KP_DEL mapping for Xemacs-20.4:
+  ;;  ... Hey they have done a good job: DEL and BS
+  ;;      now are distinct.
+  ;;
+  (global-unset-key 'kp-delete)
+  (local-unset-key  'kp-delete)
+  ;;
+  ;; What will be inserted `on quoted-insert'
+  ;;(remprop 'delete    'ascii-character)
+  ;;(remprop 'backspace 'ascii-character)
+  ;;(put 'backspace 'ascii-character 127)
+  ;;
+; (load "delbs" t t)
+  (load "x-compose" t t)
+  ;;
+  ;; Set the keyboard macro [(kp-delete)]
+  ;; to the same action as for [(delete-char)]
+  ;;
+  (global-set-key   [(kp-delete)]  'backward-or-forward-delete-char)
+  (local-set-key    [(kp-delete)]  'backward-or-forward-delete-char)
+  ;;
+  ;; Switch DEL/KP_DEL to delete-char
+  ;;
+  (setq delete-key-deletes-forward t)
+)
+;;
+;; Most new users like this, but common emacs users?
+;;
+(global-set-key [(home)]            'beginning-of-line)
+(global-set-key [(control home)]    'beginning-of-buffer)
+(global-set-key [(end)]             'end-of-line)
+(global-set-key [(control end)]     'end-of-buffer)
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; End of func-keys.el
diff -Nru xemacs-21.5.20.orig/site-packages/lisp/term/gnome.el xemacs-21.5.20/site-packages/lisp/term/gnome.el
--- xemacs-21.5.20.orig/site-packages/lisp/term/gnome.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/site-packages/lisp/term/gnome.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,97 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; term/gnome.el for site-lisp path in xemacs-21.1.7
+;;; Copyright (c) 1996 SuSE Gmbh Nuernberg, Germany.  All rights reserved.
+;;;
+;;; Author: Werner Fink  <werner@suse.de>, No warranty of any kind
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; (define-key function-key-map "\e[1~" [(find)])
+; (define-key function-key-map "\eOH"  [(home)])
+  (define-key function-key-map "\e[1~" [(home)])
+  (define-key function-key-map "\e[2~" [(insertchar)])
+  (define-key function-key-map "\e[3~" [(deletechar)])
+; (define-key function-key-map "\e[4~" [(select)])
+; (define-key function-key-map "\eOF"  [(end)])
+  (define-key function-key-map "\e[4~" [(end)])
+  (define-key function-key-map "\e[5~" [(prior)])
+  (define-key function-key-map "\e[6~" [(next)])
+  (define-key function-key-map "\eOP"  [(f1)])
+  (define-key function-key-map "\eOQ"  [(f2)])
+  (define-key function-key-map "\eOR"  [(f3)])
+  (define-key function-key-map "\eOS"  [(f4)])
+  (define-key function-key-map "\e[15~" [(f5)])
+  (define-key function-key-map "\e[17~" [(f6)])
+  (define-key function-key-map "\e[18~" [(f7)])
+  (define-key function-key-map "\e[19~" [(f8)])
+  (define-key function-key-map "\e[20~" [(f9)])
+  (define-key function-key-map "\e[21~" [(f10)])
+  (define-key function-key-map "\e[23~" [(f11)])
+  (define-key function-key-map "\e[24~" [(f12)])
+  (define-key function-key-map "\e[25~" [(f13)])
+  (define-key function-key-map "\e[26~" [(f14)])
+  (define-key function-key-map "\e[28~" [(help)])
+  (define-key function-key-map "\e[29~" [(menu)])
+  (define-key function-key-map "\e?\e[28~" [(meta help)])
+  (define-key function-key-map "\e?\e[29~" [(meta menu)])
+  (define-key function-key-map "\e[31~" [(f17)])
+  (define-key function-key-map "\e[32~" [(f18)])
+  (define-key function-key-map "\e[33~" [(f19)])
+  (define-key function-key-map "\e[34~" [(f20)])
+;;
+;; num block
+;; [(home)] and [(end)] found in num block
+; (define-key function-key-map "\eOH" [(home)])
+; (define-key function-key-map "\eOF" [(end)])
+  (define-key function-key-map "\e[1~" [(home)])
+  (define-key function-key-map "\e[4~" [(end)])
+;;
+;; Locked num block
+  (define-key function-key-map "\eOI" [(kp-tab)])
+  (define-key function-key-map "\eOj" [(kp-multiply)])
+  (define-key function-key-map "\eOk" [(kp-add)])
+  (define-key function-key-map "\eOl" [(kp-separator)])
+  (define-key function-key-map "\eOM" [(kp-enter)])
+  (define-key function-key-map "\eOm" [(kp-subtract)])
+  (define-key function-key-map "\eOn" [(kp-decimal)])
+; (define-key function-key-map "\eOn" [(kp-period)]) ; [kp-decimal]
+  (define-key function-key-map "\eOo" [(kp-divide)])
+  (define-key function-key-map "\eOp" [(kp-0)])
+  (define-key function-key-map "\eOq" [(kp-1)])
+  (define-key function-key-map "\eOr" [(kp-2)])
+  (define-key function-key-map "\eOs" [(kp-3)])
+  (define-key function-key-map "\eOt" [(kp-4)])
+  (define-key function-key-map "\eOu" [(kp-5)])
+  (define-key function-key-map "\eOv" [(kp-6)])
+  (define-key function-key-map "\eOw" [(kp-7)])
+  (define-key function-key-map "\eOx" [(kp-8)])
+  (define-key function-key-map "\eOy" [(kp-9)])
+;;
+;; Undefine some ESC ESC behavior --- for later use
+  (global-unset-key "\e\e")
+  (define-key esc-map "\e" nil)
+;;
+  (define-key function-key-map  "\eOD" [(left)])
+  (define-key function-key-map  "\eOC" [(right)])
+  (define-key function-key-map  "\eOA" [(up)])
+  (define-key function-key-map  "\eOB" [(down)])
+;;
+  (define-key function-key-map  "\e\eOD" [(meta left)])
+  (define-key function-key-map  "\e\eOC" [(meta right)])
+  (define-key function-key-map  "\e\eOA" [(meta up)])
+  (define-key function-key-map  "\e\eOB" [(meta down)])
+;;
+;; Not in Use?
+  (define-key function-key-map "\C-?\eOD" [(control left)])
+  (define-key function-key-map "\C-?\eOC" [(control right)])
+  (define-key function-key-map "\C-?\eOA" [(control up)])
+  (define-key function-key-map "\C-?\eOB" [(control down)])
+;;
+;; Backspace, Delete and any thing else
+;;
+  (global-unset-key [(insertchar)])
+  (global-set-key   [(insertchar)]  'overwrite-mode)
+  (global-unset-key [(deletechar)])
+  (global-set-key   [(deletechar)]  'delete-char)
+;;
+(load "term/func-keys"  nil t)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Ende von gnome.el
diff -Nru xemacs-21.5.20.orig/site-packages/lisp/term/kvt.el xemacs-21.5.20/site-packages/lisp/term/kvt.el
--- xemacs-21.5.20.orig/site-packages/lisp/term/kvt.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/site-packages/lisp/term/kvt.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,97 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; term/kvt.el for site-lisp path in xemacs-21.1.7
+;;; Copyright (c) 2000 SuSE Gmbh Nuernberg, Germany.  All rights reserved.
+;;;
+;;; Author: Werner Fink  <werner@suse.de>, No warranty of any kind
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+  (define-key function-key-map "\e[1~" [(find)])
+  (define-key function-key-map "\eOH"  [(home)])
+  (define-key function-key-map "\e[2~" [(insertchar)])
+  (define-key function-key-map "\e[3~" [(deletechar)])
+  (define-key function-key-map "\e[4~" [(select)])
+  (define-key function-key-map "\eOF"  [(end)])
+  (define-key function-key-map "\e[5~" [(prior)])
+  (define-key function-key-map "\e[6~" [(next)])
+  (define-key function-key-map "\e[11~" [(f1)])
+  (define-key function-key-map "\e[12~" [(f2)])
+  (define-key function-key-map "\e[13~" [(f3)])
+  (define-key function-key-map "\e[14~" [(f4)])
+  (define-key function-key-map "\e[15~" [(f5)])
+  (define-key function-key-map "\e[17~" [(f6)])
+  (define-key function-key-map "\e[18~" [(f7)])
+  (define-key function-key-map "\e[19~" [(f8)])
+  (define-key function-key-map "\e[20~" [(f9)])
+  (define-key function-key-map "\e[21~" [(f10)])
+  (define-key function-key-map "\e[23~" [(f11)])
+  (define-key function-key-map "\e[24~" [(f12)])
+  (define-key function-key-map "\e[25~" [(f13)])
+  (define-key function-key-map "\e[26~" [(f14)])
+  (define-key function-key-map "\e[28~" [(help)])
+  (define-key function-key-map "\e[29~" [(menu)])
+  (define-key function-key-map "\e?\e[28~" [(meta help)])
+  (define-key function-key-map "\e?\e[29~" [(meta menu)])
+  (define-key function-key-map "\e[31~" [(f17)])
+  (define-key function-key-map "\e[32~" [(f18)])
+  (define-key function-key-map "\e[33~" [(f19)])
+  (define-key function-key-map "\e[34~" [(f20)])
+;;
+;; num block
+;; [(home)] and [(end)] found in num block
+  (define-key function-key-map "\eOH" [(home)])
+  (define-key function-key-map "\eOF" [(end)])
+;;
+;; Locked num block
+  (define-key function-key-map "\eOP" [(kp-f1)])
+  (define-key function-key-map "\eOQ" [(kp-f2)])
+  (define-key function-key-map "\eOR" [(kp-f3)])
+  (define-key function-key-map "\eOS" [(kp-f4)])
+  (define-key function-key-map "\eOI" [(kp-tab)])
+  (define-key function-key-map "\eOj" [(kp-multiply)])
+  (define-key function-key-map "\eOk" [(kp-add)])
+  (define-key function-key-map "\eOl" [(kp-separator)])
+  (define-key function-key-map "\eOM" [(kp-enter)])
+  (define-key function-key-map "\eOm" [(kp-subtract)])
+  (define-key function-key-map "\eOn" [(kp-decimal)])
+; (define-key function-key-map "\eOn" [(kp-period)]) ; [kp-decimal]
+  (define-key function-key-map "\eOo" [(kp-divide)])
+  (define-key function-key-map "\eOp" [(kp-0)])
+  (define-key function-key-map "\eOq" [(kp-1)])
+  (define-key function-key-map "\eOr" [(kp-2)])
+  (define-key function-key-map "\eOs" [(kp-3)])
+  (define-key function-key-map "\eOt" [(kp-4)])
+  (define-key function-key-map "\eOu" [(kp-5)])
+  (define-key function-key-map "\eOv" [(kp-6)])
+  (define-key function-key-map "\eOw" [(kp-7)])
+  (define-key function-key-map "\eOx" [(kp-8)])
+  (define-key function-key-map "\eOy" [(kp-9)])
+;;
+;; Undefine some ESC ESC behavior --- for later use
+  (global-unset-key "\e\e")
+  (define-key esc-map "\e" nil)
+;;
+  (define-key function-key-map  "\eOD" [(left)])
+  (define-key function-key-map  "\eOC" [(right)])
+  (define-key function-key-map  "\eOA" [(up)])
+  (define-key function-key-map  "\eOB" [(down)])
+;;
+  (define-key function-key-map  "\e\eOD" [(meta left)])
+  (define-key function-key-map  "\e\eOC" [(meta right)])
+  (define-key function-key-map  "\e\eOA" [(meta up)])
+  (define-key function-key-map  "\e\eOB" [(meta down)])
+;;
+;; Not in Use?
+  (define-key function-key-map "\C-?\eOD" [(control left)])
+  (define-key function-key-map "\C-?\eOC" [(control right)])
+  (define-key function-key-map "\C-?\eOA" [(control up)])
+  (define-key function-key-map "\C-?\eOB" [(control down)])
+;;
+;; Backspace, Delete and any thing else
+;;
+  (global-unset-key [(insertchar)])
+  (global-set-key   [(insertchar)]  'overwrite-mode)
+  (global-unset-key [(deletechar)])
+  (global-set-key   [(deletechar)]  'delete-char)
+;;
+(load "term/func-keys"  nil t)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Ende von kvt.el
diff -Nru xemacs-21.5.20.orig/site-packages/lisp/term/linux.el xemacs-21.5.20/site-packages/lisp/term/linux.el
--- xemacs-21.5.20.orig/site-packages/lisp/term/linux.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/site-packages/lisp/term/linux.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,79 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; term/linux.el for site-lisp path in xemacs-21.1.7
+;;; Copyright (c) 1996 SuSE Gmbh Nuernberg, Germany.  All rights reserved.
+;;;
+;;; Author: Werner Fink  <werner@suse.de>, No warranty of any kind
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+  (define-key function-key-map "\e[1~" [(home)])
+  (define-key function-key-map "\e[2~" [(insertchar)])
+  (define-key function-key-map "\e[3~" [(deletechar)])
+  (define-key function-key-map "\e[4~" [(end)])
+  (define-key function-key-map "\e[5~" [(prior)])
+  (define-key function-key-map "\e[6~" [(next)])
+  (define-key function-key-map "\e[[A" [(f1)])
+  (define-key function-key-map "\e[[B" [(f2)])
+  (define-key function-key-map "\e[[C" [(f3)])
+  (define-key function-key-map "\e[[D" [(f4)])
+  (define-key function-key-map "\e[[E" [(f5)])
+  (define-key function-key-map "\e[17~" [(f6)])
+  (define-key function-key-map "\e[18~" [(f7)])
+  (define-key function-key-map "\e[19~" [(f8)])
+  (define-key function-key-map "\e[20~" [(f9)])
+  (define-key function-key-map "\e[21~" [(f10)])
+  (define-key function-key-map "\e[23~" [(f11)])
+  (define-key function-key-map "\e[24~" [(f12)])
+  (define-key function-key-map "\e[25~" [(f13)])
+  (define-key function-key-map "\e[26~" [(f14)])
+  (define-key function-key-map "\e[28~" [(help)])
+  (define-key function-key-map "\e[29~" [(menu)])
+  (define-key function-key-map "\e?\e[28~" [(meta help)])
+  (define-key function-key-map "\e?\e[29~" [(meta menu)])
+  (define-key function-key-map "\e[31~" [(f17)])
+  (define-key function-key-map "\e[32~" [(f18)])
+  (define-key function-key-map "\e[33~" [(f19)])
+  (define-key function-key-map "\e[34~" [(f20)])
+;;
+;; Not in Use?
+;; ----------------------------------
+;; Console-Setting for Linux ???
+  (define-key function-key-map "\e[H"  [(meta up)])
+  (define-key function-key-map "\e[Y"  [(meta down)])
+  (define-key function-key-map "\e[M"  [(menu)])
+  (define-key function-key-map "\e?\e[M"  [(meta menu)])
+  (define-key function-key-map "\e[P"  [(pause)])
+;;
+;; num block
+  (define-key function-key-map "\e[G" [(begin)])
+;;
+;; Locked num block Nothing to do :-)
+;;
+;; Undefine some ESC ESC behavior --- for later use
+  (global-unset-key "\e\e")
+  (define-key esc-map "\e" nil)
+;;
+  (define-key function-key-map "\e[D" [(left)])
+  (define-key function-key-map "\e[C" [(right)])
+  (define-key function-key-map "\e[A" [(up)])
+  (define-key function-key-map "\e[B" [(down)])
+;;
+  (define-key function-key-map "\e\e[D" [(meta left)])
+  (define-key function-key-map "\e\e[C" [(meta right)])
+  (define-key function-key-map "\e\e[A" [(meta up)])
+  (define-key function-key-map "\e\e[B" [(meta down)])
+;;
+;; Not in Use?
+  (define-key function-key-map "\C-?\e[D" [(control left)])
+  (define-key function-key-map "\C-?\e[C" [(control right)])
+  (define-key function-key-map "\C-?\e[A" [(control up)])
+  (define-key function-key-map "\C-?\e[B" [(control down)])
+;;
+;; Backspace, Delete and any thing else
+;;
+  (global-unset-key [(insertchar)])
+  (global-set-key   [(insertchar)]  'overwrite-mode)
+  (global-unset-key [(deletechar)])
+  (global-set-key   [(deletechar)]  'delete-char)
+;;
+(load "term/func-keys" nil t)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Ende von linux.el
diff -Nru xemacs-21.5.20.orig/site-packages/lisp/term/xterm.el xemacs-21.5.20/site-packages/lisp/term/xterm.el
--- xemacs-21.5.20.orig/site-packages/lisp/term/xterm.el	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/site-packages/lisp/term/xterm.el	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,120 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; term/xterm.el for site-lisp path in xemacs-21.1.7
+;;; Copyright (c) 1996 SuSE Gmbh Nuernberg, Germany.  All rights reserved.
+;;;
+;;; Author: Werner Fink  <werner@suse.de>, No warranty of any kind
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; MF-102: on linux console \033[1~ is not [(find)] but [(home)]
+;; in xterm [(home)] is \033[H (app-keypad off) or \033OH (app-keypad on)
+;; and [(find)] is \033[1~
+;; Note: this must be consistent with app-defaults of xterm,
+;;       terminfo/termcap, and all of inputrc, csh.cshrc, exrc
+  (define-key function-key-map "\e[1~" [(find)])
+  (define-key function-key-map "\e[H"  [(home)])
+  (define-key function-key-map "\eOH"  [(home)])
+  (define-key function-key-map "\e[2~" [(insertchar)])
+  (define-key function-key-map "\e[3~" [(deletechar)])
+;; MF-102: on linux console \033[4~ is not [(select)] but [(end)]
+;; in xterm [(end] should be \033[F (app-keypad off) or \033OF (app-keypad on)
+;; and [(select)] is \033[4~
+;; Note: this must be consistent with app-defaults of xterm,
+;;       terminfo/termcap, and all of inputrc, csh.cshrc, exrc
+  (define-key function-key-map "\e[4~" [(select)])
+  (define-key function-key-map "\e[F"  [(end)])
+  (define-key function-key-map "\eOF"  [(end)])
+  (define-key function-key-map "\e[5~" [(prior)])
+  (define-key function-key-map "\e[6~" [(next)])
+  (define-key function-key-map "\e[11~" [(f1)])
+  (define-key function-key-map "\e[12~" [(f2)])
+  (define-key function-key-map "\e[13~" [(f3)])
+  (define-key function-key-map "\e[14~" [(f4)])
+  (define-key function-key-map "\eOP"   [(f1)])
+  (define-key function-key-map "\eOQ"   [(f2)])
+  (define-key function-key-map "\eOR"   [(f3)])
+  (define-key function-key-map "\eOS"   [(f4)])
+  (define-key function-key-map "\e[15~" [(f5)])
+  (define-key function-key-map "\e[17~" [(f6)])
+  (define-key function-key-map "\e[18~" [(f7)])
+  (define-key function-key-map "\e[19~" [(f8)])
+  (define-key function-key-map "\e[20~" [(f9)])
+  (define-key function-key-map "\e[21~" [(f10)])
+  (define-key function-key-map "\e[23~" [(f11)])
+  (define-key function-key-map "\e[24~" [(f12)])
+  (define-key function-key-map "\e[25~" [(f13)])
+  (define-key function-key-map "\e[26~" [(f14)])
+  (define-key function-key-map "\e[28~" [(help)])
+  (define-key function-key-map "\e[29~" [(menu)])
+  (define-key function-key-map "\e?\e[28~" [(meta help)])
+  (define-key function-key-map "\e?\e[29~" [(meta menu)])
+  (define-key function-key-map "\e[31~" [(f17)])
+  (define-key function-key-map "\e[32~" [(f18)])
+  (define-key function-key-map "\e[33~" [(f19)])
+  (define-key function-key-map "\e[34~" [(f20)])
+;;
+;; num block
+;; [(home)] and [(end)] found in num block
+  (define-key function-key-map "\eOH" [(home)])
+  (define-key function-key-map "\eOF" [(end)])
+  (define-key function-key-map "\eOE" [(begin)])
+;;
+;; Locked num block
+;; kp-f1 .. kp-f4 and kp-tab not found on MF-102
+;; For xterm on xfree we use f1 .. f4, see above
+; (define-key function-key-map "\eOP" [(kp-f1)])
+; (define-key function-key-map "\eOQ" [(kp-f2)])
+; (define-key function-key-map "\eOR" [(kp-f3)])
+; (define-key function-key-map "\eOS" [(kp-f4)])
+  (define-key function-key-map "\eOI" [(kp-tab)])
+  (define-key function-key-map "\eOj" [(kp-multiply)])
+  (define-key function-key-map "\eOk" [(kp-add)])
+  (define-key function-key-map "\eOl" [(kp-separator)])
+  (define-key function-key-map "\eOM" [(kp-enter)])
+  (define-key function-key-map "\eOm" [(kp-subtract)])
+  (define-key function-key-map "\eOn" [(kp-decimal)])
+; (define-key function-key-map "\eOn" [(kp-period)]) ; [kp-decimal]
+  (define-key function-key-map "\eOo" [(kp-divide)])
+  (define-key function-key-map "\eOp" [(kp-0)])
+  (define-key function-key-map "\eOq" [(kp-1)])
+  (define-key function-key-map "\eOr" [(kp-2)])
+  (define-key function-key-map "\eOs" [(kp-3)])
+  (define-key function-key-map "\eOt" [(kp-4)])
+  (define-key function-key-map "\eOu" [(kp-5)])
+  (define-key function-key-map "\eOv" [(kp-6)])
+  (define-key function-key-map "\eOw" [(kp-7)])
+  (define-key function-key-map "\eOx" [(kp-8)])
+  (define-key function-key-map "\eOy" [(kp-9)])
+;;
+;; Undefine some ESC ESC behavior --- for later use
+  (global-unset-key "\e\e")
+  (define-key esc-map "\e" nil)
+;;
+  (define-key function-key-map  "\eOD" [(left)])
+  (define-key function-key-map  "\eOC" [(right)])
+  (define-key function-key-map  "\eOA" [(up)])
+  (define-key function-key-map  "\eOB" [(down)])
+;;
+  (define-key function-key-map  "\e\eOD" [(meta left)])
+  (define-key function-key-map  "\e\eOC" [(meta right)])
+  (define-key function-key-map  "\e\eOA" [(meta up)])
+  (define-key function-key-map  "\e\eOB" [(meta down)])
+;;
+;; Not in Use?
+  (define-key function-key-map "\C-?\eOD" [(control left)])
+  (define-key function-key-map "\C-?\eOC" [(control right)])
+  (define-key function-key-map "\C-?\eOA" [(control up)])
+  (define-key function-key-map "\C-?\eOB" [(control down)])
+  (define-key function-key-map "\eO5D"    [(control left)])
+  (define-key function-key-map "\eO5C"    [(control right)])
+  (define-key function-key-map "\eO5A"    [(control up)])
+  (define-key function-key-map "\eO5B"    [(control down)])
+;;
+;; Backspace, Delete and any thing else
+;;
+  (global-unset-key [(insertchar)])
+  (global-set-key   [(insertchar)]  'overwrite-mode)
+  (global-unset-key [(deletechar)])
+  (global-set-key   [(deletechar)]  'delete-char)
+;;
+(load "term/func-keys"  nil t)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Ende von xterm.el
diff -Nru xemacs-21.5.20.orig/src/Makefile.in.in xemacs-21.5.20/src/Makefile.in.in
--- xemacs-21.5.20.orig/src/Makefile.in.in	2005-03-10 10:05:52.000000000 +0100
+++ xemacs-21.5.20/src/Makefile.in.in	2005-05-12 14:38:20.000000000 +0200
@@ -555,7 +555,7 @@
 	else \
 		$(CC) -c $(cflags) -DMAX_SIZE=0 $(SRC)/dump-data.c ;\
 	fi
-	$(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) dump-data.o $(LIBES)
+	$(LD) $(start_flags) -Wl,-rpath-link,/usr/X11R6/lib $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) dump-data.o $(LIBES)
 #endif
 
 ## (3) Update the .elc's needed for dumping
@@ -585,7 +585,7 @@
 	$(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \
 		-o $(LIB_SRC)/DOC -d $(SRC) -i $(LIB_SRC)/../site-packages \
 		$(obj_src) $(mallocdocsrc) $(rallocdocsrc) \
-		$(extra_doc_files) ; fi
+		$(extra_doc_files) ${lispdir}disp-table.elc ; fi
 
 ## (5) Dump
 
diff -Nru xemacs-21.5.20.orig/src/print.c xemacs-21.5.20/src/print.c
--- xemacs-21.5.20.orig/src/print.c	2005-01-25 00:34:05.000000000 +0100
+++ xemacs-21.5.20/src/print.c	2005-05-12 14:38:20.000000000 +0200
@@ -1084,6 +1084,40 @@
   Ibyte *cp, c;
   int width;
 
+  /* Check for plus infinity in a way that won't lose
+     if there is no plus infinity.  */
+  if (data == data / 2 && data > 1.0)
+    {
+      strcpy (buf, "1.0e+INF");
+      return;
+    }
+  /* Likewise for minus infinity.  */
+  if (data == data / 2 && data < -1.0)
+    {
+      strcpy (buf, "-1.0e+INF");
+      return;
+    }
+  /* Check for NaN in a way that won't fail if there are no NaNs.  */
+  if (! (data * 0.0 >= 0.0))
+    {
+      /* Prepend "-" if the NaN's sign bit is negative.
+	 The sign bit of a double is the bit that is 1 in -0.0.  */
+      int i;
+      double zero = 0.0;
+      union { double d; char c[sizeof (double)]; } u_data, u_minus_zero;
+      u_data.d = data;
+      u_minus_zero.d = - zero;
+      for (i = 0; i < sizeof (double); i++)
+        if (u_data.c[i] & u_minus_zero.c[i])
+	  {
+	    *buf++ = '-';
+	    break;
+	  }
+
+      strcpy (buf, "0.0e+NaN");
+      return;
+    }
+
   if (NILP (Vfloat_output_format)
       || !STRINGP (Vfloat_output_format))
   lose:
diff -Nru xemacs-21.5.20.orig/src/regex.c xemacs-21.5.20/src/regex.c
--- xemacs-21.5.20.orig/src/regex.c	2005-03-09 05:59:31.000000000 +0100
+++ xemacs-21.5.20/src/regex.c	2005-05-12 14:38:20.000000000 +0200
@@ -1154,6 +1154,9 @@
    syntax, so it can be changed between regex compilations.  */
 /* This has no initializer because initialized variables in Emacs
    become read-only after dumping.  */
+#ifdef __linux__ /* libc and glibc including this */
+extern
+#endif
 reg_syntax_t re_syntax_options;
 
 
diff -Nru xemacs-21.5.20.orig/src/s/linux.h xemacs-21.5.20/src/s/linux.h
--- xemacs-21.5.20.orig/src/s/linux.h	2002-08-12 16:45:34.000000000 +0200
+++ xemacs-21.5.20/src/s/linux.h	2005-05-12 14:38:20.000000000 +0200
@@ -25,6 +25,7 @@
 
 #define USG
 #define LINUX
+#define I18N2
 
 /* powerpc gcc 2.8.0 doesn't define __ELF__, but it is */
 
diff -Nru xemacs-21.5.20.orig/suse/README.SuSE xemacs-21.5.20/suse/README.SuSE
--- xemacs-21.5.20.orig/suse/README.SuSE	1970-01-01 01:00:00.000000000 +0100
+++ xemacs-21.5.20/suse/README.SuSE	2005-05-12 14:38:20.000000000 +0200
@@ -0,0 +1,18 @@
+
+   XEmacs-21.5.16
+
+   * Sie finden eine Referenz-Karte im Verzeichnis etc/
+     in der Datei refcard.ps, die Sie ausdrucken können.
+
+   * Weitere Hilfe zum XEmacs findet sich ebenfalls unter etc/
+     und natürlich auch Online im Editor selbst im Help-Menü.
+
+---
+
+   * You find a reference card refcard.ps in the directory etc/
+     which can be printed.
+
+   * More help for XEmacs will can be found in etc/ and
+     clearly online in the menu help
+
+