(eval-when-compile (require 'cl))
(defcustom gnus-agent-directory (nnheader-concat gnus-directory "agent/")
- "*Where the Gnus agent will store its files."
+ "Where the Gnus agent will store its files."
:group 'gnus-agent
:type 'directory)
(defcustom gnus-agent-plugged-hook nil
- "*Hook run when plugging into the network."
+ "Hook run when plugging into the network."
:group 'gnus-agent
:type 'hook)
(defcustom gnus-agent-unplugged-hook nil
- "*Hook run when unplugging from the network."
+ "Hook run when unplugging from the network."
:group 'gnus-agent
:type 'hook)
(defcustom gnus-agent-handle-level gnus-level-subscribed
- "*Groups on levels higher than this variable will be ignored by the Agent."
+ "Groups on levels higher than this variable will be ignored by the Agent."
:group 'gnus-agent
:type 'integer)
(defun gnus-agent-toggle-plugged (plugged)
"Toggle whether Gnus is unplugged or not."
(interactive (list (not gnus-plugged)))
- (setq gnus-plugged plugged)
(if plugged
(progn
+ (setq gnus-plugged plugged)
(gnus-run-hooks 'gnus-agent-plugged-hook)
(setcar (cdr gnus-agent-mode-status) " Plugged"))
(gnus-agent-close-connections)
+ (setq gnus-plugged plugged)
(gnus-run-hooks 'gnus-agent-unplugged-hook)
(setcar (cdr gnus-agent-mode-status) " Unplugged"))
(set-buffer-modified-p t))
(setq gnus-plugged nil)
(gnus))
+;;;###autoload
+(defun gnus-plugged ()
+ "Start Gnus plugged."
+ (interactive)
+ (setq gnus-plugged t)
+ (gnus))
+
;;;###autoload
(defun gnus-agentize ()
"Allow Gnus to be an offline newsreader.
"Translate GROUP into a path."
(if nnmail-use-long-file-names
group
- (nnheader-translate-file-chars
- (nnheader-replace-chars-in-string group ?. ?/))))
+ (nnheader-replace-chars-in-string
+ (nnheader-translate-file-chars group)
+ ?. ?/)))
\f
(if (not (re-search-forward "^Message-ID: *<\\([^>\n]+\\)>" nil t))
(setq id "No-Message-ID-in-article")
(setq id (buffer-substring (match-beginning 1) (match-end 1))))
- (let ((coding-system-for-write gnus-agent-article-file-coding-system))
+ (let ((coding-system-for-write
+ gnus-agent-article-file-coding-system))
(write-region (point-min) (point-max)
(concat dir (number-to-string (caar pos)))
nil 'silent))