emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

case sensitive replacement doesn't seem to work


From: Bogolisk
Subject: case sensitive replacement doesn't seem to work
Date: Thu, 10 Apr 2014 14:11:10 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi

In this example, the "%s" replacement text is always upcased to "%S" 
regardless
of the value of case-fold-search or case-replace.


(let ((case-fold-search nil)
      (case-replace nil)
      (orig-string "this is a FOO bar")
      new-string)
  (when (string-match "FOO" orig-string)
    (setq new-string (replace-match "%s" nil t orig-string))
    (message "orig:`%s' new:`%s'" orig-string new-string)))


in both 23.1.1 and 24.3.50.1, the message is always:

"orig:`this is a FOO bar' new:`this is a %S bar'"


Is this a bug or expected behaviour?


--
Bogolisk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]