*** post.el.orig Sun Jan 16 15:22:26 2005 --- post.el Mon Jan 31 17:52:19 2005 *************** *** 468,473 **** --- 468,480 ---- :type '(repeat regexp) :group 'post) + (defcustom post-fido-password "your password" + "*Password for fido7.* newsgroups (see http://www.fido7.ru). + After setting this, make sure that ~/custom.el* and/or ~/init.el* can only + be read by you." + :type 'string + :group 'post) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Customizable Faces *************** *** 911,916 **** --- 918,942 ---- (goto-char post-select-signature-last-point) (delete-other-windows)) + (defun post-news-add-fido-password() + "Insert a Fido (see http://www.fido7.ru) password in message by + setting a 'Keywords' header with variable `post-fido-password'. + + If you don't understand what this function is for - ignore it." + (interactive) + (save-excursion + (goto-char (point-min)) + (if (re-search-forward "^Newsgroups: fido7.*" nil t) ; don't show own error + (if post-fido-password + (progn + (header-set-value "Keywords" post-fido-password) + (set-buffer-modified-p nil) + ) + (lmessage 'error "post-fido-password is empty")) + (lmessage 'error "This is not a message to fido7.* hierarchy")) + ) + ) + ;;; Non-interactive functions (defun post-ask-for-address-with-default (header) *************** *** 1062,1067 **** --- 1088,1096 ---- (make-local-variable 'comment-start) (setq comment-start post-quote-start) + ;; Insert Fido password + (post-news-add-fido-password) + ;; Run any hooks. (run-hooks 'post-mode-hook)