Commit efe42c2b authored by Stefan Monnier's avatar Stefan Monnier

* lisp/progmodes/antlr-mode.el: Fix bootstrap failure

(antlr-mode): Remove compatibility code with older CC-mode.
This somehow appears to fix the error:

    In antlr-mode:
    progmodes/antlr-mode.el:2426:20: Error: `c-init-language-vars' defined
        after use in (c-init-language-vars) (missing `require' of a library
    progmodes/antlr-mode.el:2427:26: Warning: c-init-language-vars called
        with 0 arguments, but requires 1

No idea what caused the error to appear after the previous patch either.
parent 97eec9db
Pipeline #9466 failed with stages
in 142 minutes and 32 seconds
......@@ -2418,16 +2418,7 @@ the default language."
(cadr (assq antlr-language antlr-language-alist)))))
;; indentation, for the C engine -------------------------------------------
(setq c-buffer-is-cc-mode antlr-language)
(cond ((fboundp 'c-init-language-vars-for) ; cc-mode 5.30.5+
(c-init-language-vars-for antlr-language))
((fboundp 'c-init-c-language-vars) ; cc-mode 5.30 to 5.30.4
(c-init-c-language-vars) ; not perfect, but OK
(setq c-recognize-knr-p nil))
((fboundp 'c-init-language-vars) ; cc-mode 5.29
(let ((init-fn 'c-init-language-vars))
(funcall init-fn))) ; is a function in v5.29
(t ; cc-mode upto 5.28
(antlr-c-init-language-vars))) ; do it myself
(c-init-language-vars-for antlr-language)
(c-basic-common-init antlr-language (or antlr-indent-style "gnu"))
(set (make-local-variable 'outline-regexp) "[^#\n\^M]")
(set (make-local-variable 'outline-level) #'c-outline-level) ;TODO: define own
......@@ -2471,6 +2462,6 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'."
(provide 'antlr-mode)
;;; Local IspellPersDict: .ispell_antlr
;; Local IspellPersDict: .ispell_antlr
;;; antlr-mode.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment