Commit 2e952aac authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 65953053
...@@ -244,7 +244,8 @@ Pascal program are completed runtime and should not be added to this list.") ...@@ -244,7 +244,8 @@ Pascal program are completed runtime and should not be added to this list.")
"[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)"
(save-excursion (end-of-line 2) (point)) t)) (save-excursion (end-of-line 2) (point)) t))
(cond ((match-beginning 1) (setq nest (1+ nest))) (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 () (defun pascal-declaration-beg ()
...@@ -427,7 +428,11 @@ no args, if that value is non-nil." ...@@ -427,7 +428,11 @@ no args, if that value is non-nil."
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(pascal-indent-line)) (pascal-indent-line))
(insert "\t")) (if (save-excursion
(skip-chars-backward " \t")
(bolp))
(pascal-indent-line)
(insert "\t")))
(pascal-indent-command))) (pascal-indent-command)))
...@@ -903,10 +908,12 @@ column number the line should be indented to." ...@@ -903,10 +908,12 @@ column number the line should be indented to."
"^[ \t]*[^ \t,:]+[ \t]*\\(,[ \t]*[^ \t,:]+[ \t]*\\)*:" "^[ \t]*[^ \t,:]+[ \t]*\\(,[ \t]*[^ \t,:]+[ \t]*\\)*:"
(marker-position end) 'move) (marker-position end) 'move)
(forward-char -1)) (forward-char -1))
(delete-horizontal-space) (if (< (point) (marker-position end))
(if (> (current-column) ind) (progn
(setq ind (current-column))) (delete-horizontal-space)
(pascal-end-of-statement)) (if (> (current-column) ind)
(setq ind (current-column)))
(pascal-end-of-statement))))
(goto-char beg) (goto-char beg)
(setq oldpos (marker-position end)) (setq oldpos (marker-position end))
;; Indent all case statements ;; Indent all case statements
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment