* Number of characters per line
@ 2003-09-01 9:15 Chemtux
2003-09-02 7:33 ` Joakim Hove
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chemtux @ 2003-09-01 9:15 UTC (permalink / raw)
Hi,
Could someone tell me how to set the maximum number of characters per line
to 70 for C++ mode.
thnx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Number of characters per line
2003-09-01 9:15 Number of characters per line Chemtux
@ 2003-09-02 7:33 ` Joakim Hove
2003-09-02 14:46 ` Michal Wyrebski
2003-09-02 15:06 ` Barman Brakjoller
2 siblings, 0 replies; 5+ messages in thread
From: Joakim Hove @ 2003-09-02 7:33 UTC (permalink / raw)
Chemtux <Chemtux@(*)nedlinux.nl> writes:
> Could someone tell me how to set the maximum number of characters per line
> to 70 for C++ mode.
Well,
to set the maximum number of characters per line with auto-fill-mode
is:
C-u nn C-x f
were "nn" is the number of characters, i.e. 70 in your case. But
observe that:
1. This requires auto-fill-mode to be on (a minor mode toggled on/off
with M-x auto-fill-mode)
2. auto-fill-mode is a mode intended for *text*, I *think* it will
only be a nuisance in a programming mode like C++.
HTH - Joakim
--
/--------------------------------------------------------------------\
/ Joakim Hove / hove@bccs.no / (55 5) 84076 | \
| Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
| CMU | 5231 Paradis |
\ Thormøhlensgt.55, 5020 Bergen. | 55 91 28 18 /
\--------------------------------------------------------------------/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Number of characters per line
2003-09-01 9:15 Number of characters per line Chemtux
2003-09-02 7:33 ` Joakim Hove
@ 2003-09-02 14:46 ` Michal Wyrebski
2003-09-02 15:06 ` Barman Brakjoller
2 siblings, 0 replies; 5+ messages in thread
From: Michal Wyrebski @ 2003-09-02 14:46 UTC (permalink / raw)
On Mon, 1 Sep 2003, Chemtux wrote:
> Hi,
>
> Could someone tell me how to set the maximum number of characters per line
> to 70 for C++ mode.
>
Read about 'set-fill-column' function. This is probabely what you
want.
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Number of characters per line
2003-09-01 9:15 Number of characters per line Chemtux
2003-09-02 7:33 ` Joakim Hove
2003-09-02 14:46 ` Michal Wyrebski
@ 2003-09-02 15:06 ` Barman Brakjoller
2003-09-02 17:20 ` Kevin Rodgers
2 siblings, 1 reply; 5+ messages in thread
From: Barman Brakjoller @ 2003-09-02 15:06 UTC (permalink / raw)
> Could someone tell me how to set the maximum number of characters per line
> to 70 for C++ mode.
I cannot tell you how but as almost anything in Emacs is tweakable it
would certainly be possible to hook-on a function that after each
keyboard press checked if the current column was greater then a
certain number, and if it was, BEEP at the user. Would be very
annoying though... :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Number of characters per line
2003-09-02 15:06 ` Barman Brakjoller
@ 2003-09-02 17:20 ` Kevin Rodgers
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2003-09-02 17:20 UTC (permalink / raw)
Barman Brakjoller wrote:
>>Could someone tell me how to set the maximum number of characters per line
>>to 70 for C++ mode.
>>
>
> I cannot tell you how but as almost anything in Emacs is tweakable it
> would certainly be possible to hook-on a function that after each
> keyboard press checked if the current column was greater then a
> certain number, and if it was, BEEP at the user. Would be very
> annoying though... :)
(defun annoy ()
(if (>= (current-column) 70)
(beep t)))
(add-hook 'post-command-hook 'annoy)
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-02 17:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-01 9:15 Number of characters per line Chemtux
2003-09-02 7:33 ` Joakim Hove
2003-09-02 14:46 ` Michal Wyrebski
2003-09-02 15:06 ` Barman Brakjoller
2003-09-02 17:20 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).