;;; 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.
"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.
`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
(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)
"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)))))
)
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.
(message ,format (format "%S - %s" (current-buffer)
(error-message-string err)))
nil))))
-(put 'semantic-safe 'lisp-indent-function 1)
;;; Misc utilities
;;
(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
(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))