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

Lines Matching +defs:text +defs:properties +defs:at

14 ;; the Free Software Foundation; either version 2, or (at your option)
34 ;; 3. Indentation calculation stuff ("c-awk-NL-prop text-property").
126 ;; Matche (the tail of) a line containing at most either a comment or an
142 ;; at point.
152 ;; Matches a sequence of (at least one) \"harmless-line\" at point.
163 ;; Matches an AWK string at point up to, but not including, any terminator.
210 ;; whether a '/' at the current position would by a regexp opener or a
236 ;; apart from +,-,/,*,%. For the purpose at hand (detecting a / which is a
273 ;; result in a text-property, c-awk-NL-prop, whose value for a line is set on
278 ;; set property. (By contrast, the syntax-table text properties (set by an
282 ;; This text property is also used for "syntactic whitespace" movement, this
288 ;; '#' There is NO statement on this line (at most a comment), and no open
295 ;; '\' There is an escaped newline at the end of this line and this '\' is
329 (or (looking-at "\\(if\\|for\\)\\>\\([^_]\\|$\\)")
330 (and (looking-at "while\\>\\([^_]\\|$\\)") ; Ensure this isn't a do-while.
344 (and (looking-at "[_a-zA-Z][_a-zA-Z0-9]*\\>")
346 (looking-at "func\\(tion\\)?\\>"))))))))
356 (if (and (looking-at "[&|]") (not (bobp)))
358 (looking-at "[,{?:]\\|&&\\|||\\|do\\>\\|else\\>")))
372 (not (and (looking-at "(")
374 (looking-at "for\\>")))))))))
376 (defun c-awk-back-to-contentful-text-or-NL-prop ()
378 ;; the c-awk-NL-prop text-property set; or (ii) non-ws text; or (iii) BOB.
384 ;; Kludge: If c-backward-syntactic-ws gets stuck at a BOL, it is likely
395 (while ;; We are at a BOL here. Go back one line each iteration.
410 ;; If we had a backslash at EOL, c-backward-syntactic-ws will
413 (if (looking-at "[ \t]*\\\\+$")
417 "\\(^\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\$" ; ODD number of \s at EOL :-)
422 (end-of-line))) ; The \ at eol is a fake.
444 (nl-prop (c-awk-back-to-contentful-text-or-NL-prop)))
445 ;; We are either (1) at a BOL (with nl-prop containing the previous
446 ;; line's c-awk-NL-prop) or (2) after contentful text on a line. At
458 ((and (looking-at "[ \t]*\\\\$")
468 ;; We are now at a (possibly empty) sequence of content-free lines.
474 (if (not (looking-at "[ \t]*\\\\$")) (setq nl-prop ?\$)))
482 ;; Get the c-awk-NL-prop text-property from the previous line, calculating
483 ;; it if necessary. Return nil iff we're already at BOB.
493 ;; Get the c-awk-NL-prop text-property from the current line, calculating it
495 ;; empty line at EOB (there's no position to set the property on), but the
511 ;; Is there an incomplete statement at the end of the previous line?
518 ;; Is there an incomplete statement at the end of the current line?
533 (defun c-awk-at-vsemi-p (&optional pos)
534 ;; Is there a virtual semicolon at POS (or POINT)?
544 (looking-at c-awk-blank-or-comment-line-re)))
552 ;; starts at a `while' token.
557 ;; c-awk-NL-prop text property from beg to the end of the buffer (The END
564 (c-clear-char-properties beg (point-max) 'c-awk-NL-prop)))
567 ;; Ensure that the text property c-awk-NL-prop is "non-sticky". Without
571 (if (and (boundp 'text-property-default-nonsticky) ; doesn't exist in Xemacs
572 (not (assoc 'c-awk-NL-prop text-property-default-nonsticky)))
573 (setq text-property-default-nonsticky
574 (cons '(c-awk-NL-prop . t) text-property-default-nonsticky))))
599 ;; purpose of the function c-awk-set-syntax-table-properties and the myriad
653 (defun c-awk-set-string-regexp-syntax-table-properties (beg end)
656 ;; END. Set the appropriate syntax-table properties on the delimiters and
669 ;; First put the properties on the delimiters.
679 ;; Now change the properties of any escaped "s in the string to punctuation.
687 ;; Point is at the opening " or _" of a string. Set the syntax-table
688 ;; properties on this string, leaving point just after the string.
695 (c-awk-set-string-regexp-syntax-table-properties
697 (cond ((looking-at "\"")
700 ((looking-at "[\n\r]") ; Unterminated string with EOL.
703 (t nil))) ; Unterminated string at EOB
706 ;; Point is at a /. Determine whether this is a division sign or a regexp
707 ;; opener, and if the latter, apply syntax-table properties to the entire
711 ;; ANCHOR-STATE-/DIV identifies whether a / at ANCHOR would have been a
713 ;; we analyse the line from ANCHOR up till point to determine what the / at
731 (c-awk-set-string-regexp-syntax-table-properties
733 (cond ((looking-at "/") ; Terminating /
736 ((looking-at "[\n\r]") ; Incomplete regexp terminated by EOL
739 (t nil))))) ; Unterminated regexp at EOB
741 (defun c-awk-set-syntax-table-properties (lim)
742 ;; Scan the buffer text between point and LIM, setting (and clearing) the
763 ;; (iv) Inside a comment, all syntax-table properties are cleared.
769 (c-clear-char-properties (point) lim 'syntax-table)
778 ;; We are now looking at either a " or a /.
781 (if (looking-at "_?\"")
788 ;; the syntax-table properties even when font-lock isn't enabled, for the
799 ;; and clears c-awk-NL-prop text properties from this point onwards.
820 ;; AWK Mode. It ensures that the syntax-table properties get set in the
834 (c-awk-set-syntax-table-properties end)))))))
886 ;; , removing the unwanted \\< at the beginning, and finally filling out the
954 ;; that they assume the syntax-table properties have been set. They are thus
955 ;; not useful for code which sets these properties.
960 ;; Matches an unterminated string/regexp, NOT including the eol at the end.
966 (defun c-awk-at-statement-end-p ()
974 (or (looking-at "[};]")
976 (looking-at
987 of a defun is recognized as code starting at column zero which is neither a
989 in some other modes, having an opening brace at column 0 is neither necessary
993 comment at the start of cc-engine.el for more info."
1006 "^[^#} \t\n\r]" (point-min) 'stop-at-limit))
1013 "^[^#} \t\n\r]" (point-max) 'stop-at-limit))
1020 ;; Point is at the start of an AWK pattern (which may be null) or function
1022 ;; comment. Typically, we stop at the { which denotes the corresponding AWK
1023 ;; action/function body. Otherwise we stop at the EOL (or ;) marking the
1030 (if (looking-at "#") (end-of-line))
1033 ((looking-at "[{;]") nil) ; We've finished!
1040 ((looking-at "/") (forward-char) t))))) ; division sign.
1043 ;; point is at the start of a "defun". Move to its end. Return end position.
1048 ((looking-at "{") (goto-char (scan-sexps (point) 1)))
1049 ((looking-at ";") (forward-char))
1055 ;; Are we already at the beginning of a defun? (i.e. at code in column 0
1059 (and (looking-at "^[^#} \t\n\r]")
1067 opening brace at its start, or immediately after the AWK pattern when there is
1071 comment at the start of cc-engine.el for more info."
1078 ;; Strategy: (For +ve ARG): If we're not already at a beginning-of-defun,
1084 ;; Try to move back to a beginning-of-defun, if not already at one.
1088 (c-awk-beginning-of-defun -1))) ; if this fails, we're at EOB, tough!
1089 ;; Now count forward, one defun at a time