]> code.delx.au - gnu-emacs/commitdiff
Merge from gnus--rel--5.10
authorMiles Bader <miles@gnu.org>
Tue, 5 Sep 2006 08:17:35 +0000 (08:17 +0000)
committerMiles Bader <miles@gnu.org>
Tue, 5 Sep 2006 08:17:35 +0000 (08:17 +0000)
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

lisp/ChangeLog
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/pgg-gpg.el
lisp/pgg.el

index be5a4d872de4014dfdd98f7ffe19edf3711d6b47..f9cb36ca901d0a2998a9c051cdcc1216139614b6 100644 (file)
@@ -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.
index 81d566fc856a6875508e33f8ac9e30026830d84c..25a7ff4c29a66b71f496189069872b19ec5b7087 100644 (file)
@@ -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 `\'.
 
index 17cbbeb0a7509ad139f8412e108a9cbe6da04948..7690d533cc8cdc23186c1ed4873286ca1dc637ae 100644 (file)
@@ -2381,22 +2381,23 @@ If PROMPT (the prefix), prompt for a coding system to use."
                           (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:'."
index 46dbf833311a8b1af1a4334297c6e2d6248138c7..07be6c47f615c865cb859c28ce3b409c374554cf 100644 (file)
         (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))
                         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))
                (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)
index 7a30dafce8d1a3cc19d82b4c5d9f481c22d8fef2..e8a85b58fae6056eb1daad15399f03ed5305f9b5 100644 (file)
@@ -148,6 +148,11 @@ regulate cache behavior."
                            #'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 @@ regulate cache behavior."
          (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)