# HG changeset patch # User John Paul Wallington # Date 1210814212 0 # Node ID e2f05c17ddad0d74dec24dd31a7794652cd9d32e # Parent 78ec9a87d0e56a18a0184d0645e2399df61e0e7a (archive-add-new-member): Use `derived-mode-p'. (archive-*-extract): Use `zerop' (archive-*-write-file-member): Use `or', use `zerop'. diff -r 78ec9a87d0e5 -r e2f05c17ddad lisp/arc-mode.el --- a/lisp/arc-mode.el Thu May 15 01:14:41 2008 +0000 +++ b/lisp/arc-mode.el Thu May 15 01:16:52 2008 +0000 @@ -1059,7 +1059,7 @@ nil nil (append (cdr command) (list archive name)))) - (cond ((and (numberp exit-status) (= exit-status 0)) + (cond ((and (numberp exit-status) (zerop exit-status)) (if (not (file-exists-p tmpfile)) (ding (message "`%s': no such file or directory" tmpfile)) (insert-file-contents tmpfile) @@ -1117,7 +1117,7 @@ (file-name-nondirectory buffer-file-name) "")))) (with-current-buffer arcbuf - (or (eq major-mode 'archive-mode) + (or (derived-mode-p 'archive-mode) (error "Buffer is not an archive buffer")) (if archive-read-only (error "Archive is read-only"))) @@ -1190,9 +1190,8 @@ nil (append (cdr command) (list archive ename))))) - (if (equal exitcode 0) - nil - (error "Updating was unsuccessful (%S)" exitcode)))) + (or (zerop exitcode) + (error "Updating was unsuccessful (%S)" exitcode)))) (archive-delete-local tmpfile)))) (defun archive-write-file (&optional file)