Function: gnus-registry-wash-for-keywords

gnus-registry-wash-for-keywords is an interactive and byte-compiled function defined in gnus-registry.el.gz.

Signature

(gnus-registry-wash-for-keywords &optional FORCE)

Documentation

Get the keywords of the current article.

Overrides existing keywords with FORCE set non-nil.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-registry.el.gz
(defun gnus-registry-wash-for-keywords (&optional force)
  "Get the keywords of the current article.
Overrides existing keywords with FORCE set non-nil."
  (interactive nil gnus-article-mode gnus-summary-mode)
  (let ((id (gnus-registry-fetch-message-id-fast gnus-current-article))
        word words)
    (if (or (not (gnus-registry-get-id-key id 'keyword))
            force)
        (with-current-buffer gnus-article-buffer
          (article-goto-body)
          (save-window-excursion
            (save-restriction
              (narrow-to-region (point) (point-max))
              (with-syntax-table gnus-adaptive-word-syntax-table
                (while (re-search-forward "\\b\\w+\\b" nil t)
                  (setq word (gnus-string-remove-all-properties
                              (downcase (buffer-substring
                                         (match-beginning 0) (match-end 0)))))
                  (if (> (length word) 2)
                      (push word words))))))
          (gnus-registry-set-id-key id 'keyword words)))))