-;; Time-stamp: <2015-06-24 08:59:54 kmodi>
+;; Time-stamp: <2015-07-06 10:25:21 kmodi>
 
 ;; Highlight stuff
 
 (global-hi-lock-mode 1)
 
 ;; Highlight Anything
+;; https://github.com/boyw165/hl-anything
 (use-package hl-anything
   :if (not (bound-and-true-p disable-pkg-hl-anything))
   ;; This package has known to cause issues with the `list-colors-display'

        (hi-lock-set-pattern regexp face))))

;; hl-line+
(use-package hl-line+
  :config
  (progn

  (progn
    (hl-highlight-mode 1)

    (defun my/hl-anything (local)
      "Highlight the thing at point globally in all buffers.

If LOCAL is non-nil, highlight only in the current buffer."
      (interactive "P")
      (if local
          (hl-highlight-thingatpt-local)
        (hl-highlight-thingatpt-global)))

    (defun my/unhl-anything (local)
      "Un-highlight the thing at point globally in all buffers.

If LOCAL is non-nil, un-highlight only in the current buffer."
      (interactive "P")
      (if local
          (hl-unhighlight-all-local)
        (hl-unhighlight-all-global)))

    (defhydra hydra-hl-anything (:color red
                                 :hint nil)
      "
_h_/_H_ighlight (global/local)           _n_ext hightlight           _s_ave highlights           _t_oggle highlights
_u_/_U_n-highlight (global/local)        _p_revious highlight        _r_estore highlights
"
      ("h" my/hl-anything)
      ("H" (my/hl-anything :local))
      ("u" my/unhl-anything            :color blue)
      ("U" (my/unhl-anything :local)   :color blue)
      ("n" hl-find-next-thing)
      ("p" hl-find-prev-thing)
      ("s" hl-save-highlights          :color blue)
      ("r" hl-restore-highlights       :color blue)
      ("t" hl-global-highlight-on/off)
      ("q" nil "cancel" :color blue))
    (bind-key "C-c h" #'hydra-hl-anything/body modi-mode-map)))

;; Alternative highlighting package
;; https://github.com/glen-dai/highlight-global
(use-package highlight-global
  :load-path "elisp/highlight-global"
  :config
  (progn
    (bind-to-modi-map "h" #'highlight-frame-toggle)
    (bind-to-modi-map "H" #'clear-highlight-frame)))

;; Volatile Highlights
;; https://github.com/k-talo/volatile-highlights.el
