aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann2000-05-18 18:38:09 +0000
committerGerd Moellmann2000-05-18 18:38:09 +0000
commit9f92e5d9c5dc1a4dd15c13e6ceafab748550cbe5 (patch)
tree1088c9ef7ae7841442e201003dbf66dc2b2ca562 /lisp
parent68e6c83ac0d780ee6eea56593c59f589cad2ca36 (diff)
downloademacs-9f92e5d9c5dc1a4dd15c13e6ceafab748550cbe5.tar.gz
emacs-9f92e5d9c5dc1a4dd15c13e6ceafab748550cbe5.zip
(pascal-indent-alist, pascal-indent-comment): Changed
the indent-comment function to just return the appropriate indent.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/pascal.el27
1 files changed, 12 insertions, 15 deletions
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 8efed79af82..1464923b7d5 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1,8 +1,8 @@
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, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc.
4 4
5;; Author: Espen Skoglund <espensk@stud.cs.uit.no> 5;; Author: Espen Skoglund <esk@gnu.org>
6;; Keywords: languages 6;; Keywords: languages
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
@@ -55,8 +55,8 @@
55;; As far as I know, there are no bugs in the current version of this 55;; As far as I know, there are no bugs in the current version of this
56;; package. This may not be true however, since I never use this mode 56;; package. This may not be true however, since I never use this mode
57;; myself and therefore would never notice them anyway. If you do 57;; myself and therefore would never notice them anyway. If you do
58;; find any bugs, you may submit them to: espensk@stud.cs.uit.no 58;; find any bugs, you may submit them to: esk@gnu.org as well as to
59;; as well as to bug-gnu-emacs@gnu.org. 59;; bug-gnu-emacs@gnu.org.
60 60
61;;; Code: 61;;; Code:
62 62
@@ -784,7 +784,7 @@ on the line which ends a function or procedure named NAME."
784 (caseblock . ind) (cpp . 0) 784 (caseblock . ind) (cpp . 0)
785 (declaration . (+ ind pascal-indent-level)) 785 (declaration . (+ ind pascal-indent-level))
786 (paramlist . (pascal-indent-paramlist t)) 786 (paramlist . (pascal-indent-paramlist t))
787 (comment . (pascal-indent-comment t)) 787 (comment . (pascal-indent-comment))
788 (defun . ind) (contexp . ind) 788 (defun . ind) (contexp . ind)
789 (unknown . ind) (string . 0) (progbeg . 0))) 789 (unknown . ind) (string . 0) (progbeg . 0)))
790 790
@@ -955,16 +955,13 @@ Do not count labels, case-statements or records."
955 (skip-chars-forward " \t") 955 (skip-chars-forward " \t")
956 (current-column))) 956 (current-column)))
957 957
958(defun pascal-indent-comment (&optional arg) 958(defun pascal-indent-comment ()
959 "Indent current line as comment. 959 "Return indent for current comment."
960If optional arg is non-nil, just return the 960 (save-excursion
961column number the line should be indented to." 961 (re-search-backward "\\((\\*\\)\\|{" nil t)
962 (let* ((stcol (save-excursion 962 (if (match-beginning 1)
963 (re-search-backward "(\\*\\|{" nil t) 963 (1+ (current-column))
964 (1+ (current-column))))) 964 (current-column))))
965 (if arg stcol
966 (delete-horizontal-space)
967 (indent-to stcol))))
968 965
969(defun pascal-indent-case () 966(defun pascal-indent-case ()
970 "Indent within case statements." 967 "Indent within case statements."