# HG changeset patch # User Richard M. Stallman # Date 826177990 0 # Node ID d392e3ffa1bb7b0547b3f2bc1cfbacdfbee5e86b # Parent f4cc1bc9ec2c9f5822599a7e382e22e43a82eefb (pascal-declaration-end): Now locates the end of a parameterlist correctly. (electric-pascal-tab): Never indented a line when pascal-tab-always-indent was set to nil. (pascal-indent-case): Now locates the end of a case-statement correctly. diff -r f4cc1bc9ec2c -r d392e3ffa1bb lisp/progmodes/pascal.el --- a/lisp/progmodes/pascal.el Wed Mar 06 19:20:09 1996 +0000 +++ b/lisp/progmodes/pascal.el Thu Mar 07 05:53:10 1996 +0000 @@ -244,7 +244,8 @@ "[:=]\\|\\(\\\\)\\|\\(\\\\)" (save-excursion (end-of-line 2) (point)) t)) (cond ((match-beginning 1) (setq nest (1+ nest))) - ((match-beginning 2) (setq nest (1- nest))))))) + ((match-beginning 2) (setq nest (1- nest))) + ((looking-at "[^(\n]+)") (setq nest 0)))))) (defun pascal-declaration-beg () @@ -427,7 +428,11 @@ (save-excursion (beginning-of-line) (pascal-indent-line)) - (insert "\t")) + (if (save-excursion + (skip-chars-backward " \t") + (bolp)) + (pascal-indent-line) + (insert "\t"))) (pascal-indent-command))) @@ -903,10 +908,12 @@ "^[ \t]*[^ \t,:]+[ \t]*\\(,[ \t]*[^ \t,:]+[ \t]*\\)*:" (marker-position end) 'move) (forward-char -1)) - (delete-horizontal-space) - (if (> (current-column) ind) - (setq ind (current-column))) - (pascal-end-of-statement)) + (if (< (point) (marker-position end)) + (progn + (delete-horizontal-space) + (if (> (current-column) ind) + (setq ind (current-column))) + (pascal-end-of-statement)))) (goto-char beg) (setq oldpos (marker-position end)) ;; Indent all case statements