[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: auto-fill in c-mode messes up incomplete comments]
From: |
Michaël Cadilhac |
Subject: |
Re: address@hidden: auto-fill in c-mode messes up incomplete comments] |
Date: |
Tue, 26 Dec 2006 11:47:26 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Please install your change, and then I'd like people to try the
> latest code for editing C files to see if this introduces any new bug.
As Toby pointed out, this patch only cures part of the problem.
I think the way `hang-ender-stuck' is processed has to be read by some
knowledgeable people, and patched once and for all.
I'll try to see if I can find a fix. ATM, I can fix Toby's problem but
I still have weird behaviors:
*** cc-cmds.el 03 Dec 2006 01:56:56 +0100 1.46
--- cc-cmds.el 26 Dec 2006 11:32:25 +0100
***************
*** 3733,3739 ****
;; text and the ender, depending on how
;; many there are now.
(unless spaces
! (setq spaces (- ender-column (current-column))))
(setq auto-fill-spaces (c-delete-and-extract-region
(point) ender-start))
;; paragraph filling condenses multiple spaces to
--- 3730,3736 ----
;; text and the ender, depending on how
;; many there are now.
(unless spaces
! (setq spaces (max 1 (- ender-column
(current-column)))))e
(setq auto-fill-spaces (c-delete-and-extract-region
(point) ender-start))
;; paragraph filling condenses multiple spaces to
Still leads to weird things, for example:
Buffer---------
/*
*
*
---------------
Point on second line, then hit `space', you're on the third line. This
is already the case with the current code, but in another fashion.
Well. There's hope, I think.
Merry Juanma's-birthday-mas.
--
| Michaël `Micha' Cadilhac | La culture c'est comme la confiture, |
| Epita/LRDE Promo 2007 | c'est meilleur avec du pain. |
| http://michael.cadilhac.name | -- MOI59 |
`--JID: address@hidden' - --'
pgp43QMYRbbhE.pgp
Description: PGP signature