X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/4787a496a05fdc03241850b45911dd283d4b06b8..cf38dd429888fc992408716922ecab1c39242944:/lisp/emacs-lisp/trace.el diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index 3f0a4d0f6e..194afe1081 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -1,7 +1,7 @@ ;;; trace.el --- tracing facility for Emacs Lisp functions ;; Copyright (C) 1993, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Hans Chalupsky ;; Maintainer: FSF @@ -160,8 +160,8 @@ :group 'lisp) ;;;###autoload -(defcustom trace-buffer "*trace-output*" - "*Trace output will by default go to that buffer." +(defcustom trace-buffer (purecopy "*trace-output*") + "Trace output will by default go to that buffer." :type 'string :group 'trace) @@ -185,15 +185,16 @@ (if (> level 1) " " "") level function - (mapconcat (lambda (binding) - (concat - (symbol-name (ad-arg-binding-field binding 'name)) - "=" - ;; do this so we'll see strings: - (prin1-to-string - (ad-arg-binding-field binding 'value)))) - argument-bindings - " "))) + (let ((print-circle t)) + (mapconcat (lambda (binding) + (concat + (symbol-name (ad-arg-binding-field binding 'name)) + "=" + ;; do this so we'll see strings: + (prin1-to-string + (ad-arg-binding-field binding 'value)))) + argument-bindings + " ")))) (defun trace-exit-message (function level value) ;; Generates a string that describes that FUNCTION has been exited at @@ -204,7 +205,7 @@ level function ;; do this so we'll see strings: - (prin1-to-string value))) + (let ((print-circle t)) (prin1-to-string value)))) (defun trace-make-advice (function buffer background) ;; Builds the piece of advice to be added to FUNCTION's advice info @@ -218,7 +219,8 @@ (trace-buffer (get-buffer-create ,buffer))) (unless inhibit-trace (with-current-buffer trace-buffer - ,(unless background '(display-buffer trace-buffer)) + (set (make-local-variable 'window-point-insertion-type) t) + ,(unless background '(display-buffer trace-buffer)) (goto-char (point-max)) ;; Insert a separator from previous trace output: (if (= trace-level 1) (insert trace-separator)) @@ -251,7 +253,7 @@ For every call of FUNCTION Lisp-style trace messages that display argument and return values will be inserted into BUFFER. This function generates the trace advice for FUNCTION and activates it together with any other advice -there might be!! The trace BUFFER will popup whenever FUNCTION is called. +there might be!! The trace BUFFER will popup whenever FUNCTION is called. Do not use this to trace functions that switch buffers or do any other display oriented stuff, use `trace-function-background' instead." (interactive