ellson@cbnewsk.att.com (john.ellson) (08/31/90)
So now that I have mg up and running I would like to customize it a little. For example I would really like backspace to delete-backward-char instead of calling help (OK, so I'm not an emacs purist :-) ). mg doesn't use a standard elisp .emacs file but uses a modified syntax s:mg-startup file instead. The tex manual doesn't seem to be very complete in this area, and without tex it's hard to read anyway. Could somebody tell me how to remap the backspace key please? John Ellson ellson@homxc.att.com
plav@cup.portal.com (Rick M Plavnicky) (09/07/90)
[This was posted a few days back, but I don't think it ever
made it out from this site. Aplologies if it's a repeat...]
I've been using Mg 3a beta 4 for a few days - wow! Nice job! But I'm
having a few minor problems and I'm hoping that someone can help.
Like many others, I didn't like the default operation of the backspace
key so in my startup file I used the 'bsmap-mode 1' line. Much
better, but now I'd like to bind the DEL key to delete-char (as in
^d). Is there any way to do this? It's not obvious what to call DEL
when you want to bind it...
As far as I can see, the numeric keys on the '2000 keypad are treated
the same as the numerics on the top row. Is this true? I was hoping
to be able to be able to independently bind the PgUp, PgDn, etc. keys
but it doesn't seem to work.
Okay, so I'm not a purist. I'd like to set this up the way I'm
familiar with, but if I can't I'm certainly willing to change my ways.
This Mg is fine!
Lastly, in exchange for the help I'm sure to get, here's a
write-region command I cobbled up in ARexx. Nothin' fancy, but it
works. Enjoy. Add the following lines to your startup:
fset write-region "\^[xrexx\^Mwriteregion.mg\^M"
global-set-key "\^xw" write-region
-----cut here -----
/* writeregion.mg - write the mg region to a file */
options results
'rexx-region' theregion
if (theregion.0 == 0) then do /* no region to write! */
'rexx-display "no region defined"'
exit
end
'rexx-request "write region to file: "'
if rc~ = 0 then exit
filespec = result
if exists(filespec) then do /* filespec exists - what is it? */
sta = statef(filespec)
parse var sta t .
if t == 'DIR' then do
'rexx-display "' || filespec 'is a directory - region not written"'
exit
end
else if t == 'FILE' then do
'rexx-display "' || filespec 'already exists - region not written"'
exit
end
end
if ~(open(out, filespec, 'W')) then do
'rexx-display "could not open' filespec '- region not written"'
exit
end
'rexx-display "writing..."'
do i=1 to theregion.0
writech(out, theregion.i)
end
'rexx-display "region written to' filespec '"'
exit
-----cut here -----
/* Rick Plavnicky ...!sun!cup.portal.com!plav -or- plav@cup.portal.com */