Function: semantic-idle-scheduler-work-parse-neighboring-files
semantic-idle-scheduler-work-parse-neighboring-files is a
byte-compiled function defined in idle.el.gz.
Signature
(semantic-idle-scheduler-work-parse-neighboring-files)
Documentation
Parse all the files in similar directories to buffers being edited.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/idle.el.gz
(defun semantic-idle-scheduler-work-parse-neighboring-files ()
"Parse all the files in similar directories to buffers being edited."
;; Let's tell EDE to ignore all the files we're about to load
(let ((ede-auto-add-method 'never)
(matching-auto-mode-patterns nil))
;; Collect all patterns matching files of the same mode we edit.
(mapc (lambda (pat) (and (eq (cdr pat) major-mode)
(push (car pat) matching-auto-mode-patterns)))
auto-mode-alist)
;; Loop over all files, and if one matches our mode, we force its
;; table to load.
(dolist (file (directory-files default-directory t ".*" t))
(catch 'found
(mapc (lambda (pat)
(semantic-throw-on-input 'parsing-mode-buffers)
;; We use string-match instead of passing the pattern
;; into directory files, because some patterns don't
;; work with directory files.
(and (string-match pat file)
(save-excursion
(semanticdb-file-table-object file))
(throw 'found t)))
matching-auto-mode-patterns)))))