]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/pp.el
ert-x trivia
[gnu-emacs] / lisp / emacs-lisp / pp.el
index 55ae740bd3849d59d688d1d80a56a0abc9da1670..c795d985b7e01912de71791d69c49b1eb10db1cf 100644 (file)
@@ -1,7 +1,6 @@
 ;;; pp.el --- pretty printer for Emacs Lisp
 
-;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1993, 2001-2012 Free Software Foundation, Inc.
 
 ;; Author: Randal Schwartz <merlyn@stonehenge.com>
 ;; Keywords: lisp
@@ -42,8 +41,7 @@
   "Return a string containing the pretty-printed representation of OBJECT.
 OBJECT can be any Lisp object.  Quoting characters are used as needed
 to make output that `read' can handle, whenever this is possible."
-  (save-excursion
-    (set-buffer (generate-new-buffer " pp-to-string"))
+  (with-current-buffer (generate-new-buffer " pp-to-string")
     (unwind-protect
        (progn
          (lisp-mode-variables nil)
@@ -105,8 +103,7 @@ after OUT-BUFFER-NAME."
         (temp-buffer-show-function
          (function
           (lambda (buf)
-            (save-excursion
-              (set-buffer buf)
+            (with-current-buffer buf
               (goto-char (point-min))
               (end-of-line 1)
               (if (or (< (1+ (point)) (point-max))
@@ -204,5 +201,4 @@ Ignores leading comment characters."
 
 (provide 'pp)                          ; so (require 'pp) works
 
-;; arch-tag: b0f7c65b-02c7-42bb-9ee3-508a59b8fbb9
 ;;; pp.el ends here