aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-04-10 00:17:19 -0400
committerStefan Monnier2015-04-10 00:17:19 -0400
commitee7df9f0c8e9dedfca46fe9456ca8463cda096df (patch)
tree309981d3ccd0b3039ba30f4c7d5db80eabe2eb43
parentd58759a99ad07d31724f073286c05205cdc245b2 (diff)
downloademacs-ee7df9f0c8e9dedfca46fe9456ca8463cda096df.tar.gz
emacs-ee7df9f0c8e9dedfca46fe9456ca8463cda096df.zip
* lisp/cedet/semantic: Remove some dead code
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-header-line-format): Emacs<22 is not supported any more. * lisp/cedet/semantic/fw.el (semantic-buffer-local-value): Emacs<21 is not supported any more. (semantic-safe): Use `declare'. * lisp/cedet/semantic/decorate.el (semantic-set-tag-intangible) (semantic-tag-intangible-p): Remove unused functions. * lisp/cedet/semantic/complete.el (semantic-displayor-window-edges): Remove unused function.
-rw-r--r--lisp/cedet/semantic/complete.el9
-rw-r--r--lisp/cedet/semantic/decorate.el14
-rw-r--r--lisp/cedet/semantic/decorate/mode.el2
-rw-r--r--lisp/cedet/semantic/fw.el10
-rw-r--r--lisp/cedet/semantic/util-modes.el10
5 files changed, 7 insertions, 38 deletions
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index ad931785aff..267e292647a 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -1707,15 +1707,6 @@ Display mechanism using tooltip for a list of possible completions.")
1707 1707
1708;;; Compatibility 1708;;; Compatibility
1709;; 1709;;
1710(eval-and-compile
1711 (if (fboundp 'window-inside-edges)
1712 ;; Emacs devel.
1713 (defalias 'semantic-displayor-window-edges
1714 'window-inside-edges)
1715 ;; Emacs 21
1716 (defalias 'semantic-displayor-window-edges
1717 'window-edges)
1718 ))
1719 1710
1720(defun semantic-displayor-point-position () 1711(defun semantic-displayor-point-position ()
1721 "Return the location of POINT as positioned on the selected frame. 1712 "Return the location of POINT as positioned on the selected frame.
diff --git a/lisp/cedet/semantic/decorate.el b/lisp/cedet/semantic/decorate.el
index 38c359e53a8..6707fdff40c 100644
--- a/lisp/cedet/semantic/decorate.el
+++ b/lisp/cedet/semantic/decorate.el
@@ -88,20 +88,6 @@ If VISIBLE is non-nil, make the text visible."
88 "Return non-nil if TAG is invisible." 88 "Return non-nil if TAG is invisible."
89 (semantic-overlay-get (semantic-tag-overlay tag) 'invisible)) 89 (semantic-overlay-get (semantic-tag-overlay tag) 'invisible))
90 90
91(defun semantic-set-tag-intangible (tag &optional tangible)
92 "Enable the text in TAG to be made intangible.
93If TANGIBLE is non-nil, make the text visible.
94This function does not have meaning in XEmacs because it seems that
95the extent 'intangible' property does not exist."
96 (semantic-overlay-put (semantic-tag-overlay tag) 'intangible
97 (not tangible)))
98
99(defun semantic-tag-intangible-p (tag)
100 "Return non-nil if TAG is intangible.
101This function does not have meaning in XEmacs because it seems that
102the extent 'intangible' property does not exist."
103 (semantic-overlay-get (semantic-tag-overlay tag) 'intangible))
104
105(defun semantic-overlay-signal-read-only 91(defun semantic-overlay-signal-read-only
106 (overlay after start end &optional len) 92 (overlay after start end &optional len)
107 "Hook used in modification hooks to prevent modification. 93 "Hook used in modification hooks to prevent modification.
diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el
index 2a88eb7337b..9192ec15165 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -393,7 +393,7 @@ must return non-nil to indicate that the tag should be decorated by
393`NAME-highlight'. 393`NAME-highlight'.
394 394
395To put primary decorations on a tag `NAME-highlight' must use 395To put primary decorations on a tag `NAME-highlight' must use
396functions like `semantic-set-tag-face', `semantic-set-tag-intangible', 396functions like `semantic-set-tag-face', `semantic-set-tag-read-only',
397etc., found in the semantic-decorate library. 397etc., found in the semantic-decorate library.
398 398
399To add other kind of decorations on a tag, `NAME-highlight' must use 399To add other kind of decorations on a tag, `NAME-highlight' must use
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index a0c36944d48..e36f3598c0f 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -38,6 +38,7 @@
38 (if (featurep 'xemacs) 38 (if (featurep 'xemacs)
39 (progn 39 (progn
40 (defalias 'semantic-buffer-local-value 'symbol-value-in-buffer) 40 (defalias 'semantic-buffer-local-value 'symbol-value-in-buffer)
41 ;; FIXME: Why not just (require 'overlay)?
41 (defalias 'semantic-overlay-live-p 42 (defalias 'semantic-overlay-live-p
42 (lambda (o) 43 (lambda (o)
43 (and (extent-live-p o) 44 (and (extent-live-p o)
@@ -113,12 +114,8 @@
113 "Extract the window from EVENT." 114 "Extract the window from EVENT."
114 (car (car (cdr event)))) 115 (car (car (cdr event))))
115 116
116 (if (> emacs-major-version 21) 117 (defalias 'semantic-buffer-local-value 'buffer-local-value)
117 (defalias 'semantic-buffer-local-value 'buffer-local-value)
118 118
119 (defun semantic-buffer-local-value (sym &optional buf)
120 "Get the value of SYM from buffer local variable in BUF."
121 (cdr (assoc sym (buffer-local-variables buf)))))
122 ) 119 )
123 120
124 121
@@ -306,7 +303,7 @@ error message.
306If `debug-on-error' is set, errors are not caught, so that you can 303If `debug-on-error' is set, errors are not caught, so that you can
307debug them. 304debug them.
308Avoid using a large BODY since it is duplicated." 305Avoid using a large BODY since it is duplicated."
309 ;;(declare (debug t) (indent 1)) 306 (declare (debug t) (indent 1))
310 `(if debug-on-error 307 `(if debug-on-error
311 ;;(let ((inhibit-quit nil)) ,@body) 308 ;;(let ((inhibit-quit nil)) ,@body)
312 ;; Note to self: Doing the above screws up the wisent parser. 309 ;; Note to self: Doing the above screws up the wisent parser.
@@ -317,7 +314,6 @@ Avoid using a large BODY since it is duplicated."
317 (message ,format (format "%S - %s" (current-buffer) 314 (message ,format (format "%S - %s" (current-buffer)
318 (error-message-string err))) 315 (error-message-string err)))
319 nil)))) 316 nil))))
320(put 'semantic-safe 'lisp-indent-function 1)
321 317
322;;; Misc utilities 318;;; Misc utilities
323;; 319;;
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el
index 6914c4b1b0b..c080642f670 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -684,15 +684,11 @@ when it lands in the sticky line."
684(defconst semantic-stickyfunc-header-line-format 684(defconst semantic-stickyfunc-header-line-format
685 (cond ((featurep 'xemacs) 685 (cond ((featurep 'xemacs)
686 nil) 686 nil)
687 ((>= emacs-major-version 22) 687 (t
688 '(:eval (list 688 '(:eval (list
689 ;; Magic bit I found on emacswiki. 689 ;; Magic bit I found on emacswiki.
690 (propertize " " 'display '((space :align-to 0))) 690 (propertize " " 'display '((space :align-to 0)))
691 (semantic-stickyfunc-fetch-stickyline)))) 691 (semantic-stickyfunc-fetch-stickyline)))))
692 ((= emacs-major-version 21)
693 '(:eval (list semantic-stickyfunc-indent-string
694 (semantic-stickyfunc-fetch-stickyline))))
695 (t nil))
696 "The header line format used by stickyfunc mode.") 692 "The header line format used by stickyfunc mode.")
697 693
698;;;###autoload 694;;;###autoload
@@ -719,7 +715,7 @@ minor mode is enabled."
719 (unless (boundp 'default-header-line-format) 715 (unless (boundp 'default-header-line-format)
720 ;; Disable if there are no header lines to use. 716 ;; Disable if there are no header lines to use.
721 (setq semantic-stickyfunc-mode nil) 717 (setq semantic-stickyfunc-mode nil)
722 (error "Sticky Function mode requires Emacs 21")) 718 (error "Sticky Function mode requires Emacs"))
723 ;; Enable the mode 719 ;; Enable the mode
724 ;; Save previous buffer local value of header line format. 720 ;; Save previous buffer local value of header line format.
725 (when (and (local-variable-p 'header-line-format (current-buffer)) 721 (when (and (local-variable-p 'header-line-format (current-buffer))