[NBLUG/talk] emacs config problem

Andru Luvisi luvisi at andru.sonoma.edu
Wed Jun 18 21:18:00 PDT 2003


On Wed, 18 Jun 2003, Rob Orsini wrote:
[snip]
> The configurations I was toying with (above) only applies to one
> mode a a time.  I would like a 'global' behavior that indents two spaces in
> the place of tabs, and the enter key will drop the indent level of the
> previous line, without having to write lisp for every file type I may come
> across.

It is possible to change things in the global-map, but those settings will
only apply when they are not overridden in a major or minor mode.  If you
want to use text-mode for pretty much everything, you can set
default-major-mode to text-mode and edit auto-mode-alist to taste.

  (define-key text-mode-map "\C-m" 'newline-and-indent)
  (define-key global-map    "\C-m" 'newline-and-indent)
  (setq default-major-mode 'text-mode)
  (setq auto-mode-alist
                              '(("\\.c$" . c-mode)
                                ("\\.h$" . c-mode)
                                ("\\.tex$" . TeX-mode)
                                ("\\.txi$" . Texinfo-mode)
                                ("\\.el$" . emacs-lisp-mode)
                                ("\\.scm$" . lisp-mode)
                                ("\\.st$" . smalltalk-mode)
                                ("\\.tr$" . nroff-mode)
                                ("\\.nr$" . nroff-mode)
                                ("\\.a$" . c-mode)))

> The other thing I'm hunting for, in an effort to keep my tendons in good
> shape, is to replace my pesky 'Caps Lock' key with the 'Control' key.  In
> windows I did this: http://www.orsinidesigns.com/ctl2caps/ and in Mandrake
> there was an accessibility option in the control center but it never seemed
> to carry over to the next session. I'm running the Debian w/KDE 2.2.

I have never done this myself but a google search for '"caps lock"
control linux' turned up http://c2.com/cgi/wiki?RemapCapsLock which looks
promising.

Andru
-- 
Andru Luvisi, Programmer/Analyst


Quote Of The Moment:
  "The finished...expert considers nothing too trivial that in any way
  contributes to his success..."
  
          - S. W. Erdnase




More information about the talk mailing list