# HG changeset patch # User Vinicius Jose Latorre # Date 1078959405 0 # Node ID 8f69fa8038cb708b26010fcb013857c3636f702c # Parent 4f710303bf0718eabc6f06ff673af218a8fcf62f Modification to print *Messages* buffer. diff -r 4f710303bf07 -r 8f69fa8038cb lisp/ChangeLog --- a/lisp/ChangeLog Wed Mar 10 21:40:58 2004 +0000 +++ b/lisp/ChangeLog Wed Mar 10 22:56:45 2004 +0000 @@ -1,3 +1,11 @@ +2004-03-10 Vinicius Jose Latorre + + * ps-print.el: Modification to print *Messages* buffer. + (ps-print-version): New version 6.6.4. + (ps-message-log-max): New fun. + (ps-spool-without-faces, ps-spool-with-faces) + (ps-count-lines-preprint): Code fix. + 2004-03-09 Vinicius Jose Latorre * delim-col.el: Doc fix. diff -r 4f710303bf07 -r 8f69fa8038cb lisp/ps-print.el --- a/lisp/ps-print.el Wed Mar 10 21:40:58 2004 +0000 +++ b/lisp/ps-print.el Wed Mar 10 22:56:45 2004 +0000 @@ -10,12 +10,12 @@ ;; Maintainer: Kenichi Handa (multi-byte characters) ;; Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Time-stamp: <2004/02/29 00:07:55 vinicius> -;; Version: 6.6.3 +;; Time-stamp: <2004/03/10 18:57:00 vinicius> +;; Version: 6.6.4 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ -(defconst ps-print-version "6.6.3" - "ps-print.el, v 6.6.3 <2004/02/29 vinicius> +(defconst ps-print-version "6.6.4" + "ps-print.el, v 6.6.4 <2004/03/10 vinicius> Vinicius's last change version -- this file may have been edited as part of Emacs without changes to the version number. When reporting bugs, please also @@ -4141,6 +4141,11 @@ ;; Internal functions and variables +(defun ps-message-log-max () + (and (not (string= (buffer-name) "*Messages*")) + message-log-max)) + + (defvar ps-print-hook nil) (defvar ps-print-begin-sheet-hook nil) (defvar ps-print-begin-page-hook nil) @@ -4153,9 +4158,10 @@ (defun ps-spool-without-faces (from to &optional region-p) - (run-hooks 'ps-print-hook) - (ps-printing-region region-p from to) - (ps-generate (current-buffer) from to 'ps-generate-postscript)) + (let ((message-log-max (ps-message-log-max))) ; to print *Messages* buffer + (run-hooks 'ps-print-hook) + (ps-printing-region region-p from to) + (ps-generate (current-buffer) from to 'ps-generate-postscript))) (defun ps-print-with-faces (from to &optional filename region-p) @@ -4164,15 +4170,17 @@ (defun ps-spool-with-faces (from to &optional region-p) - (run-hooks 'ps-print-hook) - (ps-printing-region region-p from to) - (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces)) + (let ((message-log-max (ps-message-log-max))) ; to print *Messages* buffer + (run-hooks 'ps-print-hook) + (ps-printing-region region-p from to) + (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces))) (defun ps-count-lines-preprint (from to) - (or (and from to) - (error "The mark is not set now")) - (list (count-lines from to))) + (or (and from to) + (error "The mark is not set now")) + (let ((message-log-max (ps-message-log-max))) ; to count lines of *Messages* + (list (count-lines from to)))) (defun ps-count-lines (from to)