From: yamaoka Date: Mon, 26 Oct 1998 01:47:28 +0000 (+0000) Subject: Sync up with Pterodactyl Gnus 0.40. X-Git-Tag: pgnus-ichikawa-199811302358~143 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9bd698099731ccbdb758c62c7735a2bc699b100;p=elisp%2Fgnus.git- Sync up with Pterodactyl Gnus 0.40. --- diff --git a/ChangeLog b/ChangeLog index 6717038..4fe6be2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-10-26 Katsumi Yamaoka + + * lisp/gnus.el (gnus-version-number): Update to 6.10.027. + + * Sync up with Pterodactyl Gnus 0.40. + 1998-10-23 Katsumi Yamaoka * lisp/gnus.el (gnus-version-number): Update to 6.10.026. diff --git a/GNUS-NEWS b/GNUS-NEWS index a2ca24f..a0ba334 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -1,5 +1,11 @@ ** Gnus changes. +*** Gnus is now a MIME-capable reader. See the manual for details. + *** gnus-auto-select-first can now be a function to be called to position point. +*** The user can now decide which extra headers should be included in +summary buffers and NOV files. + + diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f6afb0..235015b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,230 @@ +Sun Oct 25 23:11:44 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.40 is released. + +1998-10-25 21:41:05 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-mark-forward): Show thread. + + * gnus-start.el (gnus-check-first-time-used): Ignore dribble. + + * gnus-agent.el (gnus-agent-fetch-group-1): Bind name. + + * nnml.el (nnml-possibly-create-directory): Check before making. + +1998-10-25 19:43:08 Kai Grossjohann + + * nnheader.el (nnheader-insert-nov): Don't infloop. + +1998-10-25 19:26:11 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-set-mode-line): Check that the spec has been + set up. + +1998-10-25 19:22:03 Joerg Lenneis + + * nneething.el (nneething-file-name): New definition. + +1998-10-25 17:56:23 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-treatment-function-alist): Fix. + (gnus-summary-save-in-rmail): Use gnus-output-to-rmail. + + * nndoc.el (nndoc-dissect-mime-parts-sub): Recognize first part. + +Sun Oct 25 06:23:13 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.39 is released. + +1998-10-25 00:34:39 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-ignored-mime-types): New variable. + (gnus-mime-display-single): Use it. + (gnus-treatment-function-alist): New variable. + + * gnus.el (gnus-mime): New group. + + * gnus-art.el (gnus-mime-display-alternative): Don't destroy + things for other parts. + (gnus-mime-display-alternative): Place point. + + * gnus.el: autoload gnus-uu-post-news. + + * mailcap.el (mailcap-mailcap-entry-passes-test): Also check + needsterm/DISPLAY. + + * mm-decode.el (mm-display-part): Default to inline text/.* + parts. + + * mm-bodies.el (mm-decode-content-transfer-encoding): Default to + 8bit. + + * gnus-art.el (gnus-mime-copy-part): Use normal-mode. + (gnus-mime-display-single): Inline all text parts. + (gnus-article-narrow-to-signature): Removed mime:: stubs. + +1998-10-24 21:38:37 Lars Magne Ingebrigtsen + + * nnml.el (nnml-possibly-create-directory): Rewrite. + (nnml-request-create-group): Change to right server. + + * gnus-xmas.el (gnus-xmas-define): Use byte-code-function-p. + + * gnus-sum.el (gnus-set-mode-line): Use truncate-string-to-width. + + * gnus.el: rmail-output-to-rmail-file autoload. + + * gnus-util.el (gnus-output-to-rmail): Didn't work if not in + Gnus. + + * nnheader.el (nnheader-parse-head): Checked wrong variable. + + * gnus-sum.el (gnus-summary-update-mark): Ignore nil'd marks. + +Tue Oct 20 23:37:43 1998 Shenghuo ZHU + + * gnus-art.el (gnus-mime-display-mixed): Multipart in + mixed part. + +Tue Oct 20 23:36:43 1998 Shenghuo ZHU + + * gnus-sum.el (gnus-summary-exit): Use mm-destroy-parts. + + * gnus-sum.el (gnus-summary-exit-no-update): Ditto. + +Tue Oct 20 16:22:51 1998 Shenghuo ZHU + + * mm-uu.el (mm-uu-dissect): Create pseudo multipart head. + +1998-10-24 20:51:53 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-valid-move-group-p): Make sure group has a + value. + + * gnus-art.el (gnus-article-hidden-text-p): Return nil when not + hidden. + + * gnus-spec.el (gnus-update-format-specifications): Use the + article mode line spec. + + * gnus-art.el (gnus-insert-mime-button): Put right type. + (gnus-insert-prev-page-button): Ditto. + (gnus-insert-next-page-button): Dutti. + + * pop3.el: New version installed. + +Sat Oct 24 16:48:51 1998 Shenghuo ZHU + + * mm-uu.el (mm-uu-dissect): Delete the begining spurious newline + and display last part. + +Sat Oct 24 20:31:55 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.38 is released. + +1998-10-24 07:54:58 Lars Magne Ingebrigtsen + + * gnus-art.el (article-mime-decode-quoted-printable-buffer): + Removed. + (article-de-quoted-unreadable): Narrow to default. + + * qp.el (quoted-printable-encode-region): Encode before QP-ing. + + * gnus-art.el (article-decode-charset): Decode even when broken + MIME. + + * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Return + name. + + * gnus-msg.el (gnus-copy-article-buffer): Delete headers. + + * gnus-cache.el (gnus-cache-possibly-enter-article): Use + nnheader. + + * nnmail.el (nnmail-extra-headers): New variable. + + * nnheader.el (nnheader-insert-nov): Insert extra. + + * gnus.el (gnus-summary-line-format): Doc fix. + + * gnus-sum.el (gnus-get-newsgroup-headers): Parse extra. + (gnus-nov-parse-line): Ditto. + (gnus-nov-parse-extra): New macro. + (gnus-header): New function. + (gnus-update-summary-mark-positions): Change. + (gnus-ignored-from-addresses): New variable. + (gnus-summary-insert-from-or-to): New function. + + * gnus.el (gnus-extra-headers): New variable. + + * nnheader.el (make-mail-header): Expand. + (mail-header-extra): New macro. + (mail-header-set-extra): Ditto. + (make-full-mail-header): Expand. + +Sat Oct 24 07:41:42 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.37 is released. + +1998-10-24 07:29:11 Lars Magne Ingebrigtsen + + * mm-bodies.el (mm-decode-body): Check for multibyticity. + + * mm-util.el (mm-enable-multibyte): Don't always switch multibyte + on. + +1998-10-22 Didier Verna + + * gnus-spec.el (gnus-balloon-face-function): new function + (gnus-parse-format): understand the %< %> specifiers + (gnus-parse-complex-format): ditto. + +1998-10-24 06:31:33 Lars Magne Ingebrigtsen + + * gnus.el: Changed following-char to char-after throughout. + +1998-10-22 04:05:55 Lars Magne Ingebrigtsen + + * mm-decode.el (mm-display-external): Protect more and message. + +Wed Oct 21 03:26:30 1998 Shenghuo ZHU + + * gnus-xmas.el (gnus-xmas-article-push-button): Go to the + position. + +Tue Oct 20 23:37:43 1998 Shenghuo ZHU + + * gnus-art.el (gnus-mime-display-mixed): Multipart in + mixed part. + +Tue Oct 20 23:36:43 1998 Shenghuo ZHU + + * gnus-sum.el (gnus-summary-exit): Use mm-destroy-parts. + + * gnus-sum.el (gnus-summary-exit-no-update): Ditto. + +Tue Oct 20 16:22:51 1998 Shenghuo ZHU + + * mm-uu.el (mm-uu-dissect): Create pseudo multipart head. + +1998-10-21 Hrvoje Niksic + + * mailcap.el (mailcap-save-binary-file): Use unwind-protect. + + * mm-decode.el (mm-display-external): Set undisplayer to mm + buffer, not the current buffer; use unwind-protect. + +1998-10-21 00:07:59 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-exit): Destroy parts. + (gnus-summary-exit-no-update): Ditto. + +1998-10-20 22:02:05 Lars Magne Ingebrigtsen + + * mm-decode.el (mm-inline-media-tests): Look for w3. + + * mailcap.el (mailcap-mime-data): Inline html. + Tue Oct 20 20:25:03 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.36 is released. @@ -31,6 +258,23 @@ Tue Oct 20 02:16:36 1998 Shenghuo ZHU * mm-decode.el (mm-display-external): Check before selecting. +Sat Sep 26 02:03:00 1998 Shenghuo ZHU + + * gnus-sum.el (gnus-multi-decode-encoded-word-string): Rewrite. + + * gnus-sum.el (gnus-decode-encoded-word-methods): New variable. + + * gnus-sum.el (gnus-decode-encoded-word-methods-cache): New + variable. + + * gnus-sum.el (gnus-encoded-word-method-alist): Deleted. + + * gnus-art.el (gnus-decode-header-methods): New variable. + + * gnus-art.el (gnus-decode-header-methods-cache): New variable. + + * gnus-art.el (gnus-multi-decode-header): New function. + Tue Oct 20 00:24:16 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.35 is released. @@ -720,752 +964,22 @@ Sat Sep 12 09:17:30 1998 Lars Magne Ingebrigtsen * message.el (message-send-news): Encode body after checking syntax. - * gnus-art.el (gnus-mime-button-line-format): Allow descriptions. - - * mm-decode.el (mm-save-part): Use Content-Disposition filename. - - * gnus-art.el (gnus-display-mime): Respect disposition. - - * mm-decode.el (mm-preferred-alternative): Respect disposition. - - * gnus-art.el (article-strip-multiple-blank-lines): Don't delete - text with annotations. - - * message.el (message-make-date): Fix sign for negative time - zones. - - * mm-view.el (mm-inline-image): Insert a space at the end of the - image. - - * mail-parse.el: New file. - - * rfc2231.el: New file. - - * drums.el (drums-content-type-get): Removed. - (drums-parse-content-type): Ditto. - - * mailcap.el (mailcap-mime-data): Use symbols instead of strings. - -Fri Sep 11 18:23:34 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.27 is released. - -1998-09-11 12:42:07 Lars Magne Ingebrigtsen - - * mm-decode.el (mm-alternative-precedence): New variable. - (mm-preferred-alternative): New function. - - * gnus-art.el (gnus-mime-copy-part): New command. - - * mm-decode.el (mm-get-part): New function. - - * mm-view.el: New file. - - * mm-decode.el (mm-dissect-buffer): Downcase cte. - (mm-display-part): Default to mailcap-save-binary-file. - -Fri Sep 11 12:32:50 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.26 is released. - -1998-09-11 08:25:33 Lars Magne Ingebrigtsen - - * mm-decode.el (mm-interactively-view-part): New function. - - * gnus-art.el (gnus-mime-view-part): New command. - - * mm-decode.el (mm-last-shell-command): New variable. - - * mailcap.el (mailcap-mime-info): Allow returning all matches. - - * mm-decode.el (mm-save-part): New function. - - * gnus-art.el (article-decode-charset): Protect against buggy - content-types. - (gnus-mime-pipe-part): New command. - (gnus-mime-save-part): New command. - (gnus-mime-button-map): New keymap. - (gnus-mime-button-line-format): New variable. - (gnus-insert-mime-button): New function. - (gnus-display-mime): Use it. - - * gnus-util.el (gnus-dd-mmm): Removed length spec. - - * mm-decode.el (mm-inline-text): Decode charsets. - - * gnus-art.el (gnus-article-save): Comment fix. - - * gnus-int.el (gnus-start-news-server): When in batch, don't - prompt. - - * gnus-cache.el (gnus-cache-possibly-enter-article): Don't - decode. - - * mm-decode.el (mm-inline-media-tests): Add audio. - (mm-inline-audio): New function. - -1998-09-11 08:19:22 Katsumi Yamaoka - - * gnus-art.el (article-make-date-line): Didn't work. - - * parse-time.el (parse-time-string): One too many nils. - -Fri Sep 11 08:09:40 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.25 is released. - -1998-09-11 07:38:14 Lars Magne Ingebrigtsen - - * gnus-art.el (article-remove-trailing-blank-lines): Don't remove - annotations. - - * gnus.el ((featurep 'gnus-xmas)): New - 'gnus-annotation-in-region-p alias. - -1998-09-10 06:20:52 Lars Magne Ingebrigtsen - - * mm-util.el (mm-with-unibyte-buffer): New function. - - * gnus-uu.el (gnus-quote-arg-for-sh-or-csh): Renamed. - - * mm-decode.el (mm-inline-media-tests): New variable. - - * gnus-sum.el (gnus-summary-exit): Destroy handles. - - * gnus-art.el (gnus-article-mime-handles): New variable. - - * drums.el (drums-narrow-to-header): New function. - - * gnus-art.el (article-decode-charset): Use it. - - * drums.el (drums-content-type-get): New function. - - * mm-util.el (mm-content-type-charset): Removed. - - * drums.el (drums-syntax-table): @ is word. - (drums-parse-content-type): New function. - - * parse-time.el (parse-time-rules): Parse "Wed, 29 Apr 98 0:26:01 - EDT" times. - - * gnus-util.el (gnus-date-get-time): Use safe date. - - * gnus-sum.el (gnus-show-mime): Removed. - (gnus-summary-toggle-mime): Removed. - - * gnus-art.el (gnus-strict-mime): Removed. - (gnus-article-prepare): Don't do MIME. - (gnus-decode-encoded-word-method): Removed. - (gnus-show-mime-method): Removed. - -Thu Sep 10 04:03:29 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.24 is released. - -1998-09-10 01:58:24 Lars Magne Ingebrigtsen - - * gnus-sum.el (gnus-summary-show-article): Don't decode chars if - PREFIX. - - * parse-time.el (parse-time-rules): Accept times that look like - "h:mm". - - * message.el (message-make-date): Use zone properly. - - * gnus.el: Autoload gnus-batch. - - * gnus-art.el (article-de-quoted-unreadable): Do not do - gnus-article-decode-rfc1522. - - * gnus-msg.el (gnus-inews-do-gcc): Use it. - - * gnus-int.el (gnus-request-accept-article): Accept a no-encode - param. - - * message.el (message-encode-message-body): Check for us-ascii. - - * gnus-msg.el (gnus-extended-version): Move Gnus version comments - to the left. - -1998-09-09 13:18:13 Lars Magne Ingebrigtsen - - * gnus-art.el (article-decode-charset): Rename. - -Wed Sep 9 12:25:48 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.23 is released. - -1998-09-09 12:14:47 Lars Magne Ingebrigtsen - - * gnus-util.el (gnus-parent-id): Ditto. - (gnus-put-text-property-excluding-newlines): Ditto. - - * gnus-sum.el (gnus-dependencies-add-header): Make into subst. - -1998-09-08 Karl Kleinpaste - - * message.el (message-generate-headers): Generate User-Agent - instead of X-Mailer & X-Newsreader. - - * gnus-msg.el (gnus-extended-version): Reformat for USEFOR - User-Agent header format. - -Tue Sep 8 22:38:27 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.22 is released. - -1998-09-08 22:36:54 Lars Magne Ingebrigtsen - - * mm-util.el (mm-multibyte-p): Typo. - -Tue Sep 8 22:25:53 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.21 is released. - -1998-09-08 Hrvoje Niksic - - * gnus-art.el (article-treat-dumbquotes): Handle \224 correctly. - -1998-09-08 22:18:03 Lars Magne Ingebrigtsen - - * mm-util.el (mm-multibyte-p): New function. - -Tue Sep 8 21:43:03 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.20 is released. - -1998-09-08 11:40:45 Lars Magne Ingebrigtsen - - * rfc2047.el (rfc2047-decode-region): Only decode when in - multibyte. - - * nnheader.el (nnheader-pathname-coding-system): Changed to binary. - - * gnus-int.el (gnus-request-replace-article): Encode. - (gnus-request-accept-article): Encode. - - * gnus-art.el (gnus-request-article-this-buffer): Decode charsets - here. - - * gnus.el (gnus-article-display-hook): Take the charset functions - out. - - * time-date.el (safe-date-to-time): New function. - - * gnus-util.el (gnus-dd-mmm): Protect against bogus dates. - -Tue Sep 8 07:09:28 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.19 is released. - -1998-09-08 04:51:39 Lars Magne Ingebrigtsen - - * base64.el (base64-encode-region): Accept no-line-break. - - * mm-util.el (mm-mime-charset): New function. - - * gnus-draft.el (gnus-draft-edit-message): Delete article. - -Tue Sep 8 04:29:23 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.18 is released. - -1998-09-08 02:21:36 Lars Magne Ingebrigtsen - - * message.el (message-send-and-exit): Return t on success. - (message-make-date): Make a proper time zone. - - * gnus-draft.el (gnus-draft-send): Only remove article if the - sending is successful. + * gnus-art.el (gnus-mime-button-line-formaer.edu> - * drums.el (drums-get-comment): Return the last comment. - (drums-parse-address): Parse old-style From headers. - -1998-09-07 SL Baur - - * gnus-sum.el (gnus-data-compute-positions): Move below - `gnus-save-hidden-threads' so the former is correctly detected as - a macro. - -1998-09-06 Dave Love - - * gnus/nnweb.el (require): Wrap requirement of w3 and url in - ignore-errors too, eval'd when compile. Require w3 stuff at load - time for nicer failure if it's not available. - -1998-09-08 00:38:39 Lars Magne Ingebrigtsen - - * time-date.el (time-to-seconds): Renamed. - - * parse-time.el (parse-time-string): Downcase before handling. - (parse-time-rules): Times without seconds have 0 seconds. - - * rfc2047.el (rfc2047-encode-region): New version. - (rfc2047-dissect-region): New function. - -1998-09-07 01:08:35 Lars Magne Ingebrigtsen - - * message.el (message-make-date): Use symbolic zone. - -1998-09-06 23:23:06 Lars Magne Ingebrigtsen - - * time-date.el (parse-time): Always use parse-time. - - * parse-time.el (parse-time-syntax): Use vectors. - -Sun Sep 6 21:19:26 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.17 is released. - -1998-09-06 05:45:17 Lars Magne Ingebrigtsen - - * time-date.el: Renamed from "date". - - * gnus.el: Removed all timezone dependencies. - - * score-mode.el: Removed. - (gnus-score-edit-insert-date): Use date. - - * date.el (float-to-time): New function. - - * nnspool.el (nnspool-seconds-since-epoch): Removed. - - * date.el (time-to-float): New function. - - * message.el (message-make-date): Use format-time-string. - (message-make-expires): Use make-date. - - * gnus-xmas.el (gnus-xmas-seconds-since-epoch): Removed. - - * gnus-util.el (gnus-dd-mmm): Use date. - (gnus-sortable-date): Ditto. - - * message.el (message-make-date): Take an optional time. - - * gnus: Applied patches from 5.6.43. - - * date.el (if): Use parse-time. - - * gnus-score.el (gnus-summary-score-entry): Make into a command - again. - - * gnus-group.el (gnus-group-get-new-news-this-group): Only call if - gnus-agent. - - * gnus.el (gnus-agent-meta-information-header): Moved here. - -1998-09-05 Mike McEwan - - * gnus-agent.el (gnus-agent-scoreable-headers): New variable. - (gnus-agent-fetch-group-1): Score article headers using normal - group score files if the download score rule of a category/group - is `file'. - (gnus-agent-fetch-group-1): Don't parse the entire .overview when - deciding what articles to download. - (gnus-agent-fetch-group-1): Don't push headers through scoring and - predicate processing if predicate is `true' or `false'. - -1998-09-06 01:56:02 Lars Magne Ingebrigtsen - - * gnus-score.el (gnus-score-load-score-alist): Bind coding system. - - * gnus-art.el (gnus-article-setup-buffer): Enable multibyte. - - * score-mode.el (score-mode-coding-system): New variable. - (gnus-score-edit-exit): Use it. - -1998-09-04 Jason R Mastaler - - * drums.el: Corrected typo. - -1998-09-05 23:24:43 Hallvard B. Furuseth - - * mm-bodies.el (mm-body-encoding): Faster version. - -1998-09-05 22:23:03 Lars Magne Ingebrigtsen - - * gnus-art.el (gnus-article-decode-charset): Only decode text - things. - - * message.el (message-output): Use rmail. - - * rfc2047.el (rfc2047-encoded-word-regexp): Allow spaces in the - word part. - - * mm-util.el (mm-charset-to-coding-system): Use - rfc2047-default-charset. - (mm-known-charsets): New variable. - - * message.el (message-caesar-region): Bugged out. - -1998-09-06 Mike McEwan - - * gnus-agent.el (gnus-agent-fetch-group-1): Allow lists when - specifying `agent-predicate' in a group's parameters. - -Sat Sep 5 21:55:01 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.16 is released. - -1998-09-05 17:30:11 Lars Magne Ingebrigtsen - - * nnmail.el (nnmail-expired-article-p): Use predicate. - - * date.el (time-less-p): Renamed. - - * gnus-art.el (gnus-article-decode-charset): Really fetch headers - from the headers. - - * rfc2047.el (rfc2047-decode-region): Use the mm decoding - functions. - - * gnus-group.el (gnus-group-sort-selected-flat): Didn't work at - all. - (gnus-group-sort-selected-groups-by-alphabet): Changed interface - to all functions. - -Sat Sep 5 01:45:52 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.15 is released. - -1998-09-05 00:21:22 Lars Magne Ingebrigtsen - - * date.el: New file. - - * gnus-util.el (gnus-encode-date): Removed. - (gnus-time-less): Ditto. - - * nnmail.el (nnmail-date-to-time): Removed. - (nnmail-time-less): Ditto. - (nnmail-days-to-time): Ditto. - (nnmail-time-since): Ditto. - - * drums.el: New file. - -1998-09-04 00:25:52 Lars Magne Ingebrigtsen - - * message.el (message-encode-message-body): Encode headers with - body encoding. - - * rfc2047.el (rfc2047-default-charset): Renamed. - (rfc2047-encodable-p): Use it. - - * base64.el (mm-util): Required. - -1998-09-03 16:28:30 Lars Magne Ingebrigtsen - - * gnus-msg.el (gnus-post-method): Peel off real info from opened - servers. - - * gnus-util.el (gnus-output-to-rmail): Removed. - - * gnus-art.el (gnus-summary-save-in-rmail): Use - gnus-output-to-rmailrmail-output-to-rmail-file. - - * rfc2047.el (rfc2047-decode-region): Fold case. - (rfc2047-decode): Use decode-string. - - * mm-util.el: Provide mm-char-int. - -Thu Sep 3 15:23:22 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.14 is released. - -1998-09-03 15:08:30 Lars Magne Ingebrigtsen - - * mm-bodies.el (mm-body-encoding): Go through the buffer to make - sure we have 7bit. - -1998-09-02 14:38:18 Lars Magne Ingebrigtsen - - * gnus-msg.el (gnus-post-method): Use opened servers, and remove - ducplicates. - (gnus-inews-insert-mime-headers): Removed. - - * message.el (message-caesar-region): Protect against MULE chars. - -1998-09-02 00:36:23 Hallvard B. Furuseth - - * mm-util.el (if): fset the right function. - -1998-09-02 00:31:53 Lars Magne Ingebrigtsen - - * gnus-art.el (gnus-article-decode-charset): Use real - read-coding-system. - -1998-09-01 17:58:40 Lars Magne Ingebrigtsen - - * mm-bodies.el (mm-decode-body): Protect against malformed - base64. - (mm-decode-body): Check that buffer-file-coding-system is - non-nil. - -Tue Sep 1 10:29:33 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.13 is released. - -1998-09-01 09:14:33 Lars Magne Ingebrigtsen - - * gnus-util.el (gnus-strip-whitespace): Already defined. - Removed. - - * gnus-art.el (gnus-article-decode-charset): Strip whitespace. - - * gnus-util.el (gnus-strip-whitespace): New function. - - * mm-util.el (mm-content-type-charset): Downcase. - -1998-08-31 23:04:29 Lars Magne Ingebrigtsen - - * gnus-art.el (gnus-article-decode-charset): Accept a prefix. - (gnus-article-decode-charset): Don't fetch all headers. - - * mm-util.el (mm-read-coding-system): New function. - - * mm-bodies.el (mm-decode-body): Check the right charset. - - * gnus-sum.el (gnus-summary-mode-line-format): Ditto. - - * gnus-art.el (gnus-article-mode-line-format): Use short group - format. - -Mon Aug 31 23:03:13 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.12 is released. - -1998-08-31 22:39:36 Lars Magne Ingebrigtsen - - * mm-bodies.el (mm-decode-body): Don't do charset unless MULE. - - * gnus-art.el (gnus-article-decode-charset): Supply cte. - (gnus-article-decode-charset): Always run. - - * mm-bodies.el (mm-decode-body): Decode cte. - -Mon Aug 31 22:14:50 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.11 is released. - -1998-08-31 14:27:25 Lars Magne Ingebrigtsen - - * message.el (message-encode-message-body): Ditto. - - * gnus-art.el (gnus-article-decode-mime-words): New command and - keystroke. - (gnus-article-decode-charset): Ditto. - (gnus-article-decode-charset): Only work under MULE. - - * mm-util.el (mm-content-type-charset): New function. - - * nnmail.el (nnmail-delete-incoming): Changed to nil. - - * message.el (message-send-mail): Insert MIME headers. - (message-check-news-body-syntax): Don't warn for escape sequences. - (message-check-news-body-syntax): Insert MIME headers. - - * mm-bodies.el (mm-body-encoding): New function. - - * message.el (message-encode-message-body): New function. - - * mm-bodies.el: New file. - - * mm-util.el (mm-narrow-to-head): New function. - - * rfc2047.el (rfc2047-encode): Use it. - - * mm-util.el: Provide mm-encode-coding-region. - - * gnus-sum.el (gnus-summary-mode): Enable multibyte. - - * gnus-util.el (gnus-set-work-buffer): Enable multibyte. - - * mm-util.el (mm-enable-multibyte): New function. - - * message.el (message-set-work-buffer): Set multibyte. - - * gnus.el (gnus-continuum-version): Be valid forever and ever. - - * gnus-util.el (gnus-point-at-eol): Removed. - (gnus-point-at-bol): Ditto. - - * base64.el (base64-decode-region): Commented out messaging. - -1998-08-31 Didier Verna - - * gnus-msg.el (gnus-group-mail): make it behave like - gnus-group-post-news with regards to the prefix (this enables the - use of posting styles). - -1998-08-31 12:53:32 Lars Magne Ingebrigtsen - - * gnus.el (gnus-article-display-hook): Added - gnus-article-decode-rfc1522 to hook. - -Mon Aug 31 12:43:46 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.10 is released. - -1998-08-31 11:45:13 Lars Magne Ingebrigtsen - - * nnfolder.el (nnfolder-delete-mail): Narrow to mail and allow - hook to be run. - -1998-08-30 17:59:07 Lars Magne Ingebrigtsen - - * rfc2047.el (rfc2047-encodable-p): Use find-charset-region. - - * mm-util.el (mm-charsets-in-region): Removed. - - * rfc2047.el: Renamed file. - - * gnus-msg.el (gnus-copy-article-buffer): Multibyte. - - * message.el (message-mode): Set multibyte. - - * mm-util.el (mm-charsets-in-region): Copied here. - - * gnus-util.el: Removed gnus-truncate-string. - - * gnus-art.el (gnus-article-decode-mime-words): Use 1522. - - * rfc1522.el (rfc1522-unencoded-charsets): New variable. - (rfc1522-encodable-p): New function. - (rfc1522-encode-message-header): Use it. - -Sun Aug 30 17:46:01 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.9 is released. - -1998-08-30 16:13:08 Lars Magne Ingebrigtsen - - * mm-util.el: Shadow encode-coding-string. - - * base64.el (base64-encode-region): Don't add newline. - - * rfc1522.el (rfc1522-narrow-to-field): Copied here. - - * mm-util.el: New file. - - * mm-decode.el: Somewhat depleted. - * mm-encode.el: Ditto. - - * rfc1522.el: New file. - - * mm-util.el (mm-replace-chars-in-string): Copied here. - - * mm-encode.el (mm-q-encode-region): New function. - - * qp.el (quoted-printable-encode-region): Take an optional CLASS - param. - - * mm-encode.el (mm-encode-word-region): Downcase. - -Sun Aug 30 15:28:01 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.8 is released. - -1998-08-30 12:23:03 Lars Magne Ingebrigtsen - - * message.el (message-send-mail): Encode headers. - - * qp.el (quoted-printable-encode-region): Encode 8-bit words. - (quoted-printable-encode-region): Upcase. - - * message.el (message-default-charset): New variable. - - * qp.el (quoted-printable-encode-region): Optional param FOLD. - - * message.el (message-narrow-to-field): Changed name. - - * mm-encode.el: New file. - - * message.el (message-narrow-to-header): New function. - - * gnus-art.el (gnus-article-decode-mime-words): Place point in the - right buffer. - -Sun Aug 30 12:15:54 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.7 is released. - -1998-08-30 01:26:12 Lars Magne Ingebrigtsen - - * gnus.el: Remove autoload for - gnus-article-mime-decode-quoted-printable. - - * mm-decode.el (mm-charset-to-coding-system): Allow iso-8859-1 to - be decoded in non-MULE Emacsen. - - * gnus-xmas.el (gnus-xmas-logo-color-alist): More brown. - -1998-08-29 SL Baur - - * gnus-xmas.el (gnus-xmas-logo-color-alist): Try shades of brown. - -1998-08-30 01:04:57 Lars Magne Ingebrigtsen - - * mm-decode.el: Check for coding-system-list. - -Sun Aug 30 00:59:15 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.6 is released. - -1998-08-30 00:36:28 Lars Magne Ingebrigtsen - - * nnheader.el (fboundp): Protect code-coding-string. - - * gnus-art.el (gnus-article-mode): Check that set-buffer-multibyte - is available. - -Sat Aug 29 23:24:31 1998 Lars Magne Ingebrigtsen - - * gnus.el: Pterodactyl Gnus v0.5 is released. - -1998-08-29 22:38:35 Lars Magne Ingebrigtsen - - * gnus-art.el (gnus-article-mode): Make article buffer multibyte. - (gnus-hack-decode-rfc1522): Removed. - - * mm-decode.el (mm-charset-coding-system-alist): Check better. - -Sat Aug 29 22:20:39 1998 Lars Magne Ingebrigtsen - - * gnus.el: Gnus v0.4 is released. - -1998-08-29 20:53:29 Lars Magne Ingebrigtsen - - * gnus-art.el (gnus-article-decode-mime-words): New command and - keystroke. - - * qp.el (quoted-printable-decode-region): Don't use hexl. - - * gnus-xmas.el (gnus-xmas-logo-color-style): Changed to dino. - - * gnus-sum.el (gnus-parse-headers-hook): Default to nil. - (gnus-structured-field-decoder): Removed. - (gnus-unstructured-field-decoder): Ditto. - - * mm-decode.el: New file. - - * qp.el: New file. - - * gnus-art.el (article-mime-decode-quoted-printable): Removed. - - * gnus-ems.el (fboundp): Removed gnus-split-string. - - * gnus.el (gnus-splash-face): Doc fix. + * mm-decode.el (mm-interactively-view-part): Typo. - * gnus-ems.el (fboundp): Don't bind mail-file-babyl-p. +Thu Sep 24 01:37:30 1998 ZHU Shenghuo - * gnus-art.el (article-mime-decode-quoted-printable): Don't use - hexl. + * mm-decode.el (mm-dissect-multipart): Display last part when the + article has no close-delimiter - * nnheader.el (nnheader-temp-write): Removed. +Thu Sep 24 01:28:54 1998 ZHU Shenghuo -Sat Aug 29 20:34:17 1998 Lars Magne Ingebrigtsen + * mm-decode.el (mm-dissect-buffer): Display parts which have no + content-type. - * gnus.el: Gnus v0.3 is released. +Thu Sep 24 01:23:57 1998 ZHU Shenghuo -Sat Aug 29 19:32:06 1998 Lars Magne Ingebrigtsen + * gnus-art.el (gnus-display-mime): Typo. - * gnus.el: Gnus v0.2 is released. +Thu Sep 24 02:29:57 1998 Lars Mag \ No newline at end of file diff --git a/lisp/base64.el b/lisp/base64.el index c874b22..5abc827 100644 --- a/lisp/base64.el +++ b/lisp/base64.el @@ -162,7 +162,7 @@ base64-encoder-program.") (error "at least %d bits missing at end of base64 encoding" (* (- 4 counter) 6))) (setq done t)) - ((= (char-after (point)) ?=) + ((eq (char-after (point)) ?=) (setq done t) (cond ((= counter 1) (error "at least 2 bits missing at end of base64 encoding")) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 39f1f2f..3a471c0 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -902,6 +902,7 @@ the actual number of articles toggled is returned." (defun gnus-agent-fetch-group-1 (group method) "Fetch GROUP." (let ((gnus-command-method method) + (gnus-newsgroup-name group) gnus-newsgroup-dependencies gnus-newsgroup-headers gnus-newsgroup-scored gnus-headers gnus-score gnus-use-cache articles arts diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index d6fa8ba..ebf596c 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -38,6 +38,18 @@ (require 'alist) (require 'mime-view) +;; Avoid byte-compile warnings. +(eval-when-compile + (defvar gnus-article-decoded-p) + (defvar gnus-article-mime-handles) + (require 'mail-parse) + (require 'mm-bodies) + (require 'mm-decode) + (require 'mm-uu) + (require 'mm-view) + (require 'wid-edit) + ) + (defgroup gnus-article nil "Article display." :link '(custom-manual "(gnus)The Article Buffer") @@ -578,8 +590,25 @@ displayed by the first non-nil matching CONTENT face." ("\264" "'")) "Table for MS-to-Latin1 translation.") +(defcustom gnus-ignored-mime-types '("text/x-vcard") + "List of MIME types that should be ignored by Gnus." + :group 'gnus-mime + :type '(repeat regexp)) + +(defcustom gnus-treat-body-highlight-signature t + "Highlight the signature." + :group 'gnus-article + :type '(choice (const :tag "Off" nil) + (const :tag "On" t) + (const :tag "Last" last) + (integer :tag "Less"))) + ;;; Internal variables +(defvar gnus-treatment-function-alist + '((gnus-treat-body-highlight-signature gnus-article-highlight-signature nil) + )) + (defvar gnus-article-mime-handle-alist nil) (defvar article-lapsed-timer nil) (defvar gnus-article-current-summary nil) @@ -881,7 +910,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (when (search-forward "\n\n" nil t) (let ((buffer-read-only nil)) (while (search-forward "\b" nil t) - (let ((next (following-char)) + (let ((next (char-after)) (previous (char-after (- (point) 2)))) ;; We do the boldification/underlining by hiding the ;; overstrikes and putting the proper text property @@ -1030,7 +1059,7 @@ If PROMPT (the prefix), prompt for a coding system to use." (widen) (forward-line 1) (narrow-to-region (point) (point-max)) - (when (or (not ct) + (when (or (not ctl) (equal (car ctl) "text/plain")) (mm-decode-body charset (and cte (intern (downcase @@ -1057,13 +1086,11 @@ or not." (and type (string-match "quoted-printable" (downcase type)))) (goto-char (point-min)) (search-forward "\n\n" nil 'move) - (quoted-printable-decode-region (point) (point-max)) - (when mm-default-coding-system - (mm-decode-body mm-default-coding-system)))))) - -(defun article-mime-decode-quoted-printable-buffer () - "Decode Quoted-Printable in the current buffer." - (quoted-printable-decode-region (point-min) (point-max))) + (save-restriction + (narrow-to-region (point) (point-max)) + (quoted-printable-decode-region (point-min) (point-max)) + (when mm-default-coding-system + (mm-decode-body mm-default-coding-system))))))) (defun article-hide-pgp (&optional arg) "Toggle hiding of any PGP headers and signatures in the current article. @@ -1315,7 +1342,7 @@ means show, 0 means toggle." (text-property-any (1+ pos) (point-max) 'article-type type))) (if pos 'hidden - 'shown))) + nil))) (defun gnus-article-show-hidden-text (type &optional hide) "Show all hidden text of type TYPE. @@ -1707,7 +1734,7 @@ Directory to save to is default to `gnus-article-save-directory'." (save-excursion (save-restriction (widen) - (rmail-output-to-rmail-file filename)))) + (gnus-output-to-rmail filename)))) filename) (defun gnus-summary-save-in-mail (&optional filename) @@ -2292,9 +2319,9 @@ If ALL-HEADERS is non-nil, no headers are hidden." (mail-content-type-get (mm-handle-type handle) 'filename) "*decoded*"))))) - (set-buffer-major-mode buffer) (switch-to-buffer buffer) (insert contents) + (normal-mode) (goto-char (point-min)))) (defun gnus-mime-inline-part () @@ -2365,7 +2392,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." keymap ,gnus-mime-button-map gnus-callback gnus-mm-display-part gnus-part ,gnus-tmp-id - gnus-type annotation + article-type annotation gnus-data ,handle)) (setq e (point)) (widget-convert-button 'link from to :action 'gnus-widget-press-button @@ -2398,70 +2425,91 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-display-mixed (handles) (let (handle) (while (setq handle (pop handles)) - (gnus-mime-display-single handle)))) + (if (stringp (car handle)) + (if (equal (car handle) "multipart/alternative") + (gnus-mime-display-alternative (cdr handle)) + (gnus-mime-display-mixed (cdr handle))) + (gnus-mime-display-single handle))))) (defun gnus-mime-display-single (handle) - (let (display) - (when (and (mm-automatic-display-p - (car (mm-handle-type handle))) - (mm-inlinable-part-p (car (mm-handle-type handle))) - (or (not (mm-handle-disposition handle)) - (equal (car (mm-handle-disposition handle)) - "inline"))) - (setq display t)) - (let ((id (1+ (length gnus-article-mime-handle-alist)))) - (push (cons id handle) gnus-article-mime-handle-alist) - (gnus-insert-mime-button handle id (list display))) - (insert "\n\n") - (when display - (forward-line -2) - (mm-display-part handle t) - (goto-char (point-max))))) - -(defun gnus-mime-display-alternative (handles &optional preferred) + (let ((type (car (mm-handle-type handle))) + (ignored gnus-ignored-mime-types) + display text) + (catch 'ignored + (progn + (while ignored + (when (string-match (pop ignored) type) + (throw 'ignored nil))) + (if (and (mm-automatic-display-p type) + (mm-inlinable-part-p type) + (or (not (mm-handle-disposition handle)) + (equal (car (mm-handle-disposition handle)) + "inline"))) + (setq display t) + (when (equal (car (split-string type "/")) + "text") + (setq text t))) + (let ((id (1+ (length gnus-article-mime-handle-alist)))) + (push (cons id handle) gnus-article-mime-handle-alist) + (gnus-insert-mime-button handle id (list (or display text)))) + (insert "\n\n") + (cond + (display + (forward-line -2) + (mm-display-part handle t) + (goto-char (point-max))) + (text + (forward-line -2) + (insert "\n") + (mm-insert-inline handle (mm-get-part handle)) + (goto-char (point-max)))))))) + +(defun gnus-mime-display-alternative (handles &optional preferred ibegend) (let* ((preferred (mm-preferred-alternative handles preferred)) (ihandles handles) (point (point)) - handle buffer-read-only from) - (goto-char (point-min)) - (search-forward "\n\n" nil t) - (delete-region (point) (point-max)) - (when preferred - ;; Top-level call; we clean up. - (mm-remove-parts gnus-article-mime-handles) - (setq gnus-article-mime-handles handles - gnus-article-mime-handle-alist nil)) - (while (setq handle (pop handles)) - (gnus-add-text-properties - (setq from (point)) - (progn - (insert (format "[%c] %-18s" - (if (equal handle preferred) ?* ? ) - (if (stringp (car handle)) - (car handle) - (car (mm-handle-type handle))))) - (point)) - `(local-map ,gnus-mime-button-map - ,gnus-mouse-face-prop ,gnus-article-mouse-face - face ,gnus-article-button-face - keymap ,gnus-mime-button-map - gnus-callback - (lambda (handles) - (gnus-mime-display-alternative - ',ihandles ,(if (stringp (car handle)) - (car handle) - (car (mm-handle-type handle))))) - gnus-data ,handle)) - (widget-convert-button 'link from (point) - :action 'gnus-widget-press-button - :button-keymap gnus-widget-button-keymap) - (insert " ")) - (insert "\n\n") - (when preferred - (if (stringp (car preferred)) - (gnus-display-mime preferred) - (mm-display-part preferred))) - (goto-char point))) + handle buffer-read-only from props begend) + (save-restriction + (when ibegend + (narrow-to-region (car ibegend) (cdr ibegend)) + (delete-region (point-min) (point-max)) + (mm-remove-parts handles)) + (setq begend (list (point-marker))) + (while (setq handle (pop handles)) + (gnus-add-text-properties + (setq from (point)) + (progn + (insert (format "[%c] %-18s" + (if (equal handle preferred) ?* ? ) + (if (stringp (car handle)) + (car handle) + (car (mm-handle-type handle))))) + (point)) + `(gnus-callback + (lambda (handles) + (gnus-mime-display-alternative + ',ihandles ,(if (stringp (car handle)) + (car handle) + (car (mm-handle-type handle))) + ',begend)) + local-map ,gnus-mime-button-map + ,gnus-mouse-face-prop ,gnus-article-mouse-face + face ,gnus-article-button-face + keymap ,gnus-mime-button-map + gnus-data ,handle)) + (widget-convert-button 'link from (point) + :action 'gnus-widget-press-button + :button-keymap gnus-widget-button-keymap) + (insert " ")) + (insert "\n\n") + (when preferred + (if (stringp (car preferred)) + (gnus-display-mime preferred) + (mm-display-part preferred) + (goto-char (point-max)) + (setcdr begend (point-marker))))) + (when ibegend + (goto-char point)))) (defun gnus-article-wash-status () "Return a string which display status of article washing." @@ -3557,7 +3605,7 @@ forbidden in URL encoding." gnus-prev-page-line-format nil `(gnus-prev t local-map ,gnus-prev-page-map gnus-callback gnus-article-button-prev-page - gnus-type annotation)))) + article-type annotation)))) (defvar gnus-next-page-map nil) (unless gnus-next-page-map @@ -3588,7 +3636,7 @@ forbidden in URL encoding." `(gnus-next t local-map ,gnus-next-page-map gnus-callback gnus-article-button-next-page - gnus-type annotation)))) + article-type annotation)))) (defun gnus-article-button-next-page (arg) "Go to the next page." @@ -3606,6 +3654,44 @@ forbidden in URL encoding." (gnus-article-prev-page) (select-window win))) +(defvar gnus-decode-header-methods + '(mail-decode-encoded-word-region) + "List of methods used to decode headers + +This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item is +FUNCTION, FUNCTION will be apply to all newsgroups. If item is a +(REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups +whose names match REGEXP. + +For example: +((\"chinese\" . gnus-decode-encoded-word-region-by-guess) + mail-decode-encoded-word-region + (\"chinese\" . rfc1843-decode-region)) +") + +(defvar gnus-decode-header-methods-cache nil) + +(defun gnus-multi-decode-header (start end) + "Apply the functions from `gnus-encoded-word-methods' that match." + (unless (and gnus-decode-header-methods-cache + (eq gnus-newsgroup-name + (car gnus-decode-header-methods-cache))) + (setq gnus-decode-header-methods-cache (list gnus-newsgroup-name)) + (mapc '(lambda (x) + (if (symbolp x) + (nconc gnus-decode-header-methods-cache (list x)) + (if (and gnus-newsgroup-name + (string-match (car x) gnus-newsgroup-name)) + (nconc gnus-decode-header-methods-cache + (list (cdr x)))))) + gnus-decode-header-methods)) + (let ((xlist gnus-decode-header-methods-cache)) + (pop xlist) + (save-restriction + (narrow-to-region start end) + (while xlist + (funcall (pop xlist) (point-min) (point-max)))))) + ;;; @ for mime-view ;;; diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index e1e3d72..b681aa1 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -205,17 +205,7 @@ it's not cached." (beginning-of-line)) (forward-line 1)) (beginning-of-line) - ;; [number subject from date id references chars lines xref] - (insert (format "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n" - (mail-header-number headers) - (mime-fetch-field 'Subject headers) - (mime-fetch-field 'From headers) - (mail-header-date headers) - (mail-header-id headers) - (or (mail-header-references headers) "") - (or (mail-header-chars headers) "") - (or (mail-header-lines headers) "") - (or (mail-header-xref headers) ""))) + (nnheader-insert-nov headers) ;; Update the active info. (set-buffer gnus-summary-buffer) (gnus-cache-update-active group number) @@ -433,7 +423,7 @@ Returns the list of articles removed." (defun gnus-cache-update-article (group article) "If ARTICLE is in the cache, remove it and re-enter it." (gnus-cache-change-buffer group) - (when (gnus-cache-possibly-remove-article article nil nil nil t) + (when (gnus-cache-possibly-remove-article article nil nil nil t) (let ((gnus-use-cache nil)) (gnus-cache-possibly-enter-article gnus-newsgroup-name article (gnus-summary-article-header article) diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 7dd16ff..9b3e2cb 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -164,14 +164,7 @@ (while funcs (unless (fboundp (car funcs)) (fset (car funcs) 'gnus-dummy-func)) - (setq funcs (cdr funcs)))))) - (unless (fboundp 'file-regular-p) - (defun file-regular-p (file) - (and (not (file-directory-p file)) - (not (file-symlink-p file)) - (file-exists-p file)))) - (unless (fboundp 'face-list) - (defun face-list (&rest args)))) + (setq funcs (cdr funcs))))))) (eval-and-compile (let ((case-fold-search t)) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 4d3a312..6c6bb82 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1340,7 +1340,7 @@ If FIRST-TOO, the current line is also eligible as a target." (beginning-of-line) (forward-char (or (cdr (assq 'process gnus-group-mark-positions)) 2)) (subst-char-in-region - (point) (1+ (point)) (following-char) + (point) (1+ (point)) (char-after) (if unmark (progn (setq gnus-group-marked (delete group gnus-group-marked)) diff --git a/lisp/gnus-mailcap.el b/lisp/gnus-mailcap.el index ab71695..6e85b13 100644 --- a/lisp/gnus-mailcap.el +++ b/lisp/gnus-mailcap.el @@ -272,11 +272,12 @@ not.") (defun mailcap-save-binary-file () (goto-char (point-min)) - (let ((file (read-file-name - "Filename to save as: " - (or mailcap-download-directory "~/"))) - (require-final-newline nil)) - (write-region (point-min) (point-max) file) + (unwind-protect + (let ((file (read-file-name + "Filename to save as: " + (or mailcap-download-directory "~/"))) + (require-final-newline nil)) + (write-region (point-min) (point-max) file)) (kill-buffer (current-buffer)))) (defun mailcap-maybe-eval () @@ -360,7 +361,7 @@ If FORCE, re-parse even if already parsed." (downcase-region save-pos (point)) (setq minor (cond - ((= ?* (or (char-after save-pos) 0)) ".*") + ((eq ?* (or (char-after save-pos) 0)) ".*") ((= (point) save-pos) ".*") (t (buffer-substring save-pos (point))))) (skip-chars-forward "; \t\n") @@ -370,7 +371,7 @@ If FORCE, re-parse even if already parsed." (skip-chars-forward "; \t\n") (setq save-pos (point)) (skip-chars-forward "^;\n") - (if (= (or (char-after save-pos) 0) ?') + (if (eq (or (char-after save-pos) 0) ?') (setq viewer (progn (narrow-to-region (1+ save-pos) (point)) (goto-char (point-min)) @@ -411,7 +412,7 @@ If FORCE, re-parse even if already parsed." (downcase-region name-pos (point)) (setq name (buffer-substring name-pos (point))) (skip-chars-forward " \t\n") - (if (/= (or (char-after (point)) 0) ?=) ; There is no value + (if (not (eq (or (char-after (point)) 0) ?=)) ; There is no value (setq value nil) (skip-chars-forward " \t\n=") (setq val-pos (point)) @@ -425,7 +426,7 @@ If FORCE, re-parse even if already parsed." (error (goto-char (point-max))))) (while (not done) (skip-chars-forward "^;") - (if (= (or (char-after (1- (point))) 0) ?\\ ) + (if (eq (or (char-after (1- (point))) 0) ?\\ ) (progn (subst-char-in-region (1- (point)) (point) ?\\ ? ) (skip-chars-forward ";")) @@ -441,7 +442,9 @@ If FORCE, re-parse even if already parsed." (test (assq 'test info)) ; The test clause ) (setq status (and test (split-string (cdr test) " "))) - (if (and (assoc "needsx11" info) (not (getenv "DISPLAY"))) + (if (and (or (assoc "needsterm" info) + (assoc "needsx11" info)) + (not (getenv "DISPLAY"))) (setq status nil) (cond ((and (equal (nth 0 status) "test") diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 06e76af..96c6b66 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -411,7 +411,7 @@ header line with the old Message-ID." ;; Delete the headers from the displayed articles. (set-buffer gnus-article-copy) (delete-region (goto-char (point-min)) - (or (search-forward "\n\n" nil t) (point))) + (or (search-forward "\n\n" nil t) (point-max))) ;; Insert the original article headers. (insert-buffer-substring gnus-original-article-buffer beg end) (article-decode-encoded-words))) diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index 7535a25..8659779 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -271,7 +271,7 @@ matches an previously scanned and verified nocem message." gnus-nocem-real-group-hashtb) ;; Valid group. (beginning-of-line) - (while (= (following-char) ?\t) + (while (eq (char-after) ?\t) (forward-line -1)) (setq id (buffer-substring (point) (1- (search-forward "\t")))) (unless (gnus-gethash id gnus-nocem-hashtb) @@ -279,7 +279,7 @@ matches an previously scanned and verified nocem message." (gnus-sethash id t gnus-nocem-hashtb) (push id ncm)) (forward-line 1) - (while (= (following-char) ?\t) + (while (eq (char-after) ?\t) (forward-line 1)))))) (when ncm (setq gnus-nocem-touched-alist t) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index 68d0f3c..b50341d 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -705,7 +705,7 @@ Two predefined functions are available: (while (progn (forward-line -1) (forward-char col) - (= (following-char) ? )) + (eq (char-after) ? )) (delete-char 1) (insert (caddr gnus-tree-parent-child-edges))) (goto-char beg))) @@ -763,7 +763,7 @@ Two predefined functions are available: (forward-char -1) ;; Draw "-" lines leftwards. (while (and (> (point) 1) - (= (char-after (1- (point))) ? )) + (eq (char-after (1- (point))) ? )) (delete-char -1) (insert (car gnus-tree-parent-child-edges)) (forward-char -1)) diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 1a6b2f0..e78ef4b 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -205,9 +205,7 @@ (gnus-parse-format new-format (symbol-value - (intern (format "gnus-%s-line-format-alist" - (if (eq type 'article-mode) - 'summary-mode type)))) + (intern (format "gnus-%s-line-format-alist" type))) (not (string-match "mode$" (symbol-name type)))))) ;; Enter the new format spec into the list. (if entry @@ -254,6 +252,12 @@ by `gnus-xmas-redefine'." (let ((val (if (symbolp el) (eval el) el))) (` (, val)))) +(defun gnus-balloon-face-function (form type) + `(gnus-put-text-property + (point) (progn ,@form (point)) + 'balloon-help + ,(intern (format "gnus-balloon-face-%d" type)))) + (defun gnus-tilde-max-form (el max-width) "Return a form that limits EL to MAX-WIDTH." (let ((max (abs max-width))) @@ -300,8 +304,10 @@ by `gnus-xmas-redefine'." ;; SPEC-ALIST and returns a list that can be eval'ed to return the ;; string. If the FORMAT string contains the specifiers %( and %) ;; the text between them will have the mouse-face text property. + ;; If the FORMAT string contains the specifiers %< and %>, the text between + ;; them will have the balloon-help text property. (if (string-match - "\\`\\(.*\\)%[0-9]?[{(]\\(.*\\)%[0-9]?[})]\\(.*\n?\\)\\'" + "\\`\\(.*\\)%[0-9]?[{(<]\\(.*\\)%[0-9]?[})>]\\(.*\n?\\)\\'" format) (gnus-parse-complex-format format spec-alist) ;; This is a simple format. @@ -316,13 +322,17 @@ by `gnus-xmas-redefine'." (replace-match "\\\"" nil t)) (goto-char (point-min)) (insert "(\"") - (while (re-search-forward "%\\([0-9]+\\)?\\([{}()]\\)" nil t) + (while (re-search-forward "%\\([0-9]+\\)?\\([{}()<>]\\)" nil t) (let ((number (if (match-beginning 1) (match-string 1) "0")) (delim (aref (match-string 2) 0))) (if (or (= delim ?\() - (= delim ?\{)) - (replace-match (concat "\"(" (if (= delim ?\() "mouse" "face") + (= delim ?\{) + (= delim ?\<)) + (replace-match (concat "\"(" + (cond ((= delim ?\() "mouse") + ((= delim ?\{) "face") + (t "balloon")) " " number " \"")) (replace-match "\")\"")))) (goto-char (point-max)) @@ -404,9 +414,9 @@ by `gnus-xmas-redefine'." (t nil))) ;; User-defined spec -- find the spec name. - (when (= (setq spec (following-char)) ?u) + (when (eq (setq spec (char-after)) ?u) (forward-char 1) - (setq user-defined (following-char))) + (setq user-defined (char-after))) (forward-char 1) (delete-region spec-beg (point)) @@ -536,7 +546,7 @@ If PROPS, insert the result." (not (eq 'byte-code (car form))) ;; Under XEmacs, it's (funcall #) (not (and (eq 'funcall (car form)) - (compiled-function-p (cadr form))))) + (byte-code-function-p (cadr form))))) (fset 'gnus-tmp-func `(lambda () ,form)) (byte-compile 'gnus-tmp-func) (setcar (cddr entry) (gnus-byte-code 'gnus-tmp-func)))))) diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index 849a2da..560c0e9 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -706,7 +706,7 @@ buffer. (save-excursion (beginning-of-line) ;; If this group it killed, then we want to subscribe it. - (when (= (following-char) ?K) + (when (eq (char-after) ?K) (setq sub t)) (setq group (gnus-browse-group-name)) (when (and sub diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 66b1ac4..de4564e 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1103,8 +1103,7 @@ for new groups, and subscribe the new groups as zombies." got-new)) (defun gnus-check-first-time-used () - (if (or (> (length gnus-newsrc-alist) 1) - (file-exists-p gnus-startup-file) + (if (or (file-exists-p gnus-startup-file) (file-exists-p (concat gnus-startup-file ".el")) (file-exists-p (concat gnus-startup-file ".eld"))) nil @@ -1705,7 +1704,6 @@ newsgroup." (gnus-message 5 "%sdone" mesg)))))) (setq methods (cdr methods)))))) - (defun gnus-ignored-newsgroups-has-to-p () "Non-nil iff gnus-ignored-newsgroups includes \"^to\\\\.\" as an element." ;; note this regexp is the same as: @@ -1772,13 +1770,13 @@ newsgroup." (progn (skip-chars-forward " \t") (not - (or (= (following-char) ?=) - (= (following-char) ?x) - (= (following-char) ?j))))) + (or (eq (char-after) ?=) + (eq (char-after) ?x) + (eq (char-after) ?j))))) (progn (set group (cons min max)) ;; if group is moderated, stick in moderation table - (when (= (following-char) ?m) + (when (eq (char-after) ?m) (unless gnus-moderated-hashtb (setq gnus-moderated-hashtb (gnus-make-hashtable))) (gnus-sethash (symbol-name group) t @@ -1836,7 +1834,7 @@ newsgroup." (let (min max group) (while (not (eobp)) (condition-case () - (when (= (following-char) ?2) + (when (eq (char-after) ?2) (read cur) (read cur) (setq min (read cur) max (read cur)) @@ -2053,7 +2051,7 @@ If FORCE is non-nil, the .newsrc file is read." (unless (boundp symbol) (set symbol nil)) ;; It was a group name. - (setq subscribed (= (following-char) ?:) + (setq subscribed (eq (char-after) ?:) group (symbol-name symbol) reads nil) (if (eolp) @@ -2077,7 +2075,7 @@ If FORCE is non-nil, the .newsrc file is read." (read buf))) (widen) ;; If the next character is a dash, then this is a range. - (if (= (following-char) ?-) + (if (eq (char-after) ?-) (progn ;; We read the upper bound of the range. (forward-char 1) @@ -2099,8 +2097,8 @@ If FORCE is non-nil, the .newsrc file is read." (push num1 reads)) ;; If the next char in ?\n, then we have reached the end ;; of the line and return nil. - (/= (following-char) ?\n)) - ((= (following-char) ?\n) + (not (eq (char-after) ?\n))) + ((eq (char-after) ?\n) ;; End of line, so we end. nil) (t @@ -2226,7 +2224,7 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-point-at-eol))) ;; Search for all "words"... (while (re-search-forward "[^ \t,\n]+" eol t) - (if (= (char-after (match-beginning 0)) ?!) + (if (eq (char-after (match-beginning 0)) ?!) ;; If the word begins with a bang (!), this is a "not" ;; spec. We put this spec (minus the bang) and the ;; symbol `ignore' into the list. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 10a135f..d295a4f 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -37,6 +37,12 @@ (require 'gnus-util) (require 'mime-view) +;; Avoid byte-compile warnings. +(eval-when-compile + (defvar gnus-article-decoded-p) + (defvar gnus-decode-encoded-word-function) + ) + (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t) (autoload 'gnus-set-summary-default-charset "gnus-i18n" nil t) @@ -779,6 +785,16 @@ mark: The articles mark." The function is called with one parameter, the article header vector, which it may alter in any way.") +(defcustom gnus-extra-headers nil + "*Extra headers to parse." + :group 'gnus-summary + :type '(repeat symbol)) + +(defcustom gnus-ignored-from-addresses nil + "*Regexp of From headers that may be suppressed in favor of To headers." + :group 'gnus-summary + :type 'regexp) + ;;; Internal variables (defvar gnus-scores-exclude-files nil) @@ -838,6 +854,7 @@ which it may alter in any way.") (?l (bbb-grouplens-score gnus-tmp-header) ?s) (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d) (?U gnus-tmp-unread ?c) + (?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header) ?s) (?t (gnus-summary-number-of-articles-in-thread (and (boundp 'thread) (car thread)) gnus-tmp-level) ?d) @@ -2229,7 +2246,7 @@ marks of articles." (while (setq point (pop config)) (when (and (< point (point-max)) (goto-char point) - (= (following-char) ?\n)) + (eq (char-after) ?\n)) (subst-char-in-region point (1+ point) ?\n ?\r))))) ;; Various summary mode internalish functions. @@ -2363,7 +2380,7 @@ marks of articles." (let ((gnus-summary-line-format-spec spec) (gnus-newsgroup-downloadable '((0 . t)))) (gnus-summary-insert-line - (make-full-mail-header 0 "" "" "" "" "" 0 0 "") + (make-full-mail-header 0 "" "" "" "" "" 0 0 "" nil) 0 nil 128 t nil "" nil 1) (goto-char (point-min)) (setq pos (list (cons 'unread (and (search-forward "\200" nil t) @@ -2388,6 +2405,27 @@ marks of articles." (point) (progn (eval gnus-summary-dummy-line-format-spec) (point)) (list 'gnus-number gnus-tmp-number 'gnus-intangible gnus-tmp-number))) +(defun gnus-summary-from-or-to-or-newsgroups (header) + (let ((to (cdr (assq 'To (mail-header-extra header)))) + (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header))))) + (cond + ((and to + gnus-ignored-from-addresses + (string-match gnus-ignored-from-addresses + (mail-header-from header))) + (or (car (funcall gnus-extract-address-components + (funcall gnus-decode-encoded-word-function to))) + (funcall gnus-decode-encoded-word-function to))) + ((and newsgroups + gnus-ignored-from-addresses + (string-match gnus-ignored-from-addresses + (mail-header-from header))) + newsgroups) + (t + (or (car (funcall gnus-extract-address-components + (mail-header-from header))) + (mail-header-from header)))))) + (defun gnus-summary-insert-line (gnus-tmp-header gnus-tmp-level gnus-tmp-current gnus-tmp-unread gnus-tmp-replied @@ -3034,12 +3072,9 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (setq heads nil))))) gnus-newsgroup-dependencies))) -;; The following macros and functions were written by Felix Lee -;; . - (defmacro gnus-nov-read-integer () '(prog1 - (if (= (following-char) ?\t) + (if (eq (char-after) ?\t) 0 (let ((num (ignore-errors (read buffer)))) (if (numberp num) num 0))) @@ -3052,6 +3087,16 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (defmacro gnus-nov-field () '(buffer-substring (point) (if (gnus-nov-skip-field) (1- (point)) eol))) +(defmacro gnus-nov-parse-extra () + '(let (out string) + (while (not (memq (char-after) '(?\n nil))) + (setq string (gnus-nov-field)) + (when (string-match "^\\([^ :]\\): " string) + (push (cons (intern (match-string 1)) + (substring string (match-end 0))) + out))) + out)) + ;; This function has to be called with point after the article number ;; on the beginning of the line. (defsubst gnus-nov-parse-line (number dependencies &optional force-new) @@ -3077,8 +3122,9 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (gnus-nov-field) ; refs (gnus-nov-read-integer) ; chars (gnus-nov-read-integer) ; lines - (unless (= (following-char) ?\n) - (gnus-nov-field))))) ; misc + (unless (eq (char-after) ?\n) + (gnus-nov-field)) ; misc + (gnus-nov-parse-extra)))) ; extra (widen)) @@ -3555,6 +3601,12 @@ Unscored articles will be counted as having a score of zero." (defvar gnus-tmp-root-expunged nil) (defvar gnus-tmp-dummy-line nil) +(defvar gnus-tmp-header) +(defun gnus-extra-header (type &optional header) + "Return the extra header of TYPE." + (or (cdr (assq type (mail-header-extra (or header gnus-tmp-header)))) + "")) + (defun gnus-summary-prepare-threads (threads) "Prepare summary buffer from THREADS and indentation LEVEL. THREADS is either a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...])' @@ -4165,7 +4217,9 @@ If SELECT-ARTICLES, only select those articles from GROUP." "This function sets the mode line of the article or summary buffers. If WHERE is `summary', the summary mode line format will be used." ;; Is this mode line one we keep updated? - (when (memq where gnus-updated-mode-lines) + (when (and (memq where gnus-updated-mode-lines) + (symbol-value + (intern (format "gnus-%s-mode-line-format-spec" where)))) (let (mode-string) (save-excursion ;; We evaluate this in the summary buffer since these @@ -4491,7 +4545,19 @@ The resulting hash table is returned, or nil if no Xrefs were found." (progn (goto-char p) (and (search-forward "\nxref: " nil t) - (nnheader-header-value))))) + (nnheader-header-value))) + ;; Extra. + (when gnus-extra-headers + (let ((extra gnus-extra-headers) + out) + (while extra + (goto-char p) + (when (search-forward + (concat "\n" (symbol-name (car extra)) ": ") nil t) + (push (cons (car extra) (nnheader-header-value)) + out)) + (pop extra)) + out)))) (goto-char p) (if (and (search-forward "\ncontent-type: " nil t) (setq ctype (nnheader-header-value))) @@ -4580,7 +4646,7 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." (save-restriction (nnheader-narrow-to-headers) (goto-char (point-min)) - (when (or (and (eq (downcase (following-char)) ?x) + (when (or (and (eq (downcase (char-after)) ?x) (looking-at "Xref:")) (search-forward "\nXref:" nil t)) (goto-char (1+ (match-end 0))) @@ -7637,6 +7703,7 @@ If N is negative, mark backwards instead. Mark with MARK, ?r by default. The difference between N and the actual number of articles marked is returned." (interactive "p") + (gnus-summary-show-thread) (let ((backward (< n 0)) (gnus-summary-goto-unread (and gnus-summary-goto-unread @@ -7799,19 +7866,19 @@ marked." (let ((forward (cdr (assq type gnus-summary-mark-positions))) (buffer-read-only nil)) (re-search-backward "[\n\r]" (gnus-point-at-bol) 'move-to-limit) - (when (looking-at "\r") - (incf forward)) - (when (and forward - (<= (+ forward (point)) (point-max))) - ;; Go to the right position on the line. - (goto-char (+ forward (point))) - ;; Replace the old mark with the new mark. - (subst-char-in-region (point) (1+ (point)) (following-char) mark) - ;; Optionally update the marks by some user rule. - (when (eq type 'unread) - (gnus-data-set-mark - (gnus-data-find (gnus-summary-article-number)) mark) - (gnus-summary-update-line (eq mark gnus-unread-mark)))))) + (when forward + (when (looking-at "\r") + (incf forward)) + (when (<= (+ forward (point)) (point-max)) + ;; Go to the right position on the line. + (goto-char (+ forward (point))) + ;; Replace the old mark with the new mark. + (subst-char-in-region (point) (1+ (point)) (char-after) mark) + ;; Optionally update the marks by some user rule. + (when (eq type 'unread) + (gnus-data-set-mark + (gnus-data-find (gnus-summary-article-number)) mark) + (gnus-summary-update-line (eq mark gnus-unread-mark))))))) (defun gnus-mark-article-as-read (article &optional mark) "Enter ARTICLE in the pertinent lists and remove it from others." @@ -8615,6 +8682,7 @@ save those articles instead." (defun gnus-valid-move-group-p (group) (and (boundp group) (symbol-name group) + (symbol-value group) (memq 'respool (assoc (symbol-name (car (gnus-find-method-for-group diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 3f2b2af..c3dd816 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -444,7 +444,8 @@ articles in the topic and its subtopics." (if (stringp entry) ;; Dead groups. (gnus-group-insert-group-line - entry (if (member entry gnus-zombie-list) gnus-level-zombie gnus-level-killed) + entry (if (member entry gnus-zombie-list) + gnus-level-zombie gnus-level-killed) nil (- (1+ (cdr (setq active (gnus-active entry)))) (car active)) nil) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 570c037..fe3f92f 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -653,7 +653,7 @@ with potentially long computations." (setq filename (expand-file-name filename)) (setq rmail-default-rmail-file filename) (let ((artbuf (current-buffer)) - (tmpbuf (gnus-get-buffer-create " *Gnus-output*"))) + (tmpbuf (get-buffer-create " *Gnus-output*"))) (save-excursion (or (get-file-buffer filename) (file-exists-p filename) @@ -704,7 +704,7 @@ with potentially long computations." "Append the current article to a mail file named FILENAME." (setq filename (expand-file-name filename)) (let ((artbuf (current-buffer)) - (tmpbuf (gnus-get-buffer-create " *Gnus-output*"))) + (tmpbuf (get-buffer-create " *Gnus-output*"))) (save-excursion ;; Create the file, if it doesn't exist. (when (and (not (get-file-buffer filename)) diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index afd1476..79d0a05 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -247,6 +247,7 @@ call it with the value of the `gnus-data' text property." (let* ((pos (event-closest-point event)) (data (get-text-property pos 'gnus-data)) (fun (get-text-property pos 'gnus-callback))) + (goto-char pos) (when fun (funcall fun data)))) @@ -434,7 +435,7 @@ call it with the value of the `gnus-data' text property." (defun gnus-byte-code (func) "Return a form that can be `eval'ed based on FUNC." (let ((fval (indirect-function func))) - (if (compiled-function-p fval) + (if (byte-code-function-p fval) (list 'funcall fval) (cons 'progn (cdr (cdr fval)))))) @@ -910,7 +911,6 @@ XEmacs compatibility workaround." (goto-char (event-point event)) (funcall (event-function response) (event-object response)))) - (provide 'gnus-xmas) ;;; gnus-xmas.el ends here diff --git a/lisp/gnus.el b/lisp/gnus.el index 5cc77f0..db28904 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -247,6 +247,10 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Various Various") :group 'gnus) +(defgroup gnus-mime nil + "Variables for controlling the Gnus MIME interface." + :group 'gnus) + (defgroup gnus-exit nil "Exiting gnus." :link '(custom-manual "(gnus)Exiting Gnus") @@ -255,10 +259,10 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "T-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.10.026" +(defconst gnus-version-number "6.10.027" "Version number for this version of gnus.") -(defconst gnus-original-version-number "0.36" +(defconst gnus-original-version-number "0.40" "Version number for this version of Gnus.") (defconst gnus-original-product-name "Pterodactyl Gnus" @@ -1578,7 +1582,6 @@ This variable can be nil, gnus or gnus-ja." '((gnus-group-mode "The Group Buffer") (gnus-summary-mode "The Summary Buffer") (gnus-article-mode "The Article Buffer") - (mime/viewer-mode "The Article Buffer") (gnus-server-mode "The Server Buffer") (gnus-browse-mode "Browse Foreign Server") (gnus-tree-mode "Tree Display")) @@ -1671,9 +1674,9 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") message-send-and-exit message-yank-original) ("nnmail" nnmail-split-fancy nnmail-article-group) ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers) - ("rmailout" rmail-output) + ("rmailout" rmail-output rmail-output-to-rmail-file) ("rmail" rmail-insert-rmail-file-header rmail-count-new-messages - rmail-show-message rmail-output-to-rmail-file) + rmail-show-message) ("gnus-audio" :interactive t gnus-audio-play) ("gnus-xmas" gnus-xmas-splash) ("gnus-soup" :interactive t @@ -1741,7 +1744,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view gnus-uu-decode-binhex-view gnus-uu-unmark-thread - gnus-uu-mark-over) + gnus-uu-mark-over gnus-uu-post-news) ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh gnus-uu-unmark-thread) ("gnus-msg" (gnus-summary-send-map keymap) @@ -1839,6 +1842,7 @@ with some simple extensions. %a Extracted name of the poster (string) %A Extracted address of the poster (string) %F Contents of the From: header (string) +%f Contents of the From: or To: headers (string) %x Contents of the Xref: header (string) %D Date of the article (string) %d Date of the article (string) in DD-MMM format diff --git a/lisp/ietf-drums.el b/lisp/ietf-drums.el index 2ef7d61..713b14a 100644 --- a/lisp/ietf-drums.el +++ b/lisp/ietf-drums.el @@ -102,7 +102,7 @@ (let (c) (ietf-drums-init string) (while (not (eobp)) - (setq c (following-char)) + (setq c (char-after)) (cond ((eq c ?\") (forward-sexp 1)) @@ -118,7 +118,7 @@ (ietf-drums-init string) (let (c) (while (not (eobp)) - (setq c (following-char)) + (setq c (char-after)) (cond ((eq c ?\") (forward-sexp 1)) @@ -136,7 +136,7 @@ (ietf-drums-init string) (let (result c) (while (not (eobp)) - (setq c (following-char)) + (setq c (char-after)) (cond ((eq c ?\") (forward-sexp 1)) @@ -155,7 +155,7 @@ (let (display-name mailbox c display-string) (ietf-drums-init string) (while (not (eobp)) - (setq c (following-char)) + (setq c (char-after)) (cond ((or (eq c ? ) (eq c ?\t)) @@ -196,7 +196,7 @@ (let ((beg (point)) pairs c) (while (not (eobp)) - (setq c (following-char)) + (setq c (char-after)) (cond ((memq c '(?\" ?< ?\()) (forward-sexp 1)) diff --git a/lisp/mailheader.el b/lisp/mailheader.el index 5e2b097..6eb5669 100644 --- a/lisp/mailheader.el +++ b/lisp/mailheader.el @@ -60,7 +60,7 @@ that name." start end) (while (and (setq start (point)) (> (skip-chars-forward "^\0- :") 0) - (= (following-char) ?:) + (eq (char-after) ?:) (setq end (point)) (progn (forward-char) (> (skip-chars-forward " \t") 0))) diff --git a/lisp/message.el b/lisp/message.el index 650647d..584265e 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -48,6 +48,13 @@ (require 'mailabbrev)) (require 'mime-edit) +;; Avoid byte-compile warnings. +(eval-when-compile + (require 'mail-parse) + (require 'mm-bodies) + (require 'mm-encode) + ) + (defgroup message '((user-mail-address custom-variable) (user-full-name custom-variable)) "Mail and news message composing." @@ -1121,12 +1128,12 @@ The cdr of ech entry is a function for applying the face to a region.") (not paren)))) (push (buffer-substring beg (point)) elems) (setq beg (match-end 0))) - ((= (following-char) ?\") + ((eq (char-after) ?\") (setq quoted (not quoted))) - ((and (= (following-char) ?\() + ((and (eq (char-after) ?\() (not quoted)) (setq paren t)) - ((and (= (following-char) ?\)) + ((and (eq (char-after) ?\)) (not quoted)) (setq paren nil)))) (nreverse elems))))) @@ -2813,7 +2820,7 @@ to find out how to use this." (while (not (eobp)) (when (not (looking-at "[ \t\n]")) (setq sum (logxor (ash sum 1) (if (natnump sum) 0 1) - (following-char)))) + (char-after)))) (forward-char 1))) sum)) @@ -3250,7 +3257,7 @@ Headers already prepared in the buffer are not modified." (progn ;; The header was found. We insert a space after the ;; colon, if there is none. - (if (/= (following-char) ? ) (insert " ") (forward-char 1)) + (if (/= (char-after) ? ) (insert " ") (forward-char 1)) ;; Find out whether the header is empty... (looking-at "[ \t]*$"))) ;; So we find out what value we should insert. @@ -3359,7 +3366,7 @@ Headers already prepared in the buffer are not modified." (goto-char (point-min)) (while (not (eobp)) (skip-chars-forward "^,\"" (point-max)) - (if (or (= (following-char) ?,) + (if (or (eq (char-after) ?,) (eobp)) (when (not quoted) (if (and (> (current-column) 78) @@ -3430,7 +3437,7 @@ Headers already prepared in the buffer are not modified." (search-backward ":" ) (widen) (forward-char 1) - (if (= (following-char) ? ) + (if (eq (char-after) ? ) (forward-char 1) (insert " "))) (t @@ -4337,7 +4344,7 @@ which specify the range to operate on." (goto-char (min start end)) (while (< (point) end1) (or (looking-at "[_\^@- ]") - (insert (following-char) "\b")) + (insert (char-after) "\b")) (forward-char 1))))) ;;;###autoload @@ -4351,7 +4358,7 @@ which specify the range to operate on." (move-marker end1 (max start end)) (goto-char (min start end)) (while (re-search-forward "\b" end1 t) - (if (eq (following-char) (char-after (- (point) 2))) + (if (eq (char-after) (char-after (- (point) 2))) (delete-char -2)))))) (defalias 'message-exchange-point-and-mark 'exchange-point-and-mark) diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index 261d05b..b7611c3 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -62,7 +62,7 @@ If no encoding was done, nil is returned." (not (mm-coding-system-equal mime-charset buffer-file-coding-system))) (while (not (eobp)) - (if (eq (char-charset (following-char)) 'ascii) + (if (eq (char-charset (char-after)) 'ascii) (when start (save-restriction (narrow-to-region start (point)) @@ -121,7 +121,8 @@ If no encoding was done, nil is returned." (funcall encoding (point-min) (point-max)) (error nil))) (t - (error "Can't decode encoding %s" encoding)))) + (message "Unknown encoding %s; defaulting to 8bit" encoding) + ))) (defun mm-decode-body (charset &optional encoding) "Decode the current article that has been encoded with ENCODING. @@ -135,6 +136,7 @@ The characters in CHARSET should then be decoded." (when (and charset (setq mule-charset (mm-charset-to-coding-system charset)) buffer-file-coding-system + enable-multibyte-characters (or (not (eq mule-charset 'ascii)) (setq mule-charset rfc2047-default-charset))) (mm-decode-coding-region (point-min) (point-max) mule-charset)))))) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 24d3de7..6344209 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -56,7 +56,7 @@ ("text/plain" mm-inline-text t) ("text/enriched" mm-inline-text t) ("text/richtext" mm-inline-text t) - ("text/html" mm-inline-text (featurep 'w3)) + ("text/html" mm-inline-text (locate-library "w3")) ("message/delivery-status" mm-inline-text t) ("audio/wav" mm-inline-audio (and (or (featurep 'nas-sound) (featurep 'native-sound)) @@ -200,8 +200,13 @@ (when (or user-method method (not no-default)) - (mm-display-external - handle (or user-method method 'mailcap-save-binary-file)))))))) + (if (and (not user-method) + (not method) + (equal "text" (car (split-string type)))) + (mm-insert-inline handle (mm-get-part handle)) + (mm-display-external + handle (or user-method method + 'mailcap-save-binary-file))))))))) (defun mm-display-external (handle method) "Display HANDLE using METHOD." @@ -212,7 +217,9 @@ (if (functionp method) (let ((cur (current-buffer))) (if (eq method 'mailcap-save-binary-file) - (set-buffer (generate-new-buffer "*mm*")) + (progn + (set-buffer (generate-new-buffer "*mm*")) + (setq method nil)) (let ((win (get-buffer-window cur t))) (when win (select-window win))) @@ -220,8 +227,13 @@ (buffer-disable-undo) (mm-set-buffer-file-coding-system 'no-conversion) (insert-buffer-substring cur) - (funcall method) - (mm-handle-set-undisplayer handle (current-buffer))) + (message "Viewing with %s" method) + (let ((mm (current-buffer))) + (unwind-protect + (if method + (funcall method) + (mm-save-part handle)) + (mm-handle-set-undisplayer handle mm)))) (let* ((dir (make-temp-name (expand-file-name "emm." mm-tmp-directory))) (filename (mail-content-type-get (mm-handle-disposition handle) 'filename)) @@ -238,18 +250,20 @@ (setq file (make-temp-name (expand-file-name "mm." dir)))) (write-region (point-min) (point-max) file nil 'nomesg nil 'no-conversion) - (setq process - (if needsterm - (start-process "*display*" nil - "xterm" - "-e" shell-file-name "-c" - (format method - (mm-quote-arg file))) - (start-process "*display*" (generate-new-buffer "*mm*") - shell-file-name - "-c" (format method - (mm-quote-arg file))))) - (mm-handle-set-undisplayer handle (cons file process)) + (message "Viewing with %s" method) + (unwind-protect + (setq process + (if needsterm + (start-process "*display*" nil + "xterm" + "-e" shell-file-name "-c" + (format method + (mm-quote-arg file))) + (start-process "*display*" (generate-new-buffer "*mm*") + shell-file-name + "-c" (format method + (mm-quote-arg file))))) + (mm-handle-set-undisplayer handle (cons file process))) (message "Displaying %s..." (format method file)))))) (defun mm-remove-parts (handles) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index f7c7ed5..79454d0 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -168,7 +168,8 @@ used as the line break code type of the coding system." (defsubst mm-enable-multibyte () "Enable multibyte in the current buffer." - (when (fboundp 'set-buffer-multibyte) + (when (and (fboundp 'set-buffer-multibyte) + (default-value enable-multibyte-characters)) (set-buffer-multibyte t))) (defsubst mm-disable-multibyte () @@ -206,20 +207,21 @@ See also `with-temp-file' and `with-output-to-string'." (with-temp-buffer ,@forms) (let ((,multibyte (default-value enable-multibyte-characters)) ,temp-buffer) - (setq-default enable-multibyte-characters nil) - (setq ,temp-buffer - (get-buffer-create (generate-new-buffer-name " *temp*"))) (unwind-protect - (with-current-buffer ,temp-buffer - (let (buffer-file-coding-system) - ,@forms)) - (and (buffer-name ,temp-buffer) - (kill-buffer ,temp-buffer)) + (progn + (setq-default enable-multibyte-characters nil) + (setq ,temp-buffer + (get-buffer-create (generate-new-buffer-name " *temp*"))) + (unwind-protect + (with-current-buffer ,temp-buffer + (let (buffer-file-coding-system) + ,@forms)) + (and (buffer-name ,temp-buffer) + (kill-buffer ,temp-buffer)))) (setq-default enable-multibyte-characters ,multibyte)))))) (put 'mm-with-unibyte-buffer 'lisp-indent-function 0) (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body)) - (provide 'mm-util) ;;; mm-util.el ends here diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index c3448e4..5247559 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -2,7 +2,7 @@ ;; Copyright (c) 1998 by Shenghuo Zhu ;; Author: Shenghuo Zhu -;; $Revision: 1.1.2.1 $ +;; $Revision: 1.1.2.2 $ ;; Keywords: news postscript uudecode binhex shar ;; This file is not part of GNU Emacs, but the same permissions @@ -76,6 +76,7 @@ (save-restriction (mail-narrow-to-head) (goto-char (point-max))) + (forward-line) (let ((text-start (point)) start-char end-char type file-name end-line result) (while (re-search-forward mm-uu-begin-line nil t) @@ -94,6 +95,7 @@ (intern (concat "mm-uu-" (symbol-name type) "-end-line")))) (when (re-search-forward end-line nil t) + (forward-line) (setq end-char (point)) (when (or (not (eq type 'binhex)) (setq file-name @@ -137,13 +139,14 @@ '("application/x-shar") nil nil nil nil))) result) (setq text-start end-char)))) - (if (and result - (> start-char text-start)) - (push - (list (mm-uu-copy-to-buffer text-start (point-max)) - '("text/plain") nil nil nil nil) - result)) - (nreverse result)))) + (when result + (if (> (point-max) (1+ text-start)) + (push + (list (mm-uu-copy-to-buffer text-start (point-max)) + '("text/plain") nil nil nil nil) + result)) + (setq result (cons "multipart/mixed" (nreverse result)))) + result))) (provide 'mm-uu) diff --git a/lisp/nndoc.el b/lisp/nndoc.el index d80012b..9194fec 100644 --- a/lisp/nndoc.el +++ b/lisp/nndoc.el @@ -188,7 +188,7 @@ from the document.") (insert-buffer-substring nndoc-current-buffer (car entry) (nth 1 entry))) (goto-char (point-max)) - (unless (= (char-after (1- (point))) ?\n) + (unless (eq (char-after (1- (point))) ?\n) (insert "\n")) (insert (format "Lines: %d\n" (nth 4 entry))) (insert ".\n"))) @@ -693,7 +693,7 @@ PARENT is the message-ID of the parent summary line, or nil for none." (when (string-match ";[ \t\n]*name=\\([^ \t\n;]+\\)" content-type) (setq subject (match-string 1 content-type))) (when (string-match "boundary=\"?\\([^\"\n]*[^\" \t\n]\\)" content-type) - (setq boundary-regexp (concat "\n--" + (setq boundary-regexp (concat "^--" (regexp-quote (match-string 1 content-type)) "\\(--\\)?[ \t]*\n")))) diff --git a/lisp/nneething.el b/lisp/nneething.el index 700dad8..8048849 100644 --- a/lisp/nneething.el +++ b/lisp/nneething.el @@ -342,10 +342,13 @@ If this variable is nil, no files will be excluded.") (defun nneething-file-name (article) "Return the file name of ARTICLE." - (concat (file-name-as-directory nneething-address) - (if (numberp article) - (cadr (assq article nneething-map)) - article))) + (let ((dir (file-name-as-directory nneething-address)) + fname) + (if (numberp article) + (if (setq fname (cadr (assq article nneething-map))) + (concat dir fname) + (make-temp-name (concat dir "nneething"))) + (concat dir article)))) (provide 'nneething) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index cfdccf0..d1bf968 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -102,8 +102,18 @@ on your system, you could say something like: (defalias 'mail-header-xref 'mime-entity-xref-internal) (defalias 'mail-header-set-xref 'mime-entity-set-xref-internal) -(defsubst make-full-mail-header (&optional number subject from date id - references chars lines xref) +;;(defmacro mail-header-extra (entity) +;; "Return the extra headers in ENTITY." +;; `(aref ,entity 23)) +(defalias 'mail-header-extra 'ignore) + +;;(defmacro mail-header-set-extra (entity extra) +;; "Set the extra headers in ENTITY to EXTRA." +;; `(aset ,entity 23 ',extra)) +(defalias 'mail-header-set-extra 'ignore) + +(defsubst make-full-mail-header + (&optional number subject from date id references chars lines xref extra) "Create a new mail header structure initialized with the parameters given." (make-mime-entity-internal 'gnus number @@ -119,10 +129,12 @@ on your system, you could say something like: chars lines xref (list (cons 'Subject subject) (cons 'From from)) + nil nil nil nil nil nil +;; extra )) (defsubst make-full-mail-header-from-decoded-header - (&optional number subject from date id references chars lines xref) + (&optional number subject from date id references chars lines xref extra) "Create a new mail header structure initialized with the parameters given." (make-mime-entity-internal 'gnus number @@ -131,12 +143,16 @@ on your system, you could say something like: subject from date id references - chars lines xref)) + chars lines xref + nil + nil nil nil nil nil nil +;; extra + )) (defun make-mail-header (&optional init) "Create a new mail header structure initialized with INIT." (make-full-mail-header init init init init init - init init init init)) + init init init init init)) ;; fake message-ids: generation and detection @@ -246,7 +262,20 @@ on your system, you could say something like: (progn (goto-char p) (and (search-forward "\nxref: " nil t) - (nnheader-header-value))))) + (nnheader-header-value))) + + ;; Extra. + (when nnmail-extra-headers + (let ((extra nnmail-extra-headers) + out) + (while extra + (goto-char p) + (when (search-forward + (concat "\n" (symbol-name (car extra)) ": ") nil t) + (push (cons (car extra) (nnheader-header-value)) + out)) + (pop extra)) + out)))) (when naked (goto-char (point-min)) (delete-char 1))))) @@ -259,14 +288,12 @@ on your system, you could say something like: (defmacro nnheader-nov-read-integer () '(prog1 - (if (= (following-char) ?\t) + (if (eq (char-after) ?\t) 0 (let ((num (ignore-errors (read (current-buffer))))) (if (numberp num) num 0))) (or (eobp) (forward-char 1)))) -;; (defvar nnheader-none-counter 0) - (defun nnheader-parse-nov () (let ((eol (gnus-point-at-eol))) (make-full-mail-header @@ -279,7 +306,7 @@ on your system, you could say something like: (nnheader-nov-field) ; refs (nnheader-nov-read-integer) ; chars (nnheader-nov-read-integer) ; lines - (if (= (following-char) ?\n) + (if (eq (char-after) ?\n) nil (nnheader-nov-field)) ; misc ))) @@ -299,8 +326,15 @@ on your system, you could say something like: (insert "\t") (princ (or (mail-header-lines header) 0) (current-buffer)) (insert "\t") - (when (mail-header-xref header) + (when (or (mail-header-xref header) + (mail-header-extra header)) (insert "Xref: " (mail-header-xref header) "\t")) + (when (mail-header-extra header) + (let ((extra (mail-header-extra header))) + (while extra + (insert (symbol-name (caar extra)) + ": " (cdar extra) "\t") + (pop extra)))) (insert "\n")) (defun nnheader-insert-article-line (article) @@ -703,7 +737,7 @@ If FILE, find the \".../etc/PACKAGE\" file instead." (when (string-match (car ange-ftp-path-format) path) (ange-ftp-re-read-dir path))))) -(defvar nnheader-file-coding-system 'raw-text +(defvar nnheader-file-coding-system 'no-conversion "Coding system used in file backends of Gnus.") (defun nnheader-insert-file-contents (filename &optional visit beg end replace) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 459e712..8e8fbfc 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -449,6 +449,11 @@ parameter. It should return nil, `warn' or `delete'." (const warn) (const delete))) +(defcustom nnmail-extra-headers nil + "*Extra headers to parse." + :group 'nnmail + :type '(repeat symbol)) + ;;; Internal variables. (defvar nnmail-split-history nil @@ -803,7 +808,7 @@ is a spool. If not using procmail, return GROUP." (when (and (or (bobp) (save-excursion (forward-line -1) - (= (following-char) ?\n))) + (eq (char-after) ?\n))) (save-excursion (forward-line 1) (while (looking-at ">From \\|From ") @@ -832,7 +837,7 @@ is a spool. If not using procmail, return GROUP." (when (and (or (bobp) (save-excursion (forward-line -1) - (= (following-char) ?\n))) + (eq (char-after) ?\n))) (save-excursion (forward-line 1) (while (looking-at ">From \\|From ") @@ -1702,11 +1707,11 @@ If ARGS, PROMPT is used as an argument to `format'." (goto-char (point-min)) (while (re-search-forward "[^ \t=]+" nil t) (setq name (match-string 0)) - (if (not (= (following-char) ?=)) + (if (not (eq (char-after) ?=)) ;; Implied "yes". (setq value "yes") (forward-char 1) - (if (not (= (following-char) ?\")) + (if (not (eq (char-after) ?\")) (if (not (looking-at "[^ \t]")) ;; Implied "no". (setq value "no") diff --git a/lisp/nnml.el b/lisp/nnml.el index 4f92163..4e847bf 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -225,6 +225,7 @@ all. This may very well take some time.") t) (deffoo nnml-request-create-group (group &optional server args) + (nnml-possibly-change-directory nil server) (nnmail-activate 'nnml) (cond ((assoc group nnml-group-alist) @@ -574,15 +575,10 @@ all. This may very well take some time.") (file-exists-p nnml-current-directory)))) (defun nnml-possibly-create-directory (group) - (let (dir dirs) - (setq dir (nnmail-group-pathname group nnml-directory)) - (while (not (file-directory-p dir)) - (push dir dirs) - (setq dir (file-name-directory (directory-file-name dir)))) - (while dirs - (make-directory (directory-file-name (car dirs))) - (nnheader-message 5 "Creating mail directory %s" (car dirs)) - (setq dirs (cdr dirs))))) + (let ((dir (nnmail-group-pathname group nnml-directory))) + (unless (file-exists-p dir) + (make-directory (directory-file-name dir) t) + (nnheader-message 5 "Creating mail directory %s" dir)))) (defun nnml-save-mail (group-art) "Called narrowed to an article." diff --git a/lisp/nntp.el b/lisp/nntp.el index 78b99ee..3f1c00f 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -396,7 +396,7 @@ If this variable is nil, which is the default, no timers are set.") (cond ;; A result that starts with a 2xx code is terminated by ;; a line with only a "." on it. - ((eq (following-char) ?2) + ((eq (char-after) ?2) (if (re-search-forward "\n\\.\r?\n" nil t) t nil)) diff --git a/lisp/nnvirtual.el b/lisp/nnvirtual.el index a6e92f5..b1d4119 100644 --- a/lisp/nnvirtual.el +++ b/lisp/nnvirtual.el @@ -385,7 +385,7 @@ to virtual article number.") (insert "\t")) ;; Remove any spaces at the beginning of the Xref field. - (while (= (char-after (1- (point))) ? ) + (while (eq (char-after (1- (point))) ? ) (forward-char -1) (delete-char 1)) @@ -417,7 +417,7 @@ to virtual article number.") ;; Ensure a trailing \t. (end-of-line) - (or (= (char-after (1- (point))) ?\t) + (or (eq (char-after (1- (point))) ?\t) (insert ?\t))) diff --git a/lisp/pop3.el b/lisp/pop3.el index b90aeba..848bbef 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -1,10 +1,10 @@ ;;; pop3.el --- Post Office Protocol (RFC 1460) interface -;; Copyright (C) 1996,97,98 Free Software Foundation, Inc. +;; Copyright (C) 1996,1997,1998 Free Software Foundation, Inc. ;; Author: Richard L. Pieri ;; Keywords: mail, pop3 -;; Version: 1.3l+ +;; Version: 1.3m ;; This file is part of GNU Emacs. @@ -37,7 +37,7 @@ (require 'mail-utils) (provide 'pop3) -(defconst pop3-version "1.3l+") +(defconst pop3-version "1.3m") (defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil) "*POP3 maildrop.") @@ -116,12 +116,14 @@ Returns the process associated with the connection." (let ((process-buffer (get-buffer-create (format "trace of POP session to %s" mailhost))) (process) - (coding-system-for-read 'binary) - (coding-system-for-write 'binary)) + (coding-system-for-read 'binary) ;; 000000000 00000 000 + (coding-system-for-write 'binary) ;; 00 000000 + ) (save-excursion (set-buffer process-buffer) (erase-buffer) - (setq pop3-read-point (point-min))) + (setq pop3-read-point (point-min)) + ) (setq process (open-network-stream "POP" process-buffer mailhost port)) (let ((response (pop3-read-response process t))) diff --git a/lisp/qp.el b/lisp/qp.el index e26f927..4671451 100644 --- a/lisp/qp.el +++ b/lisp/qp.el @@ -32,11 +32,11 @@ (save-excursion (goto-char from) (while (search-forward "=" to t) - (cond ((eq (following-char) ?\n) + (cond ((eq (char-after) ?\n) (delete-char -1) (delete-char 1)) ((and - (memq (following-char) quoted-printable-encoding-characters) + (memq (char-after) quoted-printable-encoding-characters) (memq (char-after (1+ (point))) quoted-printable-encoding-characters)) (subst-char-in-region @@ -64,13 +64,14 @@ matched by that regexp." (save-excursion (save-restriction (narrow-to-region from to) + (mm-encode-body) (goto-char (point-min)) (while (and (skip-chars-forward (or class "^\000-\007\013\015-\037\200-\377=")) (not (eobp))) (insert (prog1 - (upcase (format "=%x" (char-after (point)))) + (upcase (format "=%x" (char-after))) (delete-char 1)))) (when fold ;; Fold long lines. @@ -85,7 +86,7 @@ matched by that regexp." (defun quoted-printable-encode-string (string) "QP-encode STRING and return the results." - (with-temp-buffer + (mm-with-unibyte-buffer (insert string) (quoted-printable-encode-region (point-min) (point-max)) (buffer-string))) diff --git a/lisp/rfc1843.el b/lisp/rfc1843.el index e184e0b..a812d50 100644 --- a/lisp/rfc1843.el +++ b/lisp/rfc1843.el @@ -2,7 +2,7 @@ ;; Copyright (c) 1998 by Shenghuo Zhu ;; Author: Shenghuo Zhu -;; $Revision: 1.1.2.2 $ +;; $Revision: 1.1.2.3 $ ;; Keywords: news HZ ;; Time-stamp: @@ -100,10 +100,10 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" (if (eq firstc ?{) 'cn-gb-2312 'cn-big5)))) (goto-char (point-min)) (while (search-forward "~" (point-max) t) - (cond ((eq (following-char) ?\n) + (cond ((eq (char-after) ?\n) (delete-char -1) (delete-char 1)) - ((eq (following-char) ?~) + ((eq (char-after) ?~) (delete-char 1))))))))) (defun rfc1843-decode-string (string) diff --git a/lisp/rfc2231.el b/lisp/rfc2231.el index e7a0417..cb0d53d 100644 --- a/lisp/rfc2231.el +++ b/lisp/rfc2231.el @@ -46,18 +46,18 @@ The list will be on the form (let ((table (copy-syntax-table ietf-drums-syntax-table))) (modify-syntax-entry ?\' "w" table) (set-syntax-table table)) - (setq c (following-char)) + (setq c (char-after)) (when (and (memq c ttoken) (not (memq c stoken))) (setq type (downcase (buffer-substring (point) (progn (forward-sexp 1) (point))))) ;; Do the params (while (not (eobp)) - (setq c (following-char)) + (setq c (char-after)) (unless (eq c ?\;) (error "Invalid header: %s" string)) (forward-char 1) - (setq c (following-char)) + (setq c (char-after)) (if (and (memq c ttoken) (not (memq c stoken))) (setq attribute @@ -66,21 +66,21 @@ The list will be on the form (buffer-substring (point) (progn (forward-sexp 1) (point)))))) (error "Invalid header: %s" string)) - (setq c (following-char)) + (setq c (char-after)) (setq encoded nil) (when (eq c ?*) (forward-char 1) - (setq c (following-char)) + (setq c (char-after)) (when (memq c ntoken) (setq number (string-to-number (buffer-substring (point) (progn (forward-sexp 1) (point))))) - (setq c (following-char)) + (setq c (char-after)) (when (eq c ?*) (setq encoded t) (forward-char 1) - (setq c (following-char))))) + (setq c (char-after))))) ;; See if we have any previous continuations. (when (and prev-attribute (not (eq prev-attribute attribute))) @@ -90,7 +90,7 @@ The list will be on the form (unless (eq c ?=) (error "Invalid header: %s" string)) (forward-char 1) - (setq c (following-char)) + (setq c (char-after)) (cond ((eq c ?\") (setq value diff --git a/lisp/smiley.el b/lisp/smiley.el index e6c13f7..ac1a65f 100644 --- a/lisp/smiley.el +++ b/lisp/smiley.el @@ -294,10 +294,10 @@ Mouse button3 - menu")) (save-excursion (goto-char start) (when (and (re-search-backward "[()]" nil t) - (= (following-char) ?\() + (eq (char-after) ?\() (goto-char end) (or (not (re-search-forward "[()]" nil t)) - (= (char-after (1- (point))) ?\())) + (eq (char-after (1- (point))) ?\())) t))) (defvar gnus-article-buffer) diff --git a/texi/ChangeLog b/texi/ChangeLog index fe174f1..978e94c 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,13 @@ +1998-10-25 01:51:56 Lars Magne Ingebrigtsen + + * gnus.texi (Headers): Addition. + +1998-10-24 08:37:12 Lars Magne Ingebrigtsen + + * gnus.texi (Summary Buffer Lines): Addition. + (To): New. + (To): Addition. + 1998-10-15 18:15:34 Simon Josefsson * gnus.texi (Group Info): Must be list of ranges. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 18aa390..8dc6edc 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus-ja -@settitle Semi-gnus 6.10.025 Manual +@settitle Semi-gnus 6.10.027 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -345,7 +345,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.10.025 Manual +@title Semi-gnus 6.10.027 Manual @author by Lars Magne Ingebrigtsen @author by members of Semi-gnus mailing-list @@ -399,7 +399,7 @@ Semi-gnus $B$O!"Bg$-$J3($,F~$C$F$$$?$j$5$^$6$^$J7A<0$rMQ$$$?$j$7$F$$$k$A$g$C(B $B$J8@8l7w$r:9JL$7$^$;$s!#$"$"!"%/%j%s%4%s$NJ}$O(B Unicode Next Generation$B$r(B $B$*BT$A$/$@$5$$!#(B -$B$3$N@bL@=q$O(B Semi-gnus 6.10.025 $B$KBP1~$7$^$9!#(B +$B$3$N@bL@=q$O(B Semi-gnus 6.10.027 $B$KBP1~$7$^$9!#(B @end ifinfo diff --git a/texi/gnus.texi b/texi/gnus.texi index d037cc1..fcc6c84 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.10.025 Manual +@settitle Semi-gnus 6.10.027 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -318,7 +318,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.10.025 Manual +@title Semi-gnus 6.10.027 Manual @author by Lars Magne Ingebrigtsen @page @@ -361,7 +361,7 @@ internationalization/localization and multiscript features based on MULE API. So Semi-gnus does not discriminate various language communities. Oh, if you are a Klingon, please wait Unicode Next Generation. -This manual corresponds to Semi-gnus 6.10.025. +This manual corresponds to Semi-gnus 6.10.027. @end ifinfo @@ -3263,6 +3263,7 @@ You can have as many summary buffers open as you wish. @menu * Summary Buffer Lines:: You can specify how summary lines should look. +* To From Newsgroups:: How to not display your own name. * Summary Buffer Mode Line:: You can say how the mode line should look. * Summary Highlighting:: Making the summary buffer all pretty and nice. @end menu @@ -3318,6 +3319,9 @@ had a different subject, @code{gnus-summary-same-subject} otherwise. Full @code{From} header. @item n The name (from the @code{From} header). +@item f +The name, code @code{To} header or the @code{Newsgroups} header +(@pxref{To From Newsgroups}). @item a The name (from the @code{From} header). This differs from the @code{n} spec in that it uses the function designated by the @@ -3407,6 +3411,69 @@ The smart choice is to have these specs as far to the left as possible. This restriction may disappear in later versions of gnus. +@node To From Newsgroups +@subsection To From Newsgroups +@cindex To +@cindex Newsgroups + +In some groups (particularly in archive groups), the @code{From} header +isn't very interesting, since all the articles there are written by +you. To display the information in the @code{To} or @code{Newsgroups} +headers instead, you need to decide three things: What information to +gather; where to display it; and when to display it. + +@enumerate +@item +@vindex gnus-extra-headers +The reading of extra header information is controlled by the +@code{gnus-extra-headers}. This is a list of header symbols. For +instance: + +@lisp +(setq gnus-extra-headers + '(To Newsgroups X-Newsreader)) +@end lisp + +This will result in Gnus trying to obtain these three headers, and +storing it in header structures for later easy retrieval. + +@item +@findex gnus-extra-header +The value of these extra headers can be accessed via the +@code{gnus-extra-header} function. Here's a format line spec that will +access the @code{X-Newsreader} header: + +@example +"%~(form (gnus-extra-header 'X-Newsreader))@@" +@end example + +@item +@vindex gnus-ignored-from-addresses +The @code{gnus-ignored-from-addresses} variable says when the @samp{%f} +summary line spec returns the @code{To}, @code{Newsreader} or +@code{From} header. If this regexp matches the contents of the +@code{From} header, the value of the @code{To} or @code{Newsreader} +headers are used instead. + +@end enumerate + +@vindex nnmail-extra-headers +A related variable is @code{nnmail-extra-headers}, which controls when +to include extra headers when generating active files. + +In summary, you'd typically do something like the following: + +@lisp +(setq gnus-extra-headers + '(To Newsgroups)) +(setq nnmail-extra-headers gnus-extra-headers) +(setq gnus-summary-line-format + "%U%R%z%I%(%[%4L: %-20,20f%]%) %s\n") +(setq gnus-ignored-from-addresses + "Your Name Here") +@end lisp + + @node Summary Buffer Mode Line @subsection Summary Buffer Mode Line @@ -6848,6 +6915,17 @@ View all the @sc{mime} parts in the current article @end table +Relevant variables: + +@table @code +@item gnus-ignored-mime-types +@vindex gnus-ignored-mime-types +This is a list of regexps. @sc{mime} types that match a regexp from +this list will be completely ignored by Gnus. The default value is +@code{("text/x-vcard")}. + +@end table + @node Article Commands @section Article Commands @@ -16064,6 +16142,10 @@ Luis Fernandes---design and graphics. Erik Naggum---help, ideas, support, code and stuff. @item +Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el and many other things +connected with @sc{mime} and other types of en/decoding. + +@item Wes Hardaker---@file{gnus-picon.el} and the manual section on @dfn{picons} (@pxref{Picons}). @@ -16298,10 +16380,9 @@ Stefan Waldherr, Pete Ware, Barry A. Warsaw, Christoph Wedler, -Joe Wells, -Katsumi Yamaoka, @c Yamaoka +Joe Wells and -Shenghuo Zhu. @c Zhu +Katsumi Yamaoka, @c Yamaoka. For a full overview of what each person has done, the ChangeLogs included in the Gnus alpha distributions should give ample reading @@ -18191,10 +18272,6 @@ exits the group. The jingle is only played on the second invocation of Gnus. @item -gnus-ignored-mime-types to avoid seeing buttons for Vcards and the -like. - -@item Bouncing articles should do MIME. @item @@ -18202,6 +18279,17 @@ Crossposted articles should "inherit" the % or @ mark from the other groups it has been crossposted to, or something. (Agent.) @item +`S D r' should allow expansion of aliases. + +@item +If point is on a group that appears multiple times in topics, and +you press `l', point will move to the first instance of the group. + +@item +The documentation should mention pop3.el, fetchmail, smtpmail and why +po:username often fails. + +@item Solve the halting problem. @c TODO @@ -19717,12 +19805,12 @@ basically, with each header (ouch) having one slot. These slots are, in order: @code{number}, @code{subject}, @code{from}, @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines}, -@code{xref}. There are macros for accessing and setting these -slots---they all have predictable names beginning with +@code{xref}, and @code{extra}. There are macros for accessing and +setting these slots---they all have predictable names beginning with @code{mail-header-} and @code{mail-header-set-}, respectively. -The @code{xref} slot is really a @code{misc} slot. Any extra info will -be put in there. +All these slots contain strings, except the @code{extra} slot, which +contains an alist of header/value pairs (@pxref{To From Newsgroups}). @node Ranges diff --git a/texi/message.texi b/texi/message.texi index fbcfabb..3834bd8 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.36 Manual +@settitle Pterodactyl Message 0.40 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.36 Manual +@title Pterodactyl Message 0.40 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.36. Message is +This manual corresponds to Pterodactyl Message 0.40. Message is distributed with the Gnus distribution bearing the same version number as this manual.