[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: howto suffix based fill-column?

From: Kevin Rodgers
Subject: Re: howto suffix based fill-column?
Date: Thu, 07 Aug 2003 12:12:23 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Joakim Hove wrote:

(defun set-fill-column ()
   (if (string-equal (file-name-extension (buffer-file-name)) "eml")
      (setq fillĀ­column 68)
    (setq fill-column 79)))

(add-hook 'find-file-hooks 'set-fill-column)

What about the OP's request for text mode?

I think this is a little cleaner:

(setq auto-mode-alist
      (cons '("\\.eml\\'" . text-mode) auto-mode-alist))

(setq-default fill-column 79)

(add-hook 'text-mode-hook
          (lambda ()
            (if (string-equal (file-name-extension (buffer-file-name)) "eml")
                (setq fill-column 68))))

Kevin Rodgers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]