 ;;;; (:require-patch "")
 ;;;; HISTORY :
 ;;;; $Log$
+;;;; Revision 3.4  2014/10/31 16:10:14  troche
+;;;; * match all items
+;;;;
 ;;;; Revision 3.3  2014/10/31 15:09:55  troche
 ;;;; * debug
 ;;;;

(ac-define-source "ojs-functions"
    '((candidates . ojs-functions-ac-candidates)
      (document . ojs-functions-ac-document)
      (symbol . "f")
      (requires . -1)))

(defun ojs-functions-ac-document (symbol)
  (or 

;;;;; it stores the documentation in the symbol 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ojs-find-candidates-from-regexp (regexp doc)
  (let (candidate
	candidates
	)
    (save-excursion
      ;; Search forward from the beginning of the file
      (goto-char 0)
      (while  (re-search-forward regexp nil t)
	(setq candidate (match-string-no-properties 1))
	(unless (member candidate candidates)
	  (when (and doc candidate)
	    (put (intern candidate) :document (match-string-no-properties 0)))
	  (push candidate candidates)
	  ))
      ;; Search forward
      (nreverse candidates))))

;;;;; configuration of the hook
