]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Eliminate compiler warning messages.
authorAlan Mackenzie <acm@muc.de>
Tue, 24 Nov 2015 22:20:47 +0000 (22:20 +0000)
committerAlan Mackenzie <acm@muc.de>
Tue, 24 Nov 2015 22:20:47 +0000 (22:20 +0000)
* lisp/progmodes/cc-mode.el (top level): remove compile time declaration of
`font-lock-syntactic-keywords' (which CC Mode doesn't use).
* lisp/progmodes/cc-awk.el (awk-mode-syntax-table)
(c-awk-set-syntax-table-properties): Clarify comments about
`font-lock-syntactic-keywords'.

* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-load): Create a dummy declaration
of this before the real (interpreted) one, to satisfy the byte compiler.

lisp/progmodes/cc-awk.el
lisp/progmodes/cc-bytecomp.el
lisp/progmodes/cc-mode.el

index 077a18cc5971f6104cbcf7b20e3102044a021764..19a95aad6764dbd61b6837324b0d8e69f4f2f07a 100644 (file)
@@ -72,7 +72,7 @@
     (modify-syntax-entry ?\# "<   " st)
     ;; / can delimit regexes or be a division operator.  By default we assume
     ;; that it is a division sign, and fix the regexp operator cases with
-    ;; `font-lock-syntactic-keywords'.
+    ;; `c-awk-set-syntax-table-properties'.
     (modify-syntax-entry ?/ "." st)     ; ACM 2002/4/27.
     (modify-syntax-entry ?* "." st)
     (modify-syntax-entry ?+ "." st)
 ;;     Scan the buffer text between point and LIM, setting (and clearing) the
 ;; syntax-table property where necessary.
 ;;
-;; This function is designed to be called as the FUNCTION in a MATCHER in
-;; font-lock-syntactic-keywords, and it always returns NIL (to inhibit
-;; repeated calls from font-lock: See elisp info page "Search-based
-;; Fontification").  It also gets called, with a bit of glue, from
-;; after-change-functions when font-lock isn't active.  Point is left
-;; "undefined" after this function exits.  THE BUFFER SHOULD HAVE BEEN
-;; WIDENED, AND ANY PRECIOUS MATCH-DATA SAVED BEFORE CALLING THIS ROUTINE.
+;; This function is designed to be called as the FUNCTION in a MATCHER
+;; in font-lock-syntactic-keywords, and it always returns NIL (to
+;; inhibit repeated calls from font-lock: See elisp info page
+;; "Search-based Fontification").  (2015-11-24: CC Mode doesn't use
+;; `font-lock-syntactic-keywords' and hasn't done for a very long
+;; time, if ever.  ACM.)  This function gets called, with a bit of
+;; glue, from after-change-functions whether or not font-lock is
+;; active.  Point is left "undefined" after this function exits.  THE
+;; BUFFER SHOULD HAVE BEEN WIDENED, AND ANY PRECIOUS MATCH-DATA SAVED
+;; BEFORE CALLING THIS ROUTINE.
 ;;
 ;; We need to set/clear the syntax-table property on:
 ;; (i) / - It is set to "string" on a / which is the opening or closing
index ab53c39fbde0d05218ad566a9900b38a02de86ac..1470b080264b9c99a1f844fc25175e1696ac8179 100644 (file)
@@ -252,6 +252,11 @@ perhaps a `cc-bytecomp-restore-environment' is forgotten somewhere"))
        (cc-bytecomp-debug-msg
         "cc-bytecomp-restore-environment: Done"))))
 
+(defun cc-bytecomp-load (cc-part)
+  ;; A dummy function which will immediately be overwritten by the
+  ;; following at load time.  This should suppress the byte compiler
+  ;; error that the function is "not known to be defined".
+)
 (eval
  ;; This eval is to avoid byte compilation of the function below.
  ;; There's some bug in XEmacs 21.4.6 that can cause it to dump core
index 37cae099635722bb35a2caf43af9002d7369b50a..5d8af2399727ac9c1192c75bb3c897622559b976 100644 (file)
 (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs
 (cc-bytecomp-defun run-mode-hooks)     ; Emacs 21.1
 
-;; We set these variables during mode init, yet we don't require
+;; We set this variable during mode init, yet we don't require
 ;; font-lock.
 (cc-bytecomp-defvar font-lock-defaults)
-(cc-bytecomp-defvar font-lock-syntactic-keywords)
 
 ;; Menu support for both XEmacs and Emacs.  If you don't have easymenu
 ;; with your version of Emacs, you are incompatible!