[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
curious bug in Emacs (or slime.el or autopair.el)
From: |
João Távora |
Subject: |
curious bug in Emacs (or slime.el or autopair.el) |
Date: |
Sat, 3 Jul 2010 19:11:31 +0200 |
Hi,
I've come across a problem using these packages that makes Emacs quite
unusable, but can't seem to trace down the problem. The bug causes emacs to
emit frequent errors
error in process filter: define-key: Wrong type argument: characterp, nil
error in process filter: Wrong type argument: characterp, nil
error in process filter: define-key: Wrong type argument: characterp, nil
error in process filter: Wrong type argument: characterp, nil
Error in post-command-hook: (wrong-type-argument characterp nil)
but (setq debug-on-error t) does *not* pop up a backtrace which leads me to
suspect emacs as well. It can be reproduced like so
$ /Applications/Emacs\ -\ 23.app/Contents/MacOS/Emacs -Q --load
~/Source/autopair/autopair.el --load 50sbcl.el -e autopair-global-mode -e slime
where autopair.el is at http://autopair.googlecode.com/svn/trunk/autopair.el
and 50sbcl.el sets up a some recent CVS of slime.
(add-to-list 'load-path "~/Source/Emacs/slime")
(require 'slime)
;; (add-hook 'sldb-mode-hook #'(lambda () (setq autopair-dont-activate t))) ;;
this line will work around the problem.
(setq inferior-lisp-program "/opt/local/bin/sbcl")
(setenv "SBCL_HOME" "/opt/local/lib/sbcl")
As soon as the user attempts to evaluate an unbound symbol in the REPL, the
strange error appears.
I apologize for such a complicated recipe, but couldn't come up with anything
simpler.
The following things cause the error not to happen:
1. (add-hook 'sldb-mode-hook #'(lambda () (setq autopair-dont-activate t))) ;;
disables autopair.el in the sbcl-mode buffer, where it was useless anyway
2. disable slime.el setting of ">" to the syntax class ")" in slime.el
3. in sldb-mode's function definition, remove the call to
(kill-all-local-variables)
4. in sldb-mode's function definition, which I got by pretty-printing
(symbol-function sldb-mode), insert a `debug' call between the calls to
'use-local-map and 'set-syntax-table. Continue after the debug and no error
should happen.
5. prevent autopair.el from binding ">" to 'autopair-skip-close-maybe in a
keymap which is used in a keymap alist which in turn autopair uses as an
element of `emulation-mode-map-alists'
The error has been reproduced by more people, also in w32 i think. See
http://code.google.com/p/autopair/issues/detail?id=32. No idea how to catch it
in the act. I could attach gdb to it, but then what?
J
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- curious bug in Emacs (or slime.el or autopair.el),
João Távora <=