help-gnu-emacs
[Top][All Lists]
Advanced

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

customize xref


From: James K. Lowden
Subject: customize xref
Date: Tue, 10 Jan 2017 13:28:08 -0500

I have an elisp syntax question.  

I'd like to customize xref such that, when I jump to a definition, it
puts the line it finds at the top of the window.  "customize group" led
me to xref-after-jump-hook, which calls recenter, and recenter takes an
optional argument that, if provided, is the line to "recenter" on.
Indeed, if I use "C-u 0 M-x recenter", it puts the line the cursor is
on at the top of the window.  

By passing "xref" to customize-group, I was able to see roughly what to
do.  In my .emacs I now see this (other settings elided): 

(custom-set-variables
 '(xref-after-jump-hook
   (quote (recenter xref-pulse-momentarily))))

How to sneak an argument in there?  I tried this: 

(custom-set-variables
 '(xref-after-jump-hook
   (quote ((recenter 0) xref-pulse-momentarily))))

but that only produces the error:

        run-hooks: Invalid function: (recenter 0)

I know I'm in the vicinity of quoting, but I'm not sure how to see
around the corner.  Help?  

--jkl


reply via email to

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