[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xelb 9a0612c 41/42: Fix remaining compile warnings
From: |
Chris Feng |
Subject: |
[elpa] externals/xelb 9a0612c 41/42: Fix remaining compile warnings |
Date: |
Thu, 17 Sep 2015 23:16:52 +0000 |
branch: externals/xelb
commit 9a0612c905ec74aff1627f1cc290f7014bd42f23
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Fix remaining compile warnings
* el_client.el (parse): remove a warning concerning pp-escape-newlines
* xcb_types.el: remove warnings about the backward-compatible code
* xcb.el: autoload xcb:connection and xcb:-error-or-event-class->number
---
el_client.el | 1 +
xcb-types.el | 44 +++++++++++++++++++++++---------------------
xcb.el | 2 ++
3 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/el_client.el b/el_client.el
index d9b81c3..b662caa 100644
--- a/el_client.el
+++ b/el_client.el
@@ -116,6 +116,7 @@ an `xelb-auto-padding' attribute."
"Parse an XCB protocol description file FILE (XML)."
(let ((pp-escape-newlines nil) ;do not escape newlines
result header)
+ (cl-assert (not pp-escape-newlines)) ;only to remove a compile warning
(with-temp-buffer
(insert-file-contents file)
(setq result (libxml-parse-xml-region (point-min) (point-max) nil t))
diff --git a/xcb-types.el b/xcb-types.el
index e093e7a..5233c54 100644
--- a/xcb-types.el
+++ b/xcb-types.el
@@ -56,27 +56,29 @@
;; The `cl-generic' package on ELPA does not solve all problems
-(unless (fboundp 'cl-defmethod)
- (defalias 'cl-defmethod 'defmethod))
-
-(unless (fboundp 'cl-call-next-method)
- (defalias 'cl-call-next-method 'call-next-method))
-
-(unless (fboundp 'eieio-class-slots)
- (defun eieio-class-slots (class)
- (let* ((tmp (class-v class))
- (names (eieio--class-public-a tmp))
- (initforms (eieio--class-public-d tmp))
- (types (eieio--class-public-type tmp))
- result)
- (dotimes (i (length names))
- (setq result (nconc result (list (vector (elt names i)
- (elt initforms i)
- (elt types i))))))
- result))
- (defsubst cl--slot-descriptor-name (slot) (aref slot 0))
- (defsubst cl--slot-descriptor-initform (slot) (aref slot 1))
- (defsubst cl--slot-descriptor-type (slot) (aref slot 2)))
+(eval-and-compile
+ (unless (fboundp 'cl-defmethod)
+ (defalias 'cl-defmethod 'defmethod))
+
+ (unless (fboundp 'cl-call-next-method)
+ (defalias 'cl-call-next-method 'call-next-method))
+
+ (unless (fboundp 'eieio-class-slots)
+ (eval-and-compile
+ (defun eieio-class-slots (class)
+ (let* ((tmp (class-v class))
+ (names (eieio--class-public-a tmp))
+ (initforms (eieio--class-public-d tmp))
+ (types (eieio--class-public-type tmp))
+ result)
+ (dotimes (i (length names))
+ (setq result (nconc result (list (vector (elt names i)
+ (elt initforms i)
+ (elt types i))))))
+ result))
+ (defsubst cl--slot-descriptor-name (slot) (aref slot 0))
+ (defsubst cl--slot-descriptor-initform (slot) (aref slot 1))
+ (defsubst cl--slot-descriptor-type (slot) (aref slot 2)))))
;;;; Utility functions
diff --git a/xcb.el b/xcb.el
index eaa1c76..8f96c5d 100644
--- a/xcb.el
+++ b/xcb.el
@@ -72,6 +72,7 @@
;;;; X connection related
+;;;###autoload
(defclass xcb:connection ()
((process :initarg :process)
(connected :initform nil) ;non-nil indicates connected to X server
@@ -636,6 +637,7 @@ Sync by sending a GetInputFocus request and waiting until
it's processed."
(accept-process-output process 1 nil 1)))
(cl-decf (slot-value obj 'event-lock))))
+;;;###autoload
(cl-defmethod xcb:-error-or-event-class->number ((obj xcb:connection) class)
"Return the error/event number of a error/event class CLASS."
(unless (symbolp class) (setq class (eieio-class-name class)))
- [elpa] externals/xelb f655ec9 27/42: Merge pull request #2 from pipcet/data-offset, (continued)
- [elpa] externals/xelb f655ec9 27/42: Merge pull request #2 from pipcet/data-offset, Chris Feng, 2015/09/17
- [elpa] externals/xelb 4621160 30/42: Move generated libraries to lib/, Chris Feng, 2015/09/17
- [elpa] externals/xelb 846f4c0 33/42: Fix race conditions, Chris Feng, 2015/09/17
- [elpa] externals/xelb 81c699f 37/42: Protect process-send-string, Chris Feng, 2015/09/17
- [elpa] externals/xelb 41cca58 35/42: Fix compiling issues, Chris Feng, 2015/09/17
- [elpa] externals/xelb 8215991 39/42: Add a missing function key, Chris Feng, 2015/09/17
- [elpa] externals/xelb f5a7ca9 42/42: Minor fix, Chris Feng, 2015/09/17
- [elpa] externals/xelb ae7da13 40/42: Add support for XF86 keysyms, Chris Feng, 2015/09/17
- [elpa] externals/xelb b8f3029 36/42: Flatten directory structure, Chris Feng, 2015/09/17
- [elpa] externals/xelb 5a74daa 32/42: Generate implicit paddings at compile time, Chris Feng, 2015/09/17
- [elpa] externals/xelb 9a0612c 41/42: Fix remaining compile warnings,
Chris Feng <=
- [elpa] externals/xelb 2edbaa0 38/42: Code cleanups, Chris Feng, 2015/09/17
- [elpa] externals/xelb c99266a 31/42: Merge xelb-util into this repo, Chris Feng, 2015/09/17
- [elpa] externals/xelb 16e774c 02/42: First commit, Chris Feng, 2015/09/17
- [elpa] externals/xelb ab96086 34/42: Prepare for GNU ELPA release, Chris Feng, 2015/09/17
- [elpa] externals/xelb 1f9470c 01/42: First commit, Chris Feng, 2015/09/17