]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix regression in wisent-total-conflicts
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Mar 2020 12:17:57 +0000 (13:17 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Mar 2020 12:17:57 +0000 (13:17 +0100)
* 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).

lisp/cedet/semantic/wisent/comp.el

index 263dff9dcc697a5e03ea1cd8b51af02d1f088797..4e9927f23f12384fed7570c914ce9c5a97554162 100644 (file)
@@ -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)))