Mercurial > emacs
changeset 72653:87c011891481
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 131-133)
- Update from CVS
2006-09-05 Daiki Ueno <ueno@unixuser.org>
* lisp/pgg.el (pgg-clear-string): Alias to clear-string for backward
compatibility.
* lisp/pgg-gpg.el (pgg-gpg-process-region): Avoid display blinking with
inhibit-redisplay; encode passphrase with locale-coding-system.
2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (article-decode-encoded-words): Make it fast.
2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (article-decode-encoded-words): Don't infloop in XEmacs.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-424
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 05 Sep 2006 08:17:35 +0000 |
parents | 78baf6b1169a |
children | fe4205daedf9 |
files | lisp/ChangeLog lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/pgg-gpg.el lisp/pgg.el |
diffstat | 5 files changed, 53 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Sep 05 06:59:53 2006 +0000 +++ b/lisp/ChangeLog Tue Sep 05 08:17:35 2006 +0000 @@ -1,3 +1,11 @@ +2006-09-05 Daiki Ueno <ueno@unixuser.org> + + * pgg.el (pgg-clear-string): Alias to clear-string for backward + compatibility. + + * pgg-gpg.el (pgg-gpg-process-region): Avoid display blinking with + inhibit-redisplay; encode passphrase with locale-coding-system. + 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> * term/xterm.el (terminal-init-xterm): Add more C-M- bindings.
--- a/lisp/gnus/ChangeLog Tue Sep 05 06:59:53 2006 +0000 +++ b/lisp/gnus/ChangeLog Tue Sep 05 08:17:35 2006 +0000 @@ -5,6 +5,12 @@ 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> + * gnus-art.el (article-decode-encoded-words): Make it fast. + +2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (article-decode-encoded-words): Don't infloop in XEmacs. + * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' in quoted string into `\'.
--- a/lisp/gnus/gnus-art.el Tue Sep 05 06:59:53 2006 +0000 +++ b/lisp/gnus/gnus-art.el Tue Sep 05 08:17:35 2006 +0000 @@ -2381,22 +2381,23 @@ (error)) gnus-newsgroup-ignored-charsets)) (inhibit-read-only t) - start) - (save-restriction - (article-narrow-to-head) - (while (not (eobp)) - (setq start (point)) - (if (prog1 - (looking-at "\ + end start) + (goto-char (point-min)) + (when (search-forward "\n\n" nil 'move) + (forward-line -1)) + (setq end (point)) + (while (not (bobp)) + (while (progn + (forward-line -1) + (and (not (bobp)) + (memq (char-after) '(?\t ? ))))) + (setq start (point)) + (if (looking-at "\ \\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\ \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):") - (while (progn - (forward-line) - (if (eobp) - nil - (memq (char-after) '(?\t ? )))))) - (funcall gnus-decode-address-function start (point)) - (funcall gnus-decode-header-function start (point))))))) + (funcall gnus-decode-address-function start end) + (funcall gnus-decode-header-function start end)) + (goto-char (setq end start))))) (defun article-decode-group-name () "Decode group names in `Newsgroups:'."
--- a/lisp/pgg-gpg.el Tue Sep 05 06:59:53 2006 +0000 +++ b/lisp/pgg-gpg.el Tue Sep 05 08:17:35 2006 +0000 @@ -74,7 +74,10 @@ (errors-buffer pgg-errors-buffer) (orig-mode (default-file-modes)) (process-connection-type nil) - process status exit-status) + (inhibit-redisplay t) + process status exit-status + passphrase-with-newline + encoded-passphrase-with-new-line) (with-current-buffer (get-buffer-create errors-buffer) (buffer-disable-undo) (erase-buffer)) @@ -87,7 +90,16 @@ program args))) (set-process-sentinel process #'ignore) (when passphrase - (process-send-string process (concat passphrase "\n"))) + (setq passphrase-with-newline (concat passphrase "\n")) + (if (boundp 'locale-coding-system) + (progn + (setq encoded-passphrase-with-new-line + (encode-coding-string passphrase-with-newline + locale-coding-system)) + (pgg-clear-string passphrase-with-newline)) + (setq encoded-passphrase-with-new-line passphrase-with-newline + passphrase-with-newline nil)) + (process-send-string process encoded-passphrase-with-new-line)) (process-send-region process start end) (process-send-eof process) (while (eq 'run (process-status process)) @@ -108,6 +120,10 @@ (error "%s exited abnormally: '%s'" program exit-status)) (if (= 127 exit-status) (error "%s could not be found" program)))) + (if passphrase-with-newline + (pgg-clear-string passphrase-with-newline)) + (if encoded-passphrase-with-new-line + (pgg-clear-string encoded-passphrase-with-new-line)) (if (and process (eq 'run (process-status process))) (interrupt-process process)) (if (file-exists-p output-file-name)
--- a/lisp/pgg.el Tue Sep 05 06:59:53 2006 +0000 +++ b/lisp/pgg.el Tue Sep 05 08:17:35 2006 +0000 @@ -148,6 +148,11 @@ #'pgg-remove-passphrase-from-cache key notruncate)))) +(if (fboundp 'clear-string) + (defalias 'pgg-clear-string 'clear-string) + (defun pgg-clear-string (string) + (fillarray string ?_))) + (defun pgg-remove-passphrase-from-cache (key &optional notruncate) "Omit passphrase associated with KEY in time-limited passphrase cache. @@ -166,7 +171,7 @@ (interned-timer-key (intern-soft key pgg-pending-timers)) (old-timer (symbol-value interned-timer-key))) (when passphrase - (fillarray passphrase ?_) + (pgg-clear-string passphrase) (unintern key pgg-passphrase-cache)) (when old-timer (pgg-cancel-timer old-timer)