emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: WoMan Error with the CVS Manual Page]


From: Glenn Morris
Subject: Re: address@hidden: WoMan Error with the CVS Manual Page]
Date: Thu, 08 Mar 2007 17:15:34 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

> From: David Hansen <address@hidden>
> Subject: WoMan Error with the CVS Manual Page
> To: address@hidden
> Date: Tue, 06 Mar 2007 03:26:07 +0100

Does this patch give good results? I notice several other woman errors
in formatting the cvs man page. This patch at least does not seem to
make those any worse.


Index: woman.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/woman.el,v
retrieving revision 1.53
diff -c -c -w -r1.53 woman.el
*** woman.el    21 Jan 2007 03:53:10 -0000      1.53
--- woman.el    8 Mar 2007 22:13:30 -0000
***************
*** 3284,3290 ****
        ;; Find font requests, paragraph macros and font escapes:
        (re-search-forward
         "^[.'][ \t]*\\(\\(\\ft\\)\\|\\(.P\\)\\)\\|\\(\\\\f\\)" nil 1)
!       (let (font beg notfont)
        ;; Match font indicator and leave point at end of sequence:
        (cond ((match-string 2)
               ;; .ft request found
--- 3284,3290 ----
        ;; Find font requests, paragraph macros and font escapes:
        (re-search-forward
         "^[.'][ \t]*\\(\\(\\ft\\)\\|\\(.P\\)\\)\\|\\(\\\\f\\)" nil 1)
!       (let (font beg notfont fescape)
        ;; Match font indicator and leave point at end of sequence:
        (cond ((match-string 2)
               ;; .ft request found
***************
*** 3299,3305 ****
               (setq font 'default))
              ((match-string 4)
               ;; \f escape found
!              (setq beg (match-beginning 0))
               (woman-match-name))
              (t (setq notfont t)))
        (if notfont
--- 3299,3306 ----
               (setq font 'default))
              ((match-string 4)
               ;; \f escape found
!              (setq beg (match-beginning 0)
!                      fescape t)
               (woman-match-name))
              (t (setq notfont t)))
        (if notfont
***************
*** 3321,3326 ****
--- 3322,3334 ----
          ;; Delete font control line or escape sequence:
          (cond (beg (delete-region beg (point))
                     (if (eq font 'previous) (setq font previous-font))))
+           ;; Deal with things like \fB.cvsrc\fR at the start of a line.
+           ;; After removing the font control codes, this would
+           ;; otherwise match woman-request-regexp. The "\\&" which is
+           ;; inserted to prevent this is removed by woman2-process-escapes.
+           (and fescape
+                (looking-at "^\\.")
+                (insert "\\&"))
          (woman-set-face previous-pos (point) current-font)
          (if beg
              ;; Explicit font control





reply via email to

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