From: Yuri Khan <yurivkhan@gmail.com>
To: Davin Pearson <davin.pearson@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Adding hypertlink buttons
Date: Tue, 30 Oct 2018 12:44:06 +0700 [thread overview]
Message-ID: <CAP_d_8XsCF214=nTJ5e_T70gGy2SjH69vhEH=q+dQiXdPu0sGA@mail.gmail.com> (raw)
In-Reply-To: <7527e6ac-383a-4a19-b706-ff1ecd72c227@googlegroups.com>
On Tue, Oct 30, 2018 at 10:40 AM Davin Pearson <davin.pearson@gmail.com> wrote:
> When I execute the following command
>
> (display-splash-screen nil)
>
> It comes up with a screen of hyperlinks. By default Emacs
> shows the splash screen with an extra image and a hyperlink button
> that takes your Web browser to gnu.org, although I have turned
> this feature off and I cannot remember what command to use to
> re-enable a fancy splash screen.
>
> It seems that font lock should be used to add a hyperlink to
> your Elisp code.
Since you know what function does what you want, and you approximately
know the thing to look for, what is stopping you from reading the code
of that function looking for that thing?
Specifically, the buffer text of the startup screen is built by
function ‘fancy-splash-insert’ in startup.el, from data in variable
‘fancy-startup-text’ in the same file.
What it’s doing is invoke ‘insert-button’, with the property 'face
specifying 'link (in addition to the current face), 'help-echo setting
a description string displayed in the echo area when point is within
the button, 'follow-link to make it clickable with the mouse, and
'action specifying a lambda function that invokes ‘browse-url’ with
the appropriate link address. You could create a button with its
'action set to a function that does something else, such as visiting a
specific file and moving point to a specific position.
next prev parent reply other threads:[~2018-10-30 5:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-26 0:16 Adding hypertlink buttons Davin Pearson
2018-10-29 1:13 ` Davin Pearson
2018-10-29 12:51 ` Stefan Monnier
[not found] ` <mailman.3002.1540817518.1284.help-gnu-emacs@gnu.org>
2018-10-30 3:38 ` Davin Pearson
2018-10-30 5:44 ` Yuri Khan [this message]
[not found] ` <mailman.3070.1540878268.1284.help-gnu-emacs@gnu.org>
2018-10-31 2:31 ` Davin Pearson
2018-10-31 5:22 ` Yuri Khan
2018-10-31 14:36 ` mail
[not found] ` <mailman.3164.1540996581.1284.help-gnu-emacs@gnu.org>
2018-11-02 13:34 ` Davin Pearson
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP_d_8XsCF214=nTJ5e_T70gGy2SjH69vhEH=q+dQiXdPu0sGA@mail.gmail.com' \
--to=yurivkhan@gmail.com \
--cc=davin.pearson@gmail.com \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).