Function: ruby-indent-to
ruby-indent-to is a byte-compiled function defined in ruby-mode.el.gz.
Signature
(ruby-indent-to COLUMN)
Documentation
Indent the current line to COLUMN.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ruby-mode.el.gz
(defun ruby-indent-to (column)
"Indent the current line to COLUMN."
(when column
(let (shift top beg)
(and (< column 0) (error "Invalid nesting"))
(setq shift (current-column))
(beginning-of-line)
(setq beg (point))
(back-to-indentation)
(setq top (current-column))
(skip-chars-backward " \t")
(if (>= shift top) (setq shift (- shift top))
(setq shift 0))
(if (and (bolp)
(= column top))
(move-to-column (+ column shift))
(move-to-column top)
(delete-region beg (point))
(beginning-of-line)
(indent-to column)
(move-to-column (+ column shift))))))