note: I formatted this email in markdown for readability (let me know if
there's a better way).

I use **electric-pair-mode**.  If you don't you can turn it on locally with
```
(electric-pair-local-mode t)
```
to see what the issue is.

Briefly, with **electric-pair-mode** on (locally or globally), If I type
the characters `(abc)def`, I get the same output.  The characters that pair
are the ones in the syntax table (use `describe-syntax' to see it) that are
of type "open", "close", or "string".

In **matlab-mode**, the pairs (), [], {} (all "open"/"close" type) work
fine, as does the "string" type delimiter " (aka, double-quote, #x22, ?")
because it is listed in the variable `electric-pair-pairs`.  The only one
that does NOT work is the "string" type delimiter ' (aka, single-quote,
#x27, ?').  So with the `(abc)def` example above, with #x27, I get:
```
'abc'def'
```
Note the single-quote at the end of the output string after the `f`.

With some exploration of other modes, I have found that **perl-mode** also
uses #x27 as a string delimiter in its syntax table, but it gives the
correct output with my test input string.

I will look into this, but if someone else with more experience coding
syntax handling gets to it before me, that would be wonderful.

thanks,

Peter
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to