aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dispass.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/dispass.el b/dispass.el
index b93654f..3808f43 100644
--- a/dispass.el
+++ b/dispass.el
@@ -214,9 +214,9 @@ an eye out for LABEL."
(with-temp-buffer
(insert-file-contents dispass-file)
- (re-search-forward (concat "^" label))
- (kill-whole-line)
- (write-file dispass-file))
+ (when (re-search-forward (concat "^" label) nil t)
+ (kill-whole-line)
+ (write-file dispass-file)))
(when labels-mode-p
(revert-buffer))))