+2002-07-30 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
+
+ * 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 <yamaoka@jpl.org>
* lisp/pop3.el: Don't autoload "ssl".
;; 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))
;; 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
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))
(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)
(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)))