[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning compiling xref.el

From: Stephen Leake
Subject: Re: Warning compiling xref.el
Date: Thu, 05 Nov 2015 07:32:53 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Eli Zaretskii <address@hidden> writes:

> I get this warning when compiling the latest xref.el:
>   In xref-collect-references:
>   ../lisp/progmodes/xref.el:883:21:Warning: Unknown slot `hit-lines'

It's due to this code:

(defun xref-collect-references (symbol dir)
  "Collect references to SYMBOL inside DIR.
This function uses the Semantic Symbol Reference API, see
`semantic-symref-find-references-by-name' for details on which
tools are used, and when."
  (cl-assert (directory-name-p dir))
  (require 'semantic/symref)
  (defvar semantic-symref-tool)
  (let* ((default-directory dir)
         (semantic-symref-tool 'detect)
         (res (semantic-symref-find-references-by-name symbol 'subdirs))
         (hits (and res (oref res hit-lines)))
         (orig-buffers (buffer-list)))

'hit-lines' is a slot defined in semantic/symref.el, but the
byte-compiler does not process the "require" in this defun, apparently,

Adding this:

  (require 'semantic/symref)) ;; for hit-lines slot

outside the defun fixes the problem for me.

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]