julia-emacs
julia-emacs copied to clipboard
beginning-/end-of-defun should move out of the *top-level* construct
The Emacs manual is quite clear about this:
These commands move point or set up the region based on top-level major definitions, also called “defuns”.
(emacs) Moving by Defuns
In interactive programming jupyter-eval-defun
(or whatever method
you use) should eval the current top-level construct. This may be a
function but could also be a type definition or whatever.
*-eval-defun
relies on beginning-/end-of-defun
.
This is often not the case, eg. python-mode
. But, the beg/end-of-defun functions are buggy
nverno writes:
This is often not the case, eg. python-mode. But, the beg/end-of-defun functions are buggy
Is there some consensus how these function should behave? IMHO C-M-x
should work as expected with function
, macro
, and struct
. But
this could also be fixed in *-eval-defun
.
I agree with you about -*eval-defun
. I don't think there is a general consensus on the beg/end-of-defun functions with respect to nested functions? I just ported python's implementation given the language similarities (although it is obviously buggy, I just haven't been using Julia for a while so haven't been inclined to fix it).