]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/octave-mod.el
(ido-enable-prefix): Improve previous doc fix.
[gnu-emacs] / lisp / progmodes / octave-mod.el
index 2053dd8f9c228679f72b89b76e2096756952efe2..57941db9691c66cf713450cc5e9b54dca8f937d1 100644 (file)
@@ -1,10 +1,11 @@
 ;;; octave-mod.el --- editing Octave source files under Emacs
 
-;; Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Free Software Foundation, Inc.
 
-;; Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
+;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
 ;; Author: John Eaton <jwe@bevo.che.wisc.edu>
-;; Maintainer: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
+;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
 ;; Keywords: languages
 
 ;; This file is part of GNU Emacs.
@@ -44,6 +45,7 @@
 
 (defgroup octave nil
   "Major mode for editing Octave source files."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defvar inferior-octave-output-list nil)
@@ -51,7 +53,7 @@
 (defvar inferior-octave-receive-in-progress nil)
 
 (defconst octave-maintainer-address
-  "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@gnu.org"
+  "Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>, bug-gnu-emacs@gnu.org"
   "Current maintainer of the Emacs Octave package.")
 
 (defvar octave-abbrev-table nil
@@ -730,7 +732,10 @@ If there is no comment already on this line, create a code-level comment
 comment (started by one comment character) otherwise.
 Point is left after the start of the comment which is properly aligned."
   (interactive)
-  (indent-for-comment)
+  (beginning-of-line)
+  (if (looking-at "^\\s-*$")
+      (insert octave-block-comment-start)
+    (indent-for-comment))
   (indent-according-to-mode))
 
 (defun octave-indent-line (&optional arg)
@@ -1251,7 +1256,7 @@ variables."
             ;; Taken from comint.el
             (message "Making completion list...")
             (with-output-to-temp-buffer "*Completions*"
-              (display-completion-list list))
+              (display-completion-list list string))
             (message "Hit space to flush")
             (let (key first)
               (if (save-excursion
@@ -1309,7 +1314,8 @@ Maybe expand abbrevs and blink matching block open keywords.
 Reindent the line of `octave-auto-indent' is non-nil."
   (interactive)
   (setq last-command-char ? )
-  (if (not (octave-not-in-string-or-comment-p))
+  (if (and octave-auto-indent
+          (not (octave-not-in-string-or-comment-p)))
       (progn
        (indent-according-to-mode)
        (self-insert-command 1))