unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20985: Bug in fortran fixed format mode with lines longer than 72 characters
@ 2015-07-05 17:20 Mark van Schilfgaarde
  2015-07-06  0:00 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Mark van Schilfgaarde @ 2015-07-05 17:20 UTC (permalink / raw)
  To: 20985

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

I am reporting a bug in emacs version 24.5.1.  It appears both on a
mac an on a linux machine.

Some functions in fortran fixed-format mode, with lines exceeding 72
columns (132 for example), still assume a 72 column width, independent
of the value of variable fortran-line-length

In particular sexp operations like (forward-sexp) assume characters
past 72 columns are comments.

Consider the attached "example.f" :  Read the file with
emacs -Q  example.f

Change variable  fortran-line-length :
(set-variable (quote fortran-line-length) 132 nil)

so that now:
(describe-variable (quote fortran-line-length))

returns:
fortran-line-length is a variable defined in `fortran.el'.
Its value is 132
Original value was 72
Local in buffer example.f; global value is 72


Move the point just after test1, so it precedes the first expression (..).
In this case forward-sexp works as expected.

Move the point just after test2, so it precedes the second expression (..).
In this case forward-sexp fails to find the end of the expression.
Note also that "twelve)" is highlighted as though it is a comment.

This problem does not appear in emacs 21.4


-- 
Professor Mark van Schilfgaarde       Tel. +44 (0)207 848 7246
Department of Physics                       Fax. +44 (0)20 7848 2420
King's College London                       e-mail:
Mark.vanSchilfgaarde@gmail.com
Strand, London WC2R 2LS, UK        http://www.kcl.ac.uk/physics

[-- Attachment #2: example.f --]
[-- Type: application/octet-stream, Size: 184 bytes --]

      program main
      call test1(one,two,three,four,five,six,seven,eight,nine,ten)
      call test2(one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve)
      end
      

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

* bug#20985: Bug in fortran fixed format mode with lines longer than 72 characters
  2015-07-05 17:20 bug#20985: Bug in fortran fixed format mode with lines longer than 72 characters Mark van Schilfgaarde
@ 2015-07-06  0:00 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2015-07-06  0:00 UTC (permalink / raw)
  To: Mark van Schilfgaarde; +Cc: 20985

Mark van Schilfgaarde wrote:

> (set-variable (quote fortran-line-length) 132 nil)

Thanks for the report. However, as it says in
  C-h v fortran-line-length

    Setting this variable directly (after fortran mode is loaded) does
    not take effect. Use either M-x customize (which affects all Fortran
    buffers and the default) or the function `fortran-line-length'
    (which can also operate on just the current buffer).

So: use

C-u 132 M-x fortran-line-length

> This problem does not appear in emacs 21.4

The variable fortran-line-length does not exist in 21.4.





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

end of thread, other threads:[~2015-07-06  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-05 17:20 bug#20985: Bug in fortran fixed format mode with lines longer than 72 characters Mark van Schilfgaarde
2015-07-06  0:00 ` 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).