*** pub/dgnus/lisp/gnus-ems.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/gnus-ems.el Fri Jul 21 23:23:07 1995 *************** *** 488,493 **** --- 488,547 ---- (easy-menu-add gnus-article-treatment-menu)) gnus-article-mode-hook))) + (defvar gnus-logo (make-glyph (make-specifier 'image))) + + (defun gnus-group-startup-xmessage (&optional x y) + "Insert startup message in current buffer." + ;; Insert the message. + (erase-buffer) + (if (featurep 'xpm) + (progn + (set-glyph-property gnus-logo 'image "~/tmp/gnus.xpm") + (set-glyph-image gnus-logo "~/tmp/gnus.xpm" 'global 'x) + + (insert " ") + (set-extent-begin-glyph (make-extent (point) (point)) gnus-logo) + (insert " + Gnus * A newsreader for Emacsen + A Praxis Release * larsi@ifi.uio.no") + (goto-char (point-min)) + (while (not (eobp)) + (insert (make-string (/ (max (- (window-width) (or x 35)) 0) 2) + ? )) + (forward-line 1)) + (goto-char (point-min)) + ;; +4 is fuzzy factor. + (insert-char ?\n (/ (max (- (window-height) (or y 24)) 0) 2))) + + (insert + (format " + %s + A newsreader + for GNU Emacs + + Based on GNUS + written by + Masanobu UMEDA + + A Praxis Release + larsi@ifi.uio.no + " + gnus-version)) + ;; And then hack it. + ;; 18 is the longest line. + (indent-rigidly (point-min) (point-max) + (/ (max (- (window-width) (or x 28)) 0) 2)) + (goto-char (point-min)) + ;; +4 is fuzzy factor. + (insert-char ?\n (/ (max (- (window-height) (or y 12)) 0) 2))) + + ;; Fontify some. + (goto-char (point-min)) + (search-forward "Praxis") + (put-text-property (match-beginning 0) (match-end 0) 'face 'bold) + (goto-char (point-min))) + + ) *** pub/dgnus/lisp/gnus-mh.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/gnus-mh.el Fri Jul 21 21:51:16 1995 *************** *** 125,133 **** (gnus-configure-windows 'reply-yank)) (setq mail-buf gnus-mail-buffer) (pop-to-buffer mail-buf);; always in the display, so won't have window probs ! (switch-to-buffer draft) ! (kill-buffer mail-buf);; mh-e don't use it! ! ) ;; (mh-send to (or cc "") subject);; shouldn't use according to mhe --- 125,131 ---- (gnus-configure-windows 'reply-yank)) (setq mail-buf gnus-mail-buffer) (pop-to-buffer mail-buf);; always in the display, so won't have window probs ! (switch-to-buffer draft)) ;; (mh-send to (or cc "") subject);; shouldn't use according to mhe *** pub/dgnus/lisp/gnus-uu.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/gnus-uu.el Sat Jul 22 00:27:01 1995 *************** *** 1060,1066 **** (message "Getting article %d, %s" article (gnus-uu-part-number article)) (if (not (= (or gnus-current-article 0) article)) ! (progn (gnus-request-article article gnus-newsgroup-name nntp-server-buffer) (setq gnus-last-article gnus-current-article) --- 1060,1066 ---- (message "Getting article %d, %s" article (gnus-uu-part-number article)) (if (not (= (or gnus-current-article 0) article)) ! (let ((nntp-async-number nil)) (gnus-request-article article gnus-newsgroup-name nntp-server-buffer) (setq gnus-last-article gnus-current-article) *** pub/dgnus/lisp/gnus-vis.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/gnus-vis.el Fri Jul 21 23:23:06 1995 *************** *** 1054,1059 **** --- 1054,1061 ---- (inhibit-point-motion-hooks t) (case-fold-search t)) (goto-char (point-min)) + (or (search-forward "\n\n" nil t) + (goto-char (point-max))) (while (re-search-forward gnus-button-regexp nil t) (goto-char (match-beginning 0)) (let* ((from (point)) *** pub/dgnus/lisp/gnus.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/gnus.el Sat Jul 22 04:08:26 1995 *************** *** 1303,1309 **** (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "(ding) Gnus v0.98" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1303,1309 ---- (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "(ding) Gnus v0.98.1" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 2273,2280 **** (replace-match "" t t)) (if gnus-simplify-subject-fuzzy-regexp (while (re-search-forward gnus-simplify-subject-fuzzy-regexp nil t) ! (replace-match "" t t))) ! ) ;; Add the current buffer to the list of buffers to be killed on exit. (defun gnus-add-current-to-buffer-list () --- 2273,2279 ---- (replace-match "" t t)) (if gnus-simplify-subject-fuzzy-regexp (while (re-search-forward gnus-simplify-subject-fuzzy-regexp nil t) ! (replace-match "" t t)))) ;; Add the current buffer to the list of buffers to be killed on exit. (defun gnus-add-current-to-buffer-list () *************** *** 5453,5458 **** --- 5452,5516 ---- (set (car locals) nil))) (setq locals (cdr locals))))) + ;; Some summary mode macros. + + ;; Return a header specified by a NUMBER. + (defun gnus-get-header-by-number (number) + (save-excursion + (set-buffer gnus-summary-buffer) + (or gnus-newsgroup-headers-hashtb-by-number + (gnus-make-headers-hashtable-by-number)) + (gnus-gethash (int-to-string number) + gnus-newsgroup-headers-hashtb-by-number))) + + ;; Fast version of the function above. + (defmacro gnus-get-header-by-num (number) + (` (gnus-gethash (int-to-string (, number)) + gnus-newsgroup-headers-hashtb-by-number))) + + (defmacro gnus-summary-search-forward (&optional unread subject backward) + "Search for article forward. + If UNREAD is non-nil, only unread articles are selected. + If SUBJECT is non-nil, the article which has the same subject will be + searched for. + If BACKWARD is non-nil, the search will be performed backwards instead." + (` (gnus-summary-search-subject (, backward) (, unread) (, subject)))) + + (defmacro gnus-summary-search-backward (&optional unread subject) + "Search for article backward. + If 1st optional argument UNREAD is non-nil, only unread article is selected. + If 2nd optional argument SUBJECT is non-nil, the article which has + the same subject will be searched for." + (` (gnus-summary-search-forward (, unread) (, subject) t))) + + (defmacro gnus-summary-article-number (&optional number-or-nil) + "The article number of the article on the current line. + If there isn's an article number here, then we return the current + article number." + (if number-or-nil + '(get-text-property (gnus-point-at-bol) 'gnus-number) + '(or (get-text-property (gnus-point-at-bol) 'gnus-number) + gnus-current-article))) + + (defmacro gnus-summary-thread-level () + "The thread level of the article on the current line." + '(or (get-text-property (gnus-point-at-bol) 'gnus-level) + 0)) + + (defmacro gnus-summary-article-mark () + "The mark on the current line." + '(get-text-property (gnus-point-at-bol) 'gnus-mark)) + + (defun gnus-summary-subject-string () + "Return current subject string or nil if nothing." + (let ((article (gnus-summary-article-number)) + header) + (and article + (setq header (gnus-get-header-by-num article)) + (vectorp header) + (header-subject header)))) + + (defun gnus-mouse-pick-article (e) (interactive "e") (mouse-set-point e) *************** *** 5572,5580 **** (and (not (memq article gnus-newsgroup-marked)) (not (memq article gnus-newsgroup-dormant)) (memq article gnus-newsgroup-unreads) ! (gnus-summary-mark-article nil gnus-low-score-mark)) (and (eq (gnus-summary-article-mark) gnus-low-score-mark) ! (gnus-summary-mark-article nil gnus-unread-mark)))) (and gnus-visual (run-hooks 'gnus-summary-update-hook)))))) --- 5630,5638 ---- (and (not (memq article gnus-newsgroup-marked)) (not (memq article gnus-newsgroup-dormant)) (memq article gnus-newsgroup-unreads) ! (gnus-summary-mark-article-as-read gnus-low-score-mark)) (and (eq (gnus-summary-article-mark) gnus-low-score-mark) ! (gnus-summary-mark-article-as-unread gnus-unread-mark)))) (and gnus-visual (run-hooks 'gnus-summary-update-hook)))))) *************** *** 5603,5613 **** (and (not (memq article gnus-newsgroup-marked)) (not (memq article gnus-newsgroup-dormant)) (memq article gnus-newsgroup-unreads) ! (gnus-summary-mark-article nil gnus-low-score-mark)) ;; We want to possibly mark it as unread. (and (eq (get-text-property (point) 'gnus-mark) gnus-low-score-mark) ! (gnus-summary-mark-article nil gnus-unread-mark))) ;; Do the visual highlights at the same time. (and gnus-visual (run-hooks 'gnus-summary-update-hook)) (forward-line 1))))))) --- 5661,5671 ---- (and (not (memq article gnus-newsgroup-marked)) (not (memq article gnus-newsgroup-dormant)) (memq article gnus-newsgroup-unreads) ! (gnus-summary-mark-article-as-read gnus-low-score-mark)) ;; We want to possibly mark it as unread. (and (eq (get-text-property (point) 'gnus-mark) gnus-low-score-mark) ! (gnus-summary-mark-article-as-unread gnus-unread-mark))) ;; Do the visual highlights at the same time. (and gnus-visual (run-hooks 'gnus-summary-update-hook)) (forward-line 1))))))) *************** *** 6057,6078 **** fun (cdr fun)))) threads) - (defmacro gnus-thread-header-old (thread) - (or (symbolp thread) (error "Boo!")) - (` (if (consp (, thread)) - (if (stringp (car (, thread))) - (car (car (cdr (, thread)))) - (car (, thread))) - (, thread)))) - ;; Written by Hallvard B Furuseth . (defmacro gnus-thread-header (thread) ;; Return header of first article in THREAD. ;; Note that THREAD must never, evr be anything else than a variable - ;; using some other form will lead to serious barfage. ! (or (symbolp thread) (error "Boo!")) ! (list 'byte-code "\10\211:\203\17\0\211@;\203\16\0A@@\207" ! (vector thread) 1)) (defun gnus-thread-sort-by-number (h1 h2) "Sort threads by root article number." --- 6115,6129 ---- fun (cdr fun)))) threads) ;; Written by Hallvard B Furuseth . (defmacro gnus-thread-header (thread) ;; Return header of first article in THREAD. ;; Note that THREAD must never, evr be anything else than a variable - ;; using some other form will lead to serious barfage. ! (or (symbolp thread) (error "Wrong type argument: symbolp, THREAD")) ! ;; (8% speedup to gnus-summary-prepare, just for fun :-) ! (list 'byte-code "\10\211:\203\17\0\211@;\203\16\0A@@\207" ; ! (vector thread) 2)) (defun gnus-thread-sort-by-number (h1 h2) "Sort threads by root article number." *************** *** 6108,6119 **** (defun gnus-thread-sort-by-score (h1 h2) "Sort threads by root article score. Unscored articles will be counted as having a score of zero." ! (let ((s1 (assq (header-number (gnus-thread-header h1)) ! gnus-newsgroup-scored)) ! (s2 (assq (header-number (gnus-thread-header h2)) ! gnus-newsgroup-scored))) ! (> (or (cdr s1) gnus-summary-default-score 0) ! (or (cdr s2) gnus-summary-default-score 0)))) (defun gnus-thread-sort-by-total-score (h1 h2) "Sort threads by the sum of all scores in the thread. --- 6159,6170 ---- (defun gnus-thread-sort-by-score (h1 h2) "Sort threads by root article score. Unscored articles will be counted as having a score of zero." ! (> (or (assq (header-number (gnus-thread-header h1)) ! gnus-newsgroup-scored) ! gnus-summary-default-score 0) ! (or (assq (header-number (gnus-thread-header h2)) ! gnus-newsgroup-scored) ! gnus-summary-default-score 0))) (defun gnus-thread-sort-by-total-score (h1 h2) "Sort threads by the sum of all scores in the thread. *************** *** 6231,6263 **** (and header (progn ! (gnus-summary-insert-line ! nil header level nil ! (cond ! ((memq number gnus-newsgroup-marked) gnus-ticked-mark) ! ((memq number gnus-newsgroup-dormant) gnus-dormant-mark) ! ((memq number gnus-newsgroup-unreads) gnus-unread-mark) ! ((memq number gnus-newsgroup-expirable) gnus-expirable-mark) ! (t gnus-ancient-mark)) ! (memq number gnus-newsgroup-replied) ! (memq number gnus-newsgroup-expirable) ! (if (and (eq gnus-summary-make-false-root 'empty) ! (memq number gnus-tmp-gathered)) ! gnus-summary-same-subject ! (if (or (zerop level) ! (and gnus-thread-ignore-subject ! (not (string= ! (gnus-simplify-subject-re ! gnus-tmp-prev-subject) ! (gnus-simplify-subject-re ! subject))))) ! subject ! gnus-summary-same-subject)) ! (and (eq gnus-summary-make-false-root 'adopt) ! (memq number gnus-tmp-gathered)) ! (cdr (assq number gnus-newsgroup-scored))) ! (setq gnus-tmp-prev-subject subject)))) (if (nth 1 thread) (setq stack (cons (cons (max 0 level) (nthcdr 1 thread)) stack))) --- 6282,6315 ---- (and header (progn ! (inline ! (gnus-summary-insert-line ! nil header level nil ! (cond ! ((memq number gnus-newsgroup-marked) gnus-ticked-mark) ! ((memq number gnus-newsgroup-dormant) gnus-dormant-mark) ! ((memq number gnus-newsgroup-unreads) gnus-unread-mark) ! ((memq number gnus-newsgroup-expirable) gnus-expirable-mark) ! (t gnus-ancient-mark)) ! (memq number gnus-newsgroup-replied) ! (memq number gnus-newsgroup-expirable) ! (if (and (eq gnus-summary-make-false-root 'empty) ! (memq number gnus-tmp-gathered)) ! gnus-summary-same-subject ! (if (or (zerop level) ! (and gnus-thread-ignore-subject ! (not (string= ! (gnus-simplify-subject-re ! gnus-tmp-prev-subject) ! (gnus-simplify-subject-re ! subject))))) ! subject ! gnus-summary-same-subject)) ! (and (eq gnus-summary-make-false-root 'adopt) ! (memq number gnus-tmp-gathered)) ! (cdr (assq number gnus-newsgroup-scored))) ! (setq gnus-tmp-prev-subject subject))))) (if (nth 1 thread) (setq stack (cons (cons (max 0 level) (nthcdr 1 thread)) stack))) *************** *** 6384,6389 **** --- 6436,6444 ---- (setq gnus-newsgroup-scored (copy-sequence (cdr (assq 'score marked)))) (setq gnus-newsgroup-processable nil))) + ;; Create the header hashtb. + (or gnus-newsgroup-headers-hashtb-by-number + (gnus-make-headers-hashtable-by-number)) ;; Check whether auto-expire is to be done in this group. (setq gnus-newsgroup-auto-expire (or (and (stringp gnus-auto-expirable-newsgroups) *************** *** 7040,7054 **** (defalias 'gnus-find-header-by-number 'gnus-get-header-by-number) (make-obsolete 'gnus-find-header-by-number 'gnus-get-header-by-number) - ;; Return a header specified by a NUMBER. - (defun gnus-get-header-by-number (number) - (save-excursion - (set-buffer gnus-summary-buffer) - (or gnus-newsgroup-headers-hashtb-by-number - (gnus-make-headers-hashtable-by-number)) - (gnus-gethash (int-to-string number) - gnus-newsgroup-headers-hashtb-by-number))) - (defun gnus-make-headers-hashtable-by-number () "Make hashtable for the variable gnus-newsgroup-headers by number." (save-excursion --- 7095,7100 ---- *************** *** 7137,7142 **** --- 7183,7202 ---- (save-excursion (gnus-group-best-unread-group exclude-group)))) + (defun gnus-subject-equal (s1 s2) + (cond + ((null gnus-summary-gather-subject-limit) + (equal (gnus-simplify-subject-re s1) + (gnus-simplify-subject-re s2))) + ((eq gnus-summary-gather-subject-limit 'fuzzy) + (equal (gnus-simplify-subject-fuzzy s1) + (gnus-simplify-subject-fuzzy s2))) + ((numberp gnus-summary-gather-subject-limit) + (equal (gnus-limit-string s1 gnus-summary-gather-subject-limit) + (gnus-limit-string s2 gnus-summary-gather-subject-limit))) + (t + (equal s1 s2)))) + (defun gnus-summary-search-subject (&optional backward unread subject) "Search for article forward. If BACKWARD is non-nil, search backward. *************** *** 7165,7172 **** (eq (get-text-property (point) 'gnus-mark) gnus-unread-mark)) (or (not subject) ! (and (setq psubject (gnus-summary-subject-string)) ! (gnus-subject-equal subject psubject)))))) (if backward (if (bobp) nil (forward-char -1) t) (if (eobp) nil (forward-char 1) t))))) (if did --- 7225,7232 ---- (eq (get-text-property (point) 'gnus-mark) gnus-unread-mark)) (or (not subject) ! (and (setq psubject (inline (gnus-summary-subject-string))) ! (inline (gnus-subject-equal subject psubject))))))) (if backward (if (bobp) nil (forward-char -1) t) (if (eobp) nil (forward-char 1) t))))) (if did *************** *** 7175,7238 **** (get-text-property (point) 'gnus-number) (gnus-summary-position-cursor))))) - (defun gnus-subject-equal (s1 s2) - (cond - ((null gnus-summary-gather-subject-limit) - (equal (gnus-simplify-subject-re s1) - (gnus-simplify-subject-re s2))) - ((eq gnus-summary-gather-subject-limit 'fuzzy) - (equal (gnus-simplify-subject-fuzzy s1) - (gnus-simplify-subject-fuzzy s2))) - ((numberp gnus-summary-gather-subject-limit) - (equal (gnus-limit-string s1 gnus-summary-gather-subject-limit) - (gnus-limit-string s2 gnus-summary-gather-subject-limit))) - (t - (equal s1 s2)))) - - (defun gnus-summary-search-forward (&optional unread subject backward) - "Search for article forward. - If UNREAD is non-nil, only unread articles are selected. - If SUBJECT is non-nil, the article which has the same subject will be - searched for. - If BACKWARD is non-nil, the search will be performed backwards instead." - (gnus-summary-search-subject backward unread subject)) - - (defun gnus-summary-search-backward (&optional unread subject) - "Search for article backward. - If 1st optional argument UNREAD is non-nil, only unread article is selected. - If 2nd optional argument SUBJECT is non-nil, the article which has - the same subject will be searched for." - (gnus-summary-search-forward unread subject t)) - - (defun gnus-summary-article-number (&optional number-or-nil) - "The article number of the article on the current line. - If there isn's an article number here, then we return the current - article number." - (let* ((number (get-text-property (gnus-point-at-bol) 'gnus-number))) - (if number-or-nil number (or number gnus-current-article)))) - - (defun gnus-summary-thread-level () - "The thread level of the article on the current line." - (or (get-text-property (gnus-point-at-bol) 'gnus-level) - 0)) - (defun gnus-summary-pseudo-article () "The thread level of the article on the current line." (get-text-property (gnus-point-at-bol) 'gnus-pseudo)) - (defun gnus-summary-article-mark () - "The mark on the current line." - (get-text-property (gnus-point-at-bol) 'gnus-mark)) - - (defun gnus-summary-subject-string () - "Return current subject string or nil if nothing." - (let ((article (gnus-summary-article-number)) - header) - (and article - (setq header (gnus-get-header-by-number article)) - (vectorp header) - (header-subject header)))) - (defalias 'gnus-summary-score 'gnus-summary-article-score) (make-obsolete 'gnus-summary-score 'gnus-summary-article-score) (defun gnus-summary-article-score () --- 7235,7244 ---- *************** *** 8087,8093 **** (while (and (> n 0) ! (let ((ref (header-references (gnus-get-header-by-number (gnus-summary-article-number))))) (if (and ref (not (equal ref "")) (string-match "<[^<>]*>[ \t]*$" ref)) --- 8093,8099 ---- (while (and (> n 0) ! (let ((ref (header-references (gnus-get-header-by-num (gnus-summary-article-number))))) (if (and ref (not (equal ref "")) (string-match "<[^<>]*>[ \t]*$" ref)) *************** *** 8585,8593 **** (or (gnus-server-opened to-method) (gnus-open-server to-method) (error "Can't open server %s" (car to-method))) - (gnus-message 6 "Copying to %s: %s..." - (or select-method to-newsgroup) articles) (while articles (if (setq art-group (save-excursion (set-buffer copy-buf) --- 8591,8599 ---- (or (gnus-server-opened to-method) (gnus-open-server to-method) (error "Can't open server %s" (car to-method))) (while articles + (gnus-message 6 "Copying to %s: %s..." + (or select-method to-newsgroup) articles) (if (setq art-group (save-excursion (set-buffer copy-buf) *************** *** 8749,8769 **** (use-local-map (copy-keymap (current-local-map))) (local-set-key "\C-c\C-c" 'gnus-summary-edit-article-done) (buffer-enable-undo) (goto-char (point-min)) (search-forward "\n\n" nil t)) (defun gnus-summary-edit-article-done () "Make edits to the current article permanent." (interactive) ! (if (not (gnus-request-replace-article ! (cdr gnus-article-current) (car gnus-article-current) ! (current-buffer))) ! (error "Couldn't replace article.") ! (gnus-article-mode) ! (use-local-map gnus-article-mode-map) ! (setq buffer-read-only t) ! (buffer-disable-undo (current-buffer)) ! (pop-to-buffer gnus-summary-buffer))) (defun gnus-summary-fancy-query () "Query where the fancy respool algorithm would put this article." --- 8755,8779 ---- (use-local-map (copy-keymap (current-local-map))) (local-set-key "\C-c\C-c" 'gnus-summary-edit-article-done) (buffer-enable-undo) + (widen) (goto-char (point-min)) (search-forward "\n\n" nil t)) (defun gnus-summary-edit-article-done () "Make edits to the current article permanent." (interactive) ! (let ((buf (buffer-substring-no-properties (point-min) (point-max)))) ! (erase-buffer) ! (insert buf) ! (if (not (gnus-request-replace-article ! (cdr gnus-article-current) (car gnus-article-current) ! (current-buffer))) ! (error "Couldn't replace article.") ! (gnus-article-mode) ! (use-local-map gnus-article-mode-map) ! (setq buffer-read-only t) ! (buffer-disable-undo (current-buffer)) ! (pop-to-buffer gnus-summary-buffer))) ) (defun gnus-summary-fancy-query () "Query where the fancy respool algorithm would put this article." *************** *** 8913,8941 **** "Mark articles with same SUBJECT as read, and return marked number. If optional argument UNMARK is positive, remove any kinds of marks. If optional argument UNMARK is negative, mark articles as unread instead." ! (let ((count 1)) (save-excursion ! (cond ((null unmark) ! (gnus-summary-mark-article nil gnus-killed-mark)) ! ((> unmark 0) ! (gnus-summary-tick-article nil t)) ! (t ! (gnus-summary-tick-article))) ! (while (and subject ! (gnus-summary-search-forward nil subject)) ! (cond ((null unmark) ! (gnus-summary-mark-article nil gnus-killed-mark)) ! ((> unmark 0) ! (gnus-summary-tick-article nil t)) ! (t ! (gnus-summary-tick-article))) ! (setq count (1+ count)))) ! ;; Hide killed thread subtrees. Does not work properly always. ! ;;(and (null unmark) ! ;; gnus-thread-hide-killed ! ;; (gnus-summary-hide-thread)) ! ;; Return number of articles marked as read. ! count)) (defun gnus-summary-mark-as-processable (n &optional unmark) "Set the process mark on the next N articles. --- 8923,8948 ---- "Mark articles with same SUBJECT as read, and return marked number. If optional argument UNMARK is positive, remove any kinds of marks. If optional argument UNMARK is negative, mark articles as unread instead." ! (let ((count 0)) (save-excursion ! (cond ! ((null unmark) ; Mark as read. ! (while (and ! (gnus-summary-mark-article-as-read gnus-killed-mark) ! (gnus-summary-search-forward nil subject)) ! (setq count (1+ count)))) ! ((> unmark 0) ; Tick. ! (while (and ! (gnus-summary-mark-article-as-unread gnus-ticked-mark) ! (gnus-summary-search-forward nil subject)) ! (setq count (1+ count)))) ! (t ; Mark as unread. ! (while (and ! (gnus-summary-mark-article-as-unread gnus-unread-mark) ! (gnus-summary-search-forward nil subject)) ! (setq count (1+ count))))) ! ;; Return the number of marked articles. ! count))) (defun gnus-summary-mark-as-processable (n &optional unmark) "Set the process mark on the next N articles. *************** *** 9090,9095 **** --- 9097,9152 ---- (gnus-set-mode-line 'summary) n)) + (defun gnus-summary-mark-article-as-read (mark) + "Mark the current article quickly as read with MARK." + (let ((article (gnus-summary-article-number))) + (setq gnus-newsgroup-unreads (delq article gnus-newsgroup-unreads)) + (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) + (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) + ;; Possibly remove from cache, if that is used. + (and gnus-use-cache (gnus-cache-enter-remove-article article)) + (and gnus-newsgroup-auto-expire + (or (= mark gnus-killed-mark) (= mark gnus-del-mark) + (= mark gnus-catchup-mark) (= mark gnus-low-score-mark) + (= mark gnus-read-mark)) + (progn + (setq mark gnus-expirable-mark) + (setq gnus-newsgroup-expirable + (cons article gnus-newsgroup-expirable)))) + (while (eq (gnus-summary-article-mark) gnus-dummy-mark) + (forward-line 1)) + ;; Fix the mark. + (gnus-summary-update-mark mark 'unread) + t)) + + (defun gnus-summary-mark-article-as-unread (mark) + "Mark the current article quickly as unread with MARK." + (let ((article (gnus-summary-article-number))) + (or (memq article gnus-newsgroup-unreads) + (setq gnus-newsgroup-unreads (cons article gnus-newsgroup-unreads))) + (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) + (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) + (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable)) + (if (= mark gnus-ticked-mark) + (setq gnus-newsgroup-marked (cons article gnus-newsgroup-marked))) + (if (= mark gnus-dormant-mark) + (setq gnus-newsgroup-dormant (cons article gnus-newsgroup-dormant))) + + ;; See whether the article is to be put in the cache. + (and gnus-use-cache + (save-excursion + (gnus-cache-possibly-enter-article + gnus-newsgroup-name article + (gnus-get-header-by-num article) + (= mark gnus-ticked-mark) + (= mark gnus-dormant-mark) (= mark gnus-unread-mark)))) + + (while (eq (gnus-summary-article-mark) gnus-dummy-mark) + (forward-line 1)) + ;; Fix the mark. + (gnus-summary-update-mark mark 'unread) + t)) + (defun gnus-summary-mark-article (&optional article mark no-expire) "Mark ARTICLE with MARK. MARK can be any character. *************** *** 9107,9113 **** (= mark gnus-catchup-mark) (= mark gnus-low-score-mark) (= mark gnus-read-mark)))) (setq mark gnus-expirable-mark)) ! (let* ((mark (or (and (stringp mark) (aref mark 0)) mark gnus-del-mark)) (article (or article (gnus-summary-article-number)))) (or article (error "No article on current line")) (if (or (= mark gnus-unread-mark) --- 9164,9170 ---- (= mark gnus-catchup-mark) (= mark gnus-low-score-mark) (= mark gnus-read-mark)))) (setq mark gnus-expirable-mark)) ! (let* ((mark (or mark gnus-del-mark)) (article (or article (gnus-summary-article-number)))) (or article (error "No article on current line")) (if (or (= mark gnus-unread-mark) *************** *** 9122,9128 **** (save-excursion (gnus-cache-possibly-enter-article gnus-newsgroup-name article ! (gnus-get-header-by-number article) (= mark gnus-ticked-mark) (= mark gnus-dormant-mark) (= mark gnus-unread-mark)))) --- 9179,9185 ---- (save-excursion (gnus-cache-possibly-enter-article gnus-newsgroup-name article ! (gnus-get-header-by-num article) (= mark gnus-ticked-mark) (= mark gnus-dormant-mark) (= mark gnus-unread-mark)))) *************** *** 9138,9143 **** --- 9195,9201 ---- (defun gnus-summary-update-mark (mark type) (beginning-of-line) (let ((forward (cdr (assq type gnus-summary-mark-positions))) + (buffer-read-only nil) plist) (if (not forward) () *************** *** 9153,9159 **** (defun gnus-mark-article-as-read (article &optional mark) "Enter ARTICLE in the pertinent lists and remove it from others." ;; Make the article expirable. ! (let ((mark (or (and (stringp mark) (aref mark 0)) mark gnus-del-mark))) (if (= mark gnus-expirable-mark) (setq gnus-newsgroup-expirable (cons article gnus-newsgroup-expirable)) (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable))) --- 9211,9217 ---- (defun gnus-mark-article-as-read (article &optional mark) "Enter ARTICLE in the pertinent lists and remove it from others." ;; Make the article expirable. ! (let ((mark (or mark gnus-del-mark))) (if (= mark gnus-expirable-mark) (setq gnus-newsgroup-expirable (cons article gnus-newsgroup-expirable)) (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable))) *************** *** 9166,9177 **** (defun gnus-mark-article-as-unread (article &optional mark) "Enter ARTICLE in the pertinent lists and remove it from others." ! (let ((mark (or (and (stringp mark) (aref mark 0)) mark gnus-ticked-mark))) ;; Add to unread list. (or (memq article gnus-newsgroup-unreads) (setq gnus-newsgroup-unreads (cons article gnus-newsgroup-unreads))) - ;; If CLEAR-MARK is non-nil, the article must be removed from mark - ;; lists. Otherwise, it must be added to the list. (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable)) --- 9224,9233 ---- (defun gnus-mark-article-as-unread (article &optional mark) "Enter ARTICLE in the pertinent lists and remove it from others." ! (let ((mark (or mark gnus-ticked-mark))) ;; Add to unread list. (or (memq article gnus-newsgroup-unreads) (setq gnus-newsgroup-unreads (cons article gnus-newsgroup-unreads))) (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable)) *************** *** 9246,9255 **** (defun gnus-summary-mark-unread-as-read () "Intended to be used by `gnus-summary-mark-article-hook'." ! (or (memq gnus-current-article gnus-newsgroup-marked) ! (memq gnus-current-article gnus-newsgroup-dormant) ! (memq gnus-current-article gnus-newsgroup-expirable) ! (gnus-summary-mark-article gnus-current-article gnus-read-mark))) (defun gnus-summary-mark-region-as-read (point mark all) "Mark all unread articles between point and mark as read. --- 9302,9312 ---- (defun gnus-summary-mark-unread-as-read () "Intended to be used by `gnus-summary-mark-article-hook'." ! (and (memq gnus-current-article gnus-newsgroup-unreads) ! (or (memq gnus-current-article gnus-newsgroup-marked) ! (memq gnus-current-article gnus-newsgroup-dormant) ! (memq gnus-current-article gnus-newsgroup-expirable) ! (gnus-summary-mark-article-as-read gnus-read-mark)))) (defun gnus-summary-mark-region-as-read (point mark all) "Mark all unread articles between point and mark as read. *************** *** 9408,9414 **** headers h) (while scored (or (gnus-summary-goto-subject (car (car scored))) ! (and (setq h (gnus-get-header-by-number (car (car scored)))) (< (cdr (car scored)) gnus-summary-expunge-below) (setq headers (cons h headers)))) (setq scored (cdr scored))) --- 9465,9471 ---- headers h) (while scored (or (gnus-summary-goto-subject (car (car scored))) ! (and (setq h (gnus-get-header-by-num (car (car scored)))) (< (cdr (car scored)) gnus-summary-expunge-below) (setq headers (cons h headers)))) (setq scored (cdr scored))) *************** *** 9431,9437 **** headers h) (while dormant (or (gnus-summary-goto-subject (car dormant)) ! (and (setq h (gnus-get-header-by-number (car dormant))) (setq headers (cons h headers)))) (setq dormant (cdr dormant))) (or headers (error "No dormant articles hidden.")) --- 9488,9494 ---- headers h) (while dormant (or (gnus-summary-goto-subject (car dormant)) ! (and (setq h (gnus-get-header-by-num (car dormant))) (setq headers (cons h headers)))) (setq dormant (cdr dormant))) (or headers (error "No dormant articles hidden.")) *************** *** 9480,9486 **** (let ((unreads (length gnus-newsgroup-unreads))) (if (gnus-summary-first-subject (not all)) (while (and (if to-here (< (point) to-here) t) ! (gnus-summary-mark-article nil gnus-catchup-mark) (gnus-summary-search-subject nil (not all))))) (- unreads (length gnus-newsgroup-unreads)) (or to-here --- 9537,9543 ---- (let ((unreads (length gnus-newsgroup-unreads))) (if (gnus-summary-first-subject (not all)) (while (and (if to-here (< (point) to-here) t) ! (gnus-summary-mark-article-as-read gnus-catchup-mark) (gnus-summary-search-subject nil (not all))))) (- unreads (length gnus-newsgroup-unreads)) (or to-here *************** *** 9702,9710 **** (save-excursion (while killing ;; Mark the article... ! (cond ((null unmark) (gnus-summary-mark-article nil gnus-killed-mark)) ! ((> unmark 0) (gnus-summary-tick-article nil t)) ! (t (gnus-summary-tick-article))) ;; ...and go forward until either the buffer ends or the subtree ;; ends. (if (not (and (zerop (forward-line 1)) --- 9759,9769 ---- (save-excursion (while killing ;; Mark the article... ! (cond ((null unmark) (gnus-summary-mark-article-as-read ! gnus-killed-mark)) ! ((> unmark 0) (gnus-summary-mark-article-as-unread ! gnus-unread-mark)) ! (t (gnus-summary-mark-article-as-unread gnus-ticked-mark))) ;; ...and go forward until either the buffer ends or the subtree ;; ends. (if (not (and (zerop (forward-line 1)) *************** *** 9739,9745 **** (lambda () (let ((extract (funcall gnus-extract-address-components ! (header-from (gnus-get-header-by-number (gnus-summary-article-number)))))) (or (car extract) (cdr extract)))) 'gnus-thread-sort-by-author) --- 9798,9804 ---- (lambda () (let ((extract (funcall gnus-extract-address-components ! (header-from (gnus-get-header-by-num (gnus-summary-article-number)))))) (or (car extract) (cdr extract)))) 'gnus-thread-sort-by-author) *************** *** 9766,9772 **** (lambda () (gnus-sortable-date (header-date ! (gnus-get-header-by-number (gnus-summary-article-number))))) 'gnus-thread-sort-by-date) reverse)) --- 9825,9831 ---- (lambda () (gnus-sortable-date (header-date ! (gnus-get-header-by-num (gnus-summary-article-number))))) 'gnus-thread-sort-by-date) reverse)) *************** *** 9831,9837 **** (interactive "P") (let ((articles (gnus-summary-work-articles n))) (while articles ! (let ((header (gnus-get-header-by-number (car articles)))) (if (vectorp header) (progn (gnus-summary-select-article t nil nil (car articles)) --- 9890,9896 ---- (interactive "P") (let ((articles (gnus-summary-work-articles n))) (while articles ! (let ((header (gnus-get-header-by-num (car articles)))) (if (vectorp header) (progn (gnus-summary-select-article t nil nil (car articles)) *************** *** 9959,9965 **** (save-restriction (widen) (gnus-output-to-rmail filename)))) ! ;; Remember the directory name to save articles. (setq gnus-newsgroup-last-rmail filename))) (defun gnus-summary-save-in-mail (&optional filename) --- 10018,10024 ---- (save-restriction (widen) (gnus-output-to-rmail filename)))) ! ;; Remember the directory name to save articles (setq gnus-newsgroup-last-rmail filename))) (defun gnus-summary-save-in-mail (&optional filename) *************** *** 10297,10303 **** () (save-excursion (set-buffer gnus-summary-buffer) ! (let ((header (gnus-get-header-by-number article))) (if (< article 0) (if (vectorp header) ;; It's a real article. --- 10356,10362 ---- () (save-excursion (set-buffer gnus-summary-buffer) ! (let ((header (gnus-get-header-by-num article))) (if (< article 0) (if (vectorp header) ;; It's a real article. *************** *** 10422,10428 **** gnus-newsgroup-history) gnus-current-article article gnus-current-headers ! (gnus-get-header-by-number gnus-current-article) gnus-article-current (cons gnus-newsgroup-name gnus-current-article)) (gnus-summary-show-thread) --- 10481,10487 ---- gnus-newsgroup-history) gnus-current-article article gnus-current-headers ! (gnus-get-header-by-num gnus-current-article) gnus-article-current (cons gnus-newsgroup-name gnus-current-article)) (gnus-summary-show-thread) *************** *** 12603,12609 **** group subscribed options-symbol newsrc Options-symbol symbol reads num1) (goto-char (point-min)) ! symbol `opt ;; We intern theions' in the active hashtb so that we ;; can `eq' against it later. (setq options-symbol (intern "options" gnus-active-hashtb)) (setq Options-symbol (intern "Options" gnus-active-hashtb)) --- 12662,12668 ---- group subscribed options-symbol newsrc Options-symbol symbol reads num1) (goto-char (point-min)) ! ;; We intern the symbol `options' in the active hashtb so that we ;; can `eq' against it later. (setq options-symbol (intern "options" gnus-active-hashtb)) (setq Options-symbol (intern "Options" gnus-active-hashtb)) *** pub/dgnus/lisp/nndoc.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/nndoc.el Fri Jul 21 23:40:29 1995 *************** *** 37,43 **** (concat "^" rmail-unix-mail-delimiter) (concat "^" rmail-unix-mail-delimiter) nil "^$" nil nil nil) ! (list 'babyl "\^_\^L *\n" "\^_" nil "^$" nil nil "\\*\\*\\* EOOH \\*\\*\\*\n\\(^.+\n\\)*") (list 'digest "^------------------------------*[\n \t]+" --- 37,43 ---- (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]+" *** pub/dgnus/lisp/nnmail.el Fri Jul 21 01:16:39 1995 --- dgnus/lisp/nnmail.el Fri Jul 21 23:23:06 1995 *************** *** 711,721 **** (t procmails)))) ! (defun nnmail-activate (backend) ! (if (not (symbol-value (intern (format "%s-group-alist" backend)))) (save-excursion (funcall (intern (format "%s-request-list" backend))) ! (set (intern (format "%s-group-alist" backend)) (nnmail-get-active))))) (provide 'nnmail) --- 711,726 ---- (t procmails)))) ! ;; Activate a backend only if it isn't already activated. ! ;; If FORCE, re-read the active file even if the backend is ! ;; already activated. ! (defun nnmail-activate (backend &optional force) ! (if (or (not (symbol-value (intern (format "%s-group-alist" backend)))) ! force) (save-excursion (funcall (intern (format "%s-request-list" backend))) ! (set (intern (format "%s-group-alist" backend)) (nnmail-get-active)))) ! t) (provide 'nnmail) *** pub/dgnus/lisp/nnml.el Fri Jul 21 01:16:40 1995 --- dgnus/lisp/nnml.el Fri Jul 21 23:23:05 1995 *************** *** 197,203 **** (> (nth 1 timestamp) (nth 1 nnml-active-timestamp))) (progn (setq nnml-active-timestamp timestamp) ! (nnmail-activate 'nnml))) (let ((active (nth 1 (assoc group nnml-group-alist)))) (save-excursion (set-buffer nntp-server-buffer) --- 197,203 ---- (> (nth 1 timestamp) (nth 1 nnml-active-timestamp))) (progn (setq nnml-active-timestamp timestamp) ! (nnmail-activate 'nnml 'force))) (let ((active (nth 1 (assoc group nnml-group-alist)))) (save-excursion (set-buffer nntp-server-buffer) *** pub/dgnus/lisp/nntp.el Fri Jul 21 01:16:40 1995 --- dgnus/lisp/nntp.el Fri Jul 21 23:23:04 1995 *************** *** 1204,1218 **** (if (string= group nntp-current-group) () (let ((asyncs (assoc group nntp-async-group-alist))) ! (if (not asyncs) ! () ! ;; A new group has been selected, so we push the current state ! ;; of async articles on an alist, and pull the old state off. ! (setq nntp-async-group-alist ! (cons (list group nntp-async-articles nntp-async-fetched) ! (delq asyncs nntp-async-group-alist))) ! (setq nntp-async-articles (nth 1 asyncs)) ! (setq nntp-async-fetched (nth 2 asyncs)))))) (provide 'nntp) --- 1204,1220 ---- (if (string= group nntp-current-group) () (let ((asyncs (assoc group nntp-async-group-alist))) ! ;; A new group has been selected, so we push the current state ! ;; of async articles on an alist, and pull the old state off. ! (setq nntp-async-group-alist ! (cons (list nntp-current-group ! nntp-async-articles nntp-async-fetched) ! (delq asyncs nntp-async-group-alist))) ! (setq nntp-current-group group) ! (or asyncs ! (progn ! (setq nntp-async-articles (nth 1 asyncs)) ! (setq nntp-async-fetched (nth 2 asyncs))))))) (provide 'nntp) *** pub/dgnus/lisp/ChangeLog Fri Jul 21 01:16:41 1995 --- dgnus/lisp/ChangeLog Sat Jul 22 02:42:10 1995 *************** *** 1,4 **** --- 1,37 ---- + Sat Jul 22 00:26:49 1995 Lars INGEBRIGTSEN UiO + + * gnus.el (gnus-summary-mark-unread-as-read): Don't mark already + marked articles. + (gnus-summary-edit-article): Widen before editing. + (gnus-summary-edit-article-done): Remove all text properties. + (gnus-summary-prepare-threads): Inline `gnus-summary-insert-line'. + (gnus-summary-mark-article-as-read): Faster, simpler function for + marking an article. + (gnus-summary-mark-same-subject): Faster implementation. + (gnus-summary-search-forward): Changed to macro. + (gnus-summary-search-backward): Ditto. + (gnus-summary-thread-level): Ditto. + (gnus-summary-article-number): Ditto. + (gnus-summary-article-mark): Ditto. + + * gnus-uu.el (gnus-uu-grab-articles): Disable async. + + Fri Jul 21 22:00:03 1995 Lars Magne Ingebrigtsen + + * nndoc.el (nndoc-type-to-regexp): Use the new default to avoud + the 1,, line in babyl files. + + * nnml.el (nnml-request-group): Force re-reading of the active + file if the file is new. + + * gnus-vis.el (gnus-article-add-buttons): Turn off the header + buttonizing again. + + * nntp.el (nntp-async-request-group): Really save async state. + Thu Jul 20 00:02:30 1995 Lars Magne Ingebrigtsen + + * gnus.el: 0.98 is released. * gnus-vis.el (gnus-article-add-buttons): Buttonize the headers.