• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +refs:set +refs:foreground +refs:color

60 ;; could have bold or italic attribute when printing, besides foreground color.
115 ;; include font, color, and underline information in the PostScript image, so
117 ;; without the -with-faces suffix don't include font, color, or underline
124 ;; color, or underline information, and
128 ;; font, color, and underline information,
161 ;; (global-set-key 'f22 'ps-spool-buffer-with-faces) ;f22 is prsc
162 ;; (global-set-key '(shift f22) 'ps-spool-region-with-faces)
163 ;; (global-set-key '(control f22) 'ps-despool)
182 ;; print, for example, `ps-printer-name-option' should be set to "-P".
186 ;; `lpr-command' set to invoke a pretty-printer such as `enscript', then
231 ;; when `ps-spool-config' is set to `setpagedevice' (see section Duplex
264 ;; nil (print all pages). After ps-print processing `ps-selected-pages' is set
357 ;; To turn them off completely, set `ps-print-header' to nil.
359 ;; set `ps-print-header-frame' to nil.
364 ;; fore-color Specify the foreground frame color.
365 ;; It should be a float number between 0.0 (black color)
366 ;; and 1.0 (white color), a string which is a color name,
368 ;; Red Green Blue color scale, each float number between
369 ;; 0.0 (dark color) and 1.0 (bright color).
372 ;; back-color Specify the background frame color (similar to
373 ;; fore-color). The default is 0.9 ("gray90").
375 ;; shadow-color Specify the shadow color (similar to fore-color).
378 ;; border-color Specify the border color (similar to fore-color).
389 ;; To print only one header at the top of each page, set
392 ;; To switch headers, set `ps-switch-header' to:
412 ;; omit the total page count and just print the page number, set
416 ;; number of lines. To show less, set `ps-header-lines' to 1, and the header
417 ;; will show only the buffer name and page number. To show more, set
449 ;; and a literal for "Curly". Here's how `ps-left-header' should be set:
474 ;; footer but without headers, set:
501 ;; the "%%+" comment. For example, if you need to set numcopies to 3 and jog
502 ;; on requirements and set %%LanguageLevel: to 2, do:
579 ;; paper), set `ps-spool-duplex' to t.
587 ;; Don't forget to set `ps-lpr-switches' to select duplex
606 ;; So, if you need to use setpagedevice, set `ps-spool-config' to
608 ;; if the printed file isn't ok, set `ps-spool-config' to nil.
619 ;; this behavior, set variable `ps-banner-page-when-duplexing' to t.
636 ;; set to a high value (for example, 23). If this happens, set a lower value.
715 ;; The variable `ps-line-number-color' specifies the color for line number.
716 ;; See `ps-zebra-color' for documentation. The default is "black" (or 0.0, or
726 ;; is printed. For example, if `ps-line-number-step' is set to 2, the printing
751 ;; `ps-line-number-step' is set to 3 and `ps-line-number-start' is set to 3,
771 ;; * If `ps-line-number-step' is set to `zebra', must be between 1 and the
794 ;; The blocks of X's represent rectangles filled with a light gray color.
804 ;; The variable `ps-zebra-color' controls the zebra stripes gray scale or RGB
805 ;; color. It should be a float number between 0.0 (black color) and 1.0 (white
806 ;; color), a string which is a color name, or a list of 3 numbers which
807 ;; corresponds to the Red Green Blue color scale.
911 ;; To get all lines with some spacing set both `ps-line-spacing' and
922 ;; be set to "^Local Variables:" and "^End:", respectively, in order to leave
929 ;; what actually gets printed. Both variables may be set to nil in which case
930 ;; no cutting occurs. By default, both variables are set to nil.
1046 ;; italic or underline; to set them, put code like the following into your
1063 ;; back in sync, you can set the variable `ps-build-face-reference' to t, and
1065 ;; that the lists always be rebuilt when ps-print is invoked, set the variable
1068 ;; If you need to print without worrying about face background color, set the
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.
1083 ;; ps-print detects faces with foreground and background colors defined and
1084 ;; embeds color information in the PostScript image.
1085 ;; The default foreground and background colors are defined by the variables
1088 ;; To turn off color output, set `ps-print-color-p' to nil.
1089 ;; You can also set `ps-print-color-p' to 'black-white to have a better looking
1108 ;; Let's, for example, remap `font-lock-keyword-face' to another foreground
1109 ;; color and bold attribute:
1162 ;; 1. Print background color
1225 ;; `ps-line-number-color', `ps-print-footer', `ps-footer-offset',
1258 ;; `ps-banner-page-when-duplexing' and `ps-zebra-color'.
1313 ;; Although color printing will work in XEmacs 19.12, it doesn't work well; in
1314 ;; particular, bold or italic fonts don't print in the right background color.
1330 ;; Default background color isn't working.
1413 ;; * Face color map: Marco Melgazzi <marco@techie.com>
1422 ;; Thanks to Kevin Rodgers <kevinr@ihs.com> for adding support for color and
1475 (defalias 'ps-x-color-instance-p 'color-instance-p)
1476 (defalias 'ps-x-color-instance-rgb-components 'color-instance-rgb-components)
1477 (defalias 'ps-x-color-name 'color-name)
1478 (defalias 'ps-x-color-specifier-p 'color-specifier-p)
1488 (defalias 'ps-x-make-color-instance 'make-color-instance)
1498 (defalias 'ps-e-x-color-values 'x-color-values)
1499 (defalias 'ps-e-color-values 'color-values)
1511 (defun ps-xemacs-color-name (color)
1512 (if (ps-x-color-specifier-p color)
1513 (ps-x-color-name color)
1514 color))
1526 (defun ps-face-foreground-name (face)
1527 (ps-xemacs-color-name (face-foreground face)))
1529 (ps-xemacs-color-name (face-background face)))
1532 (defun ps-face-foreground-name (face)
1533 (face-foreground face nil t))
1587 (defgroup ps-print-color nil
1713 \"%%+\" comment. For example, if you need to set numcopies to 3 and jog on
1714 requirements and set %%LanguageLevel: to 2, do:
1745 for a shared network printer. You can also set it to a name of a file, in
1749 silently discard the printed output, set this to \"NUL\".
1902 It's used when `ps-spool-config' is set to `setpagedevice'."
1930 After ps-print processing `ps-selected-pages' is set to nil. But the
1969 If you set `ps-selected-pages' (see it for documentation), first the pages are
2105 See also documentation for `ps-zebra-stripe-height' and `ps-zebra-color'."
2112 See also documentation for `ps-zebra-stripes' and `ps-zebra-color'."
2117 (defcustom ps-zebra-color 0.95
2118 "*Zebra stripe gray scale or RGB color.
2184 For example, `ps-line-number-step' is set to 2, the printing will look like:
2214 For example, if `ps-line-number-step' is set to 3 and `ps-line-number-start' is
2215 set to 3, the printing will look like:
2234 * If `ps-line-number-step' is set to `zebra', must be between 1 and the
2438 '((fore-color . 0.0)
2439 (back-color . 0.9)
2441 (border-color . 0.0)
2442 (shadow-color . 0.0))
2447 `fore-color' Specify the foreground frame color.
2448 It should be a float number between 0.0 (black color)
2449 and 1.0 (white color), a string which is a color name,
2451 Red Green Blue color scale, each float number between
2452 0.0 (dark color) and 1.0 (bright color).
2454 `back-color' Specify the background frame color (similar to
2455 `fore-color').
2457 `shadow-color' Specify the shadow color (similar to `fore-color').
2459 `border-color' Specify the border color (similar to `fore-color').
2472 (const :format "" fore-color)
2482 (const :format "" back-color)
2495 (const :format "" border-color)
2505 (const :format "" shadow-color)
2539 '((fore-color . 0.0)
2540 (back-color . 0.9)
2542 (border-color . 0.0)
2543 (shadow-color . 0.0))
2554 (const :format "" fore-color)
2564 (const :format "" back-color)
2577 (const :format "" border-color)
2587 (const :format "" shadow-color)
2654 Don't forget to set `ps-lpr-switches' to select duplex
2671 So, if you need to use setpagedevice, set `ps-spool-config' to
2673 the printed file isn't OK, set `ps-spool-config' to nil."
2927 (defcustom ps-line-number-color "black"
2928 "*Specify color for line-number, when generating PostScript."
2962 ;; Printing color requires x-color-values.
2966 (defcustom ps-print-color-p
2967 (or (fboundp 'x-color-values) ; Emacs
2968 (fboundp 'color-instance-rgb-components))
2970 "*Specify how buffer's text color is printed.
2988 :group 'ps-print-color)
2991 "*RGB values of the default foreground color.
2993 The `ps-default-fg' variable contains the default foreground color used by
2994 ps-print, that is, if there is a face in a text that doesn't have a foreground
2995 color, the `ps-default-fg' color should be used.
2999 t The foreground color of Emacs session will be used.
3001 frame-parameter The foreground-color frame parameter will be used.
3004 indicate the gray color.
3006 COLOR-NAME It's a string which contains the color name. For example:
3014 Where RED, GREEN and BLUE are reals between 0.0 (no color) and
3015 1.0 (full color).
3017 Any other value is ignored and black color will be used.
3019 It's used only when `ps-print-color-p' is non-nil."
3031 :group 'ps-print-color)
3034 "*RGB values of the default background color.
3036 The `ps-default-bg' variable contains the default background color used by
3038 color, the `ps-default-bg' color should be used.
3042 t The background color of Emacs session will be used.
3044 frame-parameter The background-color frame parameter will be used.
3047 indicate the gray color.
3049 COLOR-NAME It's a string which contains the color name. For example:
3057 Where RED, GREEN and BLUE are reals between 0.0 (no color) and
3058 1.0 (full color).
3060 Any other value is ignored and white color will be used.
3062 It's used only when `ps-print-color-p' is non-nil.
3076 :group 'ps-print-color)
3100 This variable is used only when `ps-print-color-p' is set to `black-white'."
3127 (unless ps-print-color-p
3140 (unless ps-print-color-p
3153 (unless ps-print-color-p
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.
3315 You should set this value back to t after you change the attributes of any
3327 called. Most users shouldn't need to set this variable."
3348 (error "`ps-postscript-code-directory' isn't set properly"))
3360 To get all lines with some spacing set both `ps-line-spacing' and
3376 To get all lines with some spacing set both `ps-line-spacing' and
3403 set to \"^Local Variables:\" and \"^End:\", respectively, in order to leave out
3410 actually gets printed. Both variables may be set to nil in which case no
3474 Like `ps-print-buffer', but includes font, color, and underline information in
3476 so it has a way to determine color values."
3492 Like `ps-print-region', but includes font, color, and underline information in
3494 so it has a way to determine color values."
3513 Like `ps-spool-buffer', but includes font, color, and underline information in
3515 so it has a way to determine color values.
3535 Like `ps-spool-region', but includes font, color, and underline information in
3537 so it has a way to determine color values.
3596 '(25 . ps-print-color-p)
3614 '(23 . ps-zebra-color)
3679 '(26 . ps-line-number-color)
3734 If `ps-prefix-quote' is nil, it's set to t after generating string."
3792 (set alist-sym (cons elt: (symbol-value alist-sym))))
3805 (set alist-sym (cdr a:list:)))
3840 (setq ps-print-color-p nil))
3846 (defalias 'ps-color-device
3853 (eq (ps-x-device-class) 'color)))
3857 (if (fboundp 'color-values)
3858 (ps-e-color-values "Green")
3893 (defun ps-color-values (x-color)
3894 (let ((color (ps-xemacs-color-name x-color)))
3896 ((fboundp 'x-color-values)
3897 (ps-e-x-color-values color))
3898 ((and (fboundp 'color-instance-rgb-components)
3899 (ps-color-device))
3900 (ps-x-color-instance-rgb-components
3901 (if (ps-x-color-instance-p x-color)
3902 x-color
3903 (ps-x-make-color-instance color))))
3905 (error "No available function to determine X color values")))))
3919 (defun ps-color-values (x-color)
3921 ((fboundp 'color-values)
3922 (ps-e-color-values x-color))
3923 ((fboundp 'x-color-values)
3924 (ps-e-x-color-values x-color))
3926 (error "No available function to determine X color values"))))
3938 (defvar ps-print-color-scale 1.0)
3940 (defun ps-color-scale (color)
3941 ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval.
3942 (mapcar #'(lambda (value) (/ value ps-print-color-scale))
3943 (ps-color-values color)))
4007 (defvar ps-default-foreground nil)
4009 (defvar ps-default-color nil)
4010 (defvar ps-current-color nil)
4016 (defvar ps-color-p nil)
4017 (defvar ps-color-format
4022 ;; Emacs understands the %f format; we'll use it to limit color RGB
4074 See also documentation for `ps-print-color-p'.")
4087 FG foreground color (string or nil)
4088 BG background color (string or nil)
4158 foreground and background colors respectively.
4174 (foreground (nth 1 face-extension))
4183 (and (or (not merge-p) (and foreground (stringp foreground)))
4184 (aset face-vector 1 foreground))
4189 (set alist-sym (cons (cons face-name face-vector)
4210 ;; However, we try and be back-compatible and respect its value if set except
4226 (let ((foreground (nth 1 face-attribute))
4232 (when foreground
4233 (setq face-spec (cons ':foreground
4234 (cons foreground face-spec))))
4291 (error "The mark is not set now"))
4410 (set-buffer buf)
4466 (set-buffer buf)
4648 (error "The mark is not set now"))
4790 (set-buffer ps-spool-buffer)
4812 (set-buffer ps-spool-buffer)
4899 (ps-format-color (cdr (assq 'fore-color alist)) 0.0)
4900 (ps-format-color (cdr (assq 'back-color alist)) 0.9)
4902 (ps-format-color (cdr (assq 'border-color alist)) 0.0)
4903 (ps-format-color (cdr (assq 'shadow-color alist)) 0.0)
4926 (set-buffer ps-spool-buffer)
4940 ;; Emacs understands the %f format; we'll use it to limit color RGB values
5004 (set-buffer ps-spool-buffer)
5625 (ps-format-color ps-line-number-color 0.0)
5629 (ps-format-color ps-zebra-color 0.95)
5631 (ps-format-color ps-default-background 1.0)
5748 (defun ps-format-color (color &optional default)
5749 (let ((the-color (if (stringp color)
5750 (ps-color-scale color)
5751 color)))
5752 (if (and the-color (listp the-color))
5754 (format ps-color-format
5755 (* (nth 0 the-color) 1.0) ; force float number
5756 (* (nth 1 the-color) 1.0) ; force float number
5757 (* (nth 2 the-color) 1.0)) ; force float number
5759 (ps-float-format (if (numberp the-color) the-color default)))))
5825 (defun ps-rgb-color (color unspecified default)
5828 ((and color (listp color) (= (length color) 3)
5829 (let ((cl color)
5836 color)
5838 ((and (floatp color) (<= 0.0 color) (<= color 1.0))
5839 (list color color color))
5841 ((and (stringp color) (not (string= color unspecified)))
5842 (ps-color-scale color))
5886 (set-buffer ps-spool-buffer)
5917 ps-default-background (ps-rgb-color
5922 (ps-frame-parameter nil 'background-color))
5929 ps-default-foreground (ps-rgb-color
5934 (ps-frame-parameter nil 'foreground-color))
5936 (ps-face-foreground-name 'default))
5941 ps-default-color (and (eq ps-print-color-p t) ps-default-foreground)
5942 ps-current-color ps-default-color
5943 ;; Set the color scale. We do it here instead of in the defvar so
5946 ps-color-p (and ps-print-color-p (ps-color-device))
5947 ps-print-color-scale (if ps-color-p
5948 (float (car (ps-color-values "white")))
5953 (and ps-color-p
5954 (equal ps-default-background ps-default-foreground)
5957 "`ps-default-fg' and `ps-default-bg' have the same color.\n"
6000 ;; set total line and page number when printing has finished
6052 (ps-set-font ps-current-font)
6053 (ps-set-bg ps-current-bg)
6054 (ps-set-color ps-current-color)
6104 (defun ps-basic-plot-string (from to &optional bg-color)
6114 (defun ps-basic-plot-whitespace (from to &optional bg-color)
6121 (defun ps-plot (plotfunc from to &optional bg-color)
6123 (let* ((wrappoint (funcall plotfunc from to bg-color))
6146 (defun ps-set-font (font)
6150 (defun ps-set-bg (color)
6151 (if (setq ps-current-bg color)
6152 (ps-output (format ps-color-format
6153 (nth 0 color) (nth 1 color) (nth 2 color))
6157 (defun ps-set-color (color)
6158 (setq ps-current-color (or color ps-default-foreground))
6159 (ps-output (format ps-color-format
6160 (nth 0 ps-current-color)
6161 (nth 1 ps-current-color) (nth 2 ps-current-color))
6185 (defun ps-plot-region (from to font &optional fg-color bg-color effects)
6187 (ps-set-font font))
6189 ;; Specify a foreground color only if one's specified and it's
6191 (let ((fg (or fg-color ps-default-foreground)))
6192 (or (equal fg ps-current-color)
6193 (ps-set-color fg)))
6195 (or (equal bg-color ps-current-bg)
6196 (ps-set-bg bg-color))
6237 (ps-mule-set-ascii-font)
6238 (ps-plot 'ps-basic-plot-string from match-point bg-color))
6245 (ps-mule-set-ascii-font)
6248 bg-color))))
6271 (ps-plot 'ps-mule-plot-composition match-point (point) bg-color))
6286 (ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
6292 (ps-mule-set-ascii-font)
6293 (ps-plot 'ps-basic-plot-string from to bg-color)
6353 ((eq (car face) 'foreground-color)
6355 ((eq (car face) 'background-color)
6368 (or (memq (car face) '(foreground-color background-color))
6373 '(foreground-color background-color)))
6389 ;; only foreground color, not a `real' face
6390 ((eq (car face-or-list) 'foreground-color)
6392 ;; only background color, not a `real' face
6393 ((eq (car face-or-list) 'background-color)
6398 foreground background face-attr face)
6404 (or foreground (setq foreground (aref face-attr 1)))
6407 (vector effects foreground background)))))
6421 (foreground (aref face-bit 1))
6423 (fg-color (if (and ps-color-p foreground)
6424 (ps-color-scale foreground)
6425 ps-default-color))
6426 (bg-color (and ps-color-p background
6427 (ps-color-scale background))))
6433 fg-color bg-color (lsh effect -2)))))
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))
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)
6489 (ps-face-foreground-name face)
6518 (and (eq ps-print-color-p 'black-white)
6666 (set-buffer ps-spool-buffer)
6667 (set-buffer-multibyte nil)
6673 (set-marker safe-marker (point-max))
6679 (set-buffer ps-source-buffer)
6704 (set-buffer ps-spool-buffer)
6717 (set-buffer ps-spool-buffer)
6719 ;; Back to the PS output buffer to set the last page n-up printing
6724 ;; Back to the PS output buffer to set the page count
6761 (set-buffer ps-spool-buffer)
6769 (set-buffer ps-spool-buffer)
6852 ;; A hook to bind to `rmail-mode-hook' to locally bind prsc and set the
6855 (local-set-key [(f22)] 'ps-rmail-print-message-from-summary)
6876 (set-buffer ps-buf)
6913 ;; A hook to bind to `gnus-article-prepare-hook'. This will set the
6917 ;; we ran gnus. The second time, this hook wouldn't get set up. The
6926 ;; A hook to bind to `vm-mode-hook' to locally bind prsc and set the
6929 (local-set-key [(f22)] 'ps-vm-print-message-from-summary)
6955 (local-set-key [(f22)] 'ps-gnus-print-article-from-summary))
6987 (global-set-key [(f22)] 'ps-spool-buffer-with-faces) ;f22 is prsc
6988 (global-set-key [(shift f22)] 'ps-spool-region-with-faces)
6989 (global-set-key [(control f22)] 'ps-despool)
6996 ps-print-color-p nil
7008 (setq ps-print-color-p nil
7046 (autoload 'ps-mule-set-ascii-font "ps-mule"
7054 Optional argument BG-COLOR specifies background color.