www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/05/24/11:04:25

Subject: DEmacs line wrapping bugs (not exactly djgpp, sorry)
To: jthomas AT nmsu DOT edu
Date: Mon, 24 May 93 10:43:36 EDT
From: Stephen Turnbull <turnbull AT ecolan DOT sbs DOT ohio-state DOT edu>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJ's GPP mailing list)

    Several months ago I had a conversation with Jim Thomas about the
bugs in DEmacs.  The fact that the sources to the English and Japanese
versions are the same caused two bugs, the first in both versions, the
second only in the English version.  First was that lines wrapped
before quotes, which is because the syntax table got changed.  (I may
have done this myself in kludging up a TeX mode, since that file has a
later date than my acquisition of DEmacs.  Unfortunately, my original
sources are offline, so I can't verify that that was my mistake.)
    The other problem had to do with the code used to fill text
containing kanji and kana (various kinds of Japanese characters).  In
nemacs, `\z' is handled specially at Emacs Lisp level, and is defined
as some sort of kanji flag.  It is not so defined in demacs, and
causes lines to wrap at `z' (apparently since undefined escape
sequences in Emacs Lisp---or perhaps GNU C---strings are equivalent to
the "unescaped" character).
    To fix this, you add

(defvar line-break-point "[ \t]")
(if (boundp 'NEMACS) (setq line-break-point "[ \t]\\|\\z"))

and change "fill-region-as-paragraph" (in fill.el) and "do-auto-fill"
(in simple.el) to use "line-break-point" instead of hard-coded
regexps.  (There may be other places where this needs to be changed;
I'm using sources to a later version of GNU emacs to find the files
containing those functions since I only have byte-compiled versions of
the DEmacs libraries online.)  Rather than figure out what order things
were loaded, I redefined these variables and functions in a separate
library and load that in my _emacs.  This fixed the problem (or at
least made it so rare I haven't observed it since in daily heavy use
of DEmacs).
    I apologize for not being able to give you sources and the stright
dope on who changed the syntax table; I'm in the process of moving
trans-Pacific, and don't really intend to dig up all the details until
that's done (say, mid-July).  After that I'll be reachable at
    turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp
or you can send me mail here and I'll push that task on the "nice 20"
stack, and will reply sometime in July.  :)
-- 
 
Stephen Turnbull
The Ohio State University, Department of Economics
410 Arps Hall, 1945 N. High St., Columbus, OH  43210-1172  USA
Phone: (614) 292-0654  Fax: ...-3906  Email: turnbull DOT 1 AT osu DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019