From: yamaoka Date: Tue, 31 May 2005 11:52:10 +0000 (+0000) Subject: Synch to No Gnus 200505311150. X-Git-Tag: t-gnus-6_17_4-quimby-~482 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3a0a461dc4e41e7074b315ae02775a4e485c8e8f;p=elisp%2Fgnus.git- Synch to No Gnus 200505311150. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cca86f4..937cff3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,54 @@ +2005-05-31 Katsumi Yamaoka + + * gnus-art.el (article-display-x-face): Replace + process-kill-without-query by gnus-set-process-query-on-exit-flag. + + * gnus-util.el (gnus-set-process-query-on-exit-flag): New function. + + * html2text.el (html2text-fix-paragraphs): Use `while - re-search' + loop instead of replace-regexp. + + * imap.el (imap-ssl-open): Use set-process-query-on-exit-flag + instead of process-kill-without-query if it is available. + + * mm-util.el (mm-insert-file-contents): Bind find-file-hook + instead of find-file-hooks if it is available. + + * mml1991.el: Bind pgg-default-user-id when compiling. + + * mml2015.el: Bind pgg-default-user-id when compiling. + + * nndraft.el (nndraft-request-associate-buffer): Use + write-contents-functions instead of write-contents-hooks if it is + available. + + * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook + instead of find-file-hooks if it is available. + + * nntp.el (nntp-open-connection): Replace + process-kill-without-query by gnus-set-process-query-on-exit-flag. + (nntp-open-ssl-stream): Ditto. + (nntp-open-tls-stream): Ditto. + + * starttls.el (starttls-set-process-query-on-exit-flag): New + function. + (starttls-open-stream-gnutls): Use it instead of + process-kill-without-query. + (starttls-open-stream): Ditto. + +2005-05-31 Simon Josefsson + + * smime.el (smime-cert-by-ldap-1): Don't use + replace-regexp-in-string, tiny patch from Ulf Stegemann + . + +2005-05-31 Arne J,Ax(Brgensen + + * smime-ldap.el (smime-ldap-search): Add compatibility for XEmacs. + + * smime.el (smime-cert-by-ldap-1): Handle certificates distributed + in PEM format. Adjust to the XEmacs compability. + 2005-05-30 Reiner Steib * encrypt.el (encrypt-xor-process-buffer): Replace `string-to-int' diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 7b1a8e6..358b562 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2351,10 +2351,11 @@ unfolded." ;; The command is a string, so we interpret the command ;; as a, well, command, and fork it off. (let ((process-connection-type nil)) - (process-kill-without-query + (gnus-set-process-query-on-exit-flag (start-process "article-x-face" nil shell-file-name - shell-command-switch gnus-article-x-face-command)) + shell-command-switch gnus-article-x-face-command) + nil) (with-temp-buffer (insert face) (process-send-region "article-x-face" diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 4ae1706..143f0e9 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1596,6 +1596,14 @@ empty directories from OLD-PATH." (ignore-errors (set-file-modes filename mode))) +(defun gnus-set-process-query-on-exit-flag (process flag) + "Run `set-process-query-on-exit-flag' if it is available. +Otherwise, run `process-kill-without-query'." + (let ((fn (if (fboundp 'set-process-query-on-exit-flag) + 'set-process-query-on-exit-flag + 'process-kill-without-query))) + (funcall fn process flag))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/html2text.el b/lisp/html2text.el index 91d8426..de7e47b 100644 --- a/lisp/html2text.el +++ b/lisp/html2text.el @@ -1,5 +1,5 @@ ;;; html2text.el --- a simple html to plain text converter -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Joakim Hove @@ -373,7 +373,8 @@ formatting, and then moved afterward.") fashion, quite close to pure guess-work. It does work in some cases though." (interactive) (goto-char (point-min)) - (replace-regexp "^
$" "") + (while (re-search-forward "^
$" nil t) + (delete-region (match-beginning 0) (match-end 0))) ;; Removing lonely
on a single line, if they are left intact we ;; dont have any paragraphs at all. (goto-char (point-min)) diff --git a/lisp/imap.el b/lisp/imap.el index 2d7d917..48818d1 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -635,6 +635,10 @@ sure of changing the value of `foo'." (erase-buffer) (let ((port (or port imap-default-ssl-port)) (process-connection-type imap-process-connection-type) + (set-process-query-on-exit-flag + (if (fboundp 'set-process-query-on-exit-flag) + 'set-process-query-on-exit-flag + 'process-kill-without-query)) process) (when (prog1 (setq process (as-binary-process @@ -645,7 +649,7 @@ sure of changing the value of `foo'." (format-spec-make ?s server ?p (number-to-string port)))))) - (process-kill-without-query process)) + (funcall set-process-query-on-exit-flag process nil)) (with-current-buffer buffer (goto-char (point-min)) (while (and (memq (process-status process) '(open run)) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index cee0393..87e3df3 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -858,22 +858,28 @@ to advanced Emacs features, such as file-name-handlers, format decoding, `find-file-hooks', etc. If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. This function ensures that none of these modifications will take place." - (let ((format-alist nil) - (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil) - (inhibit-file-name-operation (if inhibit - 'insert-file-contents - inhibit-file-name-operation)) - (inhibit-file-name-handlers - (if inhibit - (append mm-inhibit-file-name-handlers - inhibit-file-name-handlers) - inhibit-file-name-handlers))) - (insert-file-contents filename visit beg end replace))) + (let* ((format-alist nil) + (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (inhibit-file-name-operation (if inhibit + 'insert-file-contents + inhibit-file-name-operation)) + (inhibit-file-name-handlers + (if inhibit + (append mm-inhibit-file-name-handlers + inhibit-file-name-handlers) + inhibit-file-name-handlers)) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (insert-file-contents filename visit beg end replace) + (set ffh val)))) (defun mm-append-to-file (start end filename &optional codesys inhibit) "Append the contents of the region to the end of file FILENAME. diff --git a/lisp/mml1991.el b/lisp/mml1991.el index dbd980b..664a062 100644 --- a/lisp/mml1991.el +++ b/lisp/mml1991.el @@ -1,5 +1,6 @@ ;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -;; Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 +;; Free Software Foundation, Inc. ;; Author: Sascha Ldecke , ;; Simon Josefsson (Mailcrypt interface, Gnus glue) @@ -219,8 +220,10 @@ ;; pgg wrapper -(defvar pgg-output-buffer) -(defvar pgg-errors-buffer) +(eval-when-compile + (defvar pgg-default-user-id) + (defvar pgg-errors-buffer) + (defvar pgg-output-buffer)) (defun mml1991-pgg-sign (cont) (let (headers cte) diff --git a/lisp/mml2015.el b/lisp/mml2015.el index fcb70d1..6239282 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -1,5 +1,6 @@ ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: PGP MIME MML @@ -636,6 +637,7 @@ Valid packages include `pgg', `gpg' and `mailcrypt'.") ;;; pgg wrapper (eval-when-compile + (defvar pgg-default-user-id) (defvar pgg-errors-buffer) (defvar pgg-output-buffer)) diff --git a/lisp/nndraft.el b/lisp/nndraft.el index 9061c3a..5cd5ee7 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -1,6 +1,6 @@ ;;; nndraft.el --- draft article access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -174,8 +174,11 @@ (setq buffer-file-name (expand-file-name file) buffer-auto-save-file-name (make-auto-save-file-name)) (clear-visited-file-modtime) - (make-local-variable 'write-contents-hooks) - (push 'nndraft-generate-headers write-contents-hooks) + (let ((hook (if (boundp 'write-contents-functions) + 'write-contents-functions + 'write-contents-hooks))) + (gnus-make-local-hook hook) + (add-hook hook 'nndraft-generate-headers nil t)) article)) (deffoo nndraft-request-group (group &optional server dont-check) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 586d8ff..522377e 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -1,7 +1,7 @@ ;;; nnheader.el --- header access macros for Semi-gnus and its backends ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 +;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA @@ -1570,15 +1570,21 @@ A buffer may be modified in several ways after reading into the buffer due to advanced Emacs features, such as file-name-handlers, format decoding, find-file-hooks, etc. This function ensures that none of these modifications will take place." - (let ((format-alist nil) - (auto-mode-alist (nnheader-auto-mode-alist)) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil)) - (insert-file-contents-as-coding-system - nnheader-file-coding-system filename visit beg end replace))) + (let* ((format-alist nil) + (auto-mode-alist (nnheader-auto-mode-alist)) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (insert-file-contents-as-coding-system + nnheader-file-coding-system filename visit beg end replace) + (set ffh val)))) (defun nnheader-insert-nov-file (file first) (let ((size (nth 7 (file-attributes file))) @@ -1603,15 +1609,21 @@ find-file-hooks, etc. (defun nnheader-find-file-noselect (&rest args) "Open a file with some variables bound. See `find-file-noselect' for the arguments." - (let ((format-alist nil) - (auto-mode-alist (nnheader-auto-mode-alist)) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil)) - (apply 'find-file-noselect-as-coding-system - nnheader-file-coding-system args))) + (let* ((format-alist nil) + (auto-mode-alist (nnheader-auto-mode-alist)) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (apply 'find-file-noselect-as-coding-system + nnheader-file-coding-system args) + (set ffh val)))) (defun nnheader-auto-mode-alist () "Return an `auto-mode-alist' with only the .gz (etc) thingies." diff --git a/lisp/nntp.el b/lisp/nntp.el index 05f4cc3..716175f 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -1265,7 +1265,7 @@ password contained in '~/.nntp-authinfo'." (nntp-kill-buffer pbuffer)) (when (and (buffer-name pbuffer) process) - (process-kill-without-query process) + (gnus-set-process-query-on-exit-flag process nil) (if (and (nntp-wait-for process "^2.*\n" buffer nil t) (memq (process-status process) '(open run))) (prog1 @@ -1301,7 +1301,7 @@ password contained in '~/.nntp-authinfo'." (format-spec-make ?s nntp-address ?p nntp-port-number)))))) - (process-kill-without-query proc) + (gnus-set-process-query-on-exit-flag proc nil) (save-excursion (set-buffer buffer) (let ((nntp-connection-alist (list proc buffer nil))) @@ -1312,7 +1312,7 @@ password contained in '~/.nntp-authinfo'." (defun nntp-open-tls-stream (buffer) (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number))) - (process-kill-without-query proc) + (gnus-set-process-query-on-exit-flag proc nil) (save-excursion (set-buffer buffer) (let ((nntp-connection-alist (list proc buffer nil))) diff --git a/lisp/starttls.el b/lisp/starttls.el index 939bee7..5b1bd2b 100644 --- a/lisp/starttls.el +++ b/lisp/starttls.el @@ -1,6 +1,7 @@ ;;; starttls.el --- STARTTLS functions -;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Daiki Ueno ;; Author: Simon Josefsson @@ -235,6 +236,14 @@ handshake, or NIL on failure." (starttls-negotiate-gnutls process) (signal-process (process-id process) 'SIGALRM))) +(defun starttls-set-process-query-on-exit-flag (process flag) + "Run `set-process-query-on-exit-flag' if it is available. +Otherwise, run `process-kill-without-query'." + (let ((fn (if (fboundp 'set-process-query-on-exit-flag) + 'set-process-query-on-exit-flag + 'process-kill-without-query))) + (funcall fn process flag))) + (defun starttls-open-stream-gnutls (name buffer host service) (message "Opening STARTTLS connection to `%s'..." host) (let* (done @@ -246,7 +255,7 @@ handshake, or NIL on failure." (int-to-string service) service) starttls-extra-arguments))) - (process-kill-without-query process) + (starttls-set-process-query-on-exit-flag process nil) (while (and (processp process) (eq (process-status process) 'run) (save-excursion @@ -286,7 +295,7 @@ specifying a port number to connect to." name buffer starttls-program host (format "%s" service) starttls-extra-args))) - (process-kill-without-query process) + (starttls-set-process-query-on-exit-flag process nil) process))) (defun starttls-open-ssl-stream (name buffer host service)