1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/commits/1cb41dd76195/
Changeset: 1cb41dd76195
User: acm
Date: 2017-07-06 18:13:43+00:00
Summary: CC Mode: create and use c-set-keymap-parent.
* cc-defs.el (c-set-keymap-parent): New macro.
* cc-mode.el (top-level): Remove cc-bytecomp-defun for set-keymap-parents.
(c-make-inherited-keymap): Use c-set-keymap-parent in place of inline code.
Affected #: 2 files
diff -r 618a98937a7827c32fb478de7d58465361c2fd75 -r
1cb41dd76195ca670735e07ad2efdb602d7bb3af cc-defs.el
--- a/cc-defs.el
+++ b/cc-defs.el
@@ -401,6 +401,17 @@
;; Emacs.
`(setq mark-active ,activate)))
+(defmacro c-set-keymap-parent (map parent)
+ (cond
+ ;; XEmacs
+ ((cc-bytecomp-fboundp 'set-keymap-parents)
+ `(set-keymap-parents ,map ,parent))
+ ;; Emacs
+ ((cc-bytecomp-fboundp 'set-keymap-parent)
+ `(set-keymap-parent ,map ,parent))
+ ;; incompatible
+ (t (error "CC Mode is incompatible with this version of Emacs"))))
+
(defmacro c-delete-and-extract-region (start end)
"Delete the text between START and END and return it."
(if (cc-bytecomp-fboundp 'delete-and-extract-region)
@@ -1268,6 +1279,7 @@
(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-set-keymap-parent t)
(def-edebug-spec c-safe t)
(def-edebug-spec c-save-buffer-state let*)
(def-edebug-spec c-tentative-buffer-changes t)
diff -r 618a98937a7827c32fb478de7d58465361c2fd75 -r
1cb41dd76195ca670735e07ad2efdb602d7bb3af cc-mode.el
--- a/cc-mode.el
+++ b/cc-mode.el
@@ -95,7 +95,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
(cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1.
(cc-bytecomp-defvar normal-erase-is-backspace)
@@ -214,18 +213,7 @@
(defun c-make-inherited-keymap ()
(let ((map (make-sparse-keymap)))
- ;; Necessary to use `cc-bytecomp-fboundp' below since this
- ;; function is called from top-level forms that are evaluated
- ;; while cc-bytecomp is active when one does M-x eval-buffer.
- (cond
- ;; XEmacs
- ((cc-bytecomp-fboundp 'set-keymap-parents)
- (set-keymap-parents map c-mode-base-map))
- ;; Emacs
- ((cc-bytecomp-fboundp 'set-keymap-parent)
- (set-keymap-parent map c-mode-base-map))
- ;; incompatible
- (t (error "CC Mode is incompatible with this version of Emacs")))
+ (c-set-keymap-parent map c-mode-base-map)
map))
(defun c-define-abbrev-table (name defs)
Repository URL:
https://bitbucket.org/xemacs/cc-mode/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.