Only remove when a match has been found
* dispass.el (dispass-remove-label): Only remove a label if it has been found and don't throw an error when it hasn't.
This commit is contained in:
parent
9bd8cdaaa5
commit
c7a86ac858
1 changed files with 3 additions and 3 deletions
|
@ -214,9 +214,9 @@ an eye out for LABEL."
|
||||||
|
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents dispass-file)
|
(insert-file-contents dispass-file)
|
||||||
(re-search-forward (concat "^" label))
|
(when (re-search-forward (concat "^" label) nil t)
|
||||||
(kill-whole-line)
|
(kill-whole-line)
|
||||||
(write-file dispass-file))
|
(write-file dispass-file)))
|
||||||
|
|
||||||
(when labels-mode-p
|
(when labels-mode-p
|
||||||
(revert-buffer))))
|
(revert-buffer))))
|
||||||
|
|
Loading…
Reference in a new issue