diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-03-14 13:17:57 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-03-14 13:17:57 +0100 |
commit | 3a671ad7ede0d1459ae60d7340632d8d210b4308 (patch) | |
tree | 52df44eb45bc02f0db4dec5e42d3a77929ac5023 /lisp/cedet/semantic/wisent/comp.el | |
parent | dcc943be0a2b969ac2e3db11f8071f69ba851a0b (diff) | |
download | emacs-3a671ad7ede0d1459ae60d7340632d8d210b4308.tar.gz |
Fix regression in wisent-total-conflicts
* lisp/cedet/semantic/wisent/comp.el (wisent-total-conflicts):
There may not be a current source file. In that case, don't try
to keep track of the number of expected conflicts (bug#39911).
Diffstat (limited to 'lisp/cedet/semantic/wisent/comp.el')
-rw-r--r-- | lisp/cedet/semantic/wisent/comp.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 263dff9dcc6..4e9927f23f1 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -2235,13 +2235,18 @@ there are any reduce/reduce conflicts." (defun wisent-total-conflicts () "Report the total number of conflicts." (let* ((src (wisent-source)) - (symbol (intern (format "wisent-%s--expected-conflicts" - (replace-regexp-in-string "\\.el$" "" src)) - obarray))) + (symbol + ;; Source files may specify how many expected conflicts + ;; there are. If the number is the expected number, don't + ;; output warnings. + (and src + (intern (format "wisent-%s--expected-conflicts" + (replace-regexp-in-string "\\.el$" "" src)))))) (when (or (not (zerop rrc-total)) (and (not (zerop src-total)) (not (= src-total (or wisent-expected-conflicts 0))) - (or (not (boundp symbol)) + (or (null symbol) + (not (boundp symbol)) (not (equal (symbol-value symbol) src-total))))) (let* ((src (if src (concat " in " src) "")) (msg (format "Grammar%s contains" src))) |