Closed fourier closed 7 years ago
I'm not sure that is useful, at least not as default behaviour. Navigating to source using M-.
and editing a function using C-c C-f
are very different activities, and they should be invoked using different commands.
However, implementing your requested functionality is pretty easy, and can be done without changes to gnu-apl-mode. Instead of gnu-apl-find-function-at-point
, use this function:
(defun gnu-apl-find-function-at-point-or-open-editor ()
(interactive)
(let* ((name (gnu-apl--name-at-point))
(buffer (current-buffer)))
(gnu-apl-find-function-at-point)
(when (eq buffer (current-buffer))
(gnu-apl-edit-function name))))
Thanks, works for me.
Right now
M-.
allows to jump/edit the function which is defined in some source file. However if the function just has been created in the interpreter session it is impossible to edit it usingM-.
from the interpreter session. One can typeC-c C-f
and type a function name to edit it. It could be great to point to the function and typeM-.
as well in the interpreter session to edit functions instead of manually type their name withC-c C-f
.