(cl-acons ada-prj-current-file session gnat-inspect--sessions))))
))
+(defun gnat-inspect-show-session-buffer ()
+ (interactive)
+ (pop-to-buffer (gnat-inspect-cached-session)))
+
(defconst gnat-inspect-prompt "^>>> $"
;; gnatinspect output ends with this
"Regexp matching gnatinspect prompt; indicates previous command is complete.")
(defun gnat-inspect-session-wait (session)
"Wait for the current command to complete."
+ (unless (process-live-p (gnat-inspect--session-process session))
+ (error "gnatinspect process failed"))
+
(with-current-buffer (gnat-inspect--session-buffer session)
(let ((process (gnat-inspect--session-process session))
(search-start (point-min))
(gnat-inspect-session-send cmd-1 t)
;; at EOB. gnatinspect returns one line per result
(setq result-count (- (line-number-at-pos) 1))
- (font-lock-fontify-buffer)
+ (if (fboundp 'font-lock-ensure)
+ (font-lock-ensure)
+ (font-lock-fontify-buffer))
;; font-lock-fontify-buffer applies compilation-message text properties
+ ;; NOTE: Won't be needed in 24.5 any more, since compilation-next-error
+ ;; will apply compilation-message text properties on the fly.
;; IMPROVEME: for some reason, next-error works, but the font
;; colors are not right (no koolaid!)
(goto-char (point-min))
;; just go there, don't display session-buffer. We have to
;; fetch the compilation-message while in the session-buffer.
(let* ((msg (compilation-next-error 0 nil (point-min)))
+ ;; FIXME: Woah! This is messing with very internal details!
(loc (compilation--message->loc msg)))
(setq file (caar (compilation--loc->file-struct loc))
line (caar (cddr (compilation--loc->file-struct loc)))
(cond
((null search-type)
- (pop-to-buffer (current-buffer))
(error "gnatinspect did not return other item; refresh?"))
((and
)
(when (null result)
- (pop-to-buffer (current-buffer))
(error "gnatinspect did not return other item; refresh?"))
(message "parsing result ... done")
(string-to-number (match-string 4)))))
(when (null result)
- (pop-to-buffer (current-buffer))
(error "gnatinspect did not return other item; refresh?"))
(message "parsing result ... done")
(setq ada-make-package-body 'ada-gnat-make-package-body)
(add-hook 'ada-syntax-propertize-hook 'gnatprep-syntax-propertize)
- (add-hook 'ada-syntax-propertize-hook 'ada-gnat-syntax-propertize)
;; must be after indentation engine setup, because that resets the
;; indent function list.
(setq ada-xref-all-function 'gnat-inspect-all)
(setq ada-xref-overriding-function 'gnat-inspect-overriding)
(setq ada-xref-overridden-function 'gnat-inspect-overridden-1)
+ (setq ada-show-xref-tool-buffer 'gnat-inspect-show-session-buffer)
(add-to-list 'completion-ignored-extensions ".ali") ;; gnat library files, used for cross reference
)
(setq ada-xref-all-function nil)
(setq ada-xref-overriding-function nil)
(setq ada-xref-overridden-function nil)
+ (setq ada-show-xref-tool-buffer nil)
(setq completion-ignored-extensions (delete ".ali" completion-ignored-extensions))
)