emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/ps-print.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/ps-print.el [emacs-unicode-2]
Date: Wed, 08 Dec 2004 01:56:33 -0500

Index: emacs/lisp/ps-print.el
diff -c emacs/lisp/ps-print.el:1.137.2.5 emacs/lisp/ps-print.el:1.137.2.6
*** emacs/lisp/ps-print.el:1.137.2.5    Wed Jul 28 07:05:50 2004
--- emacs/lisp/ps-print.el      Wed Dec  8 05:02:15 2004
***************
*** 1443,1557 ****
  
  ;;; Code:
  
- (eval-and-compile
-   (require 'lpr)
  
!   (or (featurep 'lisp-float-type)
!       (error "`ps-print' requires floating point support"))
  
  
-   (defvar ps-print-emacs-type
-     (let ((case-fold-search t))
-       (cond ((string-match "XEmacs" emacs-version) 'xemacs)
-           ((string-match "Lucid" emacs-version)
-            (error "`ps-print' doesn't support Lucid"))
-           ((string-match "Epoch" emacs-version)
-            (error "`ps-print' doesn't support Epoch"))
-           (t
-            (unless (and (boundp 'emacs-major-version)
-                         (> emacs-major-version 19))
-              (error "`ps-print' only supports Emacs 20 and higher"))
-            'emacs))))
  
  
-   ;; For Emacs 20.2 and the earlier version.
  
!   (or (fboundp 'set-buffer-multibyte)
!       (defun set-buffer-multibyte (arg)
!       (setq enable-multibyte-characters arg)))
  
!   (or (fboundp 'string-as-unibyte)
!       (defun string-as-unibyte (arg) arg))
  
!   (or (fboundp 'string-as-multibyte)
!       (defun string-as-multibyte (arg) arg))
  
!   (or (fboundp 'char-charset)
!       (defun char-charset (arg) 'ascii))
  
!   (or (fboundp 'charset-after)
!       (defun charset-after (&optional arg)
!       (char-charset (char-after arg))))
  
  
!   ;; GNU Emacs
!   (or (fboundp 'line-beginning-position)
!       (defun line-beginning-position (&optional n)
!       (save-excursion
!         (and n (/= n 1) (forward-line (1- n)))
!         (beginning-of-line)
!         (point))))
! 
! 
!   ;; to avoid compilation gripes
! 
!   ;; XEmacs
!   (defalias 'ps-x-color-instance-p              'color-instance-p)
!   (defalias 'ps-x-color-instance-rgb-components 
'color-instance-rgb-components)
!   (defalias 'ps-x-color-name                    'color-name)
!   (defalias 'ps-x-color-specifier-p             'color-specifier-p)
!   (defalias 'ps-x-copy-coding-system            'copy-coding-system)
!   (defalias 'ps-x-device-class                  'device-class)
!   (defalias 'ps-x-extent-end-position           'extent-end-position)
!   (defalias 'ps-x-extent-face                   'extent-face)
!   (defalias 'ps-x-extent-priority               'extent-priority)
!   (defalias 'ps-x-extent-start-position         'extent-start-position)
!   (defalias 'ps-x-face-font-instance            'face-font-instance)
!   (defalias 'ps-x-find-coding-system            'find-coding-system)
!   (defalias 'ps-x-font-instance-properties      'font-instance-properties)
!   (defalias 'ps-x-make-color-instance           'make-color-instance)
!   (defalias 'ps-x-map-extents                   'map-extents)
! 
!   ;; GNU Emacs
!   (defalias 'ps-e-face-bold-p         'face-bold-p)
!   (defalias 'ps-e-face-italic-p       'face-italic-p)
!   (defalias 'ps-e-next-overlay-change 'next-overlay-change)
!   (defalias 'ps-e-overlays-at         'overlays-at)
!   (defalias 'ps-e-overlay-get         'overlay-get)
!   (defalias 'ps-e-overlay-end         'overlay-end)
!   (defalias 'ps-e-x-color-values      'x-color-values)
!   (defalias 'ps-e-color-values        'color-values)
!   (if (fboundp 'find-composition)
!       (defalias 'ps-e-find-composition 'find-composition)
!     (defalias 'ps-e-find-composition 'ignore))
! 
! 
!   (defconst ps-windows-system
!     (memq system-type '(emx win32 w32 mswindows ms-dos windows-nt)))
!   (defconst ps-lp-system
!     (memq system-type '(usg-unix-v dgux hpux irix)))
! 
! 
!   (defun ps-xemacs-color-name (color)
!     (if (ps-x-color-specifier-p color)
!       (ps-x-color-name color)
!       color))
! 
! 
!   (cond ((eq ps-print-emacs-type 'emacs) ; emacs
!        (defvar mark-active nil)
!        (defun ps-mark-active-p ()
!          mark-active)
!        (defalias 'ps-face-foreground-name 'face-foreground)
!        (defalias 'ps-face-background-name 'face-background)
!        )
!       (t                              ; xemacs
!        (defalias 'ps-mark-active-p 'region-active-p)
!        (defun ps-face-foreground-name (face)
!          (ps-xemacs-color-name (face-foreground face)))
!        (defun ps-face-background-name (face)
!          (ps-xemacs-color-name (face-background face)))
!        )))
  
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- 1443,1557 ----
  
  ;;; Code:
  
  
! (require 'lpr)
  
+ (or (featurep 'lisp-float-type)
+     (error "`ps-print' requires floating point support"))
  
  
+ (defvar ps-print-emacs-type
+   (let ((case-fold-search t))
+     (cond ((string-match "XEmacs" emacs-version) 'xemacs)
+         ((string-match "Lucid" emacs-version)
+          (error "`ps-print' doesn't support Lucid"))
+         ((string-match "Epoch" emacs-version)
+          (error "`ps-print' doesn't support Epoch"))
+         (t
+          (unless (and (boundp 'emacs-major-version)
+                       (> emacs-major-version 19))
+            (error "`ps-print' only supports Emacs 20 and higher"))
+          'emacs))))
  
  
! ;; For Emacs 20.2 and the earlier version.
  
! (or (fboundp 'set-buffer-multibyte)
!     (defun set-buffer-multibyte (arg)
!       (setq enable-multibyte-characters arg)))
  
! (or (fboundp 'string-as-unibyte)
!     (defun string-as-unibyte (arg) arg))
  
! (or (fboundp 'string-as-multibyte)
!     (defun string-as-multibyte (arg) arg))
  
! (or (fboundp 'char-charset)
!     (defun char-charset (arg) 'ascii))
  
+ (or (fboundp 'charset-after)
+     (defun charset-after (&optional arg)
+       (char-charset (char-after arg))))
  
! 
! ;; GNU Emacs
! (or (fboundp 'line-beginning-position)
!     (defun line-beginning-position (&optional n)
!       (save-excursion
!       (and n (/= n 1) (forward-line (1- n)))
!       (beginning-of-line)
!       (point))))
! 
! 
! ;; to avoid compilation gripes
! 
! ;; XEmacs
! (defalias 'ps-x-color-instance-p              'color-instance-p)
! (defalias 'ps-x-color-instance-rgb-components 'color-instance-rgb-components)
! (defalias 'ps-x-color-name                    'color-name)
! (defalias 'ps-x-color-specifier-p             'color-specifier-p)
! (defalias 'ps-x-copy-coding-system            'copy-coding-system)
! (defalias 'ps-x-device-class                  'device-class)
! (defalias 'ps-x-extent-end-position           'extent-end-position)
! (defalias 'ps-x-extent-face                   'extent-face)
! (defalias 'ps-x-extent-priority               'extent-priority)
! (defalias 'ps-x-extent-start-position         'extent-start-position)
! (defalias 'ps-x-face-font-instance            'face-font-instance)
! (defalias 'ps-x-find-coding-system            'find-coding-system)
! (defalias 'ps-x-font-instance-properties      'font-instance-properties)
! (defalias 'ps-x-make-color-instance           'make-color-instance)
! (defalias 'ps-x-map-extents                   'map-extents)
! 
! ;; GNU Emacs
! (defalias 'ps-e-face-bold-p         'face-bold-p)
! (defalias 'ps-e-face-italic-p       'face-italic-p)
! (defalias 'ps-e-next-overlay-change 'next-overlay-change)
! (defalias 'ps-e-overlays-at         'overlays-at)
! (defalias 'ps-e-overlay-get         'overlay-get)
! (defalias 'ps-e-overlay-end         'overlay-end)
! (defalias 'ps-e-x-color-values      'x-color-values)
! (defalias 'ps-e-color-values        'color-values)
! (if (fboundp 'find-composition)
!     (defalias 'ps-e-find-composition 'find-composition)
!   (defalias 'ps-e-find-composition 'ignore))
! 
! 
! (defconst ps-windows-system
!   (memq system-type '(emx win32 w32 mswindows ms-dos windows-nt)))
! (defconst ps-lp-system
!   (memq system-type '(usg-unix-v dgux hpux irix)))
! 
! 
! (defun ps-xemacs-color-name (color)
!   (if (ps-x-color-specifier-p color)
!       (ps-x-color-name color)
!     color))
! 
! 
! (cond ((featurep 'xemacs)             ; xemacs
!        (defalias 'ps-mark-active-p 'region-active-p)
!        (defun ps-face-foreground-name (face)
!        (ps-xemacs-color-name (face-foreground face)))
!        (defun ps-face-background-name (face)
!        (ps-xemacs-color-name (face-background face)))
!        )
!       (t                              ; emacs
!        (defvar mark-active nil)
!        (defun ps-mark-active-p ()
!        mark-active)
!        (defalias 'ps-face-foreground-name 'face-foreground)
!        (defalias 'ps-face-background-name 'face-background)
!        ))
  
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
***************
*** 1563,1574 ****
--- 1563,1576 ----
  (defgroup postscript nil
    "PostScript Group"
    :tag "PostScript"
+   :version "20"
    :group 'emacs)
  
  (defgroup ps-print nil
    "PostScript generator for Emacs"
    :link '(emacs-library-link :tag "Source Lisp File" "ps-print.el")
    :prefix "ps-"
+   :version "20"
    :group 'wp
    :group 'postscript)
  
***************
*** 1576,1611 ****
--- 1578,1619 ----
    "Horizontal page layout"
    :prefix "ps-"
    :tag "Horizontal"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-vertical nil
    "Vertical page layout"
    :prefix "ps-"
    :tag "Vertical"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-headers nil
    "Headers & footers layout"
    :prefix "ps-"
    :tag "Header & Footer"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-font nil
    "Fonts customization"
    :prefix "ps-"
    :tag "Font"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-color nil
    "Color customization"
    :prefix "ps-"
    :tag "Color"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-face nil
    "Faces customization"
    :prefix "ps-"
    :tag "PS Faces"
+   :version "20"
    :group 'ps-print
    :group 'faces)
  
***************
*** 1613,1648 ****
--- 1621,1662 ----
    "N-up customization"
    :prefix "ps-"
    :tag "N-Up"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-zebra nil
    "Zebra customization"
    :prefix "ps-"
    :tag "Zebra"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-background nil
    "Background customization"
    :prefix "ps-"
    :tag "Background"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-printer '((lpr custom-group))
    "Printer customization"
    :prefix "ps-"
    :tag "Printer"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-page nil
    "Page customization"
    :prefix "ps-"
    :tag "Page"
+   :version "20"
    :group 'ps-print)
  
  (defgroup ps-print-miscellany nil
    "Miscellany customization"
    :prefix "ps-"
    :tag "Miscellany"
+   :version "20"
    :group 'ps-print)
  
  
***************
*** 1669,1674 ****
--- 1683,1689 ----
                 :tag "Error Handler Message"
                 (const none)   (const paper)
                 (const system) (const paper-and-system))
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-user-defined-prologue nil
***************
*** 1700,1705 ****
--- 1715,1721 ----
    :type '(choice :menu-tag "User Defined Prologue"
                 :tag "User Defined Prologue"
                 (const :tag "none" nil) string symbol)
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-print-prologue-header nil
***************
*** 1729,1734 ****
--- 1745,1751 ----
    :type '(choice :menu-tag "Prologue Header"
                 :tag "Prologue Header"
                 (const :tag "none" nil) string symbol)
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-printer-name (and (boundp 'printer-name)
***************
*** 1760,1765 ****
--- 1777,1783 ----
                 (const :tag "No Printer Name" t)
                 (file :tag "Print to file")
                 (string :tag "Pipe to ps-lpr-command"))
+   :version "20"
    :group 'ps-print-printer)
  
  (defcustom ps-printer-name-option
***************
*** 1803,1808 ****
--- 1821,1827 ----
  the destination for output; any other program is treated like `lpr' except 
that
  an explicit filename is given as the last argument."
    :type 'string
+   :version "20"
    :group 'ps-print-printer)
  
  (defcustom ps-lpr-switches lpr-switches
***************
*** 1811,1816 ****
--- 1830,1836 ----
                 (choice :menu-tag "PostScript lpr Switch"
                         :tag "PostScript lpr Switch"
                         string symbol (repeat sexp)))
+   :version "20"
    :group 'ps-print-printer)
  
  (defcustom ps-print-region-function nil
***************
*** 1818,1823 ****
--- 1838,1844 ----
  See definition of `call-process-region' for calling conventions.  The fourth
  and the sixth arguments are both nil."
    :type '(choice (const nil) function)
+   :version "20"
    :group 'ps-print-printer)
  
  (defcustom ps-manual-feed nil
***************
*** 1825,1836 ****
--- 1846,1859 ----
  
  If it's nil, automatic feeding takes place."
    :type 'boolean
+   :version "20"
    :group 'ps-print-printer)
  
  (defcustom ps-end-with-control-d (and ps-windows-system t)
    "*Non-nil means insert C-d at end of PostScript file generated."
    :version "21.1"
    :type 'boolean
+   :version "20"
    :group 'ps-print-printer)
  
  ;;; Page layout
***************
*** 1874,1879 ****
--- 1897,1903 ----
                       (number :tag "Width")
                       (number :tag "Height")
                       (string :tag "Media")))
+   :version "20"
    :group 'ps-print-page)
  
  ;;;###autoload
***************
*** 1887,1892 ****
--- 1911,1917 ----
                                 nil
                               (widget-put wid :error "Unknown paper size")
                               wid)))
+   :version "20"
    :group 'ps-print-page)
  
  (defcustom ps-warn-paper-type t
***************
*** 1894,1904 ****
--- 1919,1931 ----
  
  It's used when `ps-spool-config' is set to `setpagedevice'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-page)
  
  (defcustom ps-landscape-mode nil
    "*Non-nil means print in landscape mode."
    :type 'boolean
+   :version "20"
    :group 'ps-print-page)
  
  (defcustom ps-print-upside-down nil
***************
*** 1931,1936 ****
--- 1958,1964 ----
                        (cons :tag "Range"
                              (integer :tag "From")
                              (integer :tag "To"))))
+   :version "20"
    :group 'ps-print-page)
  
  (defcustom ps-even-or-odd-pages nil
***************
*** 1989,1994 ****
--- 2017,2023 ----
                 (const :tag "Only Odd Pages" odd-page)
                 (const :tag "Only Even Sheets" even-sheet)
                 (const :tag "Only Odd Sheets" odd-sheet))
+   :version "20"
    :group 'ps-print-page)
  
  (defcustom ps-print-control-characters 'control-8-bit
***************
*** 2020,2025 ****
--- 2049,2055 ----
                 :tag "Control Char"
                 (const 8-bit)   (const control-8-bit)
                 (const control) (const :tag "nil" nil))
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-n-up-printing 1
***************
*** 2035,2050 ****
--- 2065,2083 ----
               wid :error
               "Number of pages per sheet paper must be between 1 and 100.")
              wid)))
+   :version "20"
    :group 'ps-print-n-up)
  
  (defcustom ps-n-up-margin (/ (* 72  1.0) 2.54) ; 1 cm
    "*Specify the margin in points between the sheet border and n-up printing."
    :type 'number
+   :version "20"
    :group 'ps-print-n-up)
  
  (defcustom ps-n-up-border-p t
    "*Non-nil means a border is drawn around each page."
    :type 'boolean
+   :version "20"
    :group 'ps-print-n-up)
  
  (defcustom ps-n-up-filling 'left-top
***************
*** 2076,2098 ****
--- 2109,2135 ----
                 (const right-top) (const right-bottom)
                 (const top-left)  (const bottom-left)
                 (const top-right) (const bottom-right))
+   :version "20"
    :group 'ps-print-n-up)
  
  (defcustom ps-number-of-columns (if ps-landscape-mode 2 1)
    "*Specify the number of columns."
    :type 'number
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-zebra-stripes nil
    "*Non-nil means print zebra stripes.
  See also documentation for `ps-zebra-stripe-height' and `ps-zebra-color'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-zebra)
  
  (defcustom ps-zebra-stripe-height 3
    "*Number of zebra stripe lines.
  See also documentation for `ps-zebra-stripes' and `ps-zebra-color'."
    :type 'number
+   :version "20"
    :group 'ps-print-zebra)
  
  (defcustom ps-zebra-color 0.95
***************
*** 2106,2111 ****
--- 2143,2149 ----
                       (number :tag "Red")
                       (number :tag "Green")
                       (number :tag "Blue")))
+   :version "20"
    :group 'ps-print-zebra)
  
  (defcustom ps-zebra-stripe-follow nil
***************
*** 2149,2159 ****
--- 2187,2199 ----
                 (const :tag "Continue on Next Page" follow)
                 (const :tag "Print Only Full Stripe" full)
                 (const :tag "Continue on Full Stripe" full-follow))
+   :version "20"
    :group 'ps-print-zebra)
  
  (defcustom ps-line-number nil
    "*Non-nil means print line number."
    :type 'boolean
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-line-number-step 1
***************
*** 2183,2188 ****
--- 2223,2229 ----
                 :tag "Line Number Step"
                 (integer :tag "Step Interval")
                 (const :tag "Synchronize Zebra" zebra))
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-line-number-start 1
***************
*** 2212,2217 ****
--- 2253,2259 ----
       value of `ps-zebra-strip-height' inclusive.  Use this combination if you
       wish that line number be relative to zebra stripes."
    :type '(integer :tag "Start Step Interval")
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-print-background-image nil
***************
*** 2258,2263 ****
--- 2300,2306 ----
                          (cons :tag "Range"
                                (integer :tag "From")
                                (integer :tag "To"))))))
+   :version "20"
    :group 'ps-print-background)
  
  (defcustom ps-print-background-text nil
***************
*** 2309,2314 ****
--- 2352,2358 ----
                          (cons :tag "Range"
                                (integer :tag "From")
                                (integer :tag "To"))))))
+   :version "20"
    :group 'ps-print-background)
  
  ;;; Horizontal layout
***************
*** 2322,2337 ****
--- 2366,2384 ----
  (defcustom ps-left-margin   (/ (* 72  2.0) 2.54) ;   2 cm
    "*Left margin in points (1/72 inch)."
    :type 'number
+   :version "20"
    :group 'ps-print-horizontal)
  
  (defcustom ps-right-margin  (/ (* 72  2.0) 2.54) ;   2 cm
    "*Right margin in points (1/72 inch)."
    :type 'number
+   :version "20"
    :group 'ps-print-horizontal)
  
  (defcustom ps-inter-column  (/ (* 72  2.0) 2.54) ;   2 cm
    "*Horizontal space between columns in points (1/72 inch)."
    :type 'number
+   :version "20"
    :group 'ps-print-horizontal)
  
  ;;; Vertical layout
***************
*** 2351,2366 ****
--- 2398,2416 ----
  (defcustom ps-bottom-margin (/ (* 72  1.5) 2.54) ; 1.5 cm
    "*Bottom margin in points (1/72 inch)."
    :type 'number
+   :version "20"
    :group 'ps-print-vertical)
  
  (defcustom ps-top-margin    (/ (* 72  1.5) 2.54) ; 1.5 cm
    "*Top margin in points (1/72 inch)."
    :type 'number
+   :version "20"
    :group 'ps-print-vertical)
  
  (defcustom ps-header-offset (/ (* 72  1.0) 2.54) ; 1.0 cm
    "*Vertical space in points (1/72 inch) between the main text and the 
header."
    :type 'number
+   :version "20"
    :group 'ps-print-vertical)
  
  (defcustom ps-header-line-pad 0.15
***************
*** 2368,2378 ****
--- 2418,2430 ----
  The insertion is done between the header frame and the text it contains,
  both in the vertical and horizontal directions."
    :type 'number
+   :version "20"
    :group 'ps-print-vertical)
  
  (defcustom ps-footer-offset (/ (* 72  1.0) 2.54) ; 1.0 cm
    "*Vertical space in points (1/72 inch) between the main text and the 
footer."
    :type 'number
+   :version "20"
    :group 'ps-print-vertical)
  
  (defcustom ps-footer-line-pad 0.15
***************
*** 2380,2385 ****
--- 2432,2438 ----
  The insertion is done between the footer frame and the text it contains,
  both in the vertical and horizontal directions."
    :type 'number
+   :version "20"
    :group 'ps-print-vertical)
  
  ;;; Header/Footer setup
***************
*** 2390,2400 ****
--- 2443,2455 ----
  buffer is visiting a file, the file's directory.  Headers are customizable by
  changing variables `ps-left-header' and `ps-right-header'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-print-header-frame t
    "*Non-nil means draw a gaudy frame around the header."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-header-frame-alist
***************
*** 2474,2484 ****
--- 2529,2541 ----
                                      (number :tag "Red")
                                      (number :tag "Green")
                                      (number :tag "Blue"))))))
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-header-lines 2
    "*Number of lines to display in page header, when generating PostScript."
    :type 'integer
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-print-footer nil
***************
*** 2486,2499 ****
  By default, the footer displays page number.
  Footers are customizable by changing variables `ps-left-footer' and
  `ps-right-footer'."
-   :version "21.1"
    :type 'boolean
    :group 'ps-print-headers)
  
  (defcustom ps-print-footer-frame t
    "*Non-nil means draw a gaudy frame around the footer."
-   :version "21.1"
    :type 'boolean
    :group 'ps-print-headers)
  
  (defcustom ps-footer-frame-alist
--- 2543,2556 ----
  By default, the footer displays page number.
  Footers are customizable by changing variables `ps-left-footer' and
  `ps-right-footer'."
    :type 'boolean
+   :version "21.1"
    :group 'ps-print-headers)
  
  (defcustom ps-print-footer-frame t
    "*Non-nil means draw a gaudy frame around the footer."
    :type 'boolean
+   :version "21.1"
    :group 'ps-print-headers)
  
  (defcustom ps-footer-frame-alist
***************
*** 2508,2514 ****
  `ps-get', `ps-put' and `ps-del' functions (see them for documentation).
  
  See also `ps-header-frame-alist' for documentation."
-   :version "21.1"
    :type '(repeat
          (choice :menu-tag "Header Frame Element"
                  :tag ""
--- 2565,2570 ----
***************
*** 2555,2566 ****
                                      (number :tag "Red")
                                      (number :tag "Green")
                                      (number :tag "Blue"))))))
    :group 'ps-print-headers)
  
  (defcustom ps-footer-lines 2
    "*Number of lines to display in page footer, when generating PostScript."
-   :version "21.1"
    :type 'integer
    :group 'ps-print-headers)
  
  (defcustom ps-print-only-one-header nil
--- 2611,2623 ----
                                      (number :tag "Red")
                                      (number :tag "Green")
                                      (number :tag "Blue"))))))
+   :version "21.1"
    :group 'ps-print-headers)
  
  (defcustom ps-footer-lines 2
    "*Number of lines to display in page footer, when generating PostScript."
    :type 'integer
+   :version "21.1"
    :group 'ps-print-headers)
  
  (defcustom ps-print-only-one-header nil
***************
*** 2569,2574 ****
--- 2626,2632 ----
  only one header/footer over all columns or one header/footer per column.
  See also `ps-print-header' and `ps-print-footer'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-switch-header 'duplex
***************
*** 2591,2596 ****
--- 2649,2655 ----
                 (const :tag "Never Switch" nil)
                 (const :tag "Always Switch" t)
                 (const :tag "Switch When Duplexing" duplex))
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-show-n-of-n t
***************
*** 2598,2603 ****
--- 2657,2663 ----
  NOTE: page numbers are displayed as part of headers,
        see variable `ps-print-header'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-spool-config
***************
*** 2633,2638 ****
--- 2693,2699 ----
                 :tag "Spool Config"
                 (const lpr-switches) (const setpagedevice)
                 (const :tag "nil" nil))
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-spool-duplex nil                ; Not many people have duplex 
printers,
***************
*** 2646,2651 ****
--- 2707,2713 ----
  
  See also `ps-spool-tumble'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-spool-tumble nil
***************
*** 2656,2661 ****
--- 2718,2724 ----
  
  It has effect only when `ps-spool-duplex' is non-nil."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  ;;; Fonts
***************
*** 2806,2816 ****
--- 2869,2881 ----
                (cons :format "%v"
                      (const :format "" avg-char-width)
                      (number :tag "Average Character Width"))))
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-font-family 'Courier
    "*Font family name for ordinary text, when generating PostScript."
    :type 'symbol
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-font-size   '(7 . 8.5)
***************
*** 2821,2831 ****
--- 2886,2898 ----
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Text Size")
                       (number :tag "Portrait Text Size")))
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-header-font-family      'Helvetica
    "*Font family name for text in the header, when generating PostScript."
    :type 'symbol
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-header-font-size       '(10 . 12)
***************
*** 2836,2841 ****
--- 2903,2909 ----
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Header Size")
                       (number :tag "Portrait Header Size")))
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-header-title-font-size '(12 . 14)
***************
*** 2846,2868 ****
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Header Title Size")
                       (number :tag "Portrait Header Title Size")))
    :group 'ps-print-font)
  
  (defcustom ps-footer-font-family      'Helvetica
    "*Font family name for text in the footer, when generating PostScript."
-   :version "21.1"
    :type 'symbol
    :group 'ps-print-font)
  
  (defcustom ps-footer-font-size       '(10 . 12)
    "*Font size, in points, for text in the footer, when generating PostScript."
-   :version "21.1"
    :type '(choice :menu-tag "Footer Font Size"
                 :tag "Footer Font Size"
                 (number :tag "Footer Size")
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Footer Size")
                       (number :tag "Portrait Footer Size")))
    :group 'ps-print-font)
  
  (defcustom ps-line-number-color      "black"
--- 2914,2937 ----
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Header Title Size")
                       (number :tag "Portrait Header Title Size")))
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-footer-font-family      'Helvetica
    "*Font family name for text in the footer, when generating PostScript."
    :type 'symbol
+   :version "21.1"
    :group 'ps-print-font)
  
  (defcustom ps-footer-font-size       '(10 . 12)
    "*Font size, in points, for text in the footer, when generating PostScript."
    :type '(choice :menu-tag "Footer Font Size"
                 :tag "Footer Font Size"
                 (number :tag "Footer Size")
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Footer Size")
                       (number :tag "Portrait Footer Size")))
+   :version "21.1"
    :group 'ps-print-font)
  
  (defcustom ps-line-number-color      "black"
***************
*** 2882,2887 ****
--- 2951,2957 ----
  (defcustom ps-line-number-font      "Times-Italic"
    "*Font for line-number, when generating PostScript."
    :type 'string
+   :version "20"
    :group 'ps-print-font
    :group 'ps-print-miscellany)
  
***************
*** 2893,2898 ****
--- 2963,2969 ----
                 (cons :tag "Landscape/Portrait"
                       (number :tag "Landscape Font Size")
                       (number :tag "Portrait Font Size")))
+   :version "20"
    :group 'ps-print-font
    :group 'ps-print-miscellany)
  
***************
*** 2923,2928 ****
--- 2994,3000 ----
                 (const :tag "Do NOT Print Color" nil)
                 (const :tag "Print Always Color" t)
                 (const :tag "Print Black/White Color" black-white))
+   :version "20"
    :group 'ps-print-color)
  
  (defcustom ps-default-fg '(0.0 0.0 0.0) ; black
***************
*** 2962,2967 ****
--- 3034,3040 ----
                       (number :tag "Red")
                       (number :tag "Green")
                       (number :tag "Blue")))
+   :version "20"
    :group 'ps-print-color)
  
  (defcustom ps-default-bg '(1.0 1.0 1.0) ; white
***************
*** 3003,3008 ****
--- 3076,3082 ----
                       (number :tag "Red")
                       (number :tag "Green")
                       (number :tag "Blue")))
+   :version "20"
    :group 'ps-print-color)
  
  (defcustom ps-auto-font-detect t
***************
*** 3010,3015 ****
--- 3084,3090 ----
  If nil, we rely solely on the lists `ps-bold-faces', `ps-italic-faces', and
  `ps-underlined-faces'."
    :type 'boolean
+   :version "20"
    :group 'ps-print-font)
  
  (defcustom ps-black-white-faces
***************
*** 3049,3054 ****
--- 3124,3130 ----
                                (const shadow)
                                (const box)
                                (const outline)))))
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-bold-faces
***************
*** 3061,3066 ****
--- 3137,3143 ----
    "*A list of the \(non-bold\) faces that should be printed in bold font.
  This applies to generating PostScript."
    :type '(repeat face)
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-italic-faces
***************
*** 3073,3078 ****
--- 3150,3156 ----
    "*A list of the \(non-italic\) faces that should be printed in italic font.
  This applies to generating PostScript."
    :type '(repeat face)
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-underlined-faces
***************
*** 3083,3088 ****
--- 3161,3167 ----
    "*A list of the \(non-underlined\) faces that should be printed underlined.
  This applies to generating PostScript."
    :type '(repeat face)
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-use-face-background nil
***************
*** 3102,3107 ****
--- 3181,3187 ----
                 (repeat :menu-tag "Face Background List"
                         :tag "Face Background List"
                         face))
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-left-header
***************
*** 3125,3130 ****
--- 3205,3211 ----
    :type '(repeat (choice :menu-tag "Left Header"
                         :tag "Left Header"
                         string symbol))
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-right-header
***************
*** 3155,3160 ****
--- 3236,3242 ----
    :type '(repeat (choice :menu-tag "Right Header"
                         :tag "Right Header"
                         string symbol))
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-left-footer
***************
*** 3175,3184 ****
  variable, the string value has PostScript string delimiters added to it.
  
  If symbols are unbounded, they are silently ignored."
-   :version "21.1"
    :type '(repeat (choice :menu-tag "Left Footer"
                         :tag "Left Footer"
                         string symbol))
    :group 'ps-print-headers)
  
  (defcustom ps-right-footer
--- 3257,3266 ----
  variable, the string value has PostScript string delimiters added to it.
  
  If symbols are unbounded, they are silently ignored."
    :type '(repeat (choice :menu-tag "Left Footer"
                         :tag "Left Footer"
                         string symbol))
+   :version "21.1"
    :group 'ps-print-headers)
  
  (defcustom ps-right-footer
***************
*** 3206,3220 ****
  
  You can also create your own time stamp function by using `format-time-string'
  \(which see)."
-   :version "21.1"
    :type '(repeat (choice :menu-tag "Right Footer"
                         :tag "Right Footer"
                         string symbol))
    :group 'ps-print-headers)
  
  (defcustom ps-razzle-dazzle t
    "*Non-nil means report progress while formatting buffer."
    :type 'boolean
    :group 'ps-print-miscellany)
  
  (defcustom ps-adobe-tag "%!PS-Adobe-3.0\n"
--- 3288,3303 ----
  
  You can also create your own time stamp function by using `format-time-string'
  \(which see)."
    :type '(repeat (choice :menu-tag "Right Footer"
                         :tag "Right Footer"
                         string symbol))
+   :version "21.1"
    :group 'ps-print-headers)
  
  (defcustom ps-razzle-dazzle t
    "*Non-nil means report progress while formatting buffer."
    :type 'boolean
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-adobe-tag "%!PS-Adobe-3.0\n"
***************
*** 3222,3227 ****
--- 3305,3311 ----
  By default, `ps-adobe-tag' contains the standard identifier.  Some printers
  require slightly different versions of this line."
    :type 'string
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-build-face-reference t
***************
*** 3236,3241 ****
--- 3320,3326 ----
  face, or create new faces.  Most users shouldn't have to worry about its
  setting, though."
    :type 'boolean
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-always-build-face-reference nil
***************
*** 3245,3272 ****
  of bold and italic faces *every* time one of the ...-with-faces commands is
  called.  Most users shouldn't need to set this variable."
    :type 'boolean
    :group 'ps-print-face)
  
  (defcustom ps-banner-page-when-duplexing nil
    "*Non-nil means the very first page is skipped.
  It's like the very first character of buffer (or region) is ^L (\\014)."
    :type 'boolean
    :group 'ps-print-headers)
  
  (defcustom ps-postscript-code-directory
!   (or (cond
!        ((eq ps-print-emacs-type 'emacs)       ; emacs
!       data-directory)
!        ((fboundp 'locate-data-directory) ; xemacs
!       (locate-data-directory "ps-print"))
!        ((boundp 'data-directory)      ; xemacs
!       data-directory)
!        (t                             ; don't know what to do
!       nil))
        (error "`ps-postscript-code-directory' isn't set properly"))
    "*Directory where it's located the PostScript prologue file used by 
ps-print.
  By default, this directory is the same as in the variable `data-directory'."
    :type 'directory
    :group 'ps-print-miscellany)
  
  (defcustom ps-line-spacing 0
--- 3330,3359 ----
  of bold and italic faces *every* time one of the ...-with-faces commands is
  called.  Most users shouldn't need to set this variable."
    :type 'boolean
+   :version "20"
    :group 'ps-print-face)
  
  (defcustom ps-banner-page-when-duplexing nil
    "*Non-nil means the very first page is skipped.
  It's like the very first character of buffer (or region) is ^L (\\014)."
    :type 'boolean
+   :version "20"
    :group 'ps-print-headers)
  
  (defcustom ps-postscript-code-directory
!   (or (if (featurep 'xemacs)
!         (cond ((fboundp 'locate-data-directory) ; xemacs
!                (locate-data-directory "ps-print"))
!               ((boundp 'data-directory) ; xemacs
!                data-directory)
!               (t                      ; don't know what to do
!                nil))
!       data-directory)                 ; emacs
        (error "`ps-postscript-code-directory' isn't set properly"))
    "*Directory where it's located the PostScript prologue file used by 
ps-print.
  By default, this directory is the same as in the variable `data-directory'."
    :type 'directory
+   :version "20"
    :group 'ps-print-miscellany)
  
  (defcustom ps-line-spacing 0
***************
*** 3505,3510 ****
--- 3592,3598 ----
       (list
        (concat "\n;;; ps-print version " ps-print-version "\n")
        ";; internal vars"
+       (ps-comment-string "emacs-version      " emacs-version)
        (ps-comment-string "ps-print-emacs-type" ps-print-emacs-type)
        (ps-comment-string "ps-windows-system  " ps-windows-system)
        (ps-comment-string "ps-lp-system       " ps-lp-system)
***************
*** 3749,3854 ****
    (format-time-string "%T"))
  
  
! (eval-and-compile
!   (and (eq ps-print-emacs-type 'xemacs)
!        ;; XEmacs change: Need to check for emacs-major-version too.
!        (or (< emacs-major-version 19)
!          (and (= emacs-major-version 19) (< emacs-minor-version 12)))
!        (setq ps-print-color-p nil))
! 
! 
!   ;; Return t if the device (which can be changed during an emacs session)
!   ;; can handle colors.
!   ;; This function is not yet implemented for GNU emacs.
!   (cond ((and (eq ps-print-emacs-type 'xemacs)
!             ;; XEmacs change: Need to check for emacs-major-version too.
!             (or (> emacs-major-version 19)
!                 (and (= emacs-major-version 19)
!                      (>= emacs-minor-version 12)))) ; xemacs >= 19.12
!        (defun ps-color-device ()
!          (eq (ps-x-device-class) 'color)))
! 
!       (t                              ; emacs
!        (defun ps-color-device ()
!          (if (fboundp 'color-values)
!              (ps-e-color-values "Green")
!            t))))
! 
! 
!   (defun ps-mapper (extent list)
!     (nconc list
!          (list (list (ps-x-extent-start-position extent) 'push extent)
!                (list (ps-x-extent-end-position extent) 'pull extent)))
!     nil)
! 
!   (defun ps-extent-sorter (a b)
!     (< (ps-x-extent-priority a) (ps-x-extent-priority b)))
! 
!   (defun ps-xemacs-face-kind-p (face kind kind-regex)
!     (let* ((frame-font (or (ps-x-face-font-instance face)
!                          (ps-x-face-font-instance 'default)))
!          (kind-cons
!           (and frame-font
!                (assq kind
!                      (ps-x-font-instance-properties frame-font))))
!          (kind-spec (cdr-safe kind-cons))
!          (case-fold-search t))
!       (and kind-spec (string-match kind-regex kind-spec))))
! 
!   (cond ((eq ps-print-emacs-type 'emacs) ; emacs
  
!        (defun ps-color-values (x-color)
           (cond
-           ((fboundp 'color-values)
-            (ps-e-color-values x-color))
            ((fboundp 'x-color-values)
!            (ps-e-x-color-values x-color))
            (t
!            (error "No available function to determine X color values"))))
  
!        (defun ps-face-bold-p (face)
!          (or (ps-e-face-bold-p face)
!              (memq face ps-bold-faces)))
! 
!        (defun ps-face-italic-p (face)
!          (or (ps-e-face-italic-p face)
!              (memq face ps-italic-faces)))
!        )
! 
!       (t                              ; xemacs
  
!        ;; to avoid XEmacs compilation gripes
!        (defvar coding-system-for-write   nil)
!        (defvar coding-system-for-read    nil)
!        (defvar buffer-file-coding-system nil)
! 
!        (and (fboundp 'find-coding-system)
!             (or (ps-x-find-coding-system 'raw-text-unix)
!                 (ps-x-copy-coding-system 'no-conversion-unix 'raw-text-unix)))
! 
!        (defun ps-color-values (x-color)
!          (let ((color (ps-xemacs-color-name x-color)))
!            (cond
!             ((fboundp 'x-color-values)
!              (ps-e-x-color-values color))
!             ((and (fboundp 'color-instance-rgb-components)
!                   (ps-color-device))
!              (ps-x-color-instance-rgb-components
!               (if (ps-x-color-instance-p x-color)
!                   x-color
!                 (ps-x-make-color-instance color))))
!             (t
!              (error "No available function to determine X color values")))))
! 
!        (defun ps-face-bold-p (face)
!          (or (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold")
!              (memq face ps-bold-faces))) ; Kludge-compatible
! 
!        (defun ps-face-italic-p (face)
!          (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o")
!              (ps-xemacs-face-kind-p face 'SLANT "i\\|o")
!              (memq face ps-italic-faces))) ; Kludge-compatible
!        )))
  
  
  (defvar ps-print-color-scale 1.0)
--- 3837,3941 ----
    (format-time-string "%T"))
  
  
! (and (featurep 'xemacs)
!      ;; XEmacs change: Need to check for emacs-major-version too.
!      (or (< emacs-major-version 19)
!        (and (= emacs-major-version 19) (< emacs-minor-version 12)))
!      (setq ps-print-color-p nil))
! 
! 
! ;; Return t if the device (which can be changed during an emacs session)
! ;; can handle colors.
! ;; This function is not yet implemented for GNU emacs.
! (cond ((and (featurep 'xemacs)
!           ;; XEmacs change: Need to check for emacs-major-version too.
!           (or (> emacs-major-version 19)
!               (and (= emacs-major-version 19)
!                    (>= emacs-minor-version 12)))) ; xemacs >= 19.12
!        (defun ps-color-device ()
!        (eq (ps-x-device-class) 'color)))
! 
!       (t                              ; emacs
!        (defun ps-color-device ()
!        (if (fboundp 'color-values)
!            (ps-e-color-values "Green")
!          t))))
! 
! 
! (defun ps-mapper (extent list)
!   (nconc list
!        (list (list (ps-x-extent-start-position extent) 'push extent)
!              (list (ps-x-extent-end-position extent) 'pull extent)))
!   nil)
! 
! (defun ps-extent-sorter (a b)
!   (< (ps-x-extent-priority a) (ps-x-extent-priority b)))
! 
! (defun ps-xemacs-face-kind-p (face kind kind-regex)
!   (let* ((frame-font (or (ps-x-face-font-instance face)
!                        (ps-x-face-font-instance 'default)))
!        (kind-cons
!         (and frame-font
!              (assq kind
!                    (ps-x-font-instance-properties frame-font))))
!        (kind-spec (cdr-safe kind-cons))
!        (case-fold-search t))
!     (and kind-spec (string-match kind-regex kind-spec))))
! 
! (cond ((featurep 'xemacs)             ; xemacs
! 
!        ;; to avoid XEmacs compilation gripes
!        (defvar coding-system-for-write   nil)
!        (defvar coding-system-for-read    nil)
!        (defvar buffer-file-coding-system nil)
! 
!        (and (fboundp 'find-coding-system)
!           (or (ps-x-find-coding-system 'raw-text-unix)
!               (ps-x-copy-coding-system 'no-conversion-unix 'raw-text-unix)))
  
!        (defun ps-color-values (x-color)
!        (let ((color (ps-xemacs-color-name x-color)))
           (cond
            ((fboundp 'x-color-values)
!            (ps-e-x-color-values color))
!           ((and (fboundp 'color-instance-rgb-components)
!                 (ps-color-device))
!            (ps-x-color-instance-rgb-components
!             (if (ps-x-color-instance-p x-color)
!                 x-color
!               (ps-x-make-color-instance color))))
            (t
!            (error "No available function to determine X color values")))))
  
!        (defun ps-face-bold-p (face)
!        (or (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold")
!            (memq face ps-bold-faces))) ; Kludge-compatible
! 
!        (defun ps-face-italic-p (face)
!        (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o")
!            (ps-xemacs-face-kind-p face 'SLANT "i\\|o")
!            (memq face ps-italic-faces))) ; Kludge-compatible
!        )
! 
!       (t                              ; emacs
! 
!        (defun ps-color-values (x-color)
!        (cond
!         ((fboundp 'color-values)
!          (ps-e-color-values x-color))
!         ((fboundp 'x-color-values)
!          (ps-e-x-color-values x-color))
!         (t
!          (error "No available function to determine X color values"))))
  
!        (defun ps-face-bold-p (face)
!        (or (ps-e-face-bold-p face)
!            (memq face ps-bold-faces)))
! 
!        (defun ps-face-italic-p (face)
!        (or (ps-e-face-italic-p face)
!            (memq face ps-italic-faces)))
!        ))
  
  
  (defvar ps-print-color-scale 1.0)
***************
*** 3931,3945 ****
  
  (defvar ps-color-p nil)
  (defvar ps-color-format
!   (if (eq ps-print-emacs-type 'emacs)
! 
!       ;; Emacs understands the %f format; we'll use it to limit color RGB
!       ;; values to three decimals to cut down some on the size of the
!       ;; PostScript output.
!       "%0.3f %0.3f %0.3f"
! 
!     ;; XEmacs will have to make do with %s (princ) for floats.
!     "%s %s %s"))
  
  ;; These values determine how much print-height to deduct when headers/footers
  ;; are turned on.  This is a pretty clumsy way of handling it, but it'll do 
for
--- 4018,4031 ----
  
  (defvar ps-color-p nil)
  (defvar ps-color-format
!   (if (featurep 'xemacs)
!       ;; XEmacs will have to make do with %s (princ) for floats.
!       "%s %s %s"
! 
!     ;; Emacs understands the %f format; we'll use it to limit color RGB
!     ;; values to three decimals to cut down some on the size of the
!     ;; PostScript output.
!     "%0.3f %0.3f %0.3f"))
  
  ;; These values determine how much print-height to deduct when headers/footers
  ;; are turned on.  This is a pretty clumsy way of handling it, but it'll do 
for
***************
*** 4723,4729 ****
    (save-excursion
      (set-buffer ps-spool-buffer)
      (goto-char (point-max))
!     (insert-file fname)))
  
  ;; These functions insert the arrays that define the contents of the headers.
  
--- 4809,4815 ----
    (save-excursion
      (set-buffer ps-spool-buffer)
      (goto-char (point-max))
!     (insert-file-contents fname)))
  
  ;; These functions insert the arrays that define the contents of the headers.
  
***************
*** 4823,4831 ****
  ;; to three decimals to cut down some on the size of the PostScript output.
  ;; XEmacs will have to make do with %s (princ) for floats.
  
! (defvar ps-float-format (if (eq ps-print-emacs-type 'emacs)
!                           "%0.3f "    ; emacs
!                         "%s "))       ; xemacs
  
  
  (defun ps-float-format (value &optional default)
--- 4909,4917 ----
  ;; to three decimals to cut down some on the size of the PostScript output.
  ;; XEmacs will have to make do with %s (princ) for floats.
  
! (defvar ps-float-format (if (featurep 'xemacs)
!                           "%s "       ; xemacs
!                         "%0.3f "))    ; emacs
  
  
  (defun ps-float-format (value &optional default)
***************
*** 6298,6311 ****
  
  
  ;; to avoid compilation gripes
  (defun ps-print-ensure-fontified (start end)
!   (cond
!    ((and (boundp 'jit-lock-mode) (symbol-value 'jit-lock-mode))
!     (defalias 'ps-jitify 'jit-lock-fontify-now) ; avoid compilation gripes
!     (ps-jitify start end))
!    ((and (boundp 'lazy-lock-mode) (symbol-value 'lazy-lock-mode))
!     (defalias 'ps-lazify 'lazy-lock-fontify-region) ; avoid compilation gripes
!     (ps-lazify start end))))
  
  
  (defun ps-generate-postscript-with-faces (from to)
--- 6384,6399 ----
  
  
  ;; to avoid compilation gripes
+ (defalias 'ps-jitify 'jit-lock-fontify-now)
+ (defalias 'ps-lazify 'lazy-lock-fontify-region)
+ 
+ 
+ ;; to avoid compilation gripes
  (defun ps-print-ensure-fontified (start end)
!   (cond ((and (boundp 'jit-lock-mode) (symbol-value 'jit-lock-mode))
!        (ps-jitify start end))
!       ((and (boundp 'lazy-lock-mode) (symbol-value 'lazy-lock-mode))
!        (ps-lazify start end))))
  
  
  (defun ps-generate-postscript-with-faces (from to)
***************
*** 6331,6337 ****
      (let ((face 'default)
          (position to))
        (cond
!        ((eq ps-print-emacs-type 'xemacs)
        ;; Build the list of extents...
        (let ((a (cons 'dummy nil))
              record type extent extent-list)
--- 6419,6425 ----
      (let ((face 'default)
          (position to))
        (cond
!        ((featurep 'xemacs)            ; xemacs
        ;; Build the list of extents...
        (let ((a (cons 'dummy nil))
              record type extent extent-list)
***************
*** 6375,6381 ****
                  from position
                  a (cdr a)))))
  
!        ((eq ps-print-emacs-type 'emacs)
        (let ((property-change from)
              (overlay-change from)
              (save-buffer-invisibility-spec buffer-invisibility-spec)
--- 6463,6469 ----
                  from position
                  a (cdr a)))))
  
!        (t                             ; emacs
        (let ((property-change from)
              (overlay-change from)
              (save-buffer-invisibility-spec buffer-invisibility-spec)
***************
*** 6653,6663 ****
  ;; Don't use it unless you understand what it does!
  
  (defmacro ps-prsc ()
!   `(if (eq ps-print-emacs-type 'emacs) [f22] 'f22))
  (defmacro ps-c-prsc ()
!   `(if (eq ps-print-emacs-type 'emacs) [C-f22] '(control f22)))
  (defmacro ps-s-prsc ()
!   `(if (eq ps-print-emacs-type 'emacs) [S-f22] '(shift f22)))
  
  ;; A hook to bind to `rmail-mode-hook' to locally bind prsc and set the
  ;; `ps-left-headers' specially for mail messages.
--- 6741,6751 ----
  ;; Don't use it unless you understand what it does!
  
  (defmacro ps-prsc ()
!   `(if (featurep 'xemacs) 'f22           [f22]))
  (defmacro ps-c-prsc ()
!   `(if (featurep 'xemacs) '(control f22) [C-f22]))
  (defmacro ps-s-prsc ()
!   `(if (featurep 'xemacs) '(shift f22)   [S-f22]))
  
  ;; A hook to bind to `rmail-mode-hook' to locally bind prsc and set the
  ;; `ps-left-headers' specially for mail messages.




reply via email to

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