diff options
| author | Juri Linkov | 2014-12-29 02:52:38 +0200 |
|---|---|---|
| committer | João Távora | 2015-01-13 07:39:23 +0000 |
| commit | 67edddfce60169c0d0e2d6d3dce1408f04febbf1 (patch) | |
| tree | a8cd652c23bba8212d1bf58515dc7bf627b77264 | |
| parent | 18a89a069c3d66ddb96e512f254f67f69d51ae22 (diff) | |
| download | emacs-67edddfce60169c0d0e2d6d3dce1408f04febbf1.tar.gz emacs-67edddfce60169c0d0e2d6d3dce1408f04febbf1.zip | |
More fixes to support multi-line search in comint
* lisp/comint.el (comint-history-isearch-message): Use field-beginning
instead of comint-line-beginning-position - that's more fixes for
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
(comint-history-isearch-message): Fix args of isearch-message-prefix.
[backport from trunk]
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/comint.el | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ff384a4c14d..fb8dfba05d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -6,6 +6,12 @@ | |||
| 6 | (comint-send-input): Go to the end of the field instead of the end | 6 | (comint-send-input): Go to the end of the field instead of the end |
| 7 | of the line to accept whole multi-line input. | 7 | of the line to accept whole multi-line input. |
| 8 | http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html | 8 | http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html |
| 9 | (comint-history-isearch-message): Use field-beginning | ||
| 10 | instead of comint-line-beginning-position - that's more fixes for | ||
| 11 | http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html | ||
| 12 | (comint-history-isearch-message): Fix args of isearch-message-prefix. | ||
| 13 | |||
| 14 | [Backport] | ||
| 9 | 15 | ||
| 10 | 2015-01-09 Eli Zaretskii <eliz@gnu.org> | 16 | 2015-01-09 Eli Zaretskii <eliz@gnu.org> |
| 11 | 17 | ||
diff --git a/lisp/comint.el b/lisp/comint.el index cd6ecb4c2f1..f33034bdb57 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1532,14 +1532,20 @@ the function `isearch-message'." | |||
| 1532 | ;; the initial comint prompt. | 1532 | ;; the initial comint prompt. |
| 1533 | (if (overlayp comint-history-isearch-message-overlay) | 1533 | (if (overlayp comint-history-isearch-message-overlay) |
| 1534 | (move-overlay comint-history-isearch-message-overlay | 1534 | (move-overlay comint-history-isearch-message-overlay |
| 1535 | (save-excursion (forward-line 0) (point)) | 1535 | (save-excursion |
| 1536 | (comint-line-beginning-position)) | 1536 | (goto-char (field-beginning)) |
| 1537 | (forward-line 0) | ||
| 1538 | (point)) | ||
| 1539 | (field-beginning)) | ||
| 1537 | (setq comint-history-isearch-message-overlay | 1540 | (setq comint-history-isearch-message-overlay |
| 1538 | (make-overlay (save-excursion (forward-line 0) (point)) | 1541 | (make-overlay (save-excursion |
| 1539 | (comint-line-beginning-position))) | 1542 | (goto-char (field-beginning)) |
| 1543 | (forward-line 0) | ||
| 1544 | (point)) | ||
| 1545 | (field-beginning))) | ||
| 1540 | (overlay-put comint-history-isearch-message-overlay 'evaporate t)) | 1546 | (overlay-put comint-history-isearch-message-overlay 'evaporate t)) |
| 1541 | (overlay-put comint-history-isearch-message-overlay | 1547 | (overlay-put comint-history-isearch-message-overlay |
| 1542 | 'display (isearch-message-prefix c-q-hack ellipsis)) | 1548 | 'display (isearch-message-prefix ellipsis isearch-nonincremental)) |
| 1543 | (if (and comint-input-ring-index (not ellipsis)) | 1549 | (if (and comint-input-ring-index (not ellipsis)) |
| 1544 | ;; Display the current history index. | 1550 | ;; Display the current history index. |
| 1545 | (message "History item: %d" (1+ comint-input-ring-index)) | 1551 | (message "History item: %d" (1+ comint-input-ring-index)) |