aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-11-18 11:02:27 +0100
committerLars Ingebrigtsen2019-11-18 11:02:27 +0100
commit2e92f176a3ae68ed6fcf9f07c173c61a497f33fd (patch)
treec8781bac30354b7da98e2070d118707e9976cb09
parentccb8bbd581adac2cc1c770c266b5fd52da5c9402 (diff)
downloademacs-2e92f176a3ae68ed6fcf9f07c173c61a497f33fd.tar.gz
emacs-2e92f176a3ae68ed6fcf9f07c173c61a497f33fd.zip
Fix cl-prettyexpand in the non-FULL case
* lisp/emacs-lisp/cl-extra.el (cl-prettyexpand): This function has apparently not worked for at least a couple of decades (bug#38206) unless supplied with a FULL parameter. Make the FULL parameter obsolete and make the function always work as it did with a non-nil FULL.
-rw-r--r--lisp/emacs-lisp/cl-extra.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 91034de5396..7e9d8fe870b 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -693,17 +693,15 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
693 (forward-sexp))) 693 (forward-sexp)))
694 694
695;;;###autoload 695;;;###autoload
696(defun cl-prettyexpand (form &optional full) 696(defun cl-prettyexpand (form &optional _full)
697 "Expand macros in FORM and insert the pretty-printed result. 697 "Expand macros in FORM and insert the pretty-printed result."
698Optional argument FULL non-nil means to expand all macros, 698 (declare (advertised-calling-convention (form) "27.1"))
699including `cl-block' and `cl-eval-when'."
700 (message "Expanding...") 699 (message "Expanding...")
701 (let ((cl--compiling-file full) 700 (let ((byte-compile-macro-environment nil))
702 (byte-compile-macro-environment nil)) 701 (setq form (macroexpand-all form))
703 (setq form (macroexpand-all form
704 (and (not full) '((cl-block) (cl-eval-when)))))
705 (message "Formatting...") 702 (message "Formatting...")
706 (prog1 (cl-prettyprint form) 703 (prog1
704 (cl-prettyprint form)
707 (message "")))) 705 (message ""))))
708 706
709;;; Integration into the online help system. 707;;; Integration into the online help system.