From: Gerd Moellmann Date: Tue, 21 Aug 2001 12:58:07 +0000 (+0000) Subject: (gs-set-ghostview-colors-window-prop): Call X-Git-Tag: emacs-pretest-21.0.105~131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e98c601b3eac52367a9ce766957b88eeb39218b1;p=emacs.git (gs-set-ghostview-colors-window-prop): Call x-change-window-property with 3rd arg FRAME. (gs-load-image): Wait for a previoius Ghostscript process to complete before starting a new one. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40eef086a4e..7dc88be3fc8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2001-08-21 Gerd Moellmann + * gs.el (gs-set-ghostview-colors-window-prop): Call + x-change-window-property with 3rd arg FRAME. + (gs-load-image): Wait for a previoius Ghostscript process + to complete before starting a new one. + * image.el (image-type-regexps): Make sure that the TIFF pattern is only matched at the beginning of a string. From Markus Rost . diff --git a/lisp/gs.el b/lisp/gs.el index 1399e4258a9..7f5aaadc2a8 100644 --- a/lisp/gs.el +++ b/lisp/gs.el @@ -138,7 +138,8 @@ image in pixels." ((x-display-grayscale-p frame) "Grayscale") (t "Monochrome")))) (x-change-window-property "GHOSTVIEW_COLORS" - (format "%s %s" mode pixel-colors)))) + (format "%s %s" mode pixel-colors) + frame))) ; @@ -151,7 +152,16 @@ and height of the image in pixels. WINDOW-AND-PIXMAP-ID is a string of the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful." (unwind-protect (let ((file (plist-get (cdr spec) :file)) - gs) + gs + (waiting 0)) + ;; If another ghostscript is running, wait for it to complete. + ;; Two ghostscript processes running at the same time would + ;; use the same window properties, and get confused. + (while (and (process-status "gs") (< waiting 10)) + (sit-for 0 100 t) + (setq waiting (1+ waiting))) + (when (process-status "gs") + (kill-process "gs")) (gs-set-ghostview-window-prop frame spec img-width img-height) (gs-set-ghostview-colors-window-prop frame pixel-colors) (setenv "GHOSTVIEW" window-and-pixmap-id)