1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

lisp/comint.el: Fix `comint-write-input-ring' context

(comint-write-input-ring): Use `comint-input-ring-separator' in the
context of the caller, not the output buffer
This commit is contained in:
Michael R. Mauger 2025-10-28 23:44:44 -04:00
parent 44cdb65cf3
commit f0f6fa3b68

View file

@ -1123,6 +1123,7 @@ See also `comint-read-input-ring'."
(let* ((history-buf (get-buffer-create " *Temp Input History*"))
(ring comint-input-ring)
(file comint-input-ring-file-name)
(separator comint-input-ring-separator)
(index (ring-length ring)))
;; Write it all out into a buffer first. Much faster, but messier,
;; than writing it one line at a time.
@ -1130,7 +1131,7 @@ See also `comint-read-input-ring'."
(erase-buffer)
(while (> index 0)
(setq index (1- index))
(insert (ring-ref ring index) comint-input-ring-separator))
(insert (ring-ref ring index) separator))
(write-region (buffer-string) nil file nil 'no-message)
(kill-buffer nil))))))