Function: ruby-accurate-end-of-block
ruby-accurate-end-of-block is a byte-compiled function defined in
ruby-mode.el.gz.
Signature
(ruby-accurate-end-of-block &optional END)
Documentation
Jump to the end of the current block or END, whichever is closer.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ruby-mode.el.gz
(defun ruby-accurate-end-of-block (&optional end)
"Jump to the end of the current block or END, whichever is closer."
(let (state
(end (or end (point-max))))
(if ruby-use-smie
(save-restriction
(back-to-indentation)
(narrow-to-region (point) end)
(smie-forward-sexp))
(while (and (setq state (apply #'ruby-parse-partial end state))
(>= (nth 2 state) 0) (< (point) end))))))