User: james   
  Date: 06/07/31 19:08:45
  Modified:    packages/xemacs-packages/xemacs-base ChangeLog comint.el
Log:
Fix more comint bugs reported by Ilya Golubev and Mike Kupfer.
<m34px576jc.fsf(a)jerrypc.cs.usu.edu>
Revision  Changes    Path
1.190     +14 -0     XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -p -r1.189 -r1.190
--- ChangeLog	2006/07/12 08:01:20	1.189
+++ ChangeLog	2006/07/31 17:08:44	1.190
@@ -1,3 +1,17 @@
+2006-07-25  Jerry James  <james(a)xemacs.org>
+
+	* comint.el (comint-inhibit-carriage-motion): default to t to
+	avoid surprises.
+	* comint.el (comint-snapshot-last-prompt): this function is
+	redundant with code in comint-output-filter.  Gut it, but leave it
+	for now for Emacs compatibility.
+	* comint.el (comint-output-filter): Move the narrow-to-region call
+	above the execution of the comint-output-filter-functions hooks
+	like it used to be to placate current callers.  Note that this is
+	different from the order in which Emacs does it, though, so watch
+	out for incompatibilities.  Also, remove now useless code checking
+	for trouble with comint-last-prompt-extent that will never happen.
+
 2006-07-12  Norbert Koch  <viteno(a)xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 2.07 released.
1.19      +6 -15     XEmacs/packages/xemacs-packages/xemacs-base/comint.el
Index: comint.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/comint.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- comint.el	2006/07/11 23:45:46	1.18
+++ comint.el	2006/07/31 17:08:44	1.19
@@ -1689,7 +1689,8 @@ redirection buffer.
 You can use `add-hook' to add functions to this list
 either globally or locally.")
 
-(defvar comint-inhibit-carriage-motion nil
+;; XEmacs change: don't interpret carriage control characters by default
+(defvar comint-inhibit-carriage-motion t
   "If nil, Comint will interpret `carriage control' characters in output.
 See `comint-carriage-motion' for details.")
 
@@ -1701,11 +1702,8 @@ See `comint-carriage-motion' for details
   "`snapshot' any current `comint-last-prompt-extent'.
 Freeze its attributes in place, even when more input comes along
 and moves the prompt extent."
-  (when comint-last-prompt-extent
-    (let ((inhibit-read-only t))
-      (add-text-properties (extent-start-position comint-last-prompt-extent)
-                           (extent-end-position comint-last-prompt-extent)
-                           (extent-properties comint-last-prompt-extent)))))
+  ;; XEmacs change: we do this in comint-output-filter
+  t)
 
 (defun comint-carriage-motion (start end)
   "Interpret carriage control characters in the region from START to END.
@@ -1761,6 +1759,7 @@ Make backspaces delete the previous char
 	    (setq functions (cdr functions))))
 
 	;; Insert STRING
+	;; XEmacs change: this code diverges wildly from the Emacs version
 	(let* ((inhibit-read-only t)
 	       (opoint (point))
 	       (obeg (point-min))
@@ -1795,6 +1794,7 @@ Make backspaces delete the previous char
 	    (comint-carriage-motion comint-last-output-start (point)))
 
 	  ;; Run these hooks with point where the user had it.
+	  (narrow-to-region obeg oend)
 	  (goto-char opoint)
 	  (run-hook-with-args 'comint-output-filter-functions string)
 	  (setq opoint (point))
@@ -1821,14 +1821,6 @@ Make backspaces delete the previous char
 	       prompt-start (point)
 	       '(read-only t end-open t start-open (read-only))))
 
-	    ;; XEmacs change: if the existing prompt extent is for a
-	    ;; different buffer, kill it
-	    (unless (or (null comint-last-prompt-extent)
-			(eq (extent-object comint-last-prompt-extent)
-			    oprocbuf))
-	      (delete-extent comint-last-prompt-extent)
-	      (setq comint-last-prompt-extent nil))
-
 	    (unless (and (bolp) (null comint-last-prompt-extent))
 	      ;; Need to create or move the prompt extent (in the case
 	      ;; where there is no prompt ((bolp) == t), we still do
@@ -1845,7 +1837,6 @@ Make backspaces delete the previous char
 		 'font-lock-face 'comint-highlight-prompt))))
 
 	  ;; Put point back where the user left it
-	  (narrow-to-region obeg oend)
 	  (goto-char opoint))))))
 
 ;; XEmacs: Use a variable for this so that new commands can be added easily.
    
    
    
 
                    
                    
                        
                        Show replies by date