*** dcl-mode-19960412.el Thu Jun 20 15:55:30 1996 --- dcl-mode-19960615.el Thu Jun 20 15:55:43 1996 *************** *** 2,8 **** ;; Author: Odd Gripenstam ;; Maintainer: Odd Gripenstam ! ;; Last modified: 96-04-12 ;; Keywords: DCL editing major-mode languages ;;; Commentary: --- 2,8 ---- ;; Author: Odd Gripenstam ;; Maintainer: Odd Gripenstam ! ;; Last modified: 96-06-15 ;; Keywords: DCL editing major-mode languages ;;; Commentary: *************** *** 38,61 **** ;; the version I use in Emacs 19.30. (It was *so* much easier to hook ;; into that version than the one in 19.27...) ;; ! ;; This is my first try at Emacs Lisp programming, and I am also a recent ! ;; convert from DEC TPU, so there are probably some bugs and bad style ! ;; in this code. ! ;; It was developed on Linux with Emacs 19.27.1 and used on VMS 6.1 with ! ;; Emacs 19.28 ;; ! ;; I'm interested in feedback on: ! ;; * bugs - naturally ! ;; * unexepected functionality - do the existing functions behave as ! ;; is expected in a major mode? ! ;; * missing functionality - what else is needed to make it a good ! ;; major mode? ! ;; * your customizations. ! ;; E.g. if you write functions for dcl-calc-command-indent-function or ! ;; dcl-calc-cont-indent-function, please send them to the maintainer. ! ;; * Emacs lisp style - as I said, I'm a beginner. ! ;; * English language spelling, grammar and style - English is my ! ;; second language, and it's a *long* time since I went to school... ;; ;; ;; Ideas for improvement: --- 38,49 ---- ;; the version I use in Emacs 19.30. (It was *so* much easier to hook ;; into that version than the one in 19.27...) ;; ! ;; This package was developed on Linux with Emacs 19.27.1 and used on ! ;; VMS 6.1 with Emacs 19.28 ;; ! ;; Any feedback will be welcomed. If you write functions for ! ;; dcl-calc-command-indent-function or dcl-calc-cont-indent-function, ! ;; please send them to the maintainer. ;; ;; ;; Ideas for improvement: *************** *** 113,118 **** --- 101,109 ---- ;; Added save-option functions. Made comment-multi-line local. ;; Added support for imenu. ;; Odd Gripenstam 19960412 + ;; * dcl-guess-option now suggests margin offset after a + ;; subroutine statement. + ;; Odd Gripenstam 19960615 ;; ;;; Code: *************** *** 1645,1651 **** (beginning-of-line) (looking-at "^\\$[ \t]*!")) "dcl-comment-line-regexp") ! ;; Margin offset ;; Test this before label indentation to detect a subroutine ((save-excursion (beginning-of-line) --- 1636,1642 ---- (beginning-of-line) (looking-at "^\\$[ \t]*!")) "dcl-comment-line-regexp") ! ;; Margin offset: subroutine statement or first line in buffer ;; Test this before label indentation to detect a subroutine ((save-excursion (beginning-of-line) *************** *** 1653,1658 **** --- 1644,1657 ---- "subroutine")) (save-excursion (not (dcl-backward-command t))))) + "dcl-margin-offset") + ;; Margin offset: on command line after subroutine statement + ((save-excursion + (beginning-of-line) + (and (eq (dcl-get-line-type) '$) + (dcl-backward-command) + (looking-at (concat "^\\$[ \t]*" dcl-label-r dcl-ws-r + "subroutine")))) "dcl-margin-offset") ;; Label indentation ((save-excursion