unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Small bugs in fortran-mode.
@ 2004-01-23 17:50 Michael Hagemann
  2004-01-26  0:03 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Hagemann @ 2004-01-23 17:50 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

Hello,


there's a small bug in the `fortran-fill' function.  If
`fortran-break-before-delimiters' is nil, it may happen that a delimiter
stays on column `fill-column', which is one column to far.

The position, from where the search for `fill-point' starts, needs to
take `fortran-break-before-delimiters' into account.


Furthermore, the customized value of `fortran-break-before-delimiters'
is ignored, since the `fortran-mode' function `setq's it to `t'.  There
are a number of other `setq's, but as far as I can tell they don't
interfere with `customize'.

A patch is attached.  Please contact me if I can/should do some
additional work...


Best regards,
Michael Hagemann

[-- Attachment #2: emacs_fortran-mode_MH.patch --]
[-- Type: application/octet-stream, Size: 983 bytes --]

--- fortran.el.O	Fri Mar 22 18:03:00 2002
+++ fortran.el	Fri Jan 23 18:38:52 2004
@@ -632,7 +632,7 @@
   (set (make-local-variable 'font-lock-syntactic-keywords)
        fortran-font-lock-syntactic-keywords)
   (make-local-variable 'fortran-break-before-delimiters)
-  (setq fortran-break-before-delimiters t)
+;  (setq fortran-break-before-delimiters t)
   (make-local-variable 'indent-line-function)
   (setq indent-line-function 'fortran-indent-line)
   (make-local-variable 'comment-indent-function)
@@ -1624,11 +1624,10 @@
 	 (fill-point
 	  (or quote
 	      (save-excursion
-		(move-to-column (1+ fill-column))
-		(skip-chars-backward "^ \t\n,'+-/*=)"
-;;;		 (if fortran-break-before-delimiters
-;;;		     "^ \t\n,'+-/*=" "^ \t\n,'+-/*=)")
-		 )
+		(move-to-column (if fortran-break-before-delimiters
+				    (1+ fill-column)
+				  fill-column))
+		(skip-chars-backward "^ \t\n,'+-/*=)")
 		(if (<= (point) (1+ bos))
 		    (progn
 		      (move-to-column (1+ fill-column))

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Small bugs in fortran-mode.
  2004-01-23 17:50 Small bugs in fortran-mode Michael Hagemann
@ 2004-01-26  0:03 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2004-01-26  0:03 UTC (permalink / raw)
  Cc: bug-gnu-emacs


Hi, thanks for the report and patch.


Michael Hagemann wrote:

> The position, from where the search for `fill-point' starts, needs to
> take `fortran-break-before-delimiters' into account.

I installed a change along the lines you suggested. This (togther with
the next point as well, really) necessitated a few more changes to the
filling code to correctly deal with cases like "**".

> Furthermore, the customized value of `fortran-break-before-delimiters'
> is ignored, since the `fortran-mode' function `setq's it to `t'.

Yes - that one was already dealt in the CVS.

Thanks again.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-26  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-23 17:50 Small bugs in fortran-mode Michael Hagemann
2004-01-26  0:03 ` Glenn Morris

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