diff options
Diffstat (limited to 'lisp/comint.el')
| -rw-r--r-- | lisp/comint.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index c82c3d09df3..830f4ca88f9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1879,7 +1879,6 @@ Similarly for Soar, Scheme, etc." | |||
| 1879 | (let ((echo-len (- comint-last-input-end | 1879 | (let ((echo-len (- comint-last-input-end |
| 1880 | comint-last-input-start))) | 1880 | comint-last-input-start))) |
| 1881 | ;; Wait for all input to be echoed: | 1881 | ;; Wait for all input to be echoed: |
| 1882 | |||
| 1883 | (while (and (> (+ comint-last-input-end echo-len) | 1882 | (while (and (> (+ comint-last-input-end echo-len) |
| 1884 | (point-max)) | 1883 | (point-max)) |
| 1885 | (accept-process-output proc) | 1884 | (accept-process-output proc) |
| @@ -1891,7 +1890,6 @@ Similarly for Soar, Scheme, etc." | |||
| 1891 | ;; (+ comint-last-input-start | 1890 | ;; (+ comint-last-input-start |
| 1892 | ;; (- (point-max) comint-last-input-end)) | 1891 | ;; (- (point-max) comint-last-input-end)) |
| 1893 | nil comint-last-input-end (point-max))))) | 1892 | nil comint-last-input-end (point-max))))) |
| 1894 | |||
| 1895 | (if (and | 1893 | (if (and |
| 1896 | (<= (+ comint-last-input-end echo-len) | 1894 | (<= (+ comint-last-input-end echo-len) |
| 1897 | (point-max)) | 1895 | (point-max)) |
| @@ -1903,7 +1901,6 @@ Similarly for Soar, Scheme, etc." | |||
| 1903 | ;; Certain parts of the text to be deleted may have | 1901 | ;; Certain parts of the text to be deleted may have |
| 1904 | ;; been mistaken for prompts. We have to prevent | 1902 | ;; been mistaken for prompts. We have to prevent |
| 1905 | ;; problems when `comint-prompt-read-only' is non-nil. | 1903 | ;; problems when `comint-prompt-read-only' is non-nil. |
| 1906 | |||
| 1907 | (let ((inhibit-read-only t)) | 1904 | (let ((inhibit-read-only t)) |
| 1908 | (delete-region comint-last-input-end | 1905 | (delete-region comint-last-input-end |
| 1909 | (+ comint-last-input-end echo-len)) | 1906 | (+ comint-last-input-end echo-len)) |
| @@ -1912,7 +1909,6 @@ Similarly for Soar, Scheme, etc." | |||
| 1912 | (goto-char comint-last-input-end) | 1909 | (goto-char comint-last-input-end) |
| 1913 | (comint-update-fence))))))) | 1910 | (comint-update-fence))))))) |
| 1914 | 1911 | ||
| 1915 | |||
| 1916 | ;; This used to call comint-output-filter-functions, | 1912 | ;; This used to call comint-output-filter-functions, |
| 1917 | ;; but that scrolled the buffer in undesirable ways. | 1913 | ;; but that scrolled the buffer in undesirable ways. |
| 1918 | (run-hook-with-args 'comint-output-filter-functions ""))))) | 1914 | (run-hook-with-args 'comint-output-filter-functions ""))))) |
| @@ -2243,7 +2239,10 @@ the current line with any initial string matching the regexp | |||
| 2243 | (null (get-char-property (setq bof (field-beginning)) 'field))) | 2239 | (null (get-char-property (setq bof (field-beginning)) 'field))) |
| 2244 | (field-string-no-properties bof) | 2240 | (field-string-no-properties bof) |
| 2245 | (comint-bol) | 2241 | (comint-bol) |
| 2246 | (buffer-substring-no-properties (point) (line-end-position))))) | 2242 | (buffer-substring-no-properties (point) |
| 2243 | (if comint-use-prompt-regexp | ||
| 2244 | (line-end-position) | ||
| 2245 | (field-end)))))) | ||
| 2247 | 2246 | ||
| 2248 | (defun comint-copy-old-input () | 2247 | (defun comint-copy-old-input () |
| 2249 | "Insert after prompt old input at point as new input to be edited. | 2248 | "Insert after prompt old input at point as new input to be edited. |
| @@ -2670,7 +2669,7 @@ This command is like `M-.' in bash." | |||
| 2670 | (set-marker comint-insert-previous-argument-last-start-pos (point)) | 2669 | (set-marker comint-insert-previous-argument-last-start-pos (point)) |
| 2671 | ;; Insert the argument. | 2670 | ;; Insert the argument. |
| 2672 | (let ((input-string (comint-previous-input-string 0))) | 2671 | (let ((input-string (comint-previous-input-string 0))) |
| 2673 | (when (string-match "[ \t\n]*&[ \t\n]*$" input-string) | 2672 | (when (string-match "[ \t\n]*&" input-string) |
| 2674 | ;; strip terminating '&' | 2673 | ;; strip terminating '&' |
| 2675 | (setq input-string (substring input-string 0 (match-beginning 0)))) | 2674 | (setq input-string (substring input-string 0 (match-beginning 0)))) |
| 2676 | (insert (comint-arguments input-string index index))) | 2675 | (insert (comint-arguments input-string index index))) |