# HG changeset patch # User Simon South # Date 1279161287 14400 # Node ID c232035b5f441b523672292509e3cd67f9c7f1c5 # Parent 3fcc8637a88722651cb44bd8596d9ba5cc038c36 (delphi-token-at): Give newlines precedence over literal tokens when parsing so newlines aren't "absorbed" by single-line comments. Corrects the indentation of case blocks that have a comment on the first line. diff -r 3fcc8637a887 -r c232035b5f44 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jul 14 15:09:28 2010 -0400 +++ b/lisp/ChangeLog Wed Jul 14 22:34:47 2010 -0400 @@ -1,3 +1,10 @@ +2010-07-15 Simon South + + * progmodes/delphi.el (delphi-token-at): Give newlines precedence + over literal tokens when parsing so newlines aren't "absorbed" by + single-line comments. Corrects the indentation of case blocks + that have a comment on the first line. + 2010-07-14 Karl Fogel * bookmark.el (bookmark-load-hook): Fix doc string as suggested diff -r 3fcc8637a887 -r c232035b5f44 lisp/progmodes/delphi.el --- a/lisp/progmodes/delphi.el Wed Jul 14 15:09:28 2010 -0400 +++ b/lisp/progmodes/delphi.el Wed Jul 14 22:34:47 2010 -0400 @@ -628,7 +628,9 @@ (defun delphi-token-at (p) ;; Returns the token from parsing text at point p. (when (and (<= (point-min) p) (<= p (point-max))) - (cond ((delphi-literal-token-at p)) + (cond ((delphi-char-token-at p ?\n 'newline)) + + ((delphi-literal-token-at p)) ((delphi-space-token-at p)) @@ -638,7 +640,6 @@ ((delphi-char-token-at p ?\) 'close-group)) ((delphi-char-token-at p ?\[ 'open-group)) ((delphi-char-token-at p ?\] 'close-group)) - ((delphi-char-token-at p ?\n 'newline)) ((delphi-char-token-at p ?\; 'semicolon)) ((delphi-char-token-at p ?. 'dot)) ((delphi-char-token-at p ?, 'comma))