;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:45:54 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/mail-hist.el ;;; emacs version 19.28.90.26. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/mail-hist.el' was compiled for Emacs 19")) (require (quote ring)) #@67 Define keys for accessing mail header history. For use in hooks. (defalias 'mail-hist-define-keys #[nil "\"\"" [local-set-key "" mail-hist-previous-input "" mail-hist-next-input] 3 (#$ . 510)]) (byte-code "\"\"\"" [add-hook mail-mode-hook mail-hist-define-keys vm-mail-mode-hook mail-send-hook mail-hist-put-headers-into-history] 3) #@136 Alist of form (header-name . history-ring). Used for knowing which history list to look in when the user asks for previous/next input. (defvar mail-hist-header-ring-alist nil (#$ . 873)) #@94 *The maximum number of elements in a mail field's history. Oldest elements are dumped first. (defvar mail-hist-history-size (byte-code "" [kill-ring-max 1729] 1) (#$ . -1066)) #@70 *Non-nil means keep a history for headers and text of outgoing mail. (defvar mail-hist-keep-history t (#$ . -1254)) (byte-code "! B! BŇ" [boundp mail-hist-access-count 0 current-load-list mail-hist-last-bounds nil] 2) #@60 Regular expression for matching headers in a mail message. (defvar mail-hist-header-regexp "^[^:]*:" (#$ . 1497)) #@150 Get name of mail header point is currently in, without the colon. Returns nil if not in a header, implying that point is in the body of the message. (defalias 'mail-hist-current-header-name #[nil " !Q#)?C !Q#) #\n#`S \nB B\n {," [re-search-backward "^" regexp-quote mail-header-separator "$" nil t re-search-forward body-start mail-hist-header-regexp name-start search-forward ":" name-end] 4 (#$ . 1618)]) (put (quote mail-hist-current-header-name) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@293 Move forward COUNT headers (backward if COUNT is negative). If last/first header is encountered first, stop there and returns nil. Places point on the first non-whitespace on the line following the colon after the header name, or on the second space following that if the header is empty. (defalias 'mail-hist-forward-header #[(count) " !Q#)rby`S)\nVB\nVf #\nS\n+\nS\nW^ #\nT\nH #!ou))" [re-search-forward "^" regexp-quote mail-header-separator "$" nil t boundary unstopped 0 count mail-hist-header-regexp re-search-backward looking-at "\\s-" 1] 5 (#$ . 2175)]) (put (quote mail-hist-forward-header) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@176 Move to the start of the current header. The start of the current header is defined as one space after the colon, or just after the colon if it is not followed by whitespace. (defalias 'mail-hist-beginning-of-header #[nil " !Q#) l\n by`S) V@ V`\f #\n S+ SWX\f#\n TD\f #!iu\n)* !Q#) \n by`S) V V\f #\n S SW\f#\n T\f #!u\n)* !Q#) J\n by`S) V V>\f #\n S  SW6\f#\n T\"\f #!Gu\n))) !Q#) \n by`S) V V\f #\n Sx SW\f#\n T\f #!u\n)*" [-1 count re-search-forward "^" regexp-quote mail-header-separator "$" nil t boundary unstopped 0 mail-hist-header-regexp re-search-backward looking-at "\\s-" 1] 5 (#$ . 2919)]) (put (quote mail-hist-beginning-of-header) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@64 Get the contents of the mail header in which point is located. (defalias 'mail-hist-current-header-contents #[nil " !Q#) m\n by`S) VA Va\f #\n S, SWY\f#\n TE\f #!ju\n)* !Q#) \n by`S) V V\f #\n S SW\f#\n T\f #!u\n)* !Q#) M\n by`S) V! VA\f #\n S\f SW9\f#\n T%\f #!Ju\n))) !Q#) \n by`S) V V\f #\n S{ SW\f#\n T\f #!u\n)*`! !Q!y`S{*" [-1 count re-search-forward "^" regexp-quote mail-header-separator "$" nil t boundary unstopped 0 mail-hist-header-regexp re-search-backward looking-at "\\s-" 1 start mail-hist-forward-header] 5 (#$ . 3902)]) (put (quote mail-hist-current-header-contents) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@82 Get HEADER's history ring, or nil if none. HEADER is a string without the colon. (defalias 'mail-hist-get-header-ring #[(header) "\n\"A" [header assoc mail-hist-header-ring-alist] 3 (#$ . 4843)]) (put (quote mail-hist-get-header-ring) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@167 Add the contents of HEADER to the header history ring. Optional argument CONTENTS is a string which will be the contents (instead of whatever's found in the header). (defalias 'mail-hist-add-header-contents-to-ring #[(header &optional contents) "\n\"A ! B\nB    !Q#)by`S) Ve V# S N S W# T k#!u)*  !Q#)by`S) V V# S  S W# T #!\fu)*  !Q#)by`S) VY V}# S B S Wu# T _#!u)))  !Q#)by`S) V V# S  S W# T #!u)*`! !Q!y`S{*\")" [header assoc mail-hist-header-ring-alist ring make-ring mail-hist-history-size ring-insert contents -1 count re-search-forward "^" regexp-quote mail-header-separator "$" nil t boundary unstopped 0 mail-hist-header-regexp re-search-backward looking-at "\\s-" 1 start mail-hist-forward-header] 8 (#$ . 5150)]) (put (quote mail-hist-add-header-contents-to-ring) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@213 Put headers and contents of this message into mail header history. Each header has its own independent history, as does the body of the message. This function normally would be called when the message is sent. (defalias 'mail-hist-put-headers-into-history #[nil "eb!Q#)\nu \nby`S)\n\nVI\nVi \n# \nS4\nSWa # \nTM \n#!ru )*!Q#)?!Q#) ##`S{,\"A!BB!Q#)\nZ \nby`S)\n\nV.\nVN \n# \nS\nSWF # \nT2 \n#!Wu )*!Q#)\n \nby`S)\n\nV\nV \n# \nS\nSW # \nT \n#!u )*!Q#)\n< \nby`S)\n\nV\nV0 \n# \nS\nSW( # \nT \n#!9u )))!Q#)\n \nby`S)\n\nV\nV \n# \nSk\nSW # \nT \n#!u )*`!!Q!y`S{*\")*eb!Q\"y`d{)!!\"A!BB!Q#)\n \nby`S)\n\nV[\nV{ \n# \nSF\nSWs # \nT_ \n#!u )*!Q#)\n \nby`S)\n\nV\nV \n# \nS\nSW # \nT \n#!u )*!Q#)\ni \nby`S)\n\nV=\nV] \n# \nS(\nSWU # \nTA \n#!fu )))!Q#)\n \nby`S)\n\nV\nV \n# \nS\nSW # \nT \n#!u )*`!!Q!y`S{*\"-" [mail-hist-keep-history 1 count re-search-forward "^" regexp-quote mail-header-separator "$" nil t boundary unstopped 0 mail-hist-header-regexp re-search-backward looking-at "\\s-" body-start name-start search-forward ":" name-end contents header assoc mail-hist-header-ring-alist ring make-ring mail-hist-history-size ring-insert -1 start mail-hist-forward-header body-contents "body"] 9 (#$ . 6376)]) #@281 Insert the previous contents of this mail header or message body. Moves back through the history of sent mail messages. Each header has its own independent history, as does the body of the message. The history only contains the contents of outgoing messages, not received mail. (defalias 'mail-hist-previous-input #[(header) "\n\"A !=!\n \"\n$\n 2 \"a !?\"aL@A|` \n\"c`Blj)+" [header assoc mail-hist-header-ring-alist ring ring-length len last-command mail-hist-input-access repeat ring-plus1 mail-hist-access-count 0 ding message "No history for \"%s\"." ring-empty-p error "\"%s\" ring is empty." mail-hist-last-bounds start ring-ref this-command] 4 (#$ . 8422) (list (or (mail-hist-current-header-name) "body"))]) #@427 Insert next contents of this mail header or message body. Moves back through the history of sent mail messages. Each header has its own independent history, as does the body of the message. Although you can do so, it does not make much sense to call this without having called `mail-hist-previous-header' first (\[mail-hist-previous-header]). The history only contains the contents of outgoing messages, not received mail. (defalias 'mail-hist-next-input #[(header) "\n\"A !=!\n \"\n$\n 2 \"a !?\"aL@A|` \n\"c`Blj)+" [header assoc mail-hist-header-ring-alist ring ring-length len last-command mail-hist-input-access repeat ring-minus1 mail-hist-access-count 0 ding message "No history for \"%s\"." ring-empty-p error "\"%s\" ring is empty." mail-hist-last-bounds start ring-ref this-command] 4 (#$ . 9209) (list (or (mail-hist-current-header-name) "body"))]) (provide (quote mail-hist))