+Fri Oct 13 05:58:15 1995 Lars Magne Ingebrigtsen <larsi@narfi.ifi.uio.no>
+
+ * gnus.el (gnus-parse-format): Would totally bug out.
+
+Fri Oct 13 01:38:43 1995 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.el (gnus-summary-toggle-header): Run
+ `gnus-article-display-hook' after unhiding headers.
+
+ * gnus-vis.el (gnus-summary-highlight-line): Would sometimes boug
+ out on nil marks.
+
+ * gnus-msg.el (gnus-new-news): Have `C-c C-d' work in new
+ *post-news* buffers.
+ (gnus-post-prepare-function): Not used.
+ (gnus-post-prepare-hook): Ditto.
+
+ * gnus-soup.el (gnus-soup-write-replies): Create dir if it doesn't
+ exist.
+
+ * gnus-msg.el (gnus-prepare-article-hook): Don't insert
+ signature.
+
+ * gnus-score.el (gnus-score-adaptive): Would bug out an pseudos.
+
+ * nnfolder.el (nnfolder-request-create-group): Would create bogus
+ active entries.
+
+Thu Oct 12 09:47:37 1995 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.el (gnus-summary-pipe-output): Raise the *Shell* window.
+ (gnus-group-sort-groups): Would peel off the first group.
+
+ * gnus-msg.el (gnus-mail-forward): Would create two headers.
+
+ * nndoc.el (nndoc-type-to-regexp): Allow reading of forwarded
+ article.
+
+ * gnus-msg.el (gnus-mail-setup): Changed params.
+
Thu Oct 12 03:20:42 1995 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+ * gnus.el: 0.7 is released.
+
* gnus-xmas.el (gnus-xmas-setup-group-toolbar): Would bug out when
there was no etc dir.
;;; Commentary:
-;; Is this really the only way to set the load path? Seems awfully
-;; kludgy to load this file just to do something as simple as
-;; that... Anyways, it won't be in the production code, so who cares?
-
;;; Code:
(setq load-path (cons "." load-path))
(byte-compile-file file)))))
(defun dgnushack-recompile ()
+ (require 'gnus)
(byte-recompile-directory "." 0))
;;; dgnushack.el ends here
-;; gnus-cus.el --- User friendly customization of Gnus
+;;; gnus-cus.el --- User friendly customization of Gnus
;; Copyright (C) 1995 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@iesd.auc.dk>
(list (nth 0 entry)
(or (nth 1 entry) gnus-score-interactive-default-score)
(nth 2 entry)
- (if (null (nth 3 entry))
- 's
- (intern (substring (symbol-name (nth 3 entry)) 0 1)))))
+ (cond ((null (nth 3 entry))
+ 's)
+ ((memq (nth 3 entry) '(before after at >= <=))
+ (nth 3 entry))
+ (t
+ (intern (substring (symbol-name (nth 3 entry)) 0 1))))))
(defvar gnus-score-cache nil)
(require 'gnus)
(require 'sendmail)
(require 'gnus-ems)
-(require 'rmail)
(defvar gnus-organization-file "/usr/lib/news/organization"
"*Local news organization file.")
-(defvar gnus-prepare-article-hook (list 'gnus-inews-insert-signature)
- "*A hook called after preparing body, but before preparing header headers.
-The default hook (`gnus-inews-insert-signature') inserts a signature
-file specified by the variable `gnus-signature-file'.")
+(defvar gnus-prepare-article-hook nil
+ "*A hook called after preparing body, but before preparing header headers.")
(defvar gnus-post-prepare-function nil
"*Function that is run after a post buffer has been prepared.
(defvar gnus-delete-supersedes-headers
"^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Supersedes:"
"*Header lines matching this regexp will be deleted before posting.
-It's best to delete old Path and Date headers before psoting to avoid
+It's best to delete old Path and Date headers before posting to avoid
any confusion.")
(defvar gnus-auto-mail-to-author nil
(eval-and-compile
(autoload 'gnus-uu-post-news "gnus-uu" nil t)
(autoload 'news-setup "rnewspost")
- (autoload 'news-reply-mode "rnewspost"))
+ (autoload 'news-reply-mode "rnewspost")
+ (autoload 'rmail-output "rmailout"))
\f
;;;
(defun gnus-new-mail (&optional to)
(pop-to-buffer gnus-mail-buffer)
(erase-buffer)
- (gnus-mail-setup to nil nil nil nil nil)
+ (gnus-mail-setup 'new to)
(gnus-inews-modify-mail-mode-map))
(defun gnus-mail-reply (&optional yank to-address followup)
(setq follow-to (delq elt follow-to))))
(gnus-mail-setup
+ (if followup 'followup 'reply)
(or to-address
(if (and follow-to (not (stringp follow-to))) sendto
(or follow-to reply-to from sender "")))
subject nil
(if (zerop (length new-cc)) nil new-cc)
- gnus-article-copy nil)
+ gnus-article-copy)
(make-local-variable 'gnus-article-reply)
(setq gnus-article-reply cur)
(news-reply-mode)
(news-setup nil subject nil group nil)
(gnus-inews-insert-signature)
+ (and gnus-post-prepare-function
+ (symbolp gnus-post-prepare-function)
+ (fboundp gnus-post-prepare-function)
+ (funcall gnus-post-prepare-function group))
+ (run-hooks 'gnus-post-prepare-hook)
(make-local-variable 'gnus-prev-winconf)
(setq gnus-prev-winconf winconf)
+ (gnus-inews-modify-mail-mode-map)
(local-set-key "\C-c\C-c" 'gnus-inews-news)))
(defun gnus-news-followup (&optional yank group)
(gnus-inews-insert-signature)
+ (and gnus-post-prepare-function
+ (symbolp gnus-post-prepare-function)
+ (fboundp gnus-post-prepare-function)
+ (funcall gnus-post-prepare-function group))
+ (run-hooks 'gnus-post-prepare-hook)
+
(auto-save-mode auto-save-default)
(gnus-inews-modify-mail-mode-map)
(local-set-key "\C-c\C-c" 'gnus-inews-news)
(defun gnus-mail-forward (&optional buffer)
"Forward the current message to another user using mail."
- ;; This is almost a carbon copy of rmail-forward in rmail.el.
(let* ((forward-buffer (or buffer (current-buffer)))
(winconf (current-window-configuration))
(subject (gnus-forward-make-subject forward-buffer)))
- (set-buffer forward-buffer)
- (gnus-mail-setup nil subject nil nil nil nil 'forward)
- (mail nil nil subject)
- (gnus-inews-modify-mail-mode-map)
- (make-local-variable 'gnus-prev-winconf)
- (setq gnus-prev-winconf winconf)
- (gnus-forward-insert-buffer forward-buffer)
- (goto-char (point-min))
- (re-search-forward "^To: " nil t)
- (gnus-configure-windows 'mail-forward 'force)
- ;; You have a chance to arrange the message.
- (run-hooks 'gnus-mail-forward-hook)
- (run-hooks 'gnus-mail-hook)))
+ (set-buffer (get-buffer-create gnus-mail-buffer))
+ (mail-mode)
+ (if (and (buffer-modified-p)
+ (> (buffer-size) 0)
+ (not (gnus-y-or-n-p
+ "Unsent message being composed; erase it? ")))
+ ()
+ (erase-buffer)
+ (gnus-mail-setup 'forward nil subject)
+ (gnus-inews-modify-mail-mode-map)
+ (make-local-variable 'gnus-prev-winconf)
+ (setq gnus-prev-winconf winconf)
+ (gnus-forward-insert-buffer forward-buffer)
+ (goto-char (point-min))
+ (re-search-forward "^To: " nil t)
+ (gnus-configure-windows 'mail-forward 'force)
+ ;; You have a chance to arrange the message.
+ (run-hooks 'gnus-mail-forward-hook)
+ (run-hooks 'gnus-mail-hook))))
(defun gnus-forward-using-post (&optional buffer)
(save-excursion
(pop-to-buffer "*Gnus Bug*")
(erase-buffer)
(mail-mode)
- (mail-setup gnus-maintainer nil nil nil nil nil)
+ (mail-setup 'new gnus-maintainer)
(auto-save-mode auto-save-default)
(make-local-variable 'gnus-prev-winconf)
(setq gnus-prev-winconf winconf)
(local-set-key "\C-c\C-p" 'gnus-put-message)
(local-set-key "\C-c\C-d" 'gnus-enter-into-draft-group))
-(defun gnus-mail-setup (to subject in-reply-to cc replybuffer actions
- &optional type)
+(defun gnus-mail-setup (type &optional to subject in-reply-to cc
+ replybuffer actions)
(funcall
(cond
((or
(let (scores)
;; PLM: probably this is not the best place to clear orphan-score
(setq gnus-orphan-score nil)
+ (setq gnus-scores-articles nil)
;; Load the score files.
(while score-files
(if (stringp (car score-files))
(if (or (not elem)
(get-text-property (point) 'gnus-pseudo))
()
- (setq headers (gnus-summary-article-header))
- (while (and elem headers)
- (setq match (funcall (car (car elem)) headers))
- (gnus-summary-score-entry
- (nth 1 (car elem)) match
- (cond
- ((numberp match)
- '=)
- ((equal (nth 1 (car elem)) "date")
- 'a)
- (t
- ;; Whether we use substring or exact matches are controlled
- ;; here.
- (if (or (not gnus-score-exact-adapt-limit)
- (< (length match) gnus-score-exact-adapt-limit))
- 'e
- (if (equal (nth 1 (car elem)) "subject")
- 'f 's))))
- (nth 2 (car elem)) date nil t)
- (setq elem (cdr elem))))
+ (when (and (setq headers (gnus-summary-article-header))
+ (vectorp headers))
+ (while elem
+ (setq match (funcall (car (car elem)) headers))
+ (gnus-summary-score-entry
+ (nth 1 (car elem)) match
+ (cond
+ ((numberp match)
+ '=)
+ ((equal (nth 1 (car elem)) "date")
+ 'a)
+ (t
+ ;; Whether we use substring or exact matches are controlled
+ ;; here.
+ (if (or (not gnus-score-exact-adapt-limit)
+ (< (length match) gnus-score-exact-adapt-limit))
+ 'e
+ (if (equal (nth 1 (car elem)) "subject")
+ 'f 's))))
+ (nth 2 (car elem)) date nil t)
+ (setq elem (cdr elem)))))
(forward-line 1)))))
(defun gnus-score-remove-lines-adaptive (marks)
(string-to-int (gnus-soup-unique-prefix dir))
files)))
(dir (expand-file-name dir)))
+ (or (file-directory-p dir)
+ (gnus-make-directory dir))
(setq gnus-soup-areas nil)
(message "Packing %s..." packer)
(if (zerop (call-process "sh" nil nil nil "-c"
(kill-buffer (current-buffer)))))
(defun gnus-soup-write-replies (dir areas)
+ (or (file-directory-p dir)
+ (gnus-make-directory dir))
(save-excursion
(set-buffer (find-file-noselect (concat dir "REPLIES")))
(erase-buffer)
gnus-newsgroup-scored))
gnus-summary-default-score 0))
(default gnus-summary-default-score)
- (mark (gnus-summary-article-mark))
+ (mark (or (gnus-summary-article-mark) gnus-unread-mark))
(inhibit-read-only t))
(while (and list (not (eval (car (car list)))))
(setq list (cdr list)))
(let ((default-name
(funcall gnus-mail-save-name gnus-newsgroup-name
gnus-current-headers gnus-newsgroup-last-mail)))
- (setq filename
- (cond ((eq filename 'default)
+ (setq folder
+ (cond ((eq folder 'default)
default-name)
- (filename filename)
+ (folder folder)
(t (read-file-name
(concat "Save article in VM folder: (default "
(file-name-nondirectory default-name) ") ")
-;;; gnus-xmal.el --- Gnus functions for XEmacs
+;;; gnus-xmas.el --- Gnus functions for XEmacs
;; Copyright (C) 1995 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
(defvar standard-display-table)
(defun gnus-xmas-install-mouse-tracker ()
- (add-hook 'mode-motion-hook 'mode-motion-highlight-line))
+ (or (featurep 'mode-motion+)
+ (add-hook 'mode-motion-hook 'mode-motion-highlight-line)))
(defun gnus-xmas-set-text-properties (start end props &optional buffer)
"You should NEVER use this function. It is ideologically blasphemous.
This is a meta-variable that will affect what default values other
variables get. You would normally not change this variable, but
-pounce directly on the real variables themselves."))
+pounce directly on the real variables themselves.")
+ )
(or (fboundp 'appt-select-lowest-window)
(fset 'appt-select-lowest-window
- 'gnus-xnas-appt-select-lowest-window))
+ 'gnus-xmas-appt-select-lowest-window))
- (add-hook 'gnus-group-menu-hook 'gnus-xmas-group-menu-add)
- (add-hook 'gnus-summary-menu-hook 'gnus-xmas-summary-menu-add)
- (add-hook 'gnus-article-menu-hook 'gnus-xmas-article-menu-add)
+ (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add)
+ (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
+ (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add)
(add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar)
- (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
-
- )
+ (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar))
;;; XEmacs logo and toolbar.
[gnus-group-kill-group-icon gnus-group-kill-group t "Kill group"]
[gnus-group-get-new-news-icon gnus-group-get-new-news t "Get new news"]
[gnus-group-get-new-news-this-group-icon
- gnus-group-get-new-news-this-group t "Get new new in this group"]
+ gnus-group-get-new-news-this-group t "Get new news in this group"]
[gnus-group-catchup-current-icon
gnus-group-catchup-current t "Catchup group"]
[gnus-group-describe-group-icon
(defun gnus-xmas-setup-toolbar (bar &optional force)
(let ((dir (file-name-as-directory (gnus-xmas-find-glyph-directory)))
icon up down disabled name)
- (if (or (not dir)
- (and (not force)
- (boundp (aref (car bar) 0))))
+ (if (not dir)
()
- (while bar
- (setq icon (aref (car bar) 0)
- name (symbol-name icon)
- bar (cdr bar))
- (setq up (concat dir name "-up.xpm"))
- (setq down (concat dir name "-down.xpm"))
- (setq disabled (concat dir name "-disabled.xpm"))
- (if (not (file-exists-p up))
- (set icon nil)
- (set icon (toolbar-make-button-list
- up (and (file-exists-p down) down)
- (and (file-exists-p disabled) disabled))))
+ (if (and (not force)
+ (boundp (aref (car bar) 0)))
+ dir
+ (while bar
+ (setq icon (aref (car bar) 0)
+ name (symbol-name icon)
+ bar (cdr bar))
+ (setq up (concat dir name "-up.xpm"))
+ (setq down (concat dir name "-down.xpm"))
+ (setq disabled (concat dir name "-disabled.xpm"))
+ (if (not (file-exists-p up))
+ (set icon nil)
+ (set icon (toolbar-make-button-list
+ up (and (file-exists-p down) down)
+ (and (file-exists-p disabled) disabled)))))
dir))))
(defun gnus-xmas-setup-group-toolbar ()
(mail-bounce ([article 0.5]
[mail 1.0 point]))
(draft ([draft 1.0 point]))
+ (pipe ([summary 0.25 point]
+ (if gnus-carpal [summary-carpal 4])
+ ["*Shell Command Output*" 1.0]))
(followup ([article 0.5]
[post 1.0 point]))
(followup-yank ([post 1.0 point])))
"gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "September Gnus v0.7"
+(defconst gnus-version "September Gnus v0.8"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(substring format (match-beginning 3) (match-end 3)))
spec-alist))
(gnus-parse-simple-format format spec-alist))))
- (if insert (cons insert result) result)))
+ (if insert (list 'insert result) result)))
(defun gnus-parse-simple-format (format spec-alist)
;; This function parses the FORMAT string with the help of the
(define-key gnus-group-mode-map "\C-c\C-d" 'gnus-group-describe-group)
(define-key gnus-group-mode-map "\M-d" 'gnus-group-describe-all-groups)
(define-key gnus-group-mode-map "\C-c\C-a" 'gnus-group-apropos)
- (define-key gnus-group-mode-map "\C-c\M-C-a" 'gnus-group-description-apropos)
+ (define-key gnus-group-mode-map "\C-c\M-\C-a" 'gnus-group-description-apropos)
(define-key gnus-group-mode-map "a" 'gnus-group-post-news)
(define-key gnus-group-mode-map "\ek" 'gnus-group-edit-local-kill)
(define-key gnus-group-mode-map "\eK" 'gnus-group-edit-global-kill)
;; Do the sorting.
(while funcs
(setq gnus-newsrc-alist
- (sort (cdr gnus-newsrc-alist) (car funcs)))
+ (sort gnus-newsrc-alist (car funcs)))
(setq funcs (cdr funcs))))
(gnus-make-hashtable-from-newsrc-alist)
(gnus-group-list-groups))
(defun gnus-thread-sort-by-subject (h1 h2)
"Sort threads by root subject."
(string-lessp
- (downcase (gnus-simplify-subject
+ (downcase (gnus-simplify-subject-re
(mail-header-subject (gnus-thread-header h1))))
- (downcase (gnus-simplify-subject
+ (downcase (gnus-simplify-subject-re
(mail-header-subject (gnus-thread-header h2))))))
(defun gnus-thread-sort-by-date (h1 h2)
;; overview: [num subject from date id refs chars lines misc]
(narrow-to-region (point) eol)
- (forward-char)
+ (or (eobp) (forward-char))
(condition-case nil
(setq header
(goto-char (point-min))
(setq e (1- (search-forward "\n\n"))))
(insert-buffer-substring gnus-original-article-buffer 1 e)
+ (let ((hook (delete 'gnus-article-hide-headers-if-wanted
+ (delete 'gnus-article-hide-headers
+ gnus-article-display-hook))))
+ (run-hooks 'hook))
(if (or (not hidden) (and (numberp arg) (< arg 0)))
(gnus-article-hide-headers)))))
(interactive "P")
(gnus-set-global-variables)
(let ((gnus-default-article-saver 'gnus-summary-save-in-pipe))
- (gnus-summary-save-article arg)))
+ (gnus-summary-save-article arg))
+ (gnus-configure-windows 'pipe))
(defun gnus-summary-save-article-mail (&optional arg)
"Append the current article to an mail file.
(timezone-make-date-arpa-standard
date nil (current-time-zone))))))))
-
;; Article mode commands
(defun gnus-article-next-page (&optional lines)
(require 'nnmail)
(defvar nndoc-article-type 'mbox
- "*Type of the file - one of `mbox', `babyl' or `digest'.")
+ "*Type of the file - one of `mbox', `babyl', `digest', or `forward'.")
(defvar nndoc-digest-type 'traditional
"Type of the last digest. Auto-detected from the article header.
`rfc1341' -- RFC 1341 digest (MIME, unique boundary, no quoting).")
(defconst nndoc-type-to-regexp
- (list (list 'mbox
- (concat "^" rmail-unix-mail-delimiter)
- (concat "^" rmail-unix-mail-delimiter)
- nil "^$" nil nil nil)
- (list 'babyl "\^_\^L *\n" "\^_" "^[0-9].*\n" "^$" nil nil
- "\\*\\*\\* EOOH \\*\\*\\*\n\\(^.+\n\\)*")
- (list 'digest
- "^------------------------------*[\n \t]+"
- "^------------------------------*[\n \t]+"
- nil "^ ?$"
- "^------------------------------*[\n \t]+"
- "^End of" nil))
- "Regular expressions for articles of the various types.")
+ (` ((mbox
+ (, (concat "^" rmail-unix-mail-delimiter))
+ (, (concat "^" rmail-unix-mail-delimiter))
+ nil "^$" nil nil nil)
+ (babyl "\^_\^L *\n" "\^_" "^[0-9].*\n" "^$" nil nil
+ "\\*\\*\\* EOOH \\*\\*\\*\n\\(^.+\n\\)*")
+ (digest
+ "^------------------------------*[\n \t]+"
+ "^------------------------------*[\n \t]+"
+ nil "^ ?$"
+ "^------------------------------*[\n \t]+"
+ "^End of" nil)
+ (forward
+ "^-+ Start of forwarded message -+\n+"
+ "^-+ End of forwarded message -+\n"
+ nil "^ ?$" nil nil nil)))
+ "Regular expressions for articles of the various types.
+article-begin, article-end, head-begin, head-end,
+first-article, end-of-file, body-begin.")
\f
(setq nnfolder-group-alist
(cons (list group (setq active (cons 1 0)))
nnfolder-group-alist))
- (nnfolder-possibly-change-group group)
(nnmail-save-active nnfolder-group-alist nnfolder-active-file)))
t)
(match-end 0)))))
(setq activenumber (max activenumber newnum))
(setq activemin (min activemin newnum))))
- (setcar active (min activemin activenumber))
+ (setcar active (max 1 (min activemin activenumber)))
(setcdr active (max activenumber (cdr active)))
(goto-char (point-min))))
buf)))
(defun nnheader-insert-references (references message-id)
- ;; Fold long references line to follow RFC1036.
- (mail-position-on-field "References")
- (let ((begin (save-excursion (beginning-of-line) (point)))
- (fill-column 78)
- (fill-prefix "\t"))
- (if references (insert references))
- (if (and references message-id) (insert " "))
- (if message-id (insert message-id))
- ;; The region must end with a newline to fill the region
- ;; without inserting extra newline.
- (fill-region-as-paragraph begin (1+ (point)))))
+ (if (and (not references) (not message-id))
+ () ; This is illegal, but not all articles have Message-IDs.
+ ;; Fold long references line to follow RFC1036.
+ (mail-position-on-field "References")
+ (let ((begin (save-excursion (beginning-of-line) (point)))
+ (fill-column 78)
+ (fill-prefix "\t"))
+ (if references (insert references))
+ (if (and references message-id) (insert " "))
+ (if message-id (insert message-id))
+ ;; The region must end with a newline to fill the region
+ ;; without inserting extra newline.
+ (fill-region-as-paragraph begin (1+ (point))))))
(defun nnheader-remove-header (header &optional is-regexp)
(goto-char (point-min))
(setq incomings (cons incoming incomings)))))
(setq spools (cdr spools)))
;; If we did indeed read any incoming spools, we save all info.
- (if incoming
- (progn
- (nnmail-save-active
- (nnmail-get-value "%s-group-alist" method)
- (nnmail-get-value "%s-active-file" method))
- (and exit-func
- (funcall exit-func))
- (run-hooks 'nnmail-read-incoming-hook)
- (and gnus-verbose-backends
- (message "%s: Reading incoming mail...done" method))))
+ (when incomings
+ (nnmail-save-active
+ (nnmail-get-value "%s-group-alist" method)
+ (nnmail-get-value "%s-active-file" method))
+ (and exit-func (funcall exit-func))
+ (run-hooks 'nnmail-read-incoming-hook)
+ (and gnus-verbose-backends
+ (message "%s: Reading incoming mail...done" method)))
(while incomings
(setq incoming (car incomings))
(and nnmail-delete-incoming
(save-excursion
(set-buffer nntp-server-buffer)
(erase-buffer)
- (setq dir (file-name-as-directory nnmh-directory))))
+ (setq dir (file-truename (file-name-as-directory nnmh-directory)))))
(setq dir (expand-file-name dir))
;; Recurse down all directories.
(let ((dirs (and (file-readable-p dir)
(require 'sendmail)
(require 'nnheader)
+(eval-when-compile (require 'cl))
+
(eval-and-compile
(autoload 'news-setup "rnewspost")
(autoload 'news-reply-mode "rnewspost")
You'd better not use this variable in NNTP front-end program but
instead call function `nntp-status-message' to get status message.")
+(defvar nntp-opened-connections nil
+ "All (possibly) opened connections.")
+
(defvar nntp-server-xover 'try)
(defvar nntp-server-list-active-group 'try)
(defvar nntp-current-group "")
(defun nntp-request-close ()
"Close all server connections."
(let (proc)
- (and nntp-async-process
- (progn
- (delete-process nntp-async-process)
- (and (get-buffer nntp-async-buffer)
- (kill-buffer nntp-async-buffer))))
- (while nntp-async-group-alist
- (and (nth 3 (car nntp-async-group-alist))
- (progn
- (condition-case ()
- (process-send-string (nth 3 nntp-async-group-alist) "QUIT\n")
- (error nil))
- t)
- (delete-process (nth 3 (car nntp-async-group-alist))))
- (setq nntp-async-group-alist (cdr nntp-async-group-alist)))
- (while nntp-server-alist
- (and
- (setq proc (nth 1 (assq 'nntp-server-process (car nntp-server-alist))))
- (progn
+ (while nntp-opened-connections
+ (when (setq proc (pop nntp-opened-connections))
(condition-case ()
(process-send-string proc "QUIT\n")
(error nil))
- t)
- (delete-process proc))
- (and
- (setq proc (nth 1 (assq 'nntp-async-process (car nntp-server-alist))))
- (progn
- (condition-case ()
- (process-send-string proc "QUIT\n")
- (error nil))
- t)
- (delete-process proc))
+ (delete-process proc)))
+ (and nntp-async-buffer
+ (get-buffer nntp-async-buffer)
+ (kill-buffer nntp-async-buffer))
+ (while nntp-server-alist
(and (setq proc (nth 1 (assq 'nntp-async-buffer
(car nntp-server-alist))))
(buffer-name proc)
(setq nntp-address server)
;; It is possible to change kanji-fileio-code in this hook.
(run-hooks 'nntp-server-hook)
+ (push proc nntp-opened-connections)
nntp-server-process)))))
(defun nntp-open-network-stream (server)
;;; easymenu.el - Easy menu support for Emacs 19 and XEmacs.
;;
-;; $Id: easymenu.el,v 5.9 1995/02/14 19:44:00 amanda Exp $
+;; $Id: x-easymenu.el,v 2.1 1997/03/04 04:31:03 larsi Exp $
;;
;; LCD Archive Entry:
;; easymenu|Per Abrahamsen|abraham@iesd.auc.dk|
;; Easy menu support for XEmacs|
-;; $Date: 1995/02/14 19:44:00 $|$Revision: 5.9 $|~/misc/easymenu.el.gz|
+;; $Date: 1997/03/04 04:31:03 $|$Revision: 2.1 $|~/misc/easymenu.el.gz|
;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
;;
(provide 'easymenu)
;;; easymenu.el ends here
+;;; easymenu.el - Easy menu support for Emacs 19 and XEmacs.
+;;
+;; $Id: x-easymenu.el,v 2.1 1997/03/04 04:31:03 larsi Exp $
+;;
+;; LCD Archive Entry:
+;; easymenu|Per Abrahamsen|abraham@iesd.auc.dk|
+;; Easy menu support for XEmacs|
+;; $Date: 1997/03/04 04:31:03 $|$Revision: 2.1 $|~/misc/easymenu.el.gz|
+
+;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; Commentary:
+;;
+;; Easymenu allows you to define menus for both Emacs 19 and XEmacs.
+;;
+;; This file
+;; The advantages of using easymenu are:
+;;
+;; - Easier to use than either the Emacs 19 and XEmacs menu syntax.
+;;
+;; - Common interface for Emacs 18, Emacs 19, and XEmacs.
+;; (The code does nothing when run under Emacs 18).
+;;
+;; The public functions are:
+;;
+;; - Function: easy-menu-define SYMBOL MAPS DOC MENU
+;; SYMBOL is both the name of the variable that holds the menu and
+;; the name of a function that will present a the menu.
+;; MAPS is a list of keymaps where the menu should appear in the menubar.
+;; DOC is the documentation string for the variable.
+;; MENU is an XEmacs style menu description.
+;;
+;; See the documentation for easy-menu-define for details.
+;;
+;; - Function: easy-menu-change PATH NAME ITEMS
+;; Change an existing menu.
+;; The menu must already exist an be visible on the menu bar.
+;; PATH is a list of strings used for locating the menu on the menu bar.
+;; NAME is the name of the menu.
+;; ITEMS is a list of menu items, as defined in `easy-menu-define'.
+;;
+;; - Function: easy-menu-add MENU [ MAP ]
+;; Add MENU to the current menubar in MAP.
+;;
+;; - Function: easy-menu-remove MENU
+;; Remove MENU from the current menubar.
+;;
+;; Emacs 19 never uses `easy-menu-add' or `easy-menu-remove', menus
+;; automatically appear and disappear when the keymaps specified by
+;; the MAPS argument to `easy-menu-define' are activated.
+;;
+;; XEmacs will bind the map to button3 in each MAPS, but you must
+;; explicitly call `easy-menu-add' and `easy-menu-remove' to add and
+;; remove menus from the menu bar.
+
+;;; Code:
+
+;;;###autoload
+(defmacro easy-menu-define (symbol maps doc menu)
+ "Define a menu bar submenu in maps MAPS, according to MENU.
+The arguments SYMBOL and DOC are ignored; they are present for
+compatibility only. SYMBOL is not evaluated. In other Emacs versions
+these arguments may be used as a variable to hold the menu data, and a
+doc string for that variable.
+
+The first element of MENU must be a string. It is the menu bar item name.
+The rest of the elements are menu items.
+
+A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE]
+
+NAME is a string--the menu item name.
+
+CALLBACK is a command to run when the item is chosen,
+or a list to evaluate when the item is chosen.
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+Alternatively, a menu item may have the form:
+
+ [ NAME CALLBACK [ KEYWORD ARG ] ... ]
+
+Where KEYWORD is one of the symbol defined below.
+
+ :keys KEYS
+
+KEYS is a string; a complex keyboard equivalent to this menu item.
+
+ :active ENABLE
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+ :suffix NAME
+
+NAME is a string; the name of an argument to CALLBACK.
+
+ :style STYLE
+
+STYLE is a symbol describing the type of menu item. The following are
+defined:
+
+toggle: A checkbox.
+ Currently just prepend the name with the string \"Toggle \".
+radio: A radio button.
+nil: An ordinary menu item.
+
+ :selected SELECTED
+
+SELECTED is an expression; the checkbox or radio button is selected
+whenever this expression's value is non-nil.
+Currently just disable radio buttons, no effect on checkboxes.
+
+A menu item can be a string. Then that string appears in the menu as
+unselectable text. A string consisting solely of hyphens is displayed
+as a solid horizontal line.
+
+A menu item can be a list. It is treated as a submenu.
+The first element should be the submenu name. That's used as the
+menu item in the top-level menu. The cdr of the submenu list
+is a list of menu items, as above."
+ (` (progn
+ (defvar (, symbol) nil (, doc))
+ (easy-menu-do-define (quote (, symbol)) (, maps) (, doc) (, menu)))))
+
+(defun easy-menu-do-define (symbol maps doc menu)
+ (set symbol menu)
+ (fset symbol (list 'lambda '(e)
+ doc
+ '(interactive "@e")
+ '(run-hooks 'activate-menubar-hook)
+ '(setq zmacs-region-stays 't)
+ (list 'popup-menu symbol)))
+ (mapcar (function (lambda (map) (define-key map 'button3 symbol)))
+ (if (keymapp maps) (list maps) maps)))
+
+(fset 'easy-menu-change (symbol-function 'add-menu))
+
+(defun easy-menu-add (menu &optional map)
+ "Add MENU to the current menu bar."
+ (cond ((null current-menubar)
+ ;; Don't add it to a non-existing menubar.
+ nil)
+ ((assoc (car menu) current-menubar)
+ ;; Already present.
+ nil)
+ ((equal current-menubar '(nil))
+ ;; Set at left if only contains right marker.
+ (set-buffer-menubar (list menu nil)))
+ (t
+ ;; Add at right.
+ (set-buffer-menubar (copy-sequence current-menubar))
+ (add-menu nil (car menu) (cdr menu)))))
+
+(defun easy-menu-remove (menu)
+ "Remove MENU from the current menu bar."
+ (and current-menubar
+ (assoc (car menu) current-menubar)
+ (delete-menu-item (list (car menu)))))
+
+(provide 'easymenu)
+
+;;; easymenu.el ends here
+Fri Oct 13 02:20:18 1995 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.texi (Post): Fix.
+
Thu Oct 5 11:58:39 1995 Lars Ingebrigtsen <lars@eyesore.no>
* gnus.texi (Compilation & Init File): New.
@vindex gnus-group-topic-face
Topics are shown with @code{gnus-group-topic-face}.
-@vindex{gnus-topic-unique}
+@vindex gnus-topic-unique
If @code{gnus-topic-unique} is non-@code{nil}, each group will be member
of (tops) one topic each. If this is @code{nil}, each group might end
up being a member of several topics.
post buffer has been initialized, and can be used for inserting a
signature. Nice if you use different signatures in different groups.
-@item gnus-post-prepapare-hook
-@vindex gnus-post-prepapare-hook
+@item gnus-post-prepare-hook
+@vindex gnus-post-prepare-hook
This hook is called after a post buffer has been prepared. If you want
to insert a signature at this point, you could put
@code{gnus-inews-insert-signature} into this hook.
@item gnus-prepare-article-hook
@vindex gnus-prepare-article-hook
-This hook is called before the headers have been prepared. By default
-it inserts the signature specified by @code{gnus-signature-file}.
+This hook is called before the headers have been prepared.
@item gnus-inews-article-function
@vindex gnus-inews-article-function
If you want to lower the score of articles that have been crossposted to
more than, say, 3 groups:
@lisp
-("xref" (" +[^ ]+:[0-9]+ +[^ ]+:[0-9]+ +[^ ]+:[0-9]+" -1000 nil r))
+("xref" ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+" -1000 nil r))
@end lisp
@item Matching on the body
This is generally not a very good idea---it takes a very long time.