Jerry James b08b3a4
--- ./elisp/ansi-doc.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/ansi-doc.el	2014-09-06 20:00:00.000000000 -0600
e6a2505
@@ -9,6 +9,8 @@
e6a2505
 ;; xdvi.   You may gzip the .dvi files and it will unzip them into tmp
e6a2505
 ;; as needed.
e6a2505
 
e6a2505
+(eval-and-compile
e6a2505
+  (require 'cl))
e6a2505
 
e6a2505
 (defvar ansi-doc-dir "/usr/local/doc/dpANS2")
e6a2505
 (defvar ansi-doc-alist nil)
7fc6c88
@@ -55,38 +57,28 @@ return that file otherwise return file"
e6a2505
 or topic.   If there are several pieces of documentation then go through
e6a2505
 them successively.   Requires copying the "
e6a2505
   (interactive )
e6a2505
-  (let (x tem name lis first chap tmp-chap)
e6a2505
-    (or ansi-doc-alist
e6a2505
-	(progn
e6a2505
-	  (create-index-el-from-index-idx )
e6a2505
-	  (load (concat ansi-doc-dir "/index.el"))))
e6a2505
-    (setq name (completing-read "Doc on: " ansi-doc-alist nil t))
e6a2505
-    (progn  (setq ans nil)   (setq lis ansi-doc-alist)
e6a2505
-	    (while lis
e6a2505
-	      (cond ((equal (car  (car lis)) name)
e6a2505
-		     (setq ans (append ans (cdr  (cdr (car lis)))))))
e6a2505
-	      (setq lis (cdr lis)))
e6a2505
-	    )	    
e6a2505
-    (setq tem ans)
e6a2505
-    (if (cdr tem) (setq first "First") (setq first ""))
e6a2505
-    (while tem
e6a2505
-      (setq x (car tem))
e6a2505
-      (setq chap (concat ansi-doc-dir
e6a2505
-		  (downcase (format "/chap-%s.dvi"  (car x)))))
e6a2505
-      (setq chap (maybe-gzip-to-tmp chap))
e6a2505
-      (message "%s Doc in Chapter %s page %s) %s .." first (car x) (cdr x))
e6a2505
-      (if (cdr tem) (setq first "Next") (setq next "Final"))
e6a2505
-      (shell-command (concat "xdvi  -expert -xoffset .2 -yoffset -.2 "
e6a2505
-			     " -paper 7.2x8.5 "
e6a2505
-			     " -display "
e6a2505
-			     (or x-display-name ":0")
e6a2505
-			     "  -geometry -2-2 +" (+ (cdr x) 2)" "
e6a2505
-			     chap
e6a2505
-			     ))
e6a2505
-      (setq tem (cdr tem))
e6a2505
-
e6a2505
-      )
e6a2505
-    )
e6a2505
-  (message nil)
e6a2505
-  
e6a2505
-  )
e6a2505
+  (unless ansi-doc-alist
e6a2505
+    (create-index-el-from-index-idx )
e6a2505
+    (load (concat ansi-doc-dir "/index.el")))
e6a2505
+  (let* ((name (completing-read "Doc on: " ansi-doc-alist nil t))
e6a2505
+	 (tem (mapcan #'(lambda (elem)
e6a2505
+			  (and (equal name (car elem)) (cddr elem)))
e6a2505
+		      ansi-doc-alist))
e6a2505
+	 (first (if (cdr tem) "First" "")))
e6a2505
+    (dolist (x tem)
e6a2505
+      (message "%s Doc in Chapter %s page %s) .." first (car x) (cdr x))
e6a2505
+      (let ((chap (maybe-gzip-to-tmp
e6a2505
+		   (concat ansi-doc-dir
e6a2505
+			   (downcase (format "/chap-%s.dvi"  (car x)))))))
e6a2505
+	(setq first (if (cdr tem) "Next" "Final"))
e6a2505
+	(shell-command (concat "xdvi  -expert -xoffset .2 -yoffset -.2 "
e6a2505
+			       " -paper 7.2x8.5 "
e6a2505
+			       " -display "
e6a2505
+			       (or
e6a2505
+				(if (featurep 'xemacs)
e6a2505
+				    (console-connection (selected-console))
e6a2505
+				  x-display-name)
e6a2505
+				":0")
e6a2505
+			       "  -geometry -2-2 +" (+ (cdr x) 2)" "
e6a2505
+			       chap)))))
e6a2505
+  (message nil))
Jerry James b08b3a4
--- ./elisp/dbl.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/dbl.el	2014-09-06 20:00:00.000000000 -0600
e6a2505
@@ -97,29 +97,35 @@
e6a2505
 ;(define-key ctl-x-map "&" 'send-dbl-command)
e6a2505
 
e6a2505
 ;;Of course you may use `def-dbl' with any other dbl command, including
e6a2505
-;;user defined ones.   
e6a2505
+;;user defined ones.
e6a2505
 
e6a2505
-(defmacro def-dbl (name key &optional doc)
e6a2505
+(defmacro def-dbl (name keys &optional doc)
e6a2505
+  (unless (consp keys)
e6a2505
+    (setq keys (list keys)))
e6a2505
   (let* ((fun (intern (format "dbl-%s" (read name))))
e6a2505
-	 )
e6a2505
-    (list 'progn
e6a2505
- 	  (list 'defun fun '(arg)
e6a2505
-		(or doc "")
e6a2505
-		'(interactive "p")
e6a2505
-		(list 'dbl-call name 'arg))
e6a2505
-	  (list 'define-key 'dbl-mode-map key  (list 'quote fun)))))
e6a2505
+	 (keydefs (mapcar #'(lambda (key) `(define-key dbl-mode-map ,key
e6a2505
+					    (quote ,fun)))
e6a2505
+		   keys)))
e6a2505
+    `(progn
e6a2505
+      (defun ,fun (arg)
e6a2505
+	,(or doc "")
e6a2505
+	(interactive "p")
e6a2505
+	(dbl-call ,name arg))
e6a2505
+      ,@keydefs)))
e6a2505
 
e6a2505
-(def-dbl ":step %p"   "\M-s" "Step one source line with display")
e6a2505
-(def-dbl ":step %p"   "\C-c\C-s" "Step one source line with display")
e6a2505
-(def-dbl ":stepi %p"  "\C-c\t" "Step one instruction with display")
e6a2505
-(def-dbl ":next %p"   "\M-n" "Step one source line (skip functions)")
e6a2505
-(def-dbl ":next %p"   "\C-c\C-n" "Step one source line (skip functions)")
e6a2505
+(def-dbl ":step %p"  ("\M-s" "\C-c\C-s") "Step one source line with display")
e6a2505
+(def-dbl ":stepi %p" "\C-c\t" "Step one instruction with display")
e6a2505
+(def-dbl ":next %p"  ("\M-n" "\C-c\C-n") "Step one source line (skip functions)")
e6a2505
 (def-dbl ":r"   "\M-c" "Continue with display")
e6a2505
 
e6a2505
 (def-dbl ":finish" "\C-c\C-f" "Finish executing current function")
e6a2505
 (def-dbl ":up %p"     "\C-cu"   "Go up N stack frames (numeric arg) with display")
e6a2505
 (def-dbl ":down %p"   "\C-cd"   "Go down N stack frames (numeric arg) with display")
e6a2505
 
e6a2505
+(defvar dbl-last-frame nil)
e6a2505
+(defvar dbl-last-frame-displayed-p t)
e6a2505
+(defvar dbl-delete-prompt-marker nil)
e6a2505
+
e6a2505
 
e6a2505
 (defun dbl-mode ()
e6a2505
   "Major mode for interacting with an inferior Lisp or Maxima process.
Jerry James b08b3a4
@@ -227,7 +233,7 @@ You may also enter keyword break command
e6a2505
 
e6a2505
 
e6a2505
 (defun dbl (p)
e6a2505
- 
e6a2505
+
e6a2505
  "Makes a dbl buffer, suitable for running an inferior
e6a2505
   gcl.  You are prompted for a name for the buffer.  After the shell
e6a2505
   starts you should start up your lisp program (eg gcl).  The bufferd
Jerry James b08b3a4
@@ -235,16 +241,13 @@ You may also enter keyword break command
e6a2505
   debug loop with (si::dbl) or :dbl in a debug loop.  "
e6a2505
 
e6a2505
   (interactive "p")
e6a2505
-  
e6a2505
-  (let ( tem
e6a2505
-	(dir default-directory)
e6a2505
-	;; important for winnt version of emacs
e6a2505
+
e6a2505
+  (let (;; important for winnt version of emacs
e6a2505
 	(binary-process-input t)
e6a2505
 	(binary-process-output nil)
e6a2505
-	switches
e6a2505
 	(name (concat "dbl" (if (equal p 1) "" p) ""))
e6a2505
 	)
e6a2505
-    
e6a2505
+
e6a2505
     (switch-to-buffer (concat "*" name "*"))
e6a2505
     (or (bolp) (newline))
e6a2505
     (insert "Current directory is " default-directory "\n")
Jerry James b08b3a4
@@ -291,15 +294,6 @@ the `--fullname' keyword as in:
e6a2505
 ;; It records the filename and line number, and maybe displays that file.
e6a2505
 (defun dbl-filter (proc string)
e6a2505
   (let ((inhibit-quit t))
e6a2505
-    (set-buffer (process-buffer proc))
e6a2505
-    (goto-char (point-max))
e6a2505
-    (insert string)
e6a2505
-    (goto-char (point-max))
e6a2505
-    ))
e6a2505
-
e6a2505
-
e6a2505
-(defun dbl-filter (proc string)
e6a2505
-  (let ((inhibit-quit t))
e6a2505
     (if dbl-filter-accumulator
e6a2505
 	(dbl-filter-accumulate-marker proc
e6a2505
 				      (concat dbl-filter-accumulator string))
Jerry James b08b3a4
@@ -314,14 +308,13 @@ the `--fullname' keyword as in:
e6a2505
 	  (let ((end (string-match "\n" string)))
e6a2505
 	    (if end
e6a2505
               (progn
e6a2505
-		(setq me string)
e6a2505
 		(cond ((string-match
e6a2505
 			"\032\032\\([A-Za-z]?:?[^:]*\\):\\([0-9]*\\):[^\n]+\n"
e6a2505
 			string)
e6a2505
 		       (setq dbl-last-frame
e6a2505
 			      (cons
e6a2505
 			      (match-string 1 string)
e6a2505
-			      (string-to-int  (match-string 2 string))))
e6a2505
+			      (string-to-number (match-string 2 string))))
e6a2505
 		       
e6a2505
 		       (cond ((equal (cdr dbl-last-frame)  0)
e6a2505
 			      ;(message "got 0")
Jerry James b08b3a4
@@ -358,8 +351,7 @@ the `--fullname' keyword as in:
e6a2505
 (defun dbl-filter-insert (proc string)
e6a2505
   (let (moving
e6a2505
 	output-after-point 
e6a2505
-	(old-buffer (current-buffer))
e6a2505
-	start)
e6a2505
+	(old-buffer (current-buffer)))
e6a2505
     (set-buffer (process-buffer proc))
e6a2505
     ;; test to see if we will move the point.   We want that the
e6a2505
     ;; window-point of the buffer, should be equal to process-mark. 
Jerry James b08b3a4
@@ -370,7 +362,6 @@ the `--fullname' keyword as in:
e6a2505
 	(save-excursion
e6a2505
 	  ;; Insert the text, moving the process-marker.
e6a2505
 	  (goto-char (process-mark proc))
e6a2505
-	  (setq start (point))
e6a2505
 	  (insert string)
e6a2505
 	  (set-marker (process-mark proc) (point))
e6a2505
 	 ; (setq bill (cons (list 'hi (process-mark proc) (marker-position (process-mark proc)) (point)) bill))
Jerry James b08b3a4
@@ -488,19 +479,22 @@ If a non process buffer, just return cur
e6a2505
   (interactive)
e6a2505
   (save-excursion
e6a2505
     (end-of-line)
e6a2505
-    (cond ((get-buffer-process (current-buffer))
e6a2505
-	   (cond
e6a2505
-	    ((save-excursion
e6a2505
-	       (beginning-of-line)
e6a2505
-		(get-text-property (point) 'file-line)))
e6a2505
-	    ((progn (end-of-line) (re-search-backward " \\([^: ]+\\):\\([0-9]+\\)" 300 nil))
e6a2505
-	     (setq file (buffer-substring (match-beginning 1) (match-end 1)))
e6a2505
-	     (setq line (buffer-substring (match-beginning 2) (match-end 2)))
e6a2505
-	     (setq line (read line))
e6a2505
-	     (and (integerp line)
e6a2505
-		  (setq file (search-path file 'dbl-dirs))
e6a2505
-		  (list file line)))))
e6a2505
-	  (t (list (buffer-file-name) (+ 1 (count-lines (point))))))))
e6a2505
+    (cond
e6a2505
+     ((get-buffer-process (current-buffer))
e6a2505
+      (cond
e6a2505
+       ((progn
e6a2505
+	  (beginning-of-line)
e6a2505
+	  (get-text-property (point) 'file-line)))
e6a2505
+       ((progn (end-of-line) (re-search-backward " \\([^: ]+\\):\\([0-9]+\\)" 300 nil))
e6a2505
+	(let ((file (buffer-substring (match-beginning 1) (match-end 1)))
e6a2505
+	      (line (buffer-substring (match-beginning 2) (match-end 2))))
e6a2505
+	  (setq line (read line))
e6a2505
+	  (and (integerp line)
e6a2505
+	       (setq file (search-path file 'dbl-dirs))
e6a2505
+	       (list file line))))))
e6a2505
+     (t (list (buffer-file-name)
e6a2505
+	      (+ 1 (if (featurep 'xemacs) (line-number)
e6a2505
+		     (line-number-at-pos))))))))
e6a2505
 
e6a2505
 (defun dbl-find-and-display-line ()
e6a2505
   (interactive)
Jerry James b08b3a4
@@ -511,11 +505,11 @@ If a non process buffer, just return cur
Jerry James bcc1d6c
   (let* ((buffer (dbl-find-file true-file))
Jerry James bcc1d6c
 	 (window (display-buffer buffer t))
Jerry James bcc1d6c
 	 (pos))
Jerry James bcc1d6c
-    (save-excursion
Jerry James bcc1d6c
-      (set-buffer buffer)
Jerry James bcc1d6c
+    (with-buffer buffer
Jerry James bcc1d6c
       (save-restriction
Jerry James bcc1d6c
 	(widen)
Jerry James bcc1d6c
-	(goto-line line)
Jerry James bcc1d6c
+	(goto-char (point-min))
Jerry James bcc1d6c
+	(forward-line (1- line))
Jerry James bcc1d6c
 	(setq pos (point))
Jerry James bcc1d6c
 	(setq overlay-arrow-string "=>")
Jerry James bcc1d6c
 	(or overlay-arrow-position
Jerry James b08b3a4
@@ -554,8 +548,8 @@ If a non process buffer, just return cur
e6a2505
   (goto-char (point-max))
e6a2505
   (setq dbl-delete-prompt-marker (point-marker))
e6a2505
   (dbl-set-buffer)
e6a2505
-  (send-string (get-buffer-process current-dbl-buffer)
e6a2505
-	       (concat command "\n"))))
e6a2505
+  (process-send-string (get-buffer-process current-dbl-buffer)
e6a2505
+		       (concat command "\n"))))
e6a2505
 
e6a2505
 (defun dbl-subtitute-% (command n)
e6a2505
   (let* (result
Jerry James b08b3a4
@@ -566,8 +560,8 @@ If a non process buffer, just return cur
e6a2505
 	   (cond (in-dbl (setq file-line (dbl-find-line)))
e6a2505
 		 (t (setq file-line
e6a2505
 			  (list (buffer-file-name)
e6a2505
-				(+ 1 (count-lines
e6a2505
-							 (point)))))))))
e6a2505
+				(+ 1 (if (featurep 'xemacs) (line-number)
e6a2505
+				       (line-number-at-pos)))))))))
e6a2505
     (while (and command (string-match "\\([^%]*\\)%\\([adeflp]\\)" command))
e6a2505
       (let ((letter (string-to-char (substring command (match-beginning 2))))
e6a2505
 	    subst)
Jerry James b08b3a4
@@ -620,8 +614,8 @@ If a non process buffer, just return cur
e6a2505
 	     (if (get-buffer-process (current-buffer))
e6a2505
 		 (setq current-dbl-buffer (current-buffer)))
e6a2505
 	     (message name)
e6a2505
-	     (send-string (get-buffer-process current-dbl-buffer)
e6a2505
-			  (concat name "\n"))
e6a2505
+	     (process-send-string (get-buffer-process current-dbl-buffer)
e6a2505
+				  (concat name "\n"))
e6a2505
 	     (other-window 1)
e6a2505
 	     )))
e6a2505
 	(t
Jerry James b08b3a4
@@ -632,20 +626,21 @@ If a non process buffer, just return cur
e6a2505
 		       (1+ (count-lines 1 (point))))))
e6a2505
 	   (and    downcase-filenames-for-dbl
e6a2505
 		   (setq file-name (downcase file-name)))
e6a2505
-	   (send-string (get-buffer-process current-dbl-buffer)
e6a2505
-			(concat "break " file-name ":" line "\n"))))))
e6a2505
+	   (process-send-string (get-buffer-process current-dbl-buffer)
e6a2505
+				(concat "break " file-name ":" line "\n"))))))
e6a2505
 	
e6a2505
 	
e6a2505
 (defun dbl-read-address()
e6a2505
   "Return a string containing the core-address found in the buffer at point."
e6a2505
   (save-excursion
e6a2505
-   (let ((pt (dot)) found begin)
e6a2505
-     (setq found (if (search-backward "0x" (- pt 7) t)(dot)))
e6a2505
-     (cond (found (forward-char 2)(setq result
e6a2505
-			(buffer-substring found
e6a2505
-				 (progn (re-search-forward "[^0-9a-f]")
e6a2505
-					(forward-char -1)
e6a2505
-					(dot)))))
e6a2505
+   (let* ((pt (dot))
e6a2505
+	  (found (if (search-backward "0x" (- pt 7) t) (dot)))
e6a2505
+	  begin)
e6a2505
+     (cond (found (forward-char 2)
e6a2505
+		  (buffer-substring found
e6a2505
+				    (progn (re-search-forward "[^0-9a-f]")
e6a2505
+					   (forward-char -1)
e6a2505
+					   (dot))))
e6a2505
 	   (t (setq begin (progn (re-search-backward "[^0-9]") (forward-char 1)
e6a2505
 				 (dot)))
e6a2505
 	      (forward-char 1)
Jerry James b08b3a4
@@ -680,6 +675,6 @@ It is for customization by you.")
e6a2505
 	  (t (setq comm addr)))
e6a2505
     (switch-to-buffer current-dbl-buffer)
e6a2505
     (goto-char (dot-max))
e6a2505
-    (insert-string comm)))
e6a2505
+    (insert comm)))
e6a2505
 
e6a2505
 (provide 'dbl)
Jerry James b08b3a4
--- ./elisp/doc-to-texi.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/doc-to-texi.el	2014-09-06 20:00:00.000000000 -0600
e6a2505
@@ -51,7 +51,7 @@
e6a2505
 	   (let ((fun (get-match 1))
e6a2505
 		 (type (get-match 2))
e6a2505
 		 (package (get-match 3))
e6a2505
-		 args body)
e6a2505
+		 body)
e6a2505
 	     (goto-char (match-end 0))
e6a2505
 	     (setq body (buffer-substring (point) (- end 1)))
e6a2505
 	     (delete-region beg end )
e6a2505
@@ -78,22 +78,22 @@
e6a2505
 			  (?d .  "{Declaration}"))))))
e6a2505
       (if u (replace-match u)))))
e6a2505
 
e6a2505
-(setq b-alist '((?n . "number.texi")
e6a2505
-		(?s . "sequence.texi")
e6a2505
-		(?c . "character.texi")
e6a2505
-		(?l . "list.texi")
e6a2505
-		(?i . "io.texi")
e6a2505
-		(?a . "internal.texi")
e6a2505
-		(?f . "form.texi")
e6a2505
-		(?C . "compile.texi")
e6a2505
-		(?S . "symbol.texi")
e6a2505
-		(?t . "system.texi")
e6a2505
-		(?d . "structure.texi")
e6a2505
-		(?I . "iteration.texi")
e6a2505
-		(?u . "user-interface.texi")
e6a2505
-		(?d . "doc.texi")
e6a2505
-		(?b . "type.texi")
e6a2505
-		))
e6a2505
+(defvar b-alist '((?n . "number.texi")
e6a2505
+		  (?s . "sequence.texi")
e6a2505
+		  (?c . "character.texi")
e6a2505
+		  (?l . "list.texi")
e6a2505
+		  (?i . "io.texi")
e6a2505
+		  (?a . "internal.texi")
e6a2505
+		  (?f . "form.texi")
e6a2505
+		  (?C . "compile.texi")
e6a2505
+		  (?S . "symbol.texi")
e6a2505
+		  (?t . "system.texi")
e6a2505
+		  (?d . "structure.texi")
e6a2505
+		  (?I . "iteration.texi")
e6a2505
+		  (?u . "user-interface.texi")
e6a2505
+		  (?d . "doc.texi")
e6a2505
+		  (?b . "type.texi")
e6a2505
+		  ))
e6a2505
 (defun try1 ()
e6a2505
   (interactive)
e6a2505
   (while (re-search-forward "\n@def" nil t)
e6a2505
@@ -114,7 +114,7 @@
e6a2505
       
e6a2505
 
e6a2505
       
e6a2505
-(setq xall	  (mapcar 'cdr  b-alist))
e6a2505
+(defvar xall	  (mapcar 'cdr  b-alist))
e6a2505
 
e6a2505
 ;(let ((all xall)) (while all (set-buffer (car all))  (write-file (car all)) (setq all (cdr all))))
e6a2505
 ;(let ((all xall)) (while all   (find-file (car all)) (setq all (cdr all))))	
Jerry James b08b3a4
--- ./elisp/gcl.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/gcl.el	2014-09-06 20:00:00.000000000 -0600
e6a2505
@@ -14,6 +14,7 @@
e6a2505
 ;; M-p complete the current input by looking back through the buffer to see what was last typed
e6a2505
 ;;        using this prompt and this beginning.   Useful in shell, in lisp, in gdb,...
e6a2505
 
e6a2505
+(require 'inf-lisp)
e6a2505
 
e6a2505
 (setq lisp-mode-hook  'remote-lisp)
e6a2505
 
e6a2505
@@ -23,6 +24,9 @@
e6a2505
 ;(global-set-key "?p" 'lisp-complete)
e6a2505
 (global-set-key "?p" 'smart-complete)
e6a2505
 
e6a2505
+(defvar lisp-package nil)
e6a2505
+(defvar lisp-process nil)
e6a2505
+
e6a2505
 (defun remote-lisp (&rest l)
e6a2505
   (and (boundp 'lisp-mode-map)
e6a2505
        lisp-mode-map
Jerry James b08b3a4
@@ -158,12 +162,12 @@ by get-buffer-package.
e6a2505
 	))
e6a2505
     
e6a2505
 
e6a2505
-    (send-string this-lisp-process
e6a2505
-		 (concat ";;end of form" "\n" telnet-new-line))
e6a2505
+    (process-send-string this-lisp-process
e6a2505
+			 (concat ";;end of form" "\n" telnet-new-line))
e6a2505
     (cond (arg
e6a2505
 	   (if (numberp arg) (setq arg "compile"))
e6a2505
-	   (send-string this-lisp-process (concat "(" arg "'" fun ")"
e6a2505
-						  telnet-new-line))))
e6a2505
+	   (process-send-string this-lisp-process (concat "(" arg "'" fun ")"
e6a2505
+							  telnet-new-line))))
e6a2505
     (and time-to-throw-away
e6a2505
 	 (string-match "telnet"(buffer-name (process-buffer proc)))
e6a2505
 	 (dump-output proc time-to-throw-away))
Jerry James b08b3a4
@@ -194,7 +198,7 @@ by get-buffer-package.
e6a2505
 
e6a2505
 (defun my-send-region (proc beg end)
e6a2505
   (cond ((or (string-match "telnet" (process-name proc)))
e6a2505
-	 (send-region proc beg end))
e6a2505
+	 (process-send-region proc beg end))
e6a2505
 	(t
e6a2505
 	 (let ((package (get-buffer-package)))
e6a2505
 	   (save-excursion
Jerry James b08b3a4
@@ -213,7 +217,7 @@ by get-buffer-package.
e6a2505
 		 (write-region (point-min) (point-max) tmp-lisp-file nil nil)))
e6a2505
 	   (write-region beg end tmp-lisp-file t nil)
e6a2505
 	   (message "sending ..")
e6a2505
-	   (send-string
e6a2505
+	   (process-send-string
e6a2505
 	    proc
e6a2505
 	    (concat "(lisp::let ((*load-verbose* nil)) (#+sdebug si::nload #-sdebug load \""
e6a2505
 		    tmp-lisp-file
Jerry James b08b3a4
@@ -268,9 +272,9 @@ by get-buffer-package.
e6a2505
 		       (prog2 (other-window 1)
e6a2505
 			      (get-buffer-process (current-buffer))
e6a2505
 			      (other-window 1)))))
e6a2505
-	(send-string current-lisp-process "(macroexpand '")
e6a2505
-	(send-region current-lisp-process  beg (point) )
e6a2505
-	(send-string current-lisp-process ")\n")))))
e6a2505
+	(process-send-string current-lisp-process "(macroexpand '")
e6a2505
+	(process-send-region current-lisp-process  beg (point) )
e6a2505
+	(process-send-string current-lisp-process ")\n")))))
e6a2505
 
e6a2505
 (defun delete-comment-char (arg) 
e6a2505
   (while (and (> arg 0) (looking-at comment-start)) (delete-char 1) 
Jerry James b08b3a4
@@ -333,8 +337,8 @@ so a second comment-region adds another
e6a2505
  (interactive "P") 
e6a2505
  (save-excursion 
e6a2505
    (let ((beg (dot)) 
e6a2505
-	 (ok t)(end (mark)))
e6a2505
-          (comment-region1 beg end arg))))
e6a2505
+	 (end (mark)))
e6a2505
+     (comment-region1 beg end arg))))
e6a2505
 
e6a2505
 (defun comment-region1 (beg end arg)
e6a2505
   (let ((ok t))
Jerry James b08b3a4
@@ -347,7 +351,7 @@ so a second comment-region adds another
e6a2505
 	   (while ok 
e6a2505
 	     (cond (arg 
e6a2505
 		    (delete-comment-char arg)) 
e6a2505
-		   (t   (insert-string comment-start)))
e6a2505
+		   (t   (insert comment-start)))
e6a2505
 	     (if (< end (dot)) (setq ok nil)
e6a2505
 	       (if  (search-forward "\n" end t) nil (setq ok nil))) )
e6a2505
 	 (widen))))
Jerry James b08b3a4
@@ -363,13 +367,13 @@ so a second comment-region adds another
e6a2505
 	     (current-lisp-process (or  proc lisp-process)))
e6a2505
 	(other-window 1)
e6a2505
 	(message "Tracing: %s" (buffer-substring (point) end))
e6a2505
-	(send-string current-lisp-process "(trace ")
e6a2505
-	(send-region current-lisp-process (point) end)
e6a2505
-	(send-string current-lisp-process ")\n")))))
e6a2505
+	(process-send-string current-lisp-process "(trace ")
e6a2505
+	(process-send-region current-lisp-process (point) end)
e6a2505
+	(process-send-string current-lisp-process ")\n")))))
e6a2505
 
e6a2505
 (defun gcl-mode ()
e6a2505
   (interactive)
e6a2505
   (lisp-mode)
e6a2505
   )
e6a2505
 
e6a2505
-(provide 'gcl)
e6a2505
\ No newline at end of file
e6a2505
+(provide 'gcl)
Jerry James b08b3a4
--- ./elisp/man1-to-texi.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/man1-to-texi.el	2014-09-06 20:00:00.000000000 -0600
e6a2505
@@ -106,6 +106,8 @@
e6a2505
 ;	End of indented unfilled display.
e6a2505
 ; 
e6a2505
 
e6a2505
+(require 'makeinfo)
e6a2505
+
e6a2505
 (defun do-replace (lis &optional not-in-string)
e6a2505
   (let (x case-fold-search)
e6a2505
     (while lis
Jerry James bcc1d6c
@@ -229,7 +231,9 @@
Jerry James bcc1d6c
       (kill-buffer (get-buffer "foo.info")))
Jerry James bcc1d6c
 
Jerry James bcc1d6c
   (find-file "foo.n")
Jerry James bcc1d6c
-  (toggle-read-only 0)
Jerry James bcc1d6c
+  (if (featurep 'xemacs)
Jerry James bcc1d6c
+      (toggle-read-only 0)
Jerry James bcc1d6c
+    (read-only-mode 1))
Jerry James bcc1d6c
   (doit)
Jerry James bcc1d6c
   (write-file "foo.texi")
Jerry James bcc1d6c
   (makeinfo-buffer ))
Jerry James bcc1d6c
@@ -285,15 +289,14 @@
e6a2505
     (while (< i (length vec)) (setq tot (+ (aref vec i) tot)) (setq i (+ i 1)))
e6a2505
     (setq surplus (/ (- 70 tot) (+ 1 (length (car items)))))
e6a2505
     (while items
e6a2505
-      (setq tem (car items))
e6a2505
-      (setq i 0)
e6a2505
-      (let (ans x)
e6a2505
+      (let ((tem (car items)))
e6a2505
+	(setq i 0)
e6a2505
 	(insert "")
e6a2505
-	(while tem
e6a2505
-	  (insert (tex-center (car tem) (+ (aref vec i) surplus) 'left
e6a2505
-			      (real-length (car tem))))
e6a2505
-	  (setq tem (cdr tem)) (setq i (+ i 1)))
e6a2505
-	(insert "\n"))
e6a2505
+	(dolist (elem tem)
e6a2505
+	  (insert (tex-center elem (+ (aref vec i) surplus) 'left
e6a2505
+			      (real-length elem)))
e6a2505
+	  (setq i (+ i 1))))
e6a2505
+      (insert "\n")
e6a2505
       (setq items (cdr items)))
e6a2505
     )
e6a2505
   )
Jerry James bcc1d6c
@@ -330,22 +333,7 @@
e6a2505
 	(insert "@w{" ) (end-of-line) (insert "}")
e6a2505
 	    (forward-line 1) (beginning-of-line))))
e6a2505
 
e6a2505
-(defun add-keywords ()
e6a2505
-  (let ((tem tk-control-options)x lis l y)
e6a2505
-    (while tem
e6a2505
-      (setq l (car tem))
e6a2505
-      (setq tem (cdr tem))
e6a2505
-      (setq x (symbol-name (car l )))
e6a2505
-      (setq lis (car (cdr l)))
e6a2505
-      (while lis
e6a2505
-	(cond ((atom lis) (setq lis nil))
e6a2505
-	      (t (setq y (symbol-name (car lis)))
e6a2505
-		 (do-replace (list (list (concat x  " "y "")
e6a2505
-					 (concat x " :"y "")
e6a2505
-					 )))))
e6a2505
-	(setq lis (cdr lis))))))
e6a2505
-
e6a2505
-(setq tk-control-options
e6a2505
+(defvar tk-control-options
e6a2505
       '((after fixnum) 
e6a2505
 	(exit fixnum) 
e6a2505
 	(lower window) 
Jerry James bcc1d6c
@@ -375,7 +363,22 @@
e6a2505
 	(update (idletasks)) 
e6a2505
 	))
e6a2505
 
e6a2505
-(setq tk-widget-options
e6a2505
+(defun add-keywords ()
e6a2505
+  (let ((tem tk-control-options)x lis l y)
e6a2505
+    (while tem
e6a2505
+      (setq l (car tem))
e6a2505
+      (setq tem (cdr tem))
e6a2505
+      (setq x (symbol-name (car l )))
e6a2505
+      (setq lis (car (cdr l)))
e6a2505
+      (while lis
e6a2505
+	(cond ((atom lis) (setq lis nil))
e6a2505
+	      (t (setq y (symbol-name (car lis)))
e6a2505
+		 (do-replace (list (list (concat x  " "y "")
e6a2505
+					 (concat x " :"y "")
e6a2505
+					 )))))
e6a2505
+	(setq lis (cdr lis))))))
e6a2505
+
e6a2505
+(defvar tk-widget-options
e6a2505
       '(
e6a2505
 	(button (activate configure deactivate flash invoke)) 
e6a2505
 	(listbox ( configure curselection delete get insert nearest
Jerry James bcc1d6c
@@ -404,7 +407,7 @@
e6a2505
 	(toplevel ( configure)) 
e6a2505
 	))
e6a2505
 
e6a2505
-(setq manual-sections
e6a2505
+(defvar manual-sections
e6a2505
       '(after bind button canvas checkbutton destroy  entry exit focus foo frame grab label lbSingSel listbox lower menu menubar menubutton message option options pack-old pack place radiobutton raise scale scrollbar selection send text tk tkerror tkvars tkwait toplevel update winfo wm))
e6a2505
 
e6a2505
 ;(setq widgets (sort (mapcar 'car tk-widget-options) 'string-lessp))
Jerry James b08b3a4
--- ./elisp/smart-complete.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/smart-complete.el	2014-09-06 20:00:00.000000000 -0600
e6a2505
@@ -85,8 +85,7 @@
e6a2505
 	(pat (concat (regexp-for-this-prompt prompt)
e6a2505
 		     "\\(" (regexp-quote str) "\\)" ))
e6a2505
 	offered (not-yet t)
e6a2505
-	)
e6a2505
-    (setq bill pat)
e6a2505
+	at this)
e6a2505
     (while (and  not-yet
e6a2505
 		 (re-search-backward pat nil t))
e6a2505
       (goto-char (match-beginning 1))
Jerry James b08b3a4
--- ./elisp/sshell.el.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a4
+++ ./elisp/sshell.el	2014-09-06 20:00:00.000000000 -0600
Jerry James b08b3a4
@@ -119,9 +119,9 @@ and lisp-send-defun."
e6a2505
 	 (ff
e6a2505
 	  (save-excursion
e6a2505
 	    (skip-chars-backward "[a-z---_0-9$/A-Z~#.]")
e6a2505
-	    (buffer-substring (setq beg (point)) p))))
e6a2505
-    (setq dir (or (file-name-directory ff) default-directory))
e6a2505
-    (setq file (file-name-nondirectory ff))
e6a2505
+	    (buffer-substring (setq beg (point)) p)))
e6a2505
+	 (dir (or (file-name-directory ff) default-directory))
e6a2505
+	 (file (file-name-nondirectory ff)))
e6a2505
     (cond ((and (setq tem (file-name-completion (or file "") dir))
e6a2505
 		(not (equal tem file)))
e6a2505
 	   (cond ((eq tem t))
Jerry James b08b3a4
@@ -181,11 +181,10 @@ If yours does, you will probably want to
e6a2505
 
e6a2505
 (defun make-sshell (name program &optional startfile &rest switches)
e6a2505
   (let ((buffer (get-buffer-create (concat "*" name "*")))
e6a2505
-	proc status size)
e6a2505
+	proc status)
e6a2505
     (setq proc (get-buffer-process buffer))
e6a2505
     (if proc (setq status (process-status proc)))
Jerry James bcc1d6c
-    (save-excursion
Jerry James bcc1d6c
-      (set-buffer buffer)
Jerry James bcc1d6c
+    (with-buffer buffer
Jerry James bcc1d6c
       ;;    (setq size (buffer-size))
Jerry James bcc1d6c
       (if (memq status '(run stop))
Jerry James bcc1d6c
 	  nil
Jerry James b08b3a4
@@ -376,4 +375,4 @@ Also put cursor there."
e6a2505
 	       (point)))
e6a2505
 (require 'smart-complete)
e6a2505
 
e6a2505
-(provide 'sshell)
e6a2505
\ No newline at end of file
e6a2505
+(provide 'sshell)