Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
45915:09f444dd0dfe | 45916:e8271a03c1eb |
---|---|
1658 old-point)))) | 1658 old-point)))) |
1659 | 1659 |
1660 ;; Advance process-mark | 1660 ;; Advance process-mark |
1661 (set-marker (process-mark process) (point)) | 1661 (set-marker (process-mark process) (point)) |
1662 | 1662 |
1663 (run-hook-with-args 'comint-output-filter-functions string) | |
1664 (goto-char (process-mark process)) ; in case a filter moved it | |
1665 | |
1663 (unless comint-use-prompt-regexp-instead-of-fields | 1666 (unless comint-use-prompt-regexp-instead-of-fields |
1664 (let ((inhibit-read-only t)) | 1667 (let ((inhibit-read-only t)) |
1665 (add-text-properties comint-last-output-start (point) | 1668 (add-text-properties comint-last-output-start (point) |
1666 '(rear-nonsticky t | 1669 '(rear-nonsticky t |
1667 field output | 1670 field output |
1682 (setq comint-last-prompt-overlay | 1685 (setq comint-last-prompt-overlay |
1683 (make-overlay prompt-start (point))) | 1686 (make-overlay prompt-start (point))) |
1684 (overlay-put comint-last-prompt-overlay | 1687 (overlay-put comint-last-prompt-overlay |
1685 'font-lock-face 'comint-highlight-prompt)))) | 1688 'font-lock-face 'comint-highlight-prompt)))) |
1686 | 1689 |
1687 (goto-char saved-point) | 1690 (goto-char saved-point))))))) |
1688 | |
1689 (run-hook-with-args 'comint-output-filter-functions string))))))) | |
1690 | 1691 |
1691 (defun comint-preinput-scroll-to-bottom () | 1692 (defun comint-preinput-scroll-to-bottom () |
1692 "Go to the end of buffer in all windows showing it. | 1693 "Go to the end of buffer in all windows showing it. |
1693 Movement occurs if point in the selected window is not after the process mark, | 1694 Movement occurs if point in the selected window is not after the process mark, |
1694 and `this-command' is an insertion command. Insertion commands recognised | 1695 and `this-command' is an insertion command. Insertion commands recognised |
1792 If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then return | 1793 If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then return |
1793 the current line with any initial string matching the regexp | 1794 the current line with any initial string matching the regexp |
1794 `comint-prompt-regexp' removed." | 1795 `comint-prompt-regexp' removed." |
1795 (let ((bof (field-beginning))) | 1796 (let ((bof (field-beginning))) |
1796 (if (eq (get-char-property bof 'field) 'input) | 1797 (if (eq (get-char-property bof 'field) 'input) |
1797 (field-string bof) | 1798 (field-string-no-properties bof) |
1798 (comint-bol) | 1799 (comint-bol) |
1799 (buffer-substring-no-properties (point) (line-end-position))))) | 1800 (buffer-substring-no-properties (point) (line-end-position))))) |
1800 | 1801 |
1801 (defun comint-copy-old-input () | 1802 (defun comint-copy-old-input () |
1802 "Insert after prompt old input at point as new input to be edited. | 1803 "Insert after prompt old input at point as new input to be edited. |