Function: ebrowse-symbol-regexp

ebrowse-symbol-regexp is a byte-compiled function defined in ebrowse.el.gz.

Signature

(ebrowse-symbol-regexp NAME)

Documentation

Generate a suitable regular expression for a member or class NAME.

This is regexp-quote for most symbols, except for operator names which may contain whitespace. For these symbols, replace white space in the symbol name (generated by BROWSE) with a regular expression matching any number of whitespace characters.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ebrowse.el.gz
(defun ebrowse-symbol-regexp (name)
  "Generate a suitable regular expression for a member or class NAME.
This is `regexp-quote' for most symbols, except for operator names
which may contain whitespace.  For these symbols, replace white
space in the symbol name (generated by BROWSE) with a regular
expression matching any number of whitespace characters."
  (cl-loop with regexp = (regexp-quote name)
           with start = 0
           finally return regexp
           while (string-match "[ \t]+" regexp start)
           do (setq regexp (concat (substring regexp 0 (match-beginning 0))
                                   "[ \t]*"
                                   (substring regexp (match-end 0)))
                    start (+ (match-beginning 0) 5))))