diff options
| author | Richard M. Stallman | 1998-07-03 20:10:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-07-03 20:10:32 +0000 |
| commit | 6acae80afeb561a9bd0be9e9f05c10e29f145f80 (patch) | |
| tree | 32e34959a677b4ed92c21acce6eabadb1b5382bc | |
| parent | c1c4693e692e3f8cae3290e24c96d905085234fe (diff) | |
| download | emacs-6acae80afeb561a9bd0be9e9f05c10e29f145f80.tar.gz emacs-6acae80afeb561a9bd0be9e9f05c10e29f145f80.zip | |
(pascal-insert-block): Fixed space-deletion bug in
front of the "begin" string.
(pascal-beg-of-defun): Used to locate the beginning of a function
incorrectly when a function contained several begin-end blocks. Fixed.
| -rw-r--r-- | lisp/progmodes/pascal.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 11ebe75b66c..cfada7cecdd 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; pascal.el --- major mode for editing pascal source in Emacs | 1 | ;;; pascal.el --- major mode for editing pascal source in Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993, 1994, 95, 96, 97, 1998 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Espen Skoglund <espensk@stud.cs.uit.no> | 5 | ;; Author: Espen Skoglund <espensk@stud.cs.uit.no> |
| 6 | ;; Keywords: languages | 6 | ;; Keywords: languages |
| @@ -481,11 +481,10 @@ no args, if that value is non-nil." | |||
| 481 | (defun pascal-insert-block () | 481 | (defun pascal-insert-block () |
| 482 | "Insert Pascal begin ... end; block in the code with right indentation." | 482 | "Insert Pascal begin ... end; block in the code with right indentation." |
| 483 | (interactive) | 483 | (interactive) |
| 484 | (pascal-indent-line) | ||
| 485 | (insert "begin") | 484 | (insert "begin") |
| 486 | (electric-pascal-terminate-line) | 485 | (electric-pascal-terminate-line) |
| 487 | (save-excursion | 486 | (save-excursion |
| 488 | (electric-pascal-terminate-line) | 487 | (newline) |
| 489 | (insert "end;") | 488 | (insert "end;") |
| 490 | (beginning-of-line) | 489 | (beginning-of-line) |
| 491 | (pascal-indent-line))) | 490 | (pascal-indent-line))) |
| @@ -610,7 +609,7 @@ area. See also `pascal-comment-area'." | |||
| 610 | (setq func (1+ func))) | 609 | (setq func (1+ func))) |
| 611 | (setq nest (1- nest))) | 610 | (setq nest (1- nest))) |
| 612 | ((match-end 3) ; function|procedure | 611 | ((match-end 3) ; function|procedure |
| 613 | (if (= 0 func) | 612 | (if (or (> nest 0) (= 0 func)) |
| 614 | (throw 'found t) | 613 | (throw 'found t) |
| 615 | (setq func (1- func))))))) | 614 | (setq func (1- func))))))) |
| 616 | nil)) | 615 | nil)) |