]> code.delx.au - gnu-emacs/blobdiff - lisp/gs.el
(struct group): Add gr_gid member.
[gnu-emacs] / lisp / gs.el
index 511bde6a4740cca8b039d6639e7c04438f85a3f7..913c741a7ba01698bc9d84d2f8465ff3c0085d86 100644 (file)
@@ -1,16 +1,17 @@
 ;;; gs.el --- interface to Ghostscript
 
-;; Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 (defvar gs-options
   '("-q"
     ;"-dNOPAUSE"
+    "-dSAFER"
     "-dBATCH"
     "-sDEVICE=<device>"
     "<file>")
   "List of command line arguments to pass to Ghostscript.
 Arguments may contain place-holders `<file>' for the name of the
 input file, and `<device>' for the device to use.")
+(put 'gs-options 'risky-local-variable t)
 
 (defun gs-options (device file)
   "Return a list of command line options with place-holders replaced.
@@ -55,7 +56,6 @@ FILE is the value to substitute for the place-holder `<file>'."
                    option (replace-regexp-in-string "<file>" file option)))
          gs-options))
 
-
 ;; The GHOSTVIEW property (taken from gv 3.5.8).
 ;;
 ;; Type:
@@ -115,10 +115,10 @@ SPEC is a GS image specification.  IMG-WIDTH is the width of the
 requested image, and IMG-HEIGHT is the height of the requested
 image in pixels."
   (let* ((box (plist-get (cdr spec) :bounding-box))
-        (llx (elt 0 box))
-        (lly (elt 1 box))
-        (urx (elt 2 box))
-        (ury (elt 3 box))
+        (llx (elt box 0))
+        (lly (elt box 1))
+        (urx (elt box 2))
+        (ury (elt box 3))
         (rotation (or (plist-get (cdr spec) :rotate) 0))
         ;; The pixel width IMG-WIDTH of the pixmap gives the
         ;; dots, URX - LLX give the inch.
@@ -196,7 +196,7 @@ the form \"WINDOW-ID PIXMAP-ID\".  Value is non-nil if successful."
        (setenv "GHOSTVIEW" window-and-pixmap-id)
        (setq gs (apply 'start-process "gs" "*GS*" gs-program
                        (gs-options gs-device file)))
-       (process-kill-without-query gs)
+       (set-process-query-on-exit-flag gs nil)
        gs)
     nil))
 
@@ -212,4 +212,5 @@ the form \"WINDOW-ID PIXMAP-ID\".  Value is non-nil if successful."
 
 (provide 'gs)
 
+;; arch-tag: 06ab51b8-4932-4cfe-9f60-b924a8edb3f0
 ;;; gs.el ends here