From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#23887: 25.1.50; Detect aliases to built-in functions Date: Sun, 3 Jul 2016 18:13:02 +0900 (JST) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: ger.gmane.org 1467537263 25832 80.91.229.3 (3 Jul 2016 09:14:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2016 09:14:23 +0000 (UTC) To: 23887@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 03 11:14:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bJdTh-0007uV-6J for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jul 2016 11:14:13 +0200 Original-Received: from localhost ([::1]:41816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJdTg-0004Xh-CH for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jul 2016 05:14:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJdTa-0004Up-Jc for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJdTW-0002VR-A3 for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJdTW-0002VK-6p for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bJdTW-0006kt-30 for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jul 2016 09:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23887 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146753720225909 (code B ref -1); Sun, 03 Jul 2016 09:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jul 2016 09:13:22 +0000 Original-Received: from localhost ([127.0.0.1]:35114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJdSr-0006jp-QL for submit@debbugs.gnu.org; Sun, 03 Jul 2016 05:13:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJdSq-0006jd-QT for submit@debbugs.gnu.org; Sun, 03 Jul 2016 05:13:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJdSj-0002LY-S3 for submit@debbugs.gnu.org; Sun, 03 Jul 2016 05:13:14 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJdSj-0002L1-Of for submit@debbugs.gnu.org; Sun, 03 Jul 2016 05:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJdSh-0004Lv-Il for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:13:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJdSd-0002KO-9L for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:13:10 -0400 Original-Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:35480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJdSd-0002JN-14 for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2016 05:13:07 -0400 Original-Received: by mail-pf0-x244.google.com with SMTP id t190so13775933pfb.2 for ; Sun, 03 Jul 2016 02:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:message-id:user-agent:mime-version; bh=0mo+fo21xsoP1YTx1Iy/uY7pkJe622dGQitGNLjfJ70=; b=ZK5S8SxiLsrf0zZctdUNQwWU6W0nx2ZXhG2VlFSNV36+6muufFt1aOa6GmY+1OMhWk eoQdn0w+2rxrJhBlhhhEH6VoQTIzIvpQNQttGBnwqDRdltzdEzEAkIN01vgpvP0WeBy0 PxDzp59t9pGkm3QjgZIfNUjr1gUFM1kf3bSwaqfYZgyoO9nzooXopS6sU4xU5mfWC2bT FahgA2fNiSd7r/nnH0tyQlrGmyWc8r6cW/Q1kbaGk18KGZ7vEXKGg066Oj6dbzE6CeD2 5G20iTux1ccLnvdPTgen6a5Y2ke0VmInfx776WNbeT7ubgUsdzD40Snt1/MS82ZcOojX 91rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:user-agent :mime-version; bh=0mo+fo21xsoP1YTx1Iy/uY7pkJe622dGQitGNLjfJ70=; b=BsfiiY8TDdrgAmBwB/JAkGT3x6OyNpOvq+atOGdf79p1HYoM8K0vB13Vz+MQokaeDC +D9+ZlegWTFyb4XfnuPw5Zx4tInz6OvJ6u2CI56ktRIXPedKLZY0ga9m2TvgImyEsNeD Q/ywogqPddigvDGv3DzpCO0e+30Erhd56pnNI6kS0J+WNHGKnSnDtHAcCBZhlPx3cPPk ZBHc2FhNdJcywLAPx0iP8Obov/5NasK3QXwaTpyPKKqAxPpw81reJMp72KunX/uG9vnb ANK/DoVlbXL8Af1Rw7FBBeQm0z2Xy15dK2AUtdv/d1TR6ziIkoLXXxWQaKDUmLsVoCTD 0ujw== X-Gm-Message-State: ALyK8tKe0B5iECH2b4T3XzP1NsUC1WIM5s8VHOiC+v2Ds0FGA0TFiCTeN2E+E+9S2pyZgA== X-Received: by 10.98.112.196 with SMTP id l187mr12481528pfc.59.1467537185515; Sun, 03 Jul 2016 02:13:05 -0700 (PDT) Original-Received: from calancha-pc (105018171106.wi-fi.kddi.com. [106.171.18.105]) by smtp.gmail.com with ESMTPSA id 78sm2173169pfm.43.2016.07.03.02.13.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2016 02:13:05 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc User-Agent: Alpine 2.20 (DEB 67 2015-01-07) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120322 Archived-At: emacs -Q F1 f search-forward-regexp RET ;; First line don't mention that the func is an alias ;; Compare, for instance, with F1 f chmod RET ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 48dcc336e96bbd22250eaee7e3a46c91b7ede1a1 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Sun, 3 Jul 2016 18:01:24 +0900 Subject: [PATCH] Detect aliases to built-in functions * lisp/help-fns.el (describe-function-1): Check for aliases defined with (defalias alias (symbol-function built-in)) (Bug#23887). --- lisp/help-fns.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 9464c0b..e4e2333 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -572,13 +572,17 @@ describe-function-1 (aliased (or (symbolp def) ;; Advised & aliased function. (and advised (symbolp real-function) - (not (eq 'autoload (car-safe def)))))) + (not (eq 'autoload (car-safe def)))) + (and (subrp def) + (not (string= (subr-name def) + (symbol-name function)))))) (real-def (cond - (aliased (let ((f real-function)) - (while (and (fboundp f) - (symbolp (symbol-function f))) - (setq f (symbol-function f))) - f)) + ((and aliased (not (subrp def))) + (let ((f real-function)) + (while (and (fboundp f) + (symbolp (symbol-function f))) + (setq f (symbol-function f))) + f)) ((subrp def) (intern (subr-name def))) (t def))) (sig-key (if (subrp def) -- 2.8.1 In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6) of 2016-07-03 built Repository revision: 08974112ae68aefba658a8516c8faa3374edc924