aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2015-11-24 22:20:47 +0000
committerAlan Mackenzie2015-11-24 22:20:47 +0000
commitfdc271fab057928d03407ac735c9415fc83247d5 (patch)
treef5e1b07bbc08f8720f84bb5f6baf7fae3c15ff81
parent0805069ae5709dc1b97f7349c4f9a7651f3078e3 (diff)
downloademacs-fdc271fab057928d03407ac735c9415fc83247d5.tar.gz
emacs-fdc271fab057928d03407ac735c9415fc83247d5.zip
CC Mode: Eliminate compiler warning messages.
* 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.
-rw-r--r--lisp/progmodes/cc-awk.el19
-rw-r--r--lisp/progmodes/cc-bytecomp.el5
-rw-r--r--lisp/progmodes/cc-mode.el3
3 files changed, 17 insertions, 10 deletions
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index 077a18cc597..19a95aad676 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -72,7 +72,7 @@
72 (modify-syntax-entry ?\# "< " st) 72 (modify-syntax-entry ?\# "< " st)
73 ;; / can delimit regexes or be a division operator. By default we assume 73 ;; / can delimit regexes or be a division operator. By default we assume
74 ;; that it is a division sign, and fix the regexp operator cases with 74 ;; that it is a division sign, and fix the regexp operator cases with
75 ;; `font-lock-syntactic-keywords'. 75 ;; `c-awk-set-syntax-table-properties'.
76 (modify-syntax-entry ?/ "." st) ; ACM 2002/4/27. 76 (modify-syntax-entry ?/ "." st) ; ACM 2002/4/27.
77 (modify-syntax-entry ?* "." st) 77 (modify-syntax-entry ?* "." st)
78 (modify-syntax-entry ?+ "." st) 78 (modify-syntax-entry ?+ "." st)
@@ -785,13 +785,16 @@
785;; Scan the buffer text between point and LIM, setting (and clearing) the 785;; Scan the buffer text between point and LIM, setting (and clearing) the
786;; syntax-table property where necessary. 786;; syntax-table property where necessary.
787;; 787;;
788;; This function is designed to be called as the FUNCTION in a MATCHER in 788;; This function is designed to be called as the FUNCTION in a MATCHER
789;; font-lock-syntactic-keywords, and it always returns NIL (to inhibit 789;; in font-lock-syntactic-keywords, and it always returns NIL (to
790;; repeated calls from font-lock: See elisp info page "Search-based 790;; inhibit repeated calls from font-lock: See elisp info page
791;; Fontification"). It also gets called, with a bit of glue, from 791;; "Search-based Fontification"). (2015-11-24: CC Mode doesn't use
792;; after-change-functions when font-lock isn't active. Point is left 792;; `font-lock-syntactic-keywords' and hasn't done for a very long
793;; "undefined" after this function exits. THE BUFFER SHOULD HAVE BEEN 793;; time, if ever. ACM.) This function gets called, with a bit of
794;; WIDENED, AND ANY PRECIOUS MATCH-DATA SAVED BEFORE CALLING THIS ROUTINE. 794;; glue, from after-change-functions whether or not font-lock is
795;; active. Point is left "undefined" after this function exits. THE
796;; BUFFER SHOULD HAVE BEEN WIDENED, AND ANY PRECIOUS MATCH-DATA SAVED
797;; BEFORE CALLING THIS ROUTINE.
795;; 798;;
796;; We need to set/clear the syntax-table property on: 799;; We need to set/clear the syntax-table property on:
797;; (i) / - It is set to "string" on a / which is the opening or closing 800;; (i) / - It is set to "string" on a / which is the opening or closing
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el
index ab53c39fbde..1470b080264 100644
--- a/lisp/progmodes/cc-bytecomp.el
+++ b/lisp/progmodes/cc-bytecomp.el
@@ -252,6 +252,11 @@ perhaps a `cc-bytecomp-restore-environment' is forgotten somewhere"))
252 (cc-bytecomp-debug-msg 252 (cc-bytecomp-debug-msg
253 "cc-bytecomp-restore-environment: Done")))) 253 "cc-bytecomp-restore-environment: Done"))))
254 254
255(defun cc-bytecomp-load (cc-part)
256 ;; A dummy function which will immediately be overwritten by the
257 ;; following at load time. This should suppress the byte compiler
258 ;; error that the function is "not known to be defined".
259)
255(eval 260(eval
256 ;; This eval is to avoid byte compilation of the function below. 261 ;; This eval is to avoid byte compilation of the function below.
257 ;; There's some bug in XEmacs 21.4.6 that can cause it to dump core 262 ;; There's some bug in XEmacs 21.4.6 that can cause it to dump core
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 37cae099635..5d8af239972 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -99,10 +99,9 @@
99(cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs 99(cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs
100(cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1 100(cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1
101 101
102;; We set these variables during mode init, yet we don't require 102;; We set this variable during mode init, yet we don't require
103;; font-lock. 103;; font-lock.
104(cc-bytecomp-defvar font-lock-defaults) 104(cc-bytecomp-defvar font-lock-defaults)
105(cc-bytecomp-defvar font-lock-syntactic-keywords)
106 105
107;; Menu support for both XEmacs and Emacs. If you don't have easymenu 106;; Menu support for both XEmacs and Emacs. If you don't have easymenu
108;; with your version of Emacs, you are incompatible! 107;; with your version of Emacs, you are incompatible!