summaryrefslogtreecommitdiff
path: root/lisp/mail/blessmail.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-07 01:21:58 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-07 01:21:58 +0000
commitdd03399111a4fd6feecaac2b6c2f4d3052b28e43 (patch)
tree591ad80a8f61cf8643a89c32c506908ad1b9b01d /lisp/mail/blessmail.el
parent75a6b98e4d1c4834df7400a29687f1ea1cb934d2 (diff)
downloademacs-dd03399111a4fd6feecaac2b6c2f4d3052b28e43.tar.gz
If rmail-spool-directory is not a directory,
just output an `echo' command to tell about it.
Diffstat (limited to 'lisp/mail/blessmail.el')
-rw-r--r--lisp/mail/blessmail.el31
1 files changed, 15 insertions, 16 deletions
diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el
index 843a616d03e..d940248e13b 100644
--- a/lisp/mail/blessmail.el
+++ b/lisp/mail/blessmail.el
@@ -45,23 +45,22 @@
(setq dirname (if (file-name-absolute-p linkname)
linkname
(concat (file-name-directory dirname) linkname))))
- (setq attr (file-attributes dirname))
- (or (eq t (car attr))
- (signal 'error
- (list (format "%s is not a directory" rmail-spool-directory))))
- (setq modes (nth 8 attr))
(insert "#!/bin/sh\n")
- (cond ((= ?w (aref modes 8))
- ;; Nothing needs to be done.
- )
- ((= ?w (aref modes 5))
- (insert "chgrp " (number-to-string (nth 3 attr))
- " $* && chmod g+s $*\n"))
- ((= ?w (aref modes 2))
- (insert "chown " (number-to-string (nth 2 attr))
- " $* && chmod u+s $*\n"))
- (t
- (insert "chown root $* && chmod u+s $*\n")))
+ (setq attr (file-attributes dirname))
+ (if (not (eq t (car attr)))
+ (insert (format "echo %s is not a directory\n" rmail-spool-directory))
+ (setq modes (nth 8 attr))
+ (cond ((= ?w (aref modes 8))
+ ;; Nothing needs to be done.
+ )
+ ((= ?w (aref modes 5))
+ (insert "chgrp " (number-to-string (nth 3 attr))
+ " $* && chmod g+s $*\n"))
+ ((= ?w (aref modes 2))
+ (insert "chown " (number-to-string (nth 2 attr))
+ " $* && chmod u+s $*\n"))
+ (t
+ (insert "chown root $* && chmod u+s $*\n"))))
(insert "echo mail directory = " dirname "\n"))
(write-region (point-min) (point-max) "blessmail")
(kill-emacs)