[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tidying up some elisp
From: |
Hadron Quark |
Subject: |
Tidying up some elisp |
Date: |
Tue, 29 Aug 2006 01:41:03 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
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.
- Tidying up some elisp,
Hadron Quark <=