diff options
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/gnus-agent.el | 7 | ||||
-rw-r--r-- | lisp/gnus/gnus-cache.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus-score.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus-util.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus-uu.el | 2 | ||||
-rw-r--r-- | lisp/gnus/nndraft.el | 2 | ||||
-rw-r--r-- | lisp/gnus/nnmh.el | 10 | ||||
-rw-r--r-- | lisp/gnus/nnspool.el | 2 | ||||
-rw-r--r-- | lisp/gnus/spam-stat.el | 4 |
9 files changed, 17 insertions, 16 deletions
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 80bf21bb443..1ed5000eb36 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -2074,7 +2074,7 @@ doesn't exist, to valid the overview buffer." (file-attributes (directory-files-and-attributes (gnus-agent-article-name "" gnus-agent-read-agentview) - nil "^[0-9]+$" t))) + nil "\\`[0-9]+\\'" t))) (while file-attributes (let ((fa (pop file-attributes))) (unless (file-attribute-type (cdr fa)) @@ -3850,7 +3850,8 @@ If REREAD is not nil, downloaded articles are marked as unread." (sort (delq nil (mapcar (lambda (name) (and (not (file-directory-p (nnheader-concat dir name))) (string-to-number name))) - (directory-files dir nil "^[0-9]+$" t))) + (directory-files + dir nil "\\`[0-9]+\\'" t))) '>) (progn (gnus-make-directory dir) nil))) nov-arts @@ -4110,7 +4111,7 @@ agent has fetched." (setq delta sum)) (let ((sum (- (nth 2 entry))) (info (directory-files-and-attributes - path nil "^-?[0-9]+$" t)) + path nil "\\`-?[0-9]+\\'" t)) file) (while (setq file (pop info)) (cl-incf sum (float (or (file-attribute-size (cdr file)) 0)))) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 8b9acfe0510..02a8ea723d3 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -501,7 +501,7 @@ Returns the list of articles removed." (when (file-exists-p dir) (setq articles (sort (mapcar (lambda (name) (string-to-number name)) - (directory-files dir nil "^[0-9]+$" t)) + (directory-files dir nil "\\`[0-9]+\\'" t)) '<)) ;; Update the cache active file, just to synch more. (if articles diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 41b63e23232..46b70eaf275 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -2981,7 +2981,7 @@ The list is determined from the variable `gnus-score-file-alist'." (if (file-directory-p (car files)) (setq out (nconc (directory-files (car files) t - (concat (gnus-score-file-regexp) "$")))) + (concat (gnus-score-file-regexp) "\\'")))) (push (car files) out)) (setq files (cdr files))) (setq gnus-internal-global-score-files out))) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 83a85161aa0..f0d328d334f 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -768,7 +768,7 @@ nil. See also `gnus-bind-print-variables'." If there's no subdirectory, delete DIRECTORY as well." (when (file-directory-p directory) (let ((files (directory-files - directory t "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")) + directory t (rx (or (not ".") "...")))) file dir) (while files (setq file (pop files)) diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index 4037221f496..af37df07f97 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -1674,7 +1674,7 @@ Gnus might fail to display all of it.") did-unpack)) (defun gnus-uu-dir-files (dir) - (let ((dirs (directory-files dir t "[^/][^\\.][^\\.]?$")) + (let ((dirs (directory-files dir t (rx (or (not ".") "...")))) files file) (while dirs (if (file-directory-p (setq file (car dirs))) diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index e5dda990d6b..a3c26ea4ac0 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -219,7 +219,7 @@ are generated if and only if they are also in `message-draft-headers'." (nnheader-re-read-dir pathname) (setq dir (mapcar (lambda (name) (string-to-number (substring name 1))) (ignore-errors (directory-files - pathname nil "^#[0-9]+#$" t)))) + pathname nil "\\`#[0-9]+#\\'" t)))) (dolist (n dir) (unless (file-exists-p (setq file (expand-file-name (int-to-string n) pathname))) diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index d2f63bd3db1..581a408009d 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el @@ -172,7 +172,7 @@ as unread by Gnus.") (setq dir (sort (mapcar 'string-to-number - (directory-files pathname nil "^[0-9]+$" t)) + (directory-files pathname nil "\\`[0-9]+\\'" t)) '<)) (cond (dir @@ -360,7 +360,7 @@ as unread by Gnus.") (nnmh-possibly-change-directory group server) (let ((articles (mapcar 'string-to-number (directory-files - nnmh-current-directory nil "^[0-9]+$")))) + nnmh-current-directory nil "\\`[0-9]+\\'")))) (when articles (setcar active (apply 'min articles)) (setcdr active (apply 'max articles)))))) @@ -371,7 +371,7 @@ as unread by Gnus.") ;; Delete all articles in GROUP. (if (not force) () ; Don't delete the articles. - (let ((articles (directory-files nnmh-current-directory t "^[0-9]+$"))) + (let ((articles (directory-files nnmh-current-directory t "\\`[0-9]+\\'"))) (while articles (when (file-writable-p (car articles)) (nnheader-message 5 "Deleting article %s in %s..." @@ -485,7 +485,7 @@ as unread by Gnus.") ;; Find the highest number in the group. (let ((files (sort (mapcar 'string-to-number - (directory-files dir nil "^[0-9]+$")) + (directory-files dir nil "\\`[0-9]+\\'")) '>))) (when files (setcdr active (car files))))) @@ -509,7 +509,7 @@ as unread by Gnus.") (let* ((dir nnmh-current-directory) (files (sort (mapcar 'string-to-number (directory-files nnmh-current-directory - nil "^[0-9]+$" t)) + nil "\\`[0-9]+\\'" t)) '<)) (nnmh-file (concat dir ".nnmh-articles")) new articles) diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index da13a56001b..33b68fa989e 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -260,7 +260,7 @@ there.") t) ;; Yes, completely empty spool directories *are* possible. ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu> - (when (setq dir (directory-files pathname nil "^[0-9]+$" t)) + (when (setq dir (directory-files pathname nil "\\`[0-9]+\\'" t)) (setq dir (sort (mapcar 'string-to-number dir) '<))) (if dir (nnheader-insert diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index 2e03608b5df..3da45a2b623 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el @@ -557,7 +557,7 @@ check the variable `spam-stat-score-data'." (defun spam-stat-process-directory (dir func) "Process all the regular files in directory DIR using function FUNC." - (let* ((files (directory-files dir t "^[^.]")) + (let* ((files (directory-files dir t "\\`[^.]")) (max (/ (length files) 100.0)) (count 0)) (with-temp-buffer @@ -601,7 +601,7 @@ If VERBOSE is non-nil display names of files detected as spam or non-spam in a temporary buffer. If it is the symbol `ham', display non-spam files; otherwise display spam files." (interactive "DDirectory: ") - (let* ((files (directory-files dir t "^[^.]")) + (let* ((files (directory-files dir t "\\`[^.]")) display-files buffer-score (total (length files)) |