# HG changeset patch # User Gerd Moellmann # Date 958675089 0 # Node ID cd57818019f816bb81cbf058ada87e17878d05a1 # Parent 8e49fb8ad58bdd49f795c2de9136020c66089384 (pascal-indent-alist, pascal-indent-comment): Changed the indent-comment function to just return the appropriate indent. diff -r 8e49fb8ad58b -r cd57818019f8 lisp/progmodes/pascal.el --- a/lisp/progmodes/pascal.el Thu May 18 17:57:46 2000 +0000 +++ b/lisp/progmodes/pascal.el Thu May 18 18:38:09 2000 +0000 @@ -1,8 +1,8 @@ ;;; pascal.el --- major mode for editing pascal source in Emacs -;; Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. -;; Author: Espen Skoglund +;; Author: Espen Skoglund ;; Keywords: languages ;; This file is part of GNU Emacs. @@ -55,8 +55,8 @@ ;; As far as I know, there are no bugs in the current version of this ;; package. This may not be true however, since I never use this mode ;; myself and therefore would never notice them anyway. If you do -;; find any bugs, you may submit them to: espensk@stud.cs.uit.no -;; as well as to bug-gnu-emacs@gnu.org. +;; find any bugs, you may submit them to: esk@gnu.org as well as to +;; bug-gnu-emacs@gnu.org. ;;; Code: @@ -784,7 +784,7 @@ (caseblock . ind) (cpp . 0) (declaration . (+ ind pascal-indent-level)) (paramlist . (pascal-indent-paramlist t)) - (comment . (pascal-indent-comment t)) + (comment . (pascal-indent-comment)) (defun . ind) (contexp . ind) (unknown . ind) (string . 0) (progbeg . 0))) @@ -955,16 +955,13 @@ (skip-chars-forward " \t") (current-column))) -(defun pascal-indent-comment (&optional arg) - "Indent current line as comment. -If optional arg is non-nil, just return the -column number the line should be indented to." - (let* ((stcol (save-excursion - (re-search-backward "(\\*\\|{" nil t) - (1+ (current-column))))) - (if arg stcol - (delete-horizontal-space) - (indent-to stcol)))) +(defun pascal-indent-comment () + "Return indent for current comment." + (save-excursion + (re-search-backward "\\((\\*\\)\\|{" nil t) + (if (match-beginning 1) + (1+ (current-column)) + (current-column)))) (defun pascal-indent-case () "Indent within case statements."