[comp.sys.hp] GNUemacs and HP2392

saponara@batcomputer.tn.cornell.edu (John Saponara) (05/05/88)

To anyone who has figured out how to get the `Extend char' key on their HP2392
to act as the Meta key, using GNU emacs 18.50 on an HP 300 series machine (a
350, to be exact):  Help!

I've tried and tried, but it don't go (and I've seen it done at another site,
but can't contact them).  First, using untic and tic, I added to the
/usr/lib/terminfo/2/2392 file:

    km,		[which allegedly says that there is a meta key]

and tic'ed it into place.

Then I added to my .emacs startup file:

    (setq meta-flag t)

and tried out gnu-emacs.  No go: the ESC key still acted as the Meta key, and
`Extend char' was still useless.  So, does anyone know how to set things up
to make this work?

Also, while I'm here:  if you have been able to do the above, you are also
probably smart enough to have made a default.el which sets up all the special
keys to the right of the main keyboard to be useful (i.e. `Clear display',
`Prev', the arrow keys, etc).  Could you please send this on to me and save
me some more hacking through the swamps?

Any help appreciated,

Eric Haines (not John Saponara, no matter what my header says)

wayne@dsndata.UUCP (Wayne Schlitt) (05/06/88)

Posting-Front-End: GNU Emacs 18.44.2 of Tue Jun  2 1987 on dsndata (hpux)




> 
> To anyone who has figured out how to get the `Extend char' key on their HP2392
> to act as the Meta key, using GNU emacs 18.50 on an HP 300 series machine (a
> 350, to be exact):  Help!
> 

it is my understanding that the extend char key does not just set the
top bit of the key that you hit, it accesses an alternate character
set.  some keys, like "z" dont seem to have an extended char.  if you
do find a way of doing this, PLEASE let me know...  it would be most
useful.

> 
> Also, while I'm here:  if you have been able to do the above, you are also
> probably smart enough to have made a default.el which sets up all the special
> keys to the right of the main keyboard to be useful (i.e. `Clear display',
> `Prev', the arrow keys, etc). 
> 


here is what we use for our lisp/term/hp2392.el file, minus some local
junk that you probably dont want anyway...  (yes, i know, this should
probably use the keypad stuff that has already been set up, but i had
this written before i knew that it existed.  if someone has a cleaner
hack, i would be interested in that too.)



----------------  cut here ---------------------

;;
;; cursor pad
;;

(global-set-key "\eA" 'previous-line)	; up arrow
(global-set-key "\eB" 'next-line)	; down arrow
(global-set-key "\eC" 'forward-char)	; right arrow
(global-set-key "\eD" 'backward-char)	; left arrow
(global-set-key "\eh" 'home)		; home to the top of the window


(global-set-key "\eS" 'beginning-of-buffer); shift up arrow - top of file
(global-set-key "\eT" 'end-of-buffer)	; shift down arrow - end of file
(global-set-key "\e&rR" 'end-of-line)	; shift right arrow - end of line
(global-set-key "\e&rL" 'beginning-of-line); shift left arrow - beg of line
(global-set-key "\eF" 'home-bottom)	; shift home to bottom of window


;;
;; named keys
;;

(global-set-key "\eK" 'clear-end-of-line) ; clear line
(global-set-key "\eJ" 'hide-window)	; clear display
(global-set-key "\eL" 'insert-line)	; insert line
(global-set-key "\eM" 'delete-line)	; delete line
(global-set-key "\eQ" 'overwrite-mode)	; insert char
(global-set-key "\eP" 'delete-char)	; delete char
(global-set-key "\eV" 'scroll-down)	; prev screen
(global-set-key "\eU" 'scroll-up)	; next screen


(global-set-key "\e&a0C" 'beginning-of-line) ; from shift clear line & display
(global-set-key "\eG" 'beginning-of-line) ; from shift clear line & display

;;(global-set-key "\eK" 'clear-end-of-line) ; shift clear line
;;(global-set-key "\eJ" 'delete-window)	; shift clear display
;;(global-set-key "\eL" 'insert-line)	; shift insert line
;;(global-set-key "\eM" 'delete-line)	; shift delete line
(global-set-key "\eN" 'overwrite-mode)	; shift insert char
(global-set-key "\eO" 'delete-char)	; shift delete char
(global-set-key "\e&r-1H" 'scroll-down)	; shift prev
(global-set-key "\e&r+1H" 'scroll-up)	; shift next



;;
;; function definitions for the cursor and named keys
;;

(defun home ()
  "Home to the upper left of the window."
  (interactive)

  (move-to-window-line 0)
  (move-to-column (window-hscroll (selected-window)))
  (setq temporary-goal-column (window-hscroll (selected-window)))
  )


(defun home-bottom ()
  "Home to the lower right of the window."
  (interactive)

  (move-to-window-line -1)
  (move-to-column (window-hscroll (selected-window)))
  (setq temporary-goal-column (window-hscroll (selected-window)))
  )


(defun insert-line ()
  "Insert a line before the current line."
  (interactive)

  (let ((org-point (point))
	)
    (condition-case conditions
	(progn
	  (beginning-of-line)
	  (open-line 1)
	  )
      (error (goto-char org-point)
	     (signal (car conditions) (cdr conditions))
	     )
      )
    )
  
  )


(defun delete-line ()
  "Delete the current line."
  (interactive)

  (let ((org-point (point))
	)
    (condition-case conditions
	(kill-region (progn
		       (beginning-of-line)
		       (point)
		       )
		     (progn
		       (end-of-line)
		       (if (eobp)
			   (point)
			 (forward-char)
			 (point)
			 )
		       )
		     )
      (error (goto-char org-point)
	     (signal (car conditions) (cdr conditions))
	     )
      )
    )

  )


(defun clear-end-of-line ()
  "Clear to the end of the line."
  (interactive)

  (let ((org-point (point))
	)
    (condition-case conditions
	(kill-region (point)
		     (progn
		       (end-of-line)
		       (point)
		       )
		     )
      (error (goto-char org-point)
	     (signal (car conditions) (cdr conditions))
	     )
      )
    )

  )


(defun hide-window ()
  "Hide the current window from view."
  (interactive)

  (if (one-window-p t)
      (bury-buffer)
    (delete-window)
    )
  )




;;
;; set up dired keys
;;

(define-key dired-mode-map "\eA" 'dired-previous-line)
(define-key dired-mode-map "\eB" 'dired-next-line)



;;
;; set up the pf keys functions
;;

(global-set-key "\C-x@"'set-mark-command)


(defun update-pf-keys ()
  "Display the updated pf key labels."
  (send-string-to-terminal "\e&jB")
  (sleep-for 1)
)


(defun set-pf (key-num label def)
  "Define a pf key."
  (interactive)

  (send-string-to-terminal
   (concat "\e&f0a" key-num "k" (length label) "d" (length def) "L"
	   label def)
   )

  )


(defun clr-pf (key-num)
  "Clear a pf key."
  (interactive)

  (send-string-to-terminal (concat "\e&f0a" key-num "k1d-1L "))
  
  )



;;
;; define the main level pf keys
;;

(defun pf-keys-main ()
  "Display main level pf keys."
  (interactive)

  (message "Main options...")
  (sit-for 0)
  
  (set-pf 1 "Printer Options" "\expf-keys-printer\r")
  (set-pf 2 " Buffer  Options" "\expf-keys-buffer\r")
  (set-pf 3 "  Word   Options" "\expf-keys-word\r")
  (set-pf 4 "Compile" "\excompile")
  
  (set-pf 5 "  Load    File" "\C-x")
  (set-pf 6 "  Save    Files" "\C-xs")
  (set-pf 7 "  Mark   Region" "\C-x@")
  (set-pf 8 "  Undo" "\C-_")

  (update-pf-keys)
  (message "")

  )


;;
;; define the print option pf keys
;;

(defun pf-keys-printer ()
  "Display printer option pf keys."
  (interactive)
  
  (message "Printer options...")
  (sit-for 0)
  
  (clr-pf 1 )
  (clr-pf 2 )           ; these keys send to various printers at our site
  (clr-pf 3 )
  (clr-pf 4 )
  
  (set-pf 5 " Spell   Buffer"  "\exspell-buffer\r")
  (set-pf 6 "  Find    Word"  "\exfind-word\r")
  (set-pf 7 "  Main  Options" "\expf-keys-main\r")
  (set-pf 8 "  Undo" "\C-_")

  (update-pf-keys)
  (message "")

  )




;;
;; define the buffer option pf keys
;;

(defun pf-keys-buffer ()
  "Display buffer option pf keys."
  (interactive)
  
  (message "Buffer options...")
  (sit-for 0)
  
  (set-pf 1 "  One    Window" "\C-x1")
  (set-pf 2 " Split   Screen" "\C-x4b\r")
  (set-pf 3 " Switch  Buffer" "\C-xb?")
  (set-pf 4 "  Kill   Buffer" "\C-xk\r")
  
  (set-pf 5 "  Read    Mail" "\exrmail\r")
  (set-pf 6 "  Send    Mail" "\C-xm")
  (set-pf 7 "  Main  Options" "\expf-keys-main\r")
  (set-pf 8 "  Undo" "\C-_")

  (update-pf-keys)
  (message "")

  )





;;
;; define the word option pf keys
;;

(defun pf-keys-word ()
  "Display buffer option pf keys."
  (interactive)
  
  (message "Word options...")
  (sit-for 0)
  
  (set-pf 1 "  Page   Break" "\C-a\C-q\C-l\r")
  (set-pf 2 "Compress Print" "\C-q\C-c")    ; we got a filter for these
  (set-pf 3 " Under    Line" "\C-q\C-u")    ; letters to translate them
  (set-pf 4 "  Bold    Text" "\C-q\C-b")    ; into something useful
  
  (set-pf 5 " Center   Text"  "\excenter-line\r")
  (set-pf 6 "  Fill  Paragrph" "\eq")
  (set-pf 7 "  Main   Options" "\expf-keys-main\r")
  (set-pf 8 "  Undo" "\C-_")

  (update-pf-keys)
  (message "")

  )



;;
;; put the options on the screen
;;


(sit-for 0)
(update-pf-keys)
(sleep-for 1)
(pf-keys-main)
(sleep-for 1)



----------------  cut here ---------------------

dana@faline.bellcore.com (Dana A. Chee) (05/06/88)

If anyone has an answer to this question, please post it, since there
are othes of us out here with 2392's that would also like to do this.

--
			Dana Chee
			Bellcore
			MRE 2Q-250
			(201) 829-4488
			dana@bellcore.com

rjn@hpfcdc.HP.COM (Bob Niland) (05/07/88)

re: "it is my understanding that the extend char key does not just set the
     top bit of the key that you hit, it accesses an alternate character
     set.  some keys, like "z" dont seem to have an extended char."

True.  The [Extend char] key allows 17 of the local language HP keyboards to
access all of the ROMAN8 characters, particularly those which do not appear
on the keycaps.  All of the keys now have at least unshifted [Extend char]
definitions.  The 'z' key, for example, is the paragraph symbol ("" if you
are in 8-bit mode, and your display has this in its font.  In the window
font I am presently using, it is "F4".)

The 2392A is missing 16 of the current ROMAN8 characters.  I suspect that
"" is one of them.  I know of no way to simply turn on the 8th bit of ASCII
characters on our keyboards.  In any case, this scheme would not work for
our European customers, because their "normal keys" include several, if not
many, characters that have the 8th bit on already.

Bob Niland   ARPA:rjn%hpfcrjn@hplabs.HP.COM   UUCP:[ihnp4|hplabs]!hpfcla!rjn

rohit@hpindda.HP.COM (Rohit Aggarwal) (05/07/88)

Hello Folks


	In the same area does anyone have a terminal-emulator for
	hp2392 that works in gnumacs?


					Thanks in advance.


-------------------------------------------------------------------------
| I see said the blind man and he picked up his hammer and SAW.         |
-------------------------------------------------------------------------
Rohit Aggarwal			(UUCP    :...!{hplabs,ucbvax}!hpda!rohit)
Hewlett Packard (TND)           (DOMAIN  :  rohit%hpda@HPLABS.HP.COM    )
Cupertino, CA, 95014		(Pac Bell:  408 447-3042                )
USA
--------------------------------------------------------------------------

faunt@spar.SPAR.SLB.COM (Doug Faunt) (05/11/88)

There was a modification done to the 2392 firmware, for HPlabs, that
would in fact give a real live Meta key, by the termcap definition.
There must be some terminals floating around hplabs with the
firmware.  There was a Specials group in the data terminals division
that did the hack for labs.

It probably isn't a product, but you might be able to get it out of HP
anyway, since a similar hack for 2622/23's (I think) was installed in
some terminals that were traded to somebody over at SRI for some dues
in some organization.

I used to work at HPlabs, and made the 2622/3 and 2392 hacks happen,
after I had added Meta keys to 264X terminals, to great appreciation.

bd@hpsemc.HP.COM (bob desinger) (05/11/88)

Rohit Aggarwal (rohit@hpindda.HP.COM) writes:
> 	In the same area does anyone have a terminal-emulator for
> 	hp2392 that works in gnumacs?

I'm not sure what you mean.  Do you mean "can someone please tell me
how to work the M-x shell command?"  If so, I found that `M-x shell'
finally worked under 18.50 but not on previous versions of Gnu Emacs.

To answer the original question, I have in my .emacs file a line of:
	
	(load "local/hp")		; DWIM with C-h and DEL

In /usr/local/emacs/lisp/local/hp.el, we have the file below.  Unwrap
according to the directions, install in the right place, and your
keypad editing keys will all work.  (You'll also have Backspace mapped
to DEL and vice-versa, at a level lower than Emacs knows about it.)
This doesn't know about function-keys, however, unlike the previous
posting.

Oh, yes, the file contains control characters so it's uuencoded.
The format below is compatible with uudecode, but you won't need
it to unpack this.

-- bd

#! /bin/sh
# This is a shell archive.  Remove anything before this line,
# then unwrap it by saving it in a file and typing "sh file".
#
# Wrapped by bd at hpsemc on Tue May 10 17:51:09 1988
# Contents:
#	hp.el 	

PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH; export PATH
echo 'At the end, you should see the message "End of shell archive."'


echo Compiling the unpacker for files containing control characters
pwd=`pwd`; cd /tmp
cat >unpack$$.c <<'E*O*F'
#include <stdio.h>
#define DEC(c)	(((c) - ' ') & 077)
main()
{
	int n;
	char dest[128], a,b,c,d;

	scanf("begin %o ", &n);
	gets(dest);

	if (freopen(dest, "w", stdout) == NULL) {
		perror(dest);
		exit(1);
	}

	while ((n=getchar()) != EOF && (n=DEC(n)) != 0)  {
		while (n>0) {
			a = DEC(getchar());
			b = DEC(getchar());
			c = DEC(getchar());
			d = DEC(getchar());
			if (n-- > 0) putchar(a << 2 | b >> 4);
			if (n-- > 0) putchar(b << 4 | c >> 2);
			if (n-- > 0) putchar(c << 6 | d);
		}
		n=getchar();
	}
	exit(0);
}
E*O*F
cc -o unpack$$ unpack$$.c && rm unpack$$.c
cd $pwd

echo Extracting hp.el '[contains control characters]'
/tmp/unpack$$ <<'@eof'
begin 664 hp.el
M.SL[('1E<FTO:' N96P@+2!-86ME<R!(4"!T97)M:6YA;"!F=6YC=&EO;B!K
M97ES('=O<FLL(&EN=&5R8VAA;F=E<PH[.SL@1$5,(&%N9"!"04-+4U!!0T4L
M(&%N9"!B<F5A:W,@87,@9F5W(&]T:&5R('1H:6YG<R!A<R!P;W-S:6)L92X*
M"CL[.R @0V]P>7)I9VAT("A#*2 Q.3@U+" Q.3@V+" Q.3@W($9R964@4V]F
M='=A<F4@1F]U;F1A=&EO;@H*.SL@1TY5($5M86-S(&ES(&1I<W1R:6)U=&5D
M(&EN('1H92!H;W!E('1H870@:70@=VEL;"!B92!U<V5F=6PL"CL[(&)U="!W
M:71H;W5T(&%N>2!W87)R86YT>2X@($YO(&%U=&AO<B!O<B!D:7-T<FEB=71O
M<@H[.R!A8V-E<'1S(')E<W!O;G-I8FEL:71Y('1O(&%N>6]N92!F;W(@=&AE
M(&-O;G-E<75E;F-E<R!O9B!U<VEN9R!I= H[.R!O<B!F;W(@=VAE=&AE<B!I
M="!S97)V97,@86YY('!A<G1I8W5L87(@<'5R<&]S92!O<B!W;W)K<R!A="!A
M;&PL"CL[('5N;&5S<R!H92!S87ES('-O(&EN('=R:71I;F<N"@H[.R!%=F5R
M>6]N92!I<R!G<F%N=&5D('!E<FUI<W-I;VX@=&\@8V]P>2P@;6]D:69Y(&%N
M9"!R961I<W1R:6)U=&4*.SL@1TY5($5M86-S+"!B=70@;VYL>2!U;F1E<B!T
M:&4@8V]N9&ET:6]N<R!D97-C<FEB960@:6X@=&AE"CL[(&1O8W5M96YT(")'
M3E4@16UA8W,@8V]P>6EN9R!P97)M:7-S:6]N(&YO=&EC92(N(" @06X@97AA
M8W0@8V]P>0H[.R!O9B!T:&4@9&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).R!D;W=N
M+6%R<F]W"@D)"2 @("@@(D,B+B _<BD).R!R:6=H="UA<G)O=PH)"0D@(" H
M(")$(BX@/VPI"3L@;&5F="UA<G)O=PH)"0D@(" H(")&(BX@/P8I(" [(#Q3
M2$E&5#XM/$A/344^"@D)"2 @("@@(DHB+B _0RD).R \0TQ%05(@1$E34$Q!
M63X*"0D)(" @*" B2R(N(#]%*0D[(#Q#3$5!4B!,24Y%/@H)"0D@(" H("),
M(BX@/T$I"3L@/$E.4R!,24Y%/@H)"0D@(" H(")-(BX@/TPI"3L@/$1%3"!,
M24Y%/@H)"0D@(" H(").(BX@/TDI"3L@/%-(2494/BT\24Y3($-(05(^"@D)
M"2 @("@@(D\B+B _1"D).R \4TA)1E0^+3Q$14P@0TA!4CX*"0D)(" @*" B
M4"(N(#]$*0D[(#Q$14P@0TA!4CX*"0D)(" @*" B42(N(#])*0D[(#Q)3E,@
M0TA!4CX*"0D)(" @*" B4B(N(&1I;F<I"3L@/S\_"@D)"2 @("@@(E,B+B _
M4BD).R \4D],3"!54#X*"0D)(" @*" B5"(N(#]&*0D[(#Q23TQ,($1/5TX^
M"@D)"2 @("@@(E4B+B _3BD).R \3D585"!004=%/@H)"0D@(" H(")6(BX@
M/U I"3L@/%!2158@4$%'13X*"0D)(" @*" B:"(N(#\%*2 @.SL@5T%3(&UA
M<FLM<&%R86=R87!H"@D)"2 @("D*"0D)("DI"@HH96YA8FQE+6%R<F]W+6ME
%>7,I( IR
 
end
@eof

set `wc -lwc <hp.el`
if test $1 -ne 108 -o $2 -ne 538 -o $3 -ne 3695
then	echo ! hp.el should have 108 lines, 538 words, and 3695 characters
	echo ! but has $1 lines, $2 words, and $3 characters
fi
chmod 664 hp.el

rm /tmp/unpack$$
echo "End of shell archive."
exit 0

mark@cogent.UUCP (Captain Neptune) (05/12/88)

In article <DANA.GNUS1@faline.bellcore.com> dana@faline.bellcore.com (Dana A. Chee) writes:
>
>If anyone has an answer to this question, please post it, since there
>are othes of us out here with 2392's that would also like to do this.

After much struggling and hair pulling, we have come to the conclusion
that while the HP2392 is a nice terminal, HP mode (which is more or less
the escape codes used on most all HP terminals) suck pathetically. 
Worst of all being the lame implementation of video attributes. 
Everything we have (including EMACS) works 500% better when we switch
the terminals to ANSI mode and use either the "ansi" terminfo driver, or
"ansi-d", an enhanced version we made for ourselves.

For those who lack a good ansi driver, here is our "ansi-d":

ansi-d|generic ansi standard terminal w/ dim,
	am, xhp, xenl, xon, 
	cols#80, lines#24, 
	bel=^G, cr=\r, clear=\E[H\E[J, el=\E[K, 
	ed=\E[J, cup=\E[%i%p1%d;%p2%dH, cud1=\n, home=\E[H, 
	cub1=\b, cuf1=\E[C, cuu1=\E[A, dch1=\E[P, 
	dl1=\E[M, blink=\E[5m, bold=\E[7m, dim=\E[1m, 
	smir=\E[4h, rev=\E[7m, smso=\E[7m, smul=\E[4m, 
	sgr0=\E[0m, rmir=\E[4l, rmso=\E[0m, rmul=\E[0m, 
	is1=\E[?1l\E(B\E)B, ich1=\E[@, il1=\E[L, kbs=\b, 
	kcud1=\E[B, khome=\E[>0s, kcub1=\E[D, kcuf1=\E[C, 
	kcuu1=\E[A, ich=\E[%p1%d@, rep=%p1%c\E[%p2%{1}%-%db, ind=\n, 
	ht=\t, 

Compile that with 'tic' then do this:

TERM=ansi-d ; export TERM

We added "dim", maybe some other stuff, I don't remember, but "dim" for
sure.

P.S.  Flames about my contempt for HP mode are not wanted, especially
from HP.  You won't change my mind, and I don't care to try and change
yours. 

-- 
# Mark ###################### Ernie: Gee, Bert!  Where'd all your files go ? #
# Steven #################### Bert:  My files!  Er-r-r-r-r-r-rnie-e-e-e-e !! #
# Jeghers ############ {ihnp4,cbosgd,lll-lcc}!ptsfa!cogent!{mark,shawn!mark} #
# Standard Disclaimer: Don't sue me.  Sue my company.  They have more money. #

rjn@hpfcdc.HP.COM (Bob Niland) (05/14/88)

re: "You won't change my mind, and I don't care to try and change yours."

Compared to most usenet "position statements", this is refreshingly direct.
Thank you for sharing your experiences with us.  And now, for those who
might be curious about the whole situation...

> After much struggling and hair pulling, we have come to the conclusion
> that while the HP2392 is a nice terminal, HP mode (which is more or less
> the escape codes used on most all HP terminals) suck pathetically. 
> Worst of all being the lame implementation of video attributes. 
> Everything we have (including EMACS) works 500% better when we switch
> the terminals to ANSI mode and use either the "ansi" terminfo driver, or
> "ansi-d", an enhanced version we made for ourselves.

The native command language of HP terminals is about 15 years old, and
predates both formal and defacto industry standards.  It has survived out of
respect for compatibility.  Applications written in 1975 for the HP 2640A
terminal should run on the new 700/92 without modification.  This is very
important for our commercial (HP 3000/MPE) customers in particular, who have
a huge investment in aging applications.  In some cases, I hear, they only
have their object code, and cannot modify it for new terminal types.

On the other hand, there now are both formal (ANSI) and defacto (DEC)
industry standard command languages in widespread use in the industry.
Consequently, native-mode HP terminals, for the past 5 years or so, have
included EM/52 and ANSI modes.

Several members of the new HP 700 family speak no HP escape sequences at
all.  The 700/22 is DEC-only, the 700/44 adds ANSI to that, and the 700/41
and /43 speak WYSE, ADM, Televideo, etc.

Bob Niland   ARPA:rjn%hpfcrjn@hplabs.HP.COM   UUCP:[ihnp4|hplabs]!hpfcla!rjn

bd@hpsemc.HP.COM (bob desinger) (05/16/88)

> We added "dim", maybe some other stuff, I don't remember, but "dim" for
> sure.

You also fixed a bug in the start- and end-insert/replace mode strings
(smir and rmir).  I reported that bugfix a while back but it hasn't
shown up in the released terminfo directory yet.

While I was looking in the 2392 manual, I added memory lock and unlock
(meml and memu) to my ansi description.  Emacs doesn't care about
these, but some third-party programs are happier to have them.

	# memory lock and unlock for your ansi terminal
	meml=\E[>2h, memu=\E[>2l,

One drawback to non-HP terminal modes is that xdb, the symbolic
debugger on the s800, really wants you to have an HP terminal.  You
can use it on other terminal types, but with them you won't have the
whizzy split-screen source-file windows.  However, it's somewhat easy
to flip the terminal back and forth between modes---you can change it
with an escape sequence sent to the screen.  Changing modes wipes the
screen clean, though, so save anything that's important before
flipping to or from ANSI mode.

-- bd