help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Is it alright to define-derived-mode dynamically?


From: Stefan Monnier
Subject: Re: Is it alright to define-derived-mode dynamically?
Date: Fri, 25 Dec 2020 12:34:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Problem was invoking another derived mode from tabulated-list-mode
> where the other mode did appear and it was populated but it was not
> visible. The text I could not see but entries were there and the lines
> in existence, just everything white.

There can only be one major mode active in a buffer at a time.
So whenever you call a major mode function, it "removes" the previously
set major mode.

>> - Don't use global variables's names for local variables.
>
> Did you mean:
>
> (defvar-local rcd-tabulated-marked-items nil
>   "Collects IDs for tabulated list modes")

So, I meant "local" as in let-bound variables or in your particular case
formal arguments of functions.


        Stefan




reply via email to

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