🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.editor.mule
Article #238

Re: how to replace aa_bcd with aaBcd

#238
From: Keiichi Suzuki
Date: Mon, 01 Jul 2002 07:57
29 lines
2378 bytes
>>>>> Message-Id: <x5hejkch8a.fsf@civilnet.kuciv.kyoto-u.ac.jp> の記事で、
>>>>> "椎葉" == SHIIBA Michiharu <shiiba@civilnet.kuciv.kyoto-u.ac.jp>さま曰く...

(defun y-or-n-p-with-replace-highlight (beg end form &rest args)
  (unwind-protect
      (progn
	(pop-to-buffer (current-buffer))
	(replace-highlight beg end)
	(y-or-n-p (apply 'format form args)))
    (replace-dehighlight)))

何てものをあらかじめ定義しておいて

山岡様> (if (y-or-n-p (concat "Query replacing \"" old
山岡様> "\" with \"" new "\" "))

.の代りに

(if (y-or-n-p-with-replace-highlight
     (match-beginning 0) (match-end 0)
     "Quely replaceing \"%s\" with \"%s\" "
     old new)

などとするとちょっとだけ幸せかも知れません。

-- 
鈴木圭一 / keiichi@nanap.org
PGP finger print (DH/DSS)
0B32 B37E 6DE9 3BC1 68A4  4089 7AAF 2B03 ECBD 614B
Technical Details
Message-ID: <un0tbhoce.fsf@kei.nanap.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!netnews.com!xfer02.netnews.com!newsfeed.gol.com!giga-nspixp2!nntp-egw.ocn.ad.jp!nn1.news.ocn.ad.jp!news.mdcnet.co.jp!not-for-mail
References: <x5u1nvy616.fsf@civilnet.kuciv.kyoto-u.ac.jp> <yotln0thfpps.fsf@jpl.org> <x5hejkch8a.fsf@civilnet.kuciv.kyoto-u.ac.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 10eba4,8ddef165b089fd8e
X-Google-Attributes: gid10eba4,public
X-Google-ArrivalTime: 2002-07-01 01:15:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!netnews.com!xfer02.netnews.com!newsfeed.gol.com!giga-nspixp2!nntp-egw.ocn.ad.jp!nn1.news.ocn.ad.jp!news.mdcnet.co.jp!not-for-mail
From: Keiichi Suzuki <keiichi@nanap.org>
Newsgroups: fj.editor.mule
Subject: Re: how to replace aa_bcd with aaBcd
Date: 01 Jul 2002 16:57:53 +0900
Organization: Nanap
Lines: 29
Message-ID: <un0tbhoce.fsf@kei.nanap.org>
References: <x5u1nvy616.fsf@civilnet.kuciv.kyoto-u.ac.jp>
 <yotln0thfpps.fsf@jpl.org> <x5hejkch8a.fsf@civilnet.kuciv.kyoto-u.ac.jp>
NNTP-Posting-Host: mdcgate.mdcnet.co.jp
Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=ISO-2022-JP
X-Trace: nn-tk102.ocn.ad.jp 1025511139 7577 210.161.227.66 (1 Jul 2002 08:12:19 GMT)
X-Complaints-To: usenet@ocn.ad.jp
NNTP-Posting-Date: 1 Jul 2002 08:12:19 GMT
X-Face: 0HQ&#IHug\fiylKRC^d:J+!+[je8r1v"r7GU:GkB{MNpfAz@SM-+1s0#L)PeKq=-0^[P2S;
 WClru<O&>gwLtM'\$"Jp3z)RiLVj8@0/te.QtuixK$2(7~F'_-M7kgZT_k`BIBAa,_
X-URI: http://www.nanap.org/
User-Agent: Nana-gnus/7.1.0.30 SEMI/1.14.3 (Ushinoya) FLIM/1.14.3
 (Unebigoryōmae) APEL/10.3 Emacs/20.7 (i386-*-nt5.0.2195)
 MULE/4.1 (AOI) Meadow/1.15pre1 (SHOUBU:63 2001-12-27)
Cancel-Lock: sha1:iPs9Q+WWM2/+BDDRIfh2p+QeHms=