(end-of-defun) not working as expected with auctex. reddit / emacs ---------------------------------------------------------------------- newer1738 · 2022-05-27 12:03 The command end-of-defun which is bound to C-M-End or C-M-e with auctex would usually take me to the end of the current environment. I updated emacs recently and it no longer works as expected. It takes me to the end of the document instead of the current environment. Is this a known bug or am I missing something? The counterpart of this command (beginning-of-defun) works as expected. ---------------------------------------------------------------------- karthink · 2022-05-27 16:24 Do you have the latex-extra package installed? ---------------------------------------------------------------------- newer1738 · 2022-05-27 17:02 I don't have latex-extra package. I installed it but I am failing to enable the latex-extra-mode because it can't find tex.buf. ---------------------------------------------------------------------- karthink · 2022-05-28 05:05 That's good. I asked because latex-extra redefines some navigation commands like C-M-f. ---------------------------------------------------------------------- boson_bear · 2022-12-17 03:45 I'm seeing the same problem here. The affected environment for me is `alignment`. I just updated to `Emacs 28.1` so I guess it is a bug. Have you ever fixed it? ---------------------------------------------------------------------- newer1738 · 2022-12-17 16:03 I'm running Emacs 28.2 and the problem still persists. I haven't fixed it but I found a work-around by remapping my keyboard shortcuts to something that works. ---------------------------------------------------------------------- boson_bear · 2022-12-17 17:11 I see. Thanks for the update. I looked into `end-of-defun` and noticed that it calls `end-of-defun- function` to determine the end of the defun. That said, the current value is a compiled function that I'm too scared to rewrite. I guess it might be relevant for adding self-defined environments.