* Wrong "Not documented" message, bug?
@ 2010-10-14 8:21 Andreas Röhler
2010-10-14 13:08 ` Ralf Mattes
2010-10-14 16:03 ` PJ Weisberg
0 siblings, 2 replies; 5+ messages in thread
From: Andreas Röhler @ 2010-10-14 8:21 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
M-x describe-function `py-in-string/comment' points me to the code
below, which is correct:
(defun py-in-string/comment ()
(interactive)
"Returns character address of start of comment or string; nil if not
in one. "
(lexical-let ((erg (nth 8 (syntax-ppss))))
(unless erg (when (or (looking-at "\"\"\"")
(looking-at (concat "^[ \t]*"
comment-start-skip)))
(setq erg (point))))
(when (interactive-p) (message "%s" erg))
erg))
However, it says:
,----
| py-in-string/comment is an interactive Lisp function in
| `python-components-intern.el'.
|
| (py-in-string/comment)
|
| Not documented.
`----
Something odd with doku here? A bug?
Thanks
Andreas
--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/
PS: If interested, see the complete files contents at
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode-components/annotate/head%3A/python-components-intern.el
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Wrong "Not documented" message, bug?
[not found] <mailman.1.1287045328.32083.help-gnu-emacs@gnu.org>
@ 2010-10-14 8:59 ` Marc Mientki
0 siblings, 0 replies; 5+ messages in thread
From: Marc Mientki @ 2010-10-14 8:59 UTC (permalink / raw)
To: help-gnu-emacs
Am 14.10.2010 10:21, schrieb Andreas Röhler:
>
> Hi,
>
> M-x describe-function `py-in-string/comment' points me to the code
> below, which is correct:
>
>
> (defun py-in-string/comment ()
> (interactive) <----
> "Returns character address of start of comment or string; nil if not in <----
> one. "
> (lexical-let ((erg (nth 8 (syntax-ppss))))
> (unless erg (when (or (looking-at "\"\"\"")
> (looking-at (concat "^[ \t]*" comment-start-skip)))
> (setq erg (point))))
> (when (interactive-p) (message "%s" erg))
> erg))
>
> However, it says:
>
> ,----
> | py-in-string/comment is an interactive Lisp function in
> | `python-components-intern.el'.
> |
> | (py-in-string/comment)
> |
> | Not documented.
> `----
>
> Something odd with doku here? A bug?
See at '<----'. Doc string must come first.
regards
Marc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Wrong "Not documented" message, bug?
2010-10-14 8:21 Wrong "Not documented" message, bug? Andreas Röhler
@ 2010-10-14 13:08 ` Ralf Mattes
2010-10-14 16:03 ` PJ Weisberg
1 sibling, 0 replies; 5+ messages in thread
From: Ralf Mattes @ 2010-10-14 13:08 UTC (permalink / raw)
To: help-gnu-emacs
On Thu, 14 Oct 2010 10:21:59 +0200, Andreas Röhler wrote:
> Hi,
>
> M-x describe-function `py-in-string/comment' points me to the code
> below, which is correct:
>
>
> (defun py-in-string/comment ()
> (interactive)
> "Returns character address of start of comment or string; nil if not
> in one. "
> (lexical-let ((erg (nth 8 (syntax-ppss))))
> (unless erg (when (or (looking-at "\"\"\"")
> (looking-at (concat "^[ \t]*"
> comment-start-skip)))
> (setq erg (point))))
> (when (interactive-p) (message "%s" erg)) erg))
>
> However, it says:
>
> ,----
> | py-in-string/comment is an interactive Lisp function in |
> `python-components-intern.el'.
> |
> | (py-in-string/comment)
> |
> | Not documented.
> `----
>
> Something odd with doku here? A bug?
How about adding a docstring? :-)
Something like:
(defun py-in-string/comment ()
"Returns character address of start of comment or string; nil if not
in one. "
....
HTH Ralf Mattes
> Thanks
>
>
> Andreas
>
> --
> https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
> https://code.launchpad.net/s-x-emacs-werkstatt/
>
>
> PS: If interested, see the complete files contents at
>
> http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode-
components/annotate/head%3A/python-components-intern.el
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Wrong "Not documented" message, bug?
2010-10-14 8:21 Wrong "Not documented" message, bug? Andreas Röhler
2010-10-14 13:08 ` Ralf Mattes
@ 2010-10-14 16:03 ` PJ Weisberg
2010-10-15 11:50 ` Andreas Röhler
1 sibling, 1 reply; 5+ messages in thread
From: PJ Weisberg @ 2010-10-14 16:03 UTC (permalink / raw)
To: help-gnu-emacs
On Thu, Oct 14, 2010 at 8:21 AM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
>
> Hi,
>
> M-x describe-function `py-in-string/comment' points me to the code below,
> which is correct:
>
>
> (defun py-in-string/comment ()
> (interactive)
> "Returns character address of start of comment or string; nil if not in
> one. "
> (lexical-let ((erg (nth 8 (syntax-ppss))))
> (unless erg (when (or (looking-at "\"\"\"")
> (looking-at (concat "^[ \t]*" comment-start-skip)))
> (setq erg (point))))
> (when (interactive-p) (message "%s" erg))
> erg))
>
> However, it says:
>
> ,----
> | py-in-string/comment is an interactive Lisp function in
> | `python-components-intern.el'.
> |
> | (py-in-string/comment)
> |
> | Not documented.
> `----
>
> Something odd with doku here? A bug?
The docstring has to be the *first* statement in the function. Not
even the (interactive) call can come before it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Wrong "Not documented" message, bug?
2010-10-14 16:03 ` PJ Weisberg
@ 2010-10-15 11:50 ` Andreas Röhler
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2010-10-15 11:50 UTC (permalink / raw)
To: help-gnu-emacs
Am 14.10.2010 18:03, schrieb PJ Weisberg:
> On Thu, Oct 14, 2010 at 8:21 AM, Andreas Röhler
> <andreas.roehler@easy-emacs.de> wrote:
>>
>> Hi,
>>
>> M-x describe-function `py-in-string/comment' points me to the code below,
>> which is correct:
>>
>>
>> (defun py-in-string/comment ()
>> (interactive)
>> "Returns character address of start of comment or string; nil if not in
>> one. "
>> (lexical-let ((erg (nth 8 (syntax-ppss))))
>> (unless erg (when (or (looking-at "\"\"\"")
>> (looking-at (concat "^[ \t]*" comment-start-skip)))
>> (setq erg (point))))
>> (when (interactive-p) (message "%s" erg))
>> erg))
>>
>> However, it says:
>>
>> ,----
>> | py-in-string/comment is an interactive Lisp function in
>> | `python-components-intern.el'.
>> |
>> | (py-in-string/comment)
>> |
>> | Not documented.
>> `----
>>
>> Something odd with doku here? A bug?
>
> The docstring has to be the *first* statement in the function. Not
> even the (interactive) call can come before it.
>
>
Oh yeah, thanks all.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-15 11:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 8:21 Wrong "Not documented" message, bug? Andreas Röhler
2010-10-14 13:08 ` Ralf Mattes
2010-10-14 16:03 ` PJ Weisberg
2010-10-15 11:50 ` Andreas Röhler
[not found] <mailman.1.1287045328.32083.help-gnu-emacs@gnu.org>
2010-10-14 8:59 ` Marc Mientki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).