Re: mg: add bounce matching for [] and {}

2014-10-07 Thread Kjell Wooding
It should be noted, You can do that (without a code change) with an
appropriate chunk of code in your ~/.mg file.

(at least, that's how I have always done it)

On Tuesday, October 7, 2014, Stuart Cassoff  wrote:

> On 08/13/14 18:51, Brian Callahan wrote:
> > Hi tech --
> >
> > Diff below adds the bounce matching for [] and {} in mg like it does for
> ().
> > I miss having that from GNU Emacs, anyone else?
> >
> > OK?
> >
> > ~Brian
>
> Just noticed this yesterday. Thanks!
>
>
> Stu
>
>
>


Re: mg: add bounce matching for [] and {}

2014-10-07 Thread Stuart Cassoff
On 08/13/14 18:51, Brian Callahan wrote:
> Hi tech --
> 
> Diff below adds the bounce matching for [] and {} in mg like it does for ().
> I miss having that from GNU Emacs, anyone else?
> 
> OK?
> 
> ~Brian

Just noticed this yesterday. Thanks!


Stu




mg: add bounce matching for [] and {}

2014-08-13 Thread Brian Callahan

Hi tech --

Diff below adds the bounce matching for [] and {} in mg like it does for ().
I miss having that from GNU Emacs, anyone else?

OK?

~Brian

Index: keymap.c
===
RCS file: /cvs/src/usr.bin/mg/keymap.c,v
retrieving revision 1.51
diff -u -p -r1.51 keymap.c
--- keymap.c22 May 2013 19:23:45 -1.51
+++ keymap.c13 Aug 2014 22:49:08 -
@@ -388,16 +388,16 @@ static PF fund_del[] = {
 };

 static PF fund_cb[] = {
-showmatch/* )  */
+showmatch/* ) ] }  */
 };

 #ifndefFUND_XMAPS
 #define NFUND_XMAPS0/* extra map sections after normal ones */
 #endif

-static struct KEYMAPE (6 + NFUND_XMAPS + IMAPEXT) fundmap = {
-6 + NFUND_XMAPS,
-6 + NFUND_XMAPS + IMAPEXT,
+static struct KEYMAPE (8 + NFUND_XMAPS + IMAPEXT) fundmap = {
+8 + NFUND_XMAPS,
+8 + NFUND_XMAPS + IMAPEXT,
 selfinsert,
 {
 {
@@ -414,6 +414,12 @@ static struct KEYMAPE (6 + NFUND_XMAPS +
 },
 {
 ')', ')', fund_cb, NULL
+},
+{
+']', ']', fund_cb, NULL
+},
+{
+'}', '}', fund_cb, NULL
 },
 {
 CCHR('?'), CCHR('?'), fund_del, NULL