X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/269a66eeb5f93317c6d18dbb8d9263efc9e28423..0d4afaf7ffb6d1881c9acf9ef03f386cc87254e6:/lisp/ps-def.el diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 3903fc0ef3..c27ee251e0 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -1,30 +1,29 @@ ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print -;; Copyright (C) 2007 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre ;; Kenichi Handa (multi-byte characters) ;; Maintainer: Kenichi Handa (multi-byte characters) ;; Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Version: 7.2.2 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre +;; Package: ps-print ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify it under -;; the terms of the GNU General Public License as published by the Free -;; Software Foundation; either version 3, or (at your option) any later -;; version. +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. -;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY -;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -;; details. +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. -;; You should have received a copy of the GNU General Public License along with -;; GNU Emacs; see the file COPYING. If not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -32,6 +31,15 @@ ;;; Code: +(eval-and-compile + (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + +(declare-function ps-plot-with-face "ps-print" (from to face)) +(declare-function ps-plot-string "ps-print" (string)) + +(defvar ps-bold-faces) ; in ps-print.el +(defvar ps-italic-faces) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -170,17 +178,8 @@ ;; Return t if the device (which can be changed during an emacs session) ;; can handle colors. - ;; XEmacs change: Need to check for emacs-major-version too. - (if (or (> emacs-major-version 19) - (and (= emacs-major-version 19) - (>= emacs-minor-version 12))) - ;; xemacs >= 19.12 - (defun ps-color-device () - (eq (device-class) 'color)) - ;; xemacs < 19.12 - (setq ps-print-color-p nil) - (defalias 'ps-color-device 'ignore)) - + (defun ps-color-device () + (eq (device-class) 'color)) (defun ps-mapper (extent list) (nconc list @@ -241,6 +240,15 @@ (memq face ps-italic-faces))) ; Kludge-compatible + (defalias 'ps-face-strikeout-p 'ignore) + + + (defalias 'ps-face-overline-p 'ignore) + + + (defalias 'ps-face-box-p 'ignore) + + ;; XEmacs will have to make do with %s (princ) for floats. (defvar ps-color-format "%s %s %s") (defvar ps-float-format "%s ") @@ -362,6 +370,18 @@ (memq face ps-italic-faces))) + (defun ps-face-strikeout-p (face) + (eq (face-attribute face :strike-through) t)) + + + (defun ps-face-overline-p (face) + (eq (face-attribute face :overline) t)) + + + (defun ps-face-box-p (face) + (not (memq (face-attribute face :box) '(nil unspecified)))) + + ;; 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. (defvar ps-color-format "%0.3f %0.3f %0.3f")