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: How to get current keymap Date: Sat, 6 Dec 2008 22:49:19 -0800 Message-ID: <003b01c95837$ee8b1e30$0200a8c0@us.oracle.com> References: <878wqtcqt6.fsf@emacs.Arch.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228632594 30513 80.91.229.12 (7 Dec 2008 06:49:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Dec 2008 06:49:54 +0000 (UTC) To: "'netawater'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 07 07:51:00 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L9DTj-0007lX-9P for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Dec 2008 07:50:55 +0100 Original-Received: from localhost ([127.0.0.1]:42225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9DSY-0003Ej-89 for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Dec 2008 01:49:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L9DS5-0003Ed-VS for help-gnu-emacs@gnu.org; Sun, 07 Dec 2008 01:49:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L9DS3-0003D4-WD for help-gnu-emacs@gnu.org; Sun, 07 Dec 2008 01:49:13 -0500 Original-Received: from [199.232.76.173] (port=52559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9DS3-0003Cm-Lk for help-gnu-emacs@gnu.org; Sun, 07 Dec 2008 01:49:11 -0500 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:36306) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L9DS3-0003I7-9F for help-gnu-emacs@gnu.org; Sun, 07 Dec 2008 01:49:11 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mB76mn6P032283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Dec 2008 06:48:50 GMT Original-Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mB76nRgp031901; Sun, 7 Dec 2008 06:49:29 GMT Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 06 Dec 2008 22:49:04 -0800 X-Mailer: Microsoft Office Outlook 11 thread-index: AclXsJ0zjEXj6DjzQr26iakbFG9mYwAheAmQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 In-Reply-To: <878wqtcqt6.fsf@emacs.Arch.net> X-Source-IP: acsmt700.oracle.com [141.146.40.70] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A0B0208.493B71E2.00BE:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60408 Archived-At: > I used (concat (symbol-name major-mode) "-map") to get > current keymap, but it failed for LaTeX mode. Are there > other methode to get current keymap. If I enter a buffer, do `M-x latex-mode', then M-: (concat (symbol-name major-mode) "-map") it returns "latex-mode-map". What did you want? That's the name of a symbol whose value is the latex mode keymap. If you want the keymap itself, then you want this: (symbol-value ; Value of (intern ; Symbol whose name is (concat (symbol-name major-mode) "-map"))) However, (current-local-map) gives you the same thing, and it works regardless of the name of the symbol. (eq (symbol-value (intern (concat (symbol-name major-mode) "-map"))) (current-local-map)) => t