Mercurial > emacs
comparison lisp/mail/rmail.el @ 88248:7133ca28db03
(rmail-get-new-mail): Doc.
(rmail-get-inbox-list): Doc.
author | Alex Schroeder <alex@gnu.org> |
---|---|
date | Sat, 21 Jan 2006 00:50:18 +0000 |
parents | 80cb86e7ac6d |
children | 61c503e4cee5 |
comparison
equal
deleted
inserted
replaced
88247:244362bb8500 | 88248:7133ca28db03 |
---|---|
1413 | 1413 |
1414 | 1414 |
1415 ;;;; *** Rmail input *** | 1415 ;;;; *** Rmail input *** |
1416 | 1416 |
1417 (defun rmail-get-inbox-list () | 1417 (defun rmail-get-inbox-list () |
1418 ;; Pull files off rmail-inbox-list onto files as long as there is no | 1418 "Return all files from `rmail-inbox-list' without name conflicts. |
1419 ;; name conflict. A conflict happens when two inbox file names have | 1419 A conflict happens when two inbox file names have the same name |
1420 ;; the same last component. | 1420 according to `file-name-nondirectory'." |
1421 (let (files last-names) | 1421 (let (files last-names) |
1422 (catch 'conflict | 1422 (catch 'conflict |
1423 (dolist (file rmail-inbox-list) | 1423 (dolist (file rmail-inbox-list) |
1424 (if (member (file-name-nondirectory file) last-names) | 1424 (if (member (file-name-nondirectory file) last-names) |
1425 (throw 'conflict t) | 1425 (throw 'conflict t) |
1426 (push file files)) | 1426 (push file files)) |
1427 (push (file-name-nondirectory file) last-names))) | 1427 (push (file-name-nondirectory file) last-names))) |
1428 (nreverse files))) | 1428 (nreverse files))) |
1429 | 1429 |
1430 ;; RLK feature not added in this version: | |
1431 ;; argument specifies inbox file or files in various ways. | |
1432 | |
1433 ;;; DOC NOT DONE | |
1434 (defun rmail-get-new-mail (&optional file-name) | 1430 (defun rmail-get-new-mail (&optional file-name) |
1435 "Move any new mail from this RMAIL file's inbox files. | 1431 "Move any new mail from this mail file's inbox files. |
1436 The inbox files can be specified with the file's Mail: option. The | 1432 The inbox files for the primary mail file are determined using |
1437 variable `rmail-primary-inbox-list' specifies the inboxes for your | 1433 various means when setting up the buffer. The list of inbox |
1438 primary RMAIL file if it has no Mail: option. By default, this is | 1434 files are stored in `rmail-inbox-list'. |
1439 your /usr/spool/mail/$USER. | 1435 |
1440 | 1436 The most important variable that determines the value of this |
1441 You can also specify the file to get new mail from. In this case, the | 1437 list is `rmail-inbox-alist' which lists the inbox files for any |
1442 file of new mail is not changed or deleted. Noninteractively, you can | 1438 mail files you might be using. |
1443 pass the inbox file name as an argument. Interactively, a prefix | 1439 |
1444 argument causes us to read a file name and use that file as the inbox. | 1440 If the above yields no inbox files, and if this is the primary |
1441 mail file as determined by `rmail-file-name', the inbox lists | |
1442 otherwise defaults to `rmail-primary-inbox-list' if set, or the | |
1443 environment variable MAIL if set, or the user's mail file in | |
1444 `rmail-spool-directory'. | |
1445 | |
1446 This is why, by default, no mail file has inbox files, except for | |
1447 the primary mail file ~/RMAIL, which gets its new mail from the | |
1448 mail spool. | |
1449 | |
1450 You can also specify the file to get new mail from interactively. | |
1451 A prefix argument will read a file name and use that file as the | |
1452 inbox. Noninteractively, you can pass the inbox file name as an | |
1453 argument. | |
1445 | 1454 |
1446 If the variable `rmail-preserve-inbox' is non-nil, new mail will | 1455 If the variable `rmail-preserve-inbox' is non-nil, new mail will |
1447 always be left in inbox files rather than deleted. | 1456 always be left in inbox files rather than deleted. |
1448 | 1457 |
1449 This function runs `rmail-get-new-mail-hook' before saving the updated file. | 1458 This function runs `rmail-get-new-mail-hook' before saving the |
1450 It returns t if it got any new messages." | 1459 updated file. It returns t if it got any new messages." |
1451 (interactive | 1460 (interactive |
1452 (list (if current-prefix-arg | 1461 (list (if current-prefix-arg |
1453 (read-file-name "Get new mail from file: ")))) | 1462 (read-file-name "Get new mail from file: ")))) |
1454 (run-hooks 'rmail-before-get-new-mail-hook) | 1463 (run-hooks 'rmail-before-get-new-mail-hook) |
1455 ;; If the disk file has been changed from under us, | 1464 ;; If the disk file has been changed from under us, |