• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:face +defs:or +defs:list

28 ;; GNU Emacs is free software; you can redistribute it and/or modify it under
30 ;; Software Foundation; either version 2, or (at your option) any later
34 ;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
51 ;; output. ps-print is intended for use with Emacs or XEmacs, together with a
52 ;; fontifying package such as font-lock or hilit.
54 ;; ps-print uses the same face attributes defined through font-lock or hilit to
58 ;; ps-print allows a remap of face to another one that it is better to print,
59 ;; for example, the face font-lock-comment-face (if you are using font-lock)
60 ;; could have bold or italic attribute when printing, besides foreground color.
80 ;; PostScript images suitable for printing on a PostScript printer or
84 ;; The word "print" or "spool" in the command name determines when the
95 ;; messages or netnews articles) to save paper that would otherwise be wasted
107 ;; The word "buffer" or "region" in the command name determines how much of the
117 ;; without the -with-faces suffix don't include font, color, or underline
124 ;; color, or underline information, and
140 ;; or substitute one of the other seven ps-print- commands. The command will
141 ;; generate the PostScript image and print or spool it as specified. By giving
207 ;; If you're using Emacs for Windows 95/98/NT or MS-DOS, don't forget to
210 ;; `ps-spool-config'. See these variables documentation in the code or by
250 ;; - multi-column portrait or landscape mode.
257 ;; The `upside-down' orientation can be used in portrait or landscape mode.
260 ;; nil, all pages are printed. If it's a list, the list element may be an
261 ;; integer or a cons cell (FROM . TO) designating FROM page to TO page; any
262 ;; invalid element is ignored, that is, an integer lesser than one or if FROM
267 ;; latest selected pages by using `ps-last-selected-pages' or by calling
270 ;; The variable `ps-even-or-odd-pages' specifies if it prints even/odd pages.
286 ;; See `ps-even-or-odd-pages' for more detailed documentation.
322 ;; | text | or | text | or | text | or | text |
344 ;; ps-print can print headers at the top of each column or at the top of each
367 ;; or a list of 3 float numbers which corresponds to the
386 ;; Don't change this alist directly, instead use customization, or `ps-value',
424 ;; the left or right side of the header. Each element of the list should be a
425 ;; string or a symbol. Strings are inserted directly into the PostScript
428 ;; Symbols in the header format lists can either represent functions or
431 ;; either case, function or variable, the PostScript string delimiters are
451 ;; (setq ps-left-header (list 'moe-func 'larry-var "(Curly)"))
482 ;; (list (concat "{pagenumberstring dup stringwidth pop"
492 ;; `ps-print-prologue-header' may be a string or a symbol function which
521 ;; `ps-user-defined-prologue' may be a string or a symbol function which
529 ;; It's strongly recommended only insert PostScript code and/or comments
533 ;; Do not insert code for duplex printing, n-up printing or error handler,
565 ;; system send back an email reporting the error, or if
613 ;; or right. If `ps-spool-tumble' is non-nil, produces output suitable for
614 ;; binding at the top or bottom. It has effect only when `ps-spool-duplex' is
623 ;; buffer (or region) is ^L (\014).
639 ;; sheet border and the n-up printing. The default is 1 cm (or 0.3937 inches,
640 ;; or 28.35 points).
680 ;; any control or non-ASCII character. Control characters are
685 ;; any control character, whether it is 7 or 8-bit.
716 ;; See `ps-zebra-color' for documentation. The default is "black" (or 0.0, or
740 ;; printed. If it's lesser than or equal to zero, it's used the
804 ;; The variable `ps-zebra-color' controls the zebra stripes gray scale or RGB
806 ;; color), a string which is a color name, or a list of 3 numbers which
808 ;; The default is 0.95 (or "gray95", or '(0.95 0.95 0.95)).
868 ;; column that `ps-print-begin-page-hook' is evaluated or that
876 ;; `ps-font-info-database' contains information for a list of font families
889 ;; ordinary text, when generating PostScript. Its value is a float or a cons
915 ;; should be a regexp or nil. The default value is "[ \t]*$", that is, an
916 ;; empty line or a line containing only spaces and tabs.
951 ;; - send this file to the printer (or to ghostscript).
978 ;; or, use `ps-print-hook' (see section Hooks):
981 ;; (or (assq 'Helvetica ps-font-info-database)
990 ;; (w3-table-hack-x-face . "LineDrawNormal"))
999 ;; Note that on above example the `w3-table-hack-x-face' entry refers to a face
1000 ;; symbol, so when printing this face it'll be used the font `LineDrawNormal'.
1001 ;; If the face `w3-table-hack-x-face' is remapped to use bold and/or italic
1002 ;; attribute, the corresponding entry (bold, italic or bold-italic) will be
1003 ;; used instead of `w3-table-hack-x-face' entry.
1009 ;; (fonts (w3-table-hack-x-face . "LineDrawNormal")
1026 ;; If you send it to ghostscript or to another PostScript printer, you may get
1038 ;; be printed in bold or italic, but their guesses aren't always right. For
1042 ;; It is possible to force ps-print to consider specific faces bold, italic or
1046 ;; italic or underline; to set them, put code like the following into your
1049 ;; (setq ps-bold-faces '(my-blue-face))
1050 ;; (setq ps-italic-faces '(my-red-face))
1051 ;; (setq ps-underlined-faces '(my-green-face))
1062 ;; of sync, if a face changes, or if new faces are added. To get the lists
1063 ;; back in sync, you can set the variable `ps-build-face-reference' to t, and
1066 ;; `ps-always-build-face-reference' to t.
1068 ;; If you need to print without worrying about face background color, set the
1069 ;; variable `ps-use-face-background' which specifies if face background should
1072 ;; t always use face background color.
1073 ;; nil never use face background color.
1074 ;; (face...) list of faces whose background color will be used.
1106 ;; See the documentation for `ps-extend-face'.
1108 ;; Let's, for example, remap `font-lock-keyword-face' to another foreground
1111 ;; (ps-extend-face '(font-lock-keyword-face "RoyalBlue" nil bold) 'MERGE)
1113 ;; If you want to use a new face, define it first with `defface', and then call
1114 ;; `ps-extend-face' to specify how to print it.
1120 ;; ps-print can print texts and/or EPS PostScript images on background; it is
1140 ;; 5 (11 . 17)) ; page list
1154 ;; 5 (11 . 17)) ; page list
1157 ;; If it is not possible to read (or does not exist) an image file, that file
1189 ;; allow the number of lines of the current buffer or of its current region to
1240 ;; `ps-even-or-odd-pages'
1247 ;; `ps-zebra-stripe-follow' and `ps-use-face-background'.
1297 ;; New face attributes.
1300 ;; Text and/or image on background.
1314 ;; particular, bold or italic fonts don't print in the right background color.
1319 ;; hilit19 and older versions of get-create-face. Users having problems with
1321 ;; and `ps-underlined-faces' and/or turn off automatic detection by setting
1358 ;; Thanks to Adam Doppelt <adoppelt@avogadro.com> for face mapping suggestion
1448 (or (featurep 'lisp-float-type)
1464 (or (fboundp 'line-beginning-position)
1482 (defalias 'ps-x-extent-face 'extent-face)
1485 (defalias 'ps-x-face-font-instance 'face-font-instance)
1492 (defalias 'ps-e-face-bold-p 'face-bold-p)
1493 (defalias 'ps-e-face-italic-p 'face-italic-p)
1526 (defun ps-face-foreground-name (face)
1527 (ps-xemacs-color-name (face-foreground face)))
1528 (defun ps-face-background-name (face)
1529 (ps-xemacs-color-name (face-background face)))
1531 (t ; Emacs 22 or higher
1532 (defun ps-face-foreground-name (face)
1533 (face-foreground face nil t))
1534 (defun ps-face-background-name (face)
1535 (face-background face nil t))
1594 (defgroup ps-print-face nil
1656 send back an email reporting the error, or if there is
1674 `ps-user-defined-prologue' may be a string or a symbol function which returns a
1680 It's strongly recommended only insert PostScript code and/or comments specific
1684 Do not insert code for duplex printing, n-up printing or error handler,
1706 `ps-print-prologue-header' may be a string or a symbol function which returns a
1741 printer device or port to which PostScript files are written, provided
1743 non-default settings would be \"LPT1\" to \"LPT3\" for parallel printers, or
1744 \"COM1\" to \"COM4\" or \"AUX\" for serial printers, or \"\\\\hostname\\printer\"
1782 Set this to \"\" or nil, if the utility given by `ps-lpr-command'
1810 "*A list of extra switches to pass to `ps-lpr-command'."
1863 (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4")
1864 (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3")
1865 (list 'letter (* 72 8.5) (* 72 11.0) "Letter")
1866 (list 'legal (* 72 8.5) (* 72 14.0) "Legal")
1867 (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall")
1868 (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid")
1869 (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger")
1870 (list 'statement (* 72 5.5) (* 72 8.5) "Statement")
1871 (list 'executive (* 72 7.5) (* 72 10.0) "Executive")
1872 (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small")
1873 (list 'b4 (* 72 10.125) (* 72 14.33) "B4")
1874 (list 'b5 (* 72 7.16) (* 72 10.125) "B5"))
1877 :type '(repeat (list :tag "Paper Type"
1889 example `letter', `legal' or `a4'."
1924 If a list, the lists element may be an integer or a cons cell (FROM . TO)
1926 integer lesser than one or if FROM is greater than TO.
1933 `ps-last-selected-pages' or with the `ps-restore-selected-pages'
1936 See also `ps-even-or-odd-pages'."
1946 (defcustom ps-even-or-odd-pages nil
1970 filtered by `ps-selected-pages' and then by `ps-even-or-odd-pages'. For
1975 Combining with `ps-even-or-odd-pages' and `ps-n-up-printing', we have:
1978 `ps-even-or-odd-pages' PAGES PRINTED
1986 `ps-even-or-odd-pages' PAGES PRINTED
2013 any control or non-ASCII character. Control characters are
2018 any control character, whether it is 7 or 8-bit.
2118 "*Zebra stripe gray scale or RGB color.
2124 (list :tag "RGB Color" :value (0.95 0.95 0.95)
2197 printed. If it's lesser than or equal to zero, it's used the
2242 "*EPS image list to be printed on background.
2248 FILENAME is a file name which contains an EPS image or some PostScript
2250 FILENAME is ignored, if it doesn't exist or is read protected.
2261 PAGES may be a number or a cons cell (FROM . TO) designating FROM page to TO
2266 number or a string. If it is a string, the string should contain PostScript
2267 programming that returns a float or integer value.
2273 (list
2289 "*Text list to be printed on background.
2312 PAGES may be a number or a cons cell (FROM . TO) designating FROM page to TO
2317 number or a string. If it is a string, the string should contain PostScript
2318 programming that returns a float or integer value.
2324 (list
2450 or a list of 3 float numbers which corresponds to the
2465 Don't change this alist directly, instead use customization, or `ps-value',
2477 (list :tag "RGB Color" :value (0.0 0.0 0.0)
2487 (list :tag "RGB Color" :value (0.9 0.9 0.9)
2500 (list :tag "RGB Color" :value (0.0 0.0 0.0)
2510 (list :tag "RGB Color" :value (0.0 0.0 0.0)
2546 Don't change this alist directly, instead use customization, or `ps-value',
2559 (list :tag "RGB Color" :value (0.0 0.0 0.0)
2569 (list :tag "RGB Color" :value (0.9 0.9 0.9)
2582 (list :tag "RGB Color" :value (0.0 0.0 0.0)
2592 (list :tag "RGB Color" :value (0.0 0.0 0.0)
2608 only one header/footer over all columns or one header/footer per column.
2615 "*Specify if headers/footers are switched or not.
2698 or right. If `ps-spool-tumble' is non-nil, produces output suitable for
2699 binding at the top or bottom.
2837 (list :tag "Font Definition"
2933 (list :tag "RGB Color" :value (0 0 0)
2967 (or (fboundp 'x-color-values) ; Emacs
2994 ps-print, that is, if there is a face in a text that doesn't have a foreground
3009 LIST It's a list of RGB values, that is a list of three real values
3026 (list :tag "RGB Color" :value (0.0 0.0 0.0)
3037 ps-print, that is, if there is a face in a text that doesn't have a background
3052 LIST It's a list of RGB values, that is a list of three real values
3064 See also `ps-use-face-background'."
3071 (list :tag "RGB Color" :value (1.0 1.0 1.0)
3079 "*Non-nil means automatically detect bold/italic/underline face attributes.
3087 '((font-lock-builtin-face "black" nil bold )
3088 (font-lock-comment-face "gray20" nil italic)
3089 (font-lock-constant-face "black" nil bold )
3090 (font-lock-function-name-face "black" nil bold )
3091 (font-lock-keyword-face "black" nil bold )
3092 (font-lock-string-face "black" nil italic)
3093 (font-lock-type-face "black" nil italic)
3094 (font-lock-variable-name-face "black" nil bold italic)
3095 (font-lock-warning-face "black" nil bold italic))
3096 "*Specify list of face attributes to print colors on black/white printers.
3098 The list elements are the same as defined on `ps-extend-face' (which see).
3103 (list :tag "Face Specification"
3104 (face :tag "Face Symbol")
3124 :group 'ps-print-face)
3128 '(font-lock-function-name-face
3129 font-lock-builtin-face
3130 font-lock-variable-name-face
3131 font-lock-keyword-face
3132 font-lock-warning-face))
3133 "*A list of the \(non-bold\) faces that should be printed in bold font.
3135 :type '(repeat face)
3137 :group 'ps-print-face)
3141 '(font-lock-variable-name-face
3142 font-lock-type-face
3143 font-lock-string-face
3144 font-lock-comment-face
3145 font-lock-warning-face))
3146 "*A list of the \(non-italic\) faces that should be printed in italic font.
3148 :type '(repeat face)
3150 :group 'ps-print-face)
3154 '(font-lock-function-name-face
3155 font-lock-constant-face
3156 font-lock-warning-face))
3157 "*A list of the \(non-underlined\) faces that should be printed underlined.
3159 :type '(repeat face)
3161 :group 'ps-print-face)
3163 (defcustom ps-use-face-background nil
3164 "*Specify if face background should be used.
3168 t always use face background color.
3169 nil never use face background color.
3170 (face...) list of faces whose background color will be used.
3179 face))
3181 :group 'ps-print-face)
3184 (list 'ps-get-buffer-name 'ps-header-dirpart)
3188 The value should be a list of strings and symbols, each representing an entry
3197 should be a string to be inserted into the array. In either case, function or
3208 (list "/pagenumberstring load"
3239 (list 'ps-get-buffer-name 'ps-header-dirpart)
3243 The value should be a list of strings and symbols, each representing an entry
3252 should be a string to be inserted into the array. In either case, function or
3263 (list "/pagenumberstring load"
3307 (defcustom ps-build-face-reference t
3308 "*Non-nil means build the reference face lists.
3316 face, or create new faces. Most users shouldn't have to worry about its
3320 :group 'ps-print-face)
3322 (defcustom ps-always-build-face-reference nil
3323 "*Non-nil means always rebuild the reference face lists.
3330 :group 'ps-print-face)
3334 It's like the very first character of buffer (or region) is ^L (\\014)."
3340 (or (if (featurep 'xemacs)
3390 It should be a regexp or nil.
3467 (interactive (list (ps-print-preprint current-prefix-arg)))
3477 (interactive (list (ps-print-preprint current-prefix-arg)))
3554 (interactive (list (ps-print-preprint current-prefix-arg)))
3588 (list
3623 '(23 . ps-use-face-background)
3688 '(23 . ps-even-or-odd-pages)
3692 '(31 . ps-build-face-reference)
3693 '(31 . ps-always-build-face-reference)
3763 ((or (symbolp val) (listp val))
3775 "Return value from association list ALIST-SYM which car is `eq' to KEY."
3780 "Return element from association list ALIST-SYM which car is `eq' to KEY."
3785 "Store element (KEY . VALUE) into association list ALIST-SYM.
3797 "Delete by side effect element KEY from association list ALIST-SYM."
3798 (let ((a:list: (symbol-value alist-sym)) ; to avoid name conflict
3800 (while a:list:
3801 (if (eq key (car (car a:list:)))
3804 (setcdr old (cdr a:list:))
3805 (set alist-sym (cdr a:list:)))
3806 (setq a:list: nil))
3807 (setq old a:list:
3808 a:list: (cdr a:list:)))))
3838 (or (< emacs-major-version 19)
3849 (or (> emacs-major-version 19)
3862 (defun ps-mapper (extent list)
3863 (nconc list
3864 (list (list (ps-x-extent-start-position extent) 'push extent)
3865 (list (ps-x-extent-end-position extent) 'pull extent)))
3871 (defun ps-xemacs-face-kind-p (face kind kind-regex)
3872 (let* ((frame-font (or (ps-x-face-font-instance face)
3873 (ps-x-face-font-instance 'default)))
3890 (or (ps-x-find-coding-system 'raw-text-unix)
3907 (defun ps-face-bold-p (face)
3908 (or (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold")
3909 (memq face ps-bold-faces))) ; Kludge-compatible
3911 (defun ps-face-italic-p (face)
3912 (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o")
3913 (ps-xemacs-face-kind-p face 'SLANT "i\\|o")
3914 (memq face ps-italic-faces))) ; Kludge-compatible
3928 (defun ps-face-bold-p (face)
3929 (or (ps-e-face-bold-p face)
3930 (memq face ps-bold-faces)))
3932 (defun ps-face-italic-p (face)
3933 (or (ps-e-face-italic-p face)
3934 (memq face ps-italic-faces)))
3946 (defun ps-face-underlined-p (face)
3947 (or (face-underline-p face)
3948 (memq face ps-underlined-faces)))
3998 (defvar ps-control-or-escape-regexp nil)
4039 ;; Define accessors to the dimensions list.
4068 An element of this list has the same form as `ps-print-face-extension-alist'
4071 Don't change this list directly; instead,
4072 use `ps-extend-face' and `ps-extend-face-list'.
4073 See documentation for `ps-extend-face' for valid extension symbol.
4077 (defvar ps-print-face-extension-alist nil
4079 An element of this list has the following form:
4083 FACE is a symbol denoting a face name
4086 (see documentation for `ps-print-face-map-alist')
4087 FG foreground color (string or nil)
4088 BG background color (string or nil)
4090 Don't change this list directly; instead,
4091 use `ps-extend-face' and `ps-extend-face-list'.
4092 See documentation for `ps-extend-face' for valid extension symbol.")
4095 (defvar ps-print-face-alist nil
4098 An element of this list has the same form as an element of
4099 `ps-print-face-extension-alist'.
4101 Don't change this list directly; this list is used by `ps-face-attributes',
4102 `ps-map-face' and `ps-build-reference-face-lists'.")
4105 (defconst ps-print-face-map-alist
4124 (defun ps-extend-face-list (face-extension-list &optional merge-p alist-sym)
4125 "Extend face in ALIST-SYM.
4128 with face extension in ALIST-SYM; otherwise, overrides.
4130 If optional ALIST-SYM is nil, `ps-print-face-extension-alist' is used;
4133 The elements in FACE-EXTENSION-LIST are like those for `ps-extend-face'.
4135 See `ps-extend-face' for documentation."
4136 (while face-extension-list
4137 (ps-extend-face (car face-extension-list) merge-p alist-sym)
4138 (setq face-extension-list (cdr face-extension-list))))
4142 (defun ps-extend-face (face-extension &optional merge-p alist-sym)
4143 "Extend face in ALIST-SYM.
4145 If optional MERGE-P is non-nil, extensions in FACE-EXTENSION list are merged
4146 with face extensions in ALIST-SYM; otherwise, overrides.
4148 If optional ALIST-SYM is nil, `ps-print-face-extension-alist' is used;
4151 The elements of FACE-EXTENSION list have the form:
4155 FACE-NAME is a face name symbol.
4157 FOREGROUND and BACKGROUND may be nil or a string that denotes the
4171 (or alist-sym
4172 (setq alist-sym 'ps-print-face-extension-alist))
4173 (let* ((background (nth 2 face-extension))
4174 (foreground (nth 1 face-extension))
4175 (face-name (nth 0 face-extension))
4176 (ps-face (cdr (assq face-name (symbol-value alist-sym))))
4177 (face-vector (or ps-face (vector 0 nil nil)))
4178 (face-bit (ps-extension-bit face-extension)))
4179 ;; extend face
4180 (aset face-vector 0 (if merge-p
4181 (logior (aref face-vector 0) face-bit)
4182 face-bit))
4183 (and (or (not merge-p) (and foreground (stringp foreground)))
4184 (aset face-vector 1 foreground))
4185 (and (or (not merge-p) (and background (stringp background)))
4186 (aset face-vector 2 background))
4187 ;; if face does not exist, insert it
4188 (or ps-face
4189 (set alist-sym (cons (cons face-name face-vector)
4193 (defun ps-extension-bit (face-extension)
4194 (let ((face-bit 0))
4196 (setq face-extension (cdr (cdr face-extension)))
4197 (while (setq face-extension (cdr face-extension))
4198 (setq face-bit (logior face-bit
4199 (or (cdr (assq (car face-extension)
4200 ps-print-face-map-alist))
4202 face-bit))
4208 ;; Originally face attributes were specified via `font-lock-face-attributes'.
4209 ;; Users then changed the default face attributes by setting that variable.
4211 ;; for faces where M-x customize has been used to save changes for the face.
4214 (defun ps-font-lock-face-attributes ()
4216 (boundp 'font-lock-face-attributes)
4217 (let ((face-attributes (symbol-value 'font-lock-face-attributes)))
4218 (while face-attributes
4219 (let* ((face-attribute
4220 (car (prog1 face-attributes
4221 (setq face-attributes (cdr face-attributes)))))
4222 (face (car face-attribute)))
4224 ;; `font-lock-face-attributes' entry.
4225 (unless (get face 'saved-face)
4226 (let ((foreground (nth 1 face-attribute))
4227 (background (nth 2 face-attribute))
4228 (bold-p (nth 3 face-attribute))
4229 (italic-p (nth 4 face-attribute))
4230 (underline-p (nth 5 face-attribute))
4231 face-spec)
4233 (setq face-spec (cons ':foreground
4234 (cons foreground face-spec))))
4236 (setq face-spec (cons ':background
4237 (cons background face-spec))))
4239 (setq face-spec (append '(:weight bold) face-spec)))
4241 (setq face-spec (append '(:slant italic) face-spec)))
4243 (setq face-spec (append '(:underline t) face-spec)))
4244 (custom-declare-face face (list (list t face-spec)) nil)
4290 (or (and from to)
4293 (list (count-lines from to))))
4335 (let* ((font-list (ps-font-alist font-sym))
4336 (normal-font (cdr (assq 'normal font-list))))
4337 (while (and font-list (not (eq font-type (car (car font-list)))))
4338 (setq font-list (cdr font-list)))
4339 (or (cdr (car font-list)) normal-font)))
4345 (or (ps-alist-position font-type (ps-font-alist font-sym))
4381 (or ps-font-size-internal
4384 (or ps-header-font-size-internal
4387 (or ps-header-title-font-size-internal
4412 (or (bobp) (insert "\n" (make-string 75 ?\;) "\n"))
4428 (or ps-font-size-internal
4431 (or ps-header-font-size-internal
4434 (or ps-header-title-font-size-internal
4437 (or ps-line-spacing-internal
4468 (or (bobp) (insert "\n" (make-string 75 ?\;) "\n"))
4487 (or font-entry
4624 ;; ps-zebra-stripe-follow is `full' or `full-follow'
4647 (or (ps-mark-active-p)
4649 (list (point) (mark) (ps-print-preprint prefix-arg)))
4654 (or (numberp prefix-arg)
4656 (let* ((name (concat (file-name-nondirectory (or (buffer-file-name)
4669 (not (y-or-n-p (format "File `%s' exists; overwrite? "
4680 ;; The following functions implement a simple list-buffering scheme so
4733 (setq ps-output-head (list "")
4757 (cond ((eq ps-even-or-odd-pages 'even-page)
4759 ((eq ps-even-or-odd-pages 'odd-page)
4767 (cond ((eq ps-even-or-odd-pages 'even-sheet)
4769 ((eq ps-even-or-odd-pages 'odd-sheet)
4784 ;; Output strings in the list ARGS in the PostScript prologue part.
4786 (ps-output 'prologue (if (stringp args) (list args) args)))
4820 (defun ps-generate-string-list (content)
4847 (setq ps-lh-cache (ps-generate-string-list ps-left-header)
4848 ps-rh-cache (ps-generate-string-list ps-right-header)))
4850 (setq ps-lf-cache (ps-generate-string-list ps-left-footer)
4851 ps-rf-cache (ps-generate-string-list ps-right-footer)))
4901 (ps-float-format (or (cdr (assq 'border-width alist)) 0.4))
4907 (defun ps-background-pages (page-list func)
4908 (if page-list
4914 (add-to-list 'ps-background-pages (vector start end func)))))
4915 page-list)
4950 (let ((literal (or value default)))
4969 (format "/%s " (or (nth 3 text) "Times-Roman")) ; font name
4976 (ps-background-pages (nthcdr 7 text) ; page list
5017 (ps-background-pages (nthcdr 6 image) ; page list
5037 ;; Return a list of the distinct elements of LIST.
5039 (defun ps-remove-duplicates (list)
5040 (let (new (tail list))
5042 (or (member (car tail) new)
5049 ;; Return the index of the matching item, or nil if not found.
5051 (defun ps-alist-position (item list)
5052 (let ((tail list) (index 0) found)
5378 (let ((the-list (cdr (assq ps-paper-type ps-n-up-database))))
5379 (and the-list
5380 (while (> ps-n-up-printing (caar the-list))
5381 (setq the-list (cdr the-list))))
5382 (car the-list)))
5475 (cdr (or (assq ps-n-up-filling ps-n-up-filling-database)
5530 (list (ps-font 'ps-font-for-header 'normal)
5551 (or (cdr (assoc ps-error-handler-message
5562 (or ps-landscape-mode
5616 (or (cdr (assq ps-zebra-stripe-follow
5677 (list (ps-font 'ps-font-for-header 'normal)
5839 (list color color color))
5845 (list default default default))))
5850 (or (equal ps-mark-code-directory ps-postscript-code-directory)
5872 ;; face background
5873 (or (listp ps-use-face-background)
5874 (setq ps-use-face-background t))
5909 ps-control-or-escape-regexp
5924 (ps-face-background-name 'default))
5936 (ps-face-foreground-name 'default))
6035 (or ps-lh-cache ps-left-header))
6037 (or ps-rh-cache ps-right-header))
6044 (or ps-lf-cache ps-left-footer))
6046 (or ps-rf-cache ps-right-footer))
6158 (setq ps-current-color (or color ps-default-foreground))
6186 (or (equal font ps-current-font)
6191 (let ((fg (or fg-color ps-default-foreground)))
6192 (or (equal fg ps-current-color)
6195 (or (equal bg-color ps-current-bg)
6223 (if (re-search-forward ps-control-or-escape-regexp to t)
6224 ;; region with some control characters or some multi-byte characters
6274 (setq match (or (aref ps-print-translation-table match) match))
6278 (or (eq charset 'composition)
6282 (or (aref ps-print-translation-table ch)
6330 (defun ps-face-attributes (face)
6331 "Return face attribute vector.
6333 If FACE is not in `ps-print-face-extension-alist' or in
6334 `ps-print-face-alist', insert it on `ps-print-face-alist' and
6337 If FACE is not a valid face name, use default face."
6340 (or (and (symbolp face)
6341 (cdr (assq face ps-black-white-faces-alist)))
6343 ((symbolp face)
6344 (cdr (or (assq face ps-print-face-extension-alist)
6345 (assq face ps-print-face-alist)
6346 (let* ((the-face (if (facep face) face 'default))
6347 (new-face (ps-screen-to-bit-face the-face)))
6348 (or (and (eq the-face 'default)
6349 (assq the-face ps-print-face-alist))
6350 (setq ps-print-face-alist
6351 (cons new-face ps-print-face-alist)))
6352 new-face))))
6353 ((eq (car face) 'foreground-color)
6354 (vector 0 (cdr face) nil))
6355 ((eq (car face) 'background-color)
6356 (vector 0 nil (cdr face)))
6361 (defun ps-face-background (face background)
6362 (and (cond ((eq ps-use-face-background t)) ; always
6363 ((null ps-use-face-background) nil) ; never
6364 ;; ps-user-face-background is a symbol face list
6365 ((symbolp face)
6366 (memq face ps-use-face-background))
6367 ((listp face)
6368 (or (memq (car face) '(foreground-color background-color))
6370 (while face
6371 (if (or (memq (car face) ps-use-face-background)
6372 (memq (car face)
6374 (setq face nil
6376 (setq face (cdr face))))
6384 (defun ps-face-attribute-list (face-or-list)
6386 ;; simple face
6387 ((not (listp face-or-list))
6388 (ps-face-attributes face-or-list))
6389 ;; only foreground color, not a `real' face
6390 ((eq (car face-or-list) 'foreground-color)
6391 (vector 0 (cdr face-or-list) nil))
6392 ;; only background color, not a `real' face
6393 ((eq (car face-or-list) 'background-color)
6394 (vector 0 nil (cdr face-or-list)))
6395 ;; list of faces
6398 foreground background face-attr face)
6399 (while face-or-list
6400 (setq face (car face-or-list)
6401 face-or-list (cdr face-or-list)
6402 face-attr (ps-face-attributes face)
6403 effects (logior effects (aref face-attr 0)))
6404 (or foreground (setq foreground (aref face-attr 1)))
6405 (or background
6406 (setq background (ps-face-background face (aref face-attr 2)))))
6413 (defun ps-plot-with-face (from to face)
6415 ((null face) ; print text with null face
6417 ((eq face 'emacs--invisible--face)) ; skip invisible text!!!
6418 (t ; otherwise, text has a valid face
6419 (let* ((face-bit (ps-face-attribute-list face))
6420 (effect (aref face-bit 0))
6421 (foreground (aref face-bit 1))
6422 (background (ps-face-background face (aref face-bit 2)))
6431 (or (aref ps-font-type (logand effect 3))
6432 face))
6437 ;; Ensure that face-list is fbound.
6438 (or (fboundp 'face-list) (defalias 'face-list 'list-faces))
6441 (defun ps-build-reference-face-lists ()
6442 ;; Ensure that face database is updated with faces on
6443 ;; `font-lock-face-attributes' (obsolete stuff)
6444 (ps-font-lock-face-attributes)
6445 ;; Now, rebuild reference face lists
6446 (setq ps-print-face-alist nil)
6448 (mapcar 'ps-map-face (face-list))
6449 (mapcar 'ps-set-face-bold ps-bold-faces)
6450 (mapcar 'ps-set-face-italic ps-italic-faces)
6451 (mapcar 'ps-set-face-underline ps-underlined-faces))
6452 (setq ps-build-face-reference nil))
6455 (defun ps-set-face-bold (face)
6456 (ps-set-face-attribute face 1))
6458 (defun ps-set-face-italic (face)
6459 (ps-set-face-attribute face 2))
6461 (defun ps-set-face-underline (face)
6462 (ps-set-face-attribute face 4))
6465 (defun ps-set-face-attribute (face effect)
6466 (let ((face-bit (cdr (ps-map-face face))))
6467 (aset face-bit 0 (logior (aref face-bit 0) effect))))
6470 (defun ps-map-face (face)
6471 (let* ((face-map (ps-screen-to-bit-face face))
6472 (ps-face-bit (cdr (assq (car face-map) ps-print-face-alist))))
6473 (if ps-face-bit
6474 ;; if face exists, merge both
6475 (let ((face-bit (cdr face-map)))
6476 (aset ps-face-bit 0 (logior (aref ps-face-bit 0) (aref face-bit 0)))
6477 (or (aref ps-face-bit 1) (aset ps-face-bit 1 (aref face-bit 1)))
6478 (or (aref ps-face-bit 2) (aset ps-face-bit 2 (aref face-bit 2))))
6479 ;; if face does not exist, insert it
6480 (setq ps-print-face-alist (cons face-map ps-print-face-alist)))
6481 face-map))
6484 (defun ps-screen-to-bit-face (face)
6485 (cons face
6486 (vector (logior (if (ps-face-bold-p face) 1 0) ; bold
6487 (if (ps-face-italic-p face) 2 0) ; italic
6488 (if (ps-face-underlined-p face) 4 0)) ; underline
6489 (ps-face-foreground-name face)
6490 (ps-face-background-name face))))
6511 (when (or ps-always-build-face-reference
6512 ps-build-face-reference)
6513 (message "Collecting face information...")
6514 (ps-build-reference-face-lists))
6519 (ps-extend-face-list ps-black-white-faces nil
6526 (let ((face 'default)
6530 ;; Build the list of extents...
6532 record type extent extent-list)
6535 extent-list nil)
6553 ;; but don't call ps-plot-with-face unless from > point-min.
6555 (ps-plot-with-face from (min position (point-max)) face))
6559 (and (ps-x-extent-face extent)
6560 (setq extent-list (sort (cons extent extent-list)
6564 (setq extent-list (sort (delq extent extent-list)
6567 (setq face (if extent-list
6568 (ps-x-extent-face (car extent-list))
6594 ;; a face text property.
6595 (setq face
6601 (or (memq prop save-buffer-invisibility-spec)
6603 'emacs--invisible--face)
6604 ((get-text-property from 'face))
6607 (face-priority -1)) ; text-property
6609 (not (eq face 'emacs--invisible--face)))
6614 (or (ps-e-overlay-get overlay 'priority) 0)))
6615 (and (> overlay-priority face-priority)
6617 (or (ps-e-overlay-get overlay 'before-string)
6620 (or (and (<= (ps-e-overlay-end overlay) position)
6623 face-priority overlay-priority
6624 face
6628 (or (memq overlay-invisible
6632 'emacs--invisible--face)
6633 ((ps-e-overlay-get overlay 'face))
6634 (t face)
6640 (ps-plot-with-face from position face)
6644 (ps-plot-with-face from to face))))
6676 (or (looking-at (regexp-quote ps-adobe-tag))
6682 ps-even-or-odd-pages)
6755 (if (or (not (boundp 'ps-spool-buffer))
6771 (ps-printer-name (or ps-printer-name
6778 (list (concat
6782 (or (stringp ps-printer-name)
6784 (apply (or ps-print-region-function 'call-process-region)
6788 (ps-flatten-list ; dynamic evaluation
6801 ;; `ps-flatten-list' is defined here (copied from "message.el" and
6803 ;; sensible autoloads, or `flatten-list' gets put somewhere decent.
6805 ;; (ps-flatten-list '((a . b) c (d . e) (f g h) i . j))
6808 (defun ps-flatten-list (&rest list)
6809 (ps-flatten-list-1 list))
6811 (defun ps-flatten-list-1 (list)
6812 (cond ((null list) nil)
6813 ((consp list) (append (ps-flatten-list-1 (car list))
6814 (ps-flatten-list-1 (cdr list))))
6815 (t (list list))))
6822 (y-or-n-p "Unprinted PostScript waiting; print now? ")
6827 (not (yes-or-no-p "Unprinted PostScript waiting; exit anyway? "))
6871 (let ((ps-buf (or (and (boundp summary-buffer)
6879 ;; Look in an article or mail message for the Subject: line. To be
6888 ;; Look in an article or mail message for the From: line. Sorta-kinda
6904 ;; Jim Thompson <thompson@wg2.waii.com> or
6937 ;; the *Article* before hitting prsc, and a nicely formatted list of
6957 ;; Look in an article or mail message for the Subject: line. To be
6966 ;; Look in an article or mail message for the Subject: line. To be
7068 This checks if all multi-byte characters in the region are printable or not.")