diff options
| author | Nickolas Lloyd | 2017-02-01 20:28:55 -0500 |
|---|---|---|
| committer | Nickolas Lloyd | 2017-02-01 20:28:55 -0500 |
| commit | 3dcb25deaefb52c9d314c4eddb93a3a815a58ec0 (patch) | |
| tree | 4abdced92049dcfb25576ffe16a708b1d680a1d0 /lisp/comint.el | |
| parent | 3ccffad606386a9344b592cb35bda9c5a1714242 (diff) | |
| parent | f3c77d11af65f3b319b1784b4c3cf08c51aa7997 (diff) | |
| download | emacs-3dcb25deaefb52c9d314c4eddb93a3a815a58ec0.tar.gz emacs-3dcb25deaefb52c9d314c4eddb93a3a815a58ec0.zip | |
Merge branch 'master' into nick.lloyd-bytecode-jit
Diffstat (limited to 'lisp/comint.el')
| -rw-r--r-- | lisp/comint.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index b9c65b0d512..c82c3d09df3 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; comint.el --- general command interpreter in a window stuff -*- lexical-binding: t -*- | 1 | ;;; comint.el --- general command interpreter in a window stuff -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1990, 1992-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1988, 1990, 1992-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 5 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| 6 | ;; Simon Marshall <simon@gnu.org> | 6 | ;; Simon Marshall <simon@gnu.org> |
| @@ -1879,6 +1879,7 @@ 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 | |||
| 1882 | (while (and (> (+ comint-last-input-end echo-len) | 1883 | (while (and (> (+ comint-last-input-end echo-len) |
| 1883 | (point-max)) | 1884 | (point-max)) |
| 1884 | (accept-process-output proc) | 1885 | (accept-process-output proc) |
| @@ -1890,6 +1891,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1890 | ;; (+ comint-last-input-start | 1891 | ;; (+ comint-last-input-start |
| 1891 | ;; (- (point-max) comint-last-input-end)) | 1892 | ;; (- (point-max) comint-last-input-end)) |
| 1892 | nil comint-last-input-end (point-max))))) | 1893 | nil comint-last-input-end (point-max))))) |
| 1894 | |||
| 1893 | (if (and | 1895 | (if (and |
| 1894 | (<= (+ comint-last-input-end echo-len) | 1896 | (<= (+ comint-last-input-end echo-len) |
| 1895 | (point-max)) | 1897 | (point-max)) |
| @@ -1901,6 +1903,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1901 | ;; Certain parts of the text to be deleted may have | 1903 | ;; Certain parts of the text to be deleted may have |
| 1902 | ;; been mistaken for prompts. We have to prevent | 1904 | ;; been mistaken for prompts. We have to prevent |
| 1903 | ;; problems when `comint-prompt-read-only' is non-nil. | 1905 | ;; problems when `comint-prompt-read-only' is non-nil. |
| 1906 | |||
| 1904 | (let ((inhibit-read-only t)) | 1907 | (let ((inhibit-read-only t)) |
| 1905 | (delete-region comint-last-input-end | 1908 | (delete-region comint-last-input-end |
| 1906 | (+ comint-last-input-end echo-len)) | 1909 | (+ comint-last-input-end echo-len)) |
| @@ -1909,6 +1912,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1909 | (goto-char comint-last-input-end) | 1912 | (goto-char comint-last-input-end) |
| 1910 | (comint-update-fence))))))) | 1913 | (comint-update-fence))))))) |
| 1911 | 1914 | ||
| 1915 | |||
| 1912 | ;; This used to call comint-output-filter-functions, | 1916 | ;; This used to call comint-output-filter-functions, |
| 1913 | ;; but that scrolled the buffer in undesirable ways. | 1917 | ;; but that scrolled the buffer in undesirable ways. |
| 1914 | (run-hook-with-args 'comint-output-filter-functions ""))))) | 1918 | (run-hook-with-args 'comint-output-filter-functions ""))))) |
| @@ -2239,10 +2243,7 @@ the current line with any initial string matching the regexp | |||
| 2239 | (null (get-char-property (setq bof (field-beginning)) 'field))) | 2243 | (null (get-char-property (setq bof (field-beginning)) 'field))) |
| 2240 | (field-string-no-properties bof) | 2244 | (field-string-no-properties bof) |
| 2241 | (comint-bol) | 2245 | (comint-bol) |
| 2242 | (buffer-substring-no-properties (point) | 2246 | (buffer-substring-no-properties (point) (line-end-position))))) |
| 2243 | (if comint-use-prompt-regexp | ||
| 2244 | (line-end-position) | ||
| 2245 | (field-end)))))) | ||
| 2246 | 2247 | ||
| 2247 | (defun comint-copy-old-input () | 2248 | (defun comint-copy-old-input () |
| 2248 | "Insert after prompt old input at point as new input to be edited. | 2249 | "Insert after prompt old input at point as new input to be edited. |
| @@ -2669,7 +2670,7 @@ This command is like `M-.' in bash." | |||
| 2669 | (set-marker comint-insert-previous-argument-last-start-pos (point)) | 2670 | (set-marker comint-insert-previous-argument-last-start-pos (point)) |
| 2670 | ;; Insert the argument. | 2671 | ;; Insert the argument. |
| 2671 | (let ((input-string (comint-previous-input-string 0))) | 2672 | (let ((input-string (comint-previous-input-string 0))) |
| 2672 | (when (string-match "[ \t\n]*&" input-string) | 2673 | (when (string-match "[ \t\n]*&[ \t\n]*$" input-string) |
| 2673 | ;; strip terminating '&' | 2674 | ;; strip terminating '&' |
| 2674 | (setq input-string (substring input-string 0 (match-beginning 0)))) | 2675 | (setq input-string (substring input-string 0 (match-beginning 0)))) |
| 2675 | (insert (comint-arguments input-string index index))) | 2676 | (insert (comint-arguments input-string index index))) |