emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/elp.el,v


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/elp.el,v
Date: Mon, 31 Dec 2007 23:23:40 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Nick Roberts <nickrob>  07/12/31 23:23:39

Index: elp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/elp.el,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- elp.el      9 Nov 2007 09:45:30 -0000       1.41
+++ elp.el      31 Dec 2007 23:23:39 -0000      1.42
@@ -596,11 +596,15 @@
                            symname)))))
             elp-all-instrumented-list))
           )                            ; end let*
+      ;; If printing to stdout, insert the header so it will print.
+      ;; Otherwise use header-line-format.
+      (setq elp-field-len (max titlelen longest))
+      (if (or elp-use-standard-output noninteractive)
+         (progn
       (insert title)
       (if (> longest titlelen)
          (progn
-           (insert-char 32 (- longest titlelen))
-           (setq elp-field-len longest)))
+                 (insert-char 32 (- longest titlelen))))
       (insert "  " cc-header "  " et-header "  " at-header "\n")
       (insert-char ?= elp-field-len)
       (insert "  ")
@@ -609,7 +613,22 @@
       (insert-char ?= elp-et-len)
       (insert "  ")
       (insert-char ?= elp-at-len)
-      (insert "\n")
+           (insert "\n"))
+       (let ((column 0))
+         (setq header-line-format
+               (mapconcat
+                (lambda (title)
+                  (prog1
+                      (concat
+                       (propertize " "
+                                   'display (list 'space :align-to column)
+                                   'face 'fixed-pitch)
+                       title)
+                    (setq column (+ column 1
+                                    (if (= column 0)
+                                        elp-field-len
+                                      (length title))))))
+                (list title cc-header et-header at-header) ""))))
       ;; if sorting is enabled, then sort the results list. in either
       ;; case, call elp-output-result to output the result in the
       ;; buffer
@@ -621,7 +640,8 @@
     (pop-to-buffer resultsbuf)
     ;; copy results to standard-output?
     (if (or elp-use-standard-output noninteractive)
-       (princ (buffer-substring (point-min) (point-max))))
+       (princ (buffer-substring (point-min) (point-max)))
+      (goto-char (point-min)))
     ;; reset profiling info if desired
     (and elp-reset-after-results
         (elp-reset-all))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]