all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customize xref
@ 2017-01-10 18:28 James K. Lowden
  2017-01-10 20:38 ` James K. Lowden
  0 siblings, 1 reply; 4+ messages in thread
From: James K. Lowden @ 2017-01-10 18:28 UTC (permalink / raw)
  To: help-gnu-emacs

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


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

end of thread, other threads:[~2017-01-11  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 18:28 customize xref James K. Lowden
2017-01-10 20:38 ` James K. Lowden
2017-01-11  0:42   ` Dmitry Gutov
2017-01-11  9:03   ` Ralf Fassel

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.