*** pub/sgnus/lisp/gnus-cache.el Wed Jun 26 23:16:14 1996 --- sgnus/lisp/gnus-cache.el Sun Jun 30 21:45:36 1996 *************** *** 236,248 **** (defun gnus-cache-possibly-alter-active (group active) "Alter the ACTIVE info for GROUP to reflect the articles in the cache." ! (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) ! (and cache-active ! (< (car cache-active) (car active)) ! (setcar active (car cache-active))) ! (and cache-active ! (> (cdr cache-active) (cdr active)) ! (setcdr active (cdr cache-active))))) (defun gnus-cache-retrieve-headers (articles group &optional fetch-old) "Retrieve the headers for ARTICLES in GROUP." --- 236,249 ---- (defun gnus-cache-possibly-alter-active (group active) "Alter the ACTIVE info for GROUP to reflect the articles in the cache." ! (when gnus-cache-active-hashtb ! (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) ! (and cache-active ! (< (car cache-active) (car active)) ! (setcar active (car cache-active))) ! (and cache-active ! (> (cdr cache-active) (cdr active)) ! (setcdr active (cdr cache-active)))))) (defun gnus-cache-retrieve-headers (articles group &optional fetch-old) "Retrieve the headers for ARTICLES in GROUP." *** pub/sgnus/lisp/gnus-topic.el Tue Jun 4 12:14:05 1996 --- sgnus/lisp/gnus-topic.el Sun Jun 30 22:45:05 1996 *************** *** 670,675 **** --- 670,677 ---- (make-local-variable 'gnus-group-indentation-function) (setq gnus-group-indentation-function 'gnus-topic-group-indentation) + (gnus-make-local-hook 'gnus-check-bogus-groups-hook) + (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist) (setq gnus-topology-checked-p nil) ;; We check the topology. (when gnus-newsrc-alist *************** *** 680,685 **** --- 682,688 ---- (remove-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic) (remove-hook 'gnus-group-change-level-function 'gnus-topic-change-level) + (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist) (setq gnus-group-prepare-function 'gnus-group-prepare-flat)) (when redisplay (gnus-group-list-groups)))) *************** *** 789,794 **** --- 792,813 ---- (or (save-excursion (gnus-topic-goto-topic (gnus-group-parent-topic)) (gnus-group-topic-level)) 0)) ? )) + + (defun gnus-topic-clean-alist () + "Remove bogus groups from the topic alist." + (let ((topic-alist gnus-topic-alist) + result topic) + (unless gnus-killed-hashtb + (gnus-make-hashtable-from-killed)) + (while (setq topic (pop topic-alist)) + (let ((topic-name (pop topic)) + group filtered-topic) + (while (setq group (pop topic)) + (if (and (gnus-gethash group gnus-active-hashtb) + (not (gnus-gethash group gnus-killed-hashtb))) + (push group filtered-topic))) + (push (cons topic-name (nreverse filtered-topic)) result))) + (setq gnus-topic-alist (nreverse result)))) (defun gnus-topic-change-level (group level oldlevel) "Run when changing levels to enter/remove groups from topics." *** pub/sgnus/lisp/gnus-vis.el Mon Jun 24 16:54:03 1996 --- sgnus/lisp/gnus-vis.el Sun Jun 30 21:45:36 1996 *************** *** 238,244 **** (defvar gnus-header-button-alist `(("^\\(References\\|Message-I[Dd]\\):" "<[^>]+>" 0 t gnus-button-message-id 0) ! ("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0) ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" 0 t gnus-button-mailto 0) ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0) --- 238,244 ---- (defvar gnus-header-button-alist `(("^\\(References\\|Message-I[Dd]\\):" "<[^>]+>" 0 t gnus-button-message-id 0) ! ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" 0 t gnus-button-mailto 0) ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0) *** pub/sgnus/lisp/gnus.el Sat Jun 29 01:15:56 1996 --- sgnus/lisp/gnus.el Sun Jun 30 23:10:44 1996 *************** *** 156,161 **** --- 156,169 ---- of strings). The functions are called with the name of the current group (or nil) as a parameter. + If you want to save your mail in one group and the news articles you + write in another group, you could say something like: + + \(setq gnus-message-archive-group + '((if (message-news-p) + \"misc-news\" + \"misc-mail\"))) + Normally the group names returned by this variable should be unprefixed -- which implictly means \"store on the archive server\". However, you may wish to store the message on some other server. In *************** *** 499,505 **** comparing subjects.") (defvar gnus-simplify-ignored-prefixes nil ! "*Regexp, matches for which are removed from subject lines when simplifying.") (defvar gnus-build-sparse-threads nil "*If non-nil, fill in the gaps in threads. --- 507,513 ---- comparing subjects.") (defvar gnus-simplify-ignored-prefixes nil ! "*Regexp, matches for which are removed from subject lines when simplifying fuzzily.") (defvar gnus-build-sparse-threads nil "*If non-nil, fill in the gaps in threads. *************** *** 1389,1394 **** --- 1397,1405 ---- (defvar gnus-summary-exit-hook nil "*A hook called on exit from the summary buffer.") + (defvar gnus-check-bogus-groups-hook nil + "A hook run after removing bogus groups.") + (defvar gnus-group-catchup-group-hook nil "*A hook run when catching up a group from the group buffer.") *************** *** 1750,1756 **** "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version-number "5.2.31" "Version number for this version of Gnus.") (defconst gnus-version (format "Gnus v%s" gnus-version-number) --- 1761,1767 ---- "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version-number "5.2.32" "Version number for this version of Gnus.") (defconst gnus-version (format "Gnus v%s" gnus-version-number) *************** *** 2033,2039 **** gnus-group-brew-soup gnus-brew-soup gnus-soup-add-article gnus-soup-send-replies gnus-soup-save-areas gnus-soup-pack-packet) ("nnsoup" nnsoup-pack-replies) ! ("gnus-scomo" :interactive t gnus-score-mode) ("gnus-mh" gnus-mh-mail-setup gnus-summary-save-article-folder gnus-Folder-save-name gnus-folder-save-name) ("gnus-mh" :interactive t gnus-summary-save-in-folder) --- 2044,2050 ---- gnus-group-brew-soup gnus-brew-soup gnus-soup-add-article gnus-soup-send-replies gnus-soup-save-areas gnus-soup-pack-packet) ("nnsoup" nnsoup-pack-replies) ! ("score-mode" :interactive t gnus-score-mode) ("gnus-mh" gnus-mh-mail-setup gnus-summary-save-article-folder gnus-Folder-save-name gnus-folder-save-name) ("gnus-mh" :interactive t gnus-summary-save-in-folder) *************** *** 4491,4497 **** (setcar (cddr entry) (gnus-byte-code 'gnus-tmp-func))))) (push (cons 'version emacs-version) gnus-format-specs) ! (gnus-message 7 "Compiling user specs...done")))) (defun gnus-indent-rigidly (start end arg) --- 4502,4509 ---- (setcar (cddr entry) (gnus-byte-code 'gnus-tmp-func))))) (push (cons 'version emacs-version) gnus-format-specs) ! ;; Mark the .newsrc.eld file as "dirty". ! (gnus-dribble-enter " ") (gnus-message 7 "Compiling user specs...done")))) (defun gnus-indent-rigidly (start end arg) *************** *** 5502,5516 **** group gnus-active-hashtb)))) (and b (goto-char b))))) ! (defun gnus-group-next-group (n) "Go to next N'th newsgroup. If N is negative, search backward instead. Returns the difference between N and the number of skips actually done." (interactive "p") ! (gnus-group-next-unread-group n t)) ! (defun gnus-group-next-unread-group (n &optional all level) "Go to next N'th unread newsgroup. If N is negative, search backward instead. If ALL is non-nil, choose any newsgroup, unread or not. --- 5514,5528 ---- group gnus-active-hashtb)))) (and b (goto-char b))))) ! (defun gnus-group-next-group (n &optional silent) "Go to next N'th newsgroup. If N is negative, search backward instead. Returns the difference between N and the number of skips actually done." (interactive "p") ! (gnus-group-next-unread-group n t nil silent)) ! (defun gnus-group-next-unread-group (n &optional all level silent) "Go to next N'th unread newsgroup. If N is negative, search backward instead. If ALL is non-nil, choose any newsgroup, unread or not. *************** *** 5526,5533 **** (gnus-group-search-forward backward (or (not gnus-group-goto-unread) all) level)) (setq n (1- n))) ! (if (/= 0 n) (gnus-message 7 "No more%s newsgroups%s" (if all "" " unread") ! (if level " on this level or higher" ""))) n)) (defun gnus-group-prev-group (n) --- 5538,5547 ---- (gnus-group-search-forward backward (or (not gnus-group-goto-unread) all) level)) (setq n (1- n))) ! (when (and (/= 0 n) ! (not silent)) ! (gnus-message 7 "No more%s newsgroups%s" (if all "" " unread") ! (if level " on this level or higher" ""))) n)) (defun gnus-group-prev-group (n) *************** *** 7861,7867 **** (cond (gnus-newsgroup-dormant (gnus-summary-limit-include-dormant)) ((and gnus-newsgroup-scored show-all) ! (gnus-summary-limit-include-expunged)))) ;; Function `gnus-apply-kill-file' must be called in this hook. (run-hooks 'gnus-apply-kill-hook) (if (and (zerop (buffer-size)) --- 7875,7881 ---- (cond (gnus-newsgroup-dormant (gnus-summary-limit-include-dormant)) ((and gnus-newsgroup-scored show-all) ! (gnus-summary-limit-include-expunged t)))) ;; Function `gnus-apply-kill-file' must be called in this hook. (run-hooks 'gnus-apply-kill-hook) (if (and (zerop (buffer-size)) *************** *** 12496,12502 **** ;; Suggested by Daniel Quinlan . (defalias 'gnus-summary-show-all-expunged 'gnus-summary-limit-include-expunged) ! (defun gnus-summary-limit-include-expunged () "Display all the hidden articles that were expunged for low scores." (interactive) (gnus-set-global-variables) --- 12510,12516 ---- ;; Suggested by Daniel Quinlan . (defalias 'gnus-summary-show-all-expunged 'gnus-summary-limit-include-expunged) ! (defun gnus-summary-limit-include-expunged (&optional no-error) "Display all the hidden articles that were expunged for low scores." (interactive) (gnus-set-global-variables) *************** *** 12509,12519 **** (< (cdar scored) gnus-summary-expunge-below) (setq headers (cons h headers)))) (setq scored (cdr scored))) ! (or headers (error "No expunged articles hidden.")) ! (goto-char (point-min)) ! (gnus-summary-prepare-unthreaded (nreverse headers))) ! (goto-char (point-min)) ! (gnus-summary-position-point))) (defun gnus-summary-catchup (&optional all quietly to-here not-mark) "Mark all articles not marked as unread in this newsgroup as read. --- 12523,12536 ---- (< (cdar scored) gnus-summary-expunge-below) (setq headers (cons h headers)))) (setq scored (cdr scored))) ! (if (not headers) ! (when (not no-error) ! (error "No expunged articles hidden.")) ! (goto-char (point-min)) ! (gnus-summary-prepare-unthreaded (nreverse headers)) ! (goto-char (point-min)) ! (gnus-summary-position-point) ! t)))) (defun gnus-summary-catchup (&optional all quietly to-here not-mark) "Mark all articles not marked as unread in this newsgroup as read. *************** *** 15928,15933 **** --- 15945,15951 ---- (set (car dead-lists) (delete group (symbol-value (car dead-lists)))))) (setq dead-lists (cdr dead-lists)))) + (run-hooks 'gnus-check-bogus-groups-hook) (gnus-message 5 "Checking bogus newsgroups...done")))) (defun gnus-check-duplicate-killed-groups () *** pub/sgnus/lisp/message.el Fri Jun 28 01:06:56 1996 --- sgnus/lisp/message.el Sun Jun 30 21:45:37 1996 *************** *** 2413,2418 **** --- 2413,2419 ---- (let ((cur (current-buffer)) from subject date reply-to to cc references message-id follow-to + (inhibit-point-motion-hooks t) mct never-mct gnus-warning) (save-restriction (narrow-to-region *************** *** 2517,2522 **** --- 2518,2524 ---- (let ((cur (current-buffer)) from subject date reply-to mct references message-id follow-to + (inhibit-point-motion-hooks t) followup-to distribution newsgroups gnus-warning) (save-restriction (narrow-to-region *** pub/sgnus/lisp/score-mode.el Sun Jun 30 23:16:08 1996 --- sgnus/lisp/score-mode.el Sun Jun 30 20:01:53 1996 *************** *** 0 **** --- 1,110 ---- + ;;; score-mode.el --- mode for editing Gnus score files + ;; Copyright (C) 1996 Free Software Foundation, Inc. + + ;; Author: Lars Magne Ingebrigtsen + ;; Keywords: news, mail + + ;; This file is part of GNU Emacs. + + ;; GNU Emacs 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. + + ;; GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the + ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, + ;; Boston, MA 02111-1307, USA. + + ;;; Commentary: + + ;;; Code: + + (require 'easymenu) + (require 'timezone) + (eval-when-compile (require 'cl)) + + (defvar gnus-score-mode-hook nil + "*Hook run in score mode buffers.") + + (defvar gnus-score-menu-hook nil + "*Hook run after creating the score mode menu.") + + (defvar gnus-score-edit-exit-function nil + "Function run on exit from the score buffer.") + + (defvar gnus-score-mode-map nil) + (unless gnus-score-mode-map + (setq gnus-score-mode-map (copy-keymap emacs-lisp-mode-map)) + (define-key gnus-score-mode-map "\C-c\C-c" 'gnus-score-edit-exit) + (define-key gnus-score-mode-map "\C-c\C-d" 'gnus-score-edit-insert-date) + (define-key gnus-score-mode-map "\C-c\C-p" 'gnus-score-pretty-print)) + + ;;;###autoload + (defun gnus-score-mode () + "Mode for editing Gnus score files. + This mode is an extended emacs-lisp mode. + + \\{gnus-score-mode-map}" + (interactive) + (kill-all-local-variables) + (use-local-map gnus-score-mode-map) + (when menu-bar-mode + (gnus-score-make-menu-bar)) + (set-syntax-table emacs-lisp-mode-syntax-table) + (setq major-mode 'gnus-score-mode) + (setq mode-name "Score") + (lisp-mode-variables nil) + (make-local-variable 'gnus-score-edit-exit-function) + (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) + + (defun gnus-score-make-menu-bar () + (unless (boundp 'gnus-score-menu) + (easy-menu-define + gnus-score-menu gnus-score-mode-map "" + '("Score" + ["Exit" gnus-score-edit-exit t] + ["Insert date" gnus-score-edit-insert-date t] + ["Format" gnus-score-pretty-print t])) + (run-hooks 'gnus-score-menu-hook))) + + (defun gnus-score-edit-insert-date () + "Insert date in numerical format." + (interactive) + (princ (gnus-score-day-number (current-time)) (current-buffer))) + + (defun gnus-score-pretty-print () + "Format the current score file." + (interactive) + (goto-char (point-min)) + (let ((form (read (current-buffer)))) + (erase-buffer) + (pp form (current-buffer))) + (goto-char (point-min))) + + (defun gnus-score-edit-exit () + "Stop editing the score file." + (interactive) + (unless (file-exists-p (file-name-directory (buffer-file-name))) + (make-directory (file-name-directory (buffer-file-name)) t)) + (save-buffer) + (bury-buffer (current-buffer)) + (let ((buf (current-buffer))) + (when gnus-score-edit-exit-function + (funcall gnus-score-edit-exit-function)) + (when (eq buf (current-buffer)) + (switch-to-buffer (other-buffer (current-buffer)))))) + + (defun gnus-score-day-number (time) + (let ((dat (decode-time time))) + (timezone-absolute-from-gregorian + (nth 4 dat) (nth 3 dat) (nth 5 dat)))) + + (provide 'score-mode) + + ;;; score-mode.el ends here *** pub/sgnus/lisp/ChangeLog Sat Jun 29 01:03:19 1996 --- sgnus/lisp/ChangeLog Sun Jun 30 22:45:06 1996 *************** *** 1,3 **** --- 1,29 ---- + Sun Jun 30 21:57:31 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-check-bogus-groups-hook): New hook. + + Sun Jun 30 21:54:46 1996 Joe Wells + + * gnus-topic.el (gnus-topic-clean-alist): New function. + + Sun Jun 30 20:00:18 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-group-next-unread-group): Allow silence. + + * gnus-cache.el (gnus-cache-possibly-alter-active): Would check + the obarray. + + * gnus.el (gnus-summary-read-group): Don't signal an error when + including expunged articles. + + * gnus-vis.el (gnus-header-button-alist): Would include ":". + + * message.el (message-reply): Inhibit point-motion hooks. + + * gnus.el (gnus-compile): Mark the .newsrc.eld file as dirty. + + * gnus-scomo.el: Renamed to "score-mode". + Sat Jun 29 01:03:19 1996 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.2.30 is released. *** pub/sgnus/texi/Makefile Fri Jun 14 04:51:36 1996 --- sgnus/texi/Makefile Sun Jun 30 22:39:21 1996 *************** *** 24,32 **** $(LATEX) refcard.tex clean: ! rm -f gnus.*.bak gnus.ky gnus.cp gnus.fn gnus.dvi gnus.cps gnus.kys \ gnus.log gnus.pg gnus.tp gnus.vr gnus.toc gnus.latexi *.aux gnus.cidx \ ! gnus.cind gnus.ilg gnus.ind gnus.kidx gnus.kind gnus.idx makeinfo: makeinfo -o gnus gnus.texi --- 24,33 ---- $(LATEX) refcard.tex clean: ! rm -f gnus.*.bak gnus.ky gnus.cp gnus.fn gnus.cps gnus.kys \ gnus.log gnus.pg gnus.tp gnus.vr gnus.toc gnus.latexi *.aux gnus.cidx \ ! gnus.cind gnus.ilg gnus.ind gnus.kidx gnus.kind gnus.idx \ ! gnus.tmptexi gnus.tmplatexi *.latexi texput.log *.orig *.rej makeinfo: makeinfo -o gnus gnus.texi