emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] fix/bug-2034 21904f5: Support mode line constructs for


From: Phil Sainty
Subject: Re: [Emacs-diffs] fix/bug-2034 21904f5: Support mode line constructs for 'mode-name' in c-mode (bug#2034)
Date: Wed, 04 Jul 2018 11:57:01 +1200
User-agent: Orcon Webmail

Grepping for uses of c-update-modeline I found this related comment in
lisp/progmodes/antlr-mode.el:

(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"

I'll test the commented variant with my other changes in place, but it's my understanding that the NAME argument to `define-derived-mode' *should* be a string, even if the mode's body then sets `mode-name' explicitly to something
else.

It's certainly documented that NAME is a string; and if it's not a string, then IIRC you run into problems like antlr-mode-hook's docstring containing
the full mode line construct rather than the formatted name.

So I expect to use the following in the mode body:
(setq mode-name '("Antlr." (:eval (cadr (assq antlr-language antlr-language-alist)))))


-Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]