;ELC ;;; compiled by cthomp@willow on Thu Aug 12 00:42:43 1993 ;;; from file /era/era-0.80/editor/lisp/packages/rnews.el ;;; emacs version 19.8 (beta8) Lucid. ;;; bytecomp version 2.15; 14-jul-93. ;;; 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 "This file was compiled for Emacs 19.")) (byte-code "!!" [provide rnews require mail-utils] 2) (autoload 'rmail-output "rmailout" "\ Append this message to Unix mail file named FILE-NAME." t) (autoload 'news-reply "rnewspost" "\ Compose and post a reply to the current article on USENET. While composing the reply, use \\[mail-yank-original] to yank the original message into it." t) (autoload 'news-mail-other-window "rnewspost" "\ Send mail in another window. While composing the message, use \\[mail-yank-original] to yank the original message into it." t) (autoload 'news-post-news "rnewspost" "\ Begin editing a new USENET news article to be posted." t) (autoload 'news-mail-reply "rnewspost" "\ Mail a reply to the author of the current article. While composing the reply, use \\[mail-yank-original] to yank the original message into it." t) (defvar news-group-hook-alist nil "\ Alist of (GROUP-REGEXP . HOOK) pairs. Just before displaying a message, each HOOK is called if its GROUP-REGEXP matches the current newsgroup name.") (byte-code "!!" [boundp rmail-last-file expand-file-name "~/mbox.news"] 2) (defvar news-startup-file "$HOME/.newsrc" "\ Contains ~/.newsrc") (defvar news-certification-file "$HOME/.news-dates" "\ Contains ~/.news-dates") (defvar news-ignored-headers "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" "\ All random fields within the header of a message.") (byte-code "!!!!!!‡" [boundp news-mode-map nil news-read-first-time-p t news-user-group-list news-current-news-group news-current-group-begin news-current-group-end] 2) (defvar news-current-certifications nil "\ An assoc list of a group name and the time at which it is known that the group had no new traffic") (defvar news-current-certifiable nil "\ The time when the directory we are now working on was written") (defvar news-message-filter nil "\ User specifiable filter function that will be called during formatting of the news file") (defvar news-list-of-files nil "\ Global variable in which we store the list of files associated with the current newsgroup") (defvar news-list-of-files-possibly-bogus nil "\ variable indicating we only are guessing at which files are available. Not currently used.") (byte-code "!‡" [boundp news-group-article-assoc nil] 2) (defvar news-current-message-number 0 "\ Displayed Article Number") (defvar news-total-current-group 0 "\ Total no of messages in group") (byte-code "!‡" [boundp news-unsubscribe-groups nil] 2) (defvar news-point-pdl nil "\ List of visited news messages.") (byte-code "!" [boundp news-no-jumps-p t] 2) (defvar news-buffer nil "\ Buffer into which news files are read.") (byte-code "MMMMMMMM" [news-push (macro . #[(item ref) " EE" [setq ref cons item] 5]) news-cadr (macro . #[(x) "\nDD" [car cdr x] 3]) news-cdar (macro . #[(x) "\nDD" [cdr car x] 3]) news-caddr (macro . #[(x) "\nDDD" [car cdr x] 4]) news-cadar (macro . #[(x) "\nDDD" [car cdr x] 4]) news-caadr (macro . #[(x) "\nDDD" [car cdr x] 4]) news-cdadr (macro . #[(x) "\nDDD" [cdr car x] 4]) news-wins (macro . #[(pfx index) "\n DFD" [file-exists-p concat pfx "/" int-to-string index] 6])] 2) (defvar news-max-plausible-gap 2 "\ * In an rnews directory, the maximum possible gap size. A gap is a sequence of missing messages between two messages that exist. An empty file does not contribute to a gap -- it ends one.") (byte-code "MMM" [news-find-first-and-last #[(prefix base) " !Q! # #B" [file-exists-p prefix "/" int-to-string base news-find-first-or-last -1 1] 5] news-/ (macro . #[(a1 a2) " \nE" [/ a1 a2] 3]) news-find-first-or-last #[(pfx base dirn) " \\!Q!\\mǥǥU \\\\!Q!\\ǥ^)\n _U \\\\!Q! ZcU\\ \\\\ #*" [dirn original-dir file-exists-p pfx "/" int-to-string base 2 offset 0 news-max-plausible-gap news-find-first-or-last] 8]] 2) (fset 'rnews #[nil " !!!    !!! )" [buffer-name last-buffer make-local-variable rmail-last-file switch-to-buffer get-buffer-create "*news*" news-buffer news-mode news-buffer-save nil buffer-read-only erase-buffer t set-buffer-modified-p sit-for 0 message "Getting new USENET news..." news-set-mode-line news-get-certifications news-get-new-news] 3 "\ Read USENET news for groups for which you are a member and add or delete groups. You can reply to articles posted and send articles to any group. Type \\[describe-mode] once reading news to get a list of rnews commands." nil]) (byte-code "MMMMM" [news-group-certification #[(group) " \n\"" [assoc group news-current-certifications] 3] news-set-current-certifiable #[nil " #P ! !8 )" [news-path string-subst-char 47 46 news-current-news-group file 5 file-attributes file-symlink-p news-current-certifiable] 5] news-get-certifications #[nil ")" [((byte-code "" [var (byte-code " !\n!\n! \"Ȏ !)*" [substitute-in-file-name news-certification-file file find-file-noselect buf file-exists-p switch-to-buffer norecord ((kill-buffer buf)) read-from-string buffer-string] 3) ((error)) news-current-certifications] 3))] 1] news-write-certifications #[nil ")" [((byte-code "\n!! !!! !)" ["*CeRtIfIcAtIoNs*" print news-current-certifications get-buffer buf switch-to-buffer write-file substitute-in-file-name news-certification-file kill-buffer] 3))] 1] news-set-current-group-certification #[nil " \n\" B\nB)" [assoc news-current-news-group news-current-certifications cgc news-current-certifiable] 4]] 2) (fset 'news-set-minor-modes #[nil " RBC! " [foo news-current-message-number "/" news-total-current-group news-get-attribute-string news-minor-modes boundp minor-mode-alist minor-modes] 5 "\ Creates a minor mode list that has group name, total articles, and attribute for current article."]) (fset 'news-set-message-counters #[nil "?" [news-list-of-files 0 news-current-message-number] 2 "\ Scan through current news-groups filelist to figure out how many messages are there. Set counters for use with minor mode display."]) (byte-code " !###########################" [news-mode-map make-keymap suppress-keymap define-key "." beginning-of-buffer " " scroll-up "" scroll-down "n" news-next-message "c" news-make-link-to-message "p" news-previous-message "j" news-goto-message "q" news-exit "e" "j" news-goto-news-group "n" news-next-group "p" news-previous-group "l" news-list-news-groups "?" describe-mode "g" news-get-new-news "f" news-reply "m" news-mail-other-window "a" news-post-news "r" news-mail-reply "o" news-save-item-in-file "" rmail-output "t" news-show-all-headers "x" news-force-update "A" news-add-news-group "u" news-unsubscribe-current-group "U" news-unsubscribe-group "" news-caesar-buffer-body] 4) (fset 'news-mode #[nil " !!!!!!!\n!! !!!" [kill-all-local-variables make-local-variable news-read-first-time-p t news-current-news-group news-current-group-begin 0 news-current-message-number news-total-current-group news-buffer-save version-control never news-point-pdl news-mode major-mode boundp minor-mode-alist ("NEWS" news-minor-modes) mode-name "NEWS" news-set-mode-line set-syntax-table text-mode-syntax-table use-local-map news-mode-map text-mode-abbrev-table local-abbrev-table run-hooks news-mode-hook] 2 "\ News Mode is used by M-x rnews for reading USENET Newsgroups articles. New readers can find additional help in newsgroup: news.announce.newusers . All normal editing commands are turned off. Instead, these commands are available: . move point to front of this news article (same as Meta-<). Space scroll to next screen of this news article. Delete scroll down previous page of this news article. n move to next news article, possibly next group. p move to previous news article, possibly previous group. j jump to news article specified by numeric position. M-j jump to news group. M-n goto next news group. M-p goto previous news group. l list all the news groups with current status. ? print this help message. C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). g get new USENET news. f post a reply article to USENET. a post an original news article. A add a newsgroup. o save the current article in the named file (append if file exists). C-o output this message to a Unix-format mail file (append it). c \"copy\" (actually link) current or prefix-arg msg to file. warning: target directory and message file must be on same device (UNIX magic) t show all the headers this news article originally had. q quit reading news after updating .newsrc file. e exit updating .newsrc file. m mail a news article. Same as C-x 4 m. x update last message seen to be the current message. r mail a reply to this news article. Like m but initializes some fields. u unsubscribe from current newsgroup. U unsubscribe from specified newsgroup." nil]) (byte-code "MM" [string-subst-char #[(new old string) " !! O \" Ip) " [nil index regexp-quote char-to-string old string 0 string-match new] 3] news-update-message-read (macro . #[(ngroup nno) " ED E" [setcar news-cdadr assoc ngroup news-group-article-assoc nno] 5])] 2) (fset 'news-parse-range #[(number-string) "\n\"\n O!\n TO!B\n!B)" [string-match "-" number-string n string-to-int 0 nil] 6 "\ Parse string representing range of numbers of he form - to a list (a . b)"]) (fset 'news-get-new-news #[nil " \"!  !‰   qb#` y``  Z{   {! \" \" B @AAED B)/!.!!@\"Ap!!*" [news-user-group-list news-update-newsrc-file nil news-group-article-assoc message "Looking up %s file..." news-startup-file substitute-in-file-name temp-user-groups file find-file-noselect tem endofline end start newsrcbuf 0 search-forward ": " t 2 news-parse-range range assoc "You are subscribed twice to %s; I ignore second" kill-buffer "Prefrobnicating..." switch-to-buffer news-buffer news-read-files-into-buffer "No news is good news." ""] 6 "\ Get new USENET news, if there is any for the current user." nil]) (fset 'news-list-news-groups #[nil " qcc @ \"\n@c˪j\nA@A@!ccjA?)B+" ["*Newsgroups*" standard-output "News Group Msg No. News Group Msg No.\n" "------------------------- -------------------------\n" news-user-group-list nil flag temp assoc news-group-article-assoc item 52 20 int-to-string "\n" 33] 5 "\ Display all the news groups to which you belong." nil]) (fset 'news-set-mode-line #[nil " ! ! RʉGZ]OQ !!" [" " news-current-message-number int-to-string "??" "/" news-current-group-end mode-line-process "NEWS: " news-current-news-group " " 0 17 mode-line-buffer-identification set-buffer-modified-p t sit-for] 7 "\ Set mode line string to something useful."]) (fset 'news-goto-news-group #[(gp) "\n\"\n!\n\"" [message "Jumping to news group %s..." gp news-select-news-group "Jumping to news group %s... done."] 3 "\ Takes a string and goes to that news group." (byte-code "\n\"C" [completing-read "NewsGroup: " news-group-article-assoc] 3)]) (fset 'news-select-news-group #[(gp) " \n\" \"\n\"A@A@A @\" )" [assoc gp news-group-article-assoc grp error "Group %s not subscribed to" news-current-news-group news-point-pdl news-read-files-into-buffer nil news-set-mode-line] 4]) (fset 'news-goto-message #[(arg) "\" !" [current-prefix-arg read-no-blanks-input "Go to article: " "" arg news-select-message] 3 "\ Goes to the article ARG in current newsgroup." "p"]) (fset 'news-select-message #[(arg) ";!\n#R!  @A >A@U @! )\")" [arg string-to-int news-path string-subst-char 47 46 news-current-news-group "/" file file-exists-p nil buffer-read-only news-point-pdl news-list-of-files 0 news-current-message-number news-read-in-file news-set-mode-line error "Article %d nonexistent"] 5]) (fset 'news-force-update #[nil "@ \"" [news-point-pdl news-current-message-number message "Updated to %d"] 3 "\ updates the position of last article read in the current news group" nil]) (fset 'news-next-message #[(arg) " \\ W\n VU U !  \"W[SA@8!S@8!))" [arg news-current-message-number no news-current-group-begin news-current-group-end 1 news-set-current-group-certification news-next-group -1 news-previous-group error "Article out of range" news-get-motion-lists news-list-of-files plist 0 news-select-message] 4 "\ Move ARG messages forward within one newsgroup. Negative ARG moves backward. If ARG is 1 or -1, moves to next or previous newsgroup if at end." "p"]) (fset 'news-previous-message #[(arg) " [!" [news-next-message arg] 2 "\ Move ARG messages backward in current newsgroup. With no arg or arg of 1, move one message and move to previous newsgroup if at beginning. A negative ARG means move forward." "p"]) (fset 'news-move-to-group #[(arg) " \"W[SA@8!@8! !+" [news-current-news-group cg news-get-motion-lists news-user-group-list nil ngrp plist arg 0 error "No previous news groups" "No more news groups" news-select-news-group] 3 "\ Given arg move forward or backward to a new newsgroup."]) (fset 'news-next-group #[nil "!\n?!v" [news-move-to-group 0 news-list-of-files] 2 "\ Moves to the next user group." nil]) (fset 'news-previous-group #[nil "!\n?!v" [news-move-to-group -1 news-list-of-files] 2 "\ Moves to the previous user group." nil]) (fset 'news-get-motion-lists #[(arg listy) "ō*" [listy nil result temp out (byte-code "@ A CB\"l@C AcŇ" [temp arg throw out result nil] 5)] 2 "\ Given a msgnumber/group this will return a list of two lists; one for moving forward and one for moving backward."]) (byte-code "MM" [news-read-in-file #[(filename) " ` !  b@@\"@A Ae) bym! b)" [erase-buffer start insert-file-contents filename news-convert-format news-group-hook-alist hooks string-match news-group-name 1 message "(Empty file?)"] 4] news-convert-format #[nil "`Ï  }b#b!y !b." [start nil (byte-code "!`" [search-forward "\n\n"] 2) ((error)) end has-from has-date search-forward "\nFrom:" t "\nDate:" 0 kill-line news-delete-headers] 5]] 2) (fset 'news-show-all-headers #[nil " \n# !R!*" [nil buffer-read-only news-ignored-headers erase-buffer news-set-mode-line news-read-in-file news-path string-subst-char 47 46 news-current-news-group "/" int-to-string news-current-message-number] 6 "\ Redisplay current news item with all original headers" nil]) (fset 'news-delete-headers #[(pos) "b ; #y`!u`|i" [pos news-ignored-headers re-search-forward nil t 0 "\n[^ ]" -1] 4]) (fset 'news-exit #[nil "! \" \"!!p! !͉!" [y-or-n-p "Do you really wanna quit reading news ? " message "Updating %s..." news-startup-file news-update-newsrc-file news-write-certifications "Updating %s... done" "Now do some real work" fboundp bury-buffer switch-to-buffer news-buffer-save nil news-user-group-list ""] 3 "\ Quit news reading session and update the .newsrc file." nil]) (fset 'news-update-newsrc-file #[nil "\n!! \n\"A@A @Aq@\n\"A@A@ A@AA@Ub @P#! @ѱ! A@@! A@A@!A4@\n\"b @P#!! A@@! A@A@!AI p!," [find-file-noselect substitute-in-file-name news-startup-file news-user-group-list nil group tem newsrcbuf news-current-news-group assoc news-group-article-assoc news-point-pdl 0 search-forward ": " t kill-line ": \n" backward-char 1 int-to-string "-" news-unsubscribe-groups 2 "! " save-buffer kill-buffer] 6 "\ Updates the .newsrc file in the users home dir."]) (fset 'news-unsubscribe-group #[(group) " !" [news-unsubscribe-internal group] 2 "\ Removes you from newgroup GROUP." (byte-code "\n\"C" [completing-read "Unsubscribe from group: " news-group-article-assoc] 3)]) (fset 'news-unsubscribe-current-group #[nil "! !" [y-or-n-p "Do you really want to unsubscribe from this group ? " news-unsubscribe-internal news-current-news-group] 2 "\ Removes you from the newsgroup you are now reading." nil]) (fset 'news-unsubscribe-internal #[(group) " \n\" B \n\"A@A @A  ! \")" [assoc group news-group-article-assoc tem news-unsubscribe-groups news-point-pdl news-current-news-group news-next-group message "" error "Not subscribed to group: %s"] 4]) (fset 'news-save-item-in-file #[(file) "ed #" [append-to-file file] 4 "\ Save the current article that is being read by appending to a file." "FSave item in file: "]) (fset 'news-get-pruned-list-of-files #[(gp-list end-file-no) " !Ɖ? #P   !Q! #V BSo  !? !??ُ  @\"  @Q! @!X @ \" A U Ī \" \"GS +\" )" [end-file-no news-set-current-certifiable news-group-certification gp-list nil news-list-of-files t news-list-of-files-possibly-bogus news-path string-subst-char 47 46 file-directory tem file-exists-p "/" int-to-string news-find-first-or-last 1 last-winner news-current-group-end file-directory-p file-readable-p error (directory-files file-directory) ((file-error (byte-code " 8˜ \" A\"ȇ" [2 error "permission denied" message "Newsgroup %s is read-protected" gp-list signal file-error nil] 3))) string-match "^[0-9]*$" string-to-int delq 0 mapcar sort < answer news-set-current-group-certification] 6 "\ Given a news group it finds all files in the news group. The arg must be in slashified format. Using ls was found to be too slow in a previous version."]) (fset 'news-read-files-into-buffer #[(group reversep) " \n\"A@@ A@  \n \" @ A@BC  \n   ƪ@\n @ V @@  # !R! ," [assoc group news-group-article-assoc files-start-end start-file-no end-file-no nil buffer-read-only news-current-news-group news-current-message-number news-current-group-end news-set-mode-line news-get-pruned-list-of-files news-point-pdl news-list-of-files erase-buffer news-current-group-begin reversep news-set-message-counters news-read-in-file news-path string-subst-char 47 46 "/" int-to-string t] 7]) (fset 'news-add-news-group #[(gp) " #P \"\n!! ! !b P# \"!!c \" ܱ #щ !#` y`!`! Z{ {!$$@$A$AEDB- p! \") \"*" [news-path string-subst-char 47 46 gp file-dir assoc news-group-article-assoc find-file-noselect substitute-in-file-name news-startup-file newsrcbuf file-directory-p switch-to-buffer 0 search-forward "! " nil t message "Re-subscribing to group %s." backward-char 2 delete-char 1 ":" "Added %s to your list of newsgroups." end-of-buffer ": 1-1\n" search-backward tem endofline end start ": " news-parse-range range save-buffer kill-buffer "Newsgroup %s doesn't exist." "Already subscribed to group %s."] 5 "\ Resubscribe to or add a USENET news group named GROUP (a string)." "sAdd news group: "]) (fset 'news-make-link-to-message #[(number newname) " #! R\n\"" [add-name-to-file news-path string-subst-char 47 46 news-current-news-group "/" number prefix-numeric-value news-current-message-number newname] 6 "\ Forges a link to an rnews message numbered number (current if no arg) Good for hanging on to a message that might or might not be automatically deleted." "P\nFName to link to message: "]) (fset 'caesar-region #[(&optional n) "W[æZæU?! H\\U \n !\" W  I T n\nP\n  W  \\\n \\HI  \\  \\HI T X!+ ȉ {G W  HHI T fb\"c-" [n 13 0 26 boundp caesar-translate-table 97 "abcdefghijklmnopqrstuvwxyz" nil upper lower i message "Building caesar-translate-table..." make-vector 256 65 "Building caesar-translate-table... done" region-beginning region-end len str to from kill-region] 6 "\ Caesar rotation of region by N, default 13, for decrypting netnews." (byte-code "!CC" [current-prefix-arg prefix-numeric-value nil] 2)]) (fset 'news-caesar-buffer-body #[(&optional rotnum) "ebǚȪ Q#`e!db ! *" [buffer-read-only buffer-status nil set-mark search-forward "\n" major-mode news-mode "" mail-header-separator t caesar-region rotnum] 5 "\ Caesar rotates all letters in the current buffer by 13 places. Used to encode/decode possibly offensive messages (commonly in net.jokes). With prefix arg, specifies the number of places to rotate each letter forward. Mail and USENET news headers are not rotated." (byte-code "!CC" [current-prefix-arg prefix-numeric-value nil] 2)])