diff options
| author | Noam Postavsky | 2017-05-27 22:40:46 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-06-29 19:40:23 -0400 |
| commit | b567c48869b1484c6b1d263afc5cb67f22e99125 (patch) | |
| tree | b32e9187f657196277bccdf3cd49666f92a8f8d7 | |
| parent | eb9d3eca801c1ea847956a96fafd29eef9bbe5d1 (diff) | |
| download | emacs-b567c48869b1484c6b1d263afc5cb67f22e99125.tar.gz emacs-b567c48869b1484c6b1d263afc5cb67f22e99125.zip | |
Don't redundantly cl-print arglist in function docstring again
* lisp/emacs-lisp/cl-print.el (cl-print-object): Don't print arglist
part of docstring.
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update
test accordingly.
| -rw-r--r-- | lisp/emacs-lisp/cl-print.el | 9 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/cl-print-tests.el | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el index 89a71d1b6c5..824d0b7b4f5 100644 --- a/lisp/emacs-lisp/cl-print.el +++ b/lisp/emacs-lisp/cl-print.el | |||
| @@ -105,10 +105,11 @@ into a button whose action shows the function's disassembly.") | |||
| 105 | (if args | 105 | (if args |
| 106 | (prin1 args stream) | 106 | (prin1 args stream) |
| 107 | (princ "()" stream))) | 107 | (princ "()" stream))) |
| 108 | (let ((doc (documentation object 'raw))) | 108 | (pcase (help-split-fundoc (documentation object 'raw) object) |
| 109 | (when doc | 109 | ;; Drop args which `help-function-arglist' already printed. |
| 110 | (princ " " stream) | 110 | (`(,_usage . ,(and doc (guard (stringp doc)))) |
| 111 | (prin1 doc stream))) | 111 | (princ " " stream) |
| 112 | (prin1 doc stream))) | ||
| 112 | (let ((inter (interactive-form object))) | 113 | (let ((inter (interactive-form object))) |
| 113 | (when inter | 114 | (when inter |
| 114 | (princ " " stream) | 115 | (princ " " stream) |
diff --git a/test/lisp/emacs-lisp/cl-print-tests.el b/test/lisp/emacs-lisp/cl-print-tests.el index dfbe18d7844..6448a1b37f7 100644 --- a/test/lisp/emacs-lisp/cl-print-tests.el +++ b/test/lisp/emacs-lisp/cl-print-tests.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | (let ((print-circle t)) | 34 | (let ((print-circle t)) |
| 35 | (should (equal (cl-prin1-to-string `((x . ,x) (y . ,x))) | 35 | (should (equal (cl-prin1-to-string `((x . ,x) (y . ,x))) |
| 36 | "((x . #1=#s(cl-print--test :a 1 :b 2)) (y . #1#))"))) | 36 | "((x . #1=#s(cl-print--test :a 1 :b 2)) (y . #1#))"))) |
| 37 | (should (string-match "\\`#f(compiled-function (x) .*\n\n.*)\\'" | 37 | (should (string-match "\\`#f(compiled-function (x) \"[^\"]+\" [^\)]*)\\'" |
| 38 | (cl-prin1-to-string (symbol-function #'caar)))))) | 38 | (cl-prin1-to-string (symbol-function #'caar)))))) |
| 39 | 39 | ||
| 40 | (ert-deftest cl-print-tests-2 () | 40 | (ert-deftest cl-print-tests-2 () |