diff options
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 7839bed7fb5..7c6c6fc9b7f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1751,7 +1751,7 @@ See also `multi-occur'." | |||
| 1751 | (append | 1751 | (append |
| 1752 | (when prefix-face | 1752 | (when prefix-face |
| 1753 | `(font-lock-face ,prefix-face)) | 1753 | `(font-lock-face ,prefix-face)) |
| 1754 | `(occur-prefix t mouse-face (highlight) | 1754 | `(occur-prefix t |
| 1755 | ;; Allow insertion of text | 1755 | ;; Allow insertion of text |
| 1756 | ;; at the end of the prefix | 1756 | ;; at the end of the prefix |
| 1757 | ;; (for Occur Edit mode). | 1757 | ;; (for Occur Edit mode). |
| @@ -1764,23 +1764,26 @@ See also `multi-occur'." | |||
| 1764 | ;; We don't put `mouse-face' on the newline, | 1764 | ;; We don't put `mouse-face' on the newline, |
| 1765 | ;; because that loses. And don't put it | 1765 | ;; because that loses. And don't put it |
| 1766 | ;; on context lines to reduce flicker. | 1766 | ;; on context lines to reduce flicker. |
| 1767 | (propertize curstring 'mouse-face (list 'highlight) | 1767 | (propertize curstring |
| 1768 | 'occur-target marker | 1768 | 'occur-target marker |
| 1769 | 'follow-link t | 1769 | 'follow-link t |
| 1770 | 'help-echo | 1770 | 'help-echo |
| 1771 | "mouse-2: go to this occurrence")) | 1771 | "mouse-2: go to this occurrence")) |
| 1772 | (out-line | 1772 | (out-line |
| 1773 | (concat | 1773 | ;; Add non-numeric prefix to all non-first lines |
| 1774 | match-prefix | 1774 | ;; of multi-line matches. |
| 1775 | ;; Add non-numeric prefix to all non-first lines | 1775 | (concat |
| 1776 | ;; of multi-line matches. | ||
| 1777 | (replace-regexp-in-string | 1776 | (replace-regexp-in-string |
| 1778 | "\n" | 1777 | "\n" |
| 1779 | (if prefix-face | 1778 | (if prefix-face |
| 1780 | (propertize | 1779 | (propertize |
| 1781 | "\n :" 'font-lock-face prefix-face) | 1780 | "\n :" 'font-lock-face prefix-face) |
| 1782 | "\n :") | 1781 | "\n :") |
| 1783 | match-str) | 1782 | ;; Add mouse face in one section to |
| 1783 | ;; ensure the prefix and the string | ||
| 1784 | ;; get a contiguous highlight. | ||
| 1785 | (propertize (concat match-prefix match-str) | ||
| 1786 | 'mouse-face 'highlight)) | ||
| 1784 | ;; Add marker at eol, but no mouse props. | 1787 | ;; Add marker at eol, but no mouse props. |
| 1785 | (propertize "\n" 'occur-target marker))) | 1788 | (propertize "\n" 'occur-target marker))) |
| 1786 | (data | 1789 | (data |