;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:49:52 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/rnews.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/rnews.el' was compiled for Emacs 19")) (require (quote mail-utils)) #@56 Append this message to Unix mail file named FILE-NAME. (autoload (quote rmail-output) "rmailout" '(#$ . 508) t) #@151 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. (autoload (quote news-reply) "rnewspost" '(#$ . 627) t) #@123 Send mail in another window. While composing the message, use \[mail-yank-original] to yank the original message into it. (autoload (quote news-mail-other-window) "rnewspost" '(#$ . 840) t) #@55 Begin editing a new USENET news article to be posted. (autoload (quote news-post-news) "rnewspost" '(#$ . 1036) t) #@143 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. (autoload (quote news-mail-reply) "rnewspost" '(#$ . 1158) t) #@149 Alist of (GROUP-REGEXP . HOOK) pairs. Just before displaying a message, each HOOK is called if its GROUP-REGEXP matches the current newsgroup name. (defvar news-group-hook-alist nil (#$ . 1369)) (byte-code "!\n!\fB" [boundp rmail-last-file expand-file-name "~/mbox.news" current-load-list] 2) #@20 Contains ~/.newsrc (defvar news-startup-file "$HOME/.newsrc" (#$ . 1679)) #@24 Contains ~/.news-dates (defvar news-certification-file "$HOME/.news-dates" (#$ . 1759)) #@51 All random fields within the header of a message. (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:" (#$ . 1853)) (byte-code "! B! B!! B!. B!; B!H B‡" [boundp news-mode-map nil current-load-list news-read-first-time-p t news-user-group-list news-current-news-group news-current-group-begin news-current-group-end] 2) #@99 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-certifications nil (#$ . 2421)) #@63 The time when the directory we are now working on was written (defvar news-current-certifiable nil (#$ . 2578)) #@89 User specifiable filter function that will be called during formatting of the news file (defvar news-message-filter nil (#$ . 2696)) #@91 Global variable in which we store the list of files associated with the current newsgroup (defvar news-list-of-files nil (#$ . 2835)) #@92 variable indicating we only are guessing at which files are available. Not currently used. (defvar news-list-of-files-possibly-bogus nil (#$ . 2975)) (byte-code "! B‡" [boundp news-group-article-assoc nil current-load-list] 2) #@26 Displayed Article Number (defvar news-current-message-number 0 (#$ . 3218)) #@31 Total no of messages in group (defvar news-total-current-group 0 (#$ . 3300)) (byte-code "! B‡" [boundp news-unsubscribe-groups nil current-load-list] 2) #@32 List of visited news messages. (defvar news-point-pdl nil (#$ . 3470)) (byte-code "! B" [boundp news-no-jumps-p t current-load-list] 2) #@40 Buffer into which news files are read. (defvar news-buffer nil (#$ . 3623)) (defalias 'news-push '(macro . #[(item ref) " EE" [setq ref cons item] 5])) (defalias 'news-cadr '(macro . #[(x) "\nDD" [car cdr x] 3])) (defalias 'news-cdar '(macro . #[(x) "\nDD" [cdr car x] 3])) (defalias 'news-caddr '(macro . #[(x) "\nDDD" [car cdr x] 4])) (defalias 'news-cadar '(macro . #[(x) "\nDDD" [car cdr x] 4])) (defalias 'news-caadr '(macro . #[(x) "\nDDD" [car cdr x] 4])) (defalias 'news-cdadr '(macro . #[(x) "\nDDD" [cdr car x] 4])) (defalias 'news-wins '(macro . #[(pfx index) "\n DFD" [file-exists-p concat pfx "/" int-to-string index] 6])) #@189 * 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. (defvar news-max-plausible-gap 2 (#$ . -4298)) (defalias 'news-find-first-and-last #[(prefix base) " \f!Q! \f# \f#B" [file-exists-p prefix "/" int-to-string base news-find-first-or-last -1 1] 5]) (defalias 'news-/ '(macro . #[(a1 a2) "U \f E\fBB\fD ED\f EF" [-1 2 0 / a1 a2 if < (0) -] 6])) (defalias 'news-find-first-or-last #[(pfx base dirn) " \\!Q!\\ǥǥUF \\\\!Q!<\\ǥ!)\n _Un \\\\!Q!n ZNU|\\ \\\\ #*" [dirn original-dir file-exists-p pfx "/" int-to-string base 2 offset 0 news-max-plausible-gap news-find-first-or-last] 8]) #@221 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. (defalias '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 (#$ . 5138) nil]) (defalias 'news-group-certification #[(group) " \n\"" [assoc group news-current-certifications] 3]) (defalias 'news-set-current-certifiable #[nil "\f#P ! !8 )" [news-path string-subst-char 47 46 news-current-news-group file 5 file-attributes file-symlink-p news-current-certifiable] 5]) (defalias 'news-get-certifications #[nil ")" [((byte-code "" [var (byte-code " !\n!\n!\f\"Ȏ !)*" [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]) (defalias 'news-write-certifications #[nil ")" [((byte-code "\n!!\f!!!\f!)" ["*CeRtIfIcAtIoNs*" print news-current-certifications get-buffer buf switch-to-buffer write-file substitute-in-file-name news-certification-file kill-buffer] 3))] 1]) (defalias 'news-set-current-group-certification #[nil " \n\" \f \fB\nB)" [assoc news-current-news-group news-current-certifications cgc news-current-certifiable] 4]) #@99 Creates a minor mode list that has group name, total articles, and attribute for current article. (defalias '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 (#$ . 6865)]) #@132 Scan through current news-groups filelist to figure out how many messages are there. Set counters for use with minor mode display. (defalias 'news-set-message-counters #[nil "?" [news-list-of-files 0 news-current-message-number] 2 (#$ . 7190)]) (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) #@1641 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. (defalias '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 (news-minor-modes) mode-line-process "NEWS" mode-name 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 (#$ . 8296) nil]) (defalias 'string-subst-char #[(new old string) "\f!! O\f \" I ) " [nil index regexp-quote char-to-string old string 0 string-match new] 3]) (defalias 'news-update-message-read '(macro . #[(ngroup nno) " ED E" [setcar news-cdadr assoc ngroup news-group-article-assoc nno] 5])) #@81 Parse string representing range of numbers of he form - to a list (a . b) (defalias 'news-parse-range #[(number-string) "\n\"\n O!\n TO!B!\n!B)" [string-match "-" number-string n string-to-int 0 nil] 6 (#$ . 10830)]) #@60 Get new USENET news, if there is any for the current user. (defalias 'news-get-new-news #[nil " \"!  !‰ \f qb#` y``\f Z{  \f{! \"m \" B @AAED B)3!.!!@\"A!!*" [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 (#$ . 11077) nil]) #@50 Display all the news groups to which you belong. (defalias 'news-list-news-groups #[nil " qcc\fV@ \"\n@c-˂.j\nA@A@!cEcHjA?)+" ["*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 (#$ . 11854) nil]) #@43 Set mode line string to something useful. (defalias 'news-set-mode-line #[nil " \f !  ! RʉGZ]OQ\f!!" [" " 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 (#$ . 12321)]) #@45 Takes a string and goes to that news group. (defalias '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 (#$ . 12700) (list (completing-read "NewsGroup: " news-group-article-assoc))]) (defalias '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]) #@47 Goes to the article ARG in current newsgroup. (defalias 'news-goto-message #[(arg) " \"\f!" [current-prefix-arg read-no-blanks-input "Go to article: " "" arg news-select-message] 3 (#$ . 13253) "p"]) (defalias 'news-select-message #[(arg) "; !\n#R @A\n>A@#U- @\f!E! )L \")" [arg string-to-int news-path string-subst-char 47 46 news-current-news-group "/" file news-point-pdl news-list-of-files 0 news-current-message-number file-exists-p nil buffer-read-only news-read-in-file news-set-mode-line error "Article %d nonexistent"] 5]) #@69 updates the position of last article read in the current news group (defalias 'news-force-update #[nil "@ \"" [news-point-pdl news-current-message-number message "Updated to %d"] 3 (#$ . 13850) nil]) #@144 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. (defalias 'news-next-message #[(arg) " \\ W\n\fV/U RU) R!R  \"WI[SA@8!QS@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 (#$ . 14064) "p"]) #@175 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. (defalias 'news-previous-message #[(arg) " [!" [news-next-message arg] 2 (#$ . 14624) "p"]) #@56 Given arg move forward or backward to a new newsgroup. (defalias 'news-move-to-group #[(arg) " \"W&[SA@85!5@85! !+" [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 (#$ . 14898)]) #@31 Moves to the next user group. (defalias 'news-next-group #[nil "!\n?!" [news-move-to-group 0 news-list-of-files] 2 (#$ . 15246) nil]) #@35 Moves to the previous user group. (defalias 'news-previous-group #[nil "!\n?!" [news-move-to-group -1 news-list-of-files] 2 (#$ . 15399) nil]) #@115 Given a msgnumber/group this will return a list of two lists; one for moving forward and one for moving backward. (defalias 'news-get-motion-lists #[(arg listy) "ō*" [listy nil result temp out (byte-code "%@ A\fCB\"@C\fAŇ" [temp arg throw out result nil] 5)] 2 (#$ . 15562)]) (defalias 'news-read-in-file #[(filename) " ` ! 0 b@@\"'@A A) bymA!C 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]) (defalias 'news-convert-format #[nil "`Ï\f>\f}b#88b!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]) #@55 Redisplay current news item with all original headers (defalias '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 (#$ . 16420) nil]) (defalias 'news-delete-headers #[(pos) "b ;! #!y`!u`|" [pos news-ignored-headers re-search-forward nil t 0 "\n[^ ]" -1] 4]) #@56 Quit news reading session and update the .newsrc file. (defalias 'news-exit #[nil "!.\f\" \f\"!!$p!\f!͉!" [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 (#$ . 16916) nil]) #@49 Updates the .newsrc file in the users home dir. (defalias 'news-update-newsrc-file #[nil "\n!! !\n\"A@A @Aqz@\n\"A@A@ A@AA@Uqb @P#V!` @ѱ! A@@! A@A@!A*@\n\"b @P#!! A@@! A@A@!A 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 (#$ . 17358)]) #@34 Removes you from newgroup GROUP. (defalias 'news-unsubscribe-group #[(group) " !" [news-unsubscribe-internal group] 2 (#$ . 17980) (list (completing-read "Unsubscribe from group: " news-group-article-assoc))]) #@53 Removes you from the newsgroup you are now reading. (defalias '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 (#$ . 18198) nil]) (defalias 'news-unsubscribe-internal #[(group) " \n\") \fB \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]) #@69 Save the current article that is being read by appending to a file. (defalias 'news-save-item-in-file #[(file) "ed #" [append-to-file file] 4 (#$ . 18730) "FSave item in file: "]) #@153 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. (defalias 'news-get-pruned-list-of-files #[(gp-list end-file-no) " !Ɖ? #P\f :\f!Q!:\f#fVb BSO \f!?s\f!??ُ  @\"\f @Q! @!X @ \" A Ă \" \"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 (#$ . 18919)]) (defalias 'news-read-files-into-buffer #[(group reversep) " \n\"A@@ A@  \n \" @ A@BC F \n   Ƃ@W\n k@ Vg @@  # !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]) #@67 Resubscribe to or add a USENET news group named GROUP (a string). (defalias 'news-add-news-group #[(gp) "\f#P\f\"\n!! ! !b\fP#D\f\"!!cQ\f\" \fܱ\f#щ !#` y`!`! Z{ {!$$@$A$AEDB- p!\f\")\f\"*" [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 (#$ . 20622) "sAdd news group: "]) #@154 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. (defalias '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 (#$ . 21471) "P\nFName to link to message: "]) #@69 Caesar rotation of region by N, default 13, for decrypting netnews. (defalias 'caesar-region #[(&optional n) "\n\"U?!'H\\U\n \f!\"\fWQ\fI\fT\f< P \n\fW\f\\ \f\\HI\f\\\n\f\\HI\fT\f_!+ ɉ\f{G\fW\f\fHHI\fT\fb\"c-" [n 13 mod 26 0 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 (#$ . 21912) (byte-code " !CC" [current-prefix-arg prefix-numeric-value nil] 2)]) #@264 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. (defalias 'news-caesar-buffer-body #[(&optional rotnum) "ebǚȂ Q#$`%e!db\f! *" [buffer-read-only buffer-status nil set-mark search-forward "\n" major-mode news-mode "" mail-header-separator t caesar-region rotnum] 5 (#$ . 22629) (byte-code " !CC" [current-prefix-arg prefix-numeric-value nil] 2)]) (provide (quote rnews))