From: yamaoka Date: Mon, 25 Jan 1999 07:28:12 +0000 (+0000) Subject: * gnus-offline.el (gnus-offline-pop-password-file): New variable. X-Git-Tag: gnus-6_10-199901251900~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=eda26a7651a52c0e81900da3184065a145f36da3;p=elisp%2Fgnus.git- * 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. * smiley.el (smiley-buffer): Avoid a few duplicate translations. --- diff --git a/lisp/gnus-offline.el b/lisp/gnus-offline.el index c3317fd..bba49e4 100644 --- a/lisp/gnus-offline.el +++ b/lisp/gnus-offline.el @@ -1,5 +1,5 @@ ;;; gnus-offline.el --- To process mail & news at offline environment. -;;; $Id: gnus-offline.el,v 1.1.4.4 1999-01-13 07:17:58 yamaoka Exp $ +;;; $Id: gnus-offline.el,v 1.1.4.5 1999-01-25 07:28:11 yamaoka Exp $ ;;; Copyright (C) 1998 Tatsuya Ichikawa ;;; Yukihiro Ito @@ -189,6 +189,23 @@ If set to 0 , timer call is disabled." :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. @@ -340,7 +357,25 @@ If value is nil , dialup line is disconnected 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... diff --git a/lisp/smiley.el b/lisp/smiley.el index 87ea5e0..65dc913 100644 --- a/lisp/smiley.el +++ b/lisp/smiley.el @@ -255,8 +255,13 @@ above them." (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))