From: tsuchiya Date: Tue, 30 Jul 2002 11:13:25 +0000 (+0000) Subject: (gnus-namazu/request-list): Removed. X-Git-Tag: t-gnus-6_15_8-00-quimby~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=56277e6dcda07bb5ba53b4b23b48a30a92eb1aca;p=elisp%2Fgnus.git- (gnus-namazu/request-list): Removed. (gnus-namazu/get-current-to): New function. (gnus-namazu/complete-query): Call the above. --- diff --git a/ChangeLog b/ChangeLog index bd9dfea..ff62df1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-07-30 TSUCHIYA Masatoshi + + * lisp/gnus-namazu.el (gnus-namazu/request-list): Removed. + (gnus-namazu/get-current-to): New function. + (gnus-namazu/complete-query): Call the above. + 2002-07-19 Katsumi Yamaoka * lisp/pop3.el: Don't autoload "ssl". diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index 98a6173..eb7fc85 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -65,6 +65,13 @@ ;; In group buffer or in summary buffer, type C-c C-n query RET. +;;; Important Notice: + +;; This package does not update index files of Namazu. So, it is +;; necessary to run `mknmz' periodically in order to update them for +;; incoming mails and articles. + + ;;; Code: (eval-when-compile (require 'cl)) @@ -80,9 +87,7 @@ ;; To suppress byte-compile warning. (eval-when-compile (defvar nnml-directory) - (defvar nnml-group-alist) - (defvar nnmh-directory) - (defvar nnmh-group-alist)) + (defvar nnmh-directory)) (defgroup gnus-namazu nil @@ -207,16 +212,6 @@ options make any sense in this context." gnus-namazu-coding-system) gnus-group-name-charset-group-alist))))) -(defun gnus-namazu/request-list (server) - "Return groups of the server SERVER." - (and (memq (car server) '(nnml nnmh)) - (nnoo-change-server (car server) (nth 1 server) (nthcdr 2 server)) - (gnus-request-list server) - (mapcar (function car) - (if (eq 'nnml (car server)) - nnml-group-alist - nnmh-group-alist)))) - (defun gnus-namazu/server-directory (server) "Return the top directory of the server SERVER." (and (memq (car server) '(nnml nnmh)) @@ -421,6 +416,15 @@ generate possible group names from it." (mail-header-from (gnus-summary-article-header)))))))) +(defun gnus-namazu/get-current-to () + (and gnus-namazu/read-query-original-buffer + (bufferp gnus-namazu/read-query-original-buffer) + (with-current-buffer gnus-namazu/read-query-original-buffer + (when (eq major-mode 'gnus-summary-mode) + (cadr (mail-extract-address-components + (cdr (assq 'To (mail-header-extra + (gnus-summary-article-header)))))))))) + (defmacro gnus-namazu/minibuffer-prompt-end () (if (fboundp 'minibuffer-prompt-end) '(minibuffer-prompt-end) @@ -488,6 +492,13 @@ generate possible group names from it." (when f (goto-char pos) (insert "\"" f "\"") + (setq pos (point))))) + ((and (looking-at "\\+to:") + (= pos (match-end 0))) + (let ((to (gnus-namazu/get-current-to))) + (when to + (goto-char pos) + (insert "\"" to "\"") (setq pos (point)))))) (goto-char pos)))