Function: ps-mode-target-column

ps-mode-target-column is a byte-compiled function defined in ps-mode.el.gz.

Signature

(ps-mode-target-column)

Documentation

To what column should text on current line be indented?

Indentation is increased if the last token on the current line
defines the beginning of a group. These tokens are: { [ <<

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ps-mode.el.gz
;; Key-handlers.

(defun ps-mode-target-column ()
  "To what column should text on current line be indented?

Indentation is increased if the last token on the current line
defines the beginning of a group.  These tokens are:  {  [  <<"
  (save-excursion
    (beginning-of-line)
    (if (looking-at "[ \t]*\\(}\\|\\]\\|>>\\)")
	(condition-case err
	    (progn
	      (goto-char (match-end 0))
	      (backward-sexp 1)
	      (beginning-of-line)
	      (if (looking-at "[ \t]+")
		  (goto-char (match-end 0)))
	      (current-column))
	  (error
	   (ding)
	   (message "%s" (error-message-string err))
	   0))
      (let (target)
	(if (not (re-search-backward "[^ \t\n\r\f][ \t\n\r\f]*\\=" nil t))
	    0
	  (goto-char (match-beginning 0))
	  (beginning-of-line)
	  (if (looking-at "[ \t]+")
	      (goto-char (match-end 0)))
	  (setq target (current-column))
	  (end-of-line)
	  (if (re-search-backward "\\({\\|\\[\\|<<\\)[ \t]*\\(%[^\n]*\\)?\\=" nil t)
	      (setq target (+ target ps-mode-tab)))
	  target)))))