* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) @ 2015-07-02 22:36 Zach Jibben 2015-07-02 22:56 ` Glenn Morris 2015-07-03 22:25 ` Angelo Graziosi 0 siblings, 2 replies; 7+ messages in thread From: Zach Jibben @ 2015-07-02 22:36 UTC (permalink / raw) To: 20969 [-- Attachment #1: Type: text/plain, Size: 4225 bytes --] From: Zach Jibben <threeofsix@gmail.com> To: bug-gnu-emacs@gnu.org Subject: 24.5; f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) --text follows this line-- When indenting an entire f90 buffer that contains an extended type, the indentation comes out incorrectly. Steps to reproduce: 1. Start Emacs with `emacs -Q' 2. Enter a program. A simple example: program example type :: e1 real :: a end type e1 type, extends(e1) :: e2 real :: b end type e2 end program 3. Automatically indent, either with C-M-q or C-x h C-M-\. The result is: program example type :: e1 real :: a end type e1 type, extends(e1) :: e2 real :: b end type e2 end program f90-indent-subprogram should not have changed anything from the input in this case. Indenting with tabs, manually, line-by-line, works correctly. In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of 2015-05-07 on buildvm-08.phx2.fedoraproject.org Windowing system distributor `Fedora Project', version 11.0.11603000 System Description: Fedora release 21 (Twenty One) Configured using: `configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro '' Important settings: value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: F90 Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set [2 times] Indenting program example... END type does not match program. Indenting program example...done Making completion list... Auto-saving... Mark set Making completion list... Load-path shadows: None found. Features: (vc-dispatcher vc-svn f90 cus-edit cus-start cus-load wid-edit cl-loaddefs cl-lib pp shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 97280 16204) (symbols 48 19736 0) (miscs 40 82 439) (strings 32 15108 5600) (string-bytes 1 428069) (vectors 16 11237) (vector-slots 8 404101 10431) (floats 8 77 461) (intervals 56 696 238) (buffers 960 16) (heap 1024 37362 1031)) [-- Attachment #2: Type: text/html, Size: 4918 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) 2015-07-02 22:36 bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) Zach Jibben @ 2015-07-02 22:56 ` Glenn Morris 2015-07-03 22:25 ` Angelo Graziosi 1 sibling, 0 replies; 7+ messages in thread From: Glenn Morris @ 2015-07-02 22:56 UTC (permalink / raw) To: Zach Jibben; +Cc: 20969 Zach Jibben wrote: > f90-indent-subprogram should not have changed anything from the input in > this case. Indenting with tabs, manually, line-by-line, works correctly. > > In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) Thanks for the report. This was previously reported as https://debbugs.gnu.org/20680 and is already fixed in git for the next release. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) 2015-07-02 22:36 bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) Zach Jibben 2015-07-02 22:56 ` Glenn Morris @ 2015-07-03 22:25 ` Angelo Graziosi 2015-07-04 0:13 ` Glenn Morris 1 sibling, 1 reply; 7+ messages in thread From: Angelo Graziosi @ 2015-07-03 22:25 UTC (permalink / raw) To: 20969 Glenn Morris wrote: > already fixed in git for the next release. On which branch? master still have the bug... Angelo ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) 2015-07-03 22:25 ` Angelo Graziosi @ 2015-07-04 0:13 ` Glenn Morris 2015-07-04 8:26 ` Angelo Graziosi 0 siblings, 1 reply; 7+ messages in thread From: Glenn Morris @ 2015-07-04 0:13 UTC (permalink / raw) To: Angelo Graziosi; +Cc: 20969 Works for me. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) 2015-07-04 0:13 ` Glenn Morris @ 2015-07-04 8:26 ` Angelo Graziosi 2015-07-06 2:26 ` Glenn Morris 0 siblings, 1 reply; 7+ messages in thread From: Angelo Graziosi @ 2015-07-04 8:26 UTC (permalink / raw) To: Glenn Morris; +Cc: 20969 [-- Attachment #1: Type: text/plain, Size: 576 bytes --] Il 04/07/2015 02:13, Glenn Morris ha scritto: > > Works for me. > Hmm... indeed the Zach example works.. but try with the attached test case.. It comes with the right formatting.. Select, now, from 'module' to 'end module', then press TAB.. The formatting becomes totally broken. Now, remove, from the original foo.f90, the text ', extends(Shape),' (after "type" keyword), and repeat (select from 'module' to 'end module', then press TAB..). The formatting is not changed! it remans unbroken.. So, the 'extends' keyword, in some manner, breaks the formatting. Angelo [-- Attachment #2: foo.f90 --] [-- Type: text/plain, Size: 1233 bytes --] module Rectangle_mod use kinds_mod, only : DP use Shape_mod, only : Shape implicit none private type, extends(Shape), public :: Rectangle private real(DP) :: length real(DP) :: width contains private procedure, pass(this) :: ConstructRectangle procedure, pass(this), public :: getArea generic, public :: Construct => ConstructRectangle end type Rectangle contains subroutine ConstructRectangle(this, length, width, xCenter, yCenter) class(Rectangle), intent(inout) :: this real(DP), intent(in) :: length real(DP), intent(in) :: width real(DP), intent(in) :: xCenter real(DP), intent(in) :: yCenter !.. Create the base class call this%Construct(xCenter=xCenter, yCenter=yCenter) print *, "Constructing rectangle" this%length = length this%width = width !How to invoke the base class constructor here? !The line below works for non-abstract base classes where the !constructor result can be type(Shape) end subroutine ConstructRectangle function getArea(this) result(area) class(Rectangle), intent(in) :: this real(DP) :: area area = this%length * this%width end function getArea end module Rectangle_mod ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) 2015-07-04 8:26 ` Angelo Graziosi @ 2015-07-06 2:26 ` Glenn Morris 2015-07-06 10:06 ` Angelo Graziosi 0 siblings, 1 reply; 7+ messages in thread From: Glenn Morris @ 2015-07-06 2:26 UTC (permalink / raw) To: Angelo Graziosi; +Cc: 20969 (It would have been better to make a new report.) That was a separate issue, also now fixed. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) 2015-07-06 2:26 ` Glenn Morris @ 2015-07-06 10:06 ` Angelo Graziosi 0 siblings, 0 replies; 7+ messages in thread From: Angelo Graziosi @ 2015-07-06 10:06 UTC (permalink / raw) To: Glenn Morris; +Cc: 20969 Il 06/07/2015 04:26, Glenn Morris ha scritto: > > (It would have been better to make a new report.) > > That was a separate issue, also now fixed. > Thanks for the quick fix. Angelo ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-06 10:06 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-02 22:36 bug#20969: f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...) Zach Jibben 2015-07-02 22:56 ` Glenn Morris 2015-07-03 22:25 ` Angelo Graziosi 2015-07-04 0:13 ` Glenn Morris 2015-07-04 8:26 ` Angelo Graziosi 2015-07-06 2:26 ` Glenn Morris 2015-07-06 10:06 ` Angelo Graziosi
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.