Subject: 23.2; scheme-mode.el doesn't parse racket file correctly
From: Alexander Haeckel <[email-masked]>
To: [email-masked]
Date: Sat, 27 Nov 2010 17:18:00 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I describe the problem from 'emacs -Q':
scheme-mode.el isn't able to correctly parse the file:
racket-5.0.2/collects/drracket/tool-lib.rkt
When I open the file, go to position (79,0)
and execute `forward-sexp' I get
Scan error: "Unbalanced parentheses", 2852, 65105

The expected behaviour is for the point to be moved at the end
of the file behind the last closing parenthesis to position (1663,85).
When I move the point at the end of the file behind the last closing
parenthesis and do `backward-sexp' the point is moved to line
the point is moved to position (152,19) instead to (79,0), where
the next character is an opening curly brace.

This error occurs neither under fundamental-mode nor under lisp-mode.
I attach the problematic file to this report.

Thank you very much,
Alexander Haeckel

In GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.12)
 of 2010-06-22 on tentakel
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--without-cedet' '--with-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Scheme

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  yas/global-mode: t
  minibuffer-depth-indicate-mode: t
  icicle-mode: t
  show-paren-mode: t
  display-time-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  semantic-decoration-mode: t
  semantic-mru-bookmark-mode: t
  semantic-idle-completions-mode: t
  semantic-idle-summary-mode: t
  semantic-idle-scheduler-mode: t
  senator-minor-mode: t
  semantic-stickyfunc-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)
  auto-fill-mode: t

Recent input:
C-x C-f / u s r <tab> l o c <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> d o 
n w <tab> <backspace> <backspace> w n <tab> s r <tab> 
e m a <tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> l i s <tab> <tab> r a <tab> 
/ c o <tab> t o o l - <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> d r r <tab> t o 
o <tab> - <tab> <return> ¼ s c h e m e - m o d e <return> 
¼ g o t o - l i n e <return> 7 9 <return> M-> <up> 
<right> <right> <right> <right> <right> C-M-b ¼ C-g 
C-g C-g C-h f s c h e m e - m o d e <return> <down-mouse-1> 
<mouse-movement> <drag-mouse-1> ¼ r e p o r <tab> 
<return>

Recent messages:
Turning OFF Icicle mode...done
Turning ON Icicle mode...done
Computing completion candidates... [13 times]
Loading semanticdb-file...done [4 times]
Mark set [5 times]
Quit [2 times]
C-h (Type ? for further options)- [2 times]
Type C-x 1 to delete the help window, C-M-v to scroll help. [3 times]
Mark set
Computing completion candidates...

Load-path shadows:
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui hides /usr/local/share/emacs/site-lisp/predictive/completion-ui
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-dynamic hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-dynamic
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-popup-frame hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-popup-frame
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-tooltip hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-tooltip
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-echo hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-echo
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-menu hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-menu
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-sources hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-sources
/usr/local/share/emacs/site-lisp/completion-ui/completion-ui-hotkeys hides /usr/local/share/emacs/site-lisp/predictive/completion-ui-hotkeys
/usr/local/share/emacs/site-lisp/yasnippet/current/yasnippet hides /usr/local/share/emacs/site-lisp/yasnippet/yasnippet-0.5.10/yasnippet
/usr/local/share/emacs/site-lisp/cedet/current/speedbar/sb-image hides /usr/local/share/emacs/23.2/lisp/sb-image
/usr/local/share/emacs/site-lisp/cedet/current/common/ezimage hides /usr/local/share/emacs/23.2/lisp/ezimage
/usr/local/share/emacs/site-lisp/cedet/current/speedbar/dframe hides /usr/local/share/emacs/23.2/lisp/dframe
/usr/local/share/emacs/site-lisp/cedet/current/speedbar/speedbar hides /usr/local/share/emacs/23.2/lisp/speedbar
/usr/local/share/emacs/site-lisp/scheme hides /usr/local/share/emacs/23.2/lisp/progmodes/scheme
/usr/local/share/emacs/site-lisp/cc-mode/cc-langs hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-langs
/usr/local/share/emacs/site-lisp/cc-mode/cc-defs hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-defs
/usr/local/share/emacs/site-lisp/cc-mode/cc-vars hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-vars
/usr/local/share/emacs/site-lisp/cc-mode/cc-bytecomp hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-bytecomp
/usr/local/share/emacs/site-lisp/cc-mode/cc-cmds hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-cmds
/usr/local/share/emacs/site-lisp/cc-mode/cc-styles hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-styles
/usr/local/share/emacs/site-lisp/cc-mode/cc-fonts hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-fonts
/usr/local/share/emacs/site-lisp/cc-mode/cc-mode hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-mode
/usr/local/share/emacs/site-lisp/cc-mode/cc-menus hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-menus
/usr/local/share/emacs/site-lisp/cc-mode/cc-engine hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-engine
/usr/local/share/emacs/site-lisp/cc-mode/cc-align hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-align
/usr/local/share/emacs/site-lisp/cc-mode/cc-awk hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-awk
/usr/local/share/emacs/site-lisp/cperl-mode hides /usr/local/share/emacs/232/lisp/progmodes/cperl-mode
/usr/local/share/emacs/site-lisp/cc-mode/cc-compat hides /usr/local/share/emacs/23.2/lisp/progmodes/cc-compat
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio-comp hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio-comp
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio-opt hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio-opt
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio-speedbar hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio-speedbar
/usr/local/share/emacs/site-lisp/predictive/avl-tree hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/avl-tree
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio-datadebug hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio-datadebug
/usr/local/share/emacs/site-lisp/dvc/contrib/ewoc hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/ewoc
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio-base hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio-base
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio-custom hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio-custom
/usr/local/share/emacs/site-lisp/cedet/current/eieio/eieio hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/eieio
/usr/local/share/emacs/site-lisp/cedet/current/eieio/chart hides /usr/local/share/emacs/23.2/lisp/emacs-lisp/chart

Features:
(shadow sort mail-extr message sendmail ecomplete mml mml-sec mm-decode
mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp
ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils mailheader
canlock sha1 hex-util hashcash mail-utils emacsbug
semantic-analyze-complete ede-linux ede-emacs ede-cpp-root
semantic-complete semanticdb-typecache semantic-dep semantic-tag-file
semanticdb-file cedet-files semantic-scm semantic-scm-by scheme bzr-core
tla-core tla-autoconf tla-defs dvc-log vc vc-dispatcher dvc-unified
dvc-tips add-log diff-mode ediff xdarcs-core xgit-core xhg-core
xmtn-minimal face-remap tramp-imap tramp-gw tramp-fish tramp-smb
tramp-cache tramp-ftp tramp-cmds tramp auth-source gnus-util netrc
time-date shell password-cache format-spec tramp-compat trampver
semantic-el semantic-bovine bovine-debug semantic-debug paredit
yasnippet dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui
dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site mb-depth
two-column bookmark pp icicles icicles-mode dired+ dired-x ediff-merg
ediff-diff ediff-wind ediff-mult ediff-help ediff-init ediff-util
dired-aux dired icicles-cmd2 icicles-cmd1 cus-edit cus-start cus-load
icicles-mcmd help-mode view icicles-mac icicles-fn wid-edit+ icicles-var
icicles-opt ffap icicles-face hexrgb filesets mailcrypt rfc822 w3m-load
matlab-load jka-compr paren tex-site malabar-mode malabar-refactor
malabar-semanticdb eieio-opt semanticdb-search malabar-test
malabar-jump-to-project malabar-codegen malabar-misc malabar-import
malabar-reflection arc-mode archive-mode malabar-project malabar-groovy
fringe-helper ansi-color malabar-util srecode-getset subword
malabar-annotations malabar-abbrevs skeleton malabar-variables compile
comint wisent-malabar-java-wy wisent-comp wisent-java semantic-java
semantic-doc wisent-java-wy semantic-ia semantic-find cc-subword cc-cmds
cc-engine cc-vars cc-defs bbdb-autoloads bbdb regexp-opt timezone time
easy-mmode info+ thingatpt+ thingatpt sb-info info srecode-mode
cogre-srecode semantic-edit srecode-template-mode srecode-template
srecode-template-wy semantic-wisent wisent srecode-map srecode-insert
srecode-args srecode-dictionary srecode-find srecode-ctxt
srecode-compile srecode-table semantic-decorate-include semanticdb-find
semanticdb-ref semantic-decorate-mode semantic-decorate pulse
semantic-mru-bookmark semanticdb-mode semantic-idle eldoc senator ring
warnings which-func semantic-imenu semantic-sb imenu cedet
cedet-contrib-load contrib-loaddefs cogre-load cogre-loaddefs
speedbar-load speedbar-loaddefs ede-load ede-loaddefs ede-speedbar
ede-files ede ede-base ede-auto eieio-speedbar semantic-ia-sb
semantic-analyze semantic-scope semantic-analyze-fcn semantic-sort
semanticdb-el semanticdb semantic-ctxt semantic-format
semantic-util-modes semantic-util semantic semantic-lex semantic-tag
working fame speedbar sb-image ezimage dframe easymenu assoc
eieio-custom wid-edit ede-source eieio-base srecode-load srecode
srecode-loaddefs semantic-load semantic-fw semantic-loaddefs mode-local
find-func derived eieio-load eieio-loaddefs cedet-load cedet-compat
cedet-loaddefs eieio byte-opt bytecomp byte-compile inversion cl cl-19
uniquify advice help-fns advice-preload edmacro kmacro tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind font-render-setting gtk
x-toolkit x multi-tty emacs)

-- 
"I can't understand why people are frightened of new ideas.
 I'm frightened of the old ones.”
 - John Cage