Article View: gnu.epoch.misc
Article #14678bit patch bug and a fix for it
From: Lonhyn T. Jasinskyj
Date: Thu, 21 May 1992 20:42
Date: Thu, 21 May 1992 20:42
56 lines
2368 bytes
2368 bytes
I have had a problem with the 8bit patches that were distributed in
the contrib portion of the epoch-4.0p1 distribution. The problem is
that the "\M-" construct in strings sets the high bit on the following
character instead of the "meta bit". So you could say:
(global-set-key "\eg" 'goto-line)
but not
(global-set-key "\M-g" 'goto-line)
as that would bind goto-line to the ASCII value for 'g' + 0200.
My fix makes the rest of epoch think that it saw a '\e' (i.e. \033)
every time it sees a "\M-". This seems to work fine.
Here is the patch to lread.c. Apply it in src/ and ascii/ although I've
only used the non-ascii part.
*** lread.c.old Thu May 21 10:40:46 1992
--- lread.c Thu May 21 13:22:54 1992
***************
*** 850,859 ****
--- 850,868 ----
c = READCHAR;
if (c != '-')
error ("Invalid escape character syntax");
+ /*
+ * this is for the eight bit patches so that no high bits are set.
+ * convert \M-char constructs to ESCchar in string parsing. This
+ * should work even if no eight bit patches are installed.
+ * -- lonhyn@nas.nasa.gov 21-05-92
+ *
c = READCHAR;
if (c == '\\')
c = read_escape (readcharfun);
return c | 0200;
+ *
+ */
+ return 033;
case 'C':
c = READCHAR;
--
Please let me know if someone has already fixed this in a more elegant
way or there are other problems that I haven't addressed.
lonnie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Email to: lonhyn@gulag.nas.nasa.gov Human at: 415-604-3989
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Technical Details
Message-ID:
<1992May21.204222.11865@nas.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!swrinde!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!gulag.nas.nasa.gov!lonhynShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,ba40a545f9c77ef4,start X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1992-05-20 21:07:18 PST Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!swrinde!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!gulag.nas.nasa.gov!lonhyn From: lonhyn@gulag.nas.nasa.gov (Lonhyn T. Jasinskyj) Newsgroups: gnu.epoch.misc Subject: 8bit patch bug and a fix for it Message-ID: <1992May21.204222.11865@nas.nasa.gov> Date: 21 May 92 20:42:22 GMT Sender: news@nas.nasa.gov Reply-To: lonhyn@nas.nasa.gov Organization: NASA Ames Research Center Lines: 56