From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hadron Quark Newsgroups: gmane.emacs.help Subject: Tidying up some elisp Date: Tue, 29 Aug 2006 01:41:03 +0200 Message-ID: <87r6z0pgxc.fsf@mail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156812087 25961 80.91.229.2 (29 Aug 2006 00:41:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Aug 2006 00:41:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 29 02:41:25 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GHrfB-0002N4-EN for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Aug 2006 02:41:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHrfA-0004A5-UG for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 20:41:08 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-X-Trace: individual.net ihHGZxqnmF2yKGHnXBT3sgtZAhUUmrx0VBgC92EfuZvr8wHMMr X-Orig-Path: news.ibm.net!news X-Face: 2h#||Cd#d%F*NCm59[_6/{1a@jy%; |j>{D~4^gKg(^i%7j0IK?+,/GmW&:CD5fEKb_! User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:L7vNxefU5cZkTHf2gnJlL+PHd1A= Original-Xref: shelby.stanford.edu gnu.emacs.help:141396 Original-To: help-gnu-emacs@gnu.org 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:37016 Archived-At: I was just tidying up my .emacs to make things a little bit more modular and mode specific. I changed a load og global-set-key calls to the following so that after I loaded a c file, the other bufefrs werent accessing these c specific key bindings: (define-key c-mode-map [f5] 'find-tag-noconfirm) (define-key c-mode-map [f6] 'find-tag-repeat) (define-key c-mode-map [f7] 'pop-tag-mark) (define-key c-mode-map [f2] 'gdb-restore-windows) (define-key c-mode-map [f10] 'compile) (define-key c-mode-map [(f11)] 'next-error) (define-key c-mode-map [(f12)] 'gdba) Is there some kind of "with" statement or "Lisp approach" which would make this more "Lisp"y? Something like an array of pairs and a loop to call define key for this mode? Something like for(all in arr) define-key c-mode-map @index @value if you get my meaning. Am beginning so am looking for pointers in how to approach things or "think" in order to best use Lisp.