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


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/ps-print.el
Date: Sun, 29 Sep 2002 13:47:50 -0400

Index: emacs/lisp/ps-print.el
diff -c emacs/lisp/ps-print.el:1.131 emacs/lisp/ps-print.el:1.132
*** emacs/lisp/ps-print.el:1.131        Wed Sep 11 23:21:57 2002
--- emacs/lisp/ps-print.el      Sat Sep 28 23:30:41 2002
***************
*** 10,21 ****
  ;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
  ;;    Vinicius Jose Latorre <address@hidden>
  ;; Keywords: wp, print, PostScript
! ;; Time-stamp: <2002/09/11 15:52:39 vinicius>
! ;; Version: 6.5.7
  ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
  
! (defconst ps-print-version "6.5.7"
!   "ps-print.el, v 6.5.7 <2002/09/11 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
--- 10,21 ----
  ;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
  ;;    Vinicius Jose Latorre <address@hidden>
  ;; Keywords: wp, print, PostScript
! ;; Time-stamp: <2002/09/13 10:10:20 vinicius>
! ;; Version: 6.5.8
  ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
  
! (defconst ps-print-version "6.5.8"
!   "ps-print.el, v 6.5.8 <2002/09/13 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
***************
*** 49,56 ****
  ;;
  ;; This package provides printing of Emacs buffers on PostScript printers; the
  ;; buffer's bold and italic text attributes are preserved in the printer
! ;; output.  ps-print is intended for use with Emacs or Lucid Emacs, together
! ;; with a fontifying package such as font-lock or hilit.
  ;;
  ;; ps-print uses the same face attributes defined through font-lock or hilit 
to
  ;; print a PostScript file, but some faces are better seeing on the screen 
than
--- 49,56 ----
  ;;
  ;; This package provides printing of Emacs buffers on PostScript printers; the
  ;; buffer's bold and italic text attributes are preserved in the printer
! ;; output.  ps-print is intended for use with Emacs or XEmacs, together with a
! ;; fontifying package such as font-lock or hilit.
  ;;
  ;; ps-print uses the same face attributes defined through font-lock or hilit 
to
  ;; print a PostScript file, but some faces are better seeing on the screen 
than
***************
*** 1329,1335 ****
  ;;
  ;; Faces are always treated as opaque.
  ;;
! ;; Epoch and Emacs 19 not supported.  At all.
  ;;
  ;; Fixed-pitch fonts work better for line folding, but are not required.
  ;;
--- 1329,1335 ----
  ;;
  ;; Faces are always treated as opaque.
  ;;
! ;; Epoch, Lucid and Emacs 19 not supported.  At all.
  ;;
  ;; Fixed-pitch fonts work better for line folding, but are not required.
  ;;
***************
*** 1442,1447 ****
--- 1442,1461 ----
        (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)
***************
*** 1510,1525 ****
      (memq system-type '(usg-unix-v dgux hpux irix)))
  
  
-   (defvar ps-print-emacs-type
-     (cond ((string-match "XEmacs" emacs-version) 'xemacs)
-         ((string-match "Lucid" emacs-version) 'lucid)
-         ((string-match "Epoch" emacs-version) 'epoch)
-         (t 'emacs)))
- 
-   (or (memq ps-print-emacs-type '(lucid xemacs))
-       (require 'faces))                       ; face-font, face-underline-p,
-                                       ; x-font-regexp
- 
    (defun ps-xemacs-color-name (color)
      (if (ps-x-color-specifier-p color)
        (ps-x-color-name color)
--- 1524,1529 ----
***************
*** 1533,1539 ****
         (defalias 'ps-face-foreground-name 'face-foreground)
         (defalias 'ps-face-background-name 'face-background)
         )
!       (t                              ; xemacs, lucid, epoch
         (defalias 'ps-mark-active-p 'region-active-p)
         (defun ps-face-foreground-name (face)
           (ps-xemacs-color-name (face-foreground face)))
--- 1537,1543 ----
         (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)))
***************
*** 3177,3189 ****
    (or (cond
         ((eq ps-print-emacs-type 'emacs)       ; emacs
        data-directory)
!        ((fboundp 'locate-data-directory) ; emacsens (xemacs, etc.)
        (locate-data-directory "ps-print"))
!        ((boundp 'data-directory)      ; emacsens (xemacs, etc.)
        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
--- 3181,3193 ----
    (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
***************
*** 3642,3648 ****
  
  
  (eval-and-compile
!   (and (memq ps-print-emacs-type '(lucid 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)))
--- 3646,3652 ----
  
  
  (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)))
***************
*** 3707,3713 ****
               (memq face ps-italic-faces)))
         )
  
!       (t                              ; xemacs, lucid, epoch
  
         ;; to avoid XEmacs compilation gripes
         (defvar coding-system-for-write   nil)
--- 3711,3717 ----
               (memq face ps-italic-faces)))
         )
  
!       (t                              ; xemacs
  
         ;; to avoid XEmacs compilation gripes
         (defvar coding-system-for-write   nil)
***************
*** 3829,3835 ****
        ;; PostScript output.
        "%0.3f %0.3f %0.3f"
  
!     ;; Lucid emacsen 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
--- 3833,3839 ----
        ;; 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
***************
*** 4690,4700 ****
  
  ;; 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.
! ;; Lucid emacsen 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 "))       ; Lucid emacsen
  
  
  (defun ps-float-format (value &optional default)
--- 4694,4704 ----
  
  ;; 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.
! ;; 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)
***************
*** 6184,6190 ****
      (let ((face 'default)
          (position to))
        (cond
!        ((memq ps-print-emacs-type '(xemacs lucid))
        ;; Build the list of extents...
        (let ((a (cons 'dummy nil))
              record type extent extent-list)
--- 6188,6194 ----
      (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)




reply via email to

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