* lisp/progmodes/elisp-mode.el (elisp--xref-find-references): Use `cl-mapcan'.
* lisp/progmodes/etags.el (etags-xref-find): Ditto. Prompt for
directory if no tags tables are loaded (bug#19468).
(if (string-prefix-p (car ref) (cadr ref))
(setcdr ref (cddr ref))
(setq ref (cdr ref))))
- (mapcan
+ (cl-mapcan
(lambda (dir)
(and (file-exists-p dir)
(xref-collect-references symbol dir)))
(defun etags-xref-find (action id)
(pcase action
(`definitions (etags--xref-find-definitions id))
- (`references (mapcan
- (lambda (file)
- (xref-collect-references id (file-name-directory file)))
- tags-table-list))
+ (`references
+ (let ((dirs (if tags-table-list
+ (mapcar #'file-name-directory tags-table-list)
+ ;; If no tags files are loaded, prompt for the dir.
+ (list (read-directory-name "In directory: " nil nil t)))))
+ (cl-mapcan
+ (lambda (dir)
+ (xref-collect-references id dir))
+ dirs)))
(`apropos (etags--xref-find-definitions id t))))
(defun etags--xref-find-definitions (pattern &optional regexp?)