+1999-01-25 Tsukamoto Tetsuo <czkmt@remus.dti.ne.jp>
+
+ * lisp/gnus-offline.el (gnus-offline-pop-password-file): New
+ variable.
+ (gnus-offline-pop-password-decoding-function): New variable.
+ (gnus-offline-get-new-news): When `gnus-offline-pop-password-file'
+ is non-nil, get one's password information from a file specified
+ by this variable, and don't store the passwords as a variable.
+ * lisp/smiley.el (smiley-buffer): Avoid a few duplicate
+ translations.
+
1999-01-23 Kiyokazu SUTO <suto@merry.xmath.ous.ac.jp>
* lisp/gnus-msg.el (gnus-inews-yank-articles): Use
;;; gnus-offline.el --- To process mail & news at offline environment.
-;;; $Id: gnus-offline.el,v 1.1.2.5.2.25 1999-01-13 06:53:38 ichikawa Exp $
+;;; $Id: gnus-offline.el,v 1.1.2.5.2.26 1999-01-25 07:09:51 ichikawa Exp $
;;; Copyright (C) 1998 Tatsuya Ichikawa
;;; Yukihiro Ito
:group 'gnus-offline
:type 'function)
+(defcustom gnus-offline-pop-password-file nil
+ "*File name for saving one's POP password information.
+This variable should be nil if there's some possibility that
+your passwords be stolen."
+ :group 'gnus-offline
+ :type '(choice (file :tag "File")
+ (const nil)))
+
+(defcustom gnus-offline-pop-password-decoding-function
+ (function (lambda () (base64-decode-region (point-min) (point-max))))
+ "*Function for decoding one's password information.
+The value has no effect when `gnus-offline-pop-password-file'
+is nil.
+This variable might be nil if you don't need to encode your passwords."
+ :group 'gnus-offline
+ :type 'function)
+
;;; Internal variables.
(defvar gnus-offline-connected nil
"*If value is t , dialup line is connected status.
(if (functionp gnus-offline-dialup-function)
(funcall gnus-offline-dialup-function))
(gnus-offline-get-new-news-function)
- (gnus-group-get-new-news arg))
+ (let (buffer)
+ (unwind-protect
+ (progn
+ (save-excursion
+ (or pop3-fma-password
+ (when gnus-offline-pop-password-file
+ (setq pop3-fma-save-password-information t)
+ (setq buffer (get-buffer-create "*offline-temp*"))
+ (set-buffer buffer)
+ (erase-buffer)
+ (insert-file-contents-as-binary gnus-offline-pop-password-file)
+ (and gnus-offline-pop-password-decoding-function
+ (funcall gnus-offline-pop-password-decoding-function))
+ (eval-buffer))))
+ (gnus-group-get-new-news arg))
+ (when gnus-offline-pop-password-file
+ (setq pop3-fma-password nil)
+ (setq pop3-fma-save-password-information nil)
+ (kill-buffer buffer)))))
;;
;; dialup...
(while (re-search-forward regexp nd t)
(let* ((start (match-beginning group))
(end (match-end group))
- (glyph (smiley-create-glyph (buffer-substring start end)
- file)))
+ (glyph
+ (and (or (eq start 1)
+ (not (string-match "\\(\\^\\|;\\|_\\);)"
+ (buffer-substring
+ (1- start) (+ start 2)))))
+ (smiley-create-glyph (buffer-substring start end)
+ file))))
(when glyph
(mapcar 'delete-annotation (annotations-at end))
(let ((ext (make-extent start end))