]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/pp.el (pp-macroexpand-expression): Use macroexpand-1.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Nov 2014 05:46:04 +0000 (01:46 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Nov 2014 05:46:04 +0000 (01:46 -0400)
* lisp/progmodes/elisp-mode.el (emacs-lisp-macroexpand): Idem.

Fixes: debbugs:18821
lisp/ChangeLog
lisp/emacs-lisp/macroexp.el
lisp/emacs-lisp/pp.el
lisp/progmodes/elisp-mode.el

index d0256ff94b22ee5d4c7a424e9bfb15fa4d6070de..63663e878b9fa5d152e98b4bb1cb41a95815da7c 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/pp.el (pp-macroexpand-expression): Use macroexpand-1
+       (bug#18821).
+       * progmodes/elisp-mode.el (emacs-lisp-macroexpand): Idem.
+
 2014-11-01  Michael R. Mauger  <michael@mauger.com>
 
        * sql.el (sql-mode-oracle-font-lock-keywords): Correct regexp
index 3ce369fd5fdbc186f0e8da196121a90ea64ac640..a96a7af77e8f5c83c3a5560159384e71a99e9b75 100644 (file)
@@ -394,7 +394,7 @@ symbol itself."
   (or (symbolp exp) (macroexp-const-p exp)))
 
 (defun macroexp-quote (v)
-  "Returns an expression E such that `(eval E)' is V.
+  "Return an expression E such that `(eval E)' is V.
 
 E is either V or (quote V) depending on whether V evaluates to
 itself or not."
index dd012fab9daaa271e098a6fd90e224cde4144767..c18b049020ad0f18dae5ea5ee065b68c3d6e5594 100644 (file)
@@ -137,7 +137,7 @@ Also add the value to the front of the list in the variable `values'."
   "Macroexpand EXPRESSION and pretty-print its value."
   (interactive
    (list (read--expression "Macroexpand: ")))
-  (pp-display-expression (macroexpand expression) "*Pp Macroexpand Output*"))
+  (pp-display-expression (macroexpand-1 expression) "*Pp Macroexpand Output*"))
 
 (defun pp-last-sexp ()
   "Read sexp before point.  Ignores leading comment characters."
@@ -175,7 +175,7 @@ With argument, pretty-print output into current buffer.
 Ignores leading comment characters."
   (interactive "P")
   (if arg
-      (insert (pp-to-string (macroexpand (pp-last-sexp))))
+      (insert (pp-to-string (macroexpand-1 (pp-last-sexp))))
     (pp-macroexpand-expression (pp-last-sexp))))
 
 ;;; Test cases for quote
index 900e859b54a5662684d07dae06c7906af4fbf8b8..2be81a57ebe57f37208e959334b8181b096b9e4f 100644 (file)
@@ -204,7 +204,7 @@ Comments in the form will be lost."
   (let* ((start (point))
          (exp (read (current-buffer)))
          ;; Compute it before, since it may signal errors.
-         (new (macroexpand exp)))
+         (new (macroexpand-1 exp)))
     (if (equal exp new)
         (message "Not a macro call, nothing to expand")
       (delete-region start (point))