all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Warning compiling xref.el
@ 2015-11-04 15:51 Eli Zaretskii
  2015-11-05 13:32 ` Stephen Leake
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2015-11-04 15:51 UTC (permalink / raw)
  To: emacs-devel

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'



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Warning compiling xref.el
  2015-11-04 15:51 Warning compiling xref.el Eli Zaretskii
@ 2015-11-05 13:32 ` Stephen Leake
  2015-11-06  3:15   ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Leake @ 2015-11-05 13:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> 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:

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

outside the defun fixes the problem for me.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Warning compiling xref.el
  2015-11-05 13:32 ` Stephen Leake
@ 2015-11-06  3:15   ` Dmitry Gutov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Gutov @ 2015-11-06  3:15 UTC (permalink / raw)
  To: Stephen Leake, Eli Zaretskii; +Cc: emacs-devel

On 11/05/2015 03:32 PM, Stephen Leake wrote:

> Adding this:
>
> (eval-when-compile
>    (require 'semantic/symref)) ;; for hit-lines slot
>
> outside the defun fixes the problem for me.

Applied, thank you.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-06  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 15:51 Warning compiling xref.el Eli Zaretskii
2015-11-05 13:32 ` Stephen Leake
2015-11-06  3:15   ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.