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

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

bug#21950: 25.1.50; Show the filename where an alias is defined


From: Tino Calancha
Subject: bug#21950: 25.1.50; Show the filename where an alias is defined
Date: Mon, 9 May 2016 10:52:44 +0900 (JST)
User-agent: Alpine 2.20 (LRH 67 2015-01-07)



I found nice to know if the alias is an user alias or an Emacs one,
and to see in which file is defined.
Below a new patch that solves the issue about showing the filename
where the alias is defined.  This patch does not interfere with
the Stefan commit mentioned in this thread.


In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.30)
 of 2016-05-06 built on calancha-pc
Repository revision: 80bea210ff14a64daa1d71765983aa3baa149555


From a139bc5e9c3f4c737abf342b903095684fb38edc Mon Sep 17 00:00:00 2001
From: Tino Calancha <f92capac@gmail.com>
Date: Mon, 9 May 2016 10:19:33 +0900
Subject: [PATCH] Show the filename where an alias is defined

* help-fns (describe-function-1): Pass 'defun as TYPE
to 'find-lisp-object-file-name' when OBJECT
is an alias (Bug#21950).
---
 lisp/help-fns.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index d1c8b2d..6ba9140 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -526,7 +526,9 @@ describe-function-1
         (sig-key (if (subrp def)
                       (indirect-function real-def)
                     real-def))
-        (file-name (find-lisp-object-file-name function def))
+        (file-name (find-lisp-object-file-name function
+                                                (or (and aliased 'defun)
+                                                    def)))
          (pt1 (with-current-buffer (help-buffer) (point)))
         (beg (if (and (or (byte-code-function-p def)
                           (keymapp def)
--
2.8.1






reply via email to

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