Emacs delphi-mode Updated
Posted in Programming on July 15th, 2010 by Simon – 1 CommentI’ve checked in two fixes to GNU Emacs‘ delphi-mode (a major mode for editing Borland Delphi source code) that improve the way case statements are indented.
- Case statements are now indented correctly when the first line ends with a single-line comment, as in the example below.
case Gender of // A comment here used to break indentation 'M': Writeln('Male'); 'F': Writeln('Female'); end; - Indentation now works correctly for records containing a variant part, which is defined using a case statement within the record declaration. Thanks to Guillermo R. Palavecino who reported the problem.
type TEmployee = record LastName, FirstName: String; case FullTime: Boolean of True: (Salary: Currency); False: (Wage: Currency); end;
The changes are in Bazaar now and should be included in the next release of Emacs.