From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#4344: Highlight escape character sequences in isearch and query-replace Date: Sat, 05 Sep 2009 00:14:38 +0300 Organization: JURTA Message-ID: <87ws4el8e9.fsf@mail.jurta.org> Reply-To: Juri Linkov , 4344@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1252099658 31718 80.91.229.12 (4 Sep 2009 21:27:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2009 21:27:38 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 04 23:27:31 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MjgJe-0005A9-Ib for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Sep 2009 23:27:30 +0200 Original-Received: from localhost ([127.0.0.1]:56797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjgJd-0007M5-Sx for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Sep 2009 17:27:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjgJH-0007E2-BZ for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:27:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjgJC-0007DJ-To for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:27:06 -0400 Original-Received: from [199.232.76.173] (port=44883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjgJC-0007Cy-IQ for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:27:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43620) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjgJB-0002FL-CY for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:27:01 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n84LQwHT008572; Fri, 4 Sep 2009 14:26:59 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n84LPB68008233; Fri, 4 Sep 2009 14:25:11 -0700 Resent-Date: Fri, 4 Sep 2009 14:25:11 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 04 Sep 2009 21:25:10 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4344 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12520991857133 (code B ref -1); Fri, 04 Sep 2009 21:25:10 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2009 21:19:45 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n84LJhEq007127 for ; Fri, 4 Sep 2009 14:19:44 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjgC7-0005J4-Bd for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjgC2-0005Eo-Qh for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:42 -0400 Original-Received: from [199.232.76.173] (port=46363 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjgC2-0005El-LG for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:38 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:42127 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjgC2-000194-9d for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:38 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.70.181.cable.starman.ee [82.131.70.181]) by mx1.starman.ee (Postfix) with ESMTP id DB8E43F447F for ; Sat, 5 Sep 2009 00:19:31 +0300 (EEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 04 Sep 2009 17:27:06 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30806 Archived-At: Normally characters sequences using `^' are displayed in the `escape-glyph' face. However, in isearch and query-replace that both use `isearch-text-char-description' it is hard to distinguish escape character sequences visually because they are not highlighted. Here is a fix: Index: lisp/isearch.el =================================================================== RCS file: /sources/emacs/emacs/lisp/isearch.el,v retrieving revision 1.346 diff -u -r1.346 isearch.el --- lisp/isearch.el 1 Sep 2009 07:24:19 -0000 1.346 +++ lisp/isearch.el 4 Sep 2009 21:12:37 -0000 @@ -2496,8 +2501,8 @@ (defun isearch-text-char-description (c) (cond - ((< c ?\s) (format "^%c" (+ c 64))) - ((= c ?\^?) "^?") + ((< c ?\s) (propertize (format "^%c" (+ c 64)) 'face 'escape-glyph)) + ((= c ?\^?) (propertize "^?" 'face 'escape-glyph)) (t (char-to-string c)))) ;; General function to unread characters or events. -- Juri Linkov http://www.jurta.org/emacs/