Skip to content

Commit 5a72806

Browse files
committed
Check if inline images are supported
1 parent a8383e8 commit 5a72806

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gnuplot.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ Set VARIABLE to VALUE. ARGS is optional args."
321321
(set variable value))
322322
(gnuplot--setup-comint-for-image-mode))
323323

324-
(defcustom gnuplot-inline-image-mode 'inline
324+
(defcustom gnuplot-inline-image-mode (and (display-graphic-p)
325+
(image-type-available-p 'png)
326+
'inline)
325327
"Whether to display Gnuplot output in Emacs.
326328
327329
Possible values are nil, `inline' and `dedicated'.

0 commit comments

Comments
 (0)