[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 53948b6bffb: Make shell command status code checks more robust
From: |
Tassilo Horn |
Subject: |
master 53948b6bffb: Make shell command status code checks more robust |
Date: |
Fri, 28 Jul 2023 06:32:15 -0400 (EDT) |
branch: master
commit 53948b6bffb3d8d7170ffad2628c9ae7f9ac2ac1
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
Make shell command status code checks more robust
* lisp/doc-view.el (doc-view-ghostscript-program)
(doc-view--revert-buffer, doc-view--pdf-outline): Compare
'shell-command' / 'call-process' return values with 'eql' instead of
'=' to cater for the situation where the process received a signal.
---
lisp/doc-view.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 2f3c453471d..002b74e8898 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -176,7 +176,7 @@ are available (see Info node `(emacs)Document View')."
;; non-MikTeX apps. Was available under:
;;
http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
((and (executable-find "mgs")
- (= 0 (shell-command "mgs -q -dNODISPLAY -c quit")))
+ (eql 0 (shell-command "mgs -q -dNODISPLAY -c quit")))
"mgs")))
(t "gs"))
"Program to convert PS and PDF files to PNG."
@@ -577,8 +577,8 @@ Typically \"page-%s.png\".")
;; file. (TODO: We'd like to have something like that also
;; for other types, at least PS, but I don't know a good way
;; to test if a PS file is complete.)
- (if (= 0 (call-process "pdfinfo" nil nil nil
- doc-view--buffer-file-name))
+ (if (eql 0 (call-process "pdfinfo" nil nil nil
+ doc-view--buffer-file-name))
(revert)
(when (called-interactively-p 'interactive)
(message "Can't revert right now because the file is corrupted.")))
@@ -1914,7 +1914,7 @@ structure is extracted by `doc-view--imenu-subtree'."
(let ((outline nil)
(fn (expand-file-name fn)))
(with-temp-buffer
- (unless (= 0 (call-process "mutool" nil (current-buffer) nil "show"
fn "outline"))
+ (unless (eql 0 (call-process "mutool" nil (current-buffer) nil
"show" fn "outline"))
(imenu-unavailable-error "Unable to create imenu index using
`mutool'"))
(goto-char (point-min))
(while (re-search-forward doc-view--outline-rx nil t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 53948b6bffb: Make shell command status code checks more robust,
Tassilo Horn <=