Fork me on GitHub
#emacs
<
2017-04-13
>
richiardiandrea00:04:37

hello folks! is there a premade predicate in elisp to identify top-level sexp?

richiardiandrea00:04:20

actually a list would do too

richiardiandrea00:04:38

uhm, maybe i can use read and if use listp

qqq02:04:24

@richiardiandrea : does searching for ^( work? Earlier, I was writing t ahot key for "move to start of top level sexp"

amdt04:04:41

@richiardiandrea: Have a look at C-h f beginning-of-defun and C-h f beginning-of-defun-raw. If you can’t use them as functions you should be able to see how they find a top-level sexp at least.

richiardiandrea20:04:25

if I do (re-search-forward "/\\*\\|\\*/" nil 'move) and the result is 3, shouldn't I see the curson in the buffer moving? Does it work like this in ielm?