From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: highlight failed part of isearch input Date: Sun, 22 Jul 2007 16:40:47 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185147789 6367 80.91.229.12 (22 Jul 2007 23:43:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2007 23:43:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 23 01:43:06 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ICl4s-0000mO-3m for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2007 01:43:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICl4r-0000i7-C7 for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2007 19:43:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ICl4n-0000h7-Fu for emacs-devel@gnu.org; Sun, 22 Jul 2007 19:43:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ICl4m-0000g9-HF for emacs-devel@gnu.org; Sun, 22 Jul 2007 19:43:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICl4m-0000fo-9t for emacs-devel@gnu.org; Sun, 22 Jul 2007 19:43:00 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ICl4k-0005Nh-T0; Sun, 22 Jul 2007 19:42:59 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l6MNgu76011503; Sun, 22 Jul 2007 17:42:56 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l6MLggIB006667; Sun, 22 Jul 2007 17:42:55 -0600 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-112.vpn.oracle.com by acsmt351.oracle.com with ESMTP id 3060579281185147655; Sun, 22 Jul 2007 16:40:55 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75339 Archived-At: > 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,