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-langs.el


From: Martin Stjernholm
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el
Date: Tue, 26 Aug 2003 07:52:40 -0400

Index: emacs/lisp/progmodes/cc-langs.el
diff -c emacs/lisp/progmodes/cc-langs.el:1.25 
emacs/lisp/progmodes/cc-langs.el:1.26
*** emacs/lisp/progmodes/cc-langs.el:1.25       Wed Jul 16 16:54:19 2003
--- emacs/lisp/progmodes/cc-langs.el    Tue Aug 26 07:52:40 2003
***************
*** 544,549 ****
--- 544,558 ----
           '("defined"))
    pike '("defined" "efun" "constant"))
  
+ (c-lang-defconst c-assignment-operators
+   "List of all assignment operators."
+   t    '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|=")
+   java (append (c-lang-const c-assignment-operators)
+              '(">>>="))
+   c++  (append (c-lang-const c-assignment-operators)
+              '("and_eq" "or_eq" "xor_eq"))
+   idl  nil)
+ 
  (c-lang-defconst c-operators
    "List describing all operators, along with their precedence and
  associativity.  The order in the list corresponds to the precedence of
***************
*** 686,696 ****
        (right-assoc-sequence "?" ":")
  
        ;; Assignment.
!       (right-assoc "=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|="
!                  ,@(when (c-major-mode-is 'java-mode)
!                      '(">>>="))
!                  ,@(when (c-major-mode-is 'c++-mode)
!                      '("and_eq" "or_eq" "xor_eq")))
  
        ;; Exception.
        ,@(when (c-major-mode-is 'c++-mode)
--- 695,701 ----
        (right-assoc-sequence "?" ":")
  
        ;; Assignment.
!       (right-assoc ,@(c-lang-const c-assignment-operators))
  
        ;; Exception.
        ,@(when (c-major-mode-is 'c++-mode)
***************
*** 788,793 ****
--- 793,815 ----
  (c-lang-defvar c-nonsymbol-token-regexp
    (c-lang-const c-nonsymbol-token-regexp))
  
+ (c-lang-defconst c-assignment-op-regexp
+   ;; Regexp matching all assignment operators and only them.  The
+   ;; beginning of the first submatch is used to detect the end of the
+   ;; token, along with the end of the whole match.
+   t (if (c-lang-const c-assignment-operators)
+       (concat
+        ;; Need special case for "=" since it's a prefix of "==".
+        "=\\([^=]\\|$\\)"
+        "\\|"
+        (c-make-keywords-re nil
+          (set-difference (c-lang-const c-assignment-operators)
+                          '("=")
+                          :test 'string-equal)))
+       "\\<\\>"))
+ (c-lang-defvar c-assignment-op-regexp
+   (c-lang-const c-assignment-op-regexp))
+ 
  (c-lang-defconst c-<-op-cont-regexp
    ;; Regexp matching the second and subsequent characters of all
    ;; multicharacter tokens that begin with "<".
***************
*** 1441,1447 ****
  
  (c-lang-defconst c-opt-<>-sexp-key
    ;; Adorned regexp matching keywords that can be followed by an angle
!   ;; bracket sexp.
    t (if (c-lang-const c-recognize-<>-arglists)
        (c-make-keywords-re t (c-lang-const c-<>-sexp-kwds))))
  (c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key))
--- 1463,1469 ----
  
  (c-lang-defconst c-opt-<>-sexp-key
    ;; Adorned regexp matching keywords that can be followed by an angle
!   ;; bracket sexp.  Always set when `c-recognize-<>-arglists' is.
    t (if (c-lang-const c-recognize-<>-arglists)
        (c-make-keywords-re t (c-lang-const c-<>-sexp-kwds))))
  (c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key))




reply via email to

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