         "copy" "declare" "delete" "deploy" "do" "edit" "else" "file"
         "for" "from" "function" "global" "if" "in" "is" "list" "local"
         "lock" "log" "not" "off" "or" "on" "parameter" "preserve"
-        "print" "reboot" "remove" "rename" "run" "set" "shutdown"
-        "step" "switch" "then" "to" "toggle" "unlock" "unset" "until"
-        "volume" "wait" "when")
+        "print" "reboot" "remove" "rename" "return" "run" "set"
+        "shutdown" "step" "switch" "then" "to" "toggle" "unlock"
+        "unset" "until" "volume" "wait" "when")
   "List of Kerboscript keywords for ks-mode.")
 
 (defvar ks-types

    (indent-line-to indent)))

(defun ks-previous-indentation ()
  "Get the indentation of the previous non-blank line of Kerboscript."
  (save-excursion
    (forward-line -1)
    (while (looking-at "[[:space:]]*$")
      (forward-line -1))
    (current-indentation)))


  (let ((indentation (ks-previous-indentation))
        (significant-earlier-line nil)
        (opening-brace ".*{[[:space:]]*\\(//.*\\)?$")
        (closing-brace ".*}")
        (statement-end ".*\\.[[:space:]]*\\(//.*\\)?$")
        (blank-line "[[:space:]]*$"))
    (save-excursion
      (beginning-of-line)
