This is a good thing to set in mode hooks.")
-(defvar comint-input-filter
- (function (lambda (str) (not (string-match "\\`\\s *\\'" str))))
+(defvar comint-input-filter #'comint-nonblank-p
"Predicate for filtering additions to input history.
Takes one argument, the input. If non-nil, the input may be saved on the input
history list. Default is to save anything that isn't all whitespace.")
(set-process-coding-system proc decoding encoding))
proc))
+(defun comint-nonblank-p (str)
+ "Return non-nil if STR contains non-whitespace syntax."
+ (not (string-match "\\`\\s *\\'" str)))
+
(defun comint-insert-input (event)
"In a Comint buffer, set the current input to the previous input at point.
If there is no previous input at point, run the command specified