From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: describe-mode "some-mode"? Date: Fri, 22 Aug 2014 11:21:07 -0700 (PDT) Message-ID: <988b6e41-62ed-4d33-abf1-804ddcedef59@default> References: <87bnrc1lkz.fsf@yun.yagibdah.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1408731713 13888 80.91.229.3 (22 Aug 2014 18:21:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Aug 2014 18:21:53 +0000 (UTC) To: lee , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 22 20:21:46 2014 Return-path: Envelope-to: geh-help-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 1XKtT4-0002gX-1e for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Aug 2014 20:21:42 +0200 Original-Received: from localhost ([::1]:38752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKtT3-0007MI-ES for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Aug 2014 14:21:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKtSj-0007BM-HJ for help-gnu-emacs@gnu.org; Fri, 22 Aug 2014 14:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKtSa-0003VG-R8 for help-gnu-emacs@gnu.org; Fri, 22 Aug 2014 14:21:21 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKtSa-0003VC-Km for help-gnu-emacs@gnu.org; Fri, 22 Aug 2014 14:21:12 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7MILAOF011971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Aug 2014 18:21:11 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7MIL8wG009488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Aug 2014 18:21:10 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7MIL8Uj009481; Fri, 22 Aug 2014 18:21:08 GMT In-Reply-To: <87bnrc1lkz.fsf@yun.yagibdah.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] 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: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99353 Archived-At: > is there a function like describe-key which describes a mode specified > by the user? >=20 > The docstring of describe-mode says it either describes the mode of the > current buffer or of the buffer given. How can I get a description of a > mode without enabling the mode in a buffer? Something like this will get you started. For more info (e.g. to include mi= nor-mode info) see the definition of `describe-mode'. You could also impro= ve the interactive spec, to use completion against major modes or something= . (defun my-describe-mode (mode) (interactive (list (intern (read-string "Mode: ")))) (with-help-window (help-buffer) (with-current-buffer (help-buffer) (insert (help-documentation mode nil 'ADD-HELP-BUTTONS))))) On the other hand, it is OK and simple to instead create a temporary buffer= , put it in the mode, and use `describe-mode' there.