diff lisp/comint.el @ 45916:e8271a03c1eb

(comint-get-old-input-default): Strip text properties for fields too. (comint-output-filter): Run output-filter functions before setting up the prompt.
author Miles Bader <miles@gnu.org>
date Thu, 20 Jun 2002 07:30:04 +0000
parents 5d6de4aa3f61
children c1c7a7405444
line wrap: on
line diff
--- a/lisp/comint.el	Thu Jun 20 01:02:57 2002 +0000
+++ b/lisp/comint.el	Thu Jun 20 07:30:04 2002 +0000
@@ -1660,6 +1660,9 @@
 	    ;; Advance process-mark
 	    (set-marker (process-mark process) (point))
 
+	    (run-hook-with-args 'comint-output-filter-functions string)
+	    (goto-char (process-mark process)) ; in case a filter moved it
+
 	    (unless comint-use-prompt-regexp-instead-of-fields
               (let ((inhibit-read-only t))
                 (add-text-properties comint-last-output-start (point)
@@ -1684,9 +1687,7 @@
 		  (overlay-put comint-last-prompt-overlay
 			       'font-lock-face 'comint-highlight-prompt))))
 
-	    (goto-char saved-point)
-
-	    (run-hook-with-args 'comint-output-filter-functions string)))))))
+	    (goto-char saved-point)))))))
 
 (defun comint-preinput-scroll-to-bottom ()
   "Go to the end of buffer in all windows showing it.
@@ -1794,7 +1795,7 @@
 `comint-prompt-regexp' removed."
   (let ((bof (field-beginning)))
     (if (eq (get-char-property bof 'field) 'input)
-	(field-string bof)
+	(field-string-no-properties bof)
       (comint-bol)
       (buffer-substring-no-properties (point) (line-end-position)))))