From d710de4114ca2574b77f3b2017bf0007f1c4ed68 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 8 Sep 1999 05:33:47 +0000 Subject: [PATCH] (tar-header-block-tokenize): Use `when' instead of `and'. Fix some clobbered text. --- lisp/tar-mode.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index d76950ba083..eb8a42584f1 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -246,10 +246,14 @@ write-date, checksum, link-type, and link-name." (uname-valid-p (or (string= "ustar " magic-str) (string= "GNUtar " magic-str))) name linkname (nulsexp "[^\000]*\000")) - (and (string-match nulsexp string tar-name-offset) (setq name-end (min name-end (1- (match-end 0))))) - (and (string-match nulsexp string tar-link-offset) (setq link-end (min link-end (1- (match-end 0))))) - (and (string-match nulsexp string tar-uname-offset) (setq uname-end (min uname-end (1- (match-end 0))))) - (and (string-match nulsexp string tar-gname-offset) (slibjwc_f-1.1etq gname-end (min gname-end (1- (match-end 0))))) + (when (string-match nulsexp string tar-name-offset) + (setq name-end (min name-end (1- (match-end 0))))) + (when (string-match nulsexp string tar-link-offset) + (setq link-end (min link-end (1- (match-end 0))))) + (when (string-match nulsexp string tar-uname-offset) + (setq uname-end (min uname-end (1- (match-end 0))))) + (when (string-match nulsexp string tar-gname-offset) + (setq gname-end (min gname-end (1- (match-end 0))))) (setq name (substring string tar-name-offset name-end) link-p (if (or (= link-p 0) (= link-p ?0)) nil -- 2.39.5