1740 |
;; If point-min has moved forward then we just need to cut |
;; If point-min has moved forward then we just need to cut |
1741 |
;; off a bit of the tail. |
;; off a bit of the tail. |
1742 |
(let ((ptr (cons nil c-state-cache)) elem) |
(let ((ptr (cons nil c-state-cache)) elem) |
1743 |
(while (and (setq elem (cdr ptr)) |
(while (and (setq elem (car-safe (cdr ptr))) |
1744 |
(>= (if (consp elem) (car elem) elem) |
(>= (if (consp elem) (car elem) elem) |
1745 |
(point-min))) |
(point-min))) |
1746 |
(setq ptr elem)) |
(setq ptr (cdr ptr))) |
1747 |
(when (consp ptr) |
(when (consp ptr) |
1748 |
(if (eq (cdr ptr) c-state-cache) |
(if (eq (cdr ptr) c-state-cache) |
1749 |
(setq c-state-cache nil) |
(setq c-state-cache nil) |
3499 |
(setq safe-pos (point))) |
(setq safe-pos (point))) |
3500 |
|
|
3501 |
((and (c-keyword-member kwd-sym 'c-nonsymbol-sexp-kwds) |
((and (c-keyword-member kwd-sym 'c-nonsymbol-sexp-kwds) |
3502 |
(not (looking-at c-symbol-start))) |
(not (looking-at c-symbol-start)) |
3503 |
(c-forward-sexp) |
(c-safe (c-forward-sexp) t)) |
3504 |
(c-forward-syntactic-ws) |
(c-forward-syntactic-ws) |
3505 |
(setq safe-pos (point)))) |
(setq safe-pos (point)))) |
3506 |
|
|
4251 |
(c-search-uplist-for-classkey paren-state)))) |
(c-search-uplist-for-classkey paren-state)))) |
4252 |
|
|
4253 |
(defun c-just-after-func-arglist-p (&optional lim) |
(defun c-just-after-func-arglist-p (&optional lim) |
4254 |
;; Return t if we are between a function's argument list closing |
;; Return non-nil if we are between a function's argument list closing |
4255 |
;; paren and its opening brace. Note that the list close brace |
;; paren and its opening brace. Note that the list close brace |
4256 |
;; could be followed by a "const" specifier or a member init hanging |
;; could be followed by a "const" specifier or a member init hanging |
4257 |
;; colon. LIM is used as bound for some backward buffer searches; |
;; colon. LIM is used as bound for some backward buffer searches; |
4299 |
(or (not (c-beginning-of-macro)) |
(or (not (c-beginning-of-macro)) |
4300 |
(and (c-forward-to-cpp-define-body) |
(and (c-forward-to-cpp-define-body) |
4301 |
(< (point) checkpoint))) |
(< (point) checkpoint))) |
4302 |
;; check if we are looking at an ObjC method def |
;; Check if we are looking at an ObjC method def or a class |
4303 |
(or (not c-opt-method-key) |
;; category. |
4304 |
(progn |
(not (and c-opt-method-key |
4305 |
(goto-char checkpoint) |
(progn |
4306 |
(c-forward-sexp -1) |
(goto-char checkpoint) |
4307 |
(forward-char -1) |
(c-safe (c-backward-sexp) t)) |
4308 |
(c-backward-syntactic-ws lim) |
(progn |
4309 |
(not (or (memq (char-before) '(?- ?+)) |
(c-backward-syntactic-ws lim) |
4310 |
;; or a class category |
(or (memq (char-before) '(?- ?+)) |
4311 |
(progn |
(and (c-safe (c-forward-sexp -2) t) |
4312 |
(c-forward-sexp -2) |
(looking-at c-class-key)))))) |
4313 |
(looking-at c-class-key)) |
;; Pike has compound types that include parens, |
4314 |
))))) |
;; e.g. "array(string)". Check that we aren't after one. |
4315 |
))) |
(not (and (c-major-mode-is 'pike-mode) |
4316 |
|
(progn |
4317 |
|
(goto-char checkpoint) |
4318 |
|
(c-safe (c-backward-sexp 2) t)) |
4319 |
|
(looking-at c-primitive-type-key))) |
4320 |
|
)))) |
4321 |
|
|
4322 |
(defun c-in-knr-argdecl (&optional lim) |
(defun c-in-knr-argdecl (&optional lim) |
4323 |
;; Return the position of the first argument declaration if point is |
;; Return the position of the first argument declaration if point is |