bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: case conversion by replace-match


From: Andreas Schwab
Subject: Re: case conversion by replace-match
Date: Fri, 16 May 2003 23:51:36 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3.50 (gnu/linux)

Kevin Rodgers <ihs_4664@yahoo.com> writes:

|> Andreas Schwab wrote:
|> 
|> > Roland Winkler <roland.winkler@physik.uni-erlangen.de> writes:
|> > |> Start a fresh emacs --no-init-file
|> > |> |> define the following function
|> > |> |> (defun foo ()
|> > |>   (interactive)
|> > |>   (let (case-fold-search)
|> > |>     (while (search-forward "=FC" nil t)
|> > |>       (replace-match (string 252) nil t))))
|> > |> |> `(string 252)' gives a lowercase umlaut-u (iso-latin-1)
|> > |> |> However, when foo is run in a buffer containing the string "=FC",
|> > |> this string will be replaced with an uppercase umlaut-U.
|> > Exactly as documented.
|> 
|> 
|> That's what I thought at first.  Then I thought the "=" obviously means that
|> not all the characters in the replacement text are capital letters, so 
NEXTEXT

Since "=" is not a letter, it is ignored.  Otherwise sentence marks would
make the function of case-replace useless.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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