I have problems running eval-defun
for a defun
when there is a square bracket [
in column 0 of its doc string. For example:
(defun test ()
"Test function.
[Some text]"
(message "Hello"))
When I position the cursor inside the function above and type M-x eval-defun RET
it displays "[Some text]"
in the echo area, but the defun
is not being evaluated. If I remove the square bracket [
in the doc string, and then reevaluate, it works fine and displays "test"
in the echo area.
I am using GNU Emacs 25.2.1 on Ubuntu 17.04.
[
with\133
? – wvxvw Oct 20 '17 at 9:02[
. See(emacs) Left Margin Paren
. – Basil Oct 20 '17 at 9:48eval-defun
? A bracket in the first column cannot be the start of adefun
, am I right? – Håkon Hægland Oct 20 '17 at 9:54defun
macro, but it can be a top-level definition, which is what Emacs documentation refers to as adefun
. See(emacs) Defuns
. Note also that the documentation is careful to prefer the word "delimiter" to "paren", implying multiple paren-like characters. – Basil Oct 20 '17 at 10:02defun
. – Drew Oct 20 '17 at 15:29