Annotation of 43BSD/contrib/emacs/lisp/rmailmsc.el, revision 1.1.1.1

1.1       root        1: ;; Copyright (C) 1985 Richard M. Stallman.
                      2: 
                      3: ;; This file is part of GNU Emacs.
                      4: 
                      5: ;; GNU Emacs is distributed in the hope that it will be useful,
                      6: ;; but WITHOUT ANY WARRANTY.  No author or distributor
                      7: ;; accepts responsibility to anyone for the consequences of using it
                      8: ;; or for whether it serves any particular purpose or works at all,
                      9: ;; unless he says so in writing.  Refer to the GNU Emacs General Public
                     10: ;; License for full details.
                     11: 
                     12: ;; Everyone is granted permission to copy, modify and redistribute
                     13: ;; GNU Emacs, but only under the conditions described in the
                     14: ;; GNU Emacs General Public License.   A copy of this license is
                     15: ;; supposed to have been given to you along with GNU Emacs so you
                     16: ;; can know your rights and responsibilities.  It should be in a
                     17: ;; file named COPYING.  Among other things, the copyright notice
                     18: ;; and this notice must be preserved on all copies.
                     19: 
                     20: 
                     21: (defun set-rmail-inbox-list (file-name)
                     22:   "Set the inbox list of the current RMAIL file to FILE-NAME.  This may be
                     23: a list of file names separated by commas.  If FILE-NAME is empty, remove
                     24: any inbox list."
                     25:   (interactive "sSet mailbox list to:  ")
                     26:   (save-excursion
                     27:     (let ((names (rmail-parse-file-inboxes))
                     28:          (standard-output nil))
                     29:       (if (or (not names)
                     30:              (y-or-n-p (concat "Replace "
                     31:                                (mapconcat 'identity names ", ")
                     32:                                "? ")))
                     33:          (let ((buffer-read-only nil))
                     34:            (widen)
                     35:            (goto-char (point-min))
                     36:            (search-forward "\n\^_")
                     37:            (re-search-backward "^Mail" nil t)
                     38:            (forward-line 0)
                     39:            (if (looking-at "Mail:")
                     40:                (delete-region (point)
                     41:                               (progn (forward-line 1)
                     42:                                      (point))))
                     43:            (if (not (string= file-name ""))
                     44:                (insert "Mail: " file-name "\n"))))))
                     45:   (setq rmail-inbox-list (rmail-parse-file-inboxes))
                     46:   (rmail-show-message rmail-current-message))

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.