From a6ce7a6b7040b917517c56bcd532206acf818092 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 1 Aug 2001 23:15:56 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 35 +++++++++++++++++++++++++++++++++++ lisp/gnus-art.el | 2 +- lisp/mm-view.el | 27 ++++++++++++++------------- lisp/mml2015.el | 2 +- lisp/nnmail.el | 4 +++- lisp/nnslashdot.el | 3 ++- lisp/smime.el | 45 ++++++++++++++++++++++++--------------------- texi/ChangeLog | 7 +++++++ texi/texi2latex.el | 14 ++++++++++++-- 9 files changed, 99 insertions(+), 40 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1727793..408758e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,38 @@ +2001-08-02 Simon Josefsson + + * smime.el (smime-extra-arguments): Removed. + (smime-call-openssl-region): Don't use it. + +2001-08-02 Simon Josefsson + + * smime.el (smime-sign-region): Handle stderr. + (smime-encrypt-region): Ditto. + + * mm-view.el (mm-pkcs7-signed-magic): Make it a regexp. Don't + match the ASN.1 length bytes. + (mm-pkcs7-enveloped-magic): Ditto. + (mm-view-pkcs7-get-type): Don't regexp quote. + +2001-08-01 14:00:00 ShengHuo ZHU + From Andreas Fuchs + + * mml2015.el (mml2015-trust-boundaries-alist): Typo. + +2001-08-01 10:00:00 ShengHuo ZHU + + * gnus-art.el (gnus-header-button-alist): References regexp. + +2001-08-01 Gerd Moellmann + + * mm-view.el (autoload): Don't autoload `diff-mode' if it's + already fboundp. Add INTERACTIVE arg to autoload form. + +2001-08-01 09:00:00 ShengHuo ZHU + + * nnslashdot.el (nnslashdot-init): Add as gnus buffer. + + * nnmail.el (nnmail-cache-open): Ditto. + 2001-07-31 21:00:00 ShengHuo ZHU * gnus-art.el (gnus-button-fetch-group): Fix the regexp. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 855c38b..c864119 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5242,7 +5242,7 @@ variable it the real callback function." (integer :tag "Regexp group"))))) (defcustom gnus-header-button-alist - `(("^\\(References\\|Message-I[Dd]\\):" "<[^>]+>" + `(("^\\(References\\|Message-I[Dd]\\):" "<[^<>]+>" 0 t gnus-button-message-id 0) ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 9ff7036..9e6a729 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -34,7 +34,8 @@ (autoload 'vcard-parse-string "vcard") (autoload 'vcard-format-string "vcard") (autoload 'fill-flowed "flow-fill") - (autoload 'diff-mode "diff-mode")) + (unless (fboundp 'diff-mode) + (autoload 'diff-mode "diff-mode" "" t nil))) ;;; ;;; Functions for displaying various formats inline @@ -325,8 +326,8 @@ (mm-string-as-unibyte (apply 'concat (mapcar 'char-to-string - (list ?\x30 ?\x82 ?\x01 ?\x91 ?\x06 ?\x09 ?\x2a ?\x86 ?\x48 - ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02))))) + (list ?\x30 ?\x82 ?\x2e ?\x2e ?\x06 ?\x09 ?\x5c ?\x2a + ?\x86 ?\x48 ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02))))) ;; id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2) ;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 } @@ -334,18 +335,18 @@ (mm-string-as-unibyte (apply 'concat (mapcar 'char-to-string - (list ?\x30 ?\x82 ?\x01 ?\x91 ?\x06 ?\x09 ?\x2a ?\x86 ?\x48 - ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03))))) + (list ?\x30 ?\x82 ?\x2e ?\x2e ?\x06 ?\x09 ?\x5c ?\x2a + ?\x86 ?\x48 ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03))))) (defun mm-view-pkcs7-get-type (handle) - (with-temp-buffer - (mm-insert-part handle) - (cond ((looking-at (regexp-quote mm-pkcs7-enveloped-magic)) - 'enveloped) - ((looking-at (regexp-quote mm-pkcs7-signed-magic)) - 'signed) - (t - (error "Could not identify PKCS#7 type"))))) + (mm-with-unibyte-buffer + (mm-insert-part handle) + (cond ((looking-at mm-pkcs7-enveloped-magic) + 'enveloped) + ((looking-at mm-pkcs7-signed-magic) + 'signed) + (t + (error "Could not identify PKCS#7 type"))))) (defun mm-view-pkcs7 (handle) (case (mm-view-pkcs7-get-type handle) diff --git a/lisp/mml2015.el b/lisp/mml2015.el index b9b5255..cd3c628 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -65,7 +65,7 @@ '((trust-undefined . nil) (trust-none . nil) (trust-marginal . t) - (trust-fully . t) + (trust-full . t) (trust-ultimate . t)) "Trust boundaries for a signer's GnuPG key. This alist contains pairs of the form (trust-symbol . boolean), with diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 9a6af66..f9bdcc8 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -36,7 +36,8 @@ (eval-and-compile (autoload 'gnus-error "gnus-util") - (autoload 'gnus-buffer-live-p "gnus-util")) + (autoload 'gnus-buffer-live-p "gnus-util") + (autoload 'gnus-add-buffer "gnus")) (defgroup nnmail nil "Reading mail with Gnus." @@ -1377,6 +1378,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (set-buffer (setq nnmail-cache-buffer (get-buffer-create " *nnmail message-id cache*"))) + (gnus-add-buffer) (when (file-exists-p nnmail-message-id-cache-file) (nnheader-insert-file-contents nnmail-message-id-cache-file)) (set-buffer-modified-p nil) diff --git a/lisp/nnslashdot.el b/lisp/nnslashdot.el index 4f8e6f6..4c2f1d2 100644 --- a/lisp/nnslashdot.el +++ b/lisp/nnslashdot.el @@ -552,7 +552,8 @@ (setq nnslashdot-buffer (save-excursion (nnheader-set-temp-buffer - (format " *nnslashdot %s*" server)))))) + (format " *nnslashdot %s*" server)))) + (push nnslashdot-buffer gnus-buffers))) (defun nnslashdot-date-to-date (sdate) (condition-case err diff --git a/lisp/smime.el b/lisp/smime.el index d762fbe..21df38c 100644 --- a/lisp/smime.el +++ b/lisp/smime.el @@ -185,13 +185,6 @@ If nil, use system defaults." string) :group 'smime) -(defcustom smime-extra-arguments nil - "*List of additional arguments passed to OpenSSL. -For instance, if you don't have a /dev/random you might be forced -to set this to e.g. `(\"-rand\" \"/etc/entropy\")'." - :type '(repeat string) - :group 'smime) - (defvar smime-details-buffer "*OpenSSL output*") ;; Password dialog function @@ -208,8 +201,7 @@ to set this to e.g. `(\"-rand\" \"/etc/entropy\")'." ;; OpenSSL wrappers. (defun smime-call-openssl-region (b e buf &rest args) - (case (apply 'call-process-region b e smime-openssl-program nil - buf nil (append smime-extra-arguments args)) + (case (apply 'call-process-region b e smime-openssl-program nil buf nil args) (0 t) (1 (message "OpenSSL: An error occurred parsing the command options.") nil) (2 (message "OpenSSL: One of the input files could not be read.") nil) @@ -233,23 +225,28 @@ to include in its caar." (let ((keyfile (car keyfiles)) (certfiles (and (cdr keyfiles) (cadr keyfiles))) (buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) - (passphrase (smime-ask-passphrase))) + (passphrase (smime-ask-passphrase)) + (tmpfile (make-temp-file "smime"))) (if passphrase (setenv "GNUS_SMIME_PASSPHRASE" passphrase)) (prog1 - (when (apply 'smime-call-openssl-region b e buffer "smime" "-sign" - "-signer" (expand-file-name keyfile) - (append - (smime-make-certfiles certfiles) - (if passphrase - (list "-passin" "env:GNUS_SMIME_PASSPHRASE")))) + (when (prog1 + (apply 'smime-call-openssl-region b e (list buffer tmpfile) + "smime" "-sign" "-signer" (expand-file-name keyfile) + (append + (smime-make-certfiles certfiles) + (if passphrase + (list "-passin" "env:GNUS_SMIME_PASSPHRASE")))) + (if passphrase + (setenv "GNUS_SMIME_PASSPHRASE" "" t)) + (with-current-buffer smime-details-buffer + (insert-file-contents tmpfile) + (delete-file tmpfile))) (delete-region b e) (insert-buffer-substring buffer) (when (looking-at "^MIME-Version: 1.0$") (delete-region (point) (progn (forward-line 1) (point)))) t) - (if passphrase - (setenv "GNUS_SMIME_PASSPHRASE" "" t)) (with-current-buffer (get-buffer-create smime-details-buffer) (goto-char (point-max)) (insert-buffer-substring buffer)) @@ -260,10 +257,16 @@ to include in its caar." If encryption fails, the buffer is not modified. Region is assumed to have proper MIME tags. CERTFILES is a list of filenames, each file is expected to contain of a PEM encoded certificate." - (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*")))) + (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) + (tmpfile (make-temp-file "smime"))) (prog1 - (when (apply 'smime-call-openssl-region b e buffer "smime" "-encrypt" - smime-encrypt-cipher (mapcar 'expand-file-name certfiles)) + (when (prog1 + (apply 'smime-call-openssl-region b e (list buffer tmpfile) + "smime" "-encrypt" smime-encrypt-cipher + (mapcar 'expand-file-name certfiles)) + (with-current-buffer smime-details-buffer + (insert-file-contents tmpfile) + (delete-file tmpfile))) (delete-region b e) (insert-buffer-substring buffer) (when (looking-at "^MIME-Version: 1.0$") diff --git a/texi/ChangeLog b/texi/ChangeLog index 269b091..911e6dc 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,10 @@ +2001-08-01 Simon Josefsson + + * texi2latex.el (latexi-translate-file): Don't use point-at-bol. + (latexi-translate-file): Translate some more things, including + some hardcoded things that cause problems for LaTeX. From Jesper + Harder . + 2001-07-31 Simon Josefsson * bembo.sty: New file. diff --git a/texi/texi2latex.el b/texi/texi2latex.el index 9eb2880..5ff6804 100644 --- a/texi/texi2latex.el +++ b/texi/texi2latex.el @@ -62,6 +62,12 @@ (latexi-translate-string "%@{" "\\gnuspercent{}\\gnusbraceleft{}") (latexi-translate-string "%@}" "\\gnuspercent{}\\gnusbraceright{}") (latexi-translate-string "%1@{" "\\gnuspercent{}1\\gnusbraceright{}") + (latexi-translate-string "@*" "\\newline{}") + (latexi-translate-string "S@{" "S\\gnusbraceleft{}") + (latexi-translate-string "@code{\\222}" "@code{\\gnusbackslash{}222}") + (latexi-translate-string "@code{\\264}" "@code{\\gnusbackslash{}264}") + (latexi-translate-string "@samp{\\Deleted}" "@samp{\\gnusbackslash{}Deleted}") + (latexi-translate-string "@samp{\\Seen}" "@samp{\\gnusbackslash{}Seen}") ; (while (re-search-forward "{\"[^\"]*\\(\\\\\\)[^\"]*\"}\\\\" nil t) ; (replace-match "\\verb+\\\\+ " t t)) (while (not (zerop (decf times))) @@ -221,7 +227,9 @@ (error "Unknown command (line %d): %s" (save-excursion (widen) - (1+ (count-lines (point-min) (point-at-bol)))) + (1+ (count-lines (point-min) (progn + (beginning-of-line) + (point))))) command)))) ;; These are commands with {}. (setq arg (match-string 5)) @@ -252,7 +260,9 @@ (error "Unknown command (line %d): %s" (save-excursion (widen) - (1+ (count-lines (point-min) (point-at-bol)))) + (1+ (count-lines (point-min) (progn + (beginning-of-line) + (point))))) command)))))) (latexi-translate-string "$" "\\gnusdollar{}") (latexi-translate-string "&" "\\gnusampersand{}") -- 1.7.10.4