summaryrefslogtreecommitdiff
path: root/lisp/progmodes/delphi.el
diff options
context:
space:
mode:
authorSimon South <ssouth@member.fsf.org>2010-07-14 22:34:47 -0400
committerSimon South <ssouth@member.fsf.org>2010-07-14 22:34:47 -0400
commita11b38eea2c4a15ecdaa29dcb66161e9d1143c05 (patch)
tree0e30d7a7a09b865f934e3ab1ed9221a5bacdd055 /lisp/progmodes/delphi.el
parent077e075349cd013dbef8761f692bb79be45907d7 (diff)
downloademacs-a11b38eea2c4a15ecdaa29dcb66161e9d1143c05.tar.gz
(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.
Diffstat (limited to 'lisp/progmodes/delphi.el')
-rw-r--r--lisp/progmodes/delphi.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 1e5f1f506b3..03f74a42fd7 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -628,7 +628,9 @@ routine.")
(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 @@ routine.")
((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))