summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@is.elta.co.il>2004-01-03 12:12:01 +0000
committerEli Zaretskii <eliz@is.elta.co.il>2004-01-03 12:12:01 +0000
commit15502042230fbf94c50ac8a046c367948c66dc66 (patch)
tree84970934af3914fabdc2d02a11f0ace8e9233ce6
parent181e6a61ecee69a39a2765fe83745fe576d86d8d (diff)
downloademacs-15502042230fbf94c50ac8a046c367948c66dc66.tar.gz
* progmodes/idlwave.el (idlwave-make-tags):
* textmodes/flyspell.el (flyspell-large-region):. * progmodes/make-mode.el (makefile-query-by-make-minus-q): * emulation/viper-util.el (viper-glob-unix-files): * emacs-lisp/shadow.el (shadow-same-file-or-nonexistent): * man.el (Man-init-defvars): * jka-compr.el (jka-compr-call-process): * files.el (get-free-disk-space,insert-directory): * ediff-ptch.el (ediff-test-patch-utility): * ediff-diff.el (ediff-test-utility): * dired-aux.el (dired-check-process): * mail/sendmail.el (sendmail-send-it): Don't use = or zerop to test the return value of call-process, because it can be a string.
-rw-r--r--lisp/ChangeLog16
-rw-r--r--lisp/dired-aux.el4
-rw-r--r--lisp/ediff-diff.el4
-rw-r--r--lisp/ediff-ptch.el4
-rw-r--r--lisp/emacs-lisp/shadow.el2
-rw-r--r--lisp/emulation/viper-util.el22
-rw-r--r--lisp/files.el38
-rw-r--r--lisp/jka-compr.el2
-rw-r--r--lisp/mail/sendmail.el2
-rw-r--r--lisp/man.el4
-rw-r--r--lisp/progmodes/idlwave.el11
-rw-r--r--lisp/progmodes/make-mode.el2
-rw-r--r--lisp/textmodes/flyspell.el2
13 files changed, 66 insertions, 47 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ed4f3a8433e..de4f72cc020 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,19 @@
+2004-01-03 Jesper Harder <harder@ifa.au.dk> (tiny change)
+
+ * progmodes/idlwave.el (idlwave-make-tags):
+ * textmodes/flyspell.el (flyspell-large-region):.
+ * progmodes/make-mode.el (makefile-query-by-make-minus-q):
+ * emulation/viper-util.el (viper-glob-unix-files):
+ * emacs-lisp/shadow.el (shadow-same-file-or-nonexistent):
+ * man.el (Man-init-defvars):
+ * jka-compr.el (jka-compr-call-process):
+ * files.el (get-free-disk-space,insert-directory):
+ * ediff-ptch.el (ediff-test-patch-utility):
+ * ediff-diff.el (ediff-test-utility):
+ * dired-aux.el (dired-check-process):
+ * mail/sendmail.el (sendmail-send-it): Don't use = or zerop to
+ test the return value of call-process, because it can be a string.
+
2003-12-31 John Paul Wallington <jpw@gnu.org>
* bindings.el (completion-ignored-extensions): Add .pfsl.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index d12410afae5..0a3fa220248 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -561,8 +561,8 @@ the list of file names explicitly with the FILE-LIST argument."
(set-buffer err-buffer)
(erase-buffer)
(setq default-directory dir ; caller's default-directory
- err (/= 0
- (apply (function dired-call-process) program nil arguments)))
+ err (not (eq 0
+ (apply (function dired-call-process) program nil arguments))))
(if err
(progn
(dired-log (concat program " " (prin1-to-string arguments) "\n"))
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index e7dcd6f16c5..4ba4ab316f8 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -64,8 +64,8 @@ Must produce output compatible with Unix's diff3 program."
;; The following functions needed for setting diff/diff3 options
;; test if diff supports the --binary option
(defsubst ediff-test-utility (diff-util option &optional files)
- (zerop (apply 'call-process
- (append (list diff-util nil nil nil option) files))))
+ (eq 0 (apply 'call-process
+ (append (list diff-util nil nil nil option) files))))
(defun ediff-diff-mandatory-option (diff-util)
(let ((file (if (boundp 'null-device) null-device "/dev/null")))
diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el
index 8b69bc686df..342f75fd1e0 100644
--- a/lisp/ediff-ptch.el
+++ b/lisp/ediff-ptch.el
@@ -86,10 +86,10 @@ See also `ediff-backup-specs'."
(defun ediff-test-patch-utility ()
(condition-case nil
- (cond ((zerop (call-process ediff-patch-program nil nil nil "-z." "-b"))
+ (cond ((eq 0 (call-process ediff-patch-program nil nil nil "-z." "-b"))
;; GNU `patch' v. >= 2.2
'gnu)
- ((zerop (call-process ediff-patch-program nil nil nil "-b"))
+ ((eq 0 (call-process ediff-patch-program nil nil nil "-b"))
'posix)
(t 'traditional))
(file-error nil)))
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index 571ee7ee1c9..eeaaa7ffc0a 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -161,7 +161,7 @@ See the documentation for `list-load-path-shadows' for further information."
;; sizes.
(and (= (nth 7 (file-attributes f1))
(nth 7 (file-attributes f2)))
- (zerop (call-process "cmp" nil nil nil "-s" f1 f2))))))))
+ (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2))))))))
;;;###autoload
(defun list-load-path-shadows ()
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 8e913e90599..5e533e5f545 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -394,17 +394,17 @@
command)))
(goto-char (point-min))
;; Issue an error, if no match.
- (if (> status 0)
- (save-excursion
- (skip-chars-forward " \t\n\j")
- (if (looking-at "ls:")
- (viper-forward-Word 1))
- (error "%s: %s"
- (if (stringp gshell)
- gshell
- "shell")
- (buffer-substring (point) (viper-line-pos 'end)))
- ))
+ (unless (eq 0 status)
+ (save-excursion
+ (skip-chars-forward " \t\n\j")
+ (if (looking-at "ls:")
+ (viper-forward-Word 1))
+ (error "%s: %s"
+ (if (stringp gshell)
+ gshell
+ "shell")
+ (buffer-substring (point) (viper-line-pos 'end)))
+ ))
(goto-char (point-min))
(viper-get-filenames-from-buffer 'one-per-line))
))
diff --git a/lisp/files.el b/lisp/files.el
index 4983b1287e8..ec58906e485 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4137,10 +4137,10 @@ program specified by `directory-free-space-program' if that is non-nil."
(save-match-data
(with-temp-buffer
(when (and directory-free-space-program
- (zerop (call-process directory-free-space-program
- nil t nil
- directory-free-space-args
- dir)))
+ (eq 0 (call-process directory-free-space-program
+ nil t nil
+ directory-free-space-args
+ dir)))
;; Usual format is a header line followed by a line of
;; numbers.
(goto-char (point-min))
@@ -4260,21 +4260,21 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
file))))))))
;; If `insert-directory-program' failed, signal an error.
- (if (/= result 0)
- ;; On non-Posix systems, we cannot open a directory, so
- ;; don't even try, because that will always result in
- ;; the ubiquitous "Access denied". Instead, show the
- ;; command line so the user can try to guess what went wrong.
- (if (and (file-directory-p file)
- (memq system-type '(ms-dos windows-nt)))
- (error
- "Reading directory: \"%s %s -- %s\" exited with status %s"
- insert-directory-program
- (if (listp switches) (concat switches) switches)
- file result)
- ;; Unix. Access the file to get a suitable error.
- (access-file file "Reading directory")
- (error "Listing directory failed but `access-file' worked")))
+ (unless (eq 0 result)
+ ;; On non-Posix systems, we cannot open a directory, so
+ ;; don't even try, because that will always result in
+ ;; the ubiquitous "Access denied". Instead, show the
+ ;; command line so the user can try to guess what went wrong.
+ (if (and (file-directory-p file)
+ (memq system-type '(ms-dos windows-nt)))
+ (error
+ "Reading directory: \"%s %s -- %s\" exited with status %s"
+ insert-directory-program
+ (if (listp switches) (concat switches) switches)
+ file result)
+ ;; Unix. Access the file to get a suitable error.
+ (access-file file "Reading directory")
+ (error "Listing directory failed but `access-file' worked")))
(when (string-match "--dired\\>" switches)
(forward-line -2)
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index aae0f0f85c1..7a0f39d89ee 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -356,7 +356,7 @@ to keep: LEN chars starting BEG chars from the beginning."
(jka-compr-delete-temp-file err-file)))
- (or (zerop
+ (or (eq 0
(apply 'call-process
prog
infile
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index e2ce10db3fc..c44ea46243a 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1029,7 +1029,7 @@ external program defined by `sendmail-program'."
)
)
(exit-value (apply 'call-process-region args)))
- (or (null exit-value) (zerop exit-value)
+ (or (null exit-value) (eq 0 exit-value)
(error "Sending...failed with exit value %d" exit-value)))
(or fcc-was-found
(error "No recipients")))
diff --git a/lisp/man.el b/lisp/man.el
index 4a768e1effb..61131db20be 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -425,9 +425,9 @@ This is necessary if one wants to dump man.el with Emacs."
(cond
(Man-fontify-manpage-flag
nil)
- ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script))
+ ((eq 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script))
Man-sysv-sed-script)
- ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script))
+ ((eq 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script))
Man-berkeley-sed-script)
(t
nil))))
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 906eed14ca6..83bf03f7c46 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -5,7 +5,7 @@
;; Chris Chase <chase@att.com>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
;; Version: 4.15
-;; Date: $Date: 2003/07/21 21:36:29 $
+;; Date: $Date: 2003/09/01 15:45:35 $
;; Keywords: languages
;; This file is part of GNU Emacs.
@@ -3889,9 +3889,12 @@ you specify /."
(progn
(message (concat "Tagging " item "..."))
(setq errbuf (get-buffer-create "*idltags-error*"))
- (setq status (+ status
- (call-process "sh" nil errbuf nil "-c"
- (concat cmd append item))))
+ (setq status
+ (+ status
+ (if (eq 0 (call-process "sh" nil errbuf nil "-c"
+ (concat cmd append item)))
+ 0
+ 1)))
;;
;; Append additional tags
(setq append " --append ")
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index f56d08a76b7..5130ca9bfef 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1374,7 +1374,7 @@ and generates the overview, one line per target name."
(delete-file filename)) ; remove the tmpfile
(defun makefile-query-by-make-minus-q (target &optional filename)
- (not (zerop
+ (not (eq 0
(call-process makefile-brave-make nil nil nil
"-f" filename "-q" target))))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index e71eb440c12..3d41042e8d7 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1351,7 +1351,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
ispell-personal-dictionary)))))
(setq args (append args ispell-extra-args))
args))))
- (if (= c 0)
+ (if (eq c 0)
(flyspell-external-point-words)
(error "Can't check region...")))))