From 1ee74ac716e37afd5c8bfdf74a7366cbe9552880 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 11 Nov 2001 22:37:54 +0000 Subject: [PATCH] Synch with Oort Gnus. --- ChangeLog | 5 +++++ lisp/ChangeLog | 22 ++++++++++++++++++++++ lisp/gnus.el | 2 +- lisp/message.el | 41 ++++++++++++++++++++++++++++++----------- make-x.bat | 4 ++-- texi/ChangeLog | 4 ++++ texi/message-ja.texi | 27 ++++++--------------------- texi/message.texi | 7 +++++++ 8 files changed, 77 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index e480d9d..0a70efd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-11 Simon Josefsson + + * make-x.bat: Don't use -nw. Suggested by Frank Haun + . + 2001-11-09 TSUCHIYA Masatoshi * texi/infohack.el (infohack-texi-format): To process diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b1c531..17a7a9e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2001-11-11 Simon Josefsson + + * message.el (top-level): Autoload sha1. + (message-canlock-generate): Use sha1 instead of md5 (sha1 used by + canlock, no need to require two different hash algs). Suggested + by Ferenc Wagner . + +2001-11-09 Simon Josefsson + + * gnus.el (gnus-local-domain): Fix doc. From Pavel Jan,Bm(Bk + . + +2001-11-09 Kai Gro,A_(Bjohann + + * message.el (message-point-in-header-p): New function. + (message-do-auto-fill): Use it. + (message-beginning-of-line): New function. Goes to beginning of + header value (i.e., end of header name), or to beginning of line + if already at beginning of value. Behaves like + `beginning-of-line' when in message body. + (message-mode-map): Bind it. + 2001-11-08 Simon Josefsson * gnus-msg.el (gnus-posting-styles): Add doc. diff --git a/lisp/gnus.el b/lisp/gnus.el index c8e3e24..8a13c12 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1163,7 +1163,7 @@ Should be set in paths.el, and shouldn't be touched by the user.") (defcustom gnus-local-domain nil "Local domain name without a host name. The DOMAINNAME environment variable is used instead if it is defined. -If the `system-name' function returns the full Internet name, there is +If the function `system-name' returns the full Internet name, there is no need to set this variable." :group 'gnus-message :type '(choice (const :tag "default" nil) diff --git a/lisp/message.el b/lisp/message.el index 3596194..3115c42 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -55,6 +55,7 @@ (require 'mml)) (require 'rfc822) +(autoload 'sha1 "sha1-el") (defgroup message '((user-mail-address custom-variable) (user-full-name custom-variable)) @@ -1762,6 +1763,7 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\M-\r" 'message-newline-and-reformat) ;;(define-key message-mode-map "\M-q" 'message-fill-paragraph) + (define-key message-mode-map "\C-a" 'message-beginning-of-line) (define-key message-mode-map "\t" 'message-tab) (define-key message-mode-map "\M-;" 'comment-region) @@ -2270,15 +2272,19 @@ Prefix arg means justify as well." (message-newline-and-reformat arg t) t)) +;; Is it better to use `mail-header-end'? +(defun message-point-in-header-p () + "Return t if point is in the header." + (save-excursion + (let ((p (point))) + (goto-char (point-min)) + (not (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n") + p t))))) + (defun message-do-auto-fill () "Like `do-auto-fill', but don't fill in message header." - (when (> (point) (save-excursion - (goto-char (point-min)) - (if (re-search-forward - (concat "^" (regexp-quote mail-header-separator) - "\n") nil t) - (match-beginning 0) - (point-max)))) + (unless (message-point-in-header-p) (do-auto-fill))) (defun message-insert-signature (&optional force) @@ -3369,10 +3375,10 @@ This sub function is for exclusive use of `message-send-news'." (defun message-canlock-generate () "Return a string that is non-trival to guess. Do not use this for anything important, it is cryptographically weak." - (md5 (concat (message-unique-id) - (format "%x%x%x" (random) (random t) (random)) - (prin1-to-string (recent-keys)) - (prin1-to-string (garbage-collect))))) + (sha1 (concat (message-unique-id) + (format "%x%x%x" (random) (random t) (random)) + (prin1-to-string (recent-keys)) + (prin1-to-string (garbage-collect))))) (defun message-canlock-password () "The password used by message for cancel locks. @@ -4616,6 +4622,19 @@ than 988 characters long, and if they are not, trim them until they are." (forward-line 2))) (sit-for 0))) +(defun message-beginning-of-line (&optional n) + "Move point to beginning of header value or to beginning of line." + (interactive "p") + (if (message-point-in-header-p) + (let* ((here (point)) + (bol (progn (beginning-of-line n) (point))) + (eol (gnus-point-at-eol)) + (eoh (re-search-forward ": *" eol t))) + (if (or (not eoh) (equal here eoh)) + (goto-char bol) + (goto-char eoh))) + (beginning-of-line n))) + (defun message-buffer-name (type &optional to group) "Return a new (unique) buffer name based on TYPE and TO." (cond diff --git a/make-x.bat b/make-x.bat index ce347d2..f141851 100644 --- a/make-x.bat +++ b/make-x.bat @@ -14,13 +14,13 @@ if "%1" == "" goto usage set emacs=xemacs.exe cd lisp -call %1\%emacs% -batch -nw -q -no-site-file -l ./dgnushack.el -f dgnushack-compile +call %1\%emacs% -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile if not "%2" == "copy" goto info attrib -r %1\..\..\xemacs-packages\lisp\gnus\*.* copy *.el* %1\..\..\xemacs-packages\lisp\gnus :info -set EMACSINFO=call %1\%emacs% -no-site-file -no-init-file -batch -nw -q -l infohack.el -f batch-makeinfo +set EMACSINFO=call %1\%emacs% -no-site-file -no-init-file -batch -q -l infohack.el -f batch-makeinfo cd ..\texi %EMACSINFO% message.texi %EMACSINFO% emacs-mime.texi diff --git a/texi/ChangeLog b/texi/ChangeLog index 39593b7..abd3f70 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2001-11-09 Kai Gro,A_(Bjohann + + * message.texi (Movement): message-beginning-of-line. + 2001-11-07 Simon Josefsson * sieve.texi (Examples): Add. diff --git a/texi/message-ja.texi b/texi/message-ja.texi index f30b4e3..86bfc82 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -107,7 +107,6 @@ license to the document, as described in section 6 of the license. $B$K$h$C$F!"9T$J$&$3$H$,$G$-$^$9!#(B @end titlepage @page - @end tex @node Top @@ -279,7 +278,6 @@ Message $B$O%U%)%m!<%"%C%W$,$I$3$K9T$/$+$rIaDL$NJ}K!$r;H$C$F7hDj$7$^$9$,!"(B @vindex message-forward-ignored-headers $B$3$N@55,I=8=$K9gCW$9$k$9$Y$F$N%X%C%@!<$,!"E>Aw$5$l$k%a%C%;!<%8$+$i:o=|$5(B $B$l$^$9!#(B - @end table @node Resending @@ -403,7 +401,6 @@ Message $B$O%U%)%m!<%"%C%W$,$I$3$K9T$/$+$rIaDL$NJ}K!$r;H$C$F7hDj$7$^$9$,!"(B @kindex C-c C-f C-u @findex message-goto-summary @code{Summary} $B%X%C%@!<$K9T$-$^$9(B (@code{message-goto-summary})$B!#(B - @end table @node Movement @@ -420,6 +417,11 @@ Message $B$O%U%)%m!<%"%C%W$,$I$3$K9T$/$+$rIaDL$NJ}K!$r;H$C$F7hDj$7$^$9$,!"(B @findex message-goto-signature $B%a%C%;!<%8$N=pL>$K0\F0$7$^$9(B (@code{message-goto-signature})$B!#(B +@item C-a +@kindex C-a +@findex message-beginning-of-line +$B%X%C%@!<$NCM$N$H$3$m$K$$$k$H$-$O9T$N@hF,$K0\F0$7!"$=$&$G$J$$$H$-$O%X%C%@!<(B +$B$NCM$N@hF,$K0\F0$7$^$9!#(B($B%X%C%@!<$NCM$O%X%C%@!$H%3%m%s$N8e$KMh$^$9!#(B) @end table @node Insertion @@ -459,7 +461,6 @@ message buffer (@code{message-yank-buffer}). @kindex C-c M-h @findex message-insert-headers $B%a%C%;!<%8$N%X%C%@!<$rA^F~$7$^$9(B (@code{message-insert-headers})$B!#(B - @end table @table @code @@ -574,7 +575,6 @@ Hallvard B Furuseth writes: @vindex message-signature-file $B%P%C%U%!$N:G8e$KA^F~$5$l$k=pL>$NF~$C$F$$$k%U%!%$%k$G$9!#=i4|CM(B $B$O(B @samp{~/.signature} $B$G$9!#(B - @end table RFC1036bis $B$O!"=pL>$O$=$NA0$K(B @samp{-- } $B$N(B3$BJ8;z$@$1$N9T$,$"$k$Y$-$G$"$k(B @@ -648,7 +648,6 @@ Digitally encrypt current MIME part using S/MIME. @findex mml-secure-encrypt-pgpmime Digitally encrypt current MIME part using PGP/MIME. - @end table These commands do not immediately sign or encrypt the message, they @@ -739,7 +738,6 @@ Florian Weimer's @code{gpg.el}. Creating your own OpenPGP key is described in detail in the documentation of your OpenPGP implementation, so we refer to it. - @end ignore @node Various Commands @section $B$$$m$$$m$JL?Na(B @@ -817,7 +815,6 @@ documentation of your OpenPGP implementation, so we refer to it. @findex message-rename-buffer $B%P%C%U%!$NL>A0$rJQ99$7$^$9(B (@code{message-rename-buffer})$B!#@\F,0z?t$rM?(B $B$($i$l$l$P!"?7$7$$%P%C%U%!L>$NF~NO$rB%?J$7$^$9!#(B - @end table @node Sending @@ -844,7 +841,6 @@ documentation of your OpenPGP implementation, so we refer to it. @kindex C-c C-k @findex message-kill-buffer $B%a%C%;!<%8%P%C%U%!$r@Z$C$F=*N;$7$^$9(B (@code{message-kill-buffer})$B!#(B - @end table @node Mail Aliases @@ -973,7 +969,6 @@ Message $B$O%a%C%;!<%8:n@.ItJ,$K4X$7$F$OHs>o$K@Q6KE*$G$9!#$=$l$Ol9g$O(B @code{parens} $B$N$h$&$K8+$($^$9!#(B@code{parens} $B$,0zMQ(B $BId9f$rMW5a$7$?$H$7$F$b!"$H$K$+$/(B @code{angles} $B$r;H$$$^$9!#(B - @end table @item message-deletable-headers @@ -1010,7 +1005,6 @@ Message $B$O%a%C%;!<%8:n@.ItJ,$K4X$7$F$OHs>o$K@Q6KE*$G$9!#$=$l$O$r7h$a$k$?$a$K;H$$$^$9!#$b$7$ @vindex message-default-news-headers $B$3$NJ8;zNs$O%K%e!<%9$H$7$F=i4|2=$5$l$?$9$Y$F$N%a%C%;!<%8%P%C%U%!$N%X%C%@!<(B $B$N:G8e$KA^F~$5$l$^$9!#(B - @end table @node News Variables @@ -1253,7 +1244,6 @@ Message $B$O(B @code{system-name} $B$r%7%9%F%`L>$r7h$a$k$?$a$K;H$$$^$9!#$b$7$ @vindex message-post-method $B=`Hw$5$l$?%K%e!<%9%a%C%;!<%8$rEj9F$9$k$N$K;H$o$l$k(B gnus $B$N(B @dfn{$BA*BrJ}K!(B} ($B>\:Y$O(B gnus $B%^%K%e%"%k$r8+$F2<$5$$(B) $B$G$9!#(B - @end table @node Various Message Variables @@ -1375,7 +1365,6 @@ follows this line--} $B$G$9!#(B ((news message-news-p message-send-via-news) (mail message-mail-p message-send-via-mail)) @end lisp - @end table @node Sending Variables @@ -1397,7 +1386,6 @@ follows this line--} $B$G$9!#(B $B$,(B @code{nil} $B$G$"$l$P!"$=$N$h$&$J?F@Z%a%C%;!<%8$O2C$($i$l$^$;$s!#=i4|CM(B $B$O(B @samp{"The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n"} $B$G$9!#(B - @end table @node Message Buffers @@ -1450,7 +1438,6 @@ Message $B$O$"$J$?$,%a%C%;!<%8%P%C%U%!$rMW5a$7$?$H$-$K!"B>$KL5$$M#0l$N%P%C(B @item message-kill-buffer-on-exit @findex message-kill-buffer-on-exit @code{nil} $B$G$J$1$l$P!"=*N;;~$K$9$0$K%P%C%U%!$r:o=|$7$^$9!#(B - @end table @node Message Actions @@ -1560,12 +1547,10 @@ Message $B$O;ve!"$=$l<+?H$NJQ?t$7$+;H$$$^$;$s(B---$B8E$$(B @code{mail-}  @item Followup-To @item Newsgroups - @end table $B$b$7(B @code{Mail-Copies-To} $B%X%C%@!<$,B8:_$9$k$H!"$=$l$,(B @samp{never} $B$G(B -$B$J$1$l$P!"?7$7$$(B @code{Cc} $B%X%C%@!<$N4p$H$7$F;H$o$l!"$^$9!#(B - +$B$J$1$l$P!"?7$7$$(B @code{Cc} $B%X%C%@!<$N4p$H$7$F;H$o$l$^$9!#(B @end table @node Index diff --git a/texi/message.texi b/texi/message.texi index c7a5910..094b501 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -435,6 +435,13 @@ Move to the beginning of the body of the message @findex message-goto-signature Move to the signature of the message (@code{message-goto-signature}). +@item C-a +@kindex C-a +@findex message-beginning-of-line +If at beginning of header value, go to beginning of line, else go to +beginning of header value. (The header value comes after the header +name and the colon.) + @end table -- 1.7.10.4