aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Paul Wallington2008-05-15 01:16:52 +0000
committerJohn Paul Wallington2008-05-15 01:16:52 +0000
commit3516a0187c9eb995187a56aede6774642b2d6fc5 (patch)
treea6e08eb020954b906124b5feb06d7831a2c7a6c6
parent95e8ab353bd622e4190bc2f5463e03106c50ca3a (diff)
downloademacs-3516a0187c9eb995187a56aede6774642b2d6fc5.tar.gz
emacs-3516a0187c9eb995187a56aede6774642b2d6fc5.zip
(archive-add-new-member): Use `derived-mode-p'.
(archive-*-extract): Use `zerop' (archive-*-write-file-member): Use `or', use `zerop'.
-rw-r--r--lisp/arc-mode.el9
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."
1059 nil 1059 nil
1060 nil 1060 nil
1061 (append (cdr command) (list archive name)))) 1061 (append (cdr command) (list archive name))))
1062 (cond ((and (numberp exit-status) (= exit-status 0)) 1062 (cond ((and (numberp exit-status) (zerop exit-status))
1063 (if (not (file-exists-p tmpfile)) 1063 (if (not (file-exists-p tmpfile))
1064 (ding (message "`%s': no such file or directory" tmpfile)) 1064 (ding (message "`%s': no such file or directory" tmpfile))
1065 (insert-file-contents tmpfile) 1065 (insert-file-contents tmpfile)
@@ -1117,7 +1117,7 @@ using `make-temp-file', and the generated name is returned."
1117 (file-name-nondirectory buffer-file-name) 1117 (file-name-nondirectory buffer-file-name)
1118 "")))) 1118 ""))))
1119 (with-current-buffer arcbuf 1119 (with-current-buffer arcbuf
1120 (or (eq major-mode 'archive-mode) 1120 (or (derived-mode-p 'archive-mode)
1121 (error "Buffer is not an archive buffer")) 1121 (error "Buffer is not an archive buffer"))
1122 (if archive-read-only 1122 (if archive-read-only
1123 (error "Archive is read-only"))) 1123 (error "Archive is read-only")))
@@ -1190,9 +1190,8 @@ using `make-temp-file', and the generated name is returned."
1190 nil 1190 nil
1191 (append (cdr command) 1191 (append (cdr command)
1192 (list archive ename))))) 1192 (list archive ename)))))
1193 (if (equal exitcode 0) 1193 (or (zerop exitcode)
1194 nil 1194 (error "Updating was unsuccessful (%S)" exitcode))))
1195 (error "Updating was unsuccessful (%S)" exitcode))))
1196 (archive-delete-local tmpfile)))) 1195 (archive-delete-local tmpfile))))
1197 1196
1198(defun archive-write-file (&optional file) 1197(defun archive-write-file (&optional file)