Mercurial > emacs
diff lisp/gnus/gnus-ems.el @ 110073:38805092633e
gnus-ems.el: Provide compatibility functions for gnus-set-process-plist by Katsumi Yamaoka <yamaoka@jpl.org>; gnus-html.el: Use gnus-process-plist and friends for compatibility; gnus-cite.el: New function to guess whether a long line is natural text or not; message.el: Implement message-prune-recipient-rules; by Lars Magne Ingebrigtsen <larsi@gnus.org>.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 31 Aug 2010 23:26:23 +0000 |
parents | 2af503eb57ef |
children | 0bc890984083 |
line wrap: on
line diff
--- a/lisp/gnus/gnus-ems.el Tue Aug 31 21:47:35 2010 +0200 +++ b/lisp/gnus/gnus-ems.el Tue Aug 31 23:26:23 2010 +0000 @@ -305,6 +305,27 @@ (setq start end end nil)))))) +(if (fboundp 'set-process-plist) + (progn + (defalias 'gnus-set-process-plist 'set-process-plist) + (defalias 'gnus-process-plist 'process-plist)) + (defun gnus-set-process-plist (process plist) + "Replace the plist of PROCESS with PLIST. Returns PLIST." + (put 'gnus-process-plist process plist)) + (defun gnus-process-plist (process) + "Return the plist of PROCESS." + ;; Remove those of dead processes from `gnus-process-plist' + ;; to prevent it from growing. + (let ((plist (symbol-plist 'gnus-process-plist)) + proc) + (while (setq proc (car plist)) + (if (and (processp proc) + (memq (process-status proc) '(open run))) + (setq plist (cddr plist)) + (setcar plist (caddr plist)) + (setcdr plist (or (cdddr plist) '(nil)))))) + (get 'gnus-process-plist process))) + (provide 'gnus-ems) ;; arch-tag: e7360b45-14b5-4171-aa39-69a44aed3cdb