Function: etags-regen--ignore-regexp
etags-regen--ignore-regexp is a byte-compiled function defined in
etags-regen.el.gz.
Signature
(etags-regen--ignore-regexp IGNORE)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/etags-regen.el.gz
(defun etags-regen--ignore-regexp (ignore)
(require 'dired)
;; It's somewhat brittle to rely on Dired.
(let ((re (dired-glob-regexp ignore)))
;; We could implement root anchoring here, but \\= doesn't work in
;; string-match :-(.
(concat (unless (eq ?/ (aref re 3)) "/")
;; Cutting off the anchors added by `dired-glob-regexp'.
(substring re 2 (- (length re) 2))
;; This way we allow a glob to match against a directory
;; name, or a file name. And when it ends with / already,
;; no need to add the anchoring.
(unless (eq ?/ (aref re (- (length re) 3)))
;; Either match a full name segment, or eos.
"\\(?:/\\|\\'\\)"))))