diff options
| author | Lars Ingebrigtsen | 2020-08-18 23:09:53 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-08-18 23:19:09 +0200 |
| commit | 66d8322e034679ef3a05e5747b3a4c7400712a69 (patch) | |
| tree | 2fe6f8790f2ca08187c91422ae43798ac15e47c3 | |
| parent | 5a6ed46c74dae55092d43d0078b86e5158cdc717 (diff) | |
| download | emacs-66d8322e034679ef3a05e5747b3a4c7400712a69.tar.gz emacs-66d8322e034679ef3a05e5747b3a4c7400712a69.zip | |
Remove some compat code from ps files
* lisp/ps-def.el (ps-color-device): Ditto.
* lisp/ps-print.el (ps-color-scale): Make into an obsolete alias.
(ps-begin-job): Adjust caller.
* lisp/progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate): Ditto.
| -rw-r--r-- | lisp/progmodes/ebnf2ps.el | 4 | ||||
| -rw-r--r-- | lisp/ps-def.el | 18 | ||||
| -rw-r--r-- | lisp/ps-print.el | 4 |
3 files changed, 8 insertions, 18 deletions
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 08cf802bcbe..22c70bf734d 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -4527,7 +4527,7 @@ end | |||
| 4527 | (let* ((ebnf-tree tree) | 4527 | (let* ((ebnf-tree tree) |
| 4528 | (ps-color-p (and ebnf-color-p (ps-color-device))) | 4528 | (ps-color-p (and ebnf-color-p (ps-color-device))) |
| 4529 | (ps-print-color-scale (if ps-color-p | 4529 | (ps-print-color-scale (if ps-color-p |
| 4530 | (float (car (ps-color-values "white"))) | 4530 | (float (car (color-values "white"))) |
| 4531 | 1.0)) | 4531 | 1.0)) |
| 4532 | (ebnf-total (length ebnf-tree)) | 4532 | (ebnf-total (length ebnf-tree)) |
| 4533 | (ebnf-nprod 0) | 4533 | (ebnf-nprod 0) |
| @@ -4629,7 +4629,7 @@ end | |||
| 4629 | (let* ((ebnf-tree tree) | 4629 | (let* ((ebnf-tree tree) |
| 4630 | (ps-color-p (and ebnf-color-p (ps-color-device))) | 4630 | (ps-color-p (and ebnf-color-p (ps-color-device))) |
| 4631 | (ps-print-color-scale (if ps-color-p | 4631 | (ps-print-color-scale (if ps-color-p |
| 4632 | (float (car (ps-color-values "white"))) | 4632 | (float (car (color-values "white"))) |
| 4633 | 1.0)) | 4633 | 1.0)) |
| 4634 | ps-zebra-stripes ps-line-number ps-razzle-dazzle | 4634 | ps-zebra-stripes ps-line-number ps-razzle-dazzle |
| 4635 | ps-print-hook | 4635 | ps-print-hook |
diff --git a/lisp/ps-def.el b/lisp/ps-def.el index f532511b977..65e8011f771 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el | |||
| @@ -58,21 +58,11 @@ | |||
| 58 | (define-obsolete-function-alias 'ps-frame-parameter #'frame-parameter "28.1") | 58 | (define-obsolete-function-alias 'ps-frame-parameter #'frame-parameter "28.1") |
| 59 | 59 | ||
| 60 | ;; Return t if the device (which can be changed during an emacs session) can | 60 | ;; Return t if the device (which can be changed during an emacs session) can |
| 61 | ;; handle colors. This function is not yet implemented for GNU emacs. | 61 | ;; handle colors. |
| 62 | (defun ps-color-device () | 62 | (defun ps-color-device () |
| 63 | (if (fboundp 'color-values) | 63 | (color-values "Green")) |
| 64 | (funcall 'color-values "Green") | 64 | |
| 65 | t)) | 65 | (define-obsolete-function-alias 'ps-color-values #'color-values "28.1") |
| 66 | |||
| 67 | |||
| 68 | (defun ps-color-values (x-color) | ||
| 69 | (cond | ||
| 70 | ((fboundp 'color-values) | ||
| 71 | (funcall 'color-values x-color)) | ||
| 72 | ((fboundp 'x-color-values) | ||
| 73 | (funcall 'x-color-values x-color)) | ||
| 74 | (t | ||
| 75 | (error "No available function to determine X color values")))) | ||
| 76 | 66 | ||
| 77 | 67 | ||
| 78 | (defun ps-face-bold-p (face) | 68 | (defun ps-face-bold-p (face) |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 17b486bca11..d9e59586ccd 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -3856,7 +3856,7 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'." | |||
| 3856 | (defun ps-color-scale (color) | 3856 | (defun ps-color-scale (color) |
| 3857 | ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval. | 3857 | ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval. |
| 3858 | (mapcar #'(lambda (value) (/ value ps-print-color-scale)) | 3858 | (mapcar #'(lambda (value) (/ value ps-print-color-scale)) |
| 3859 | (ps-color-values color))) | 3859 | (color-values color))) |
| 3860 | 3860 | ||
| 3861 | 3861 | ||
| 3862 | (defun ps-face-underlined-p (face) | 3862 | (defun ps-face-underlined-p (face) |
| @@ -5752,7 +5752,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5752 | ;; evaluated at dump-time because X isn't initialized. | 5752 | ;; evaluated at dump-time because X isn't initialized. |
| 5753 | ps-color-p (and ps-print-color-p (ps-color-device)) | 5753 | ps-color-p (and ps-print-color-p (ps-color-device)) |
| 5754 | ps-print-color-scale (if ps-color-p | 5754 | ps-print-color-scale (if ps-color-p |
| 5755 | (float (car (ps-color-values "white"))) | 5755 | (float (car (color-values "white"))) |
| 5756 | 1.0) | 5756 | 1.0) |
| 5757 | ps-default-background (ps-rgb-color | 5757 | ps-default-background (ps-rgb-color |
| 5758 | (cond | 5758 | (cond |