comparison lisp/utils/pretty-print.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents c7528f8e288d
children
comparison
equal deleted inserted replaced
107:523141596bda 108:360340f9fd5f
112 ;; setf. 112 ;; setf.
113 113
114 ; Change History 114 ; Change History
115 ; 115 ;
116 ; $Log: pretty-print.el,v $ 116 ; $Log: pretty-print.el,v $
117 ; Revision 1.2 1997/01/03 03:10:34 steve 117 ; Revision 1.3 1997/03/08 23:27:00 steve
118 ; Main beta 34 patches 118 ; Patches to Beta6
119 ; 119 ;
120 ; Revision 1.4 1993/03/25 14:09:52 bosch 120 ; Revision 1.4 1993/03/25 14:09:52 bosch
121 ; Commands `prettyexpand-sexp' and `prettyexpand-all-sexp' and 121 ; Commands `prettyexpand-sexp' and `prettyexpand-all-sexp' and
122 ; corresponding key bindings added. Commands pp-{function, variable} 122 ; corresponding key bindings added. Commands pp-{function, variable}
123 ; rewritten. `pp-plist' added. Function `pp-internal-loop' (for Dave 123 ; rewritten. `pp-plist' added. Function `pp-internal-loop' (for Dave
155 popper-pop-buffers))))) 155 popper-pop-buffers)))))
156 156
157 ;; User level functions 157 ;; User level functions
158 ;;;###autoload 158 ;;;###autoload
159 (defun pp-function (symbol) 159 (defun pp-function (symbol)
160 "Pretty print the function definition of SYMBOL in a seperate buffer" 160 "Pretty print the function definition of SYMBOL in a separate buffer"
161 (interactive 161 (interactive
162 (list (pp-read-symbol 'fboundp "Pretty print function definition of: "))) 162 (list (pp-read-symbol 'fboundp "Pretty print function definition of: ")))
163 (if (compiled-function-p (symbol-function symbol)) 163 (if (compiled-function-p (symbol-function symbol))
164 (if (y-or-n-p 164 (if (y-or-n-p
165 (format "Function %s is byte compiled. Disassemble? " symbol)) 165 (format "Function %s is byte compiled. Disassemble? " symbol))
167 (pp-symbol-cell symbol 'symbol-function)) 167 (pp-symbol-cell symbol 'symbol-function))
168 (pp-symbol-cell symbol 'symbol-function))) 168 (pp-symbol-cell symbol 'symbol-function)))
169 169
170 ;;;###autoload 170 ;;;###autoload
171 (defun pp-variable (symbol) 171 (defun pp-variable (symbol)
172 "Pretty print the variable value of SYMBOL in a seperate buffer" 172 "Pretty print the variable value of SYMBOL in a separate buffer"
173 (interactive 173 (interactive
174 (list (pp-read-symbol 'boundp "Pretty print variable value of: "))) 174 (list (pp-read-symbol 'boundp "Pretty print variable value of: ")))
175 (pp-symbol-cell symbol 'symbol-value)) 175 (pp-symbol-cell symbol 'symbol-value))
176 176
177 ;;;###autoload 177 ;;;###autoload
178 (defun pp-plist (symbol) 178 (defun pp-plist (symbol)
179 "Pretty print the property list of SYMBOL in a seperate buffer" 179 "Pretty print the property list of SYMBOL in a separate buffer"
180 (interactive 180 (interactive
181 (list (pp-read-symbol 'symbol-plist "Pretty print property list of: "))) 181 (list (pp-read-symbol 'symbol-plist "Pretty print property list of: ")))
182 (pp-symbol-cell symbol 'symbol-plist)) 182 (pp-symbol-cell symbol 'symbol-plist))
183 183
184 (defun pp-read-symbol (predicate prompt) 184 (defun pp-read-symbol (predicate prompt)