diff options
author | John Paul Wallington <jpw@pobox.com> | 2008-05-15 01:16:52 +0000 |
---|---|---|
committer | John Paul Wallington <jpw@pobox.com> | 2008-05-15 01:16:52 +0000 |
commit | 3516a0187c9eb995187a56aede6774642b2d6fc5 (patch) | |
tree | a6e08eb020954b906124b5feb06d7831a2c7a6c6 /lisp/arc-mode.el | |
parent | 95e8ab353bd622e4190bc2f5463e03106c50ca3a (diff) | |
download | emacs-3516a0187c9eb995187a56aede6774642b2d6fc5.tar.gz |
(archive-add-new-member): Use `derived-mode-p'.
(archive-*-extract): Use `zerop'
(archive-*-write-file-member): Use `or', use `zerop'.
Diffstat (limited to 'lisp/arc-mode.el')
-rw-r--r-- | lisp/arc-mode.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 33d535c47a8..8070e95a671 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1059,7 +1059,7 @@ using `make-temp-file', and the generated name is returned." 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 @@ using `make-temp-file', and the generated name is returned." (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 @@ using `make-temp-file', and the generated name is returned." 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) |