1 |
;;; gs.el --- interface to Ghostscript |
;;; gs.el --- interface to Ghostscript |
2 |
|
|
3 |
;; Copyright (C) 1998, 2001 Free Software Foundation, Inc. |
;; Copyright (C) 1998, 2001, 2004 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Maintainer: FSF |
;; Maintainer: FSF |
6 |
;; Keywords: internal |
;; Keywords: internal |
39 |
(defvar gs-options |
(defvar gs-options |
40 |
'("-q" |
'("-q" |
41 |
;"-dNOPAUSE" |
;"-dNOPAUSE" |
42 |
|
"-dSAFER" |
43 |
"-dBATCH" |
"-dBATCH" |
44 |
"-sDEVICE=<device>" |
"-sDEVICE=<device>" |
45 |
"<file>") |
"<file>") |
46 |
"List of command line arguments to pass to Ghostscript. |
"List of command line arguments to pass to Ghostscript. |
47 |
Arguments may contain place-holders `<file>' for the name of the |
Arguments may contain place-holders `<file>' for the name of the |
48 |
input file, and `<device>' for the device to use.") |
input file, and `<device>' for the device to use.") |
49 |
|
(put 'gs-options 'risky-local-variable t) |
50 |
|
|
51 |
(defun gs-options (device file) |
(defun gs-options (device file) |
52 |
"Return a list of command line options with place-holders replaced. |
"Return a list of command line options with place-holders replaced. |
57 |
option (replace-regexp-in-string "<file>" file option))) |
option (replace-regexp-in-string "<file>" file option))) |
58 |
gs-options)) |
gs-options)) |
59 |
|
|
|
|
|
60 |
;; The GHOSTVIEW property (taken from gv 3.5.8). |
;; The GHOSTVIEW property (taken from gv 3.5.8). |
61 |
;; |
;; |
62 |
;; Type: |
;; Type: |
197 |
(setenv "GHOSTVIEW" window-and-pixmap-id) |
(setenv "GHOSTVIEW" window-and-pixmap-id) |
198 |
(setq gs (apply 'start-process "gs" "*GS*" gs-program |
(setq gs (apply 'start-process "gs" "*GS*" gs-program |
199 |
(gs-options gs-device file))) |
(gs-options gs-device file))) |
200 |
(process-kill-without-query gs) |
(set-process-query-on-exit-flag gs nil) |
201 |
gs) |
gs) |
202 |
nil)) |
nil)) |
203 |
|
|