branch: master commit e9088c8098128b955767cbeb400d2147721d47da Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@web.de>
Implement `cl-print-object' for el-search-objects * el-search/el-search.el: Add (cl-print "1.0") to Package-Requires. Require cl-print. (cl-print-object): Implement for `el-search-object's. --- packages/el-search/el-search.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 278f7c2..c519446 100644 --- a/packages/el-search/el-search.el +++ b/packages/el-search/el-search.el @@ -8,7 +8,7 @@ ;; Keywords: lisp ;; Compatibility: GNU Emacs 25 ;; Version: 1.5.1 -;; Package-Requires: ((emacs "25") (stream "2.2.4")) +;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0")) ;; This file is not part of GNU Emacs. @@ -414,6 +414,7 @@ (require 'cl-lib) (require 'pcase) ;we want to bind `pcase--dontwarn-upats' before pcase is autoloaded +(require 'cl-print) (require 'elisp-mode) (require 'thingatpt) (require 'thunk) @@ -1027,6 +1028,12 @@ optional MESSAGE are used to construct the error message." (cl-callf copy-alist (el-search-object-properties copy)) copy)) +(cl-defmethod cl-print-object ((object el-search-object) stream) + ;; We use a syntax that looks nice with with pp.el + (princ "#s(el-search-object " stream) + (prin1 (el-search--get-search-description-string object 'verbose 'dont-propertize) stream) + (princ ")" stream)) + (defun el-search--current-pattern () (and el-search--current-search (el-search-object-pattern el-search--current-search)))