comparison lisp/ps-print.el @ 12768:68b1359ecd66

Renamed `fsf' to `emacs' in all names.
author Richard M. Stallman <rms@gnu.org>
date Fri, 04 Aug 1995 19:56:15 +0000
parents 4a04c7799790
children 4a905565cfa6
comparison
equal deleted inserted replaced
12767:287cc74602fa 12768:68b1359ecd66
453 (defvar ps-show-n-of-n t 453 (defvar ps-show-n-of-n t
454 "*Non-nil means show page numbers as N/M, meaning page N of M. 454 "*Non-nil means show page numbers as N/M, meaning page N of M.
455 Note: page numbers are displayed as part of headers, see variable 455 Note: page numbers are displayed as part of headers, see variable
456 `ps-print-headers'.") 456 `ps-print-headers'.")
457 457
458 (defvar ps-print-color-p (and (or (fboundp 'x-color-values) ; fsf 458 (defvar ps-print-color-p (and (or (fboundp 'x-color-values) ; Emacs
459 (fboundp 'pixel-components)) ; xemacs 459 (fboundp 'pixel-components)) ; XEmacs
460 (fboundp 'float)) 460 (fboundp 'float))
461 ; Printing color requires both floating point and x-color-values. 461 ; Printing color requires both floating point and x-color-values.
462 "*If non-nil, print the buffer's text in color.") 462 "*If non-nil, print the buffer's text in color.")
463 463
464 (defvar ps-default-fg '(0.0 0.0 0.0) 464 (defvar ps-default-fg '(0.0 0.0 0.0)
709 (if (featurep 'emacs-vers) 709 (if (featurep 'emacs-vers)
710 nil 710 nil
711 (defvar emacs-type (cond ((string-match "XEmacs" emacs-version) 'xemacs) 711 (defvar emacs-type (cond ((string-match "XEmacs" emacs-version) 'xemacs)
712 ((string-match "Lucid" emacs-version) 'lucid) 712 ((string-match "Lucid" emacs-version) 'lucid)
713 ((string-match "Epoch" emacs-version) 'epoch) 713 ((string-match "Epoch" emacs-version) 'epoch)
714 (t 'fsf)))) 714 (t 'emacs))))
715 715
716 (if (or (eq emacs-type 'lucid) 716 (if (or (eq emacs-type 'lucid)
717 (eq emacs-type 'xemacs)) 717 (eq emacs-type 'xemacs))
718 (if (< emacs-minor-version 12) 718 (if (< emacs-minor-version 12)
719 (setq ps-print-color-p nil)) 719 (setq ps-print-color-p nil))
1102 (defvar ps-current-color ps-default-color) 1102 (defvar ps-current-color ps-default-color)
1103 (defvar ps-current-bg nil) 1103 (defvar ps-current-bg nil)
1104 1104
1105 (defvar ps-razchunk 0) 1105 (defvar ps-razchunk 0)
1106 1106
1107 (defvar ps-color-format (if (eq emacs-type 'fsf) 1107 (defvar ps-color-format (if (eq emacs-type 'emacs)
1108 1108
1109 ;;Emacs understands the %f format; we'll 1109 ;;Emacs understands the %f format; we'll
1110 ;;use it to limit color RGB values to 1110 ;;use it to limit color RGB values to
1111 ;;three decimals to cut down some on the 1111 ;;three decimals to cut down some on the
1112 ;;size of the PostScript output. 1112 ;;size of the PostScript output.
1611 fg-color 1611 fg-color
1612 bg-color underline-p)) 1612 bg-color underline-p))
1613 (goto-char to))) 1613 (goto-char to)))
1614 1614
1615 1615
1616 (defun ps-fsf-face-kind-p (face kind kind-regex kind-list) 1616 (defun ps-emacs-face-kind-p (face kind kind-regex kind-list)
1617 (let ((frame-font (face-font face)) 1617 (let ((frame-font (face-font face))
1618 (face-defaults (face-font face t))) 1618 (face-defaults (face-font face t)))
1619 (or 1619 (or
1620 ;; Check FACE defaults: 1620 ;; Check FACE defaults:
1621 (and (listp face-defaults) 1621 (and (listp face-defaults)
1633 (or (and kind-spec (string-match kind-regex kind-spec)) 1633 (or (and kind-spec (string-match kind-regex kind-spec))
1634 ;; Kludge-compatible: 1634 ;; Kludge-compatible:
1635 (memq face kind-list)))) 1635 (memq face kind-list))))
1636 1636
1637 (defun ps-face-bold-p (face) 1637 (defun ps-face-bold-p (face)
1638 (if (eq emacs-type 'fsf) 1638 (if (eq emacs-type 'emacs)
1639 (ps-fsf-face-kind-p face 'bold "-\\(bold\\|demibold\\)-" 1639 (ps-emacs-face-kind-p face 'bold "-\\(bold\\|demibold\\)-"
1640 ps-bold-faces) 1640 ps-bold-faces)
1641 (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold" 1641 (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold"
1642 ps-bold-faces))) 1642 ps-bold-faces)))
1643 1643
1644 (defun ps-face-italic-p (face) 1644 (defun ps-face-italic-p (face)
1645 (if (eq emacs-type 'fsf) 1645 (if (eq emacs-type 'emacs)
1646 (ps-fsf-face-kind-p face 'italic "-[io]-" ps-italic-faces) 1646 (ps-emacs-face-kind-p face 'italic "-[io]-" ps-italic-faces)
1647 (or 1647 (or
1648 (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o" ps-italic-faces) 1648 (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o" ps-italic-faces)
1649 (ps-xemacs-face-kind-p face 'SLANT "i\\|o" ps-italic-faces)))) 1649 (ps-xemacs-face-kind-p face 'SLANT "i\\|o" ps-italic-faces))))
1650 1650
1651 (defun ps-face-underlined-p (face) 1651 (defun ps-face-underlined-p (face)
1765 'default)) 1765 'default))
1766 1766
1767 (setq from position) 1767 (setq from position)
1768 (setq a (cdr a))))) 1768 (setq a (cdr a)))))
1769 1769
1770 ((eq emacs-type 'fsf) 1770 ((eq emacs-type 'emacs)
1771 (let ((property-change from) 1771 (let ((property-change from)
1772 (overlay-change from)) 1772 (overlay-change from))
1773 (while (< from to) 1773 (while (< from to)
1774 (if (< property-change to) ; Don't search for property change 1774 (if (< property-change to) ; Don't search for property change
1775 ; unless previous search succeeded. 1775 ; unless previous search succeeded.
1922 ;; print, but I'll leave it here in hopes it might be useful: 1922 ;; print, but I'll leave it here in hopes it might be useful:
1923 1923
1924 ;; WARNING!!! The following code is *sample* code only. Don't use it 1924 ;; WARNING!!! The following code is *sample* code only. Don't use it
1925 ;; unless you understand what it does! 1925 ;; unless you understand what it does!
1926 1926
1927 (defmacro ps-prsc () (list 'if (list 'eq 'emacs-type ''fsf) [f22] ''f22)) 1927 (defmacro ps-prsc () (list 'if (list 'eq 'emacs-type ''emacs) [f22] ''f22))
1928 (defmacro ps-c-prsc () (list 'if (list 'eq 'emacs-type ''fsf) [C-f22] 1928 (defmacro ps-c-prsc () (list 'if (list 'eq 'emacs-type ''emacs) [C-f22]
1929 ''(control f22))) 1929 ''(control f22)))
1930 (defmacro ps-s-prsc () (list 'if (list 'eq 'emacs-type ''fsf) [S-f22] 1930 (defmacro ps-s-prsc () (list 'if (list 'eq 'emacs-type ''emacs) [S-f22]
1931 ''(shift f22))) 1931 ''(shift f22)))
1932 1932
1933 ;; Look in an article or mail message for the Subject: line. To be 1933 ;; Look in an article or mail message for the Subject: line. To be
1934 ;; placed in ps-left-headers. 1934 ;; placed in ps-left-headers.
1935 (defun ps-article-subject () 1935 (defun ps-article-subject ()