mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Remove some leftover compat code from ps-print
* lisp/ps-def.el (ps-mark-active-p): Make obsolete in favor of 'mark-active'. Update callers. (ps-face-foreground-name): Make obsolete in favor of 'face-foreground'. Update callers. (ps-face-background-name): Make obsolete in favor of 'face-background'. Update callers. (ps-color-device): Make into obsolete function alias for 'display-color-p'. Update callers.
This commit is contained in:
parent
66e01c9608
commit
54fed8e1f9
4 changed files with 23 additions and 37 deletions
|
|
@ -2782,7 +2782,7 @@ See `pr-ps-printer-alist'.")
|
|||
["4-up" (pr-ps-buffer-preview 4 t) t]
|
||||
["Other..." (pr-ps-buffer-preview nil t)
|
||||
:keys "\\[pr-ps-buffer-preview]"])
|
||||
("Region" :active (and (not pr-spool-p) (ps-mark-active-p))
|
||||
("Region" :active (and (not pr-spool-p) mark-active)
|
||||
["1-up" (pr-ps-region-preview 1 t) t]
|
||||
["2-up" (pr-ps-region-preview 2 t) t]
|
||||
["4-up" (pr-ps-region-preview 4 t) t]
|
||||
|
|
@ -2837,7 +2837,7 @@ See `pr-ps-printer-alist'.")
|
|||
["4-up" (pr-ps-buffer-ps-print 4 t) t]
|
||||
["Other..." (pr-ps-buffer-ps-print nil t)
|
||||
:keys "\\[pr-ps-buffer-ps-print]"])
|
||||
("Region" :active (ps-mark-active-p)
|
||||
("Region" :active mark-active
|
||||
["1-up" (pr-ps-region-ps-print 1 t) t]
|
||||
["2-up" (pr-ps-region-ps-print 2 t) t]
|
||||
["4-up" (pr-ps-region-ps-print 4 t) t]
|
||||
|
|
@ -2887,12 +2887,12 @@ See `pr-ps-printer-alist'.")
|
|||
"Replace non-printing chars with printable representations."
|
||||
["Directory" pr-printify-directory t]
|
||||
["Buffer" pr-printify-buffer t]
|
||||
["Region" pr-printify-region (ps-mark-active-p)])
|
||||
["Region" pr-printify-region mark-active])
|
||||
("Print" :included (pr-visible-p 'text)
|
||||
:help "Send text to printer"
|
||||
["Directory" pr-txt-directory t]
|
||||
["Buffer" pr-txt-buffer t]
|
||||
["Region" pr-txt-region (ps-mark-active-p)]
|
||||
["Region" pr-txt-region mark-active]
|
||||
["Mode" pr-txt-mode (pr-mode-alist-p)])
|
||||
["Text Printers" pr-update-menus
|
||||
:active pr-txt-printer-alist :included (pr-visible-p 'text)
|
||||
|
|
@ -5585,7 +5585,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
|
|||
(defun pr-create-interface ()
|
||||
"Create the front end for printing package."
|
||||
(setq pr-i-buffer (buffer-name (current-buffer))
|
||||
pr-i-region (ps-mark-active-p)
|
||||
pr-i-region mark-active
|
||||
pr-i-mode (pr-mode-alist-p)
|
||||
pr-i-window-configuration (current-window-configuration))
|
||||
|
||||
|
|
@ -5651,11 +5651,11 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
|
|||
(nreverse choices))
|
||||
" Buffer : " nil
|
||||
(lambda ()
|
||||
(pr-interface-save
|
||||
(setq pr-i-region (ps-mark-active-p)
|
||||
pr-i-mode (pr-mode-alist-p)))
|
||||
(pr-update-checkbox 'pr-i-region)
|
||||
(pr-update-checkbox 'pr-i-mode)))
|
||||
(pr-interface-save
|
||||
(setq pr-i-region mark-active
|
||||
pr-i-mode (pr-mode-alist-p)))
|
||||
(pr-update-checkbox 'pr-i-region)
|
||||
(pr-update-checkbox 'pr-i-mode)))
|
||||
;; 1a. Buffer: Region
|
||||
(put 'pr-i-region 'pr-widget
|
||||
(pr-insert-checkbox
|
||||
|
|
@ -5663,7 +5663,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
|
|||
'pr-i-region
|
||||
(lambda (widget &rest _ignore)
|
||||
(let ((region-p (pr-interface-save
|
||||
(ps-mark-active-p))))
|
||||
mark-active)))
|
||||
(cond ((null (widget-value widget)) ; widget is nil
|
||||
(setq pr-i-region nil))
|
||||
(region-p ; widget is true and there is a region
|
||||
|
|
|
|||
|
|
@ -4524,7 +4524,7 @@ end
|
|||
|
||||
(defun ebnf-generate-eps (tree)
|
||||
(let* ((ebnf-tree tree)
|
||||
(ps-color-p (and ebnf-color-p (ps-color-device)))
|
||||
(ps-color-p (and ebnf-color-p (display-color-p)))
|
||||
(ps-print-color-scale (if ps-color-p
|
||||
(float (car (color-values "white")))
|
||||
1.0))
|
||||
|
|
@ -4626,7 +4626,7 @@ end
|
|||
|
||||
(defun ebnf-generate (tree)
|
||||
(let* ((ebnf-tree tree)
|
||||
(ps-color-p (and ebnf-color-p (ps-color-device)))
|
||||
(ps-color-p (and ebnf-color-p (display-color-p)))
|
||||
(ps-print-color-scale (if ps-color-p
|
||||
(float (car (color-values "white")))
|
||||
1.0))
|
||||
|
|
|
|||
|
|
@ -35,36 +35,25 @@
|
|||
(defvar ps-bold-faces) ; in ps-print.el
|
||||
(defvar ps-italic-faces)
|
||||
|
||||
|
||||
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Emacs Definitions
|
||||
|
||||
|
||||
(defun ps-mark-active-p ()
|
||||
(declare (obsolete mark-active "29.1"))
|
||||
mark-active)
|
||||
|
||||
|
||||
(defun ps-face-foreground-name (face)
|
||||
(declare (obsolete face-foreground "29.1"))
|
||||
(face-foreground face nil t))
|
||||
|
||||
|
||||
(defun ps-face-background-name (face)
|
||||
(declare (obsolete face-background "29.1"))
|
||||
(face-background face nil t))
|
||||
|
||||
|
||||
(define-obsolete-function-alias 'ps-frame-parameter #'frame-parameter "28.1")
|
||||
|
||||
;; Return t if the device (which can be changed during an emacs session) can
|
||||
;; handle colors.
|
||||
(defun ps-color-device ()
|
||||
(color-values "Green"))
|
||||
|
||||
(define-obsolete-function-alias 'ps-color-device #'display-color-p "29.1")
|
||||
(define-obsolete-function-alias 'ps-color-values #'color-values "28.1")
|
||||
|
||||
|
||||
(defun ps-face-bold-p (face)
|
||||
(or (face-bold-p face)
|
||||
(memq face ps-bold-faces)))
|
||||
|
|
@ -126,9 +115,6 @@
|
|||
(setq from position))
|
||||
(ps-plot-with-face from to face)))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(provide 'ps-def)
|
||||
|
||||
;;; ps-def.el ends here
|
||||
|
|
|
|||
|
|
@ -4510,7 +4510,7 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
|
|||
|
||||
|
||||
(defun ps-print-preprint-region (prefix)
|
||||
(or (ps-mark-active-p)
|
||||
(or mark-active
|
||||
(error "The mark is not set now"))
|
||||
(list (point) (mark) (ps-print-preprint prefix)))
|
||||
|
||||
|
|
@ -5749,7 +5749,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
|
|||
;; Set the color scale. We do it here instead of in the defvar so
|
||||
;; that ps-print can be dumped into emacs. This expression can't be
|
||||
;; evaluated at dump-time because X isn't initialized.
|
||||
ps-color-p (and ps-print-color-p (ps-color-device))
|
||||
ps-color-p (and ps-print-color-p (display-color-p))
|
||||
ps-print-color-scale (if ps-color-p
|
||||
(float (car (color-values "white")))
|
||||
1.0)
|
||||
|
|
@ -5762,7 +5762,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
|
|||
((eq ps-default-bg 'frame-parameter)
|
||||
(frame-parameter nil 'background-color))
|
||||
((eq ps-default-bg t)
|
||||
(ps-face-background-name 'default))
|
||||
(face-background 'default nil t))
|
||||
(t
|
||||
ps-default-bg))
|
||||
"unspecified-bg"
|
||||
|
|
@ -5776,7 +5776,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
|
|||
((eq ps-default-fg 'frame-parameter)
|
||||
(frame-parameter nil 'foreground-color))
|
||||
((eq ps-default-fg t)
|
||||
(ps-face-foreground-name 'default))
|
||||
(face-foreground 'default nil t))
|
||||
(t
|
||||
ps-default-fg))
|
||||
"unspecified-fg"
|
||||
|
|
@ -6321,8 +6321,8 @@ If FACE is not a valid face name, use default face."
|
|||
(if (ps-face-strikeout-p face) 8 0) ; strikeout
|
||||
(if (ps-face-overline-p face) 16 0) ; overline
|
||||
(if (ps-face-box-p face) 64 0)) ; box
|
||||
(ps-face-foreground-name face)
|
||||
(ps-face-background-name face))))
|
||||
(face-foreground face nil t)
|
||||
(face-background face nil t))))
|
||||
|
||||
|
||||
(defun ps-generate-postscript-with-faces (from to)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue