]> git.eshelyaron.com Git - emacs.git/commit
Make js-beginning-of-defun return non-nil on success
authorDaniel Martín <mardani29@yahoo.es>
Sun, 25 Jun 2023 20:17:14 +0000 (22:17 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 29 Jun 2023 05:37:15 +0000 (08:37 +0300)
commitef16339918e3f31831dd271cde40cb2072069875
tree482f6dcf5535aba1fe37fc348df6801ee316bc98
parent2c90ade09a4d52a583158cb9cacf665ac11e8387
Make js-beginning-of-defun return non-nil on success

The docstring of 'beginning-of-defun-function' says that the
function shall return non-nil when it found the beginning
of a defun.  This is specially important because the calling
code decides when to move point depending on the return value.
* lisp/progmodes/js.el (js-beginning-of-defun)
(js--beginning-of-defun-flat): Return non-nil when the beginning
of a defun is found.  (Bug#64283)

* test/lisp/progmodes/js-tests.el (js-mode-end-of-defun): Add a unit
test.
lisp/progmodes/js.el
test/lisp/progmodes/js-tests.el