GNU bug report logs - #20664
25.0.50; Customize: Link option or face name to the source definition

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 26 May 2015 20:42:02 UTC

Severity: wishlist

Tags: fixed

Found in version 25.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 20664 <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 20664 <at> debbugs.gnu.org
Subject: Re: bug#20664: 25.0.50;
 Customize: Link option or face name to the source definition
Date: Wed, 27 May 2015 15:19:52 +0200
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> 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. 

[0001-Allow-to-follow-to-face-definition-in-Customize.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
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

This bug report was last modified 4 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.