diff options
| author | Richard M. Stallman | 1995-01-20 06:20:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-01-20 06:20:32 +0000 |
| commit | 86c10ecbb6dbbdcd594c3e92b4336c3863ee7706 (patch) | |
| tree | 6b8d31ccf0f21bc8afc74dbc39fbef40e1629d16 | |
| parent | 12d89a2e57a3775b5322252cd0f43fa708c562ee (diff) | |
| download | emacs-86c10ecbb6dbbdcd594c3e92b4336c3863ee7706.tar.gz emacs-86c10ecbb6dbbdcd594c3e92b4336c3863ee7706.zip | |
entered into RCS
| -rw-r--r-- | lisp/ps-print.el | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 1aa9f0b28ae..b854b377bbd 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -3,10 +3,10 @@ | |||
| 3 | ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jim Thompson <thompson@wg2.waii.com> | 5 | ;; Author: Jim Thompson <thompson@wg2.waii.com> |
| 6 | ;; Version: 1.10 | 6 | ;; Version: Jim's last version is 1.10 |
| 7 | ;; Keywords: print, PostScript | 7 | ;; Keywords: print, PostScript |
| 8 | 8 | ||
| 9 | ;; This file is not yet part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
| 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 12 | ;; it under the terms of the GNU General Public License as published by | 12 | ;; it under the terms of the GNU General Public License as published by |
| @@ -22,11 +22,6 @@ | |||
| 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | 24 | ||
| 25 | ;; LCD Archive Entry: | ||
| 26 | ;; ps-print|James C. Thompson|thompson@wg2.waii.com| | ||
| 27 | ;; Jim's Pretty-Good PostScript Generator for Emacs 19 (ps-print)| | ||
| 28 | ;; 26-Feb-1994|1.6|~/packages/ps-print.el| | ||
| 29 | |||
| 30 | ;;; Commentary: | 25 | ;;; Commentary: |
| 31 | 26 | ||
| 32 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 27 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -418,16 +413,17 @@ the left on even-numbered pages.") | |||
| 418 | 'ps-letter, 'ps-legal, or 'ps-a4.") | 413 | 'ps-letter, 'ps-legal, or 'ps-a4.") |
| 419 | 414 | ||
| 420 | (defvar ps-print-header t | 415 | (defvar ps-print-header t |
| 421 | "*Non-nil means print a header at the top of each page. By default, | 416 | "*Non-nil means print a header at the top of each page. |
| 422 | the header displays the buffer name, page number, and, if the buffer | 417 | By default, the header displays the buffer name, page number, and, if |
| 423 | is visiting a file, the file's directory. Headers are customizable by | 418 | the buffer is visiting a file, the file's directory. Headers are |
| 424 | changing variables `ps-header-left' and `ps-header-right'.") | 419 | customizable by changing variables `ps-header-left' and |
| 420 | `ps-header-right'.") | ||
| 425 | 421 | ||
| 426 | (defvar ps-print-header-frame t | 422 | (defvar ps-print-header-frame t |
| 427 | "*Non-nil means draw a gaudy frame around the header.") | 423 | "*Non-nil means draw a gaudy frame around the header.") |
| 428 | 424 | ||
| 429 | (defvar ps-show-n-of-n t | 425 | (defvar ps-show-n-of-n t |
| 430 | "*Non-nil means show page numbers as \"n/m\", meaning page n of m. | 426 | "*Non-nil means show page numbers as `N/M', meaning page N of M. |
| 431 | Note: page numbers are displayed as part of headers, see variable `ps- | 427 | Note: page numbers are displayed as part of headers, see variable `ps- |
| 432 | print-headers'.") | 428 | print-headers'.") |
| 433 | 429 | ||
| @@ -443,62 +439,66 @@ print-headers'.") | |||
| 443 | "*RGB values of the default background color. Defaults to white.") | 439 | "*RGB values of the default background color. Defaults to white.") |
| 444 | 440 | ||
| 445 | (defvar ps-font-size 10 | 441 | (defvar ps-font-size 10 |
| 446 | "*Specifies the size, in points, of the font to print text in.") | 442 | "*Font size, in points, for generating Postscript.") |
| 447 | 443 | ||
| 448 | (defvar ps-font "Courier" | 444 | (defvar ps-font "Courier" |
| 449 | "*Specifies the name of the font family to print text in.") | 445 | "*Font family name for ordinary text, when generating Postscript.") |
| 450 | 446 | ||
| 451 | (defvar ps-font-bold "Courier-Bold" | 447 | (defvar ps-font-bold "Courier-Bold" |
| 452 | "*Specifies the name of the font family to print bold text in.") | 448 | "*Font family name for bold text, when generating Postscript.") |
| 453 | 449 | ||
| 454 | (defvar ps-font-italic "Courier-Oblique" | 450 | (defvar ps-font-italic "Courier-Oblique" |
| 455 | "*Specifies the name of the font family to print italic text in.") | 451 | "*Font family name for italic text, when generating Postscript.") |
| 456 | 452 | ||
| 457 | (defvar ps-font-bold-italic "Courier-BoldOblique" | 453 | (defvar ps-font-bold-italic "Courier-BoldOblique" |
| 458 | "*Specifies the name of the font family to print bold-italic text in.") | 454 | "*Font family name for bold italic text, when generating Postscript.") |
| 459 | 455 | ||
| 460 | (defvar ps-avg-char-width (if (fboundp 'float) 5.6 6) | 456 | (defvar ps-avg-char-width (if (fboundp 'float) 5.6 6) |
| 461 | "*Specifies the average width, in points, of a character. This is the | 457 | "*The average width, in points, of a character, for generating Postscript. |
| 462 | value that ps-print uses to determine the length, x-dimension, of the | 458 | This is the value that ps-print uses to determine the length, |
| 463 | text it has printed, and thus affects the point at which long lines | 459 | x-dimension, of the text it has printed, and thus affects the point at |
| 464 | wrap around. Note that if you change the font or font size, you will | 460 | which long lines wrap around. If you change the font or |
| 465 | probably have to adjust this value to match.") | 461 | font size, you will probably have to adjust this value to match.") |
| 466 | 462 | ||
| 467 | (defvar ps-space-width (if (fboundp 'float) 5.6 6) | 463 | (defvar ps-space-width (if (fboundp 'float) 5.6 6) |
| 468 | "*Specifies the width of a space character. This value is used in | 464 | "*The width of a space character, for generating Postscript. |
| 469 | expanding tab characters.") | 465 | This value is used in expanding tab characters.") |
| 470 | 466 | ||
| 471 | (defvar ps-line-height (if (fboundp 'float) 11.29 11) | 467 | (defvar ps-line-height (if (fboundp 'float) 11.29 11) |
| 472 | "*Specifies the height of a line. This is the value that ps-print | 468 | "*The height of a line, for generating Postscript. |
| 473 | uses to determine the height, y-dimension, of the lines of text it has | 469 | This is the value that ps-print uses to determine the height, |
| 474 | printed, and thus affects the point at which page-breaks are placed. | 470 | y-dimension, of the lines of text it has printed, and thus affects the |
| 475 | Note that if you change the font or font size, you will probably have | 471 | point at which page-breaks are placed. If you change the font or font |
| 476 | to adjust this value to match. Note also that the line-height is | 472 | size, you will probably have to adjust this value to match. The |
| 477 | *not* the same as the point size of the font.") | 473 | line-height is *not* the same as the point size of the font.") |
| 478 | 474 | ||
| 479 | (defvar ps-auto-font-detect t | 475 | (defvar ps-auto-font-detect t |
| 480 | "*Non-nil means automatically detect bold/italic face attributes. | 476 | "*Non-nil means automatically detect bold/italic face attributes. |
| 481 | Nil means rely solely on the lists `ps-bold-faces', `ps-italic-faces', | 477 | nil means rely solely on the lists `ps-bold-faces', `ps-italic-faces', |
| 482 | and `ps-underlined-faces'.") | 478 | and `ps-underlined-faces'.") |
| 483 | 479 | ||
| 484 | (defvar ps-bold-faces '() | 480 | (defvar ps-bold-faces '() |
| 485 | "*A list of the \(non-bold\) faces that should be printed in bold font.") | 481 | "*A list of the \(non-bold\) faces that should be printed in bold font. |
| 482 | This applies to generating Postscript.") | ||
| 486 | 483 | ||
| 487 | (defvar ps-italic-faces '() | 484 | (defvar ps-italic-faces '() |
| 488 | "*A list of the \(non-italic\) faces that should be printed in italic font.") | 485 | "*A list of the \(non-italic\) faces that should be printed in italic font. |
| 486 | This applies to generating Postscript.") | ||
| 489 | 487 | ||
| 490 | (defvar ps-underlined-faces '() | 488 | (defvar ps-underlined-faces '() |
| 491 | "*A list of the \(non-underlined\) faces that should be printed underlined.") | 489 | "*A list of the \(non-underlined\) faces that should be printed underlined. |
| 490 | This applies to generating Postscript.") | ||
| 492 | 491 | ||
| 493 | (defvar ps-header-lines 2 | 492 | (defvar ps-header-lines 2 |
| 494 | "*The number of lines to display in the page header.") | 493 | "*Number of lines to display in page header, when generating Postscript.") |
| 495 | (make-variable-buffer-local 'ps-header-lines) | 494 | (make-variable-buffer-local 'ps-header-lines) |
| 496 | 495 | ||
| 497 | (defvar ps-left-header | 496 | (defvar ps-left-header |
| 498 | (list 'ps-get-buffer-name 'ps-header-dirpart) | 497 | (list 'ps-get-buffer-name 'ps-header-dirpart) |
| 499 | "*The items to display on the right part of the page header. | 498 | "*The items to display on the right part of the page header. |
| 499 | This applies to generating Postscript. | ||
| 500 | 500 | ||
| 501 | Should contain a list of strings and symbols, each representing an | 501 | The value should be a list of strings and symbols, each representing an |
| 502 | entry in the PostScript array HeaderLinesLeft. | 502 | entry in the PostScript array HeaderLinesLeft. |
| 503 | 503 | ||
| 504 | Strings are inserted unchanged into the array; those representing | 504 | Strings are inserted unchanged into the array; those representing |
| @@ -515,8 +515,9 @@ string delimiters added to it.") | |||
| 515 | (defvar ps-right-header | 515 | (defvar ps-right-header |
| 516 | (list "/pagenumberstring load" 'time-stamp-yy/mm/dd 'time-stamp-hh:mm:ss) | 516 | (list "/pagenumberstring load" 'time-stamp-yy/mm/dd 'time-stamp-hh:mm:ss) |
| 517 | "*The items to display on the left part of the page header. | 517 | "*The items to display on the left part of the page header. |
| 518 | This applies to generating Postscript. | ||
| 518 | 519 | ||
| 519 | See the variable ps-left-header for a description of the format of | 520 | See the variable `ps-left-header' for a description of the format of |
| 520 | this variable.") | 521 | this variable.") |
| 521 | (make-variable-buffer-local 'ps-right-header) | 522 | (make-variable-buffer-local 'ps-right-header) |
| 522 | 523 | ||
| @@ -534,7 +535,7 @@ printers require slightly different versions of this line.") | |||
| 534 | Ps-print sets this value to nil after it builds its internal reference | 535 | Ps-print sets this value to nil after it builds its internal reference |
| 535 | lists of bold and italic faces. By settings its value back to t, you | 536 | lists of bold and italic faces. By settings its value back to t, you |
| 536 | can force ps-print to rebuild the lists the next time you invoke one | 537 | can force ps-print to rebuild the lists the next time you invoke one |
| 537 | of the -with-faces commands. | 538 | of the ...-with-faces commands. |
| 538 | 539 | ||
| 539 | You should set this value back to t after you change the attributes of | 540 | You should set this value back to t after you change the attributes of |
| 540 | any face, or create new faces. Most users shouldn't have to worry | 541 | any face, or create new faces. Most users shouldn't have to worry |
| @@ -554,7 +555,7 @@ variable.") | |||
| 554 | (defun ps-print-buffer (&optional filename) | 555 | (defun ps-print-buffer (&optional filename) |
| 555 | "Generate and print a PostScript image of the buffer. | 556 | "Generate and print a PostScript image of the buffer. |
| 556 | 557 | ||
| 557 | When called with a numeric prefix argument (C-u), prompt the user for | 558 | When called with a numeric prefix argument (C-u), prompts the user for |
| 558 | the name of a file to save the PostScript image in, instead of sending | 559 | the name of a file to save the PostScript image in, instead of sending |
| 559 | it to the printer. | 560 | it to the printer. |
| 560 | 561 | ||