From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Paul Wallington Newsgroups: gmane.emacs.devel Subject: mentioning variable aliases in `describe-variable' Date: Wed, 10 Jul 2002 10:42:47 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1026293918 25729 127.0.0.1 (10 Jul 2002 09:38:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2002 09:38:38 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17SDvi-0006gs-00 for ; Wed, 10 Jul 2002 11:38:38 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17SE4Y-0006Oy-00 for ; Wed, 10 Jul 2002 11:47:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17SDwD-0008AN-00; Wed, 10 Jul 2002 05:39:10 -0400 Original-Received: from imailg1.svr.pol.co.uk ([195.92.195.179]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17SDv9-00087K-00 for ; Wed, 10 Jul 2002 05:38:03 -0400 Original-Received: from modem-79.dimrill.dialup.pol.co.uk ([62.136.155.79] helo=bundalo.shootybangbang.com) by imailg1.svr.pol.co.uk with esmtp (Exim 3.35 #1) id 17SDv0-0003Ra-00 for emacs-devel@gnu.org; Wed, 10 Jul 2002 10:37:54 +0100 Original-Received: from jpw by bundalo.shootybangbang.com with local (Exim 3.32 #1 (Debian)) id 17SDzj-0000sL-00 for ; Wed, 10 Jul 2002 10:42:47 +0100 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5623 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5623 I think it would be nice to mention when a variable is an alias in `describe-variable'. What do people think ? 2002-07-10 John Paul Wallington * help-fns.el (describe-variable): Mention if the variable is an alias. Index: help-fns.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/help-fns.el,v retrieving revision 1.12 diff -u -r1.12 help-fns.el --- help-fns.el 27 Jun 2002 16:10:23 -0000 1.12 +++ help-fns.el 10 Jul 2002 09:35:23 -0000 @@ -438,7 +438,16 @@ (terpri))) (let ((doc (documentation-property variable 'variable-documentation))) (princ (or doc "Not documented as a variable."))) - + + ;; Mention if the variable is an alias. + (let ((alias (condition-case nil + (indirect-variable variable) + (error variable)))) + (unless (eq alias variable) + (terpri) + (terpri) + (princ (format "This variable is an alias for `%s'." alias)))) + ;; Make a link to customize if this variable can be customized. ;; Note, it is not reliable to test only for a custom-type property ;; because those are only present after the var's definition -- John Paul Wallington