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

Lines Matching +defs:end +defs:of

17 ;; This file is part of GNU Emacs.
20 ;; it under the terms of the GNU General Public License as published by
25 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;; You should have received a copy of the GNU General Public License
66 `c-report-syntactic-errors' is non-nil. Normally the position of
69 that's not done if IGNORE-POINT-POS is non-nil. Returns the amount of
73 (end-of-line)
80 (beginning-of-line)
86 (<= (point) (match-end 1)))
91 ;; at the end.
96 (goto-char (match-end 0))
98 (delete-region (point) (match-end 0))
158 (beginning-of-line)
175 ;; bs-col-after-end in it works better. Fixup the
275 (substring mode-name (match-beginning 1) (match-end 1))
300 this mode, nor any of the indentation associated variables,
445 The direction of deletion depends on the configuration: If the
474 (progn (end-of-line)
482 (beginning-of-line)
490 ;; Return the syntactic context of the construct at point. (This is NOT
491 ;; nec. the same as the s.c. of the line point is on). N.B. This won't work
492 ;; between the `#' of a cpp thing and what follows (see c-opt-cpp-prefix).
506 (and (c-beginning-of-macro)
507 (progn (c-end-of-macro)
521 ;; A brace stands at point. SYNTAX is the syntactic context of this brace
522 ;; (not necessarily the same as the S.C. of the line it is on). Return
523 ;; NEWLINES, the list containing some combination of the symbols `before'
527 ;; This is the list of brace syntactic symbols that can hang.
587 ;; content of the braces is a single line of code, compact the whole
591 ;; Point will be left after the }, regardless of whether the clean-up is
611 (narrow-to-region (point) (1- here)) ; innards of {.}
617 "\\)" ; (match-end 1)
621 "\\)\\'"))))))) ; (match-end 4) at EOB.
624 (setq mbeg1 (match-beginning 1) mend1 (match-end 1)
625 mbeg4 (match-beginning 4) mend4 (match-end 4))
632 (setq eol-col (save-excursion (end-of-line) (current-column)))
677 settings of `c-cleanup-list' are done."
702 ln-syntax br-syntax syntax) ; Syntactic context of the original line,
703 ; of the brace itself, of the line the brace ends up on.
726 ;; `syntax' is the syntactic context of the line which ends up
773 (delete-region (match-beginning 0) (match-end 0))
795 ;(eq (match-end 0) tmp);
833 1. The slash is second of a \"//\" line oriented comment introducing
836 2. The slash is part of a \"*/\" token that closes a block oriented
855 (regexp-quote comment-end) "\\)?$"))
856 ; (eq c-block-comment-ender "*/") ; C-style comments ALWAYS end in */
863 (progn (end-of-line) (point)))
878 the star is the second character of a C style comment starter on a
920 settings of `c-cleanup-list'."
1106 (c-beginning-of-current-token)
1175 (c-beginning-of-current-token)
1177 (= (match-end 0) final-pos)))
1236 (delete-region (match-beginning 0) (match-end 0))
1252 (delete-region (match-beginning 0) (match-end 0))
1258 (let (beg (end (1- (point))))
1270 (not (and (c-beginning-of-macro)
1274 (delete-region beg end)
1285 (setq end (point))
1289 (delete-region beg end))))
1353 ;; Return non-nil if point is between the closing brace and the semicolon of
1355 ;; portion of a declaration like "struct foo {...} bar ;".
1357 ;; Return the position of the main declaration. Otherwise, return nil.
1358 ;; Point is assumed to be at the top level and outside of any macro or
1362 ;; beginning of the declaration.
1371 (eq (car (c-beginning-of-decl-1 lim)) 'previous)
1374 ;; be the return type of a function, or the like. Exclude
1389 ;; constructs, included in the term "function" in the rest of this comment).
1391 ;; This is used by c-\(begining\|end\)-of-defun.
1393 ;; Return one of these symbols:
1394 ;; at-header : we're at the start of a function's header.
1398 ;; in-trailer : we're in the area between the "}" and ";" of something
1400 ;; at-function-end : we're just after the closing brace (or semicolon) that
1423 'at-function-end)
1425 ;; Find the start of the current declaration. NOTE: If we're in the
1429 ;;If we're in the parameters' parens, move back out of them.
1431 ;; Kluge so that c-beginning-of-decl-1 won't go back if we're already
1439 (car (c-beginning-of-decl-1
1441 ;; of a parameter declaration, not the actual function.
1442 (and least-enclosing ; LIMIT for c-b-of-decl-1
1469 'at-function-end
1472 "c-where-wrt-brace-construct: c-beginning-of-decl-1 returned %s"
1476 ;; Skip to the opening brace of the Nth function before point. If
1481 ;; WHERE describes the position of point, one of the symbols `at-header',
1482 ;; `in-header', `in-block', `in-trailer', `at-function-end',
1485 ;; If we run out of functions, leave point at BOB. Return zero on success,
1486 ;; otherwise the number of {s still to go.
1499 ((memq where '(at-header outwith-function at-function-end in-trailer))
1509 ; by a factor of ~6. Hmmm. 2006/4/5.
1516 (defun c-beginning-of-defun (&optional arg)
1517 "Move backward to the beginning of a defun.
1523 t unless search stops due to beginning or end of buffer.
1525 Unlike the built-in `beginning-of-defun' this tries to be smarter
1533 (beginning-of-defun-function end-of-defun-function
1537 ;; Move back out of any macro/comment/string we happen to be in.
1538 (c-beginning-of-macro)
1545 ;; Move forward to the closing brace of a function.
1547 (if (memq where '(at-function-end outwith-function))
1556 (c-beginning-of-decl-1)
1559 ;; Move backward to the opening brace of a function.
1564 (c-beginning-of-decl-1)
1581 ;; Skip to the closing brace of the Nth function after point. If
1586 ;; WHERE describes the position of point, one of the symbols `at-header',
1587 ;; `in-header', `in-block', `in-trailer', `at-function-end',
1590 ;; If we run out of functions, leave point at EOB. Return zero on success,
1591 ;; otherwise the number of }s still to go.
1597 ;; start. We go to the closing brace of that defun, even when we go
1607 ((memq where '(at-function-end outwith-function at-header in-header))
1617 ; of ~6. Hmmm. 2006/4/5.
1624 (defun c-end-of-defun (&optional arg)
1625 "Move forward to the end of a top level declaration.
1627 back to Nth preceding end. Returns t unless search stops due to
1628 beginning or end of buffer.
1630 An end of a defun occurs right after the close-parenthesis that matches
1631 the open-parenthesis that starts a defun; see `beginning-of-defun'."
1636 (beginning-of-defun-function end-of-defun-function
1640 ;; Move back out of any macro/comment/string we happen to be in.
1641 (c-beginning-of-macro)
1648 ;; Move backwards to the } of a function
1657 ;; Move forward to the } of a function
1663 (if (c-in-function-trailer-p) ; after "}" of struct/enum, etc.
1684 ;; Return a cons of the beginning and end positions of the current
1687 ;; following one is chosen instead (if there is any). The end
1694 ;; Note: Some code duplication in `c-beginning-of-defun' and
1695 ;; `c-end-of-defun'.
1699 lim pos end-pos)
1705 ;; paren-state might very well be part of the
1714 (when (c-beginning-of-macro)
1718 (c-end-of-macro)
1723 (when (or (eq (car (c-beginning-of-decl-1 lim)) 'previous)
1734 (when (and near (c-beginning-of-macro))
1738 (c-end-of-macro)
1744 ;; Check if `c-beginning-of-decl-1' put us after the block in a
1745 ;; declaration that doesn't end there. We're searching back and
1752 (eq (car (c-beginning-of-decl-1))
1755 (c-end-of-decl-1)
1757 (setq end-pos (point)))))
1777 (if end-pos
1778 (goto-char end-pos)
1779 (c-end-of-decl-1))
1794 "Put mark at end of the current top-level declaration or macro, point at beginning.
1797 As opposed to \\[c-beginning-of-defun] and \\[c-end-of-defun], this
1819 ;; Space at BOL which precedes a comment-prefix counts as part of it.
1824 (beginning-of-line)
1827 (/= (match-beginning 0) (match-end 0))
1828 (< here (match-end 0))))))
1831 ;; Narrow to the "inside" of the comment (block) defined by range, as
1840 ;; eliminates awkward things at the boundaries of the comment (block).
1845 (end (if (eq lit-type 'c)
1853 (if (> (point) end)
1854 (goto-char end)) ; This would be done automatically by ...
1857 (narrow-to-region beg end)))
1859 (defun c-beginning-of-sentence-in-comment (range)
1860 ;; Move backwards to the "beginning of a sentence" within the comment
1861 ;; defined by RANGE, a cons of its starting and ending positions. If we
1863 ;; of the comment and return T.
1865 ;; The BOS is either text which follows a regexp match of sentence-end,
1866 ;; or text which is a beginning of "paragraph".
1886 (par-beg ; point where non-WS/non-prefix text of paragraph starts.
1888 (forward-paragraph -1) ; uses cc-mode values of
1899 ;; HERE, until the "start of sentence" following it is earlier than
1900 ;; HERE, or we hit PAR-BEG. Beware of comment prefices!
1901 (while (and (re-search-backward (c-sentence-end) par-beg 'limit)
1903 (goto-char (match-end 0)) ; tentative beginning of sentence
1908 (/= (match-beginning 1) (match-end 1)))))
1911 (beginning-of-line))
1922 (defun c-end-of-sentence-in-comment (range)
1923 ;; Move forward to the "end of a sentence" within the comment defined by
1924 ;; RANGE, a cons of its starting and ending positions (enclosing the opening
1926 ;; return NIL. Otherwise, move point to just after the end of the comment
1929 ;; The EOS is just after the non-WS part of the next match of the regexp
1930 ;; sentence-end. Typically, this is just after one of [.!?]. If there is
1931 ;; no sentence-end match following point, any WS before the end of the
1946 (par-end ; EOL position of last text in current/next paragraph.
1948 ;; The cc-mode values of paragraph-\(start\|separate\), set
1962 ;; Go forward one "comment-prefix which looks like sentence-end"
1964 (while (and (re-search-forward (c-sentence-end) par-end 'limit)
1970 (/= (match-beginning 1) (match-end 1)))
1974 ;; Take special action if we're up against the end of a comment (of
1979 (/= (match-beginning 1) (match-end 1))))))))
1986 (defun c-beginning-of-sentence-in-string (range)
1987 ;; Move backwards to the "beginning of a sentence" within the string defined
1988 ;; by RANGE, a cons of its starting and ending positions (enclosing the
1990 ;; just before the start of the string and return T.
1992 ;; The BOS is either the text which follows a regexp match of sentence-end
1993 ;; or text which is a beginning of "paragraph". For the purposes of
2004 (end (1- (cdr range)))
2013 (par-beg ; beginning of current (or previous) paragraph.
2016 (narrow-to-region (1+ (car range)) end)
2017 (forward-paragraph -1) ; uses above values of
2026 ;; Now see if we can find a sentence end after PAR-BEG.
2027 (while (and (re-search-backward c-sentence-end-with-esc-eol par-beg 'limit)
2029 (goto-char (match-end 0))
2030 (or (> (point) end)
2033 here-filler end t) ; always succeeds. Use end rather
2044 (defun c-end-of-sentence-in-string (range)
2045 ;; Move forward to the "end of a sentence" within the string defined by
2046 ;; RANGE, a cons of its starting and ending positions. If we find an EOS,
2047 ;; return NIL. Otherwise, move point to just after the end of the string
2050 ;; The EOS is just after the non-WS part of the next match of the regexp
2051 ;; sentence-end. Typically, this is just after one of [.!?]. If there is
2052 ;; no sentence-end match following point, any WS before the end of the
2068 (par-end ; EOL position of last text in current/next paragraph.
2072 ;; The above values of paragraph-\(start\|separate\) are used
2087 (when (re-search-forward c-sentence-end-with-esc-eol par-end 'limit)
2091 ;; Did we move a sentence, or did we hit the end of the string?
2100 ;; point, return a cons of its start.end positions (enclosing the
2120 (goto-char (match-end 0)) ; just after the string terminator.
2128 ;; return a cons of its start.end positions (enclosing the delimiters).
2156 ;; wrt white space at the end of the macro. Doesn't seem to matter too
2160 (if (c-beginning-of-macro)
2161 (setq eom (progn (c-end-of-macro)
2170 ;; stopping before reaching BOB or a literal or the boundary of a
2171 ;; preprocessor statement or the "beginning of a statement". MACRO-START is
2172 ;; the position of the '#' beginning the current preprocessor directive, or
2178 ;; B is MACRO-BOUNDARY if we are about to cross the boundary out of or
2181 ;; The total collection of returned values is as follows:
2186 ;; moved and reached the opening # of the macro.
2190 ;; Point is left either at the beginning-of-statement, or at the last non-ws
2198 ;; or `)', but on the other side of the syntactic ws. Move by sexps and
2204 last) ; marks the position of non-ws code, what'll be BOS if, say, a
2207 (while t ;; We go back one "token" each iteration of the loop.
2215 ;; If we've gone back over a LF, we might have moved into or out of
2218 (beginning-of-line)
2222 (c-beginning-of-macro)))
2224 ;; Return a car of NIL ONLY if we've hit the opening # of a macro.
2237 ;; Hit the beginning of the buffer/region?
2255 ;; Have we reached the start of a macro? This always counts as
2281 (defun c-forward-over-illiterals (macro-end allow-early-stop)
2283 ;; (i.e. a comment/string) or the boundary of a preprocessor statement or
2284 ;; the "end of a statement". MACRO-END is the position of the EOL/EOB which
2298 ;; B is 'MACRO-BOUNDARY if we are about to cross the boundary out of or
2301 ;; Point is left either after the end-of-statement, or at the last non-ws
2302 ;; code before encountering the literal, or the # of the preprocessor
2305 ;; As a clarification of "after the end-of-statement", if a comment or
2313 ;; other side of the syntactic ws, and after `;', `}' and `};'. Only
2315 ;; sexps and move into parens. Also stop at eol of lines with `#' at
2332 ;; Gone past the end of a macro?
2333 ((and macro-end (> (point) macro-end))
2342 ;; End of buffer?
2355 ;;;; level of bracketing is a '{'. HMM. Doesn't seem to make sense.
2363 ;; End of a PIKE special brace list? If so, step over it and continue.
2380 ((and (not macro-end)
2389 (goto-char (match-end 0))
2400 (when (and macro-end (> (point) macro-end))
2415 (defun c-beginning-of-statement (&optional count lim sentence-flag)
2416 "Go to the beginning of the innermost C statement.
2418 beginning of a statement then go to the beginning of the closest
2421 comment or multiline string, move by sentences instead of statements.
2428 Note that for use in programs, `c-beginning-of-statement-1' is
2435 (c-end-of-statement (- count) lim sentence-flag)
2440 (save-excursion (and (not (bobp)) (c-beginning-of-macro) (point))))
2442 not-bos ; "not beginning-of-statement"
2443 (range (c-collect-line-comments (c-literal-limits lim)))) ; (start.end) of current literal or NIL
2445 ;; Go back one statement at each iteration of the following loop.
2452 (cond ; Each arm of this cond returns NIL on reaching a desired
2468 ;; Was the previous non-ws thing an end of statement?
2476 (t (when (setq res ; returns non-nil when we go out of the literal
2478 (c-beginning-of-sentence-in-string range)
2479 (c-beginning-of-sentence-in-comment range)))
2485 (setq not-bos ; "not reached beginning-of-statement".
2491 ;; back over WS looking for an end of previous
2498 ;; Are we about to move backwards into or out of a
2502 (beginning-of-line)
2505 (progn (c-skip-ws-backward) (c-beginning-of-macro))
2516 (defun c-end-of-statement (&optional count lim sentence-flag)
2517 "Go to the end of the innermost C statement.
2518 With prefix arg, go forward N - 1 statements. Move forward to the end
2519 of the next statement if already at end, and move into nested blocks
2521 comment or multiline string, move by sentences instead of statements.
2530 (if (< count 0) (c-beginning-of-statement (- count) lim sentence-flag)
2536 (and (not (eobp)) (c-beginning-of-macro)
2537 (progn (c-end-of-macro) (point)))))
2539 (range (c-collect-line-comments (c-literal-limits lim)))) ; (start.end) of current literal or NIL
2541 ;; Go back/forward one statement at each iteration of the following loop.
2549 (cond ; Each arm of this cond returns NIL on reaching a desired
2567 (t (when (setq res ; gets non-nil when we go out of the literal
2569 (c-end-of-sentence-in-string range)
2570 (c-end-of-sentence-in-comment range)))
2572 ;; If we've just come forward out of a literal, check for
2581 ;; Are we about to move forward into or out of a
2585 (end-of-line)
2589 (c-beginning-of-macro))
2590 (progn (c-end-of-macro)
2647 (beginning-of-line)
2666 (end-of-line)
2680 ((progn (beginning-of-line)
2686 'end-block)
2688 (eq (match-end 0) eot))
2689 'cpp-end-block)
2729 move forward to the end of the containing preprocessor conditional.
2784 out of the enclosing conditional. A non-integer non-nil TARGET-DEPTH
2801 ;; depth instead of closer.
2808 ;; comes at the beginning of a line aside from
2811 ;; precedes it. This is faster on account of
2812 ;; the fastmap feature of the regexp matcher.
2816 (beginning-of-line)
2844 ;; end before we find a beginning, get an error.
2879 the syntactic context. A numeric argument, regardless of its value,
2880 means indent rigidly all the lines of the expression starting after
2882 indentation among the lines of the expression is preserved.
2886 indents a number of such steps, positive or negative, and an empty
2889 [*] The amount and kind of whitespace inserted is controlled by the
2891 insertion of whitespace. Normally the function in this variable
2892 just inserts a tab character, or the equivalent number of spaces,
2907 (end-of-line)
2915 ;; line as C and shift remaining lines of expression the same
2920 beg end)
2928 (beginning-of-line)) ; FIXME!!! What is this here for? ACM 2005/10/31
2931 (setq end (point))
2935 (if (> end beg)
2936 (indent-code-rigidly beg end shift-amt "#")))
2964 end)
2971 (let (beg (end (point)))
2972 (while (and (setq beg (c-down-list-forward end))
2973 (setq end (c-up-list-forward beg))))
2980 (error "Cannot find start of balanced expression to indent"))
2982 (setq end (c-safe (scan-sexps (point) 1)))
2983 (if (not end)
2985 (error "Cannot find end of balanced expression to indent"))
2987 (if (< (point) end)
2988 (c-indent-region (point) end)))))
2994 In the macro case this also has the effect of realigning any line
3013 (defun c-indent-region (start end &optional quiet)
3019 (goto-char end)
3021 (setq end (point))
3024 (beginning-of-line)
3027 (beginning-of-line)
3029 (or (let ((endmark (copy-marker end))
3035 (save-excursion (c-beginning-of-macro)))
3041 (c-progress-init start end 'c-indent-region)
3049 (beginning-of-line)
3061 (if (progn (end-of-line)
3079 ;; Function version of the macro for use in places that aren't
3089 (c-indent-region (region-beginning) (region-end))
3097 (defun c-progress-init (start end context)
3106 ;; initialize the counter with a vector of:
3107 ;; [start end lastsec context]
3111 (goto-char end)
3123 (end (aref c-progress-info 1))
3130 (/ (* 100 (- (point) start)) (- end start)))
3147 ;;; This page handles insertion and removal of backslashes for C macros.
3150 "Insert, align, or delete end-of-line backslashes on the lines in the region.
3156 This function does not modify blank lines at the start of the region.
3157 If the region ends at the start of a line and the macro doesn't
3158 continue below it, the backslash (if any) at the end of the previous
3167 ;; position of point that tells the indentation of the line.
3173 column longest-line-col bs-col-after-end)
3191 ;; Set bs-col-after-end to the column of any backslash
3193 (setq bs-col-after-end
3194 (and (progn (end-of-line)
3197 (progn (end-of-line)
3205 (unless bs-col-after-end
3206 ;; Set bs-col-after-end to non-nil in any case, since we
3208 (setq bs-col-after-end t)))
3212 ;; Compute the smallest column number past the ends of all
3216 (if bs-col-after-end
3221 (end-of-line)
3229 (beginning-of-line)
3234 (beginning-of-line)
3240 (if (numberp bs-col-after-end)
3242 ;; Choose the greatest of them.
3243 (setq column (max column bs-col-after-end)))
3249 (if (numberp bs-col-after-end)
3250 (setq column bs-col-after-end))
3251 ;; Don't modify blank lines at start of region.
3271 (if bs-col-after-end
3281 (beginning-of-line)
3302 (let ((start (point)) (inserted nil) end col)
3303 (end-of-line)
3312 ;; Avoid unnecessary changes of the buffer.
3331 (setq end (point))
3336 (delete-region (point) end)
3343 ;; front of them.
3349 (end-of-line)
3372 (end-of-line)
3393 ;; of the text handling to the currently active mode for that
3397 ;; to it, there's quite a lot of special cases to handle which makes
3411 ;; comment. Return a cons of the prefix string and the column where
3413 ;; function also uses the value of point in some heuristics.
3424 prefix-line comment-prefix res comment-text-end)
3429 ;; Ugly way of getting the column after the fill
3443 comment-text-end (cdr lit-limits))
3445 (beginning-of-line)
3463 (goto-char (match-end 0))
3501 (setq comment-text-end
3507 (beginning-of-line)
3510 (eq (cdr lit-limits) (match-end 0)))))
3520 (eq (cdr lit-limits) (match-end 0)))
3522 (<= (1- (cdr lit-limits)) (match-end 0))))
3534 (/= (match-beginning 1) (match-end 1)))
3541 ;; it's better to force use of the prefix matched now.
3542 (if (= (match-end 0) (c-point 'eol))
3565 ;; (Looking for the presence of the comment closer
3566 ;; rarely works since it's probably the closer of
3585 ;; correct column and the correct mix of tabs and spaces.
3593 (goto-char (min (match-end 0)
3594 comment-text-end))
3600 ;; instead of what's ending comment-prefix.
3635 ;; prefix-line is the bol of a line on which we should try
3641 (<= (match-end 0) comment-text-end))
3642 (unless (eq (match-end 0) (c-point 'eol))
3645 (match-beginning 0) (match-end 0))
3646 (progn (goto-char (match-end 0))
3653 (match-beginning 0) (match-end 0))
3654 fb-endpos (match-end 0)))
3659 ;; so that we get the proper amount of whitespace
3665 (or (/= (match-end 1) (match-end 0))
3668 (and (= (match-beginning 1) (match-end 1))
3669 (/= (match-beginning 0) (match-end 0)))))
3713 (goto-char (match-end 0))
3769 ;; The position of point is then less significant when doing masking
3778 ;; beg and end limit the region to narrow. end is a marker.
3779 beg end
3781 ;; inserted at the start and end of the region. tmp-pre is a
3782 ;; cons of the positions of the prepended string. tmp-post is
3783 ;; a marker pointing to the single character of the appended
3787 ;; hanging. In that case it's set to the number of spaces
3790 ;; auto-fill-spaces is the exact sequence of whitespace between a
3798 ;; Restore point on undo. It's necessary since we do a lot of
3804 ;; Determine the limits and type of the containing literal (if any):
3805 ;; C-LIT-LIMITS, C-LIT-TYPE; and the limits of the current paragraph:
3823 (setq end (point-marker)))
3834 ;; For each of the possible types of text (string, C comment ...)
3836 ;; a literal, constrain BEG and END to the limits of this literal.
3838 ;; For some of these text types, particularly a block comment, we
3845 ;; Limit to the comment or paragraph end, whichever
3847 (set-marker end (min end (cdr c-lit-limits)))
3865 (or (> end (cdr c-lit-limits))
3866 (and (= end (cdr c-lit-limits))
3867 (eq (char-before end) ?/)
3868 (eq (char-before (1- end)) ?*)
3873 ;; company on the line, it keeps (at least one word of) it.
3879 (beginning-of-line)
3888 (set-marker end (c-point 'bol))))
3892 ;; FILL-PARAGRAPH is non-nil), or a row of x's the same width
3895 ;; afterwards. The effect of this is to glue the comment
3912 (set-marker end (point))
3914 (forward-line -1) ; last line of the comment
3918 (eq ender-start (match-end 0)))
3922 (setq spaces (- (match-end 1) (match-end 2)))
3947 (if sentence-end-double-space 2 1))
3958 ;; Point was in the middle of the string we
3960 ;; relative position, counting from the end.
3978 (when (>= end (cdr c-lit-limits))
3982 (set-marker end (point)))
3988 (1+ (match-end 0))
4000 (c-beginning-of-macro)
4001 (beginning-of-line)
4004 (c-end-of-macro)
4006 (if (< (point) end)
4007 (set-marker end (point))))))
4016 (c-forward-syntactic-ws end)
4017 (beginning-of-line)
4019 (goto-char end)
4022 (set-marker end (point))))))
4046 ;; with a number of 'x'.
4052 (goto-char (match-end 0))
4085 (or (fill-context-prefix beg end)
4091 ;; Save the relative position of point if it's outside the
4096 ((> (point) end) (- (point) end)))))
4102 (narrow-to-region beg end)
4108 (goto-char (+ end point-rel))))))))
4118 ;; Preserve point even if it's in the middle of the string
4132 (set-marker end nil))))
4136 If any of the current line is a comment or within a comment, fill the
4137 comment or the paragraph of it that point is in, preserving the
4148 A very long description of something that you want to fill to make
4184 nil, a new comment of the same type is started on the next line and
4250 ;; Some sort of comment.
4254 (end-of-line)
4264 (comment-text-end
4282 ;; lot of code pushes point to the */. We fix
4283 ;; this by never allowing point to end up to the
4284 ;; right of where it started.
4288 (if (and (> (point) comment-text-end)
4291 ;; The skip takes us out of the (block)
4295 (beginning-of-line)
4300 ;; Don't break in the middle of a comment starter
4302 (cond ((> (point) comment-text-end)
4303 (goto-char comment-text-end))
4310 ; middle of a TAB?
4313 (comment-end comment-end)
4317 (setq comment-start "/* " comment-end " */"))
4319 (setq comment-start "// " comment-end "")))
4324 (when (and comment-end (not (equal comment-end "")))
4326 (insert-and-inherit comment-end)
4337 ;; Do not clobber the alignment of the line continuation
4348 (beginning-of-line)
4378 When point is inside the content of a preprocessor directive, a line
4380 appropriately. The end of the cpp directive doesn't count as inside
4385 `c-block-comment-prefix' variables for details). The end of a
4404 (and (eq c-lit-type 'c++) ; C++ comment, but not at the very end of it.
4409 (and (numberp c-macro-start) ; Macro, but not at the very end of
4418 (goto-char (match-end 0)))