;;; cust-print.el --- handles print-level and print-circle
-;; Copyright (C) 1992 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005,
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Daniel LaLiberte <liberte@holonexus.org>
;; Adapted-By: ESR
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; Save emacs routines.
(if (not (fboundp 'cust-print-original-prin1))
- (mapcar 'cust-print-set-function-cell
- '((cust-print-original-prin1 prin1)
- (cust-print-original-princ princ)
- (cust-print-original-print print)
- (cust-print-original-prin1-to-string prin1-to-string)
- (cust-print-original-format format)
- (cust-print-original-message message)
- (cust-print-original-error error))))
+ (mapc 'cust-print-set-function-cell
+ '((cust-print-original-prin1 prin1)
+ (cust-print-original-princ princ)
+ (cust-print-original-print print)
+ (cust-print-original-prin1-to-string prin1-to-string)
+ (cust-print-original-format format)
+ (cust-print-original-message message)
+ (cust-print-original-error error))))
(defun custom-print-install ()
"Replace print functions with general, customizable, Lisp versions.
-The emacs subroutines are saved away, and you can reinstall them
+The Emacs subroutines are saved away, and you can reinstall them
by running `custom-print-uninstall'."
(interactive)
- (mapcar 'cust-print-set-function-cell
- '((prin1 custom-prin1)
- (princ custom-princ)
- (print custom-print)
- (prin1-to-string custom-prin1-to-string)
- (format custom-format)
- (message custom-message)
- (error custom-error)
- ))
+ (mapc 'cust-print-set-function-cell
+ '((prin1 custom-prin1)
+ (princ custom-princ)
+ (print custom-print)
+ (prin1-to-string custom-prin1-to-string)
+ (format custom-format)
+ (message custom-message)
+ (error custom-error)
+ ))
t)
(defun custom-print-uninstall ()
- "Reset print functions to their emacs subroutines."
+ "Reset print functions to their Emacs subroutines."
(interactive)
- (mapcar 'cust-print-set-function-cell
- '((prin1 cust-print-original-prin1)
- (princ cust-print-original-princ)
- (print cust-print-original-print)
- (prin1-to-string cust-print-original-prin1-to-string)
- (format cust-print-original-format)
- (message cust-print-original-message)
- (error cust-print-original-error)
- ))
+ (mapc 'cust-print-set-function-cell
+ '((prin1 cust-print-original-prin1)
+ (princ cust-print-original-princ)
+ (print cust-print-original-print)
+ (prin1-to-string cust-print-original-prin1-to-string)
+ (format cust-print-original-format)
+ (message cust-print-original-message)
+ (error cust-print-original-error)
+ ))
t)
(defalias 'custom-print-funcs-installed-p 'custom-print-installed-p)
the argument used by %d, %b, %o, %x or %c must be a number.
This is the custom-print replacement for the standard `format'. It
-calls the emacs `format' after first making strings for list,
+calls the Emacs `format' after first making strings for list,
vector, or symbol args. The format specification for such args should
be `%s' in any case, so a string argument will also work. The string
is generated with `custom-prin1-to-string', which quotes quotable