Permalink
Browse files

Change 'labels' and silenced various warnings

Since 'labels' is obsolete as of Gnu Emacs 24.3, I have added a
compatibility layer so that labels is called on appropriate systems and
cl-labels (the replacement) is called on appropriate systems.  This
commit also silences a number of warnings around some deface and
defcustom calls.  I'm silencing them until I decide what I want to do
with them.

Conflicts:
	ecb-buffertab.el
	ecb-symboldef.el
  • Loading branch information...
1 parent 80092d4 commit 91cc08b6a7ff3f068967c765345462fab66d9749 Ryan Ware committed with pwojnowski Oct 1, 2013
Showing with 42 additions and 34 deletions.
  1. +37 −32 ecb-buffertab.el
  2. +1 −1 ecb-symboldef.el
  3. +4 −1 ecb-util.el
View
@@ -50,24 +50,28 @@
(require 'ecb-compilation)
-(defface ecb-buffertab-primary-face '((t (:bold t :foreground "black")))
- "Face used to highlight the annotation lines to the left of the annotate buffer."
- :group 'ecb)
-
-(defface ecb-buffertab-secondary-face '((t (:bold nil :foreground "black")))
- "Face used to highlight the annotation lines to the left of the annotate buffer."
- :group 'ecb)
-
-(defface ecb-buffertab-secondary-mouse-face '((t (:bold nil :foreground "black" :italic t)))
- "Face used to highlight the annotation lines to the left of the annotate buffer."
- :group 'ecb)
-
-(defcustom ecb-buffertab-map (let ((map (make-sparse-keymap)))
- (define-key map [header-line down-mouse-2] 'ecb-buffertab-popup-menu)
- map)
-
- "Key map used for buffertab navigation"
- :group 'ecb)
+(with-no-warnings
+ (defface ecb-buffertab-primary-face '((t (:bold t :foreground "black")))
+ "Face used to highlight the annotation lines to the left of the annotate buffer."
+ :group 'ecb))
+
+(with-no-warnings
+ (defface ecb-buffertab-secondary-face '((t (:bold nil :foreground "black")))
+ "Face used to highlight the annotation lines to the left of the annotate buffer."
+ :group 'ecb))
+
+(with-no-warnings
+ (defface ecb-buffertab-secondary-mouse-face '((t (:bold nil :foreground "black" :italic t)))
+ "Face used to highlight the annotation lines to the left of the annotate buffer."
+ :group 'ecb))
+
+(with-no-warnings
+ (defcustom ecb-buffertab-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map [header-line down-mouse-2] 'ecb-buffertab-popup-menu)
+ map)
+ "Key map used for buffertab navigation"
+ :group 'ecb))
(defun ecb-buffertab-popup-menu()
"Popup a menu for selecting an ECB buffer."
@@ -95,20 +99,21 @@
""
(interactive)
- (let((ecb-prefix " ECB: " ))
- (with-current-buffer (get-buffer ecb-speedbar-buffer-name)
- ;;FIXME: figure out what modeline tab to use
- (setq header-line-format (concat ecb-prefix "/ " (buffer-name)" "))
-
- (add-text-properties 0 (length ecb-prefix)
- (list 'face 'ecb-buffertab-primary-face)
- header-line-format)
-
- (add-text-properties (1+ (length ecb-prefix)) (length header-line-format)
- (list 'face 'ecb-buffertab-secondary-face
- 'mouse-face 'ecb-buffertab-secondary-mouse-face
- 'local-map 'ecb-buffertab-map)
- header-line-format))))
+ (with-no-warnings
+ (let ((ecb-prefix " ECB: " ))
+ (with-current-buffer (get-buffer ecb-speedbar-buffer-name)
+ ;;FIXME: figure out what modeline tab to use
+ (setq header-line-format (concat ecb-prefix "/ " (buffer-name)" "))
+
+ (add-text-properties 0 (length ecb-prefix)
+ (list 'face 'ecb-buffertab-primary-face)
+ header-line-format)
+
+ (add-text-properties (1+ (length ecb-prefix)) (length header-line-format)
+ (list 'face 'ecb-buffertab-secondary-face
+ 'mouse-face 'ecb-buffertab-secondary-mouse-face
+ 'local-map 'ecb-buffertab-map)
+ header-line-format)))))
(silentcomp-provide 'ecb-buffertab)
View
@@ -289,7 +289,7 @@ EDIT-BUFFER is that buffer VSYMBOL is used."
;; (print-help-return-message (&optional function) nil)
;; for XEmacs
(help-buffer-name () ecb-symboldef-temp-buffer-name))
- (labels ((print-help-return-message (&optional function) nil))
+ (cl-labels ((print-help-return-message (&optional function) nil))
(describe-variable vsymbol)))))
(with-current-buffer ecb-symboldef-temp-buffer-name
(when (member 'eieio-help-mode-augmentation-maybee temp-buffer-show-hook)
View
@@ -2346,14 +2346,17 @@ cons-cell \('test-inner-loop . \"test\")"
;; emacs that do not track Gnu Emacs the below functions so
;; ecb is implementing compatibilty functions
-;; interactive-p is obsolete as of Emacs 23.2
+;; interactive-p is obsolete as of Gnu Emacs 23.2
(defmacro ecb-interactive-p (&optional kind)
(if (or (> emacs-major-version 23)
(and (>= emacs-major-version 23)
(>= emacs-minor-version 2)))
`(called-interactively-p ,kind)
`(interactive-p)))
+;; labels is obsolete as of Gnu Emacs 24.3
+(unless (fboundp 'cl-labels) (fset 'cl-labels 'labels))
+
;;; ----- Provide ------------------------------------------
(silentcomp-provide 'ecb-util)

0 comments on commit 91cc08b

Please sign in to comment.