[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting fill-column and others for text-mode
From: |
Decebal |
Subject: |
Re: Setting fill-column and others for text-mode |
Date: |
Fri, 24 Oct 2008 09:54:57 -0700 (PDT) |
User-agent: |
G2/1.0 |
On 24 okt, 17:52, Nikolaj Schumacher <m...@nschum.de> wrote:
\> > I would like to set fill-column, left-margin, tab-width and
default-
> > justification for text-mode, but I do not manage to get this working.
> > How can this be done?
>
> You can set them inside a hook like this:
> (setq fill-column 70)
It has to be:
(setq-default fill-column 72)
For fill-column and tab-width I thought it better to do it globally.
I also use:
(add-hook 'text-mode-hook (lambda () (refill-mode 1) (setq-default
default-justification 'full)))
(add-hook 'org-mode-hook (lambda () (refill-mode 0) (setq-default
default-justification 'left)))
But this only works partly. Refill-mode is t for text-mode and nill
for or-mode, but default-justification is for both full. What is going
wrong here?
I also tried:
(add-hook 'org-mode-hook (lambda () (refill-mode 0)))
(add-hook 'org-mode-hook (lambda () (setq-default default-
justification 'left)))
But with the same result.
And I would prefer something like:
(defun text-justification ()
(interactive)
(refill-mode 1)
(setq-default default-justification 'full)
)
(defun text-no-justification ()
(interactive)
(refill-mode 0)
(setq-default default-justification 'left)
)
(add-hook 'text-mode-hook 'text-justification)
(add-hook 'org-mode-hook 'text-no-justification)
Can something like this be done?