diff emacs/octave-mod.el @ 3069:db6d57d718f7

[project @ 1997-07-10 23:34:03 by jwe]
author jwe
date Thu, 10 Jul 1997 23:34:07 +0000
parents d21505cbcc58
children 8c779ed7979b
line wrap: on
line diff
--- a/emacs/octave-mod.el	Tue Jul 08 02:18:21 1997 +0000
+++ b/emacs/octave-mod.el	Thu Jul 10 23:34:07 1997 +0000
@@ -295,6 +295,9 @@
     (modify-syntax-entry ?\n ">"  table)
     (setq octave-mode-syntax-table table)))
 
+(defvar octave-auto-indent nil
+  "*Non-nil means automatically indent line after a semicolon or space.")
+
 (defvar octave-auto-newline nil
   "*Non-nil means automatically newline after a semicolon in Octave mode.")
 
@@ -401,6 +404,10 @@
 Variables you can use to customize Octave mode
 ==============================================
 
+octave-auto-indent
+  Non-nil means indent current line after a semicolon or space.
+  Default is nil.
+
 octave-auto-newline
   Non-nil means auto-insert a newline and indent after a semicolon.
   Default is nil.
@@ -1193,7 +1200,8 @@
     (if abbrev-mode (expand-abbrev))
     (if octave-blink-matching-block
 	(octave-blink-matching-block-open))
-    (indent-according-to-mode)    
+    (if octave-auto-indent
+	(indent-according-to-mode))
     (insert ";")
     (if octave-auto-newline
 	(newline-and-indent))))
@@ -1210,9 +1218,10 @@
     (if abbrev-mode (expand-abbrev))
     (if octave-blink-matching-block
 	(octave-blink-matching-block-open))
-    (if (save-excursion
-	  (skip-syntax-backward " ")
-	  (not (bolp)))
+    (if (and octave-auto-indent
+	     (save-excursion
+	       (skip-syntax-backward " ")
+	       (not (bolp))))
 	(indent-according-to-mode))
     (self-insert-command 1)))
 
@@ -1394,6 +1403,7 @@
     octave-maintainer-address
     (concat "Emacs version " emacs-version)
     (list
+     'octave-auto-indent
      'octave-auto-newline
      'octave-blink-matching-block
      'octave-block-offset