Function: vera-indent-line
vera-indent-line is an interactive and byte-compiled function defined
in vera-mode.el.gz.
Signature
(vera-indent-line)
Documentation
Indent the current line as Vera code.
Return the amount of indentation change (in columns).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vera-mode.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; indentation functions
(defun vera-indent-line ()
"Indent the current line as Vera code.
Return the amount of indentation change (in columns)."
(interactive)
(vera-prepare-search
(let* ((syntax (vera-guess-basic-syntax))
(pos (- (point-max) (point)))
(indent (apply '+ (mapcar 'vera-get-offset syntax)))
(shift-amt (- (current-indentation) indent)))
(when vera-echo-syntactic-information-p
(message "syntax: %s, indent= %d" syntax indent))
(unless (zerop shift-amt)
(beginning-of-line)
(delete-region (point) (vera-point 'boi))
(indent-to indent))
(if (< (point) (vera-point 'boi))
(back-to-indentation)
;; If initial point was within line's indentation, position after
;; the indentation. Else stay at same point in text.
(when (> (- (point-max) pos) (point))
(goto-char (- (point-max) pos))))
shift-amt)))