[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to apply a minor mode to all buffers
From: |
Eli Zaretskii |
Subject: |
Re: How to apply a minor mode to all buffers |
Date: |
Tue, 23 Jan 2007 23:56:50 +0200 |
> From: "Robert Thorpe" <rthorpe@realworldtech.com>
> Date: 23 Jan 2007 09:48:47 -0800
> >
> > ;;; Turn on trailing whitespace highlighting in modes where
> > ;;; it makes sense.
> > (let* ((twh-modes '("texinfo-mode" "makefile-mode" "c-mode-common"
> > "emacs-lisp-mode" "outline-mode" "sh-mode"
> > "shell-script-mode"
> > ))
> > (elt (car twh-modes)))
> > (while elt
> > (add-hook (intern (concat elt "-hook"))
> > (function (lambda ()
> > (setq show-trailing-whitespace t))))
> > (setq twh-modes (cdr twh-modes)
> > elt (car twh-modes))))
> >
> > If I ever need to do that in an additional mode, all I have to do is
> > add another mode name to the list at the beginning of this snippet:
> > hardly a tedious job.
>
> Sure, I once did something similar in .emacs. It's not exactly friendly
> to beginners who might want to do this though.
I doubt that beginners would think about such advanced customizations
as the one that started this thread.
- Re: How to apply a minor mode to all buffers, (continued)
- Re: How to apply a minor mode to all buffers, Eli Zaretskii, 2007/01/19
- Re: How to apply a minor mode to all buffers, James Aguilar, 2007/01/19
- Re: How to apply a minor mode to all buffers, Juanma Barranquero, 2007/01/19
- Re: How to apply a minor mode to all buffers, Eli Zaretskii, 2007/01/20
- Message not available
- Re: How to apply a minor mode to all buffers, Robert Thorpe, 2007/01/20
- Re: How to apply a minor mode to all buffers, Lennart Borgman (gmail), 2007/01/20
- Re: How to apply a minor mode to all buffers, Mathias Dahl, 2007/01/22
- Message not available
- Re: How to apply a minor mode to all buffers, Robert Thorpe, 2007/01/22
- Re: How to apply a minor mode to all buffers, Eli Zaretskii, 2007/01/22
- Message not available
- Re: How to apply a minor mode to all buffers, Robert Thorpe, 2007/01/23
- Re: How to apply a minor mode to all buffers,
Eli Zaretskii <=
- Re: How to apply a minor mode to all buffers, Stefan Monnier, 2007/01/22
- Message not available
- Re: How to apply a minor mode to all buffers, Stefan Monnier, 2007/01/22