Function: meta-end-of-defun

meta-end-of-defun is an interactive and byte-compiled function defined in meta-mode.el.gz.

Signature

(meta-end-of-defun &optional ARG)

Documentation

Move forward to end of a defun in Metafont or MetaPost code.

With numeric argument, do it that many times. Negative argument -N means move back to Nth preceding end of defun. Returns t unless search stops due to beginning or end of buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/meta-mode.el.gz
(defun meta-end-of-defun (&optional arg)
  "Move forward to end of a defun in Metafont or MetaPost code.
With numeric argument, do it that many times.
Negative argument -N means move back to Nth preceding end of defun.
Returns t unless search stops due to beginning or end of buffer."
  (interactive "p")
  (if (or (null arg) (= 0 arg)) (setq arg 1))
  (and (< arg 0) (not (bobp)) (forward-line -1))
  (and (re-search-forward
        (concat "\\<" meta-end-defun-regexp "\\>") nil t arg)
       (progn (goto-char (match-end 0))
              (skip-chars-forward ";")
              (skip-chars-forward " \t\f")
              (if (looking-at "\n") (forward-line 1)) t)))