Function: perl-beginning-of-function

perl-beginning-of-function is an interactive and byte-compiled function defined in perl-mode.el.gz.

Signature

(perl-beginning-of-function &optional ARG)

Documentation

Move backward to next beginning-of-function, or as far as possible.

With argument, repeat that many times; negative args move forward. Returns new value of point in all cases.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/perl-mode.el.gz
(defun perl-beginning-of-function (&optional arg)
  "Move backward to next beginning-of-function, or as far as possible.
With argument, repeat that many times; negative args move forward.
Returns new value of point in all cases."
  (interactive "p")
  (or arg (setq arg 1))
  (if (< arg 0) (forward-char 1))
  (and (/= arg 0)
       (re-search-backward
        "^\\s(\\|^\\s-*sub\\b[ \t\n]*\\_<[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\."
        nil 'move arg)
       (goto-char (1- (match-end 0))))
  (point))