unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
Cc: bug-cc-mode@gnu.org, Toby.Allsopp@navman.com,
	monnier@IRO.UMontreal.CA, emacs-devel@gnu.org
Subject: Re: [Toby.Allsopp@navman.com: auto-fill in c-mode messes up incomplete comments]
Date: Tue, 26 Dec 2006 11:47:26 +0100	[thread overview]
Message-ID: <87slf353y9.fsf@lrde.org> (raw)
In-Reply-To: <E1Gz20y-0003h8-CR@fencepost.gnu.org> (Richard Stallman's message of "Mon\, 25 Dec 2006 21\:26\:04 -0500")


[-- Attachment #1.1: Type: text/plain, Size: 1888 bytes --]

Richard Stallman <rms@gnu.org> 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: michael.cadilhac@gmail.com--'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2006-12-26 10:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-25  0:43 [Toby.Allsopp@navman.com: auto-fill in c-mode messes up incomplete comments] Richard Stallman
2006-12-25 11:25 ` Michaël Cadilhac
2006-12-26  0:13   ` Toby Allsopp
2006-12-26  2:26   ` Richard Stallman
2006-12-26 10:47     ` Michaël Cadilhac [this message]
2006-12-27  2:59       ` Richard Stallman
2007-01-01 22:49         ` Alan Mackenzie
2006-12-28 22:09       ` Giorgos Keramidas
2007-01-02 21:09 ` Alan Mackenzie
2007-01-03 20:46   ` Alan Mackenzie
2007-01-04  7:59     ` Toby Allsopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87slf353y9.fsf@lrde.org \
    --to=michael@cadilhac.name \
    --cc=Toby.Allsopp@navman.com \
    --cc=bug-cc-mode@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).