X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/7b1019e2781472c793d0bf74e2b9ee17894270b8..410c42c57059efda8f347751bcc6876893176595:/lisp/emacs-lisp/pp.el diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index ad73134d25..2d1b8860a3 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -1,7 +1,6 @@ ;;; pp.el --- pretty printer for Emacs Lisp -;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Randal Schwartz ;; Keywords: lisp @@ -33,7 +32,7 @@ :group 'lisp) (defcustom pp-escape-newlines t - "*Value of `print-escape-newlines' used by pp-* functions." + "Value of `print-escape-newlines' used by pp-* functions." :type 'boolean :group 'pp) @@ -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