[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] externals/tempel 7fc015b652 1/2: Respect major-mode-remap-ali
From: |
Stefan Monnier |
Subject: |
Re: [elpa] externals/tempel 7fc015b652 1/2: Respect major-mode-remap-alist (Emacs 29 major mode remapping) |
Date: |
Thu, 15 Feb 2024 21:28:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> --- a/tempel.el
> +++ b/tempel.el
> @@ -494,7 +494,9 @@ This is meant to be a source in
> `tempel-template-sources'."
> (cl-loop
> for m in modes thereis
> (or (eq m #'fundamental-mode)
> - (derived-mode-p m)))
> + (derived-mode-p m)
> + (when-let ((remap (alist-get m (bound-and-true-p
> major-mode-remap-alist))))
> + (derived-mode-p remap))))
We do the same in YASnippet, but note that it's a hack: it will work for
those alternative modes activated via `major-mode-remap-alist` but not
for those activated some other way (e.g. `M-x`, `auto-mode-alist`).
:-(
Stefan
- Re: [elpa] externals/tempel 7fc015b652 1/2: Respect major-mode-remap-alist (Emacs 29 major mode remapping),
Stefan Monnier <=