Remove magic numbers.
--- a/maven.el Sat Mar 25 02:13:30 2017 +0300
+++ b/maven.el Sat Mar 25 10:44:53 2017 +0300
@@ -34,17 +34,15 @@
(unless (eq (char-after) ?<)
(search-backward "<"))
(setq point (point))
- (setq fs-o (re-search-forward "<\\(?:plugin\\|dependency\\)>" nil t))
- (when fs-o
- (setq fs-o (- fs-o 12)))
+ (when (re-search-forward "<\\(?:plugin\\|dependency\\)>" nil t)
+ (setq fs-o (re-search-backward "<") nil t))
(goto-char point)
(setq bs-o (re-search-backward "<\\(?:plugin\\|dependency\\)>" nil t))
(goto-char point)
(setq fs-c (re-search-forward "</\\(?:plugin\\|dependency\\)>" nil t))
(goto-char point)
- (setq bs-c (re-search-backward "</\\(?:plugin\\|dependency\\)>" nil t))
- (when bs-c
- (setq bs-c (+ bs-c 13)))
+ (when (re-search-backward "</\\(?:plugin\\|dependency\\)>" nil t)
+ (setq bs-c (re-search-backward ">" nil t)))
(cond
((and fs-o (= fs-o point) fs-c)
(maven.parse-pom-dependency-in-region fs-o fs-c))