diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/eshell/em-hist.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 1ab3c60b2c7..8084c126530 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el | |||
| @@ -444,7 +444,6 @@ line, with the most recent command last. See also | |||
| 444 | (ignore-dups eshell-hist-ignoredups)) | 444 | (ignore-dups eshell-hist-ignoredups)) |
| 445 | (with-temp-buffer | 445 | (with-temp-buffer |
| 446 | (insert-file-contents file) | 446 | (insert-file-contents file) |
| 447 | ;; Save restriction in case file is already visited... | ||
| 448 | ;; Watch for those date stamps in history files! | 447 | ;; Watch for those date stamps in history files! |
| 449 | (goto-char (point-max)) | 448 | (goto-char (point-max)) |
| 450 | (while (and (< count size) | 449 | (while (and (< count size) |
| @@ -488,7 +487,9 @@ See also `eshell-read-history'." | |||
| 488 | (while (> index 0) | 487 | (while (> index 0) |
| 489 | (setq index (1- index)) | 488 | (setq index (1- index)) |
| 490 | (let ((start (point))) | 489 | (let ((start (point))) |
| 491 | (insert (ring-ref ring index) ?\n) | 490 | ;; Remove properties before inserting, to avoid trouble |
| 491 | ;; with read-only strings (Bug#28700). | ||
| 492 | (insert (substring-no-properties (ring-ref ring index)) ?\n) | ||
| 492 | (subst-char-in-region start (1- (point)) ?\n ?\177))) | 493 | (subst-char-in-region start (1- (point)) ?\n ?\177))) |
| 493 | (eshell-with-private-file-modes | 494 | (eshell-with-private-file-modes |
| 494 | (write-region (point-min) (point-max) file append | 495 | (write-region (point-min) (point-max) file append |