From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: [PATCH] Unify fn and var help to make learning elisp a littleeasier Date: Fri, 7 Dec 2012 11:32:02 -0800 Message-ID: <2DB7099A0FD045F380861FCBD7FC00BD@us.oracle.com> References: <1354903977.95634.YahooMailClassic@web141102.mail.bf1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354908739 6851 80.91.229.3 (7 Dec 2012 19:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2012 19:32:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Stefan Monnier'" , "'Kelly Dean'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 07 20:32:32 2012 Return-path: Envelope-to: ged-emacs-devel@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 1Th3ex-0000YP-Ul for ged-emacs-devel@m.gmane.org; Fri, 07 Dec 2012 20:32:32 +0100 Original-Received: from localhost ([::1]:47872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th3el-0004oc-R2 for ged-emacs-devel@m.gmane.org; Fri, 07 Dec 2012 14:32:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th3ei-0004oM-Be for emacs-devel@gnu.org; Fri, 07 Dec 2012 14:32:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th3ec-0003sK-GI for emacs-devel@gnu.org; Fri, 07 Dec 2012 14:32:16 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:26212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th3ec-0003sD-AA for emacs-devel@gnu.org; Fri, 07 Dec 2012 14:32:10 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qB7JW8Z3016015 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Dec 2012 19:32:09 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qB7JW8oh025447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Dec 2012 19:32:08 GMT Original-Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qB7JW72k010361; Fri, 7 Dec 2012 13:32:07 -0600 Original-Received: from dradamslap1 (/10.159.136.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 07 Dec 2012 11:32:07 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3Urnz9NB2OyAAnSaynT/D7wfNlsAAAfJvw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155342 Archived-At: > I'm not completely sure we want to use "C-h o" for its > binding, tho I don't see any obvious reasons not to. FWIW, I bind `C-h o' to `describe-option' (in help-fns+.el): (defun describe-option (variable &optional buffer) "Describe an Emacs user variable (option). Same as using a prefix arg with `describe-variable'." (interactive (let ((symb (or (and (fboundp 'symbol-nearest-point) (symbol-nearest-point)) (and (symbolp (variable-at-point)) (variable-at-point)))) (enable-recursive-minibuffers t)) (list (intern (completing-read "Describe user option: " obarray 'user-variable-p t nil nil (and symb (symbol-name symb)) t))))) (describe-variable variable buffer t)) FWIW2, I also have a command `describe-option-of-type', which I bind to `C-h C-o': ,---- | describe-option-of-type is an interactive compiled Lisp function in | `help-fns+.el'. | | It is bound to help C-o, menu-bar help-menu describe | describe-option-of-type. | | (describe-option-of-type TYPE OPTION) | | Describe an Emacs user OPTION (variable) of a given `defcustom' TYPE. | A prefix argument determines the type-checking behavior: | - None: OPTION is defined with TYPE or a subtype of TYPE. | - Plain `C-u': OPTION is defined with TYPE or a subtype of TYPE, | or its current value is compatible with TYPE. | - Negative: OPTION is defined with TYPE (exact match). | - Non-negative: OPTION is defined with TYPE (exact match), | or its current value is compatible with TYPE. | | If TYPE is nil (default value) then *all* `defcustom' variables are | potential candidates. That is different from using `describe-option', | because `describe-option' includes user-variable candidates not | defined with `defcustom' (with `*'-prefixed doc strings). `----