Mercurial > emacs
comparison lisp/mail/rmailkwd.el @ 6621:82404c81aac8
(rmail-message-label-p, rmail-parse-message-labels):
Update obsolete (commented-out) functions.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 01 Apr 1994 02:31:45 +0000 |
parents | 213978acbc1e |
children | cc7cd83ccf3f |
comparison
equal
deleted
inserted
replaced
6620:990d7d5095dc | 6621:82404c81aac8 |
---|---|
116 | 116 |
117 ;; Commented functions aren't used by RMAIL but might be nice for user | 117 ;; Commented functions aren't used by RMAIL but might be nice for user |
118 ;; packages that do stuff with RMAIL. Note that rmail-message-labels-p | 118 ;; packages that do stuff with RMAIL. Note that rmail-message-labels-p |
119 ;; is in rmail.el now. | 119 ;; is in rmail.el now. |
120 | 120 |
121 ;(defun rmail-message-attribute-p (attribute &optional n) | |
122 ; "Returns t if ATTRIBUTE on NTH or current message." | |
123 ; (rmail-message-labels-p (rmail-make-label attribute t) n)) | |
124 | |
125 ;(defun rmail-message-keyword-p (keyword &optional n) | |
126 ; "Returns t if KEYWORD on NTH or current message." | |
127 ; (rmail-message-labels-p (rmail-make-label keyword t) n t)) | |
128 | |
129 ;(defun rmail-message-label-p (label &optional n) | 121 ;(defun rmail-message-label-p (label &optional n) |
130 ; "Returns symbol if LABEL (attribute or keyword) on NTH or current message." | 122 ; "Returns symbol if LABEL (attribute or keyword) on NTH or current message." |
131 ; (rmail-message-labels-p (rmail-make-label label t) n 'all)) | 123 ; (rmail-message-labels-p (or n rmail-current-message) (regexp-quote label))) |
132 | |
133 ;; Not used by RMAIL but might be nice for user package. | |
134 | 124 |
135 ;(defun rmail-parse-message-labels (&optional n) | 125 ;(defun rmail-parse-message-labels (&optional n) |
136 ; "Returns labels associated with NTH or current RMAIL message. | 126 ; "Returns labels associated with NTH or current RMAIL message. |
137 ;Results is a list of two lists. The first is the message attributes | 127 ;The result is a list of two lists of strings. The first is the |
138 ;and the second is the message keywords. Labels are represented as symbols." | 128 ;message attributes and the second is the message keywords." |
139 ; (let ((omin (- (buffer-size) (point-min))) | 129 ; (let (atts keys) |
140 ; (omax (- (buffer-size) (point-max))) | 130 ; (save-restriction |
141 ; (result)) | 131 ; (widen) |
142 ; (unwind-protect | 132 ; (goto-char (rmail-msgbeg (or n rmail-current-message))) |
143 ; (save-excursion | 133 ; (forward-line 1) |
144 ; (let ((beg (rmail-msgbeg (or n rmail-current-message)))) | 134 ; (or (looking-at "[01],") (error "Malformed label line")) |
145 ; (widen) | 135 ; (forward-char 2) |
146 ; (goto-char beg) | 136 ; (while (looking-at "[ \t]*\\([^ \t\n,]+\\),") |
147 ; (forward-line 1) | 137 ; (setq atts (cons (buffer-substring (match-beginning 1) (match-end 1)) |
148 ; (if (looking-at "[01],") | 138 ; atts)) |
149 ; (save-restriction | 139 ; (goto-char (match-end 0))) |
150 ; (narrow-to-region (point) (save-excursion (end-of-line) (point))) | 140 ; (or (looking-at ",") (error "Malformed label line")) |
151 ; (rmail-nuke-whitespace) | 141 ; (forward-char 1) |
152 ; (goto-char (1+ (point-min))) | 142 ; (while (looking-at "[ \t]*\\([^ \t\n,]+\\),") |
153 ; (list (mail-parse-comma-list) (mail-parse-comma-list)))))) | 143 ; (setq keys (cons (buffer-substring (match-beginning 1) (match-end 1)) |
154 ; (narrow-to-region (- (buffer-size) omin) | 144 ; keys)) |
155 ; (- (buffer-size) omax)) | 145 ; (goto-char (match-end 0))) |
156 ; nil))) | 146 ; (or (looking-at "[ \t]*$") (error "Malformed label line")) |
147 ; (list (nreverse atts) (nreverse keys))))) | |
157 | 148 |
158 (defun rmail-attribute-p (s) | 149 (defun rmail-attribute-p (s) |
159 (let ((symbol (rmail-make-label s))) | 150 (let ((symbol (rmail-make-label s))) |
160 (if (memq symbol (cdr rmail-attributes)) symbol))) | 151 (if (memq symbol (cdr rmail-attributes)) symbol))) |
161 | 152 |