branch: master
commit 49054587cb2ab2314ded52d941cadae3c0db284e
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    swiper.el (swiper-all-buffer-p): Add gnus-article-mode
---
 swiper.el | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/swiper.el b/swiper.el
index bc8ee0a..0e72eb4 100644
--- a/swiper.el
+++ b/swiper.el
@@ -800,17 +800,19 @@ Run `swiper' for those buffers."
   "Return non-nil if BUFFER should be considered by `swiper-all'."
   (let ((major-mode (with-current-buffer buffer major-mode)))
     (cond
-     ;; Ignore TAGS buffers, they tend to add duplicate results.
-     ((eq major-mode #'tags-table-mode) nil)
-     ;; Always consider dired buffers, even though they're not backed
-     ;; by a file.
-     ((eq major-mode #'dired-mode) t)
-     ;; Always consider stash buffers too, as they may have
-     ;; interesting content not present in any buffers. We don't #'
-     ;; quote to satisfy the byte-compiler.
-     ((eq major-mode 'magit-stash-mode) t)
-     ;; Otherwise, only consider the file if it's backed by a file.
-     (t (buffer-file-name buffer)))))
+      ;; Ignore TAGS buffers, they tend to add duplicate results.
+      ((eq major-mode #'tags-table-mode) nil)
+      ;; Always consider dired buffers, even though they're not backed
+      ;; by a file.
+      ((eq major-mode #'dired-mode) t)
+      ;; Always consider stash buffers too, as they may have
+      ;; interesting content not present in any buffers. We don't #'
+      ;; quote to satisfy the byte-compiler.
+      ((eq major-mode 'magit-stash-mode) t)
+      ;; Email buffers have no file, but are useful to search
+      ((eq major-mode 'gnus-article-mode) t)
+      ;; Otherwise, only consider the file if it's backed by a file.
+      (t (buffer-file-name buffer)))))
 
 ;;* `swiper-all'
 (defun swiper-all-function (str)

Reply via email to