]> code.delx.au - gnu-emacs/blobdiff - lisp/ps-print.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / ps-print.el
index 0a2c214690fbff5a76574c6be5cfcff07bf497dc..7333709c19c0e23d9a0e43a2958ca68b52d6f37d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ps-print.el --- print text from the buffer as PostScript
 
-;; Copyright (C) 1993-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2016 Free Software Foundation, Inc.
 
 ;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
 ;;     Jacques Duthen (was <duthen@cegelec-red.fr>)
@@ -809,7 +809,7 @@ Please send all bug fixes and enhancements to
 ;; on next page.  Visually, valid values are (the character `+' at right of
 ;; each column indicates that a line is printed):
 ;;
-;;                `nil'        `follow'        `full'        `full-follow'
+;;                 nil         `follow'        `full'        `full-follow'
 ;; Current Page --------     -----------     ---------     ----------------
 ;;             1  XXXXX +   1  XXXXXXXX +   1  XXXXXX +   1  XXXXXXXXXXXXX +
 ;;             2  XXXXX +   2  XXXXXXXX +   2  XXXXXX +   2  XXXXXXXXXXXXX +
@@ -1475,6 +1475,8 @@ Please send all bug fixes and enhancements to
 ;; Load XEmacs/Emacs definitions
 (require 'ps-def)
 
+;; autoloads for secondary file
+(require 'ps-print-loaddefs)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; User Variables:
@@ -1684,7 +1686,7 @@ non-default settings would be \"LPT1\" to \"LPT3\" for parallel printers, or
 for a shared network printer.  You can also set it to a name of a file, in
 which case the output gets appended to that file.  \(Note that `ps-print'
 package already has facilities for printing to a file, so you might as well use
-them instead of changing the setting of this variable.\)  If you want to
+them instead of changing the setting of this variable.)  If you want to
 silently discard the printed output, set this to \"NUL\".
 
 Set to t, if the utility given by `ps-lpr-command' needs an empty printer name.
@@ -1953,7 +1955,7 @@ 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))
+   (setq ps-selected-pages \\='(1 4 (6 . 10) (12 . 16) 20))
 
 Combining with `ps-even-or-odd-pages' and option `ps-n-up-printing', we have:
 
@@ -2117,7 +2119,7 @@ See also documentation for `ps-zebra-stripes' and `ps-zebra-stripe-height'."
 Visually, valid values are (the character `+' at right of each column indicates
 that a line is printed):
 
-                  `nil'        `follow'        `full'        `full-follow'
+                   nil         `follow'        `full'        `full-follow'
    Current Page --------     -----------     ---------     ----------------
                1  XXXXX +   1  XXXXXXXX +   1  XXXXXX +   1  XXXXXXXXXXXXX +
                2  XXXXX +   2  XXXXXXXX +   2  XXXXXX +   2  XXXXXXXXXXXXX +
@@ -2249,9 +2251,9 @@ X, Y, XSCALE, YSCALE and ROTATION may be a floating point number, an integer
 number or a string.  If it is a string, the string should contain PostScript
 programming that returns a float or integer value.
 
-For example, if you wish to print an EPS image on all pages do:
+For example, if you wish to print an EPS image on all pages use:
 
-   '((\"~/images/EPS-image.ps\"))"
+   ((\"~/images/EPS-image.ps\"))"
   :type '(repeat
          (list
           (file   :tag "EPS File")
@@ -2300,9 +2302,9 @@ X, Y, FONTSIZE, GRAY and ROTATION may be a floating point number, an integer
 number or a string.  If it is a string, the string should contain PostScript
 programming that returns a float or integer value.
 
-For example, if you wish to print text \"Preliminary\" on all pages do:
+For example, if you wish to print text \"Preliminary\" on all pages use:
 
-   '((\"Preliminary\"))"
+   ((\"Preliminary\"))"
   :type '(repeat
          (list
           (string :tag "Text")
@@ -3172,7 +3174,7 @@ This variable is used only when `ps-print-color-p' is set to `black-white'."
       font-lock-variable-name-face
       font-lock-keyword-face
       font-lock-warning-face))
-  "A list of the \(non-bold\) faces that should be printed in bold font.
+  "A list of the (non-bold) faces that should be printed in bold font.
 This applies to generating PostScript."
   :type '(repeat face)
   :version "20"
@@ -3185,7 +3187,7 @@ This applies to generating PostScript."
       font-lock-string-face
       font-lock-comment-face
       font-lock-warning-face))
-  "A list of the \(non-italic\) faces that should be printed in italic font.
+  "A list of the (non-italic) faces that should be printed in italic font.
 This applies to generating PostScript."
   :type '(repeat face)
   :version "20"
@@ -3196,7 +3198,7 @@ This applies to generating PostScript."
     '(font-lock-function-name-face
       font-lock-constant-face
       font-lock-warning-face))
-  "A list of the \(non-underlined\) faces that should be printed underlined.
+  "A list of the (non-underlined) faces that should be printed underlined.
 This applies to generating PostScript."
   :type '(repeat face)
   :version "20"
@@ -3232,7 +3234,7 @@ in the PostScript array HeaderLinesLeft.
 
 Strings are inserted unchanged into the array; those representing
 PostScript string literals should be delimited with PostScript string
-delimiters '(' and ')'.
+delimiters `(' and `)'.
 
 For symbols with bound functions, the function is called and should return a
 string to be inserted into the array.  For symbols with bound values, the value
@@ -3286,8 +3288,8 @@ The value should be a list of strings and symbols, each representing an entry
 in the PostScript array FooterLinesLeft.
 
 Strings are inserted unchanged into the array; those representing PostScript
-string literals should be delimited with PostScript string delimiters '(' and
-')'.
+string literals should be delimited with PostScript string delimiters `(' and
+`)'.
 
 For symbols with bound functions, the function is called and should return a
 string to be inserted into the array.  For symbols with bound values, the value
@@ -3601,7 +3603,7 @@ image in a file with that name."
 (defun ps-line-lengths ()
   "Display the correspondence between a line length and a font size.
 Done using the current ps-print setup.
-Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"
+Try: pr -t file | awk \\='{printf \"%3d %s\n\", length($0), $0}\\=' | sort -r | head"
   (interactive)
   (ps-line-lengths-internal))
 
@@ -4308,7 +4310,7 @@ which long lines wrap around."
 (defun ps-line-lengths-internal ()
   "Display the correspondence between a line length and a font size.
 Done using the current ps-print setup.
-Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"
+Try: pr -t file | awk \\='{printf \"%3d %s\n\", length($0), $0}\\=' | sort -r | head"
   (let* ((ps-font-size-internal
          (or ps-font-size-internal
              (ps-get-font-size 'ps-font-size)))
@@ -4604,8 +4606,8 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
                       (setq prompt "File is unwritable"))
                      ((file-exists-p res)
                       (setq prompt "File exists")
-                      (not (y-or-n-p (format "File `%s' exists; overwrite? "
-                                             res))))
+                      (not (y-or-n-p (format-message
+                                      "File `%s' exists; overwrite? " res))))
                      (t nil))
           (setq res (read-file-name
                      (format "%s; save PostScript to file: " prompt)
@@ -5711,7 +5713,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
         (error "Invalid %s `%S'%s"
                mess size
                (if arg
-                   (format " for `%S'" arg)
+                   (format-message " for `%S'" arg)
                  "")))
     siz))
 
@@ -6043,10 +6045,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
            (progn
              (setq ps-razchunk q-done)
              (message "Formatting...%3d%%"
-                      (if (< q-todo 100)
-                          (/ (* 100 q-done) q-todo)
-                        (/ q-done (/ q-todo 100)))
-                      ))))))
+                      (floor (* 100.0 q-done) q-todo)))))))
 
 (defvar ps-last-font nil)
 
@@ -6587,79 +6586,6 @@ If FACE is not a valid face name, use default face."
 (unless noninteractive
   (add-hook 'kill-emacs-hook #'ps-kill-emacs-check))
 
-\f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; To make this file smaller, some commands go in a separate file.
-;; But autoload them here to make the separation invisible.
-\f
-;;;### (autoloads nil "ps-mule" "ps-mule.el" "231b07356e5a37ebf517c613a3a12bba")
-;;; Generated autoloads from ps-mule.el
-
-(defvar ps-multibyte-buffer nil "\
-Specifies the multi-byte buffer handling.
-
-Valid values are:
-
-  nil                    This is the value to use the default settings;
-                         by default, this only works to print buffers with
-                         only ASCII and Latin characters.   But this default
-                         setting can be changed by setting the variable
-                         `ps-mule-font-info-database-default' differently.
-                         The initial value of this variable is
-                         `ps-mule-font-info-database-latin' (see
-                         documentation).
-
-  `non-latin-printer'    This is the value to use when you have a Japanese
-                         or Korean PostScript printer and want to print
-                         buffer with ASCII, Latin-1, Japanese (JISX0208 and
-                         JISX0201-Kana) and Korean characters.  At present,
-                         it was not tested with the Korean characters
-                         printing.  If you have a korean PostScript printer,
-                         please, test it.
-
-  `bdf-font'             This is the value to use when you want to print
-                         buffer with BDF fonts.  BDF fonts include both latin
-                         and non-latin fonts.  BDF (Bitmap Distribution
-                         Format) is a format used for distributing X's font
-                         source file.  BDF fonts are included in
-                         `intlfonts-1.2' which is a collection of X11 fonts
-                         for all characters supported by Emacs.  In order to
-                         use this value, be sure to have installed
-                         `intlfonts-1.2' and set the variable
-                         `bdf-directory-list' appropriately (see ps-bdf.el for
-                         documentation of this variable).
-
-  `bdf-font-except-latin' This is like `bdf-font' except that it uses
-                         PostScript default fonts to print ASCII and Latin-1
-                         characters.  This is convenient when you want or
-                         need to use both latin and non-latin characters on
-                         the same buffer.  See `ps-font-family',
-                         `ps-header-font-family' and `ps-font-info-database'.
-
-Any other value is treated as nil.")
-
-(custom-autoload 'ps-multibyte-buffer "ps-mule" t)
-
-(autoload 'ps-mule-initialize "ps-mule" "\
-Initialize global data for printing multi-byte characters.
-
-\(fn)" nil nil)
-
-(autoload 'ps-mule-begin-job "ps-mule" "\
-Start printing job for multi-byte chars between FROM and TO.
-It checks if all multi-byte characters in the region are printable or not.
-
-\(fn FROM TO)" nil nil)
-
-(autoload 'ps-mule-end-job "ps-mule" "\
-Finish printing job for multi-byte chars.
-
-\(fn)" nil nil)
-
-;;;***
-\f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 (provide 'ps-print)
 
 ;;; ps-print.el ends here