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

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

bug#20664: 25.0.50; Customize: Link option or face name to the source de


From: Oleh Krehel
Subject: bug#20664: 25.0.50; Customize: Link option or face name to the source definition
Date: Wed, 27 May 2015 15:19:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> Feature request.  In Customize, for options and faces.  Put a link on
> the option/face name, so that following the link takes you to the source
> code (defcustom or defface).

Please check the patch. 

Attachment: 0001-Allow-to-follow-to-face-definition-in-Customize.patch
Description: Text Data

With this patch, "RET" works as expected, while "<mouse-1>" is giving an
error for a reason I don't understand.  In order to make it work for the
mouse, I have to do something contorted instead of a plain
`make-button':

(define-key (overlay-get
             (make-button opoint (point)
                          'follow-link t
                          'action (lambda (&rest _x) (find-face-definition 
symbol)))
             'keymap) [down-mouse-1]
  (lambda ()
    (interactive)
    (let ((button (button-at (point))))
      (when button
        (button-activate button)
        t))))

Maybe someone can suggest a better way.

Oleh

reply via email to

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