From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: [david.hansen@physik.fu-berlin.de: WoMan Bug] Date: Fri, 15 Sep 2006 01:34:28 -0400 Message-ID: <87k645r8uz.fsf@cs.cmu.edu> References: <87wt87vz03.fsf@cs.cmu.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158298503 16633 80.91.229.2 (15 Sep 2006 05:35:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Sep 2006 05:35:03 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 15 07:35:01 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GO6Lq-0001Bu-Fv for ged-emacs-devel@m.gmane.org; Fri, 15 Sep 2006 07:34:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GO6Lp-0003Tn-Rr for ged-emacs-devel@m.gmane.org; Fri, 15 Sep 2006 01:34:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GO6Lb-0003TS-7p for emacs-devel@gnu.org; Fri, 15 Sep 2006 01:34:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GO6LZ-0003SX-1R for emacs-devel@gnu.org; Fri, 15 Sep 2006 01:34:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GO6LY-0003SQ-Qp for emacs-devel@gnu.org; Fri, 15 Sep 2006 01:34:40 -0400 Original-Received: from [205.201.10.244] (helo=maru) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GO6Nd-000096-P9; Fri, 15 Sep 2006 01:36:50 -0400 Original-Received: from md5i by maru with local (Exim 4.63) (envelope-from ) id 1GO6LN-0001VO-2e; Fri, 15 Sep 2006 01:34:29 -0400 Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu\, 14 Sep 2006 01\:36\:59 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59855 Archived-At: Stefan Monnier writes: >>> Would someone please fix this, then ack? > >> The following patch would appear to fix this problem: > > I believe the right patch is to change the marker's insertion type (so that > insertions are automatically made "before"). The patch below does that at > the spot caught by the OP. There might be other places where we need some > fixup, so please try it and tell me if you hit the "Internal error" check > or not (and if you do, please provide a backtrace). Actually, this patch doesn't appear to change the marker insertion type at all. Was something left out? > --- woman.el 05 sep 2006 23:20:53 -0400 1.46 > +++ woman.el 14 sep 2006 01:32:37 -0400 > @@ -3442,9 +3442,7 @@ > (defsubst woman2-process-escapes-to-eol (&optional numeric) > "Process remaining escape sequences up to eol. > Handle numeric arguments specially if optional argument NUMERIC is non-nil." > - (woman2-process-escapes > - (save-excursion (end-of-line) (point-marker)) > - numeric)) > + (woman2-process-escapes (line-end-position) numeric)) > > (defun woman2-nr (to) > ".nr R +/-N M -- Assign +/-N (wrt to previous value, if any) to register R. > @@ -3897,10 +3895,15 @@ > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > (defun woman2-process-escapes (to &optional numeric) > - "Process remaining escape sequences up to marker TO, preserving point. > + "Process remaining escape sequences up to TO, preserving point. > Optional argument NUMERIC, if non-nil, means the argument is numeric." > ;; The first two cases below could be merged (maybe)! > (let ((from (point))) > + ;; Make sure TO is a move-after-insertion kind of marker. > + (if (markerp to) > + (unless (marker-insertion-type to) > + (error "Internal error: wrong marker type")) > + (setq to (copy-marker to t))) > ;; Discard zero width filler character used to hide leading dots > ;; and zero width characters \|, \^: > (while (re-search-forward "\\\\[&|^]" to t) -- Michael Welsh Duggan (md5i@cs.cmu.edu)