diff options
| -rw-r--r-- | lisp/comint.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 7bac30598f4..a01ecd3dbf7 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -387,8 +387,7 @@ See also `completion-at-point'. | |||
| 387 | 387 | ||
| 388 | This is a good thing to set in mode hooks.") | 388 | This is a good thing to set in mode hooks.") |
| 389 | 389 | ||
| 390 | (defvar comint-input-filter | 390 | (defvar comint-input-filter #'comint-nonblank-p |
| 391 | (function (lambda (str) (not (string-match "\\`\\s *\\'" str)))) | ||
| 392 | "Predicate for filtering additions to input history. | 391 | "Predicate for filtering additions to input history. |
| 393 | Takes one argument, the input. If non-nil, the input may be saved on the input | 392 | Takes one argument, the input. If non-nil, the input may be saved on the input |
| 394 | history list. Default is to save anything that isn't all whitespace.") | 393 | history list. Default is to save anything that isn't all whitespace.") |
| @@ -857,6 +856,10 @@ series of processes in the same Comint buffer. The hook | |||
| 857 | (set-process-coding-system proc decoding encoding)) | 856 | (set-process-coding-system proc decoding encoding)) |
| 858 | proc)) | 857 | proc)) |
| 859 | 858 | ||
| 859 | (defun comint-nonblank-p (str) | ||
| 860 | "Return non-nil if STR contains non-whitespace syntax." | ||
| 861 | (not (string-match "\\`\\s *\\'" str))) | ||
| 862 | |||
| 860 | (defun comint-insert-input (event) | 863 | (defun comint-insert-input (event) |
| 861 | "In a Comint buffer, set the current input to the previous input at point. | 864 | "In a Comint buffer, set the current input to the previous input at point. |
| 862 | If there is no previous input at point, run the command specified | 865 | If there is no previous input at point, run the command specified |