diff options
author | Glenn Morris <rgm@gnu.org> | 2010-12-01 20:06:52 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2010-12-01 20:06:52 -0800 |
commit | ff80efe730ad17ad32f0aaa466c2da4619d292b0 (patch) | |
tree | 038323521e502011ec149ae04b285d1d22ca4b6e /lisp/ps-print.el | |
parent | 423a637bdbb746e112c5584e259bf28c5402901d (diff) | |
download | emacs-ff80efe730ad17ad32f0aaa466c2da4619d292b0.tar.gz |
Small ps-print fixes.
* lisp/ps-print.el (ps-line-lengths-internal, ps-nb-pages):
Ensure ps-footer-font-size-internal is initialized.
Call ps-get-page-dimensions before trying to use ps-font-for-text.
Diffstat (limited to 'lisp/ps-print.el')
-rw-r--r-- | lisp/ps-print.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 69b32e5d52d..d26b3a5cc7b 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4331,14 +4331,17 @@ Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) (buf (get-buffer-create "*Line-lengths*")) (ifs ps-font-size-internal) ; initial font size - (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (print-width (progn (ps-get-page-dimensions) ps-print-width)) + (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 5) ; minimum font size cw-min ; minimum character width @@ -4378,6 +4381,9 @@ and on the current ps-print setup." (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) @@ -4387,9 +4393,9 @@ and on the current ps-print setup." (buf (get-buffer-create "*Nb-Pages*")) (ils ps-line-spacing-internal) ; initial line spacing (ifs ps-font-size-internal) ; initial font size - (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (page-height (progn (ps-get-page-dimensions) ps-print-height)) + (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 4) ; minimum font size lh-min ; minimum line height @@ -6726,5 +6732,4 @@ Finish printing job for multi-byte chars. (provide 'ps-print) -;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579 ;;; ps-print.el ends here |