;;; elisp-mode.el --- Emacs Lisp mode -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1999-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1999-2016 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: lisp, languages
\\{emacs-lisp-mode-map}"
:group 'lisp
- (defvar project-library-roots-function)
+ (defvar project-vc-external-roots-function)
(lisp-mode-variables nil nil 'elisp)
(add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
(setq-local electric-pair-text-pairs
(add-function :before-until (local 'eldoc-documentation-function)
#'elisp-eldoc-documentation-function)
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
- (setq-local project-library-roots-function #'elisp-library-roots)
+ (setq-local project-vc-external-roots-function #'elisp-load-path-roots)
(add-hook 'completion-at-point-functions
#'elisp-completion-at-point nil 'local))
;; Font-locking support.
(defun elisp--font-lock-flush-elisp-buffers (&optional file)
- ;; FIXME: Aren't we only ever called from after-load-functions?
- ;; Don't flush during load unless called from after-load-functions.
- ;; In that case, FILE is non-nil. It's somehow strange that
- ;; load-in-progress is t when an after-load-function is called since
- ;; that should run *after* the load...
+ ;; We're only ever called from after-load-functions, load-in-progress can
+ ;; still be t in case of nested loads.
(when (or (not load-in-progress) file)
;; FIXME: If the loaded file did not define any macros, there shouldn't
;; be any need to font-lock-flush all the Elisp buffers.
" " (cadr table-etc)))
(cddr table-etc)))))))))
-(defun lisp-completion-at-point (_predicate)
+(defun lisp-completion-at-point (&optional _predicate)
(declare (obsolete elisp-completion-at-point "25.1"))
(elisp-completion-at-point))
xrefs))
-(declare-function project-library-roots "project")
+(declare-function project-external-roots "project")
(cl-defmethod xref-backend-apropos ((_backend (eql elisp)) regexp)
(apply #'nconc
(cl-defmethod xref-location-group ((l xref-elisp-location))
(xref-elisp-location-file l))
-(defun elisp-library-roots ()
+(defun elisp-load-path-roots ()
(if (boundp 'package-user-dir)
(cons package-user-dir load-path)
load-path))