mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* 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.
This commit is contained in:
parent
d58759a99a
commit
ee7df9f0c8
5 changed files with 7 additions and 38 deletions
|
|
@ -1707,15 +1707,6 @@ Display mechanism using tooltip for a list of possible completions.")
|
|||
|
||||
;;; Compatibility
|
||||
;;
|
||||
(eval-and-compile
|
||||
(if (fboundp 'window-inside-edges)
|
||||
;; Emacs devel.
|
||||
(defalias 'semantic-displayor-window-edges
|
||||
'window-inside-edges)
|
||||
;; Emacs 21
|
||||
(defalias 'semantic-displayor-window-edges
|
||||
'window-edges)
|
||||
))
|
||||
|
||||
(defun semantic-displayor-point-position ()
|
||||
"Return the location of POINT as positioned on the selected frame.
|
||||
|
|
|
|||
|
|
@ -88,20 +88,6 @@ If VISIBLE is non-nil, make the text visible."
|
|||
"Return non-nil if TAG is invisible."
|
||||
(semantic-overlay-get (semantic-tag-overlay tag) 'invisible))
|
||||
|
||||
(defun semantic-set-tag-intangible (tag &optional tangible)
|
||||
"Enable the text in TAG to be made intangible.
|
||||
If TANGIBLE is non-nil, make the text visible.
|
||||
This function does not have meaning in XEmacs because it seems that
|
||||
the extent 'intangible' property does not exist."
|
||||
(semantic-overlay-put (semantic-tag-overlay tag) 'intangible
|
||||
(not tangible)))
|
||||
|
||||
(defun semantic-tag-intangible-p (tag)
|
||||
"Return non-nil if TAG is intangible.
|
||||
This function does not have meaning in XEmacs because it seems that
|
||||
the extent 'intangible' property does not exist."
|
||||
(semantic-overlay-get (semantic-tag-overlay tag) 'intangible))
|
||||
|
||||
(defun semantic-overlay-signal-read-only
|
||||
(overlay after start end &optional len)
|
||||
"Hook used in modification hooks to prevent modification.
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ must return non-nil to indicate that the tag should be decorated by
|
|||
`NAME-highlight'.
|
||||
|
||||
To put primary decorations on a tag `NAME-highlight' must use
|
||||
functions like `semantic-set-tag-face', `semantic-set-tag-intangible',
|
||||
functions like `semantic-set-tag-face', `semantic-set-tag-read-only',
|
||||
etc., found in the semantic-decorate library.
|
||||
|
||||
To add other kind of decorations on a tag, `NAME-highlight' must use
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
(if (featurep 'xemacs)
|
||||
(progn
|
||||
(defalias 'semantic-buffer-local-value 'symbol-value-in-buffer)
|
||||
;; FIXME: Why not just (require 'overlay)?
|
||||
(defalias 'semantic-overlay-live-p
|
||||
(lambda (o)
|
||||
(and (extent-live-p o)
|
||||
|
|
@ -113,12 +114,8 @@
|
|||
"Extract the window from EVENT."
|
||||
(car (car (cdr event))))
|
||||
|
||||
(if (> emacs-major-version 21)
|
||||
(defalias 'semantic-buffer-local-value 'buffer-local-value)
|
||||
(defalias 'semantic-buffer-local-value 'buffer-local-value)
|
||||
|
||||
(defun semantic-buffer-local-value (sym &optional buf)
|
||||
"Get the value of SYM from buffer local variable in BUF."
|
||||
(cdr (assoc sym (buffer-local-variables buf)))))
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -306,7 +303,7 @@ error message.
|
|||
If `debug-on-error' is set, errors are not caught, so that you can
|
||||
debug them.
|
||||
Avoid using a large BODY since it is duplicated."
|
||||
;;(declare (debug t) (indent 1))
|
||||
(declare (debug t) (indent 1))
|
||||
`(if debug-on-error
|
||||
;;(let ((inhibit-quit nil)) ,@body)
|
||||
;; Note to self: Doing the above screws up the wisent parser.
|
||||
|
|
@ -317,7 +314,6 @@ Avoid using a large BODY since it is duplicated."
|
|||
(message ,format (format "%S - %s" (current-buffer)
|
||||
(error-message-string err)))
|
||||
nil))))
|
||||
(put 'semantic-safe 'lisp-indent-function 1)
|
||||
|
||||
;;; Misc utilities
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -684,15 +684,11 @@ when it lands in the sticky line."
|
|||
(defconst semantic-stickyfunc-header-line-format
|
||||
(cond ((featurep 'xemacs)
|
||||
nil)
|
||||
((>= emacs-major-version 22)
|
||||
(t
|
||||
'(:eval (list
|
||||
;; Magic bit I found on emacswiki.
|
||||
(propertize " " 'display '((space :align-to 0)))
|
||||
(semantic-stickyfunc-fetch-stickyline))))
|
||||
((= emacs-major-version 21)
|
||||
'(:eval (list semantic-stickyfunc-indent-string
|
||||
(semantic-stickyfunc-fetch-stickyline))))
|
||||
(t nil))
|
||||
(semantic-stickyfunc-fetch-stickyline)))))
|
||||
"The header line format used by stickyfunc mode.")
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -719,7 +715,7 @@ minor mode is enabled."
|
|||
(unless (boundp 'default-header-line-format)
|
||||
;; Disable if there are no header lines to use.
|
||||
(setq semantic-stickyfunc-mode nil)
|
||||
(error "Sticky Function mode requires Emacs 21"))
|
||||
(error "Sticky Function mode requires Emacs"))
|
||||
;; Enable the mode
|
||||
;; Save previous buffer local value of header line format.
|
||||
(when (and (local-variable-p 'header-line-format (current-buffer))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue