summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-print.el
Commit message (Collapse)AuthorAgeFilesLines
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Add cl-print method for hash tablesMark Oteiza2017-09-111-0/+10
| | | | * lisp/emacs-lisp/cl-print.el (cl-print-object): New method.
* Add docstrings to cl-print entry pointsMark Oteiza2017-09-111-1/+8
| | | | | * lisp/emacs-lisp/cl-print.el (cl-print-compiled): Fix docstring. (cl-prin1, cl-prin1-to-string): Add docstrings.
* ; Fix previous commitMark Oteiza2017-09-111-1/+1
| | | | | The printer otherwise includes the 0x prefix. * lisp/emacs-lisp/cl-print.el: Add 0x to format.
* Include sxhash of object with printed bytecodeMark Oteiza2017-09-111-1/+1
| | | | | | | | This printing, while succint, is rather opaque. At least give an immediate clue of whether different byte code printouts are for the same or different byte code objects. * lisp/emacs-lisp/cl-print.el (cl-print-object): Add object sxhash to printed token "#<bytecode>".
* * lisp/emacs-lisp/cl-print.el (cl-print-compiled-button): t by default.Noam Postavsky2017-07-021-1/+1
| | | | | | * lisp/emacs-lisp/debug.el (debugger-insert-backtrace): * lisp/help-fns.el (describe-variable): No need to let-bind `cl-print-compiled-button' to t anymore.
* Don't redundantly cl-print arglist in function docstring againNoam Postavsky2017-06-291-4/+5
| | | | | | | * 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.
* Buttonize #<bytecode> part of printed functions (Bug#25226)Noam Postavsky2017-06-121-4/+29
| | | | | | | | * lisp/emacs-lisp/cl-print.el: Autoload `disassemble-1'. (cl-print-compiled-button): New variable. (help-byte-code): New button type, calls `disassemble' in its action. (cl-print-object): Use it if `cl-print-compiled-button' is non-nil.
* cl-print: handle circular objects when `print-circle' is nil (Bug#27117)Noam Postavsky2017-05-311-11/+24
| | | | | | | | * lisp/emacs-lisp/cl-print.el (cl-print--currently-printing): New variable. (cl-print-object): When `print-circle' is nil, bind it to a list of objects that are currently printing to avoid printing the same object endlessly. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle): New test.
* Make cl-defstruct use records.Lars Brinkhoff2017-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-extra.el (cl--describe-class) (cl--describe-class-slots): Use the new `type-of'. * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Use type-of. (cl--generic-struct-specializers): Adjust to new tag. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): When type is nil, use records. Use the type symbol as the tag. Use copy-record to copy structs. (cl--defstruct-predicate): New function. (cl--pcase-mutually-exclusive-p): Use it. (cl-struct-sequence-type): Can now return `record'. * lisp/emacs-lisp/cl-preloaded.el (cl--make-slot-desc): Adjust ad-hoc code to new format. (cl--struct-register-child): Work with records. (cl-struct-define): Don't touch the tag's symbol-value and symbol-function slots when we use the type as tag. * lisp/emacs-lisp/cl-print.el (cl-print-object): Adjust to new tag. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record): New test. * doc/lispref/records.texi, doc/misc/cl.texi: Update for records.
* * lisp/emacs-lisp/cl-print.el (cl-print-compiled): New variableStefan Monnier2017-03-121-2/+36
| | | | | (cl-print-object) <compiled-function>: Print the docstring and interactive form. Obey cl-print-compiled.
* * lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.Stefan Monnier2017-03-071-4/+5
|
* ; Spelling fixesPaul Eggert2017-03-051-1/+1
|
* * lisp/emacs-lisp/cl-print.el: New fileStefan Monnier2017-02-231-0/+196
* lisp/emacs-lisp/nadvice.el (advice--where): New function. (advice--make-docstring): Use it. * src/print.c (print_number_index): Don't declare here any more. (Fprint_preprocess): New function. * test/lisp/emacs-lisp/cl-print-tests.el: New file.