From: "James K. Lowden" <jklowden@speakeasy.net>
To: help-gnu-emacs@gnu.org
Subject: customize xref
Date: Tue, 10 Jan 2017 13:28:08 -0500 [thread overview]
Message-ID: <20170110132808.8da312606c98c3c1a1b05885@speakeasy.net> (raw)
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
next reply other threads:[~2017-01-10 18:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 18:28 James K. Lowden [this message]
2017-01-10 20:38 ` customize xref James K. Lowden
2017-01-11 0:42 ` Dmitry Gutov
2017-01-11 9:03 ` Ralf Fassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170110132808.8da312606c98c3c1a1b05885@speakeasy.net \
--to=jklowden@speakeasy.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.