Hello Greg,
Greg Bognar via General discussion about AUCTeX wrote (Fri, Jan 07, 2022 at
11:48:18PM +0100):
> Yes, that's what I thought. Is there a way to, say, copy and modify that
> definition and add it as a new environment? E.g., calling `myframe' that
> inserts the frame with the customized formatting?
I think you can write a beamer.el for yourself in ~/.emacs.d/auctex/style (I
didn't find any variable explicitly set to point to this directory in my init
files, so I'm assuming this is the default). My experience suggests that your
personal beamer.el works "as intended", i.e., it adds to the auctex default,
and overrides the default in case of conflicts.
I have, for example:
---------------------------------------------------------------------------
(TeX-add-style-hook
"beamer"
(lambda ()
(LaTeX-add-environments
'("frame" (lambda (env &rest ignore)
(let ((title (read-string "(Optional) Title: ")))
(beginning-of-line)
(insert
"%---------------------------------------------------------------------------%\n\n\\begin{frame}{"title"}\n\n\\end{frame}\n\n")
(forward-line -3)))
ignore))
...
---------------------------------------------------------------------------
HTH,
-mandar