From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "james" Newsgroups: gmane.emacs.help Subject: Re: When my c++ mode hook is run, I want to print the value of some variables Date: 2 Apr 2007 12:34:28 -0700 Organization: http://groups.google.com Message-ID: <1175542468.325090.164540@q75g2000hsh.googlegroups.com> References: <1175447939.407197.88300@q75g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1175542641 29797 80.91.229.12 (2 Apr 2007 19:37:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2007 19:37:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 02 21:37:15 2007 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 1HYSL3-0003u5-3M for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Apr 2007 21:37:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYSO6-0005Qj-Qg for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Apr 2007 15:40:22 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!q75g2000hsh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: 205.175.225.24 Original-X-Trace: posting.google.com 1175542469 26414 127.0.0.1 (2 Apr 2007 19:34:29 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 2 Apr 2007 19:34:29 +0000 (UTC) In-Reply-To: <1175447939.407197.88300@q75g2000hsh.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q75g2000hsh.googlegroups.com; posting-host=205.175.225.24; posting-account=QasW5A0AAAAxx4roVdpL6V55nt6Y9qFG Original-Xref: shelby.stanford.edu gnu.emacs.help:146769 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:42373 Archived-At: On Apr 1, 12:18 pm, "Eric Lilja" wrote: > ; Say I want to print the value of access-label here, how? I can set > it with (c-set-offset 'access-label '-) > Is access-label even a variable? How do I print its value? Short answer: (print (assoc 'access-label c-offsets-alist)) Then go look in *Messages* for the value Less-short answer: If you look at the docs for c-set-offset (C-h f, c-set-offset), you'll see that it changes the value associated with the symbol access-label in the associative list c-offsets-alist. That list is the actual variable that you are modifying.