From aa0998f79c39133cdae2cf83462b741f9bbfa804 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 6 May 1999 02:06:52 +0000 Subject: [PATCH 01/16] (article-hide-headers): To work toggle hiding. --- lisp/gnus-art.el | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index efb336f..8902c90 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1039,8 +1039,14 @@ Initialized from `text-mode-syntax-table.") (defun article-hide-headers (&optional arg delete) "Hide unwanted headers and possibly sort them as well." - (interactive) - ;; This function might be inhibited. + (interactive (gnus-article-hidden-arg)) + ;; Lars said that this function might be inhibited. + (if (gnus-article-check-hidden-text 'headers arg) + ;; Show boring headers as well. + (progn + (gnus-article-show-hidden-text 'boring-headers) + (when (eq 1 (point-min)) + (set-window-start (get-buffer-window (current-buffer)) 1))) (unless gnus-inhibit-hiding (save-excursion (save-restriction @@ -1067,7 +1073,11 @@ Initialized from `text-mode-syntax-table.") (while (looking-at "From ") (forward-line 1)) (unless (bobp) - (delete-region (point-min) (point))) + (if delete + (delete-region (point-min) (point)) + (gnus-article-hide-text (point-min) (point) + (nconc (list 'article-type 'headers) + gnus-hidden-properties)))) ;; Then treat the rest of the header lines. ;; Then we use the two regular expressions ;; `gnus-ignored-headers' and `gnus-visible-headers' to @@ -1087,10 +1097,15 @@ Initialized from `text-mode-syntax-table.") (message-sort-headers-1) (when (setq beg (text-property-any (point-min) (point-max) 'message-rank (+ 2 max))) - ;; We delete the unwanted headers. - (add-text-properties (point-min) (+ 5 (point-min)) - '(article-type headers dummy-invisible t)) - (delete-region beg (point-max)))))))) + ;; We delete or make invisible the unwanted headers. + (if delete + (progn + (add-text-properties + (point-min) (+ 5 (point-min)) + '(article-type headers dummy-invisible t)) + (delete-region beg (point-max))) + (gnus-article-hide-text-type beg (point-max) 'headers)))))))) + ) (defun article-hide-boring-headers (&optional arg) "Toggle hiding of headers that aren't very interesting. -- 1.7.10.4 From 764ff1c69f1813f20eebd9afd008d3915713580e Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 6 May 1999 02:07:11 +0000 Subject: [PATCH 02/16] Use the original source without any changes. --- lisp/mail-source.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 587cb9e..acd758c 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -312,7 +312,7 @@ If ARGS, PROMPT is used as an argument to `format'." (when prescript (if (and (symbolp prescript) (fboundp prescript)) (funcall prescript) - (call-process shell-file-name nil 0 nil + (call-process shell-file-name nil nil nil shell-command-switch (format-spec prescript @@ -324,7 +324,7 @@ If ARGS, PROMPT is used as an argument to `format'." (when prescript (if (and (symbolp prescript) (fboundp prescript)) (funcall prescript) - (call-process shell-file-name nil 0 nil + (call-process shell-file-name nil nil nil shell-command-switch (format-spec postscript @@ -351,8 +351,8 @@ If ARGS, PROMPT is used as an argument to `format'." (if (and (symbolp prescript) (fboundp prescript)) (funcall prescript) - (call-process shell-file-name nil nil nil - shell-command-switch + (call-process shell-file-name nil 0 nil + shell-command-switch (format-spec prescript (format-spec-make ?p password ?t mail-source-crash-box @@ -360,13 +360,14 @@ If ARGS, PROMPT is used as an argument to `format'." (let ((from (format "%s:%s:%s" server user port)) (mail-source-string (format "pop:%s@%s" user server)) result) - (setq password - (or password - (cdr (assoc from mail-source-password-cache)) - (mail-source-read-passwd - (format "Password for %s at %s: " user server)))) - (unless (assoc from mail-source-password-cache) - (push (cons from password) mail-source-password-cache)) + (when (eq authentication 'password) + (setq password + (or password + (cdr (assoc from mail-source-password-cache)) + (mail-source-read-passwd + (format "Password for %s at %s: " user server)))) + (unless (assoc from mail-source-password-cache) + (push (cons from password) mail-source-password-cache))) (when server (setenv "MAILHOST" server)) (setq result @@ -395,8 +396,8 @@ If ARGS, PROMPT is used as an argument to `format'." (if (and (symbolp postscript) (fboundp postscript)) (funcall prescript) - (call-process shell-file-name nil nil nil - shell-command-switch + (call-process shell-file-name nil 0 nil + shell-command-switch (format-spec postscript (format-spec-make -- 1.7.10.4 From d0b1d061ef4e0a515b35b4802a2fb6bce160baa8 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 6 May 1999 02:08:12 +0000 Subject: [PATCH 03/16] (gnus-summary-enter-digest-group): Change the key assignment "C-d" into "A D". (Article treatment): Document the new variable `gnus-article-date-lapsed-new-header'. --- texi/gnus-ja.texi | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index f924d25..978b990 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -6608,8 +6608,15 @@ UT ($BJLL>(B GMT, ZULU) $B$GF|IU$rI=<($7$^$9(B (@code{gnus-article-date-ut}) @findex gnus-start-date-timer @findex gnus-stop-date-timer $B5-;v$,Ej9F$5$l$F$+$i:#$^$G$I$l$/$i$$$N;~4V$,7P2a$7$?$+$rI=<($7$^$9(B -(@code{gnus-article-date-lapsed})$B!#$3$N9T$,O"B3$7$F99?7$5$l$k$h$&$K$7$?(B -$B$$$N$G$"$l$P!"(B +(@code{gnus-article-date-lapsed})$B!#$3$s$J$U$&$K!#(B + +@example +X-Sent: 9 years, 6 weeks, 4 days, 9 hours, 3 minutes, 28 seconds ago +@end example + +@code{gnus-article-date-lapsed-new-header} $B$NCM$G$3$N%X%C%@!<$r4{B8$N(B +Date $B$N2<$KDI2C$9$k$+!"CV$-BX$($k$+$r;XDj$7$^$9!#$3$N9T$,O"B3$7$F99?7(B +$B$5$l$k$h$&$K$7$?$$$N$G$"$l$P!"(B @lisp (gnus-start-date-timer) @@ -7346,8 +7353,10 @@ Gnus $B$N(B info $B$N@a(B (node) $B$K0\F0$7$^$9(B (@code{gnus-info-find-no @table @kbd -@item C-d +@item A D +@itemx C-d @kindex C-d $B!J35N,!K(B +@kindex A D $B!J35N,!K(B @findex gnus-summary-enter-digest-group $B$b$78=:_$N%0%k!<%W$,B>$N5-;v$N=8$^$j$G$"$k$J$i$P!JNc$($P!"E&MW(B (digest)$B!K!"(B $B$=$N$h$&$J5-;v$G$G$-$F$$$k%0%k!<%W$KF~$k$?$a$K$3$NL?Na$r;H$&$+$b$7$l$^$;$s(B @@ -8283,7 +8292,7 @@ Gnus $B$O30$X=P$F9T$/A4$F$N%a%C%;!<%8$K!"0l$D$+$=$l0J>e$N$=$N%5!<%P!<$N%0%k!<( $B$G$J$$CM$r5"$;$P!"MM<0$O(B @code{$B9gCW$7$?(B} $B$H8@$$$^$9!#(B $B$=$l$>$l$NMM<0$OG$0U$NNL$N(B @dfn{$BB0@-(B} $B$r;}$D;v$,$G$-$^$9!#$=$l$>$l$NB0@-(B -$B$O(B @var{(name . value)} $B$NBP$K$h$j@.$jN)$C$F$$$^$9!#B0@-L>$O!"(B +$B$O(B @var{(name value)} $B$NBP$K$h$j@.$jN)$C$F$$$^$9!#B0@-L>$O!"(B @code{signature}, @code{signature-file}, @code{organization}, @code{address}, @code{name}, @code{body} $B$N$I$l$+$G$"$k;v$,$G$-$^$9!#B0(B $B@-L>$OJ8;zNs$G$"$k;v$b$G$-$^$9!#$=$N>l9g$O!"$3$l$O%X%C%@!$H$7$F;H$o$l!"(B -- 1.7.10.4 From 81d9e380ad963e19fb8655f103ce0f5339a66cd3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 6 May 1999 02:08:47 +0000 Subject: [PATCH 04/16] (gnus-revision-number): Increment to 01. --- lisp/gnus.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus.el b/lisp/gnus.el index 199e5a2..7fef3ec 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.064" "Version number for this version of gnus.") -(defconst gnus-revision-number "00" +(defconst gnus-revision-number "01" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.84" -- 1.7.10.4 From 7b886c6465dbe4133f5157debc95a3403ee04ad3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 6 May 1999 02:09:13 +0000 Subject: [PATCH 05/16] Update. --- ChangeLog | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7b1c417..a2f5c4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +1999-05-06 Katsumi Yamaoka + + * lisp/gnus.el (gnus-revision-number): Increment to 01. + + * texi/gnus-ja.texi: (gnus-summary-enter-digest-group): Change the + key assignment "C-d" into "A D". + (Article treatment): Document the new variable + `gnus-article-date-lapsed-new-header'. + + * lisp/mail-source.el: Use the original source without any changes. + + * lisp/gnus-art.el (article-hide-headers): To work toggle hiding. + + * README.T-gnus: Update what is the latest T-gnus. + 1999-05-04 Tatsuya Ichikawa * lisp/gnus.el (gnus-version-number): Update to 6.10.064. @@ -5,6 +20,16 @@ * Sync up with Pterodactyl Gnus v0.84. +1999-04-28 Katsumi Yamaoka + + * lisp/gnus.el (gnus-revision-number): Increment to 03. + + * lisp/gnus-vm.el (gnus-summary-save-in-vm): Use + `vm-read-file-name' instead of `read-file-name'. This allows to use + the optional sixth argument HISTORY for the various environments. + (gnus-summary-save-article-vm): Ditto. + (TopLevel): Autoload "vm" for the function `vm-read-file-name'. + 1999-04-27 Katsumi Yamaoka * lisp/gnus.el (gnus-revision-number): Increment to 02. -- 1.7.10.4 From 10113169725e364adc9cd335141a2a963da4c677 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 13 May 1999 02:36:22 +0000 Subject: [PATCH 06/16] (gnus-setup-for-offline): Don't specify the authentication scheme if `password' is selected. --- lisp/gnus-ofsetup.el | 60 +++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/lisp/gnus-ofsetup.el b/lisp/gnus-ofsetup.el index db6f79b..48fe899 100644 --- a/lisp/gnus-ofsetup.el +++ b/lisp/gnus-ofsetup.el @@ -1,6 +1,6 @@ ;;; gnus-ofsetup.el --- Setup advisor for Offline reading for Mail/News. ;;; -;;; $Id: gnus-ofsetup.el,v 1.1.2.17 1999-03-22 18:13:33 czkmt Exp $ +;;; $Id: gnus-ofsetup.el,v 1.1.2.18 1999-05-13 02:36:22 yamaoka Exp $ ;;; ;;; Copyright (C) 1998 Tatsuya Ichikawa ;;; Author: Tatsuya Ichikawa @@ -218,43 +218,33 @@ (server (read-from-minibuffer "Mail server : ")) (auth (completing-read "Authentification Method (TAB to completion): " - '(("pop" 1) ("apop" 2)) nil t nil)) - (islisp (y-or-n-p "Do you use pop3.el to fetch mail? "))) + '(("password") ("apop")) nil t nil)) + (islisp (y-or-n-p "Do you use pop3.el to fetch mail? ")) + source) (if (not islisp) (let ((prog (read-file-name "movemail program name: " exec-directory "movemail")) - (args (read-from-minibuffer "movemail options: " "-pf"))) - (setq mail-source - (append mail-source - (list - (list - 'pop - :user user - :server server - :program - (format "%s %s %s %s %s" - prog - args - "po:%u" - "%t" - "%p") - :authentication auth))))) - (setq mail-source - (append mail-source - (list - (list - 'pop - :user user - :server server - :authentication auth)))))) - (setq i (- i 1))) - ;; Replace "hoge" -> 'hoge - (mapcar - (lambda (x) - (if (string-equal (car (last x)) "pop") - (setcar (last x) (quote 'pop)) - (setcar (last x) (quote 'apop)))) - mail-source) + (args (read-from-minibuffer "movemail options: " + "-pf"))) + (setq source (list 'pop + :user user + :server server + :program (format "%s %s %s %s %s" + prog + args + "po:%u" + "%t" + "%p")))) + (setq source (list 'pop + :user user + :server server))) + (setq mail-source + (nconc mail-source + (list + (if (string-equal "apop" auth) + (nconc source '(:authentication apop)) + source))))) + (setq i (1- i))) (setq gnus-offline-mail-source mail-source))) (setq save-passwd -- 1.7.10.4 From b4338db816962ef9d94ec669555986d894127b5d Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 13 May 1999 02:36:43 +0000 Subject: [PATCH 07/16] (gnus-revision-number): Increment to 02. --- lisp/gnus.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus.el b/lisp/gnus.el index 7fef3ec..aacf8ae 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.064" "Version number for this version of gnus.") -(defconst gnus-revision-number "01" +(defconst gnus-revision-number "02" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.84" -- 1.7.10.4 From 3c56fec4298108c3d76d607d15a8713e2863f2fb Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 13 May 1999 02:37:05 +0000 Subject: [PATCH 08/16] Update. --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index a2f5c4e..4b00d6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-05-13 Katsumi Yamaoka + + * lisp/gnus.el (gnus-revision-number): Increment to 02. + + * lisp/gnus-ofsetup.el (gnus-setup-for-offline): Don't specify + the authentication scheme if `password' is selected. + 1999-05-06 Katsumi Yamaoka * lisp/gnus.el (gnus-revision-number): Increment to 01. -- 1.7.10.4 From 688636e75e02be0a1c319f546ec388ed9ec10a85 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 13 May 1999 12:35:52 +0000 Subject: [PATCH 09/16] Speedups; see ChangeLog for fine details. --- lisp/base64.el | 7 ++++--- lisp/dgnushack.el | 2 +- lisp/format-spec.el | 2 +- lisp/gnus-art.el | 43 +++++++++++++++++++++++-------------------- lisp/gnus-kill.el | 2 +- lisp/gnus-mh.el | 2 +- lisp/gnus-msg.el | 2 +- lisp/gnus-picon.el | 5 +++-- lisp/gnus-spec.el | 2 +- lisp/gnus-sum.el | 7 +++---- lisp/gnus-util.el | 2 +- lisp/gnus-xmas.el | 3 ++- lisp/gnus.el | 4 ++-- lisp/mail-source.el | 5 +++-- lisp/md5.el | 2 +- lisp/message.el | 45 +++++++++++++++++++++------------------------ lisp/nnmail.el | 7 ++++--- lisp/nnsoup.el | 4 ++-- lisp/nnspool.el | 3 ++- lisp/nntp.el | 4 ++-- 20 files changed, 79 insertions(+), 74 deletions(-) diff --git a/lisp/base64.el b/lisp/base64.el index 12b4ca9..cbbc58e 100644 --- a/lisp/base64.el +++ b/lisp/base64.el @@ -93,7 +93,8 @@ base64-encoder-program.") t) (t (save-excursion (set-buffer (find-file-noselect tempfile)) - (setq errstring (buffer-string)) + (setq errstring (buffer-substring + (point-min) (point-max))) (kill-buffer nil) (cons status errstring))))) (ignore-errors @@ -251,7 +252,7 @@ base64-encoder-program.") (skip-chars-backward " \t\r\n") (delete-region (point-max) (point)) (prog1 - (buffer-string) + (buffer-substring (point-min) (point-max)) (kill-buffer (current-buffer))))) (defun base64-decode (string) @@ -264,7 +265,7 @@ base64-encoder-program.") (skip-chars-backward " \t\r\n") (delete-region (point-max) (point)) (prog1 - (buffer-string) + (buffer-substring (point-min) (point-max)) (kill-buffer (current-buffer))))) (fset 'base64-decode-string 'base64-decode) diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index e2b30e4..20e2de4 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -119,7 +119,7 @@ Modify to suit your needs.")) (with-temp-buffer (let ((standard-output (current-buffer))) (Custom-make-dependencies ".")) - (message (buffer-string))) + (message (buffer-substring (point-min) (point-max)))) (require 'cus-load) (byte-compile-file "custom-load.el") diff --git a/lisp/format-spec.el b/lisp/format-spec.el index 8986dc0..241e9dc 100644 --- a/lisp/format-spec.el +++ b/lisp/format-spec.el @@ -52,7 +52,7 @@ to values." ;; Signal an error on bogus format strings. (t (error "Invalid format string")))) - (buffer-string))) + (buffer-substring (point-min) (point-max)))) (defun format-spec-make (&rest pairs) "Return an alist suitable for use in `format-spec' based on PAIRS. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 8902c90..d812a27 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1083,8 +1083,9 @@ Initialized from `text-mode-syntax-table.") ;; `gnus-ignored-headers' and `gnus-visible-headers' to ;; select which header lines is to remain visible in the ;; article buffer. - (while (re-search-forward "^[^ \t]*:" nil t) - (beginning-of-line) + (while (memq (char-after) '(?\t ?\ )) + (forward-line 1)) + (while (not (eobp)) ;; Mark the rank of the header. (put-text-property (point) (1+ (point)) 'message-rank @@ -1093,7 +1094,9 @@ Initialized from `text-mode-syntax-table.") (not (looking-at ignored)))) (gnus-article-header-rank) (+ 2 max))) - (forward-line 1)) + (forward-line 1) + (while (memq (char-after) '(?\t ?\ )) + (forward-line 1))) (message-sort-headers-1) (when (setq beg (text-property-any (point-min) (point-max) 'message-rank (+ 2 max))) @@ -1130,12 +1133,11 @@ always hide." (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) (forward-line -1) (gnus-article-hide-text-type - (progn (beginning-of-line) (point)) + (point) (progn - (end-of-line) - (if (re-search-forward "^[^ \t]" nil t) - (match-beginning 0) - (point-max))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (point)) 'boring-headers))) ;; Hide boring Newsgroups header. ((eq elem 'newsgroups) @@ -1191,10 +1193,9 @@ always hide." (gnus-article-hide-text-type (progn (beginning-of-line) (point)) (progn - (end-of-line) - (if (re-search-forward "^[^ \t]" nil t) - (match-beginning 0) - (point-max))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (point)) 'boring-headers)))) (defvar gnus-article-normalized-header-length 40 @@ -3843,7 +3844,7 @@ groups." "Exit the article editing without updating." (interactive) ;; We remove all text props from the article buffer. - (let ((buf (format "%s" (buffer-string))) + (let ((buf (format "%s" (buffer-substring (point-min) (point-max)))) (curbuf (current-buffer)) (p (point)) (window-start (window-start))) @@ -3941,7 +3942,7 @@ after replacing with the original article." (setq font-lock-defaults nil) (font-lock-mode 0)) ;; We remove all text props from the article buffer. - (setq buf (format "%s" (buffer-string))) + (setq buf (format "%s" (buffer-substring (point-min) (point-max)))) (set-buffer (get-buffer-create gnus-original-article-buffer)) (erase-buffer) (insert buf) @@ -4154,9 +4155,11 @@ do the highlighting. See the documentation for those functions." (when (and field-face (not (memq (setq from (point)) fpoints))) (push from fpoints) - (if (re-search-forward "^[^ \t]" nil t) - (forward-char -2) - (goto-char (point-max))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (unless (eobp) + ;; Go to the end of the previous line. + (end-of-line 0)) (gnus-put-text-property from (point) 'face field-face)))))))) (defun gnus-article-highlight-signature () @@ -4247,9 +4250,9 @@ specified by `gnus-button-alist'." (while (re-search-forward (car entry) nil t) ;; Each header matching the entry. (setq beg (match-beginning 0)) - (setq end (or (and (re-search-forward "^[^ \t]" nil t) - (match-beginning 0)) - (point-max))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (setq end (point)) (goto-char beg) (while (re-search-forward (nth 1 entry) end t) ;; Each match within a header. diff --git a/lisp/gnus-kill.el b/lisp/gnus-kill.el index 6121552..73f8e16 100644 --- a/lisp/gnus-kill.el +++ b/lisp/gnus-kill.el @@ -282,7 +282,7 @@ If NEWSGROUP is nil, the global kill file is selected." (if (and gnus-current-kill-article (get-buffer gnus-summary-buffer)) ;; Assume newsgroup is selected. - (gnus-kill-file-apply-string (buffer-string)) + (gnus-kill-file-apply-string (buffer-substring (point-min) (point-max))) (ding) (gnus-message 2 "No newsgroup is selected."))) (defun gnus-kill-file-apply-string (string) diff --git a/lisp/gnus-mh.el b/lisp/gnus-mh.el index 6fabb5c..0e73190 100644 --- a/lisp/gnus-mh.el +++ b/lisp/gnus-mh.el @@ -76,7 +76,7 @@ Optional argument FOLDER specifies folder name." (set-buffer errbuf) (if (zerop (buffer-size)) (message "Article saved in folder: %s" folder) - (message "%s" (buffer-string))) + (message "%s" (buffer-substring (point-min) (point-max)))) (kill-buffer errbuf)))) (setq gnus-newsgroup-last-folder folder))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 186810c..431a1cd 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -471,7 +471,7 @@ header line with the old Message-ID." (gnus-remove-text-with-property 'gnus-next) (insert (prog1 - (format "%s" (buffer-string)) + (format "%s" (buffer-substring (point-min) (point-max))) (erase-buffer))) ;; Find the original headers. (set-buffer gnus-original-article-buffer) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 38de8df..f3365ee 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -325,7 +325,7 @@ arguments necessary for the job.") (let ((article-goto-body-goes-to-point-min-p nil)) (article-goto-body)) (unless (bobp) - (backward-char 1))))) + (forward-char -1))))) (if (null gnus-picons-piconsearch-url) (gnus-picons-display-pairs (gnus-picons-lookup-pairs @@ -506,7 +506,8 @@ none, and whose CDR is the corresponding element of DOMAINS." nil 'quiet) (prog1 (make-glyph (vector 'xbm :file fname)) (delete-file fname)))) - (t (make-glyph (vector type :data (buffer-string)))))) + (t (make-glyph (vector type :data (buffer-substring + (point-min) (point-max))))))) ;;; Parsing of piconsearch result page. diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index ca97b05..fb89ee2 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -467,7 +467,7 @@ by `gnus-xmas-redefine'." (push el flist))) (insert elem-type) (push (car elem) flist)))) - (setq fstring (buffer-string))) + (setq fstring (buffer-substring (point-min) (point-max)))) ;; Do some postprocessing to increase efficiency. (setq diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 4608511..247f262 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1155,7 +1155,7 @@ See `gnus-simplify-buffer-fuzzy' for details." (setq subject (substring subject (match-end 0)))) (insert subject) (inline (gnus-simplify-buffer-fuzzy)) - (buffer-string)))) + (buffer-substring (point-min) (point-max))))) (defsubst gnus-simplify-subject-fully (subject) "Simplify a subject string according to gnus-summary-gather-subject-limit." @@ -7535,7 +7535,7 @@ groups." (save-excursion (save-restriction (message-narrow-to-head) - (let ((head (buffer-string)) + (let ((head (buffer-substring (point-min) (point-max))) header) (with-temp-buffer (insert (format "211 %d Article retrieved.\n" @@ -8352,8 +8352,7 @@ is non-nil or the Subject: of both articles are the same." (if (re-search-forward "^References: " nil t) (progn (re-search-forward "^[^ \t]" nil t) - (forward-line -1) - (end-of-line) + (end-of-line 0) ;; Go to the end of the previous line. (insert " " message-id)) (insert "References: " message-id "\n"))) (set-buffer gnus-summary-buffer) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index fd4f927..bf6315d 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -332,7 +332,7 @@ Cache the result as a text property stored in DATE." (goto-char (point-min)) (while (search-forward "%" nil t) (insert "%")) - (buffer-string))) + (buffer-substring (point-min) (point-max)))) ;; Make a hash table (default and minimum size is 256). ;; Optional argument HASHSIZE specifies the table size. diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index bca3843..e804c7a 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -823,7 +823,8 @@ XEmacs compatibility workaround." (gnus-xmas-call-region "icontopbm") (gnus-xmas-call-region "ppmtoxpm") (make-glyph - (vector 'xpm :data (buffer-string)))))) + (vector 'xpm :data (buffer-substring + (point-min) (point-max))))))) (t (make-glyph [nothing])))) (ext (make-extent (progn diff --git a/lisp/gnus.el b/lisp/gnus.el index aacf8ae..d1bd765 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.064" "Version number for this version of gnus.") -(defconst gnus-revision-number "02" +(defconst gnus-revision-number "03" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.84" @@ -876,7 +876,7 @@ used to 899, you would say something along these lines: (save-excursion (set-buffer (gnus-get-buffer-create " *gnus nntp*")) (insert-file-contents gnus-nntpserver-file) - (let ((name (buffer-string))) + (let ((name (buffer-substring (point-min) (point-max)))) (prog1 (if (string-match "\\'[ \t\n]*$" name) nil diff --git a/lisp/mail-source.el b/lisp/mail-source.el index acd758c..6bfd153 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -273,8 +273,9 @@ Pass INFO on to CALLBACK." (delete-region (point-min) (match-end 0))) (unless (yes-or-no-p (format "movemail: %s (%d return). Continue? " - (buffer-string) result)) - (error "%s" (buffer-string))) + (buffer-substring (point-min) (point-max)) + result)) + (error "%s" (buffer-substring (point-min) (point-max)))) (setq to nil))))))) (when (and errors (buffer-name errors)) diff --git a/lisp/md5.el b/lisp/md5.el index 91a3041..8823f30 100644 --- a/lisp/md5.el +++ b/lisp/md5.el @@ -391,7 +391,7 @@ hash of a portion of OBJECT." (if (<= (point-max) md5-maximum-internal-length) (mapconcat (function (lambda (node) (format "%02x" node))) - (md5-encode (buffer-string)) + (md5-encode (buffer-substring (point-min) (point-max))) "") (call-process-region (point-min) (point-max) (or shell-file-name "/bin/sh") diff --git a/lisp/message.el b/lisp/message.el index a040cc1..9a69178 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1330,14 +1330,11 @@ Return the number of headers removed." ;; There might be a continuation header, so we have to search ;; until we find a new non-continuation line. (progn - (forward-line 1) - (if (re-search-forward "^[^ \t]" nil t) - (goto-char (match-beginning 0)) - (point-max))))) - (forward-line 1) - (if (re-search-forward "^[^ \t]" nil t) - (goto-char (match-beginning 0)) - (goto-char (point-max))))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (point)))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))))) number)) (defun message-remove-first-header (header) @@ -1412,11 +1409,9 @@ Point is left at the beginning of the narrowed-to region." (defun message-next-header () "Go to the beginning of the next header." - (beginning-of-line) - (or (eobp) (forward-char 1)) - (not (if (re-search-forward "^[^ \t]" nil t) - (beginning-of-line) - (goto-char (point-max))))) + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (not (eobp))) (defun message-sort-headers-1 () "Sort the buffer as headers using `message-rank' text props." @@ -2503,7 +2498,7 @@ This sub function is for exclusive use of `message-send-mail'." (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. - (or (= (preceding-char) ?\n) + (or (bolp) (insert ?\n)) (when (and news (or (message-fetch-field "cc") @@ -2533,7 +2528,7 @@ This sub function is for exclusive use of `message-send-mail'." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (backward-char 1) + (forward-char -1) (setq delimline (point-marker)) (run-hooks 'message-send-mail-hook) ;; Insert an extra newline if we need it to work around @@ -2591,7 +2586,7 @@ to find out how to use this." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (backward-char 1) + (forward-char -1) (run-hooks 'message-send-mail-hook) ;; send the message (case @@ -2661,7 +2656,7 @@ to find out how to use this." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (backward-char 1) + (forward-char -1) (run-hooks 'message-send-mail-hook) (if recipients (let ((result (smtp-via-smtp user-mail-address @@ -2737,7 +2732,7 @@ This sub function is for exclusive use of `message-send-news'." (message-remove-header message-ignored-news-headers t)) (goto-char (point-max)) ;; require one newline at the end. - (or (= (preceding-char) ?\n) + (or (bolp) (insert ?\n)) (setq result (message-maybe-split-and-send-news method))) (kill-buffer tembuf)) @@ -2757,7 +2752,7 @@ This sub function is for exclusive use of `message-send-news'." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (backward-char 1) + (forward-char -1) (run-hooks 'message-send-news-hook) (gnus-open-server method) (gnus-request-post method) @@ -3280,7 +3275,7 @@ If NOW, use that time instead." (while (re-search-forward "[\t\n]+" nil t) (replace-match "" t t)) (unless (zerop (buffer-size)) - (buffer-string))))) + (buffer-substring (point-min) (point-max)))))) (defun message-make-lines () "Count the number of lines and return numeric string." @@ -3393,7 +3388,7 @@ If NOW, use that time instead." (replace-match "\\1(\\3)" t) (goto-char fullname-start))) (insert ")"))) - (buffer-string)))) + (buffer-substring (point-min) (point-max))))) (defun message-make-sender () "Return the \"real\" user address. @@ -4059,7 +4054,8 @@ that further discussion should take place only in " (while (re-search-forward "[ \t]+" nil t) (replace-match " " t t)) ;; Remove addresses that match `rmail-dont-reply-to-names'. - (insert (prog1 (rmail-dont-reply-to (buffer-string)) + (insert (prog1 (rmail-dont-reply-to (buffer-substring + (point-min) (point-max))) (erase-buffer))) (goto-char (point-min)) ;; Perhaps Mail-Copies-To: never removed the only address? @@ -4069,7 +4065,8 @@ that further discussion should take place only in " (mapcar (lambda (addr) (cons (mail-strip-quoted-names addr) addr)) - (message-tokenize-header (buffer-string)))) + (message-tokenize-header (buffer-substring + (point-min) (point-max))))) (let ((s ccalist)) (while s (setq ccalist (delq (assoc (car (pop s)) s) ccalist))))) @@ -4407,7 +4404,7 @@ header line with the old Message-ID." (while (re-search-backward "[ \t]+$" nil t) (replace-match "")) - (buffer-string))) + (buffer-substring (point-min) (point-max)))) ;;; Forwarding messages. diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 6f0045f..cf222cc 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1476,9 +1476,10 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ;; Narrow to the status. (narrow-to-region (point) - (if (re-search-forward "^[^ \t]" nil t) - (1- (point)) - (point-max))) + (progn + (while (and (zerop (forward-line 1)) + (memq (char-after) '(?\t ?\ )))) + (point))) ;; Go through all elements and add them to the list. (goto-char (point-min)) (while (re-search-forward "[^ \t=]+" nil t) diff --git a/lisp/nnsoup.el b/lisp/nnsoup.el index 031c0ac..8f4dd18 100644 --- a/lisp/nnsoup.el +++ b/lisp/nnsoup.el @@ -688,7 +688,7 @@ backend for the messages.") (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. - (or (= (preceding-char) ?\n) + (or (bolp) (insert ?\n)) (let ((case-fold-search t)) ;; Change header-delimiter to be what sendmail expects. @@ -696,7 +696,7 @@ backend for the messages.") (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (backward-char 1) + (forward-char -1) (setq delimline (point-marker)) (goto-char (1+ delimline)) (let ((msg-buf diff --git a/lisp/nnspool.el b/lisp/nnspool.el index 106aee0..2208af7 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -345,7 +345,8 @@ there.") ;; Make status message by folding lines. (while (re-search-forward "[ \t\n]+" nil t) (replace-match " " t t)) - (nnheader-report 'nnspool "%s" (buffer-string)) + (nnheader-report 'nnspool "%s" (buffer-substring + (point-min) (point-max))) (nnheader-message 5 "nnspool: %s" nnspool-status-string) (ding) (run-hooks 'nnspool-rejected-article-hook)))) diff --git a/lisp/nntp.el b/lisp/nntp.el index e60dd86..099054e 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -911,7 +911,7 @@ password contained in '~/.nntp-authinfo'." (defun nntp-read-server-type () "Find out what the name of the server we have connected to is." ;; Wait for the status string to arrive. - (setq nntp-server-type (buffer-string)) + (setq nntp-server-type (buffer-substring (point-min) (point-max))) (let ((alist nntp-server-action-alist) (case-fold-search t) entry) @@ -1022,7 +1022,7 @@ password contained in '~/.nntp-authinfo'." (defun nntp-snarf-error-message () "Save the error message in the current buffer." - (let ((message (buffer-string))) + (let ((message (buffer-substring (point-min) (point-max)))) (while (string-match "[\r\n]+" message) (setq message (replace-match " " t t message))) (nnheader-report 'nntp message) -- 1.7.10.4 From e3eabdf7a6b3f3f8a52918c280c4ef0ce42c25f5 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 13 May 1999 12:36:16 +0000 Subject: [PATCH 10/16] Update. --- ChangeLog | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4b00d6c..c911069 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,54 @@ 1999-05-13 Katsumi Yamaoka + * lisp/gnus.el (gnus-revision-number): Increment to 03. + + * lisp/nnsoup.el (nnsoup-store-reply): Use `forward-char' instead + of `backward-char'. + * lisp/message.el (message-send-news-with-gnus, + message-send-mail-with-smtp, message-send-mail-with-qmail, + message-send-mail-with-sendmail): Ditto. + * lisp/gnus-picon.el (gnus-group-display-picons): Ditto. + + * lisp/nnsoup.el (nnsoup-store-reply): Use `(bolp)' instead of + `(= (preceding-char) ?\n)'. + * lisp/message.el (message-send-news, message-send-mail): Ditto. + + * lisp/gnus-sum.el (gnus-summary-reparent-thread): Use + `(end-of-line 0)' to go to the end of the previous line. + + * lisp/nnmail.el (nnmail-decode-status): Don't use regexp search. + * lisp/message.el (message-next-header, message-remove-header): + Ditto. + * lisp/gnus-art.el (gnus-article-add-buttons-to-head, + gnus-article-highlight-headers, gnus-article-hide-header, + article-hide-boring-headers, article-hide-headers): Ditto. + + * lisp/nntp.el (nntp-snarf-error-message, nntp-read-server-type): + Use `buffer-substring' instead of `buffer-string'. + * lisp/nnspool.el (nnspool-inews-sentinel): Ditto. + * lisp/message.el (message-wash-subject, message-reply, + message-make-from, message-make-organization): Ditto. + * lisp/md5.el (md5): Ditto. + * lisp/mail-source.el (mail-source-movemail): Ditto. + * lisp/gnus.el (gnus-getenv-nntpserver): Ditto. + * lisp/gnus-xmas.el (gnus-xmas-article-display-xface): Ditto. + * lisp/gnus-util.el (gnus-mode-string-quote): Ditto. + * lisp/gnus-sum.el (gnus-summary-edit-article-done, + gnus-simplify-subject-fuzzy): Ditto. + * lisp/gnus-spec.el (gnus-parse-simple-format): Ditto. + * lisp/gnus-picon.el (gnus-picons-make-glyph): Ditto. + * lisp/gnus-msg.el (gnus-copy-article-buffer): Ditto. + * lisp/gnus-mh.el (gnus-summary-save-in-folder): Ditto. + * lisp/gnus-kill.el (gnus-kill-file-apply-buffer): Ditto. + * lisp/gnus-art.el (gnus-article-mime-edit-exit, + gnus-article-edit-exit): Ditto. + * lisp/format-spec.el (format-spec): Ditto. + * lisp/dgnushack.el (dgnushack-make-package): Ditto. + * lisp/base64.el (base64-decode, base64-encode, + base64-run-command-on-region): Ditto. + +1999-05-13 Katsumi Yamaoka + * lisp/gnus.el (gnus-revision-number): Increment to 02. * lisp/gnus-ofsetup.el (gnus-setup-for-offline): Don't specify -- 1.7.10.4 From 92e487b48b97af4b331420a1870bb7f185fccf99 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 14 May 1999 03:24:20 +0000 Subject: [PATCH 11/16] Undo all of the last changes. --- lisp/base64.el | 7 +++---- lisp/dgnushack.el | 2 +- lisp/format-spec.el | 2 +- lisp/gnus-art.el | 43 ++++++++++++++++++++----------------------- lisp/gnus-kill.el | 2 +- lisp/gnus-mh.el | 2 +- lisp/gnus-msg.el | 2 +- lisp/gnus-picon.el | 5 ++--- lisp/gnus-spec.el | 2 +- lisp/gnus-sum.el | 7 ++++--- lisp/gnus-util.el | 2 +- lisp/gnus-xmas.el | 3 +-- lisp/gnus.el | 4 ++-- lisp/mail-source.el | 5 ++--- lisp/md5.el | 2 +- lisp/message.el | 45 ++++++++++++++++++++++++--------------------- lisp/nnmail.el | 7 +++---- lisp/nnsoup.el | 4 ++-- lisp/nnspool.el | 3 +-- lisp/nntp.el | 4 ++-- 20 files changed, 74 insertions(+), 79 deletions(-) diff --git a/lisp/base64.el b/lisp/base64.el index cbbc58e..12b4ca9 100644 --- a/lisp/base64.el +++ b/lisp/base64.el @@ -93,8 +93,7 @@ base64-encoder-program.") t) (t (save-excursion (set-buffer (find-file-noselect tempfile)) - (setq errstring (buffer-substring - (point-min) (point-max))) + (setq errstring (buffer-string)) (kill-buffer nil) (cons status errstring))))) (ignore-errors @@ -252,7 +251,7 @@ base64-encoder-program.") (skip-chars-backward " \t\r\n") (delete-region (point-max) (point)) (prog1 - (buffer-substring (point-min) (point-max)) + (buffer-string) (kill-buffer (current-buffer))))) (defun base64-decode (string) @@ -265,7 +264,7 @@ base64-encoder-program.") (skip-chars-backward " \t\r\n") (delete-region (point-max) (point)) (prog1 - (buffer-substring (point-min) (point-max)) + (buffer-string) (kill-buffer (current-buffer))))) (fset 'base64-decode-string 'base64-decode) diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 20e2de4..e2b30e4 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -119,7 +119,7 @@ Modify to suit your needs.")) (with-temp-buffer (let ((standard-output (current-buffer))) (Custom-make-dependencies ".")) - (message (buffer-substring (point-min) (point-max)))) + (message (buffer-string))) (require 'cus-load) (byte-compile-file "custom-load.el") diff --git a/lisp/format-spec.el b/lisp/format-spec.el index 241e9dc..8986dc0 100644 --- a/lisp/format-spec.el +++ b/lisp/format-spec.el @@ -52,7 +52,7 @@ to values." ;; Signal an error on bogus format strings. (t (error "Invalid format string")))) - (buffer-substring (point-min) (point-max)))) + (buffer-string))) (defun format-spec-make (&rest pairs) "Return an alist suitable for use in `format-spec' based on PAIRS. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index d812a27..8902c90 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1083,9 +1083,8 @@ Initialized from `text-mode-syntax-table.") ;; `gnus-ignored-headers' and `gnus-visible-headers' to ;; select which header lines is to remain visible in the ;; article buffer. - (while (memq (char-after) '(?\t ?\ )) - (forward-line 1)) - (while (not (eobp)) + (while (re-search-forward "^[^ \t]*:" nil t) + (beginning-of-line) ;; Mark the rank of the header. (put-text-property (point) (1+ (point)) 'message-rank @@ -1094,9 +1093,7 @@ Initialized from `text-mode-syntax-table.") (not (looking-at ignored)))) (gnus-article-header-rank) (+ 2 max))) - (forward-line 1) - (while (memq (char-after) '(?\t ?\ )) - (forward-line 1))) + (forward-line 1)) (message-sort-headers-1) (when (setq beg (text-property-any (point-min) (point-max) 'message-rank (+ 2 max))) @@ -1133,11 +1130,12 @@ always hide." (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) (forward-line -1) (gnus-article-hide-text-type - (point) + (progn (beginning-of-line) (point)) (progn - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (point)) + (end-of-line) + (if (re-search-forward "^[^ \t]" nil t) + (match-beginning 0) + (point-max))) 'boring-headers))) ;; Hide boring Newsgroups header. ((eq elem 'newsgroups) @@ -1193,9 +1191,10 @@ always hide." (gnus-article-hide-text-type (progn (beginning-of-line) (point)) (progn - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (point)) + (end-of-line) + (if (re-search-forward "^[^ \t]" nil t) + (match-beginning 0) + (point-max))) 'boring-headers)))) (defvar gnus-article-normalized-header-length 40 @@ -3844,7 +3843,7 @@ groups." "Exit the article editing without updating." (interactive) ;; We remove all text props from the article buffer. - (let ((buf (format "%s" (buffer-substring (point-min) (point-max)))) + (let ((buf (format "%s" (buffer-string))) (curbuf (current-buffer)) (p (point)) (window-start (window-start))) @@ -3942,7 +3941,7 @@ after replacing with the original article." (setq font-lock-defaults nil) (font-lock-mode 0)) ;; We remove all text props from the article buffer. - (setq buf (format "%s" (buffer-substring (point-min) (point-max)))) + (setq buf (format "%s" (buffer-string))) (set-buffer (get-buffer-create gnus-original-article-buffer)) (erase-buffer) (insert buf) @@ -4155,11 +4154,9 @@ do the highlighting. See the documentation for those functions." (when (and field-face (not (memq (setq from (point)) fpoints))) (push from fpoints) - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (unless (eobp) - ;; Go to the end of the previous line. - (end-of-line 0)) + (if (re-search-forward "^[^ \t]" nil t) + (forward-char -2) + (goto-char (point-max))) (gnus-put-text-property from (point) 'face field-face)))))))) (defun gnus-article-highlight-signature () @@ -4250,9 +4247,9 @@ specified by `gnus-button-alist'." (while (re-search-forward (car entry) nil t) ;; Each header matching the entry. (setq beg (match-beginning 0)) - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (setq end (point)) + (setq end (or (and (re-search-forward "^[^ \t]" nil t) + (match-beginning 0)) + (point-max))) (goto-char beg) (while (re-search-forward (nth 1 entry) end t) ;; Each match within a header. diff --git a/lisp/gnus-kill.el b/lisp/gnus-kill.el index 73f8e16..6121552 100644 --- a/lisp/gnus-kill.el +++ b/lisp/gnus-kill.el @@ -282,7 +282,7 @@ If NEWSGROUP is nil, the global kill file is selected." (if (and gnus-current-kill-article (get-buffer gnus-summary-buffer)) ;; Assume newsgroup is selected. - (gnus-kill-file-apply-string (buffer-substring (point-min) (point-max))) + (gnus-kill-file-apply-string (buffer-string)) (ding) (gnus-message 2 "No newsgroup is selected."))) (defun gnus-kill-file-apply-string (string) diff --git a/lisp/gnus-mh.el b/lisp/gnus-mh.el index 0e73190..6fabb5c 100644 --- a/lisp/gnus-mh.el +++ b/lisp/gnus-mh.el @@ -76,7 +76,7 @@ Optional argument FOLDER specifies folder name." (set-buffer errbuf) (if (zerop (buffer-size)) (message "Article saved in folder: %s" folder) - (message "%s" (buffer-substring (point-min) (point-max)))) + (message "%s" (buffer-string))) (kill-buffer errbuf)))) (setq gnus-newsgroup-last-folder folder))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 431a1cd..186810c 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -471,7 +471,7 @@ header line with the old Message-ID." (gnus-remove-text-with-property 'gnus-next) (insert (prog1 - (format "%s" (buffer-substring (point-min) (point-max))) + (format "%s" (buffer-string)) (erase-buffer))) ;; Find the original headers. (set-buffer gnus-original-article-buffer) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index f3365ee..38de8df 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -325,7 +325,7 @@ arguments necessary for the job.") (let ((article-goto-body-goes-to-point-min-p nil)) (article-goto-body)) (unless (bobp) - (forward-char -1))))) + (backward-char 1))))) (if (null gnus-picons-piconsearch-url) (gnus-picons-display-pairs (gnus-picons-lookup-pairs @@ -506,8 +506,7 @@ none, and whose CDR is the corresponding element of DOMAINS." nil 'quiet) (prog1 (make-glyph (vector 'xbm :file fname)) (delete-file fname)))) - (t (make-glyph (vector type :data (buffer-substring - (point-min) (point-max))))))) + (t (make-glyph (vector type :data (buffer-string)))))) ;;; Parsing of piconsearch result page. diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index fb89ee2..ca97b05 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -467,7 +467,7 @@ by `gnus-xmas-redefine'." (push el flist))) (insert elem-type) (push (car elem) flist)))) - (setq fstring (buffer-substring (point-min) (point-max)))) + (setq fstring (buffer-string))) ;; Do some postprocessing to increase efficiency. (setq diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 247f262..4608511 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1155,7 +1155,7 @@ See `gnus-simplify-buffer-fuzzy' for details." (setq subject (substring subject (match-end 0)))) (insert subject) (inline (gnus-simplify-buffer-fuzzy)) - (buffer-substring (point-min) (point-max))))) + (buffer-string)))) (defsubst gnus-simplify-subject-fully (subject) "Simplify a subject string according to gnus-summary-gather-subject-limit." @@ -7535,7 +7535,7 @@ groups." (save-excursion (save-restriction (message-narrow-to-head) - (let ((head (buffer-substring (point-min) (point-max))) + (let ((head (buffer-string)) header) (with-temp-buffer (insert (format "211 %d Article retrieved.\n" @@ -8352,7 +8352,8 @@ is non-nil or the Subject: of both articles are the same." (if (re-search-forward "^References: " nil t) (progn (re-search-forward "^[^ \t]" nil t) - (end-of-line 0) ;; Go to the end of the previous line. + (forward-line -1) + (end-of-line) (insert " " message-id)) (insert "References: " message-id "\n"))) (set-buffer gnus-summary-buffer) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index bf6315d..fd4f927 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -332,7 +332,7 @@ Cache the result as a text property stored in DATE." (goto-char (point-min)) (while (search-forward "%" nil t) (insert "%")) - (buffer-substring (point-min) (point-max)))) + (buffer-string))) ;; Make a hash table (default and minimum size is 256). ;; Optional argument HASHSIZE specifies the table size. diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index e804c7a..bca3843 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -823,8 +823,7 @@ XEmacs compatibility workaround." (gnus-xmas-call-region "icontopbm") (gnus-xmas-call-region "ppmtoxpm") (make-glyph - (vector 'xpm :data (buffer-substring - (point-min) (point-max))))))) + (vector 'xpm :data (buffer-string)))))) (t (make-glyph [nothing])))) (ext (make-extent (progn diff --git a/lisp/gnus.el b/lisp/gnus.el index d1bd765..c398069 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.064" "Version number for this version of gnus.") -(defconst gnus-revision-number "03" +(defconst gnus-revision-number "04" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.84" @@ -876,7 +876,7 @@ used to 899, you would say something along these lines: (save-excursion (set-buffer (gnus-get-buffer-create " *gnus nntp*")) (insert-file-contents gnus-nntpserver-file) - (let ((name (buffer-substring (point-min) (point-max)))) + (let ((name (buffer-string))) (prog1 (if (string-match "\\'[ \t\n]*$" name) nil diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 6bfd153..acd758c 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -273,9 +273,8 @@ Pass INFO on to CALLBACK." (delete-region (point-min) (match-end 0))) (unless (yes-or-no-p (format "movemail: %s (%d return). Continue? " - (buffer-substring (point-min) (point-max)) - result)) - (error "%s" (buffer-substring (point-min) (point-max)))) + (buffer-string) result)) + (error "%s" (buffer-string))) (setq to nil))))))) (when (and errors (buffer-name errors)) diff --git a/lisp/md5.el b/lisp/md5.el index 8823f30..91a3041 100644 --- a/lisp/md5.el +++ b/lisp/md5.el @@ -391,7 +391,7 @@ hash of a portion of OBJECT." (if (<= (point-max) md5-maximum-internal-length) (mapconcat (function (lambda (node) (format "%02x" node))) - (md5-encode (buffer-substring (point-min) (point-max))) + (md5-encode (buffer-string)) "") (call-process-region (point-min) (point-max) (or shell-file-name "/bin/sh") diff --git a/lisp/message.el b/lisp/message.el index 9a69178..a040cc1 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1330,11 +1330,14 @@ Return the number of headers removed." ;; There might be a continuation header, so we have to search ;; until we find a new non-continuation line. (progn - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (point)))) - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))))) + (forward-line 1) + (if (re-search-forward "^[^ \t]" nil t) + (goto-char (match-beginning 0)) + (point-max))))) + (forward-line 1) + (if (re-search-forward "^[^ \t]" nil t) + (goto-char (match-beginning 0)) + (goto-char (point-max))))) number)) (defun message-remove-first-header (header) @@ -1409,9 +1412,11 @@ Point is left at the beginning of the narrowed-to region." (defun message-next-header () "Go to the beginning of the next header." - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (not (eobp))) + (beginning-of-line) + (or (eobp) (forward-char 1)) + (not (if (re-search-forward "^[^ \t]" nil t) + (beginning-of-line) + (goto-char (point-max))))) (defun message-sort-headers-1 () "Sort the buffer as headers using `message-rank' text props." @@ -2498,7 +2503,7 @@ This sub function is for exclusive use of `message-send-mail'." (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. - (or (bolp) + (or (= (preceding-char) ?\n) (insert ?\n)) (when (and news (or (message-fetch-field "cc") @@ -2528,7 +2533,7 @@ This sub function is for exclusive use of `message-send-mail'." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (forward-char -1) + (backward-char 1) (setq delimline (point-marker)) (run-hooks 'message-send-mail-hook) ;; Insert an extra newline if we need it to work around @@ -2586,7 +2591,7 @@ to find out how to use this." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (forward-char -1) + (backward-char 1) (run-hooks 'message-send-mail-hook) ;; send the message (case @@ -2656,7 +2661,7 @@ to find out how to use this." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (forward-char -1) + (backward-char 1) (run-hooks 'message-send-mail-hook) (if recipients (let ((result (smtp-via-smtp user-mail-address @@ -2732,7 +2737,7 @@ This sub function is for exclusive use of `message-send-news'." (message-remove-header message-ignored-news-headers t)) (goto-char (point-max)) ;; require one newline at the end. - (or (bolp) + (or (= (preceding-char) ?\n) (insert ?\n)) (setq result (message-maybe-split-and-send-news method))) (kill-buffer tembuf)) @@ -2752,7 +2757,7 @@ This sub function is for exclusive use of `message-send-news'." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (forward-char -1) + (backward-char 1) (run-hooks 'message-send-news-hook) (gnus-open-server method) (gnus-request-post method) @@ -3275,7 +3280,7 @@ If NOW, use that time instead." (while (re-search-forward "[\t\n]+" nil t) (replace-match "" t t)) (unless (zerop (buffer-size)) - (buffer-substring (point-min) (point-max)))))) + (buffer-string))))) (defun message-make-lines () "Count the number of lines and return numeric string." @@ -3388,7 +3393,7 @@ If NOW, use that time instead." (replace-match "\\1(\\3)" t) (goto-char fullname-start))) (insert ")"))) - (buffer-substring (point-min) (point-max))))) + (buffer-string)))) (defun message-make-sender () "Return the \"real\" user address. @@ -4054,8 +4059,7 @@ that further discussion should take place only in " (while (re-search-forward "[ \t]+" nil t) (replace-match " " t t)) ;; Remove addresses that match `rmail-dont-reply-to-names'. - (insert (prog1 (rmail-dont-reply-to (buffer-substring - (point-min) (point-max))) + (insert (prog1 (rmail-dont-reply-to (buffer-string)) (erase-buffer))) (goto-char (point-min)) ;; Perhaps Mail-Copies-To: never removed the only address? @@ -4065,8 +4069,7 @@ that further discussion should take place only in " (mapcar (lambda (addr) (cons (mail-strip-quoted-names addr) addr)) - (message-tokenize-header (buffer-substring - (point-min) (point-max))))) + (message-tokenize-header (buffer-string)))) (let ((s ccalist)) (while s (setq ccalist (delq (assoc (car (pop s)) s) ccalist))))) @@ -4404,7 +4407,7 @@ header line with the old Message-ID." (while (re-search-backward "[ \t]+$" nil t) (replace-match "")) - (buffer-substring (point-min) (point-max)))) + (buffer-string))) ;;; Forwarding messages. diff --git a/lisp/nnmail.el b/lisp/nnmail.el index cf222cc..6f0045f 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1476,10 +1476,9 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ;; Narrow to the status. (narrow-to-region (point) - (progn - (while (and (zerop (forward-line 1)) - (memq (char-after) '(?\t ?\ )))) - (point))) + (if (re-search-forward "^[^ \t]" nil t) + (1- (point)) + (point-max))) ;; Go through all elements and add them to the list. (goto-char (point-min)) (while (re-search-forward "[^ \t=]+" nil t) diff --git a/lisp/nnsoup.el b/lisp/nnsoup.el index 8f4dd18..031c0ac 100644 --- a/lisp/nnsoup.el +++ b/lisp/nnsoup.el @@ -688,7 +688,7 @@ backend for the messages.") (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. - (or (bolp) + (or (= (preceding-char) ?\n) (insert ?\n)) (let ((case-fold-search t)) ;; Change header-delimiter to be what sendmail expects. @@ -696,7 +696,7 @@ backend for the messages.") (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") - (forward-char -1) + (backward-char 1) (setq delimline (point-marker)) (goto-char (1+ delimline)) (let ((msg-buf diff --git a/lisp/nnspool.el b/lisp/nnspool.el index 2208af7..106aee0 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -345,8 +345,7 @@ there.") ;; Make status message by folding lines. (while (re-search-forward "[ \t\n]+" nil t) (replace-match " " t t)) - (nnheader-report 'nnspool "%s" (buffer-substring - (point-min) (point-max))) + (nnheader-report 'nnspool "%s" (buffer-string)) (nnheader-message 5 "nnspool: %s" nnspool-status-string) (ding) (run-hooks 'nnspool-rejected-article-hook)))) diff --git a/lisp/nntp.el b/lisp/nntp.el index 099054e..e60dd86 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -911,7 +911,7 @@ password contained in '~/.nntp-authinfo'." (defun nntp-read-server-type () "Find out what the name of the server we have connected to is." ;; Wait for the status string to arrive. - (setq nntp-server-type (buffer-substring (point-min) (point-max))) + (setq nntp-server-type (buffer-string)) (let ((alist nntp-server-action-alist) (case-fold-search t) entry) @@ -1022,7 +1022,7 @@ password contained in '~/.nntp-authinfo'." (defun nntp-snarf-error-message () "Save the error message in the current buffer." - (let ((message (buffer-substring (point-min) (point-max)))) + (let ((message (buffer-string))) (while (string-match "[\r\n]+" message) (setq message (replace-match " " t t message))) (nnheader-report 'nntp message) -- 1.7.10.4 From 99c09993aa994ed36482da21cf900be6f9f1c326 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 14 May 1999 03:25:14 +0000 Subject: [PATCH 12/16] Update. --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index c911069..93ed74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-05-14 Katsumi Yamaoka + + * lisp/gnus.el (gnus-revision-number): Increment to 04. + + * lisp/*.el: Undo all of the last changes. + 1999-05-13 Katsumi Yamaoka * lisp/gnus.el (gnus-revision-number): Increment to 03. -- 1.7.10.4 From a1ea51713b3a729f69c6bfdb6c1ecd7119e1b26c Mon Sep 17 00:00:00 2001 From: czkmt Date: Sat, 15 May 1999 02:16:57 +0000 Subject: [PATCH 13/16] * texi/gnusref-ja.tex: Fix typo. --- ChangeLog | 4 ++++ texi/gnusref-ja.tex | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 93ed74f..0492149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1999-05-15 Tsukamoto Tetsuo + + * texi/gnusref-ja.tex: Fix typo. + 1999-05-14 Katsumi Yamaoka * lisp/gnus.el (gnus-revision-number): Increment to 04. diff --git a/texi/gnusref-ja.tex b/texi/gnusref-ja.tex index 3a8a502..d98bcb5 100644 --- a/texi/gnusref-ja.tex +++ b/texi/gnusref-ja.tex @@ -591,7 +591,7 @@ C-c C-d & $B8=:_$NF|IU$1(B ({\bf date}) $B$rF|?t$H$7$FA^F~$7$^$9(B.\\ }} \def\Wsubmap{ -\subsec{$B5-;v%P%C%U%!$N@vBu(B} +\subsec{$B5-;v%P%C%U%!$NA*Br(B} \begin{keys}{W C-c} W b & $B5-;v$NCf$N(B Message-ID $B$H(B URL $B$r%^%&%9$G%/%j%C%/2DG=$K$7$^$9(B {\bf buttons}.\\ -- 1.7.10.4 From edbd071010d645d7fab1a7973130d637d0a33cbe Mon Sep 17 00:00:00 2001 From: czkmt Date: Sat, 15 May 1999 02:42:42 +0000 Subject: [PATCH 14/16] * texi/gnusref-ja.tex: Undo the last change. --- ChangeLog | 4 ++++ texi/gnusref-ja.tex | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0492149..0dfa7e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-05-15 Tsukamoto Tetsuo + * texi/gnusref-ja.tex: Undo the last change. + +1999-05-15 Tsukamoto Tetsuo + * texi/gnusref-ja.tex: Fix typo. 1999-05-14 Katsumi Yamaoka diff --git a/texi/gnusref-ja.tex b/texi/gnusref-ja.tex index d98bcb5..3a8a502 100644 --- a/texi/gnusref-ja.tex +++ b/texi/gnusref-ja.tex @@ -591,7 +591,7 @@ C-c C-d & $B8=:_$NF|IU$1(B ({\bf date}) $B$rF|?t$H$7$FA^F~$7$^$9(B.\\ }} \def\Wsubmap{ -\subsec{$B5-;v%P%C%U%!$NA*Br(B} +\subsec{$B5-;v%P%C%U%!$N@vBu(B} \begin{keys}{W C-c} W b & $B5-;v$NCf$N(B Message-ID $B$H(B URL $B$r%^%&%9$G%/%j%C%/2DG=$K$7$^$9(B {\bf buttons}.\\ -- 1.7.10.4 From 4c1038b166f07fecbbfb0021d2b14470b72b88cb Mon Sep 17 00:00:00 2001 From: czkmt Date: Sun, 16 May 1999 13:18:56 +0000 Subject: [PATCH 15/16] * texi/gnusref-ja.tex (subsec Notes): Complete words. (sec GroupMode): Translate description of "P". --- ChangeLog | 5 +++++ texi/gnusref-ja.tex | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dfa7e0..87d2ef4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-05-16 Tsukamoto Tetsuo + + * texi/gnusref-ja.tex (subsec Notes): Complete words. + (sec GroupMode): Translate description of "P". + 1999-05-15 Tsukamoto Tetsuo * texi/gnusref-ja.tex: Undo the last change. diff --git a/texi/gnusref-ja.tex b/texi/gnusref-ja.tex index 3a8a502..b7f45ab 100644 --- a/texi/gnusref-ja.tex +++ b/texi/gnusref-ja.tex @@ -57,7 +57,8 @@ Gnus $B$OJ#;($G$9(B. $B8=:_$O(B 346 $B$b$NBPOCE*(B ($BMxMQ Date: Mon, 17 May 1999 02:15:28 +0000 Subject: [PATCH 16/16] (gnus-revision-number): Increment to 05. (TopLevel): Remove autoloads for `gnus-picons-display-x-face' and `gnus-picons-article-display-x-face'. --- lisp/gnus.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/gnus.el b/lisp/gnus.el index c398069..957285e 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1784,8 +1784,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-summary-post-forward gnus-summary-wide-reply-with-original gnus-summary-post-forward) ("gnus-picon" :interactive t gnus-article-display-picons - gnus-group-display-picons gnus-picons-article-display-x-face - gnus-picons-display-x-face) + gnus-group-display-picons) ("gnus-picon" gnus-picons-buffer-name) ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p gnus-grouplens-mode) -- 1.7.10.4