 ;; Author: Ranjit Jhala <jhala@cs.ucsd.edu>
 ;; Version: 0.0.1
 ;; Package-Requires: ((flycheck "0.13") (dash "1.2") (emacs "24.1") (pos-tip "0.5.0"))
-
 ;;; License:
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by


(cl-defstruct position file row col)


(defun liquid-popup-tip (text)
  (if (and (functionp 'ac-quick-help-use-pos-tip-p)
           (ac-quick-help-use-pos-tip-p))
      (pos-tip-show text 'popup-tip-face nil nil 300 popup-tip-max-width)
    (popup-tip text)))

(defun liquid-splitters () 
  '( ?\s  ?\t ?\n ?\( ?\) ?\[ ?\] ))

	    (position-string pos) 
	    ident)))

(defun liquid-annot-at-pos-2 (pos)
  "Info to display: the identifier at the position or NONE" 
  (let* ((row (position-row pos))
	 (col (position-col pos)))
    (liquid-annot liquid-annot-table row col)))

(defun liquid-annot-at-pos (pos)
  "Determine info to display"
  (liquid-annot-at-pos-2 pos))

;;;###autoload
(defun liquid-annot-popup ()
  "Popup help about anything at point."
  (interactive)
  (let* ((pos    (liquid-get-position))
	 (ident  (liquid-ident-at-pos pos))
         (annot  (liquid-annot-at-pos pos)))
    (if annot 
	(liquid-popup-tip annot)
        (liquid-popup-tip (format "No annotation for: %s" ident)))))

;;; cloned from  tss-popup-help

