574c35
--- ./etc/emacs/gap-process.el.orig	2005-05-08 01:44:58.000000000 -0600
574c35
+++ ./etc/emacs/gap-process.el	2011-08-04 15:25:18.327841875 -0600
574c35
@@ -337,7 +337,9 @@
574c35
       (unwind-protect
574c35
    (progn
574c35
      (with-output-to-temp-buffer "*Completions*"
574c35
-       (print-help-return-message))
574c35
+       (if (featurep 'xemacs)
574c35
+	   (print-help-return-message)
574c35
+	 (help-print-return-message)))
574c35
      (set-process-filter process 'gap-completions-filter)
574c35
      (process-send-string process (concat gap-completion-ident
574c35
        "\t\t\C-x")))))))
574c35
@@ -371,8 +373,10 @@
574c35
     (unwind-protect
574c35
  (progn
574c35
    (with-output-to-temp-buffer "*Help*"
574c35
-     (print-help-return-message))
574c35
-          (set-process-filter process 'gap-help-filter)
574c35
+     (if (featurep 'xemacs)
574c35
+	 (print-help-return-message)
574c35
+       (help-print-return-message)))
574c35
+   (set-process-filter process 'gap-help-filter)
574c35
    (process-send-string process (concat "?" topic "\n"))))))
574c35
 
574c35
 (defun get-start-process (progm &optional name dir args startfile)
574c35
@@ -382,17 +386,17 @@
574c35
 containing initial standard input to process."
574c35
   (interactive)
574c35
   (require 'comint)
574c35
-  (setq name (or name (file-name-nondirectory progm)))
574c35
-  (setq buffname (concat "*" name "*"))
574c35
-  (cond ((not (comint-check-proc buffname))
574c35
-  (let ((buff (get-buffer-create buffname)))
574c35
-    (set-buffer buff)
574c35
-    (switch-to-buffer buff)
574c35
-    (if dir (cd dir))
574c35
-    (apply 'make-comint name progm startfile args)))
574c35
- (t
574c35
-  (switch-to-buffer buffname)
574c35
-  (get-buffer buffname))))
574c35
+  (let ((name (or name (file-name-nondirectory progm)))
574c35
+	(buffname (concat "*" name "*")))
574c35
+    (cond ((not (comint-check-proc buffname))
574c35
+	   (let ((buff (get-buffer-create buffname)))
574c35
+	     (set-buffer buff)
574c35
+	     (switch-to-buffer buff)
574c35
+	     (if dir (cd dir))
574c35
+	     (apply 'make-comint name progm startfile args)))
574c35
+	  (t
574c35
+	   (switch-to-buffer buffname)
574c35
+	   (get-buffer buffname)))))
574c35
 (defun string-strip-chars (string strip)
574c35
   "Take STRING and remove characters in STRIP"
574c35
   (while (> (length strip) 0)
574c35
--- ./etc/emacs/gap-mode.el.orig	2001-08-15 10:42:16.000000000 -0600
574c35
+++ ./etc/emacs/gap-mode.el	2011-08-04 15:29:19.482725282 -0600
574c35
@@ -89,15 +89,6 @@
574c35
 (autoload 'gap-complete "gap-process" nil t)
574c35
 
574c35
 
574c35
-;;! Fix member function?!
574c35
-(defun memberequal (x y)
574c35
-  "Like memq, but uses `equal' for comparison.
574c35
-This is a subr in Emacs 19."
574c35
-  (while (and y (not (equal x (car y))))
574c35
-    (setq y (cdr y)))
574c35
-  y)
574c35
-
574c35
-
574c35
 (defvar gap-indent-brackets t
574c35
   "* Whether to check back for unclosed brackets in determining
574c35
 indentation level. This is good for formatting lists and matrices.")
574c35
@@ -445,12 +436,12 @@
574c35
                (setq name (buffer-substring (match-beginning 2) (match-end 2)))
574c35
                (goto-char (match-end 0)))
574c35
               (t (error "gap-insert-local-variables incorrect code!")))
574c35
-        (if (not (memberequal name names))
574c35
+        (if (not (member name names))
574c35
             (setq names (append names (list name))))))
574c35
     (beginning-of-line)
574c35
     (let (lnames)
574c35
       (while (car names)
574c35
-        (if (memberequal (car names) formal)
574c35
+        (if (member (car names) formal)
574c35
             (setq names (cdr names))
574c35
           (setq lnames (append lnames (list (car names))))
574c35
           (setq names (cdr names))))
574c35
@@ -527,11 +518,11 @@
574c35
 ;;! Now the indentation functions and variables
574c35
 ;;
574c35
 
574c35
-(setq gap-end-of-statement
574c35
+(defconst gap-end-of-statement
574c35
       (concat "\\(;\\|\\<then\\>\\|\\<else\\>\\|\\<do\\>\\|"
574c35
 	      "\\<repeat\\>\\|\\<function\\>.*(.*)\\)"))
574c35
 
574c35
-(setq gap-increment-indentation-regexp (concat "^[ \t]*\\("
574c35
+(defconst gap-increment-indentation-regexp (concat "^[ \t]*\\("
574c35
 					       "if\\>"
574c35
 					       "\\|else\\>"
574c35
 					       "\\|elif\\>"
574c35
@@ -541,7 +532,7 @@
574c35
 					       "\\|.*\\<function\\>"
574c35
 					       "\\)"))
574c35
 
574c35
-(setq gap-decrement-indentation-regexp (concat "^[ \t]*\\("
574c35
+(defconst gap-decrement-indentation-regexp (concat "^[ \t]*\\("
574c35
 					       "fi\\>"
574c35
 					       "\\|od\\>"
574c35
 					       "\\|else\\>"