4.4BSD/usr/src/contrib/emacs-18.57/lisp/rmailkwd.elc


(defvar rmail-label-obarray (make-vector 47 0))

(defconst rmail-attributes (cons (quote rmail-keywords) (mapcar (quote (lambda (s) (intern s rmail-label-obarray))) (quote ("deleted" "answered" "filed" "forwarded" "unseen" "edited")))))

(defconst rmail-deleted-label (intern "deleted" rmail-label-obarray))

(defvar rmail-keywords nil)

(defun rmail-add-label (string) "\
Add LABEL to labels associated with current RMAIL message.
Completion is performed over known labels when reading." (interactive (byte-code "!C" [rmail-read-label "Add label"] 2)) (byte-code "ˆ\"" [string t nil rmail-set-label] 3))

(defun rmail-kill-label (string) "\
Remove LABEL from labels associated with current RMAIL message.
Completion is performed over known labels when reading." (interactive (byte-code "!C" [rmail-read-label "Remove label"] 2)) (byte-code "\"" [string nil rmail-set-label] 3))

(defun rmail-read-label (prompt) (byte-code "? 
!QP$	\")/	\")" [rmail-keywords result prompt rmail-last-label rmail-label-obarray nil t rmail-parse-file-keywords completing-read " (default " symbol-name "): " ": " string= "" rmail-make-label] 7))

(defun rmail-set-label (l state &optional n) (byte-code " ?	
SI
!?$
!$
!, dZ eZ
	֎ !b!!?_Â`T
` `\"d#`T`T

b!Q#?!!#=\"*)),+" [n rmail-current-message rmail-summary-vector nil attribute l keyword label omax omin buffer-read-only case-fold-search t start bound state rmail-deleted-label rmail-maybe-set-message-counters rmail-attribute-p rmail-keyword-p rmail-install-keyword buffer-size ((byte-code " Z 	Z\"
U " [omin omax n rmail-current-message narrow-to-region buffer-size rmail-display-labels] 6)) widen rmail-msgbeg forward-line 1 looking-at "[01]," narrow-to-region end-of-line search-backward ",," re-search-forward ", " rmail-quote-label-name "," move replace-match insert " " symbol-name rmail-set-message-deleted-p] 21))

(defun rmail-attribute-p (s) (byte-code "	!
A>)" [symbol s rmail-attributes rmail-make-label] 3))

(defun rmail-keyword-p (s) (byte-code "	! A>
)" [symbol s rmail-make-label rmail-keywords] 4))

(defun rmail-make-label (s &optional forcep) (byte-code "9		!
\"!
\"" [s forcep rmail-label-obarray t intern downcase intern-soft] 6))

(defun rmail-force-make-label (s) (byte-code "!	\"" [s rmail-label-obarray intern downcase] 4))

(defun rmail-quote-label-name (label) (byte-code "\"!!" [label t regexp-quote symbol-name rmail-make-label] 5))

(defun rmail-previous-labeled-message (n label) "\
Show previous message with LABEL.  Defaults to last labels used.
With prefix argument N moves backward N messages with these labels." (interactive "p
sMove to previous msg with labels: ") (byte-code "ˆ[	\"" [n label nil rmail-next-labeled-message] 3))

(defun rmail-next-labeled-message (n labels) "\
Show next message with LABEL.  Defaults to last labels used.
With prefix argument N moves forward N messages with these labels." (interactive "p
sMove to next msg with labels: ") (byte-code "Ȉ\"	! !Q V6WQT
\"MS+W\\VwS
\"sTR)
!W\"V\"+" [labels rmail-last-multi-labels lastwin rmail-current-message current regexp n rmail-total-messages nil string= "" error "No labels to find have been specified previously" rmail-maybe-set-message-counters ", ?\\(" mail-comma-list-regexp "\\)," widen 0 rmail-message-labels-p 1 rmail-show-message message "No previous message with labels %s" "No following message with labels %s"] 12))

(defun rmail-keywords nil (byte-code " " [rmail-keywords rmail-parse-file-keywords] 2))

(defun rmail-parse-file-keywords nil (byte-code " b!#$` `\"eb \"B))" [rmail-keywords t widen 1 search-forward "
Labels:" rmail-msgbeg narrow-to-region end-of-line mapcar rmail-force-make-label mail-parse-comma-list] 10))

(defun rmail-install-keyword (word) (byte-code "	\" !!?f eZ dZΎ b#; c` `\"AB\"A^@!\"L!*))**" [keyword word t keywords omin omax case-fold-search buffer-read-only nil rmail-make-label rmail-keywords rmail-attribute-p rmail-keyword-p buffer-size ((byte-code " Z 	Z\"" [omin omax narrow-to-region buffer-size] 6)) widen 1 search-forward "
Labels:" end-of-line delete-region setcdr insert symbol-name "," delete-char -1] 17))