emacs-diffs
[Top][All Lists]
Advanced

[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: Tue, 08 Jul 2003 19:21:05 -0400

Index: emacs/lisp/progmodes/cc-engine.el
diff -c emacs/lisp/progmodes/cc-engine.el:1.29 
emacs/lisp/progmodes/cc-engine.el:1.30
*** emacs/lisp/progmodes/cc-engine.el:1.29      Thu Jul  3 08:30:59 2003
--- emacs/lisp/progmodes/cc-engine.el   Tue Jul  8 19:21:04 2003
***************
*** 66,71 ****
--- 66,74 ----
  ;; positions, e.g. to improve speed and to eliminate glitches in
  ;; interactive refontification.
  ;;
+ ;; Note: This doc is for internal use only.  Other packages should not
+ ;; assume that these text properties are used as described here.
+ ;;
  ;; 'syntax-table
  ;;   Used to modify the syntax of some characters.  Currently used to
  ;;   mark the "<" and ">" of angle bracket parens with paren syntax.
***************
*** 509,518 ****
        ;; that we've moved.
        (while (progn
               (setq pos (point))
!              (c-backward-syntactic-ws) ; might go back an awk-mode virtual 
semicolon, here.
!                                         ; How about using c-awk-NL-prop for 
AWK Mode, here.
!                                         ; Something like 
c-awk-backward-syntactic-ws.
!                                         ; 2002/6/22.  Doesn't matter!  Leave 
it as it is.
               (/= (skip-chars-backward "-+!*&address@hidden") 0))) ; ACM, 
2002/5/31;
                                                          ; Make a variable in
                                                          ; cc-langs.el, maybe
--- 512,520 ----
        ;; that we've moved.
        (while (progn
               (setq pos (point))
!                (if (c-mode-is-new-awk-p)
!                    (c-awk-backward-syntactic-ws)
!                  (c-backward-syntactic-ws))
               (/= (skip-chars-backward "-+!*&address@hidden") 0))) ; ACM, 
2002/5/31;
                                                          ; Make a variable in
                                                          ; cc-langs.el, maybe
***************
*** 820,826 ****
        ;; Skip over the unary operators that can start the statement.
        (goto-char pos)
        (while (progn
!              (c-backward-syntactic-ws)
               (/= (skip-chars-backward "-+!*&address@hidden") 0)) ; Hopefully 
the # won't hurt awk.
        (setq pos (point)))
        (goto-char pos)
--- 822,830 ----
        ;; Skip over the unary operators that can start the statement.
        (goto-char pos)
        (while (progn
!              (if (c-mode-is-new-awk-p)
!                    (c-awk-backward-syntactic-ws)
!                  (c-backward-syntactic-ws))
               (/= (skip-chars-backward "-+!*&address@hidden") 0)) ; Hopefully 
the # won't hurt awk.
        (setq pos (point)))
        (goto-char pos)
***************
*** 2663,2669 ****
  
  (defalias 'c-in-literal
    (if (fboundp 'buffer-syntactic-context)
!     'c-fast-in-literal                  ; Xemacs
      'c-slow-in-literal))                ; GNU Emacs
  
  ;; The defalias above isn't enough to shut up the byte compiler.
--- 2667,2673 ----
  
  (defalias 'c-in-literal
    (if (fboundp 'buffer-syntactic-context)
!     'c-fast-in-literal                  ; XEmacs
      'c-slow-in-literal))                ; GNU Emacs
  
  ;; The defalias above isn't enough to shut up the byte compiler.
***************
*** 5422,5455 ****
       )))
  
  (defun c-guess-basic-syntax ()
!   "Return the syntactic context of the current line."
    (save-excursion
      (save-restriction
        (beginning-of-line)
!       (let* ((indent-point (point))
!            (case-fold-search nil)
!            (paren-state (c-parse-state))
!            literal containing-sexp char-before-ip char-after-ip lim
!            c-syntactic-context placeholder c-in-literal-cache step-type
!            tmpsymbol keyword injava-inher special-brace-list
!            ;; narrow out any enclosing class or extern "C" block
!            (inclass-p (c-narrow-out-enclosing-class paren-state
!                                                     indent-point))
!            ;; `c-state-cache' is shadowed here so that we don't
!            ;; throw it away due to the narrowing that might be done
!            ;; by the function above.  That means we must not do any
!            ;; changes during the execution of this function, since
!            ;; `c-invalidate-state-cache' then would change this local
!            ;; variable and leave a bogus value in the global one.
!            (c-state-cache (if inclass-p
!                               (c-whack-state-before (point-min) paren-state)
!                             paren-state))
!            (c-state-cache-start (point-min))
!            inenclosing-p macro-start in-macro-expr
!            ;; There's always at most one syntactic element which got
!            ;; a relpos.  It's stored in syntactic-relpos.
!            syntactic-relpos
!            (c-stmt-delim-chars c-stmt-delim-chars))
        ;; Check for meta top-level enclosing constructs such as
        ;; extern language definitions.
        (save-excursion
--- 5426,5461 ----
       )))
  
  (defun c-guess-basic-syntax ()
!   "Return the syntactic context of the current line.
! This function does not do any hidden buffer changes."
    (save-excursion
      (save-restriction
        (beginning-of-line)
!       (c-save-buffer-state
!         ((indent-point (point))
!          (case-fold-search nil)
!          (paren-state (c-parse-state))
!          literal containing-sexp char-before-ip char-after-ip lim
!          c-syntactic-context placeholder c-in-literal-cache step-type
!          tmpsymbol keyword injava-inher special-brace-list
!          ;; narrow out any enclosing class or extern "C" block
!          (inclass-p (c-narrow-out-enclosing-class paren-state
!                                                   indent-point))
!          ;; `c-state-cache' is shadowed here so that we don't
!          ;; throw it away due to the narrowing that might be done
!          ;; by the function above.  That means we must not do any
!          ;; changes during the execution of this function, since
!          ;; `c-invalidate-state-cache' then would change this local
!          ;; variable and leave a bogus value in the global one.
!          (c-state-cache (if inclass-p
!                             (c-whack-state-before (point-min) paren-state)
!                           paren-state))
!          (c-state-cache-start (point-min))
!          inenclosing-p macro-start in-macro-expr
!          ;; There's always at most one syntactic element which got
!          ;; a relpos.  It's stored in syntactic-relpos.
!          syntactic-relpos
!          (c-stmt-delim-chars c-stmt-delim-chars))
        ;; Check for meta top-level enclosing constructs such as
        ;; extern language definitions.
        (save-excursion




reply via email to

[Prev in Thread] Current Thread [Next in Thread]