mirror of https://github.com/djcb/mu.git
mu4e~contains-line-matching: Cosmetics
This commit is contained in:
parent
f66be19121
commit
32066ae433
|
@ -296,14 +296,13 @@ messages can lead to messages with multiple tags headers.")
|
||||||
"List of tags for completion in `mu4e-action-retag-message'.")
|
"List of tags for completion in `mu4e-action-retag-message'.")
|
||||||
|
|
||||||
(defun mu4e~contains-line-matching (regexp path)
|
(defun mu4e~contains-line-matching (regexp path)
|
||||||
"Does file at PATH contain a line matching the given REGEXP?"
|
"Return non-nil if the file at PATH contain a line matching REGEXP.
|
||||||
|
Otherwise return nil."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents path)
|
(insert-file-contents path)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(if (re-search-forward regexp nil t)
|
(re-search-forward regexp nil t))))
|
||||||
t
|
|
||||||
nil))))
|
|
||||||
|
|
||||||
(defun mu4e~replace-first-line-matching (regexp to-string path)
|
(defun mu4e~replace-first-line-matching (regexp to-string path)
|
||||||
"Replace first line matching REGEXP in PATH with TO-STRING."
|
"Replace first line matching REGEXP in PATH with TO-STRING."
|
||||||
|
|
Loading…
Reference in New Issue