+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.
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 `\'.
(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:'."
(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)
#'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.
(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)