[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f6c3965: Better support for milti-line shell input.
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] master f6c3965: Better support for milti-line shell input. |
Date: |
Fri, 05 Dec 2014 23:55:27 +0000 |
branch: master
commit f6c3965074dbf5f355ecce739104fb89fb4d90f8
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
Better support for milti-line shell input.
* lisp/comint.el (comint-history-isearch-search)
(comint-history-isearch-wrap): Use field-beginning instead of
comint-line-beginning-position.
(comint-send-input): Go to the end of the field instead of the end
of the line to accept whole multi-line input.
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
---
lisp/ChangeLog | 9 +++++++++
lisp/comint.el | 10 +++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5cc530c..b3cb2fa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,14 @@
2014-12-05 Juri Linkov <address@hidden>
+ * comint.el (comint-history-isearch-search)
+ (comint-history-isearch-wrap): Use field-beginning instead of
+ comint-line-beginning-position.
+ (comint-send-input): Go to the end of the field instead of the end
+ of the line to accept whole multi-line input.
+ http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
+
+2014-12-05 Juri Linkov <address@hidden>
+
* minibuffer.el (minibuffer-completion-help): Compare
selected-window with minibuffer-window to check whether
completions should be displayed near the minibuffer. (Bug#17809)
diff --git a/lisp/comint.el b/lisp/comint.el
index da37827..3085052 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1475,7 +1475,7 @@ Intended to be added to `isearch-mode-hook' in
`comint-mode'."
(or
;; 1. First try searching in the initial comint text
(funcall search-fun string
- (if isearch-forward bound (comint-line-beginning-position))
+ (if isearch-forward bound (field-beginning))
noerror)
;; 2. If the above search fails, start putting next/prev history
;; elements in the comint successively, and search the string
@@ -1491,7 +1491,7 @@ Intended to be added to `isearch-mode-hook' in
`comint-mode'."
(when (null comint-input-ring-index)
(error "End of history; no next item"))
(comint-next-input 1)
- (goto-char (comint-line-beginning-position)))
+ (goto-char (field-beginning)))
(t
;; Signal an error here explicitly, because
;; `comint-previous-input' doesn't signal an error.
@@ -1509,7 +1509,7 @@ Intended to be added to `isearch-mode-hook' in
`comint-mode'."
(unless isearch-forward
;; For backward search, don't search
;; in the comint prompt
- (comint-line-beginning-position))
+ (field-beginning))
noerror)))
;; Return point of the new search result
(point))
@@ -1557,7 +1557,7 @@ or to the last history element for a backward search."
(comint-goto-input (1- (ring-length comint-input-ring)))
(comint-goto-input nil))
(setq isearch-success t)
- (goto-char (if isearch-forward (comint-line-beginning-position)
(point-max))))
+ (goto-char (if isearch-forward (field-beginning) (point-max))))
(defun comint-history-isearch-push-state ()
"Save a function restoring the state of input history search.
@@ -1781,7 +1781,7 @@ Similarly for Soar, Scheme, etc."
(widen)
(let* ((pmark (process-mark proc))
(intxt (if (>= (point) (marker-position pmark))
- (progn (if comint-eol-on-send (end-of-line))
+ (progn (if comint-eol-on-send (goto-char (field-end)))
(buffer-substring pmark (point)))
(let ((copy (funcall comint-get-old-input)))
(goto-char pmark)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f6c3965: Better support for milti-line shell input.,
Juri Linkov <=