Function: down-list

down-list is an interactive and byte-compiled function defined in lisp.el.gz.

Signature

(down-list &optional ARG INTERACTIVE)

Documentation

Move forward down one level of parentheses.

This command will also work on other parentheses-like expressions defined by the current language mode. With ARG, do this that many times. A negative argument means move backward but still go down a level. This command assumes point is not in a string or comment. Calls down-list-function to do the work, if that is non-nil. If INTERACTIVE is non-nil, as it is interactively, report errors as appropriate for this kind of usage.

View in manual

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/lisp.el.gz
(defun down-list (&optional arg interactive)
  "Move forward down one level of parentheses.
This command will also work on other parentheses-like expressions
defined by the current language mode.
With ARG, do this that many times.
A negative argument means move backward but still go down a level.
This command assumes point is not in a string or comment.
Calls `down-list-function' to do the work, if that is non-nil.
If INTERACTIVE is non-nil, as it is interactively,
report errors as appropriate for this kind of usage."
  (interactive "^p\nd")
  (when (and (null down-list-function)
             (ppss-comment-or-string-start (syntax-ppss)))
    (user-error "This command doesn't work in strings or comments"))
  (if interactive
      (condition-case _
          (down-list arg nil)
        (scan-error (user-error "At bottom level")))
    (or arg (setq arg 1))
    (if down-list-function
        (funcall down-list-function arg)
      (down-list-default-function arg))))