aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-05-07 01:21:58 +0000
committerRichard M. Stallman1994-05-07 01:21:58 +0000
commitdd03399111a4fd6feecaac2b6c2f4d3052b28e43 (patch)
tree591ad80a8f61cf8643a89c32c506908ad1b9b01d
parent75a6b98e4d1c4834df7400a29687f1ea1cb934d2 (diff)
downloademacs-dd03399111a4fd6feecaac2b6c2f4d3052b28e43.tar.gz
emacs-dd03399111a4fd6feecaac2b6c2f4d3052b28e43.zip
If rmail-spool-directory is not a directory,
just output an `echo' command to tell about it.
-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 @@
45 (setq dirname (if (file-name-absolute-p linkname) 45 (setq dirname (if (file-name-absolute-p linkname)
46 linkname 46 linkname
47 (concat (file-name-directory dirname) linkname)))) 47 (concat (file-name-directory dirname) linkname))))
48 (setq attr (file-attributes dirname))
49 (or (eq t (car attr))
50 (signal 'error
51 (list (format "%s is not a directory" rmail-spool-directory))))
52 (setq modes (nth 8 attr))
53 (insert "#!/bin/sh\n") 48 (insert "#!/bin/sh\n")
54 (cond ((= ?w (aref modes 8)) 49 (setq attr (file-attributes dirname))
55 ;; Nothing needs to be done. 50 (if (not (eq t (car attr)))
56 ) 51 (insert (format "echo %s is not a directory\n" rmail-spool-directory))
57 ((= ?w (aref modes 5)) 52 (setq modes (nth 8 attr))
58 (insert "chgrp " (number-to-string (nth 3 attr)) 53 (cond ((= ?w (aref modes 8))
59 " $* && chmod g+s $*\n")) 54 ;; Nothing needs to be done.
60 ((= ?w (aref modes 2)) 55 )
61 (insert "chown " (number-to-string (nth 2 attr)) 56 ((= ?w (aref modes 5))
62 " $* && chmod u+s $*\n")) 57 (insert "chgrp " (number-to-string (nth 3 attr))
63 (t 58 " $* && chmod g+s $*\n"))
64 (insert "chown root $* && chmod u+s $*\n"))) 59 ((= ?w (aref modes 2))
60 (insert "chown " (number-to-string (nth 2 attr))
61 " $* && chmod u+s $*\n"))
62 (t
63 (insert "chown root $* && chmod u+s $*\n"))))
65 (insert "echo mail directory = " dirname "\n")) 64 (insert "echo mail directory = " dirname "\n"))
66(write-region (point-min) (point-max) "blessmail") 65(write-region (point-min) (point-max) "blessmail")
67(kill-emacs) 66(kill-emacs)