Take a function
(defun foo (x)
"Add 1 to x and return the result.
Example:
(foo 1) => 2"
(1+ foo))
Now if I remove the leading space after "Example:", ie
(defun foo (x)
"Add 1 to x and return the result.
Example:
(foo 1) => 2"
(1+ foo))
the ( will be pink in SLIME and compiling the function gives a reader
error. No other character but ( appear to have such an effect. I
would like to learn why the ( at the beginning of the line is handled
differently even if it is inside a docstring -- I tried to find it in
the Hyperspec with no success.
Thanks,
Tamas
In article <··············@pu100877.student.princeton.edu>,
Tamas Papp <······@gmail.com> wrote:
> Take a function
>
> (defun foo (x)
> "Add 1 to x and return the result.
> Example:
> (foo 1) => 2"
> (1+ foo))
>
> Now if I remove the leading space after "Example:", ie
>
> (defun foo (x)
> "Add 1 to x and return the result.
> Example:
> (foo 1) => 2"
> (1+ foo))
>
> the ( will be pink in SLIME and compiling the function gives a reader
> error. No other character but ( appear to have such an effect. I
> would like to learn why the ( at the beginning of the line is handled
> differently even if it is inside a docstring -- I tried to find it in
> the Hyperspec with no success.
>
> Thanks,
>
> Tamas
This is a 'feature' of SLIME/Emacs. A bug, if you will.
--
http://lispm.dyndns.org
Rainer Joswig <······@lisp.de> writes:
> In article <··············@pu100877.student.princeton.edu>,
> Tamas Papp <······@gmail.com> wrote:
>
>> Take a function
>>
>> (defun foo (x)
>> "Add 1 to x and return the result.
>> Example:
>> (foo 1) => 2"
>> (1+ foo))
>>
>> Now if I remove the leading space after "Example:", ie
>>
>> (defun foo (x)
>> "Add 1 to x and return the result.
>> Example:
>> (foo 1) => 2"
>> (1+ foo))
>>
>> the ( will be pink in SLIME and compiling the function gives a reader
>> error. No other character but ( appear to have such an effect. I
>> would like to learn why the ( at the beginning of the line is handled
>> differently even if it is inside a docstring -- I tried to find it in
>> the Hyperspec with no success.
>>
>> Thanks,
>>
>> Tamas
>
> This is a 'feature' of SLIME/Emacs. A bug, if you will.
Thanks Rainer, I reported it to slime-devel.
Tamas
Rainer Joswig <······@lisp.de> writes:
> This is a 'feature' of SLIME/Emacs. A bug, if you will.
The Emacs convention is to write \( instead of ( at the beginning of
a line in a documentation string. Info: (elisp)Documentation Tips.
> This is a 'feature' of SLIME/Emacs. A bug, if you will.
Emacs regards this as something you simply have to live with. Within
Emacs, go to Info (ctrl-h i and then choose Emacs), and find the entry
"Left Margin Paren".