Mercurial > emacs
comparison lisp/comint.el @ 5016:11f0a3153f63
(comint-read-input-ring, comint-write-input-ring):
Treat "" like nil in comint-input-ring-file-name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 15 Nov 1993 05:18:33 +0000 |
parents | a4e67bc41cfa |
children | 08d056e0240f |
comparison
equal
deleted
inserted
replaced
5015:368dd7e8095d | 5016:11f0a3153f63 |
---|---|
609 Useful within mode or mode hooks. | 609 Useful within mode or mode hooks. |
610 | 610 |
611 The structure of the history file should be one input command per line, and | 611 The structure of the history file should be one input command per line, and |
612 most recent command last. | 612 most recent command last. |
613 See also `comint-input-ignoredups' and `comint-write-input-ring'." | 613 See also `comint-input-ignoredups' and `comint-write-input-ring'." |
614 (cond ((null comint-input-ring-file-name) | 614 (cond ((or (null comint-input-ring-file-name) |
615 (equal comint-input-ring-file-name "")) | |
615 nil) | 616 nil) |
616 ((not (file-readable-p comint-input-ring-file-name)) | 617 ((not (file-readable-p comint-input-ring-file-name)) |
617 (message "Cannot read history file %s" comint-input-ring-file-name)) | 618 (message "Cannot read history file %s" comint-input-ring-file-name)) |
618 (t | 619 (t |
619 (let ((history-buf (get-file-buffer comint-input-ring-file-name)) | 620 (let ((history-buf (get-file-buffer comint-input-ring-file-name)) |
648 | 649 |
649 Useful within process sentinels. | 650 Useful within process sentinels. |
650 | 651 |
651 See also `comint-read-input-ring'." | 652 See also `comint-read-input-ring'." |
652 (cond ((or (null comint-input-ring-file-name) | 653 (cond ((or (null comint-input-ring-file-name) |
654 (equal comint-input-ring-file-name "") | |
653 (null comint-input-ring) (ring-empty-p comint-input-ring)) | 655 (null comint-input-ring) (ring-empty-p comint-input-ring)) |
654 nil) | 656 nil) |
655 ((not (file-writable-p comint-input-ring-file-name)) | 657 ((not (file-writable-p comint-input-ring-file-name)) |
656 (message "Cannot write history file %s" comint-input-ring-file-name)) | 658 (message "Cannot write history file %s" comint-input-ring-file-name)) |
657 (t | 659 (t |