bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18039: 24.3; Broken docstring in cl-style functions


From: Michael Heerdegen
Subject: bug#18039: 24.3; Broken docstring in cl-style functions
Date: Thu, 17 Jul 2014 02:31:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Thorsten Jolitz <address@hidden> writes:

> thus the bug seems to be in the combination of normal args
> 'key-val-strg and &key args with default values '(crlf "\n"). 

Indeed. Eval this in emacs -Q:

M-: (require 'cl)
M-: (cl-defun test (&key (c "\n")) "Test" nil)
M-: (symbol-function 'test)

==>

(lambda (&rest --cl-rest--) "Test

(fn 40 102 110 32 38 107 101 121 32 40 67 32 34 10 34 41 41) ...)

The newline character in the (printed) argument list makes a
difference in this expression in help-add-fundoc-usage:

    (if (and (stringp arglist)
             (string-match "\\`([^ ]+\\(.*\\))\\'" arglist))
        (concat "(fn" (match-string 1 arglist) ")")
      (format "%S" (help-make-usage 'fn arglist)))

(help-make-usage doesn't seem to expect a stringp arglist).  Should the
regexp given to string-match be changed?


Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]