[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: highlight failed part of isearch input
From: |
Drew Adams |
Subject: |
RE: highlight failed part of isearch input |
Date: |
Sun, 22 Jul 2007 16:40:47 -0700 |
> From: Richard Stallman Sent: Tuesday, July 10, 2007 3:01 PM
> That is a nice feature. Let's install it.
>
> I am not convinced we should use the same face for trailing spaces
> and other things. And I am not convinced we want subdued colors for
> this highlighting.
It seems that only the tweaks that came out of the secondary discussion in
this thread were applied; the original proposal was not. Here is the diff.
---------8<-----------------------
*** isearch-CVS-2007-07-22.el Sun Jul 22 16:29:20 2007
--- isearch-CVS-patched-2007-07-22.el Sun Jul 22 16:34:00 2007
***************
*** 226,231 ****
--- 226,235 ----
:group 'basic-faces)
(defvar isearch 'isearch)
+ (defface isearch-fail '((t (:foreground "Black" :background "Plum")))
+ "Face for highlighting failed part in Isearch echo-area message."
+ :group 'isearch)
+
(defcustom isearch-lazy-highlight t
"*Controls the lazy-highlighting during incremental search.
When non-nil, all text in the buffer matching the current search
***************
*** 1928,1948 ****
(defun isearch-message (&optional c-q-hack ellipsis)
;; Generate and print the message string.
(let ((cursor-in-echo-area ellipsis)
! (m (concat
(isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
! (if (and (not isearch-success)
! (string-match " +$" isearch-message))
! (concat
! (substring isearch-message 0 (match-beginning 0))
! (propertize (substring isearch-message (match-beginning
0))
! 'face 'trailing-whitespace))
! isearch-message)
! (isearch-message-suffix c-q-hack ellipsis)
! )))
! (if c-q-hack
! m
! (let ((message-log-max nil))
! (message "%s" m)))))
(defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental)
;; If about to search, and previous search regexp was invalid,
--- 1932,1953 ----
(defun isearch-message (&optional c-q-hack ellipsis)
;; Generate and print the message string.
(let ((cursor-in-echo-area ellipsis)
! (cmds isearch-cmds)
! succ-msg m)
! (while (not (isearch-success-state (car cmds))) (pop cmds))
! (setq succ-msg (and cmds (isearch-message-state (car cmds))))
! (setq m (concat
(isearch-message-prefix c-q-hack ellipsis
isearch-nonincremental)
! succ-msg
! (and (not isearch-success)
! (string-match succ-msg isearch-message)
! (not (string= succ-msg isearch-message))
! (propertize (substring isearch-message (match-end 0))
! 'face 'isearch-fail))))
! (when (string-match " +$" m)
! (propertize (substring m (match-beginning 0)) 'face
'trailing-whitespace))
! (setq m (concat m (isearch-message-suffix c-q-hack ellipsis)))
! (if c-q-hack m (let ((message-log-max nil)) (message "%s" m)))))
(defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental)
;; If about to search, and previous search regexp was invalid,
Re: highlight failed part of isearch input, Masatake YAMATO, 2007/07/10
Re: highlight failed part of isearch input, Stefan Monnier, 2007/07/10
Re: highlight failed part of isearch input, Richard Stallman, 2007/07/10
- RE: highlight failed part of isearch input,
Drew Adams <=
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/23
- Re: highlight failed part of isearch input, Juri Linkov, 2007/07/23
- RE: highlight failed part of isearch input, Drew Adams, 2007/07/23
- Re: highlight failed part of isearch input, Juri Linkov, 2007/07/23
- RE: highlight failed part of isearch input, Drew Adams, 2007/07/23
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/24
Re: highlight failed part of isearch input, Richard Stallman, 2007/07/24
RE: highlight failed part of isearch input, Drew Adams, 2007/07/24