      (if (or (<= p low) (liquid-is-split ch)) 
 	 p 
          (liquid-id-start-pos low (- p 1)))))
+
 
 (defun column-number-at-pos (pos)
   "Find the column of position pos"

(require 'json)
(require 'ring)
(require 'etags)
(require 'flymake)
(require 'eldoc)
(require 'pos-tip nil t)
(require 'log4e)
(require 'yaxception)
(require 'thingatpt)

(cl-defstruct position file row col)


	  (position-col pos)
	  (position-file pos)))

;; DEBUG (defun liquid-annot-at-pos-0 (pos)
;; DEBUG   "Info to display: just the file/line/constant string"
;; DEBUG   (let* ((info  (format "hello!")))
;; DEBUG     (format "the information at %s is %s" 
;; DEBUG 	    (position-string pos)
;; DEBUG 	    info)))

;; DEBUG (defun liquid-annot-at-pos-1 (pos)
;; DEBUG   "Info to display: the identifier at the position or NONE" 
;; DEBUG   (let* ((ident (liquid-ident-at-pos pos)))
;; DEBUG     (format "the identifier at %s is %s" 
;; DEBUG 	    (position-string pos) 
;; DEBUG 	    ident)))


(defun liquid-ident-at-pos (pos)
  "Return the identifier at a given position"
  (thing-at-point 'word))

(defun liquid-annot-at-pos-2 (pos)
  "Info to display: type annotation for the identifier at the position or NONE" 
  (let* ((file (position-file pos))
	 (row  (position-row  pos))
	 (col  (position-col  pos)))
    (liquid-annot-get file row col)))

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

;;;###autoload
(defun liquid-tip-show ()
  "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-tip-popup annot)
        (liquid-tip-popup (format "No annotation for %s at %s" ident (position-string pos))))))


;;;###autoload
(defun liquid-tip-init ()
  "Initialize liquid-tip by making all identifiers buttons"
  (interactive)
  (progn (button-lock-mode 1)
	 (button-lock-set-button liquid-id-regexp 'liquid-tip-show)
	 ;; (button-lock-set-button "yoga" 'liquid-tip-show)
	 ;; (button-lock-set-button "mydiv" 'liquid-tip-show)
	 ))

;;;###autoload
(defun liquid-tip-update ()
  "Update liquid-annot-table by reloading annot file for buffer"
  (interactive)
  42)


;; DEBUG (defface my-tooltip
;; DEBUG   '((t
;; DEBUG      :background "gray85"
;; DEBUG      :foreground "black"
;; DEBUG      :inherit variable-pitch))
;; DEBUG   "Face for my tooltip.")
;; DEBUG 
;; DEBUG (defface my-tooltip-highlight
;; DEBUG   '((t
;; DEBUG      :background "blue"
;; DEBUG      :foreground "white"
;; DEBUG      :inherit my-tooltip))
;; DEBUG   "Face for my tooltip highlighted.")
;; DEBUG 
;; DEBUG (let ((str (propertize "foo\nbar\nbaz" 'face 'my-tooltip)))
;; DEBUG   (put-text-property 6 11 'face 'my-tooltip-highlight str)
;; DEBUG   (pos-tip-show-no-propertize str 'my-tooltip))

(provide 'liquid-tip)

