In paredit mode,
paredit-backward-up) is used to move the point
backward up out of the enclosing list
The point is parked at the beginning parenthesis of the enclosing list. My question is:
How to move up one level of sexp similarly but have the point parked at the ending parenthesis instead (if an enclosing parenthesis exists)?
I am asking is that sexp evaluation with
C-x C-e (
eval-last-sexp) happens at the ending parenthesis (instead of the beginning). And I'd like to repeatedly jump up to a position where I can evaluate using
C-x C-e immediately. Ideally, I'd like to have a function that repeatedly jump out and stop at the top-level, where there is no enclosing parenthesis. e.g., given:
'(((how) are) ((you) (do|ing so)) far)
I'd like to move the cursor quickly to the ending parenthesis (I mean with one possibly repeated key combination, as I need to do this a lot).
'(((how) are) ((you) (doing so)) far)|
-- Update --
I needed more specif control of navigation than the
end-of-defun suggested in the comments.
Below was a larger example I tested in a scheme-mode buffer, with point indicated by
(car '(a b c)) 'xyz '(((how) are) ((you) (do|ing so)) far) '(atom turkey) 'or (car '(a b c))
C-M-x before at the above position, and it gives me
, which is not the sexp I am trying to evaluate.
Hitting C-M-e (end-of-defun) followed by C-x C-e produces the same result.
end-of-defun) followed by C-x C-e, or press C-M-x without moving the cursor.