• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:goto +defs:line

57 ;;   Consider the following line (`_' is the cursor):
61 ;; the line.
67 ;; including lines with end line comments?
70 ;; complete command line? A block? A subroutine?
116 "*Number of columns to indent a continuation line in DCL.
117 A continuation line is a line that follows a line ending with `-'.
126 "*Indentation for the first command line in DCL.
127 The first command line in a file or after a SUBROUTINE statement is indented
129 the preceding command line.
130 A command line is a line that starts with `$'."
143 (defcustom dcl-comment-line-regexp "^\\$!"
144 "*Regexp describing the start of a comment line in DCL.
165 "*Function to calculate indentation for a command line in DCL.
170 The function must return the number of columns to indent the current line or
176 outdent the lines indentation should be decreased, e.g a line with ENDIF.
177 first-line indentation for the first line in a buffer or SUBROUTINE.
178 CUR-INDENT is the indentation of the preceding command line.
179 EXTRA-INDENT is the default change in indentation for this line
182 previous line or nil if the current line is the first line.
184 current line.
197 "*Function to calculate indentation for a continuation line.
202 The function must return the number of columns to indent the current line or
216 If t, pressing TAB always indents the current line.
217 If nil, pressing TAB indents the current line if point is at the left margin.
218 Data lines (i.e. lines not part of a command line or continuation line) are
252 (defcustom dcl-imenu-label-goto "GOTO"
269 (,dcl-imenu-label-goto "\\s-GOTO[ \t]+\\([A-Za-z0-9_\$]+\\)" 1)
307 (define-key dcl-mode-map "\e\n" 'dcl-split-line)
347 (define-key dcl-mode-map [menu-bar dcl dcl-split-line]
348 '("Split line" . dcl-split-line))
352 '("Indent line/insert tab" . dcl-tab))
371 "Regular expression describing white space in a DCL command line.
381 A label is a name followed by a colon followed by white-space or end-of-line."
388 "Regular expression describing a DCL command line up to a trailing comment.
389 A line starting with $, optionally followed by continuation lines,
390 followed by the end of the command line.
391 A continuation line is any characters followed by `-',
399 "Regular expression describing a DCL command line.
400 A line starting with $, optionally followed by continuation lines,
401 followed by the end of the command line.
402 A continuation line is any characters followed by `-',
416 `endif', the line will be reindented."
426 (dcl-comment-line-regexp dcl-option-value-comment-line)
489 Whole-line comments (matching dcl-comment-line-regexp) are not indented.
511 Indentation for the first command line in a file or SUBROUTINE.
516 dcl-comment-line-regexp
539 If t, pressing TAB always indents the current line.
540 If nil, pressing TAB indents the current line if point is at the left
562 dcl-imenu-label-goto
575 $! This is a comment line that is not indented (it matches
576 $! dcl-comment-line-regexp)
577 $! Next follows the first command line. It is indented dcl-margin-offset.
587 $ ! ...so this line is indented dcl-basic-offset
588 $ text = \"This \" + - ! is a continued line
589 \"lined up with the command line\"
603 (make-local-variable 'indent-line-function)
604 (setq indent-line-function 'dcl-indent-line)
612 (make-local-variable 'comment-multi-line)
613 (setq comment-multi-line nil)
617 ;; C-M-j repeatedly - only the first line became a comment line.
618 ;; This version has the drawback that the "$" can be anywhere in the line,
628 (make-local-variable 'dcl-comment-line-regexp)
657 "Go to the beginning of the preceding or current command line."
664 "Go to the end of the next or current command line."
678 (let ((type (dcl-get-line-type)))
689 (let ((type (dcl-get-line-type))
702 Move point to the preceding command line that is not a comment line,
703 a command line with only a comment, only contains a `$' or only
706 Returns point of the found command line or nil if not able to move."
711 ;; Find first non-empty command line
724 ((looking-at dcl-comment-line-regexp)
725 t) ; comment line, one more loop
730 t) ; empty line, one more loop
733 (setq done t) ; not a label-only line, exit the loop
737 (goto-char start)
746 Move point to the end of the next command line that is not a comment line,
747 a command line with only a comment, only contains a `$' or only
750 Returns point of the found command line or nil if not able to move."
755 ;; Find first non-empty command line
772 ((looking-at dcl-comment-line-regexp)
773 t) ; comment line, one more loop
778 t) ; empty line, one more loop
781 (setq done t) ; not a label-only line, exit the loop
785 (goto-char start)
793 "Move point to the first non-whitespace character on this line.
795 If this is a comment line then move to the first non-whitespace character
802 E.g. on the following line, point would go to the positions indicated
827 (let* ((default-limit (save-excursion (end-of-line) (1+ (point))))
845 ((looking-at dcl-comment-line-regexp)
846 (re-search-forward (concat dcl-comment-line-regexp "[ \t]*") limit t)
850 ;; Normal command line
874 (goto-char last-good-point)))
880 (defun dcl-get-line-type ()
881 "Determine the type of the current line.
883 $ for a complete command line or the beginning of a command line.
884 - for a continuation line
885 $! for a comment line
886 data for a data line
887 empty-data for an empty line following a data line
888 empty-$ for an empty line following a command line"
890 ;; Check if it's a comment line.
891 ;; A comment line starts with $!
893 (beginning-of-line)
894 (if (looking-at dcl-comment-line-regexp)
896 ;; Check if it's a command line.
897 ;; A command line starts with $
899 (beginning-of-line)
902 ;; Check if it's a continuation line
904 (beginning-of-line)
918 (forward-line -1)
919 (let ((type (dcl-get-line-type)))
925 ;; Anything else must be a data line
932 "Return point of first non-`whitespace' on this line."
939 (defun dcl-show-line-type ()
940 "Test dcl-get-line-type."
942 (let ((type (dcl-get-line-type)))
945 (message "command line"))
949 (message "comment line"))
951 (message "continuation line"))
1024 (goto-char this-point)
1028 (goto-char last-point)
1033 (goto-char last-point)
1041 (goto-char this-point)
1051 "Calculate how much the current line shall be indented.
1052 The line is known to be a command line.
1054 Find the indentation of the preceding line and analyze its contents to
1056 Analyze the current line to see if it should be `outdented'.
1058 Calculate the indentation of the current line, either with the default
1062 If the current line should be outdented, calculate its indentation,
1069 If it is the first line in the buffer, indent dcl-margin-offset.
1071 Go to the previous command line with a command on it.
1073 Look at the first word on the line to see if the indentation should be
1084 Then return to the current line and look at the first word to see if the
1106 (beginning-of-line)
1113 (if (bobp) ; first line in buffer
1115 indent-type 'first-line
1119 ;; Find first non-empty command line
1132 ((looking-at dcl-comment-line-regexp)
1133 t) ; comment line, one more loop
1135 t) ; empty line, one more loop
1138 (setq done t))) ; not a label-only line, exit the loop
1140 ;; first line.
1144 ;; Examine the line to get current indentation and possibly a
1153 ;; Find out how much this line is indented.
1161 ;; Look for a reason to indent: Find first word on this line
1174 ;; We're back at the beginning of the original line.
1175 ;; Look for a reason to outdent: Find first word on this line
1188 indent-type2 'first-line
1213 "Indent continuation lines to align with words on previous line.
1216 significant command line elements.
1223 * the second word on the command line
1241 (let ((end (save-excursion (forward-line 1) (point))))
1272 (beginning-of-line)
1278 (goto-char par-pos)
1285 "Calculate how much the current line shall be indented.
1286 The line is known to be a continuation line.
1288 Go to the previous command line.
1294 (beginning-of-line)
1296 ;; Huh? a continuation line first in the buffer??
1301 ;; Find first non-empty command line
1314 ((looking-at dcl-comment-line-regexp)
1321 ;; This must have been the first line.
1326 ;; Find out how much this line is indented.
1335 ;; We're back at the beginning of the original line.
1344 (defun dcl-indent-command-line ()
1345 "Indent a line known to be a command line."
1349 (beginning-of-line)
1366 (goto-char (- (point-max) pos)))
1371 (defun dcl-indent-continuation-line ()
1372 "Indent a line known to be a continuation line.
1375 on the first part on a command line to be taken into consideration."
1378 (beginning-of-line)
1392 (defun dcl-indent-line ()
1393 "The DCL version of `indent-line-function'.
1394 Adjusts indentation on the current line. Data lines are not indented."
1395 (let ((type (dcl-get-line-type)))
1398 (dcl-indent-command-line))
1400 (message "Unknown line type!"))
1405 (dcl-indent-continuation-line))
1408 (dcl-indent-command-line))
1410 (message "dcl-indent-line: unknown type"))
1416 "Indents the complete command line that point is on.
1419 (let ((type (dcl-get-line-type)))
1435 If nil, indent the current line only if point is at the left margin or in
1438 (let ((type (dcl-get-line-type))
1441 ;; Data line : always insert tab
1444 ;; Indent only at start of line
1448 (beginning-of-line)
1453 (dcl-indent-line)
1457 (dcl-indent-line))
1468 The line is only reindented if the word just typed matches any of the
1481 (dcl-indent-line)))))
1502 (defun dcl-split-line ()
1503 "Break line at point and insert text to keep the syntax valid.
1506 ;; Still don't know what to do with comments at the end of a command line.
1509 (type (dcl-get-line-type)))
1545 (indent-new-comment-line))))
1550 "Join this line to previous like delete-indentation.
1554 (let ((type (dcl-get-line-type)))
1606 Find the column of the first non-blank character on the line.
1609 (beginning-of-line)
1617 Find the column of the first non-blank character on the line, not
1621 (beginning-of-line)
1627 (defun dcl-option-value-comment-line (option-assoc)
1628 "Guess a value for `dcl-comment-line-regexp'.
1631 ;; If someone wants `$!&' as a comment line, C-M-j won't work well if
1638 (beginning-of-line)
1645 dcl-comment-line-regexp))))
1677 ;; Continued line
1678 ((eq (dcl-get-line-type) '-)
1680 ;; Comment line
1682 (beginning-of-line)
1684 "dcl-comment-line-regexp")
1685 ;; Margin offset: subroutine statement or first line in buffer
1688 (beginning-of-line)
1694 ;; Margin offset: on command line after subroutine statement
1696 (beginning-of-line)
1697 (and (eq (dcl-get-line-type) '$)
1704 (beginning-of-line)
1714 ((and (eq (dcl-get-line-type) '$) ; beginning of command
1716 (beginning-of-line)
1777 ;; Look for "Local variables:" line in last page.
1779 (goto-char (point-max))
1786 ;; The prefix is what comes before "local variables:" in its line.
1787 ;; The suffix is what comes after "local variables:" in its line.
1791 (progn (end-of-line) (point)))))
1792 (goto-char (match-beginning 0))
1796 (progn (beginning-of-line) (point)))))
1805 (forward-line 1))
1823 ;; Not found. Insert a new entry before this line
1825 (beginning-of-line)
1846 (end-of-line))))))
1848 (goto-char (point-max))
2166 (eq (dcl-get-line-type) '$)))
2173 only line or at the end of the last continuation line.
2175 ;; Must be at end-of-line on a command line or a continuation line
2176 (let ((type (dcl-get-line-type)))
2180 ;; Next line must not be a continuation line
2182 (forward-line)
2183 (not (eq (dcl-get-line-type) '-))))))
2188 "Check if point is on a command line.
2189 Return t if point is on a command line or a continuation line,
2191 (let ((type (dcl-get-line-type)))