help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: visually mark off 80th column?


From: Kevin Rodgers
Subject: Re: visually mark off 80th column?
Date: Sat, 23 Jan 2010 08:31:47 -0700
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Brendan Miller wrote:
vline would be ideal... but I don't see a way to pin highlighting to
the 80th column.

Based on this thread and some others I've come up with this using the
highlight-80+ package.

;; highlight all characters past 80
(require 'highlight-80+)
(dolist (hook '(emacs-lisp-mode-hook
                cperl-mode-hook
                shell-mode-hook
                text-mode-hook
                change-log-mode-hook
                makefile-mode-hook
                message-mode-hook
                texinfo-mode-hook
                c-mode-common-hook
                python-mode-hook))
  (add-hook hook
            '(lambda () (highlight-80+-mode))))

One minor point, is I really want this to apply to *all* modes, not
just the ones I thought to list here. Is there any global mode hook
that applies to everything? The only files I would ever edit with
emacs would have the 80 line rule apply to them i.e. I don't do word
processing in emacs.

Some minor modes can be turned on by setting the mode variable (whereas
some can only be turned on by calling the mode function).  So you could
try setting the highlight-80+ mode variable globally, with setq-default.

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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