From 150bebacb9e691850c6a2825319cbf64799cd241 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 4 Mar 1997 02:14:32 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 41 +++++++++++++++++++++++++++++++++++++++++ lisp/gnus-cache.el | 2 +- lisp/gnus-cite.el | 6 +++--- lisp/gnus-ems.el | 9 ++++++--- lisp/gnus-score.el | 7 +++++-- lisp/gnus-uu.el | 27 ++++++++++++++++----------- lisp/gnus-vis.el | 15 ++++++++++----- lisp/gnus.el | 21 +++++++++++++++------ lisp/nnbabyl.el | 19 +++++++------------ lisp/nnheader.el | 9 +++++++++ lisp/nnmail.el | 2 +- lisp/nnmh.el | 15 ++++++++++----- lisp/nnml.el | 2 +- lisp/nnspool.el | 2 +- 14 files changed, 126 insertions(+), 51 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d111a9640..cc1f98373 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,46 @@ +Sun May 21 00:11:00 1995 Lars Magne Ingebrigtsen + + * gnus-cache.el (gnus-cache-retrieve-headers): Don't bug out on + changed source groups. + + * gnus.el (gnus-matches-options-n): Did not find matching options. + (gnus-configure-windows): Signal error with missing point. + (gnus-narrow-to-headers): Don't bug out on malformed mail. + + * gnus-uu.el: Made prompts more explicit. + + * gnus.el (gnus-article-prepare): Show thread before doing visual + marks. + (gnus-summary-scroll-up): Would recenter oddly. + +Sat May 20 23:37:42 1995 Lars Magne Ingebrigtsen + + * gnus-score.el (gnus-score-headers): gnus-current-score-file + would be nil. + + * gnus-cite.el (gnus-supercite-regexp): New value. + +Sat May 20 04:56:14 1995 Lars Ingebrigtsen + + * nnbabyl.el (nnbabyl-retrieve-headers): Faster routine. + + * nnheader.el (nnheader-insert-head): New function to speed up + HEADer reading. + + * nnspool.el (nnspool-retrieve-headers): Use it. + * nnmh.el (nnmh-retrieve-headers): Ditto. + * nnml.el (nnml-retrieve-headers): Ditto. + + * nnmh.el (nnmh-be-safe): New variable and serious speedup. + +Sat May 20 17:11:50 1995 Lars Ingebrigtsen + + * gnus.el: 0.74 is released. + Sat May 20 00:11:59 1995 Lars Ingebrigtsen + * gnus.el: 0.73 is released. + * gnus-msg.el (gnus-mail-reply-using-mail): Don't barf wifout a message-id. diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 5a98a264c..74ad8de97 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -194,7 +194,7 @@ (cache-file (gnus-cache-file-name group ".overview")) type) (let ((gnus-use-cache nil)) - (setq type (gnus-retrieve-headers articles group))) + (setq type (and articles (gnus-retrieve-headers articles group)))) (gnus-cache-save-buffers) (save-excursion (cond ((not (file-exists-p cache-file)) diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index daf454452..2edac242c 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -33,7 +33,8 @@ ;;; Customization: -(defvar gnus-cite-prefix-regexp "^[^\n]*[]>|:}+]" +(defvar gnus-cite-prefix-regexp + "^[]>|:}+ ]*[]>|:}+]\\(.*>\\)?\\|^.*>" "Regexp matching the longest possible citation prefix on a line.") (defvar gnus-cite-max-prefix 20 @@ -43,8 +44,7 @@ (concat "^\\(" gnus-cite-prefix-regexp "\\)? *" ">>>>> +\"\\([^\"\n]+\\)\" +==") "Regexp matching normal SuperCite attribution lines. -The first regexp group should match a prefix added by another package. -The second regexp group should match the SuperCite attribution itself.") +The first regexp group should match a prefix added by another package.") (defvar gnus-supercite-secondary-regexp "^.*\"\\([^\"\n]+\\)\" +==" "Regexp matching mangled SuperCite attribution lines. diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 9501aedfc..cd8696e6c 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -48,9 +48,12 @@ (put-text-property start end (car props) (cadr props) buffer) (remove-text-properties start end ())))) - (or (fboundp 'make-overlay (fset 'make-overlay 'make-extent))) - (or (fboundp 'over-lay-put (fset 'overlay-put 'set-extent-property))) - (or (boundp 'standard-display-table (setq standard-display-table nil))) + (or (fboundp 'make-overlay) (fset 'make-overlay 'make-extent)) + (or (fboundp 'overlay-put) (fset 'overlay-put 'set-extent-property)) + (or (fboundp 'move-overlay) + (defun move-overlay (extent start end &optional buffer) + (set-extent-endpoints extent start end))) + (or (boundp 'standard-display-table) (setq standard-display-table nil)) (if (not gnus-visual) () diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 8870ec248..588dc63d1 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -686,7 +686,7 @@ SCORE is the score to add." (now (gnus-day-number (current-time-string))) (expire (- now gnus-score-expiry-days)) (headers gnus-newsgroup-headers) - (gnus-current-score-file gnus-current-score-file) + (current-score-file gnus-current-score-file) entry header) (gnus-message 5 "Scoring...") ;; Create articles, an alist of the form `(HEADER . SCORE)'. @@ -704,6 +704,9 @@ SCORE is the score to add." (save-excursion (set-buffer (get-buffer-create "*Headers*")) (buffer-disable-undo (current-buffer)) + + ;; Set the global variant of this variable. + (setq gnus-current-score-file current-score-file) ;; score orphans (if gnus-orphan-score (progn @@ -997,7 +1000,7 @@ SCORE is the score to add." -(defun gnus-score-followup (scores header now expire) +(defun gnus-score-followup (scores header now expire &optional trace) ;; Insert the unique article headers in the buffer. (let ((gnus-score-index (nth 1 (assoc header gnus-header-index))) (current-score-file gnus-current-score-file) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index c88d1a0a0..f2660fd81 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -323,7 +323,7 @@ The headers will be included in the sequence they are matched.") "Decodes and saves the resulting file." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " + (read-file-name "Uudecode and save in dir: " gnus-uu-default-dir gnus-uu-default-dir t))) (gnus-uu-decode-with-method 'gnus-uu-uustrip-article n dir)) @@ -337,7 +337,7 @@ The headers will be included in the sequence they are matched.") "Unshars and saves the current article." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " + (read-file-name "Unshar and save in dir: " gnus-uu-default-dir gnus-uu-default-dir t))) (gnus-uu-decode-with-method 'gnus-uu-unshar-article n dir)) @@ -346,9 +346,12 @@ The headers will be included in the sequence they are matched.") "Saves the current article." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file? " - gnus-uu-default-dir - gnus-uu-default-dir))) + (read-file-name + (if gnus-uu-save-separate-articles + "Save articles is dir: " + "Save articles in file: ") + gnus-uu-default-dir + gnus-uu-default-dir))) (setq gnus-uu-saved-article-name file) (gnus-uu-decode-with-method 'gnus-uu-save-article n nil t) (setq gnus-uu-generated-file-list @@ -358,7 +361,7 @@ The headers will be included in the sequence they are matched.") "Unbinhexes the current article." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " + (read-file-name "Unbinhex and save in dir: " gnus-uu-default-dir gnus-uu-default-dir t))) (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir)) @@ -373,7 +376,7 @@ The headers will be included in the sequence they are matched.") "Decodes, views and saves the resulting file." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " + (read-file-name "Uudecode, view and save in dir: " gnus-uu-default-dir gnus-uu-default-dir t))) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) @@ -389,7 +392,7 @@ The headers will be included in the sequence they are matched.") "Unshars and saves the current article." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " + (read-file-name "Unshar, view and save in dir: " gnus-uu-default-dir gnus-uu-default-dir t))) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) @@ -399,8 +402,10 @@ The headers will be included in the sequence they are matched.") "Saves and views the current article." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file? " - gnus-uu-default-dir gnus-uu-default-dir))) + (read-file-name (if gnus-uu-save-separate-articles + "Save articles is dir: " + "Save articles in file: ") + gnus-uu-default-dir gnus-uu-default-dir))) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-save n file))) @@ -408,7 +413,7 @@ The headers will be included in the sequence they are matched.") "Unbinhexes and views the current article." (interactive (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " + (read-file-name "Unbinhex, view and save in dir: " gnus-uu-default-dir gnus-uu-default-dir))) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-binhex n file))) diff --git a/lisp/gnus-vis.el b/lisp/gnus-vis.el index 7730b4e86..99c65c999 100644 --- a/lisp/gnus-vis.el +++ b/lisp/gnus-vis.el @@ -487,11 +487,16 @@ highlight-headers-follow-url-netscape: ;; Fix by Mike Dugan . (from (if (get-text-property beg 'mouse-face) beg - (next-single-property-change - beg 'mouse-face nil end))) - (to (next-single-property-change - from 'mouse-face nil end))) - (if (< to beg) + (1+ (or (next-single-property-change + beg 'mouse-face nil end) + end)))) + (to (1- (or (next-single-property-change + from 'mouse-face nil end) + end)))) + ;; If no mouse-face prop on line (e.g. xemacs) we + ;; will have to = from = end, so we highlight the + ;; entire line instead. + (if (= to from) (progn (setq from beg) (setq to end))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 61bc8fd6f..3bcac6914 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -489,7 +489,8 @@ slower.") If this variable is nil, scoring will be disabled.") (defvar gnus-group-default-list-level gnus-level-subscribed - "*Default listing level.") + "*Default listing level. +Ignored if `gnus-group-use-permanent-levels' is nil.") (defvar gnus-group-use-permanent-levels nil "*If non-nil, once you set a level, Gnus will use this level.") @@ -1212,7 +1213,7 @@ variable (string, integer, character, etc).") (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)" "The mail address of the Gnus maintainer.") -(defconst gnus-version "(ding) Gnus v0.74" +(defconst gnus-version "(ding) Gnus v0.75" "Version number for this version of Gnus.") (defvar gnus-info-nodes @@ -1678,9 +1679,11 @@ Thank you for your help in stamping out bugs. (defun gnus-narrow-to-headers () (widen) (save-excursion - (goto-char (point-min)) - (if (search-forward "\n\n") - (narrow-to-region 1 (1- (point)))))) + (narrow-to-region + (goto-char (point-min)) + (if (search-forward "\n\n" nil t) + (1- (point)) + (point-max))))) (defun gnus-update-format-specifications () (gnus-make-thread-indent-array) @@ -2316,6 +2319,8 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only." (setq rule (cdr rule))) ;; Finally, we pop to the buffer that's supposed to have point. + (or jump-buffer (error "Missing `point' in spec for %s" setting)) + (pop-to-buffer jump-buffer) jump-buffer)) @@ -7338,6 +7343,7 @@ current article." (gnus-eval-in-buffer-window gnus-article-buffer (setq endp (gnus-article-next-page lines))) + (gnus-summary-recenter) (if endp (cond (circular (gnus-summary-beginning-of-article)) @@ -7359,6 +7365,7 @@ Argument LINES specifies lines to be scrolled down." ;; Selected subject is different from current article's. (gnus-summary-display-article article) (gnus-configure-windows 'article) + (gnus-summary-recenter) (gnus-eval-in-buffer-window gnus-article-buffer (gnus-article-prev-page lines)))) (gnus-summary-position-cursor)) @@ -7376,6 +7383,7 @@ Argument LINES specifies lines to be scrolled up (or down if negative)." (gnus-message 3 "End of message"))) ((< lines 0) (gnus-article-prev-page (- lines)))))) + (gnus-summary-recenter) (gnus-summary-position-cursor)) (defun gnus-summary-next-same-subject () @@ -9676,6 +9684,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (gnus-get-header-by-number gnus-current-article) gnus-article-current (cons gnus-newsgroup-name gnus-current-article)) + (gnus-summary-show-thread) (run-hooks 'gnus-mark-article-hook) (gnus-set-mode-line 'summary) (and gnus-visual @@ -10975,7 +10984,7 @@ The `-n' option line from .newsrc is respected." (t (let ((regs gnus-newsrc-options-n)) (while (and regs - (not (string-match (car (car gnus-newsrc-options-n)) group))) + (not (string-match (car (car regs)) group))) (setq regs (cdr regs))) (and regs (cdr (car regs))))))) diff --git a/lisp/nnbabyl.el b/lisp/nnbabyl.el index 2dbc0e052..4a6c2dcdb 100644 --- a/lisp/nnbabyl.el +++ b/lisp/nnbabyl.el @@ -80,28 +80,23 @@ (let ((file nil) (number (length sequence)) (count 0) - beg article art-string start stop) + article art-string start stop) (nnbabyl-possibly-change-newsgroup newsgroup) (while sequence (setq article (car sequence)) (setq art-string (nnbabyl-article-string article)) (set-buffer nnbabyl-mbox-buffer) (if (or (search-forward art-string nil t) - (progn (goto-char (point-min)) - (search-forward art-string nil t))) + (search-backward art-string nil t)) (progn - (setq start - (save-excursion - (re-search-backward - (concat "^" nnbabyl-mail-delimiter) nil t) - (while (and (not (looking-at ".+:")) - (zerop (forward-line 1)))) - (point))) + (re-search-backward (concat "^" nnbabyl-mail-delimiter) nil t) + (while (and (not (looking-at ".+:")) + (zerop (forward-line 1)))) + (setq start (point)) (search-forward "\n\n" nil t) (setq stop (1- (point))) (set-buffer nntp-server-buffer) - (insert (format "221 %d Article retrieved.\n" article)) - (setq beg (point)) + (insert "221 " (int-to-string article) " Article retrieved.\n") (insert-buffer-substring nnbabyl-mbox-buffer start stop) (goto-char (point-max)) (insert ".\n"))) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 39b611ba8..340b11535 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -181,6 +181,15 @@ (set (car (car state)) (nth 1 (car state))) (setq state (cdr state)))) +;; Read the head of an article. +(defun nnheader-insert-head (file) + (let ((beg 0) + found) + (while (and (eq 1024 (nth 1 (insert-file-contents + file nil beg (setq beg (+ 1024 beg))))) + (search-backward "\n\n" nil t))))) + + (provide 'nnheader) ;;; nnheader.el ends here diff --git a/lisp/nnmail.el b/lisp/nnmail.el index a2696e4c5..ad816557f 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -655,7 +655,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (cons nnmail-spool-file procmails)) (t procmails)))) - + (provide 'nnmail) ;;; nnml.el ends here diff --git a/lisp/nnmh.el b/lisp/nnmh.el index 648915c7a..13b07bb60 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -35,13 +35,16 @@ (require 'gnus) (defvar nnmh-directory "~/Mail/" - "Mail directory.") + "*Mail spool directory.") (defvar nnmh-get-new-mail t - "If non-nil, nnmh will check the incoming mail file and split the mail.") + "*If non-nil, nnmh will check the incoming mail file and split the mail.") (defvar nnmh-prepare-save-mail-hook nil - "Hook run narrowed to an article before saving.") + "*Hook run narrowed to an article before saving.") + +(defvar nnmh-be-safe nil + "*If non-nil, nnmh will check all articles to make sure whether they are new or not.") @@ -88,7 +91,7 @@ (progn (insert (format "221 %d Article retrieved.\n" article)) (setq beg (point)) - (insert-file-contents file) + (nnheader-insert-head file) (goto-char beg) (if (search-forward "\n\n" nil t) (forward-char -1) @@ -162,7 +165,9 @@ (if (file-directory-p pathname) (progn (setq nnmh-current-directory pathname) - (and nnmh-get-new-mail (nnmh-update-gnus-unreads group)) + (and nnmh-get-new-mail + nnmh-be-safe + (nnmh-update-gnus-unreads group)) (or dont-check (progn (setq dir diff --git a/lisp/nnml.el b/lisp/nnml.el index 5e0924d38..dc4e8e80c 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -113,7 +113,7 @@ all. This may very well take some time.") (progn (insert (format "221 %d Article retrieved.\n" article)) (setq beg (point)) - (insert-file-contents file) + (nnheader-insert-head file) (goto-char beg) (if (search-forward "\n\n" nil t) (forward-char -1) diff --git a/lisp/nnspool.el b/lisp/nnspool.el index bab17e69b..6f354440d 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -137,7 +137,7 @@ Newsgroup must be selected before calling this function." (progn (insert (format "221 %d Article retrieved.\n" article)) (setq beg (point)) - (insert-file-contents file) + (nnheader-insert-head file) (goto-char beg) (search-forward "\n\n" nil t) (forward-char -1) -- 2.34.1