(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
;;
if a user presses any key during execution, this form macro
will exit with the value passed to `semantic-throw-on-input'.
If FORMS completes, then the return value is the same as `progn'."
- (declare (indent 1))
+ (declare (indent 1) (debug def-body))
`(let ((semantic-current-input-throw-symbol ,symbol)
(semantic--on-input-start-marker (point-marker)))
(catch ,symbol
`(when (and semantic-current-input-throw-symbol
(or (input-pending-p)
(with-current-buffer
- ;; Timers might run during accept-process-output.
- ;; If they redisplay, point must be where the user
- ;; expects. (Bug#15045)
(marker-buffer semantic--on-input-start-marker)
+ ;; Timers might run during accept-process-output.
+ ;; If they redisplay, point must be where the user
+ ;; expects. (Bug#15045)
(save-excursion
(goto-char semantic--on-input-start-marker)
(accept-process-output)))))
;;
(defmacro semanticdb-without-unloaded-file-searches (forms)
"Execute FORMS with `unloaded' removed from the current throttle."
+ (declare (indent 1))
`(let ((semanticdb-find-default-throttle
(if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil)))
,forms))
-(put 'semanticdb-without-unloaded-file-searches 'lisp-indent-function 1)
\f
;; ;;; Editor goodies ;-)
;; (font-lock-add-keywords 'emacs-lisp-mode
;; semantic-fw-font-lock-keywords))
\f
-;;; Interfacing with edebug
-;;
-(defun semantic-fw-add-edebug-spec ()
- (def-edebug-spec semantic-exit-on-input 'def-body))
-
-(add-hook 'edebug-setup-hook 'semantic-fw-add-edebug-spec)
(provide 'semantic/fw)