[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el
From: |
Martin Stjernholm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el |
Date: |
Wed, 24 Sep 2003 09:55:24 -0400 |
Index: emacs/lisp/progmodes/cc-engine.el
diff -c emacs/lisp/progmodes/cc-engine.el:1.35
emacs/lisp/progmodes/cc-engine.el:1.36
*** emacs/lisp/progmodes/cc-engine.el:1.35 Mon Sep 1 11:45:34 2003
--- emacs/lisp/progmodes/cc-engine.el Wed Sep 24 09:55:23 2003
***************
*** 1740,1749 ****
;; If point-min has moved forward then we just need to cut
;; off a bit of the tail.
(let ((ptr (cons nil c-state-cache)) elem)
! (while (and (setq elem (cdr ptr))
(>= (if (consp elem) (car elem) elem)
(point-min)))
! (setq ptr elem))
(when (consp ptr)
(if (eq (cdr ptr) c-state-cache)
(setq c-state-cache nil)
--- 1740,1749 ----
;; If point-min has moved forward then we just need to cut
;; off a bit of the tail.
(let ((ptr (cons nil c-state-cache)) elem)
! (while (and (setq elem (car-safe (cdr ptr)))
(>= (if (consp elem) (car elem) elem)
(point-min)))
! (setq ptr (cdr ptr)))
(when (consp ptr)
(if (eq (cdr ptr) c-state-cache)
(setq c-state-cache nil)
***************
*** 3499,3506 ****
(setq safe-pos (point)))
((and (c-keyword-member kwd-sym 'c-nonsymbol-sexp-kwds)
! (not (looking-at c-symbol-start)))
! (c-forward-sexp)
(c-forward-syntactic-ws)
(setq safe-pos (point))))
--- 3499,3506 ----
(setq safe-pos (point)))
((and (c-keyword-member kwd-sym 'c-nonsymbol-sexp-kwds)
! (not (looking-at c-symbol-start))
! (c-safe (c-forward-sexp) t))
(c-forward-syntactic-ws)
(setq safe-pos (point))))
***************
*** 4251,4257 ****
(c-search-uplist-for-classkey paren-state))))
(defun c-just-after-func-arglist-p (&optional lim)
! ;; Return t if we are between a function's argument list closing
;; paren and its opening brace. Note that the list close brace
;; could be followed by a "const" specifier or a member init hanging
;; colon. LIM is used as bound for some backward buffer searches;
--- 4251,4257 ----
(c-search-uplist-for-classkey paren-state))))
(defun c-just-after-func-arglist-p (&optional lim)
! ;; Return non-nil if we are between a function's argument list closing
;; paren and its opening brace. Note that the list close brace
;; could be followed by a "const" specifier or a member init hanging
;; colon. LIM is used as bound for some backward buffer searches;
***************
*** 4299,4318 ****
(or (not (c-beginning-of-macro))
(and (c-forward-to-cpp-define-body)
(< (point) checkpoint)))
! ;; check if we are looking at an ObjC method def
! (or (not c-opt-method-key)
! (progn
! (goto-char checkpoint)
! (c-forward-sexp -1)
! (forward-char -1)
! (c-backward-syntactic-ws lim)
! (not (or (memq (char-before) '(?- ?+))
! ;; or a class category
! (progn
! (c-forward-sexp -2)
! (looking-at c-class-key))
! )))))
! )))
(defun c-in-knr-argdecl (&optional lim)
;; Return the position of the first argument declaration if point is
--- 4299,4323 ----
(or (not (c-beginning-of-macro))
(and (c-forward-to-cpp-define-body)
(< (point) checkpoint)))
! ;; Check if we are looking at an ObjC method def or a class
! ;; category.
! (not (and c-opt-method-key
! (progn
! (goto-char checkpoint)
! (c-safe (c-backward-sexp) t))
! (progn
! (c-backward-syntactic-ws lim)
! (or (memq (char-before) '(?- ?+))
! (and (c-safe (c-forward-sexp -2) t)
! (looking-at c-class-key))))))
! ;; Pike has compound types that include parens,
! ;; e.g. "array(string)". Check that we aren't after one.
! (not (and (c-major-mode-is 'pike-mode)
! (progn
! (goto-char checkpoint)
! (c-safe (c-backward-sexp 2) t))
! (looking-at c-primitive-type-key)))
! ))))
(defun c-in-knr-argdecl (&optional lim)
;; Return the position of the first argument declaration if point is