Function: dcl-tab

dcl-tab is an interactive and byte-compiled function defined in dcl-mode.el.gz.

Signature

(dcl-tab)

Documentation

Insert tab in data lines or indent code.

If dcl-tab-always-indent is t, code lines are always indented. If nil, indent the current line only if point is at the left margin or in the lines indentation; otherwise insert a tab.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/dcl-mode.el.gz
;;;-------------------------------------------------------------------------
(defun dcl-tab ()
  "Insert tab in data lines or indent code.
If `dcl-tab-always-indent' is t, code lines are always indented.
If nil, indent the current line only if point is at the left margin or in
the lines indentation; otherwise insert a tab."
  (interactive "*")
  (let ((type (dcl-get-line-type))
        (start-point (point)))
    (cond
     ;; Data line : always insert tab
     ((or (equal type 'data) (equal type 'empty-data))
      (tab-to-tab-stop))
     ;; Indent only at start of line
     ((not dcl-tab-always-indent)       ; nil
      (let ((search-end-point
             (save-excursion
               (beginning-of-line)
               (re-search-forward "^\\$?[ \t]*" start-point t))))
        (if (or (bolp)
                (and search-end-point
                     (>= search-end-point start-point)))
            (dcl-indent-line)
          (tab-to-tab-stop))))
      ;; Always indent
      ((eq dcl-tab-always-indent t)     ; t
      (dcl-indent-line))
     )))