aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon South2010-07-14 22:34:47 -0400
committerSimon South2010-07-14 22:34:47 -0400
commita11b38eea2c4a15ecdaa29dcb66161e9d1143c05 (patch)
tree0e30d7a7a09b865f934e3ab1ed9221a5bacdd055
parent077e075349cd013dbef8761f692bb79be45907d7 (diff)
downloademacs-a11b38eea2c4a15ecdaa29dcb66161e9d1143c05.tar.gz
emacs-a11b38eea2c4a15ecdaa29dcb66161e9d1143c05.zip
(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.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/delphi.el5
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 13990c03203..32fa19c26a9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12010-07-15 Simon South <ssouth@member.fsf.org>
2
3 * progmodes/delphi.el (delphi-token-at): Give newlines precedence
4 over literal tokens when parsing so newlines aren't "absorbed" by
5 single-line comments. Corrects the indentation of case blocks
6 that have a comment on the first line.
7
12010-07-14 Karl Fogel <kfogel@red-bean.com> 82010-07-14 Karl Fogel <kfogel@red-bean.com>
2 9
3 * bookmark.el (bookmark-load-hook): Fix doc string as suggested 10 * bookmark.el (bookmark-load-hook): Fix doc string as suggested
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.")
628(defun delphi-token-at (p) 628(defun delphi-token-at (p)
629 ;; Returns the token from parsing text at point p. 629 ;; Returns the token from parsing text at point p.
630 (when (and (<= (point-min) p) (<= p (point-max))) 630 (when (and (<= (point-min) p) (<= p (point-max)))
631 (cond ((delphi-literal-token-at p)) 631 (cond ((delphi-char-token-at p ?\n 'newline))
632
633 ((delphi-literal-token-at p))
632 634
633 ((delphi-space-token-at p)) 635 ((delphi-space-token-at p))
634 636
@@ -638,7 +640,6 @@ routine.")
638 ((delphi-char-token-at p ?\) 'close-group)) 640 ((delphi-char-token-at p ?\) 'close-group))
639 ((delphi-char-token-at p ?\[ 'open-group)) 641 ((delphi-char-token-at p ?\[ 'open-group))
640 ((delphi-char-token-at p ?\] 'close-group)) 642 ((delphi-char-token-at p ?\] 'close-group))
641 ((delphi-char-token-at p ?\n 'newline))
642 ((delphi-char-token-at p ?\; 'semicolon)) 643 ((delphi-char-token-at p ?\; 'semicolon))
643 ((delphi-char-token-at p ?. 'dot)) 644 ((delphi-char-token-at p ?. 'dot))
644 ((delphi-char-token-at p ?, 'comma)) 645 ((delphi-char-token-at p ?, 'comma))