Ulrich Mueller <ulm@gentoo.org> writes:
On Sun, 10 Aug 2008, I wrote:
,----[ test.el ]
| (progn
| (require 'cc-mode))
`----
$ emacs -Q test.el
M-x eval-buffer
This will result in an error: Invalid read syntax: ")"
The problem goes away if I revert the following change:
2008-06-27 Alan Mackenzie <acm@muc.de>
* progmodes/cc-defs.el (c-emacs-features): New feature
'argumentative-bod-function.
Thanks for pinpointing this.
In fact, it's apparently not a problem with cc-mode, but with Emacs.
Here's a stripped-down recipe:
1. Create a file foo.el in your lisp path with the following contents:
(defconst foo
(let ((beginning-of-defun-function
(lambda (&optional arg)
(not (eq arg nil)))))
(progn
(beginning-of-defun 1))))
(provide 'foo)
2. Byte-compile it (M-x byte-compile-file RET).
3. Create a file test.el with the following contents:
(progn
(require 'foo))
4. emacs test.el
5. M-x eval-buffer
Debugger entered--Lisp error: (invalid-read-syntax ")")
eval-buffer() ; Reading at buffer position 25
call-interactively(eval-buffer t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
I don't know what causes this bug, though. Anyone?