Function: srecode-semantic-handle-:el-custom

srecode-semantic-handle-:el-custom is an autoloaded and byte-compiled function defined in el.el.gz.

Signature

(srecode-semantic-handle-:el-custom DICT)

Documentation

Add macros into the dictionary DICT based on the current Emacs Lisp file.

Adds the following:
  GROUP - The defgroup name we guess you want for variables.
  FACEGROUP - The defgroup name you might want for faces.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/el.el.gz
;;;###autoload
(defun srecode-semantic-handle-:el-custom (dict)
  "Add macros into the dictionary DICT based on the current Emacs Lisp file.
Adds the following:
  GROUP - The `defgroup' name we guess you want for variables.
  FACEGROUP - The `defgroup' name you might want for faces."
  (require 'semantic/db-find)
  (let ((groups (semanticdb-strip-find-results
		 (semanticdb-brute-find-tags-by-class 'customgroup)))
	(varg nil)
	(faceg nil)
	)

    ;; Pick the best group
    (while groups
      (cond ((string-match "face" (semantic-tag-name (car groups)))
	     (setq faceg (car groups)))
	    ((not varg)
	     (setq varg (car groups)))
	    (t
	     ;; What about other groups?
	     ))
      (setq groups (cdr groups)))

    ;; Double check the facegroup.
    (setq faceg (or faceg varg))

    ;; Setup some variables
    (srecode-dictionary-set-value dict "GROUP" (semantic-tag-name varg))
    (srecode-dictionary-set-value dict "FACEGROUP" (semantic-tag-name faceg))

    ))