diff lisp/ps-print.el @ 87433:410e13519acb

Fix ps-print-preprint-region code
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Thu, 27 Dec 2007 14:00:42 +0000
parents 6528ad32693a
children 4c6c79916238
line wrap: on
line diff
--- a/lisp/ps-print.el	Thu Dec 27 11:26:27 2007 +0000
+++ b/lisp/ps-print.el	Thu Dec 27 14:00:42 2007 +0000
@@ -1501,6 +1501,12 @@
 (defalias 'ps-frame-parameter
   (if (fboundp 'frame-parameter) 'frame-parameter 'frame-property))
 
+(defalias 'ps-mark-active-p
+  (if (featurep 'xemacs)
+      'region-active-p			; XEmacs
+    (defvar mark-active)		; To shup up XEmacs's byte compiler.
+    (lambda () mark-active)))		; Emacs
+
 (defun ps-face-foreground-name (face)
   (if (featurep 'xemacs)
       (ps-xemacs-color-name (face-foreground face))
@@ -4695,7 +4701,7 @@
 
 
 (defun ps-print-preprint-region (prefix-arg)
-  (or (region-active-p)
+  (or (ps-mark-active-p)
       (error "The mark is not set now"))
   (list (point) (mark) (ps-print-preprint prefix-arg)))