Next: , Up: Defuns   [Contents][Index]

26.2.1 Left Margin Convention

Many programming-language modes have traditionally assumed that any opening parenthesis or brace found at the left margin is the start of a top-level definition, or defun. So, by default, commands which seek the beginning of a defun accept such a delimiter as signifying that position.

If you want to override this convention, you can do so by setting the user option open-paren-in-column-0-is-defun-start to nil. If this option is set to t (the default), commands seeking the start of a defun will stop at opening parentheses or braces at column zero which aren’t in a comment or string. When it is nil, defuns are found by searching for parens or braces at the outermost level. Since low-level Emacs routines no longer depend on this convention, you usually won’t need to change open-paren-in-column-0-is-defun-start from its default.