]> code.delx.au - gnu-emacs/blobdiff - lisp/ps-print.el
Protect against changes of interval tree when adding/removing text props.
[gnu-emacs] / lisp / ps-print.el
index 19431c30d68def8a852536ccb3fbfd23788e5199..f7c03c2de85cb7350d0aabeb0d653325b03fe48b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ps-print.el --- print text from the buffer as PostScript
 
-;; Copyright (C) 1993-201 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2013 Free Software Foundation, Inc.
 
 ;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
 ;;     Jacques Duthen (was <duthen@cegelec-red.fr>)
@@ -975,7 +975,7 @@ Please send all bug fixes and enhancements to
 ;;     (setq ps-font-info-database '(<your stuff> <the standard stuff>))
 ;;   or, use `ps-print-hook' (see section Hooks):
 ;;     (add-hook 'ps-print-hook
-;;               '(lambda ()
+;;               (lambda ()
 ;;                  (or (assq 'Helvetica ps-font-info-database)
 ;;                      (setq ps-font-info-database (append ...)))))
 ;;
@@ -1042,7 +1042,7 @@ Please send all bug fixes and enhancements to
 ;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'.
 ;; These variables contain lists of faces that ps-print should consider bold,
 ;; italic or underline; to set them, put code like the following into your
-;; .emacs file:
+;; init file:
 ;;
 ;;      (setq ps-bold-faces '(my-blue-face))
 ;;      (setq ps-italic-faces '(my-red-face))
@@ -1959,13 +1959,13 @@ Valid values are:
 
 Any other value is treated as nil.
 
-If you set `ps-selected-pages' (see it for documentation), first the pages are
-filtered by `ps-selected-pages' and then by `ps-even-or-odd-pages'.  For
-example, if we have:
+If you set option `ps-selected-pages', first the pages are
+filtered by option `ps-selected-pages' and then by `ps-even-or-odd-pages'.
+For example, if we have:
 
    (setq ps-selected-pages '(1 4 (6 . 10) (12 . 16) 20))
 
-Combining with `ps-even-or-odd-pages' and `ps-n-up-printing', we have:
+Combining with `ps-even-or-odd-pages' and option `ps-n-up-printing', we have:
 
 `ps-n-up-printing' = 1:
    `ps-even-or-odd-pages'      PAGES PRINTED
@@ -3566,9 +3566,9 @@ Use the command `ps-despool' to send the spooled images to the printer."
 ;;;###autoload
 (defun ps-spool-buffer-with-faces ()
   "Generate and spool a PostScript image of the buffer.
-Like `ps-spool-buffer', but includes font, color, and underline information in
-the generated image.  This command works only if you are using a window system,
-so it has a way to determine color values.
+Like the command `ps-spool-buffer', but includes font, color, and underline
+information in the generated image.  This command works only if you are using
+a window system, so it has a way to determine color values.
 
 Use the command `ps-despool' to send the spooled images to the printer."
   (interactive)
@@ -4592,16 +4592,16 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
                     ps-print-height))))))
 
 
-(defun ps-print-preprint-region (prefix-arg)
+(defun ps-print-preprint-region (prefix)
   (or (ps-mark-active-p)
       (error "The mark is not set now"))
-  (list (point) (mark) (ps-print-preprint prefix-arg)))
+  (list (point) (mark) (ps-print-preprint prefix)))
 
 
-(defun ps-print-preprint (prefix-arg)
-  (and prefix-arg
-       (or (numberp prefix-arg)
-          (listp prefix-arg))
+(defun ps-print-preprint (prefix)
+  (and prefix
+       (or (numberp prefix)
+          (listp prefix))
        (let* ((name   (concat (file-name-nondirectory (or (buffer-file-name)
                                                          (buffer-name)))
                              ".ps"))
@@ -5369,12 +5369,12 @@ Each element has the following form:
    (KIND XCOL YCOL XLIN YLIN REPEAT END XSTART YSTART)
 
 Where:
-KIND is a valid value of `ps-n-up-filling'.
+KIND is a valid value of the variable `ps-n-up-filling'.
 XCOL YCOL are the relative position for the next column.
 XLIN YLIN are the relative position for the beginning of next line.
-REPEAT is the number of repetions for external loop.
-END is the number of repetions for internal loop and also the number of pages in
-    a row.
+REPEAT is the number of repetitions for external loop.
+END is the number of repetitions for internal loop and also the number
+    of pages in a row.
 XSTART YSTART are the relative position for the first page in a sheet.")
 
 
@@ -6020,7 +6020,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
     (ps-output " S\n")
     wrappoint))
 
-(defun ps-basic-plot-string (from to &optional bg-color)
+(defun ps-basic-plot-string (from to &optional _bg-color)
   (let* ((wrappoint (ps-find-wrappoint from to
                                       (ps-avg-char-width 'ps-font-for-text)))
         (to (car wrappoint))
@@ -6029,7 +6029,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
     (ps-output " S\n")
     wrappoint))
 
-(defun ps-basic-plot-whitespace (from to &optional bg-color)
+(defun ps-basic-plot-whitespace (from to &optional _bg-color)
   (let* ((wrappoint (ps-find-wrappoint from to
                                       (ps-space-width 'ps-font-for-text)))
         (to (car wrappoint)))
@@ -6645,7 +6645,8 @@ If FACE is not a valid face name, use default face."
         (error "Unprinted PostScript"))))
 
 (cond ((fboundp 'add-hook)
-       (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check))
+       (unless noninteractive
+         (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check)))
       (kill-emacs-hook
        (message "Won't override existing `kill-emacs-hook'"))
       (t
@@ -6657,7 +6658,7 @@ If FACE is not a valid face name, use default face."
 ;; But autoload them here to make the separation invisible.
 \f
 ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize
-;;;;;;  ps-multibyte-buffer) "ps-mule" "ps-mule.el" "14536f28e0dcaa956901bb59ad86a875")
+;;;;;;  ps-multibyte-buffer) "ps-mule" "ps-mule.el" "1f436e4d78c7dc983a503dac18298515")
 ;;; Generated autoloads from ps-mule.el
 
 (defvar ps-multibyte-buffer nil "\