Subject: bug#21154: 24.5.50; LaTeX mode complains about mismatched parentheses on end commands

From: Jeff Clough <[email-masked]>
Date: Tue, 28 Jul 2015 20:43:55 -0400

When writing LaTeX, typing the closing curly brace of an end
command (\end{document} for instance) causes a "Mismatched parentheses"
complaint to appear in the minibuffer, even when this seems to be false.

Steps to reproduce:

Create a new ".tex" file with the following contents (note the missing
curly brace at the very end...

\documentclass{article}
\begin{document}
\end{document

Watch the minibuffer, type the closing curly brace, and witness the
complaint. The only ever appears to happen on an end command, and it
happens on every single end command no matter where it appears.

In GNU Emacs 24.5.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2015-07-02 on jeff-Inspiron-3537
Repository revision: a5e6f33b4c8222ad62fdd7ff4bb0f8c5fac432c1
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:	Ubuntu 14.04.2 LTS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  electric-indent-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
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent messages:
Reading active file via nndraft...done
Checking new news...done
No news is good news
Are you sure you want to quit reading news? (y or n) y
Saving file /home/jeff/.newsrc...
Wrote /home/jeff/.newsrc
Saving /home/jeff/.newsrc.eld...
Saving file /home/jeff/.newsrc.eld...
Wrote /home/jeff/.newsrc.eld
Saving /home/jeff/.newsrc.eld...done

Load-path shadows:
None found.

Features:
(shadow emacsbug mule-util smiley gnus-cite gnus-async gnus-bcklg
gnus-draft gnus-ml pcmpl-unix mailalias mail-extr sort nndraft nnmh
nnfolder utf-7 gnutls network-stream starttls nnimap parse-time tls utf7
netrc gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap
nntp gnus-cache gnus-sum nnoo gnus-group gnus-undo nnmail mail-source
smtpmail auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core password-cache sendmail gnus-start gnus-spec gnus-int
gnus-range message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util
mail-prsvr wid-edit manoj-dark-theme ob-sh shell ob-python server
web-mode advice help-fns derived disp-table ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html ox-ascii
ox-publish ox org-element edmacro kmacro cl-loaddefs cl-lib org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func cal-menu easymenu calendar cal-loaddefs time-date
tooltip electric uniquify 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 prog-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 nadvice 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 gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 281425 21885)
 (symbols 48 36524 20)
 (miscs 40 131 300)
 (strings 32 67759 8501)
 (string-bytes 1 2153683)
 (vectors 16 28380)
 (vector-slots 8 597568 11077)
 (floats 8 286 597)
 (intervals 56 572 110)
 (buffers 960 21)
 (heap 1024 29658 8203))