From 589fc4791fb569279b23e5a09243115a7b52cf74 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 14 Nov 2012 20:26:52 -0500 Subject: [PATCH] * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Defend against potential binding of print-gensym to t, and prettify (back)quotes in case they appear in args's default values. Fixes: debbugs:12884 --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/cl-macs.el | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 01b7532e56d..1a86637f4ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-11-15 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl--transform-lambda): Defend against + potential binding of print-gensym to t, and prettify (back)quotes in + case they appear in args's default values (bug#12884). + 2012-11-14 Stefan Monnier * emacs-lisp/nadvice.el: Add around advice for interactive specs. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 3c46c40242d..f83bfe00666 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -260,9 +260,11 @@ The name is made by appending a number to PREFIX, default \"G\"." (require 'help-fns) (cons (help-add-fundoc-usage (if (stringp (car hdr)) (pop hdr)) - (format "%S" - (cons 'fn - (cl--make-usage-args orig-args)))) + ;; Be careful with make-symbol and (back)quote, + ;; see bug#12884. + (let ((print-gensym nil) (print-quoted t)) + (format "%S" (cons 'fn (cl--make-usage-args + orig-args))))) hdr))) (list `(let* ,cl--bind-lets ,@(nreverse cl--bind-forms) -- 2.39.2