all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: charles@aurox.ch (Charles A. Roelli)
To: Alex <agrambot@gmail.com>
Cc: 24356-done@debbugs.gnu.org
Subject: bug#24356: 25.1; query-replace with replace-char-fold doesn't highlight folded chars
Date: Tue, 26 Dec 2017 12:51:02 +0100	[thread overview]
Message-ID: <m2r2rhd7x5.fsf@aurox.ch> (raw)
In-Reply-To: <87mvjp3akn.fsf@gmail.com> (message from Alex on Fri, 02 Sep 2016 21:51:20 -0600)

Version: 27.1

> From: Alex <agrambot@gmail.com>
> Date: Fri, 02 Sep 2016 21:51:20 -0600
> 
> Recipe:
> 
> emacs -Q
> M-: (setq replace-char-fold t)
> C-x 8 ~ a RET
> M-<
> M-% a RET bbbb RET
> 
> The result of 'C-x 8 ~ a' (ã) is not highlighted as a match; it should
> be, as entering '!' will indeed replace ã with bbbb.
> 
> It should be noted that isearch in char-fold mode does highlight ã.
> 
> 
> In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.7)
>  of 2016-08-21 built on lylat
> Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
> System Description:	Debian GNU/Linux testing (stretch)
> 
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
> NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
> TOOLKIT_SCROLL_BARS GTK3 X11
> 
> Important settings:
>   value of $LC_CTYPE: en_CA.utf8
>   value of $LANG: en_CA.utf8
>   locale-coding-system: utf-8-unix
> 
> Major mode: Lisp Interaction
> 
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
> 
> Load-path shadows:
> None found.

Closing, as this should now be fixed.

commit 9f9b56b7da323bc91cdde0bcc1e1863c523e7ee3
Date:   Tue Dec 26 12:46:39 2017 +0100

  Fix highlighting in query-replace with non-nil replace-char-fold

  * lisp/replace.el (replace-highlight): Bind
  'isearch-regexp-function' in the same way that function
  'replace-search' does, so as to respect the value of
  'replace-char-fold'.  (Bug#24356)

diff --git a/lisp/replace.el b/lisp/replace.el
index 80e5845..396428f 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2212,7 +2212,10 @@ replace-highlight
   (if query-replace-lazy-highlight
       (let ((isearch-string search-string)
 	    (isearch-regexp regexp-flag)
-	    (isearch-regexp-function delimited-flag)
+	    (isearch-regexp-function (or delimited-flag
+					 (and replace-char-fold
+					      (not regexp-flag)
+					      #'char-fold-to-regexp)))
 	    (isearch-lax-whitespace
 	     replace-lax-whitespace)
 	    (isearch-regexp-lax-whitespace





      reply	other threads:[~2017-12-26 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03  3:51 bug#24356: 25.1; query-replace with replace-char-fold doesn't highlight folded chars Alex
2017-12-26 11:51 ` Charles A. Roelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r2rhd7x5.fsf@aurox.ch \
    --to=charles@aurox.ch \
    --cc=24356-done@debbugs.gnu.org \
    --cc=agrambot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.