* lisp/emacs-lisp/package.el (package-desc-keywords): New function.
[bpt/emacs.git] / lisp / progmodes / cc-defs.el
index 78c3f32..e6b6911 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cc-defs.el --- compile time definitions for CC Mode
 
-;; Copyright (C) 1985, 1987, 1992-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2014 Free Software Foundation, Inc.
 
 ;; Authors:    2003- Alan Mackenzie
 ;;             1998- Martin Stjernholm
 
 ;; Silence the compiler.
 (cc-bytecomp-defvar c-enable-xemacs-performance-kludge-p) ; In cc-vars.el
-(cc-bytecomp-defun buffer-syntactic-context-depth) ; XEmacs
 (cc-bytecomp-defun region-active-p)    ; XEmacs
-(cc-bytecomp-defvar zmacs-region-stays)        ; XEmacs
-(cc-bytecomp-defvar zmacs-regions)     ; XEmacs
 (cc-bytecomp-defvar mark-active)       ; Emacs
 (cc-bytecomp-defvar deactivate-mark)   ; Emacs
 (cc-bytecomp-defvar inhibit-point-motion-hooks) ; Emacs
 (cc-bytecomp-defvar parse-sexp-lookup-properties) ; Emacs
 (cc-bytecomp-defvar text-property-default-nonsticky) ; Emacs 21
-(cc-bytecomp-defvar lookup-syntax-properties) ; XEmacs
 (cc-bytecomp-defun string-to-syntax)   ; Emacs 21
 
 \f
@@ -93,7 +89,7 @@
 \f
 ;;; Variables also used at compile time.
 
-(defconst c-version "5.32.4"
+(defconst c-version "5.32.5"
   "CC Mode version number.")
 
 (defconst c-version-sym (intern c-version))
@@ -334,6 +330,8 @@ to it is returned.  This function does not modify the point or the mark."
 (defmacro c-region-is-active-p ()
   ;; Return t when the region is active.  The determination of region
   ;; activeness is different in both Emacs and XEmacs.
+  ;; FIXME? Emacs has region-active-p since 23.1, so maybe this test
+  ;; should be updated.
   (if (cc-bytecomp-boundp 'mark-active)
       ;; Emacs.
       'mark-active
@@ -343,7 +341,7 @@ to it is returned.  This function does not modify the point or the mark."
 (defmacro c-set-region-active (activate)
   ;; Activate the region if ACTIVE is non-nil, deactivate it
   ;; otherwise.  Covers the differences between Emacs and XEmacs.
-  (if (cc-bytecomp-fboundp 'zmacs-activate-region)
+  (if (fboundp 'zmacs-activate-region)
       ;; XEmacs.
       `(if ,activate
           (zmacs-activate-region)
@@ -376,6 +374,13 @@ to it is returned.  This function does not modify the point or the mark."
       `(int-to-char ,integer)
     integer))
 
+(defmacro c-last-command-char ()
+  ;; The last character just typed.  Note that `last-command-event' exists in
+  ;; both Emacs and XEmacs, but with confusingly different meanings.
+  (if (featurep 'xemacs)
+      'last-command-char
+    'last-command-event))
+
 (defmacro c-sentence-end ()
   ;; Get the regular expression `sentence-end'.
   (if (cc-bytecomp-fboundp 'sentence-end)
@@ -700,9 +705,9 @@ be after it."
   ;; `c-parse-state'.
 
   `(progn
-     (if (and ,(cc-bytecomp-fboundp 'buffer-syntactic-context-depth)
+     (if (and ,(fboundp 'buffer-syntactic-context-depth)
              c-enable-xemacs-performance-kludge-p)
-        ,(when (cc-bytecomp-fboundp 'buffer-syntactic-context-depth)
+        ,(when (fboundp 'buffer-syntactic-context-depth)
            ;; XEmacs only.  This can improve the performance of
            ;; c-parse-state to between 3 and 60 times faster when
            ;; braces are hung.  It can also degrade performance by
@@ -1132,7 +1137,7 @@ been put there by c-put-char-property.  POINT remains unchanged."
 ;; Make edebug understand the macros.
 ;(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 cc-eval-when-compile (&rest def-form))
 (def-edebug-spec c-point t)
 (def-edebug-spec c-set-region-active t)
 (def-edebug-spec c-safe t)
@@ -1599,7 +1604,7 @@ non-nil, a caret is prepended to invert the set."
     (let ((buf (generate-new-buffer " test"))
          parse-sexp-lookup-properties
          parse-sexp-ignore-comments
-         lookup-syntax-properties)
+         lookup-syntax-properties)     ; XEmacs
       (with-current-buffer buf
        (set-syntax-table (make-syntax-table))