org-plot: replace ignore-error with condition-case

* lisp/org-plot.el (org-plot/gnuplot): `ignore-error' was introduced
in Emacs 27, and Org's minimum supported Emacs is 24.  So, to maintain
compliance I replaced the `ignore-error' call with a `condition-case`.
This commit is contained in:
TEC 2021-04-29 00:47:01 +08:00
parent 232d9a0600
commit 44f409e21e
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 3 additions and 2 deletions

View File

@ -709,8 +709,9 @@ line directly before or after the table."
(insert (org-plot/gnuplot-script table data-file num-cols params)))
;; Graph table.
(gnuplot-mode)
(ignore-error buffer-read-only
(gnuplot-send-buffer-to-gnuplot)))
(condition-case nil
(gnuplot-send-buffer-to-gnuplot)
(buffer-read-only nil)))
;; Cleanup.
(bury-buffer (get-buffer "*gnuplot*"))
;; Refresh any displayed images