Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

*** empty log message ***

  • Loading branch information...
commit d2a955971ef725612f5ee9b76f2820070f1c0f60 1 parent 676c4fb
Lars Ingebrigtsen authored March 04, 1997
82  lisp/ChangeLog
... ...
@@ -1,5 +1,87 @@
  1
+Sun May 12 01:29:12 1996  Lars Magne Ingebrigtsen  <larsi@ylfing.ifi.uio.no (Lars Magne Ingebrigtsen)>
  2
+
  3
+	* gnus-xmas.el (gnus-xmas-summary-recenter): Protect against evil.
  4
+
  5
+Sat May 11 23:23:15 1996  Michael Sperber  <sperber@informatik.uni-tuebingen.de>
  6
+
  7
+	* gnus-xmas.el (gnus-xmas-summary-recenter): Would act oddly.
  8
+
  9
+Fri May 10 22:49:46 1996  Lars Magne Ingebrigtsen  <larsi@hler.ifi.uio.no>
  10
+
  11
+	* nnheader.el (nnheader-parse-head): Deal with naked heads.
  12
+
  13
+	* nnml.el (nnml-parse-head): `naked' heads.
  14
+
  15
+Fri May 10 00:27:59 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
  16
+
  17
+	* gnus.el (gnus-group-mark-group): Didn't work well in topic
  18
+	buffers. 
  19
+	(gnus-read-active-file-p): New function.
  20
+	(gnus-group-list-killed): Read active file.
  21
+	(gnus-group-list-active): Ditto.
  22
+	(gnus-group-list-matching): Possibly read active file.
  23
+	(gnus-get-killed-groups): Separated into own function.
  24
+	(gnus-update-group-mark-positions): Don't define "dummy.group".
  25
+
  26
+	* gnus-topic.el (gnus-topic-rename): Use topic under point.
  27
+	(gnus-topic-create-topic): Don't prompt for parent topic.
  28
+	(gnus-topic-create-topic): Go to the new topic.
  29
+
  30
+	* gnus.el (gnus-mime-decode-quoted-printable): Preserve text
  31
+	props. 
  32
+	(gnus-article-date-ut): Would bug out on read-only.
  33
+
  34
+Thu May  9 11:12:30 1996  Steven L Baur  <steve@miranova.com>
  35
+
  36
+	* message.el (message-followup): Correct typos in regular expression
  37
+	matching ``Re:''.
  38
+
  39
+Thu May  9 20:38:10 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
  40
+
  41
+	* gnus-uu.el (gnus-uu-delete-work-dir): Don't message so much.
  42
+
  43
+Wed May  8 03:20:23 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
  44
+
  45
+	* nnmail.el (nnmail-process-unix-mail-format): Didn't nix out
  46
+	bogus Message-ID headers properly.
  47
+
  48
+	* nnml.el (nnml-parse-head): Use nnheader functions for parsing
  49
+	and generating nov headers.
  50
+
  51
+Wed May  8 22:55:56 1996  Lars Magne Ingebrigtsen  <larsi@aegir.ifi.uio.no>
  52
+
  53
+	* gnus.el (gnus-execute-command): Make sure the buffer isn't
  54
+	read-onl|y. 
  55
+	(gnus-article-prepare): Would perform hooks on pseudo articles.
  56
+
  57
+	* gnus-uu.el (gnus-uu-mark-sparse): Would bug out on pseudos.
  58
+	(gnus-uu-mark-all): Ditto.
  59
+
  60
+	* gnus.el (gnus-request-article-this-buffer): Ignore canceled
  61
+	articles. 
  62
+	(gnus-summary-next-page): Pass by canceled articles.
  63
+
  64
+	* message.el (message-check-element): Reverse logic.
  65
+
  66
+Wed May  8 22:36:18 1996  Lars Magne Ingebrigtsen  <larsi@ylfing.ifi.uio.no>
  67
+
  68
+	* gnus.el (gnus-tree-buffer): Moved from gnus-salt.el.
  69
+
  70
+Wed May  8 23:45:46 1996  Lars Magne Ingebrigtsen  <larsi@eistla.ifi.uio.no>
  71
+
  72
+	* gnus.el (gnus-no-server): New definition.
  73
+	(gnus-group-default-level): Use permanent levels.
  74
+
  75
+Wed May  8 21:35:35 1996  Lars Magne Ingebrigtsen  <larsi@ylfing.ifi.uio.no>
  76
+
  77
+	* gnus.el (gnus-summary-select-article): 
  78
+
1 79
 Tue May  7 21:49:30 1996  Lars Magne Ingebrigtsen  <larsi@ylfing.ifi.uio.no>
2 80
 
  81
+	* gnus.el: 0.83 is released.
  82
+
  83
+	* gnus.el: September Gnus v0.83 is released.
  84
+
3 85
 	* gnus.el (gnus-summary-insert-subject): Would change article
4 86
 	number. 
5 87
 	(gnus-summary-display-article): Go to the right article when
3  lisp/gnus-salt.el
@@ -214,9 +214,6 @@ Two predefined functions are available:
214 214
 (defvar gnus-tree-mode-hook nil
215 215
   "*Hook run in tree mode buffers.")
216 216
 
217  
-(defvar gnus-tree-buffer "*Tree*"
218  
-  "Buffer where Gnus thread trees are displayed.")
219  
-
220 217
 ;;; Internal variables.
221 218
 
222 219
 (defvar gnus-tree-line-format-alist 
26  lisp/gnus-topic.el
@@ -499,17 +499,11 @@ articles in the topic and its subtopics."
499 499
        parent (- old-unread (gnus-group-topic-unread))))
500 500
     unread))
501 501
 
502  
-(defun gnus-topic-grok-active (&optional force read-active)
  502
+(defun gnus-topic-grok-active (&optional force)
503 503
   "Parse all active groups and create topic structures for them."
504 504
   ;; First we make sure that we have really read the active file. 
505 505
   (when (or force
506 506
 	    (not gnus-topic-active-alist))
507  
-    (when (and read-active
508  
-	       (or force
509  
-		   (not (member gnus-select-method 
510  
-				gnus-have-read-active-file))))
511  
-      (let ((gnus-read-active-file t))
512  
-	(gnus-read-active-file)))
513 507
     (let (groups)
514 508
       ;; Get a list of all groups available.
515 509
       (mapatoms (lambda (g) (when (symbol-value g)
@@ -702,8 +696,7 @@ group."
702 696
   (interactive 
703 697
    (list
704 698
     (read-string "Create topic: ")
705  
-    (completing-read "Parent topic: " gnus-topic-alist nil t
706  
-		     (cons (gnus-group-parent-topic) 0))))
  699
+    (gnus-group-parent-topic)))
707 700
   ;; Check whether this topic already exists.
708 701
   (when (gnus-topic-find-topology topic)
709 702
     (error "Topic aleady exists"))
@@ -723,7 +716,8 @@ group."
723 716
     (unless (assoc topic gnus-topic-alist)
724 717
       (push (list topic) gnus-topic-alist)))
725 718
   (gnus-topic-enter-dribble)
726  
-  (gnus-group-list-groups))
  719
+  (gnus-group-list-groups)
  720
+  (gnus-topic-goto-topic topic))
727 721
 
728 722
 (defun gnus-topic-move-group (n topic &optional copyp)
729 723
   "Move the current group to a topic."
@@ -971,11 +965,9 @@ group."
971 965
 (defun gnus-topic-rename (old-name new-name)
972 966
   "Rename a topic."
973 967
   (interactive
974  
-   (let (topic)
975  
-     (list
976  
-      (setq topic (completing-read "Rename topic: " gnus-topic-alist nil t
977  
-				   (cons (gnus-group-parent-topic) 0)))
978  
-      (read-string (format "Rename %s to: " topic)))))
  968
+   (let ((topic (gnus-group-parent-topic)))
  969
+     (list topic
  970
+	   (read-string (format "Rename %s to: " topic)))))
979 971
   (let ((top (gnus-topic-find-topology old-name))
980 972
 	(entry (assoc old-name gnus-topic-alist)))
981 973
     (when top
@@ -1022,7 +1014,9 @@ If UNINDENT, remove an indentation."
1022 1014
   "List all groups that Gnus knows about in a topicsified fashion.
1023 1015
 If FORCE, always re-read the active file."
1024 1016
   (interactive "P")
1025  
-  (gnus-topic-grok-active force force)
  1017
+  (when force
  1018
+    (gnus-get-killed-groups))
  1019
+  (gnus-topic-grok-active force)
1026 1020
   (let ((gnus-topic-topology gnus-topic-active-topology)
1027 1021
 	(gnus-topic-alist gnus-topic-active-alist)
1028 1022
 	gnus-killed-list gnus-zombie-list)
12  lisp/gnus-uu.el
@@ -586,7 +586,8 @@ The headers will be included in the sequence they are matched.")
586 586
     (setq gnus-newsgroup-processable nil)
587 587
     (save-excursion
588 588
       (while marked
589  
-	(and (setq headers (gnus-summary-article-header (car marked)))
  589
+	(and (vectorp (setq headers 
  590
+			    (gnus-summary-article-header (car marked))))
590 591
 	     (setq subject (mail-header-subject headers)
591 592
 		   articles (gnus-uu-find-articles-matching 
592 593
 			     (gnus-uu-reginize-string subject))
@@ -608,8 +609,9 @@ The headers will be included in the sequence they are matched.")
608 609
     (let ((data gnus-newsgroup-data)
609 610
 	  number)
610 611
       (while data
611  
-	(unless (memq (setq number (gnus-data-number (car data)))
612  
-		      gnus-newsgroup-processable)
  612
+	(when (and (not (memq (setq number (gnus-data-number (car data)))
  613
+			      gnus-newsgroup-processable))
  614
+		   (vectorp (gnus-data-header (car data))))
613 615
 	  (gnus-summary-goto-subject number)
614 616
 	  (gnus-uu-mark-series))
615 617
 	(setq data (cdr data)))))
@@ -1611,9 +1613,9 @@ The headers will be included in the sequence they are matched.")
1611 1613
 
1612 1614
 (defun gnus-uu-delete-work-dir (&optional dir)
1613 1615
   "Delete recursively all files and directories under `gnus-uu-work-dir'."
1614  
-  (unless dir
  1616
+  (if dir
  1617
+      (gnus-message 7 "Deleting directory %s..." dir)
1615 1618
     (setq dir gnus-uu-work-dir))
1616  
-  (gnus-message 7 "Deleting directory %s..." dir)
1617 1619
   (when (and dir
1618 1620
 	     (file-exists-p dir))
1619 1621
     (let ((files (directory-files dir t nil t))
37  lisp/gnus-xmas.el
@@ -111,29 +111,30 @@ It is provided only to ease porting of broken FSF Emacs programs."
111 111
 			 gnus-summary-selected-face))))
112 112
 
113 113
 (defun gnus-xmas-summary-recenter ()
114  
-  "Center point in the summary window.
  114
+  "\"Center\" point in the summary window.
115 115
 If `gnus-auto-center-summary' is nil, or the article buffer isn't
116 116
 displayed, no centering will be performed."
117 117
   ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle).
118 118
   ;; Recenter only when requested.  Suggested by popovich@park.cs.columbia.edu.
119  
-  (let* ((top (cond ((< (window-height) 4) 0)
120  
-		    ((< (window-height) 7) 1)
121  
-		    (t 2)))
122  
-	 (height (- (window-height) 3))
123  
-	 (bottom (save-excursion (goto-char (point-max))
124  
-				 (forward-line (- height))
125  
-				 (point)))
126  
-	 (window (get-buffer-window (current-buffer))))
127  
-    ;; The user has to want it.
128  
-    (when gnus-auto-center-summary
  119
+  (when gnus-auto-center-summary
  120
+    (let* ((height (if (fboundp 'window-displayed-height)
  121
+		       (window-displayed-height)
  122
+		     (- (window-height) 2)))
  123
+	   (top (cond ((< height 4) 0)
  124
+		      ((< height 7) 1)
  125
+		      (t 2)))
  126
+	   (bottom (save-excursion (goto-char (point-max))
  127
+				   (forward-line (- height))
  128
+				   (point)))
  129
+	   (window (get-buffer-window (current-buffer))))
129 130
       (when (get-buffer-window gnus-article-buffer)
130  
-       ;; Only do recentering when the article buffer is displayed,
131  
-       ;; Set the window start to either `bottom', which is the biggest
132  
-       ;; possible valid number, or the second line from the top,
133  
-       ;; whichever is the least.
134  
-       (set-window-start
135  
-	window (min bottom (save-excursion 
136  
-			     (forward-line (- top)) (point)))))
  131
+	;; Only do recentering when the article buffer is displayed,
  132
+	;; Set the window start to either `bottom', which is the biggest
  133
+	;; possible valid number, or the second line from the top,
  134
+	;; whichever is the least.
  135
+	(set-window-start
  136
+	 window (min bottom (save-excursion 
  137
+			      (forward-line (- top)) (point)))))
137 138
       ;; Do horizontal recentering while we're at it.
138 139
       (when (and (get-buffer-window (current-buffer) t)
139 140
 		 (not (eq gnus-auto-center-summary 'vertical)))
271  lisp/gnus.el
@@ -1533,6 +1533,9 @@ It is called with three parameters -- GROUP, LEVEL and OLDLEVEL.")
1533 1533
 
1534 1534
 ;; Internal variables
1535 1535
 
  1536
+(defvar gnus-tree-buffer "*Tree*"
  1537
+  "Buffer where Gnus thread trees are displayed.")
  1538
+
1536 1539
 ;; Dummy variable.
1537 1540
 (defvar gnus-use-generic-from nil)
1538 1541
 
@@ -1715,7 +1718,7 @@ variable (string, integer, character, etc).")
1715 1718
   "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
1716 1719
   "The mail address of the Gnus maintainers.")
1717 1720
 
1718  
-(defconst gnus-version "September Gnus v0.83"
  1721
+(defconst gnus-version "September Gnus v0.84"
1719 1722
   "Version number for this version of Gnus.")
1720 1723
 
1721 1724
 (defvar gnus-info-nodes
@@ -2577,7 +2580,8 @@ Thank you for your help in stamping out bugs.
2577 2580
 (defun gnus-update-group-mark-positions ()
2578 2581
   (save-excursion
2579 2582
     (let ((gnus-process-mark 128)
2580  
-	  (gnus-group-marked '("dummy.group")))
  2583
+	  (gnus-group-marked '("dummy.group"))
  2584
+	  (gnus-active-hashtb (make-vector 10 0)))
2581 2585
       (gnus-set-active "dummy.group" '(0 . 0))
2582 2586
       (gnus-set-work-buffer)
2583 2587
       (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil)
@@ -3123,6 +3127,10 @@ If RE-ONLY is non-nil, strip leading `Re:'s only."
3123 3127
   (not (or (string< s1 s2)
3124 3128
 	   (string= s1 s2))))
3125 3129
 
  3130
+(defun gnus-read-active-file-p ()
  3131
+  "Say whether the active file has been read from `gnus-select-method'."
  3132
+  (memq gnus-select-method gnus-have-read-active-file))
  3133
+
3126 3134
 ;;; General various misc type functions.
3127 3135
 
3128 3136
 (defun gnus-clear-system ()
@@ -4232,9 +4240,12 @@ The following commands are available:
4232 4240
 (defun gnus-group-default-level (&optional level number-or-nil)
4233 4241
   (cond
4234 4242
    (gnus-group-use-permanent-levels
4235  
-;    (setq gnus-group-default-list-level
4236  
-;	  (or level gnus-group-default-list-level))
4237  
-    (or level gnus-group-default-list-level gnus-level-subscribed))
  4243
+    (or (setq gnus-group-use-permanent-levels
  4244
+	      (or level (if (numberp gnus-group-use-permanent-levels)
  4245
+			    gnus-group-use-permanent-levels
  4246
+			  (or gnus-group-default-list-level
  4247
+			      gnus-level-subscribed))))
  4248
+	gnus-group-default-list-level gnus-level-subscribed))
4238 4249
    (number-or-nil
4239 4250
     level)
4240 4251
    (t
@@ -4255,10 +4266,10 @@ If ARG is non-nil and not a positive number, Gnus will
4255 4266
 prompt the user for the name of an NNTP server to use.
4256 4267
 As opposed to `gnus', this command will not connect to the local server."
4257 4268
   (interactive "P")
4258  
-  (let ((gnus-group-use-permanent-levels t))
4259  
-    (gnus (or arg (1- gnus-level-default-subscribed)) t slave))
4260 4269
   (make-local-variable 'gnus-group-use-permanent-levels)
4261  
-  (setq gnus-group-use-permanent-levels t))
  4270
+  (setq gnus-group-use-permanent-levels
  4271
+	(or arg (1- gnus-level-default-subscribed)))
  4272
+  (gnus gnus-group-use-permanent-levels t slave))
4262 4273
 
4263 4274
 ;;;###autoload
4264 4275
 (defun gnus-slave (&optional arg)
@@ -5077,24 +5088,23 @@ If FIRST-TOO, the current line is also eligible as a target."
5077 5088
   (interactive "p")
5078 5089
   (let ((buffer-read-only nil)
5079 5090
 	group)
5080  
-    (while
5081  
-	(and (> n 0)
5082  
-	     (setq group (gnus-group-group-name))
5083  
-	     (progn
5084  
-	       (beginning-of-line)
5085  
-	       (forward-char
5086  
-		(or (cdr (assq 'process gnus-group-mark-positions)) 2))
5087  
-	       (delete-char 1)
5088  
-	       (if unmark
5089  
-		   (progn
5090  
-		     (insert " ")
5091  
-		     (setq gnus-group-marked (delete group gnus-group-marked)))
5092  
-		 (insert "#")
5093  
-		 (setq gnus-group-marked
5094  
-		       (cons group (delete group gnus-group-marked))))
5095  
-	       t)
5096  
-	     (or no-advance (zerop (gnus-group-next-group 1))))
5097  
-      (setq n (1- n)))
  5091
+    (while (and (> n 0)
  5092
+		(not (eobp)))
  5093
+      (when (setq group (gnus-group-group-name))
  5094
+	;; Update the mark.
  5095
+	(beginning-of-line)
  5096
+	(forward-char
  5097
+	 (or (cdr (assq 'process gnus-group-mark-positions)) 2))
  5098
+	(delete-char 1)
  5099
+	(if unmark
  5100
+	    (progn
  5101
+	      (insert " ")
  5102
+	      (setq gnus-group-marked (delete group gnus-group-marked)))
  5103
+	  (insert "#")
  5104
+	  (setq gnus-group-marked
  5105
+		(cons group (delete group gnus-group-marked))))
  5106
+	(or no-advance (zerop (gnus-group-next-group 1))))
  5107
+      (decf n))
5098 5108
     (gnus-summary-position-point)
5099 5109
     n))
5100 5110
 
@@ -5303,7 +5313,7 @@ Returns whether the fetching was successful or not."
5303 5313
   (interactive
5304 5314
    (list (completing-read
5305 5315
 	  "Group: " gnus-active-hashtb nil
5306  
-	  (memq gnus-select-method gnus-have-read-active-file)
  5316
+	  (gnus-read-active-file-p)
5307 5317
 	  nil
5308 5318
 	  'gnus-group-history)))
5309 5319
 
@@ -6112,7 +6122,7 @@ group line."
6112 6122
   (interactive
6113 6123
    (list (completing-read
6114 6124
 	  "Group: " gnus-active-hashtb nil
6115  
-	  (memq gnus-select-method gnus-have-read-active-file)
  6125
+	  (gnus-read-active-file-p)
6116 6126
 	  nil 
6117 6127
 	  'gnus-group-history)))
6118 6128
   (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb)))
@@ -6129,7 +6139,7 @@ group line."
6129 6139
       (unless silent
6130 6140
 	(gnus-group-update-group group)))
6131 6141
      ((and (stringp group)
6132  
-	   (or (not (memq gnus-select-method gnus-have-read-active-file))
  6142
+	   (or (not (gnus-read-active-file-p))
6133 6143
 	       (gnus-active group)))
6134 6144
       ;; Add new newsgroup.
6135 6145
       (gnus-group-change-level
@@ -6298,28 +6308,7 @@ entail asking the server for the groups."
6298 6308
   (interactive "P")
6299 6309
   ;; Find all possible killed newsgroups if arg.
6300 6310
   (when arg
6301  
-    ;; First make sure active file has been read.
6302  
-    (unless gnus-have-read-active-file
6303  
-      (let ((gnus-read-active-file t))
6304  
-	(gnus-read-active-file)))
6305  
-    (or gnus-killed-hashtb (gnus-make-hashtable-from-killed))
6306  
-    ;; Go through all newsgroups that are known to Gnus - enlarge kill list
6307  
-    (mapatoms
6308  
-     (lambda (sym)
6309  
-       (let ((groups 0)
6310  
-	     (group (symbol-name sym)))
6311  
-	 (if (or (null group)
6312  
-		 (gnus-gethash group gnus-killed-hashtb)
6313  
-		 (gnus-gethash group gnus-newsrc-hashtb))
6314  
-	     ()
6315  
-	   (let ((do-sub (gnus-matches-options-n group)))
6316  
-	     (if (or (eq do-sub 'subscribe) (eq do-sub 'ignore))
6317  
-		 ()
6318  
-	       (setq groups (1+ groups))
6319  
-	       (setq gnus-killed-list
6320  
-		     (cons group gnus-killed-list))
6321  
-	       (gnus-sethash group group gnus-killed-hashtb))))))
6322  
-     gnus-active-hashtb))
  6311
+    (gnus-get-killed-groups))
6323 6312
   (if (not gnus-killed-list)
6324 6313
       (gnus-message 6 "No killed groups")
6325 6314
     (let (gnus-group-list-mode)
@@ -6343,7 +6332,7 @@ entail asking the server for the groups."
6343 6332
   "List all groups that are available from the server(s)."
6344 6333
   (interactive)
6345 6334
   ;; First we make sure that we have really read the active file.
6346  
-  (unless gnus-have-read-active-file
  6335
+  (unless (gnus-read-active-file-p)
6347 6336
     (let ((gnus-read-active-file t))
6348 6337
       (gnus-read-active-file)))
6349 6338
   ;; Find all groups and sort them.
@@ -6542,8 +6531,14 @@ If N is negative, this group and the N-1 previous groups will be checked."
6542 6531
 If the prefix LEVEL is non-nil, it should be a number that says which
6543 6532
 level to cut off listing groups.
6544 6533
 If ALL, also list groups with no unread articles.
6545  
-If LOWEST, don't list groups with level lower than LOWEST."
  6534
+If LOWEST, don't list groups with level lower than LOWEST.
  6535
+
  6536
+This command may read the active file."
6546 6537
   (interactive "P\nsList newsgroups matching: ")
  6538
+  ;; First make sure active file has been read.
  6539
+  (when (and level
  6540
+	     (>= (prefix-numeric-value level) gnus-level-killed))
  6541
+    (gnus-get-killed-groups))
6547 6542
   (gnus-group-prepare-flat (or level gnus-level-subscribed)
6548 6543
 			   all (or lowest 1) regexp)
6549 6544
   (goto-char (point-min))
@@ -10126,15 +10121,15 @@ Given a prefix, will force an `article' buffer configuration."
10126 10121
 	    (funcall gnus-summary-display-article-function article all-header)
10127 10122
 	  (gnus-article-prepare article all-header))
10128 10123
       (run-hooks 'gnus-select-article-hook)
10129  
-      (gnus-summary-recenter) gnus-current-article
10130  
-      (gnus-summary-goto-subject gnus-current-article)
  10124
+      (unless (zerop gnus-current-article)
  10125
+	(gnus-summary-goto-subject gnus-current-article))
  10126
+      (gnus-summary-recenter)
10131 10127
       (when gnus-use-trees
10132 10128
 	(gnus-possibly-generate-tree article)
10133 10129
 	(gnus-highlight-selected-tree article))
10134 10130
       ;; Successfully display article.
10135 10131
       (gnus-article-set-window-start
10136  
-       (cdr (assq article gnus-newsgroup-bookmarks)))
10137  
-      t)))
  10132
+       (cdr (assq article gnus-newsgroup-bookmarks))))))
10138 10133
 
10139 10134
 (defun gnus-summary-select-article (&optional all-headers force pseudo article)
10140 10135
   "Select the current article.
@@ -10142,6 +10137,9 @@ If ALL-HEADERS is non-nil, show all header fields.  If FORCE is
10142 10137
 non-nil, the article will be re-fetched even if it already present in
10143 10138
 the article buffer.  If PSEUDO is non-nil, pseudo-articles will also
10144 10139
 be displayed."
  10140
+  ;; Make sure we are in the summary buffer to work around bbdb bug.
  10141
+  (unless (eq major-mode 'gnus-summary-mode)
  10142
+    (set-buffer gnus-summary-buffer))
10145 10143
   (let ((article (or article (gnus-summary-article-number)))
10146 10144
 	(all-headers (not (not all-headers))) ;Must be T or NIL.
10147 10145
 	gnus-summary-display-article-function
@@ -10317,25 +10315,30 @@ article."
10317 10315
   (let ((article (gnus-summary-article-number))
10318 10316
 	(endp nil))
10319 10317
     (gnus-configure-windows 'article)
10320  
-    (if (or (null gnus-current-article)
10321  
-	    (null gnus-article-current)
10322  
-	    (/= article (cdr gnus-article-current))
10323  
-	    (not (equal (car gnus-article-current) gnus-newsgroup-name)))
10324  
-	;; Selected subject is different from current article's.
10325  
-	(gnus-summary-display-article article)
10326  
-      (gnus-eval-in-buffer-window
10327  
-       gnus-article-buffer
10328  
-       (setq endp (gnus-article-next-page lines)))
10329  
-      (if endp
10330  
-	  (cond (circular
10331  
-		 (gnus-summary-beginning-of-article))
10332  
-		(lines
10333  
-		 (gnus-message 3 "End of message"))
10334  
-		((null lines)
10335  
-		 (if (and (eq gnus-summary-goto-unread 'never)
10336  
-			  (not (gnus-summary-last-article-p article)))
10337  
-		     (gnus-summary-next-article)
10338  
-		   (gnus-summary-next-unread-article))))))
  10318
+    (if (eq (cdr (assq article gnus-newsgroup-reads)) gnus-canceled-mark)
  10319
+	(if (and (eq gnus-summary-goto-unread 'never)
  10320
+		 (not (gnus-summary-last-article-p article)))
  10321
+	    (gnus-summary-next-article)
  10322
+	  (gnus-summary-next-unread-article))
  10323
+      (if (or (null gnus-current-article)
  10324
+	      (null gnus-article-current)
  10325
+	      (/= article (cdr gnus-article-current))
  10326
+	      (not (equal (car gnus-article-current) gnus-newsgroup-name)))
  10327
+	  ;; Selected subject is different from current article's.
  10328
+	  (gnus-summary-display-article article)
  10329
+	(gnus-eval-in-buffer-window
  10330
+	 gnus-article-buffer
  10331
+	 (setq endp (gnus-article-next-page lines)))
  10332
+	(if endp
  10333
+	    (cond (circular
  10334
+		   (gnus-summary-beginning-of-article))
  10335
+		  (lines
  10336
+		   (gnus-message 3 "End of message"))
  10337
+		  ((null lines)
  10338
+		   (if (and (eq gnus-summary-goto-unread 'never)
  10339
+			    (not (gnus-summary-last-article-p article)))
  10340
+		       (gnus-summary-next-article)
  10341
+		     (gnus-summary-next-unread-article)))))))
10339 10342
     (gnus-summary-recenter)
10340 10343
     (gnus-summary-position-point)))
10341 10344
 
@@ -11542,7 +11545,7 @@ deleted forever, right now."
11542 11545
   (gnus-set-global-variables)
11543 11546
   (or gnus-expert-user
11544 11547
       (gnus-y-or-n-p
11545  
-       "Are you really, really, really sure you want to expunge? ")
  11548
+       "Are you really, really, really sure you want to delete all these messages? ")
11546 11549
       (error "Phew!"))
11547 11550
   (let ((nnmail-expiry-wait 'immediate)
11548 11551
 	(nnmail-expiry-wait-function nil))
@@ -13202,8 +13205,13 @@ is initialized from the SAVEDIR environment variable."
13202 13205
   (save-excursion
13203 13206
     (gnus-article-setup-buffer)
13204 13207
     (set-buffer gnus-article-buffer)
  13208
+    (setq buffer-read-only nil)
13205 13209
     (let ((command (if automatic command (read-string "Command: " command)))
13206  
-	  (buffer-read-only nil))
  13210
+	  ;; Just binding this here doesn't help, because there might
  13211
+	  ;; be output from the process after exiting the scope of 
  13212
+	  ;; this `let'.
  13213
+	  ;; (buffer-read-only nil)
  13214
+	  )
13207 13215
       (erase-buffer)
13208 13216
       (insert "$ " command "\n\n")
13209 13217
       (if gnus-view-pseudo-asynchronously
@@ -13428,8 +13436,19 @@ The following commands are available:
13428 13436
 			    (gnus-group-enter-directory dir)))))))))
13429 13437
 
13430 13438
 	  (cond
  13439
+	   ;; Refuse to select canceled articles.
  13440
+	   ((and (numberp article)
  13441
+		 gnus-summary-buffer
  13442
+		 (get-buffer gnus-summary-buffer)
  13443
+		 (buffer-name (get-buffer gnus-summary-buffer))
  13444
+		 (eq (cdr (save-excursion
  13445
+			    (set-buffer gnus-summary-buffer)
  13446
+			    (assq article gnus-newsgroup-reads)))
  13447
+		     gnus-canceled-mark))
  13448
+	    nil)
13431 13449
 	   ;; We first check `gnus-original-article-buffer'.
13432 13450
 	   ((and (get-buffer gnus-original-article-buffer)
  13451
+		 (numberp article)
13433 13452
 		 (save-excursion
13434 13453
 		   (set-buffer gnus-original-article-buffer)
13435 13454
 		   (and (equal (car gnus-original-article) group)
@@ -13465,6 +13484,7 @@ The following commands are available:
13465 13484
       ;; Take the article from the original article buffer
13466 13485
       ;; and place it in the buffer it's supposed to be in.
13467 13486
       (when (and (get-buffer gnus-article-buffer)
  13487
+		 (numberp article)
13468 13488
 		 (equal (buffer-name (current-buffer))
13469 13489
 			(buffer-name (get-buffer gnus-article-buffer))))
13470 13490
 	(save-excursion
@@ -13481,7 +13501,9 @@ The following commands are available:
13481 13501
 	  (setq gnus-original-article (cons group article))))
13482 13502
     
13483 13503
       ;; Update sparse articles.
13484  
-      (when do-update-line
  13504
+      (when (and do-update-line
  13505
+		 (or (numberp article)
  13506
+		     (stringp article)))
13485 13507
 	(let ((buf (current-buffer)))
13486 13508
 	  (set-buffer gnus-summary-buffer)
13487 13509
 	  (gnus-summary-update-article do-update-line)
@@ -13642,22 +13664,24 @@ If ALL-HEADERS is non-nil, no headers are hidden."
13642 13664
 			(memq article gnus-newsgroup-marked)
13643 13665
 			(memq article gnus-newsgroup-dormant)
13644 13666
 			(memq article gnus-newsgroup-unreads)))))
13645  
-	    ;; Hooks for getting information from the article.
13646  
-	    ;; This hook must be called before being narrowed.
13647  
-	    (let (buffer-read-only)
13648  
-	      (run-hooks 'internal-hook)
13649  
-	      (run-hooks 'gnus-article-prepare-hook)
13650  
-	      ;; Decode MIME message.
13651  
-	      (if gnus-show-mime
13652  
-		  (if (or (not gnus-strict-mime)
13653  
-			  (gnus-fetch-field "Mime-Version"))
13654  
-		      (funcall gnus-show-mime-method)
13655  
-		    (funcall gnus-decode-encoded-word-method)))
13656  
-	      ;; Perform the article display hooks.
13657  
-	      (run-hooks 'gnus-article-display-hook))
13658  
-	    ;; Do page break.
13659  
-	    (goto-char (point-min))
13660  
-	    (and gnus-break-pages (gnus-narrow-to-page))
  13667
+	    (when (or (numberp article)
  13668
+		      (stringp article))
  13669
+	      ;; Hooks for getting information from the article.
  13670
+	      ;; This hook must be called before being narrowed.
  13671
+	      (let (buffer-read-only)
  13672
+		(run-hooks 'internal-hook)
  13673
+		(run-hooks 'gnus-article-prepare-hook)
  13674
+		;; Decode MIME message.
  13675
+		(if gnus-show-mime
  13676
+		    (if (or (not gnus-strict-mime)
  13677
+			    (gnus-fetch-field "Mime-Version"))
  13678
+			(funcall gnus-show-mime-method)
  13679
+		      (funcall gnus-decode-encoded-word-method)))
  13680
+		;; Perform the article display hooks.
  13681
+		(run-hooks 'gnus-article-display-hook))
  13682
+	      ;; Do page break.
  13683
+	      (goto-char (point-min))
  13684
+	      (and gnus-break-pages (gnus-narrow-to-page)))
13661 13685
 	    (gnus-set-mode-line 'article)
13662 13686
 	    (gnus-configure-windows 'article)
13663 13687
 	    (goto-char (point-min))
@@ -13936,6 +13960,7 @@ always hide."
13936 13960
   "Hack to remove QP encoding from headers."
13937 13961
   (let ((case-fold-search t)
13938 13962
 	(inhibit-point-motion-hooks t)
  13963
+	(buffer-read-only nil)
13939 13964
 	string)
13940 13965
     (goto-char (point-min))
13941 13966
     (while (re-search-forward "=\\?iso-8859-1\\?q\\?\\([^?\t\n]*\\)\\?=" nil t)
@@ -13977,9 +14002,10 @@ or not."
13977 14002
 	   (delete-char -1)
13978 14003
 	   (delete-char 1))
13979 14004
 	  ((looking-at "[0-9A-F][0-9A-F]")
13980  
-	   (delete-char -1)
13981  
-	   (insert (hexl-hex-string-to-integer
13982  
-		    (buffer-substring (point) (+ 2 (point)))))
  14005
+	   (subst-char-in-region
  14006
+	    (1- (point)) (point) ?=
  14007
+	    (hexl-hex-string-to-integer
  14008
+	     (buffer-substring (point) (+ 2 (point)))))
13983 14009
 	   (delete-char 2))
13984 14010
 	  ((looking-at "=")
13985 14011
 	   (delete-char 1))
@@ -14215,15 +14241,15 @@ how much time has lapsed since DATE."
14215 14241
 			" ago\n"
14216 14242
 		      " in the future\n")))))
14217 14243
 	      (t
14218  
-	       (error "Unknown conversion type: %s" type)))))
14219  
-	  ;; Do highlighting.
14220  
-	  (forward-line -1)
14221  
-	  (when (and (gnus-visual-p 'article-highlight 'highlight)
14222  
-		     (looking-at "\\([^:]+\\): *\\(.*\\)$"))
14223  
-	    (put-text-property (match-beginning 1) (match-end 1)
14224  
-			       'face bface)
14225  
-	    (put-text-property (match-beginning 2) (match-end 2)
14226  
-			       'face eface)))))))
  14244
+	       (error "Unknown conversion type: %s" type))))
  14245
+	    ;; Do highlighting.
  14246
+	    (forward-line -1)
  14247
+	    (when (and (gnus-visual-p 'article-highlight 'highlight)
  14248
+		       (looking-at "\\([^:]+\\): *\\(.*\\)$"))
  14249
+	      (put-text-property (match-beginning 1) (match-end 1)
  14250
+				 'face bface)
  14251
+	      (put-text-property (match-beginning 2) (match-end 2)
  14252
+				 'face eface))))))))
14227 14253
 
14228 14254
 (defun gnus-article-date-local (&optional highlight)
14229 14255
   "Convert the current article date to the local timezone."
@@ -15348,7 +15374,7 @@ the server for new groups."
15348 15374
 	  (file-exists-p (concat gnus-startup-file ".eld")))
15349 15375
       nil
15350 15376
     (gnus-message 6 "First time user; subscribing you to default groups")
15351  
-    (unless gnus-have-read-active-file
  15377
+    (unless (gnus-read-active-file-p)
15352 15378
       (gnus-read-active-file))
15353 15379
     (setq gnus-newsrc-last-checked-date (current-time-string))
15354 15380
     (let ((groups gnus-default-subscribed-newsgroups)
@@ -15520,9 +15546,9 @@ newsgroup."
15520 15546
   (let ((newsrc (cdr gnus-newsrc-alist))
15521 15547
 	bogus group entry info)
15522 15548
     (gnus-message 5 "Checking bogus newsgroups...")
15523  
-    (unless gnus-have-read-active-file
  15549
+    (unless (gnus-read-active-file-p)
15524 15550
       (gnus-read-active-file))
15525  
-    (when (member gnus-select-method gnus-have-read-active-file)
  15551
+    (when (gnus-read-active-file-p)
15526 15552
       ;; Find all bogus newsgroup that are subscribed.
15527 15553
       (while newsrc
15528 15554
 	(setq info (pop newsrc)
@@ -15842,6 +15868,31 @@ Returns whether the updating was successful."
15842 15868
 	(setq killed (cdr killed)))
15843 15869
       (setq lists (cdr lists)))))
15844 15870
 
  15871
+(defun gnus-get-killed-groups ()
  15872
+  "Go through the active hashtb and all all unknown groups as killed."
  15873
+  ;; First make sure active file has been read.
  15874
+  (unless (gnus-read-active-file-p)
  15875
+    (let ((gnus-read-active-file t))
  15876
+      (gnus-read-active-file)))
  15877
+  (or gnus-killed-hashtb (gnus-make-hashtable-from-killed))
  15878
+  ;; Go through all newsgroups that are known to Gnus - enlarge kill list.
  15879
+  (mapatoms
  15880
+   (lambda (sym)
  15881
+     (let ((groups 0)
  15882
+	   (group (symbol-name sym)))
  15883
+       (if (or (null group)
  15884
+	       (gnus-gethash group gnus-killed-hashtb)
  15885
+	       (gnus-gethash group gnus-newsrc-hashtb))
  15886
+	   ()
  15887
+	 (let ((do-sub (gnus-matches-options-n group)))
  15888
+	   (if (or (eq do-sub 'subscribe) (eq do-sub 'ignore))
  15889
+	       ()
  15890
+	     (setq groups (1+ groups))
  15891
+	     (setq gnus-killed-list
  15892
+		   (cons group gnus-killed-list))
  15893
+	     (gnus-sethash group group gnus-killed-hashtb))))))
  15894
+   gnus-active-hashtb))
  15895
+
15845 15896
 ;; Get the active file(s) from the backend(s).
15846 15897
 (defun gnus-read-active-file ()
15847 15898
   (gnus-group-set-mode-line)
14  lisp/message-xmas.el
@@ -37,15 +37,17 @@ If it is non-nil, it must be a toolbar.  The five legal values are
37 37
 `right-toolbar', and `left-toolbar'.")
38 38
 
39 39
 (defvar message-toolbar 
40  
-  '([message-copy message-copy t "Copy message"]
41  
-    [message-delete message-delete t "Delete message"]
42  
-    [message-forward message-forward t "Forward message"]
  40
+  '(
  41
+    [message-reply message-reply t "Reply"]
43 42
     [message-get message-get t "Message get"]
44  
-    [message-help message-help  t "Message help"]
45 43
     [message-originate message-originate t "Originate"]
46  
-    [message-reply message-reply t "Reply"]
47 44
     [message-save message-save t "Save"]
48  
-    [message-spell message-spell t "Spell"])
  45
+    [message-copy message-copy t "Copy message"]
  46
+    [message-delete message-delete t "Delete message"]
  47
+    [message-forward message-forward t "Forward message"]
  48
+    [message-spell message-spell t "Spell"]
  49
+    [message-help message-help  t "Message help"]
  50
+    )
49 51
   "The message buffer toolbar.")
50 52
 
51 53
 (defun message-xmas-find-glyph-directory (&optional package)
6  lisp/message.el
@@ -1478,7 +1478,7 @@ the user from the mailer."
1478 1478
 (defun message-check-element (type)
1479 1479
   "Returns non-nil if this type is not to be checked."
1480 1480
   (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me)
1481  
-      nil
  1481
+      t
1482 1482
     (let ((able (assq type message-syntax-checks)))
1483 1483
       (and (consp able)
1484 1484
 	   (eq (cdr able) 'disabled)))))
@@ -2117,7 +2117,7 @@ Headers already prepared in the buffer are not modified."
2117 2117
 	    message-id (mail-fetch-field "message-id"))
2118 2118
       ;; Remove any (buggy) Re:'s that are present and make a
2119 2119
       ;; proper one.
2120  
-      (when (string-match "^[ \t]*[Re][Ee]:[ \t]*" subject)
  2120
+      (when (string-match "^[ \t]*[Rr][Ee]:[ \t]*" subject)
2121 2121
 	(setq subject (substring subject (match-end 0))))
2122 2122
       (setq subject (concat "Re: " subject))
2123 2123
 
@@ -2219,7 +2219,7 @@ Headers already prepared in the buffer are not modified."
2219 2219
 	   (setq distribution nil))
2220 2220
       ;; Remove any (buggy) Re:'s that are present and make a
2221 2221
       ;; proper one.
2222  
-      (when (string-match "^[ \t]*[Re][Ee]:[ \t]*" subject)
  2222
+      (when (string-match "^[ \t]*[Rr][Ee]:[ \t]*" subject)
2223 2223
 	(setq subject (substring subject (match-end 0))))
2224 2224
       (setq subject (concat "Re: " subject))
2225 2225
       (widen))
28  lisp/nnheader.el
@@ -138,14 +138,14 @@ on your system, you could say something like:
138 138
 
139 139
 (defvar nnheader-newsgroup-none-id 1)
140 140
 
141  
-(defun nnheader-parse-head ()
  141
+(defun nnheader-parse-head (&optional naked)
142 142
   (let ((case-fold-search t)
143 143
 	(cur (current-buffer))
144 144
 	end ref in-reply-to lines p)
145 145
     (goto-char (point-min))
146 146
     ;; Search to the beginning of the next header. Error messages
147 147
     ;; do not begin with 2 or 3.
148  
-    (when (re-search-forward "^[23][0-9]+ " nil t)
  148
+    (when (or naked (re-search-forward "^[23][0-9]+ " nil t))
149 149
       ;; This implementation of this function, with nine
150 150
       ;; search-forwards instead of the one re-search-forward and
151 151
       ;; a case (which basically was the old function) is actually
@@ -154,14 +154,18 @@ on your system, you could say something like:
154 154
       ;; doesn't always go hand in hand.
155 155
       (vector
156 156
        ;; Number.
157  
-       (prog1
158  
-	   (read cur)
159  
-	 (end-of-line)
160  
-	 (setq p (point))
161  
-	 (narrow-to-region (point)
162  
-			   (or (and (search-forward "\n.\n" nil t)
163  
-				    (- (point) 2))
164  
-			       (point))))
  157
+       (if naked
  158
+	   (progn
  159
+	     (setq p (point-min))
  160
+	     0)
  161
+	 (prog1
  162
+	     (read cur)
  163
+	   (end-of-line)
  164
+	   (setq p (point))
  165
+	   (narrow-to-region (point)
  166
+			     (or (and (search-forward "\n.\n" nil t)
  167
+				      (- (point) 2))
  168
+				 (point)))))
165 169
        ;; Subject.
166 170
        (progn
167 171
 	 (goto-char p)
@@ -220,8 +224,8 @@ on your system, you could say something like:
220 224
   (princ (mail-header-number header) (current-buffer))
221 225
   (insert 
222 226
    "\t"
223  
-   (or (mail-header-subject header) "") "\t"
224  
-   (or (mail-header-from header) "") "\t"
  227
+   (or (mail-header-subject header) "(none)") "\t"
  228
+   (or (mail-header-from header) "(nobody)") "\t"
225 229
    (or (mail-header-date header) "") "\t"
226 230
    (or (mail-header-id header) "") "\t"
227 231
    (or (mail-header-references header) "") "\t")
2  lisp/nnmail.el
@@ -573,7 +573,7 @@ nn*-request-list should have been called before calling this function."
573 573
 	(if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t)
574 574
 	    (setq message-id (match-string 1))
575 575
 	  (save-excursion
576  
-	    (when (re-search-backward "^Message-ID:" nil t)
  576
+	    (when (re-search-forward "^Message-ID:" nil t)
577 577
 	      (beginning-of-line)
578 578
 	      (insert "Original-")))
579 579
 	  ;; There is no Message-ID here, so we create one.
93  lisp/nnml.el
@@ -351,8 +351,8 @@ all. This may very well take some time.")
351 351
 	()
352 352
       (let ((chars (nnmail-insert-lines))
353 353
 	    (art (concat (int-to-string article) "\t"))
354  
-	    nov-line)
355  
-	(setq nov-line (nnml-make-nov-line chars))
  354
+	    headers)
  355
+	(setq headers (nnml-parse-head chars article))
356 356
 	;; Replace the NOV line in the NOV file.
357 357
 	(save-excursion 
358 358
 	  (set-buffer (nnml-open-nov group))
@@ -372,7 +372,7 @@ all. This may very well take some time.")
372 372
 			   article)
373 373
 			(zerop (forward-line 1)))))
374 374
 	  (beginning-of-line)
375  
-	  (insert (int-to-string article) nov-line)
  375
+	  (nnheader-insert-nov headers)
376 376
 	  (nnml-save-nov)
377 377
 	  t)))))
378 378
 
@@ -541,7 +541,7 @@ all. This may very well take some time.")
541 541
 (defun nnml-save-mail ()
542 542
   "Called narrowed to an article."
543 543
   (let ((group-art (nreverse (nnmail-article-group 'nnml-active-number)))
544  
-	chars nov-line)
  544
+	chars headers)
545 545
     (setq chars (nnmail-insert-lines))
546 546
     (nnmail-insert-xref group-art)
547 547
     (run-hooks 'nnmail-prepare-save-mail-hook)
@@ -569,11 +569,11 @@ all. This may very well take some time.")
569 569
     ;; Generate a nov line for this article. We generate the nov
570 570
     ;; line after saving, because nov generation destroys the
571 571
     ;; header. 
572  
-    (setq nov-line (nnml-make-nov-line chars))
  572
+    (setq headers (nnml-parse-head chars))
573 573
     ;; Output the nov line to all nov databases that should have it.
574 574
     (let ((ga group-art))
575 575
       (while ga
576  
-	(nnml-add-nov (caar ga) (cdar ga) nov-line)
  576
+	(nnml-add-nov (caar ga) (cdar ga) headers)
577 577
 	(setq ga (cdr ga))))
578 578
     group-art))
579 579
 
@@ -605,70 +605,35 @@ all. This may very well take some time.")
605 605
       (setcdr active (1+ (cdr active))))
606 606
     (cdr active)))
607 607
 
608  
-(defun nnml-add-nov (group article line)
  608
+(defun nnml-add-nov (group article headers)
609 609
   "Add a nov line for the GROUP base."
610 610
   (save-excursion 
611 611
     (set-buffer (nnml-open-nov group))
612 612
     (goto-char (point-max))
613  
-    (insert (int-to-string article) line)))
  613
+    (mail-header-set-number headers article)
  614
+    (nnheader-insert-nov headers)))
614 615
 
615 616
 (defsubst nnml-header-value ()
616 617
   (buffer-substring (match-end 0) (progn (end-of-line) (point))))
617 618
 
618  
-(defun nnml-make-nov-line (chars)
619  
-  "Create a nov from the current headers."
620  
-  (let ((case-fold-search t)
621  
-	subject from date id references lines xref in-reply-to char)
622  
-    (save-excursion
623  
-      (save-restriction
624  
-	(goto-char (point-min))
625  
-	(narrow-to-region 
626  
-	 (point)
627  
-	 (1- (or (search-forward "\n\n" nil t) (point-max))))
628  
-	;; Fold continuation lines.
629  
-	(goto-char (point-min))
630  
-	(while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
631  
-	  (replace-match " " t t))
632  
-	(subst-char-in-region (point-min) (point-max) ?\t ? )
633  
-	;; [number subject from date id references chars lines xref]
634  
-	(save-excursion
635  
-	  (goto-char (point-min))
636  
-	  (while (re-search-forward "^\\(from\\|subject\\|message-id\\|date\\|lines\\|xref\\|references\\|in-reply-to\\): "
637  
-				    nil t)
638  
-	    (beginning-of-line)
639  
-	    (setq char (downcase (following-char))) 
640  
-	    (cond
641  
-	     ((eq char ?s)
642  
-	      (setq subject (nnml-header-value)))
643  
-	     ((eq char ?f)
644  
-	      (setq from (nnml-header-value)))
645  
-	     ((eq char ?x)
646  
-	      (setq xref (buffer-substring (match-beginning 0) 
647  
-					   (progn (end-of-line) (point)))))
648  
-	     ((eq char ?l)
649  
-	      (setq lines (nnml-header-value)))
650  
-	     ((eq char ?d)
651  
-	      (setq date (nnml-header-value)))
652  
-	     ((eq char ?m)
653  
-	      (setq id (setq id (nnml-header-value))))
654  
-	     ((eq char ?r)
655  
-	      (setq references (nnml-header-value)))
656  
-	     ((eq char ?i)
657  
-	      (setq in-reply-to (nnml-header-value))))
658  
-	    (forward-line 1))
659  
-      
660  
-	  (and (not references)
661  
-	       in-reply-to
662  
-	       (string-match "<[^>]+>" in-reply-to)
663  
-	       (setq references
664  
-		     (substring in-reply-to (match-beginning 0)
665  
-				(match-end 0)))))
666  
-	;; [number subject from date id references chars lines xref]
667  
-	(format "\t%s\t%s\t%s\t%s\t%s\t%d\t%s\t%s\t\n"
668  
-		(or subject "(none)") (or from "(nobody)") (or date "")
669  
-		(or id (nnmail-message-id))
670  
-		(or references "") (or chars 0) (or lines "0") 
671  
-		(or xref ""))))))
  619
+(defun nnml-parse-head (chars &optional number)
  620
+  "Parse the head of the current buffer."
  621
+  (save-excursion
  622
+    (save-restriction
  623
+      (goto-char (point-min))
  624
+      (narrow-to-region 
  625
+       (point)
  626
+       (1- (or (search-forward "\n\n" nil t) (point-max))))
  627
+      ;; Fold continuation lines.
  628
+      (goto-char (point-min))
  629
+      (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
  630
+	(replace-match " " t t))
  631
+      ;; Remove any tabs; they are too confusing.
  632
+      (subst-char-in-region (point-min) (point-max) ?\t ? )
  633
+      (let ((headers (nnheader-parse-head t)))
  634
+	(mail-header-set-chars headers chars)
  635
+	(mail-header-set-number headers number)
  636
+	headers))))
672 637
 
673 638
 (defun nnml-open-nov (group)
674 639
   (or (cdr (assoc group nnml-nov-buffer-alist))
@@ -771,11 +736,11 @@ all. This may very well take some time.")
771 736
 	  (when (and (not (= 0 chars))	; none of them empty files...
772 737
 		     (not (= (point-min) (point-max))))
773 738
 	    (goto-char (point-min))
774  
-	    (setq nov-line (nnml-make-nov-line chars))
  739
+	    (setq headers (nnml-parse-head chars (car files)))
775 740
 	    (save-excursion
776 741
 	      (set-buffer nov-buffer)
777 742
 	      (goto-char (point-max))
778  
-	      (insert (int-to-string (car files)) nov-line)))
  743
+	      (nnheader-insert-nov headers)))
779 744
 	  (widen))
780 745
 	(setq files (cdr files)))
781 746
       (save-excursion

0 notes on commit d2a9559

Please sign in to comment.
Something went wrong with that request. Please try again.