From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Replacing buffer contents --- without disturbing markers Date: Sat, 11 Sep 2010 13:01:13 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284202888 16239 80.91.229.12 (11 Sep 2010 11:01:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Sep 2010 11:01:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 11 13:01:26 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OuNpj-0002M8-P2 for ged-emacs-devel@m.gmane.org; Sat, 11 Sep 2010 13:01:24 +0200 Original-Received: from localhost ([127.0.0.1]:54328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuNpj-0001ZT-C6 for ged-emacs-devel@m.gmane.org; Sat, 11 Sep 2010 07:01:23 -0400 Original-Received: from [140.186.70.92] (port=57136 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuNpd-0001Y8-L3 for emacs-devel@gnu.org; Sat, 11 Sep 2010 07:01:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuNpc-00011J-H4 for emacs-devel@gnu.org; Sat, 11 Sep 2010 07:01:17 -0400 Original-Received: from impaqm3.telefonica.net ([213.4.138.3]:21169) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuNpc-00011A-9e for emacs-devel@gnu.org; Sat, 11 Sep 2010 07:01:16 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm3.telefonica.net with bizsmtp id 5LXl1f00G2h2L9m3PP1FKs; Sat, 11 Sep 2010 13:01:15 +0200 Original-Received: from ceviche.home ([83.61.39.212]) by IMPmailhost3.adm.correo with BIZ IMP id 5P1D1f0094aeRwb1jP1ECA; Sat, 11 Sep 2010 13:01:15 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id 9887C660D2; Sat, 11 Sep 2010 13:01:13 +0200 (CEST) In-Reply-To: (Daniel Colascione's message of "Fri, 10 Sep 2010 16:11:14 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129969 Archived-At: > ;; Replace the character after point with the next character > ;; from replacement. We must worry about two kinds > ;; of marker: those pointing at point (including (point)), and > ;; those pointing at (1+ (point)). Actually there 4 kinds: at point, at point+1, multiplied by the two insertion-types. Your code works with the default insertion-type, but not the other (don't worry: I don't think you can do much better). Stefan