This variable is buffer-local."
:type '(choice (const :tag "off" nil)
- (const :tag "on" t)
(const input)
- (const history))
+ (const history)
+ (other :tag "on" t))
:group 'comint)
(defcustom comint-input-ignoredups nil
(define-key comint-mode-map [C-down] 'comint-next-input)
(define-key comint-mode-map "\er" 'comint-previous-matching-input)
(define-key comint-mode-map "\es" 'comint-next-matching-input)
- (define-key comint-mode-map [?\A-\M-r] 'comint-previous-matching-input-from-input)
- (define-key comint-mode-map [?\A-\M-s] 'comint-next-matching-input-from-input)
+ (define-key comint-mode-map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input)
+ (define-key comint-mode-map [?\C-c ?\M-s] 'comint-next-matching-input-from-input)
(define-key comint-mode-map "\e\C-l" 'comint-show-output)
(define-key comint-mode-map "\C-m" 'comint-send-input)
(define-key comint-mode-map "\C-d" 'comint-delchar-or-maybe-eof)
(define-key comint-mode-map "\C-c " 'comint-accumulate)
- (define-key comint-mode-map "\C-c\C-q" 'comint-get-next-from-history)
+ (define-key comint-mode-map "\C-c\C-x" 'comint-get-next-from-history)
(define-key comint-mode-map "\C-c\C-a" 'comint-bol-or-process-mark)
(define-key comint-mode-map "\C-c\C-u" 'comint-kill-input)
(define-key comint-mode-map "\C-c\C-w" 'backward-kill-word)
(default-directory
(if (file-accessible-directory-p default-directory)
default-directory
- (char-to-string directory-sep-char))))
- (apply 'start-process name buffer command switches)))
+ (char-to-string directory-sep-char)))
+ proc decoding encoding changed)
+ (setq proc (apply 'start-process name buffer command switches))
+ (let ((coding-systems (process-coding-system proc)))
+ (setq decoding (car coding-systems)
+ encoding (cdr coding-systems)))
+ ;; If start-process decided to use some coding system for decoding
+ ;; data sent form the process and the coding system doesn't
+ ;; specify EOL conversion, we had better convert CRLF to LF.
+ (if (vectorp (coding-system-eol-type decoding))
+ (setq decoding (coding-system-change-eol-conversion decoding 'dos)
+ changed t))
+ ;; Even if start-process left the coding system for encoding data
+ ;; sent from the process undecided, we had better use the same one
+ ;; as what we use for decoding. But, we should suppress EOL
+ ;; conversion.
+ (if (and decoding (not encoding))
+ (setq encoding (coding-system-change-eol-conversion decoding 'unix)
+ changed t))
+ (if changed
+ (set-process-coding-system proc decoding encoding))
+ proc))
\f
;; Input history processing in a buffer
;; ===========================================================================
(and (eq scroll 'this) (eq selected window))
(and (eq scroll 'others) (not (eq selected window)))
;; If point was at the end, keep it at end.
- (>= (point) comint-last-output-start)))
+ (and (marker-position comint-last-output-start)
+ (>= (point) comint-last-output-start))))
(goto-char (process-mark process)))
;; Optionally scroll so that the text
;; ends at the bottom of the window.
used \\[comint-accumulate] to send multiple lines at once,
the process mark is at the beginning of the accumulated input."
(interactive)
- (if (not (eq last-command 'comint-bol-or-mark))
+ (if (not (eq last-command 'comint-bol-or-process-mark))
(comint-bol nil)
(comint-goto-process-mark)))