Subject: bug#13459: 24.2.91; mic-paren wrong match

From: Andreas Röhler <[email-masked]>
Date: Wed, 16 Jan 2013 08:28:30 +0100

Current sml-mode.el from ELPA
Example code in sml-mode:

wert = asd;
(* asdf *)

Cursor after closing parent. M-x paren-activate
in previous line "a" is highlighted as opening match

see png attached

Also reported at emacs-sources:
Re: mic-paren.el 3.10 available

;;;;;;;

In GNU Emacs 24.2.91.1 (i686-pc-linux-gnu, GTK+ Version 3.0.0)
  of 2012-12-16 on myrkwid
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
System Description:	openSUSE 11.4 (i586)

Configured using:
  `configure 'CFLAGS=-g -O''

Important settings:
   value of $LANG: de_DE.UTF-8
   value of $XMODIFIERS: @im=local
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: SML

Minor modes in effect:
   tooltip-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
l - , <backspace> m o d e <return> <left> <left> <up>
<down> <up> <up> <up> <up> <up> <up> C-a C-k C-k s
C-k C-k C-k C-k C-k C-k <down> <down> <down> <left>
<left> <help-echo> <return> <return> C-u M-x e m a
c s - v e r s i o n <return> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> C-a ( * SPC <up>
<left> <down> <down> <down> A S D SPC S d SPC <up>
<up> <left> <left> <right> <down> ( a s d ) M-x m i
c <tab> <backspace> <backspace> <backspace> p a r <tab>
C-g <help-echo> M-x b l i n <tab> p a r <tab> <backspace>
<backspace> <backspace> <tab> c <backspace> m , a t
<backspace> <backspace> <backspace> a t <tab> <return>
C-f C-x C-f a r b e <tab> e i m <tab> <backspace> <backspace>
m a c <tab> e l i <tab> s <tab> m i c <tab> e l <tab>
<return> M-x e v a l - b u <tab> <return> C-x b <return>
<left> M-x m i c - p a <tab> <backspace> <backspace>
<tab> <return> 1 <return> y s d <return> <left> <right>
<up> <right> <right> <right> <right> <right> <down>
<down> <down> <down> M-x e l <tab> e b <tab> <backspace>
c <tab> b u <tab> <return> <down> <return> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> C-x b <return> M-x p a
r e - n <backspace> <backspace> n - <tab> a c t <tab>
<return> <up> <up> <up> <right> <right> <right> <down>
<up> <down> <down> <down> <up> <up> <up> <help-echo>
<down> <up> M-x r e p o r t - e m a c s - b u <tab>
<return>

Recent messages:
Please type q, s, or p; or ? for help
...fccc/sml-beispiel.sml locked by korsten@gttr... (pid 9856): (s, q, p, ?)?
Quit
Making completion list... [2 times]
Loading vc-cvs...done
Repeat each time Emacs is idle? (y or n)  y
byte-code: End of buffer
Making completion list...
<<< Type SPC or RET to bury the buffer list >>>
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils ebuff-menu gud easy-mmode paren mic-paren vc-cvs
help-mode sml-mode skeleton derived help-fns compile comint ansi-color
ring cl-macs gv easymenu electric smie cl cl-lib dired time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)