Function: semantic-read-symbol
semantic-read-symbol is a byte-compiled function defined in
util.el.gz.
Signature
(semantic-read-symbol PROMPT &optional DEFAULT STREAM FILTER)
Documentation
Read a symbol name from the user for the current buffer.
PROMPT is the prompt to use. Optional arguments: DEFAULT is the default choice. If no default is given, one is read from under point. STREAM is the list of tokens to complete from. FILTER is provides a filter on the types of things to complete. FILTER must be a function to call on each element.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/util.el.gz
(defun semantic-read-symbol (prompt &optional default stream filter)
"Read a symbol name from the user for the current buffer.
PROMPT is the prompt to use.
Optional arguments:
DEFAULT is the default choice. If no default is given, one is read
from under point.
STREAM is the list of tokens to complete from.
FILTER is provides a filter on the types of things to complete.
FILTER must be a function to call on each element."
(if (not default) (setq default (thing-at-point 'symbol)))
(if (not stream) (setq stream (semantic-fetch-tags)))
(setq stream
(if filter
(semantic--find-tags-by-function filter stream)
(require 'semantic/find)
(semantic-brute-find-tag-standard stream)))
(if (and default (string-match ":" prompt))
(setq prompt
(concat (substring prompt 0 (match-end 0))
" (default: " default ") ")))
(completing-read prompt stream nil t ""
'semantic-read-symbol-history
default))