all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Welsh Duggan <md5i@cs.cmu.edu>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [david.hansen@physik.fu-berlin.de: WoMan Bug]
Date: Fri, 15 Sep 2006 01:52:41 -0400	[thread overview]
Message-ID: <87fyetr80m.fsf@cs.cmu.edu> (raw)
In-Reply-To: <jwvr6yf57vi.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu\, 14 Sep 2006 01\:36\:59 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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).

[patch elided]

How about the following instead?

--- woman.el	04 Sep 2006 13:03:49 -0400	1.46
+++ woman.el	15 Sep 2006 01:49:25 -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 (copy-marker (line-end-position) t) numeric))
 
 (defun woman2-nr (to)
   ".nr R +/-N M -- Assign +/-N (wrt to previous value, if any) to register R.
@@ -3645,6 +3643,7 @@
 	(woman-registers woman-registers)
 	fn request translations
 	tab-stop-list)
+    (set-marker-insertion-type to t)
     ;; ?roff does not squeeze multiple spaces, but does fill, so...
     (fset 'canonically-space-region 'ignore)
     ;; Try to avoid spaces inheriting underlines from preceding text!
@@ -3897,10 +3896,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)

      parent reply	other threads:[~2006-09-15  5:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14  2:34 [david.hansen@physik.fu-berlin.de: WoMan Bug] Richard Stallman
2006-09-14  4:43 ` Michael Welsh Duggan
2006-09-14  5:36   ` Stefan Monnier
2006-09-14 17:00     ` David Hansen
2006-09-15  5:34     ` Michael Welsh Duggan
2006-09-15  5:58       ` Michael Welsh Duggan
2006-09-16 17:58         ` Stefan Monnier
2006-09-18 15:51           ` Chong Yidong
2006-09-18 23:11           ` David Hansen
2006-09-22  3:01             ` Chong Yidong
2006-09-22 17:01               ` Richard Stallman
2006-09-23  4:38               ` David Hansen
2006-09-15  5:52     ` Michael Welsh Duggan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fyetr80m.fsf@cs.cmu.edu \
    --to=md5i@cs.cmu.edu \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.