aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog44
-rw-r--r--lisp/gnus/compface.el40
-rw-r--r--lisp/gnus/gnus-util.el11
-rw-r--r--lisp/gnus/gnus.el9
-rw-r--r--lisp/gnus/mm-extern.el2
-rw-r--r--lisp/gnus/nnheader.el20
-rw-r--r--lisp/gnus/nnweb.el11
7 files changed, 106 insertions, 31 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index beccd918c3e..6927e3bfbac 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,47 @@
12006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
2
3 [ Backported bug fix from No Gnus. ]
4
5 * gnus.el (gnus-find-method-for-group): On killed/unknown groups, try
6 looking up the method using GROUP's prefix before inventing a new one.
7 It is used on killed/unknown groups in various places where returning
8 an all-new method isn't expected by the caller.
9
10 * gnus-util.el (gnus-group-server): Copy required macro from No Gnus.
11
122006-08-13 Romain Francoise <romain@orebokech.com>
13
14 * mm-extern.el (mm-extern-mail-server): End `y-or-n-p' prompt with a
15 space.
16
172006-08-09 Katsumi Yamaoka <yamaoka@jpl.org>
18
19 * compface.el (uncompface): Use binary rather than raw-text-unix.
20
212006-08-09 Katsumi Yamaoka <yamaoka@jpl.org>
22
23 * compface.el (uncompface): Make sure the eol conversion doesn't take
24 place when communicating with the external programs. Reported by
25 ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
26
272006-07-31 Katsumi Yamaoka <yamaoka@jpl.org>
28
29 * nnheader.el (nnheader-insert-head): Fix typo in comment.
30
312006-07-31 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
32
33 * nnweb.el (nnweb-google-parse-1): Update regexp for author and date.
34 Make it more robust by parsing author and date independently.
35
362006-07-28 Katsumi Yamaoka <yamaoka@jpl.org>
37
38 * nnheader.el (nnheader-insert-head): Make it work with Mac as well.
39
402006-07-27 Katsumi Yamaoka <yamaoka@jpl.org>
41
42 * nnheader.el (nnheader-insert-head): Make it work even if the file
43 uses CRLF for the line-break code.
44
12006-07-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> 452006-07-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
2 46
3 * mm-url.el (mm-url-insert-file-contents): Inhibit Connection: close 47 * mm-url.el (mm-url-insert-file-contents): Inhibit Connection: close
diff --git a/lisp/gnus/compface.el b/lisp/gnus/compface.el
index f6bd9bfd720..33e05046e84 100644
--- a/lisp/gnus/compface.el
+++ b/lisp/gnus/compface.el
@@ -34,24 +34,28 @@ GNU/Linux system these might be in packages with names like `compface'
34or `faces-xface' and `netpbm' or `libgr-progs', for instance." 34or `faces-xface' and `netpbm' or `libgr-progs', for instance."
35 (with-temp-buffer 35 (with-temp-buffer
36 (insert face) 36 (insert face)
37 (and (eq 0 (apply 'call-process-region (point-min) (point-max) 37 (let ((coding-system-for-read 'raw-text)
38 "uncompface" 38 ;; At least "icontopbm" doesn't work with Windows because
39 'delete '(t nil) nil)) 39 ;; the line-break code is converted into CRLF by default.
40 (progn 40 (coding-system-for-write 'binary))
41 (goto-char (point-min)) 41 (and (eq 0 (apply 'call-process-region (point-min) (point-max)
42 (insert "/* Width=48, Height=48 */\n") 42 "uncompface"
43 ;; I just can't get "icontopbm" to work correctly on its 43 'delete '(t nil) nil))
44 ;; own in XEmacs. And Emacs doesn't understand un-raw pbm 44 (progn
45 ;; files. 45 (goto-char (point-min))
46 (if (not (featurep 'xemacs)) 46 (insert "/* Width=48, Height=48 */\n")
47 (eq 0 (call-process-region (point-min) (point-max) 47 ;; I just can't get "icontopbm" to work correctly on its
48 "icontopbm" 48 ;; own in XEmacs. And Emacs doesn't understand un-raw pbm
49 'delete '(t nil))) 49 ;; files.
50 (shell-command-on-region (point-min) (point-max) 50 (if (not (featurep 'xemacs))
51 "icontopbm | pnmnoraw" 51 (eq 0 (call-process-region (point-min) (point-max)
52 (current-buffer) t) 52 "icontopbm"
53 t)) 53 'delete '(t nil)))
54 (buffer-string)))) 54 (shell-command-on-region (point-min) (point-max)
55 "icontopbm | pnmnoraw"
56 (current-buffer) t)
57 t))
58 (buffer-string)))))
55 59
56(provide 'compface) 60(provide 'compface)
57 61
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 6b525fc490c..6f706fabce5 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -607,6 +607,17 @@ If N, return the Nth ancestor instead."
607 (substring gname (match-end 0)) 607 (substring gname (match-end 0))
608 gname))) 608 gname)))
609 609
610(defmacro gnus-group-server (group)
611 "Find the server name of a foreign newsgroup.
612For example, (gnus-group-server \"nnimap+yxa:INBOX.foo\") would
613yield \"nnimap:yxa\"."
614 `(let ((gname ,group))
615 (if (string-match "^\\([^:+]+\\)\\(?:\\+\\([^:]*\\)\\)?:" gname)
616 (format "%s:%s" (match-string 1 gname) (or
617 (match-string 2 gname)
618 ""))
619 (format "%s:%s" (car gnus-select-method) (cadr gnus-select-method)))))
620
610(defun gnus-make-sort-function (funs) 621(defun gnus-make-sort-function (funs)
611 "Return a composite sort condition based on the functions in FUNS." 622 "Return a composite sort condition based on the functions in FUNS."
612 (cond 623 (cond
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 7a04c61151a..8554b1332f1 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -4079,8 +4079,13 @@ If NEWSGROUP is nil, return the global kill file name instead."
4079 (or gnus-override-method 4079 (or gnus-override-method
4080 (and (not group) 4080 (and (not group)
4081 gnus-select-method) 4081 gnus-select-method)
4082 (and (not (gnus-group-entry group)) ;; a new group 4082 (and (not (gnus-group-entry group))
4083 (gnus-group-name-to-method group)) 4083 ;; Killed or otherwise unknown group.
4084 (or
4085 ;; If we know a virtual server by that name, return its method.
4086 (gnus-server-to-method (gnus-group-server group))
4087 ;; Guess a new method as last resort.
4088 (gnus-group-name-to-method group)))
4084 (let ((info (or info (gnus-get-info group))) 4089 (let ((info (or info (gnus-get-info group)))
4085 method) 4090 method)
4086 (if (or (not info) 4091 (if (or (not info)
diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el
index c574bd6156e..f4c728541e9 100644
--- a/lisp/gnus/mm-extern.el
+++ b/lisp/gnus/mm-extern.el
@@ -97,7 +97,7 @@
97 (subject (or (cdr (assq 'subject params)) "none")) 97 (subject (or (cdr (assq 'subject params)) "none"))
98 (buf (current-buffer)) 98 (buf (current-buffer))
99 info) 99 info)
100 (if (y-or-n-p (format "Send a request message to %s?" server)) 100 (if (y-or-n-p (format "Send a request message to %s? " server))
101 (save-window-excursion 101 (save-window-excursion
102 (message-mail server subject) 102 (message-mail server subject)
103 (message-goto-body) 103 (message-goto-body)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index d564d42414e..82e1d3ab554 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -586,17 +586,27 @@ the line could be found."
586 (if (eq nnheader-max-head-length t) 586 (if (eq nnheader-max-head-length t)
587 ;; Just read the entire file. 587 ;; Just read the entire file.
588 (nnheader-insert-file-contents file) 588 (nnheader-insert-file-contents file)
589 ;; Read 1K blocks until we find a separator. 589 ;; Read blocks of the size specified by `nnheader-head-chop-length'
590 ;; until we find a separator.
590 (let ((beg 0) 591 (let ((beg 0)
591 format-alist) 592 (start (point))
593 ;; Use `binary' to prevent the contents from being decoded,
594 ;; or it will change the number of characters that
595 ;; `insert-file-contents' returns.
596 (coding-system-for-read 'binary))
592 (while (and (eq nnheader-head-chop-length 597 (while (and (eq nnheader-head-chop-length
593 (nth 1 (nnheader-insert-file-contents 598 (nth 1 (mm-insert-file-contents
594 file nil beg 599 file nil beg
595 (incf beg nnheader-head-chop-length)))) 600 (incf beg nnheader-head-chop-length))))
596 (prog1 (not (search-forward "\n\n" nil t)) 601 ;; CRLF or CR might be used for the line-break code.
602 (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t))
597 (goto-char (point-max))) 603 (goto-char (point-max)))
598 (or (null nnheader-max-head-length) 604 (or (null nnheader-max-head-length)
599 (< beg nnheader-max-head-length)))))) 605 (< beg nnheader-max-head-length))))
606 ;; Finally decode the contents.
607 (when (mm-coding-system-p nnheader-file-coding-system)
608 (mm-decode-coding-region start (point-max)
609 nnheader-file-coding-system))))
600 t)) 610 t))
601 611
602(defun nnheader-article-p () 612(defun nnheader-article-p ()
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index 7c0c8e0e444..d020d533aea 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -366,14 +366,15 @@ Valid types include `google', `dejanews', and `gmane'.")
366 (mm-url-decode-entities) 366 (mm-url-decode-entities)
367 (search-backward " - ") 367 (search-backward " - ")
368 (when (looking-at 368 (when (looking-at
369 " - \\([a-zA-Z]+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?[^\n]+by ?\n?\\([^<\n]+\\)\n") 369 "\\W+\\(\\w+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?")
370 (setq From (match-string 4) 370 (setq Date (format "%s %s 00:00:00 %s"
371 Date (format "%s %s 00:00:00 %s"
372 (match-string 1) 371 (match-string 1)
373 (match-string 2) 372 (match-string 2)
374 (or (match-string 3) 373 (or (match-string 3)
375 (substring (current-time-string) -4))))) 374 (substring (current-time-string) -4))))
376 375 (goto-char (match-end 0)))
376 (when (looking-at "[^b]+by\\W+\\([^<\n]+\\)")
377 (setq From (match-string 1)))
377 (widen) 378 (widen)
378 (forward-line 1) 379 (forward-line 1)
379 (incf i) 380 (incf i)