X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/09d9db2c4921cb2eb0974892164dd03d6bffdd80..ed19f207449c43f7f08285ada87ae7a46c61c8d1:/lisp/gnus/legacy-gnus-agent.el diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el index 6c6d119c0c..7293e33433 100644 --- a/lisp/gnus/legacy-gnus-agent.el +++ b/lisp/gnus/legacy-gnus-agent.el @@ -1,6 +1,6 @@ ;;; gnus-agent.el --- Legacy unplugged support for Gnus -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2016 Free Software Foundation, Inc. ;; Author: Kevin Greiner ;; Keywords: news @@ -147,14 +147,19 @@ converted to the compressed format." (insert "The definition of gnus-agent-expire-days has been changed.\nYou currently have it set to the list:\n ") (gnus-pp gnus-agent-expire-days) - (insert "\nIn order to use version '" converting-to "' of gnus, you will need to set\n") + (insert + (gnus-format-message + "\nIn order to use version `%s' of gnus, you will need to set\n" + converting-to)) (insert "gnus-agent-expire-days to an integer. If you still wish to set different\n") (insert "expiration days to individual groups, you must instead set the\n") - (insert "'agent-days-until-old group and/or topic parameter.\n") + (insert (gnus-format-message + "`agent-days-until-old' group and/or topic parameter.\n")) (insert "\n") (insert "If you would like, gnus can iterate over every group comparing its name to the\n") (insert "regular expressions that you currently have in gnus-agent-expire-days. When\n") - (insert "gnus finds a match, it will update that group's 'agent-days-until-old group\n") + (insert (gnus-format-message + "gnus finds a match, it will update that group's `agent-days-until-old' group\n")) (insert "parameter to the value associated with the regular expression.\n") (insert "\n") (insert "Whether gnus assigns group parameters, or not, gnus will terminate with an\n") @@ -206,29 +211,31 @@ converted to the compressed format." (gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t) (defun gnus-agent-unhook-expire-days (converting-to) - "Remove every lambda from gnus-group-prepare-hook that mention the -symbol gnus-agent-do-once in their definition. This should NOT be + "Remove every lambda from `gnus-group-prepare-hook' that mention the +symbol `gnus-agent-do-once' in their definition. This should NOT be necessary as gnus-agent.el no longer adds them. However, it is possible that the hook was persistently saved." - (let ((h t)) ; iterate from bgn of hook + (let ((h t)) ; Iterate from bgn of hook. (while h (let ((func (progn (when (eq h t) - ;; init h to list of functions + ;; Init h to list of functions. (setq h (cond ((listp gnus-group-prepare-hook) gnus-group-prepare-hook) ((boundp 'gnus-group-prepare-hook) (list gnus-group-prepare-hook))))) (pop h)))) - (when (cond ((eq (type-of func) 'compiled-function) - ;; Search def. of compiled function for gnus-agent-do-once string + (when (cond ((byte-code-function-p func) + ;; Search def. of compiled function for + ;; gnus-agent-do-once string. (let* (definition print-level print-length (standard-output (lambda (char) (setq definition (cons char definition))))) - (princ func) ; populates definition with reversed list of characters + (princ func) ; Populates definition with reversed list + ; of characters. (let* ((i (length definition)) (s (make-string i 0))) (while definition @@ -236,7 +243,7 @@ possible that the hook was persistently saved." (string-match "\\bgnus-agent-do-once\\b" s)))) ((listp func) - (eq (cadr (nth 2 func)) 'gnus-agent-do-once) ; handles eval'd lambda + (eq (cadr (nth 2 func)) 'gnus-agent-do-once) ; Handles eval'd lambda. )) (remove-hook 'gnus-group-prepare-hook func)