[Top][All Lists]

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

Re: address@hidden: WoMan Bug]

From: Stefan Monnier
Subject: Re: address@hidden: WoMan Bug]
Date: Thu, 14 Sep 2006 01:36:59 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> 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).


--- 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)

reply via email to

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