From: Glenn Morris Date: Sat, 1 Jun 2013 18:19:29 +0000 (-0700) Subject: Plain fboundp silences compilation warnings since Emacs 22.1 X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~98 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=683853b9fee3000b974faf708b66ebc79ad26a25;p=emacs.git Plain fboundp silences compilation warnings since Emacs 22.1 * progmodes/cc-cmds.el (delete-forward-p): * progmodes/cc-defs.el (buffer-syntactic-context-depth): * progmodes/cc-engine.el (buffer-syntactic-context): * progmodes/cc-fonts.el (face-property-instance): * progmodes/cc-mode.el (set-keymap-parents): * progmodes/cc-vars.el (get-char-table): No need for cc-bytecomp-defun. * progmodes/cc-defs.el (c-set-region-active, c-beginning-of-defun-1) * progmodes/cc-mode.el (c-make-inherited-keymap): Use plain fboundp. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02182474b5f..35e1daddc41 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,15 @@ 2013-06-01 Glenn Morris + Plain fboundp silences compilation warnings since Emacs 22.1. + * progmodes/cc-cmds.el (delete-forward-p): + * progmodes/cc-defs.el (buffer-syntactic-context-depth): + * progmodes/cc-engine.el (buffer-syntactic-context): + * progmodes/cc-fonts.el (face-property-instance): + * progmodes/cc-mode.el (set-keymap-parents): + * progmodes/cc-vars.el (get-char-table): No need for cc-bytecomp-defun. + * progmodes/cc-defs.el (c-set-region-active, c-beginning-of-defun-1) + * progmodes/cc-mode.el (c-make-inherited-keymap): Use plain fboundp. + * progmodes/cc-vars.el (other): Emacs has this widget since at least 21.1, so don't (re)define it. diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 0bb804799dc..dc6ed1348d1 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -45,7 +45,6 @@ (cc-require 'cc-engine) ;; Silence the compiler. -(cc-bytecomp-defun delete-forward-p) ; XEmacs (cc-bytecomp-defvar filladapt-mode) ; c-fill-paragraph contains a kludge ; which looks at this. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index e7f96767675..7933324816a 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -48,7 +48,6 @@ ;; 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 @@ -334,6 +333,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 +344,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) @@ -707,9 +708,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 diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 6a23da1f2cd..b0c0bfd7bde 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -147,9 +147,6 @@ (cc-require-when-compile 'cc-langs) (cc-require 'cc-vars) -;; Silence the compiler. -(cc-bytecomp-defun buffer-syntactic-context) ; XEmacs - ;; Make declarations for all the `c-lang-defvar' variables in cc-langs. diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 83343b23014..6a4bfd9e875 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -176,7 +176,6 @@ 'font-lock-negation-char-face)) (cc-bytecomp-defun face-inverse-video-p) ; Only in Emacs. -(cc-bytecomp-defun face-property-instance) ; Only in XEmacs. (defun c-make-inverse-face (oldface newface) ;; Emacs and XEmacs have completely different face manipulation diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index ca8c5096b09..36c9f72fa18 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -97,7 +97,6 @@ ;; Silence the compiler. (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs -(cc-bytecomp-defun set-keymap-parents) ; XEmacs (cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1 ;; We set these variables during mode init, yet we don't require @@ -212,7 +211,7 @@ control). See \"cc-mode.el\" for more info." ((cc-bytecomp-fboundp 'set-keymap-parent) (set-keymap-parent map c-mode-base-map)) ;; XEmacs - ((cc-bytecomp-fboundp 'set-keymap-parents) + ((fboundp 'set-keymap-parents) (set-keymap-parents map c-mode-base-map)) ;; incompatible (t (error "CC Mode is incompatible with this version of Emacs"))) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 7a9181db716..c89402c63a3 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -42,9 +42,6 @@ (cc-require 'cc-defs) -;; Silence the compiler. -(cc-bytecomp-defun get-char-table) ; XEmacs - (cc-eval-when-compile (require 'custom) (require 'widget))