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

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

Re: Adding hypertlink buttons


From: Davin Pearson
Subject: Re: Adding hypertlink buttons
Date: Sat, 3 Nov 2018 02:34:23 +1300

The code you sent me works just fine.  Thanking you for your time and energy
involved in constructing a reply to my original email message.

On Thu, 1 Nov 2018 at 03:36, <mail@xuchunyang.me> wrote:

>    A
>
>    A
>
>    26.10.2018, 08:21, "Davin Pearson" <davin.pearson@gmail.com>:
>
>    > I have written a drop in replacement for speedbar,el called
>    d-speedbar.el
>
>    > and I want to get left mouse button hyperlinks online instead of
>    pressing ENTER on the function browser window to take you to the
>    corresponding line for that function in the code browser window.
>
>    A
>
>    After consultingA (info "(elisp) Clickable Text") yesterday, IA wrote
>    the following to insert a link to the init file, I can click or press
>    RET onA the link to open the file.
>
>    A
>
>    (insert
>    A (propertize user-init-file
>    A  A  A  A  A  A  A 'mouse-face 'highlight
>    A  A  A  A  A  A  A 'help-echo "mouse-2: visit this file"
>    A  A  A  A  A  A  A 'follow-link t
>    A  A  A  A  A  A  A 'keymap
>    A  A  A  A  A  A  A (let ((map (make-sparse-keymap))
>    A  A  A  A  A  A  A  A  A  A (cmd (lambda ()
>    A  A  A  A  A  A  A  A  A  A  A  A  A  (interactive)
>    A  A  A  A  A  A  A  A  A  A  A  A  A  (find-file user-init-file))))
>    A  A  A  A  A  A  A  A (define-key map [mouse-2] cmd)
>    A  A  A  A  A  A  A  A (define-key map [?\C-m] cmd)
>    A  A  A  A  A  A  A  A map))
>    A ?\n)
>    A
>    I am not sure if `:follow-link t` is correct, but it seems it is
>    required because I remember click won't work without it.
>


-- 
Sincerely and kindest regards, Davin.
Davin Pearson    http://davin.50webs.com


reply via email to

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