[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: WoMan Bug]
From: |
Michael Welsh Duggan |
Subject: |
Re: address@hidden: WoMan Bug] |
Date: |
Fri, 15 Sep 2006 01:52:41 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> 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
(address@hidden)
- Re: address@hidden: WoMan Bug], (continued)
- Re: address@hidden: WoMan Bug], Stefan Monnier, 2006/09/14
- Re: address@hidden: WoMan Bug], David Hansen, 2006/09/14
- Re: address@hidden: WoMan Bug], Michael Welsh Duggan, 2006/09/15
- Re: address@hidden: WoMan Bug], Michael Welsh Duggan, 2006/09/15
- Re: address@hidden: WoMan Bug], Stefan Monnier, 2006/09/16
- Re: address@hidden: WoMan Bug], Chong Yidong, 2006/09/18
- Re: address@hidden: WoMan Bug], David Hansen, 2006/09/18
- Re: address@hidden: WoMan Bug], Chong Yidong, 2006/09/21
- Re: address@hidden: WoMan Bug], Richard Stallman, 2006/09/22
- Re: address@hidden: WoMan Bug], David Hansen, 2006/09/23
- Re: address@hidden: WoMan Bug],
Michael Welsh Duggan <=