From: Robert Pluim Date: Mon, 30 Jan 2023 09:25:19 +0100 >>>>> On Fri, 27 Jan 2023 19:45:33 -0800, Bob Rogers said: Bob> Then the following should fit the bill. Given that this solution Bob> introduces a defcustom, I imagine it should also have a NEWS item as Bob> well . . . Yes. And a :version on the new defcustom itself. Right. Bob> -- Bob Bob> * lisp/shell.el (shell-get-old-input-include-continuation-lines): New Bob> defcustom (default nil). Bob> (shell-get-old-input): Like comint-get-old-input-default but include Bob> all continuation lines if the above is true. Bob> (shell-mode): Install shell-get-old-input. (bug#61069) Two spaces after '.' Good; I prefer that as well. (I see I chose a poor example as a commit log message prototype.) Bob> +(defcustom shell-get-old-input-include-continuation-lines nil Bob> + "If non-nil, shell-get-old-input-default includes \"\\\" lines." Bob> + :type 'boolean Bob> + :group 'shell) Bob> + "Whether `shell-get-old-input-default' includes \"\\\" lines." Nice; I was wondering how to make that more concise. Bob> +(defun shell-get-old-input () Bob> + . . . Bob> + (let (field-prop bof) Bob> + (if (and (not comint-use-prompt-regexp) Bob> + ;; Make sure we're in an input rather than output field. Bob> + (not (setq field-prop (get-char-property Bob> + (setq bof (field-beginning)) 'field)))) Bob> + (field-string-no-properties bof) Emacs uses spaces only in elisp. We even have a .dir-locals.el enforcing that. Robert -- I hadn't noticed that, actually -- either the .dir-locals.el or the policy. FWIW, I think both of these tabs are from cutting-and-pasting from comint.el. -- Bob