[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding hypertlink buttons
From: |
mail |
Subject: |
Re: Adding hypertlink buttons |
Date: |
Wed, 31 Oct 2018 22:36:08 +0800 |
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.
Re: Adding hypertlink buttons,
mail <=