Commit 9823f299 authored by Phil Sainty's avatar Phil Sainty

Restore antlr-mode's intended mode-name construct

* lisp/progmodes/antlr-mode.el (antlr-mode): Restore antlr-mode's
intended mode-name, as CC mode now supports arbitrary mode line
constructs.

Note that the NAME supplied to 'define-derived-mode' should be a
string, so the original (commented) code wasn't quite right.
parent 6a4477d0
Pipeline #10 failed with stage
......@@ -2553,11 +2553,7 @@ the default language."
(car r)))
;;;###autoload
(define-derived-mode antlr-mode prog-mode
;; FIXME: Since it uses cc-mode, it bumps into c-update-modeline's
;; limitation to mode-name being a string.
;; '("Antlr." (:eval (cadr (assq antlr-language antlr-language-alist))))
"Antlr"
(define-derived-mode antlr-mode prog-mode "Antlr"
"Major mode for editing ANTLR grammar files."
:abbrev-table antlr-mode-abbrev-table
(c-initialize-cc-mode) ; cc-mode is required
......@@ -2567,10 +2563,9 @@ the default language."
(unless antlr-language
(set (make-local-variable 'antlr-language)
(or (antlr-language-option t) (antlr-language-option nil))))
(if (stringp (cadr (assq antlr-language antlr-language-alist)))
(setq mode-name
(concat "Antlr."
(cadr (assq antlr-language antlr-language-alist)))))
(setq mode-name
'("Antlr." (:eval (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+
......
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