]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cc-defs.el
(ido-enable-prefix): Improve previous doc fix.
[gnu-emacs] / lisp / progmodes / cc-defs.el
index b68e167ffa01d4ee52272bbcd747368eea492cef..ecad9174e57c13610cdcab59d1435de3be2aceb4 100644 (file)
@@ -1,7 +1,7 @@
 ;;; cc-defs.el --- compile time definitions for CC Mode
 
-;; Copyright (C) 1985,1987,1992-2003, 2004, 2005 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1985,1987,1992-2003, 2004, 2005, 2006 Free Software
+;; Foundation, Inc.
 
 ;; Authors:    1998- Martin Stjernholm
 ;;             1992-1999 Barry A. Warsaw
          (not (fboundp 'push)))
       (cc-load "cc-fix")))
 
-(eval-after-load "font-lock"
-  '(if (and (not (featurep 'cc-fix)) ; only load the file once.
+; (eval-after-load "font-lock"  ; 2006-07-09.  font-lock is now preloaded
+;   '
+(if (and (not (featurep 'cc-fix)) ; only load the file once.
+           (featurep 'xemacs) ; There is now (2005/12) code in GNU Emacs CVS
+                              ; to make the call to f-l-c-k throw an error.
             (let (font-lock-keywords)
               (font-lock-compile-keywords '("\\<\\>"))
              font-lock-keywords))     ; did the previous call foul this up?
-       (load "cc-fix")))
+       (load "cc-fix")) ;)
 
 ;; The above takes care of the delayed loading, but this is necessary
 ;; to ensure correct byte compilation.
 (eval-when-compile
   (if (and (not (featurep 'cc-fix))
+          (featurep 'xemacs)
           (progn
             (require 'font-lock)
             (let (font-lock-keywords)
@@ -90,7 +94,7 @@
 \f
 ;;; Variables also used at compile time.
 
-(defconst c-version "5.31"
+(defconst c-version "5.31.3"
   "CC Mode version number.")
 
 (defconst c-version-sym (intern c-version))
@@ -1031,35 +1035,35 @@ MODE is either a mode symbol or a list of mode symbols."
 
 \f
 ;; Make edebug understand the macros.
-(eval-after-load "edebug"
-  '(progn
-     (def-edebug-spec cc-eval-when-compile t)
-     (def-edebug-spec c-point t)
-     (def-edebug-spec c-set-region-active t)
-     (def-edebug-spec c-safe t)
-     (def-edebug-spec c-save-buffer-state let*)
-     (def-edebug-spec c-tentative-buffer-changes t)
-     (def-edebug-spec c-forward-syntactic-ws t)
-     (def-edebug-spec c-backward-syntactic-ws t)
-     (def-edebug-spec c-forward-sexp t)
-     (def-edebug-spec c-backward-sexp t)
-     (def-edebug-spec c-up-list-forward t)
-     (def-edebug-spec c-up-list-backward t)
-     (def-edebug-spec c-down-list-forward t)
-     (def-edebug-spec c-down-list-backward t)
-     (def-edebug-spec c-add-syntax t)
-     (def-edebug-spec c-add-class-syntax t)
-     (def-edebug-spec c-benign-error t)
-     (def-edebug-spec c-with-syntax-table t)
-     (def-edebug-spec c-skip-ws-forward t)
-     (def-edebug-spec c-skip-ws-backward t)
-     (def-edebug-spec c-major-mode-is t)
-     (def-edebug-spec c-put-char-property t)
-     (def-edebug-spec c-get-char-property t)
-     (def-edebug-spec c-clear-char-property t)
-     (def-edebug-spec c-clear-char-properties t)
-     (def-edebug-spec c-put-overlay t)
-     (def-edebug-spec c-delete-overlay t)))
+;(eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
+;  '(progn
+(def-edebug-spec cc-eval-when-compile t)
+(def-edebug-spec c-point t)
+(def-edebug-spec c-set-region-active t)
+(def-edebug-spec c-safe t)
+(def-edebug-spec c-save-buffer-state let*)
+(def-edebug-spec c-tentative-buffer-changes t)
+(def-edebug-spec c-forward-syntactic-ws t)
+(def-edebug-spec c-backward-syntactic-ws t)
+(def-edebug-spec c-forward-sexp t)
+(def-edebug-spec c-backward-sexp t)
+(def-edebug-spec c-up-list-forward t)
+(def-edebug-spec c-up-list-backward t)
+(def-edebug-spec c-down-list-forward t)
+(def-edebug-spec c-down-list-backward t)
+(def-edebug-spec c-add-syntax t)
+(def-edebug-spec c-add-class-syntax t)
+(def-edebug-spec c-benign-error t)
+(def-edebug-spec c-with-syntax-table t)
+(def-edebug-spec c-skip-ws-forward t)
+(def-edebug-spec c-skip-ws-backward t)
+(def-edebug-spec c-major-mode-is t)
+(def-edebug-spec c-put-char-property t)
+(def-edebug-spec c-get-char-property t)
+(def-edebug-spec c-clear-char-property t)
+(def-edebug-spec c-clear-char-properties t)
+(def-edebug-spec c-put-overlay t)
+(def-edebug-spec c-delete-overlay t) ;))
 
 \f
 ;;; Functions.
@@ -1400,11 +1404,11 @@ non-nil, a caret is prepended to invert the set."
        (modify-syntax-entry ?< ".")
        (modify-syntax-entry ?> ".")
        (insert "<()>")
-       (c-mark-<-as-paren 1)
-       (c-mark->-as-paren 4)
-       (goto-char 1)
+       (c-mark-<-as-paren (point-min))
+       (c-mark->-as-paren (+ 3 (point-min)))
+       (goto-char (point-min))
        (c-forward-sexp)
-       (if (= (point) 5)
+       (if (= (point) (+ 4 (point-min)))
            (setq list (cons 'syntax-properties list))
          (error (concat
                  "CC Mode is incompatible with this version of Emacs - "
@@ -1464,7 +1468,8 @@ non-nil, a caret is prepended to invert the set."
       (kill-buffer buf))
 
     ;; See if `parse-partial-sexp' returns the eighth element.
-    (if (c-safe (>= (length (save-excursion (parse-partial-sexp 1 1))) 10))
+    (if (c-safe (>= (length (save-excursion (parse-partial-sexp (point) (point))))
+                   10))
        (setq list (cons 'pps-extended-state list))
       (error (concat
              "CC Mode is incompatible with this version of Emacs - "
@@ -1734,9 +1739,10 @@ constant.  A file is identified by its base name."
                               ,@(and pre-files `(',pre-files))))))
 
 (put 'c-lang-defconst 'lisp-indent-function 1)
-(eval-after-load "edebug"
-  '(def-edebug-spec c-lang-defconst
-     (&define name [&optional stringp] [&rest sexp def-form])))
+;(eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
+;  '
+(def-edebug-spec c-lang-defconst
+  (&define name [&optional stringp] [&rest sexp def-form]))
 
 (defun c-define-lang-constant (name bindings &optional pre-files)
   ;; Used by `c-lang-defconst'.