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

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


        Stefan


--- 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	other threads:[~2006-09-14  5:36 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 [this message]
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

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=jwvr6yf57vi.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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.