From 50deba142a9f49270e43361e4b610bc67653ee3a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 3 Nov 2014 17:48:30 -0500 Subject: [PATCH] * lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Fix compiler-macro autoloading when specified as a lambda. * lisp/emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Assume that edebug-prin1-to-string already handles circularity. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/byte-run.el | 21 +++++++++++++++------ lisp/emacs-lisp/edebug.el | 4 +--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6d74f48b78..445cef9c8c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2014-11-03 Stefan Monnier + * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Assume that + edebug-prin1-to-string already handles circularity. + + * emacs-lisp/byte-run.el (defun-declarations-alist): Fix compiler-macro + autoloading when specified as a lambda. + * simple.el (execute-extended-command--last-typed): New var. (read-extended-command): Set it. Don't complete obsolete commands. diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 0edcf6197b4..97768fa7e1a 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -112,12 +112,21 @@ This may shift errors from run-time to compile-time.") If `error-free', drop calls even if `byte-compile-delete-errors' is nil.") (list 'compiler-macro #'(lambda (f args compiler-function) - `(eval-and-compile - (function-put ',f 'compiler-macro - ,(if (eq (car-safe compiler-function) 'lambda) - `(lambda ,(append (cadr compiler-function) args) - ,@(cddr compiler-function)) - `#',compiler-function))))) + (if (not (eq (car-safe compiler-function) 'lambda)) + `(eval-and-compile + (function-put ',f 'compiler-macro #',compiler-function)) + (let ((cfname (intern (concat (symbol-name f) + "--anon-compiler-macro")))) + `(progn + (eval-and-compile + (function-put ',f 'compiler-macro #',cfname)) + ;; Don't autoload the compiler-macro itself, since the + ;; macroexpander will find this file via `f's autoload, + ;; if needed. + :autoload-end + (eval-and-compile + (defun ,cfname (,@(cadr compiler-function) ,@args) + ,@(cddr compiler-function)))))))) (list 'doc-string #'(lambda (f _args pos) (list 'function-put (list 'quote f) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 785050896b8..473edb4bc61 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3373,9 +3373,7 @@ Return the result of the last expression." (print-level (or edebug-print-level print-level)) (print-circle (or edebug-print-circle print-circle)) (print-readably nil)) ; lemacs uses this. - (condition-case nil - (edebug-prin1-to-string value) - (error "#Apparently circular structure#")))) + (edebug-prin1-to-string value))) (defun edebug-compute-previous-result (previous-value) (if edebug-unwrap-results -- 2.11.4.GIT