annotate lisp/blessmail.el @ 2362:6aa56b089139

[xemacs-hg @ 2004-11-02 09:51:04 by ben] To: xemacs-patches@xemacs.org internals/index.texi: Deleted. Incorporated into internals.texi. Having a separate index file messes up texinfo-master-menu. internals/internals.texi: Add bunches and bunches and bunches and bunches of stuff, taken from documentation floating around in various places -- text.c, file-coding.c, other .c and .h files, stuff that I wrote up for an old XEmacs contract, proposals written up in the process of an e-mail discussion, etc. Fix up some mistakes, esp. in CCL. Extra crap from CCL, duplicated with Lispref, removed. Sections on Old Future Work and Future Work Discussion added. Bunches of other work. Add bunches of documentation taken from the source code. Fixup various places to use @strong{}, @code{}, @file{}. Create new Text chapter, split off from Buffers and Textual Representation. Create new chapter for MS Windows, mostly written from scratch. Consolidate all Mule info under "Multilingual Support". Break up chapter on modules and move some parts to the sections discussing the modules, for consolidation purposes. Add a big cross-reference table for all the modules to where they're discussed (or not). New chapter Asynchronous Events; Quit Checking. (Taken from various parts of the code.) New Introduction. New section on Focus Handling (from the code). NOTE that in the process, I discovered that we essentially have FOUR redundant introductions to Mule issues! Someone really needs to go through and clean them up and integrate them (sjt?).
author ben
date Tue, 02 Nov 2004 09:51:18 +0000
parents d44af0c54775
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
1 ;;; blessmail.el --- Decide whether movemail needs special privileges.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
2
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
3 ;; Copyright (C) 1994 Free Software Foundation, Inc.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
4
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
5 ;; Maintainer: FSF
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
6 ;; Keywords: internal
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
7
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
9
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
13 ;; any later version.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
14
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
18 ;; General Public License for more details.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
19
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
23 ;; 02111-1307, USA.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
24
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
25 ;;; Synched up with: FSF 19.34.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
26
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
27 ;;; Commentary:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
28
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
29 ;; This is loaded into a bare Emacs to create the blessmail script,
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
30 ;; which (on systems that need it) is used during installation
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
31 ;; to give appropriate permissions to movemail.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
32 ;;
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
33 ;; It has to be done from lisp in order to be sure of getting the
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
34 ;; correct value of rmail-spool-directory.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
35
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
36 ;;; Code:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
37
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
38 ;; These are no longer needed because we run this in emacs instead of temacs.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
39 ;; (message "Using load-path %s" load-path)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
40 ;; (load "paths.el")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
41 ;; It is not safe to load site-init.el here, because it might have things in it
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
42 ;; that won't load properly unless all the rest of Emacs is loaded.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
43
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
44 (let ((dirname (directory-file-name rmail-spool-directory))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
45 linkname attr modes)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
46 ;; Check for symbolic link
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
47 (while (setq linkname (file-symlink-p dirname))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
48 (setq dirname (if (file-name-absolute-p linkname)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
49 linkname
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
50 (concat (file-name-directory dirname) linkname))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
51 (insert "#!/bin/sh\n")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
52 (setq attr (file-attributes dirname))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
53 (if (not (eq t (car attr)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
54 (insert (format "echo %s is not a directory\n" rmail-spool-directory))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
55 (setq modes (nth 8 attr))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
56 (cond ((= ?w (aref modes 8))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
57 ;; Nothing needs to be done.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
58 )
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
59 ((= ?w (aref modes 5))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
60 (insert "chgrp " (number-to-string (nth 3 attr))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
61 " $* && chmod g+s $*\n"))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
62 ((= ?w (aref modes 2))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
63 (insert "chown " (number-to-string (nth 2 attr))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
64 " $* && chmod u+s $*\n"))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
65 (t
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
66 (insert "chown root $* && chmod u+s $*\n"))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
67 (insert "echo mail directory = " dirname "\n"))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
68 (write-region (point-min) (point-max) "blessmail")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
69 (kill-emacs)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
70
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
71 ;;; blessmail.el ends here