[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6829: M-; doesn't comment lines in Octave mode
From: |
Stefan Monnier |
Subject: |
bug#6829: M-; doesn't comment lines in Octave mode |
Date: |
Thu, 12 Aug 2010 12:49:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> In Octave mode, select a line or several lines of code.
> I would expect M-; would comment the lines, or uncomment
> them if they are already commented out. Instead, Octave
> starts a comment at the end of the line the comment is on,
> which is the behavior I would expect if no lines were selected.
I've installed the patch below into trunk, which should fix this problem.
Stefan
=== modified file 'lisp/progmodes/octave-mod.el'
--- lisp/progmodes/octave-mod.el 2010-05-20 15:12:20 +0000
+++ lisp/progmodes/octave-mod.el 2010-08-12 10:44:34 +0000
@@ -194,7 +194,6 @@
(define-key map ";" 'octave-electric-semi)
(define-key map " " 'octave-electric-space)
(define-key map "\n" 'octave-reindent-then-newline-and-indent)
- (define-key map "\e;" 'octave-indent-for-comment)
(define-key map "\e\n" 'octave-indent-new-comment-line)
(define-key map "\e\t" 'octave-complete-symbol)
(define-key map "\M-\C-a" 'octave-beginning-of-defun)
@@ -507,6 +506,7 @@
(setq comment-start-skip "\\s<+\\s-*")
(make-local-variable 'comment-indent-function)
(setq comment-indent-function 'octave-comment-indent)
+ (set (make-local-variable 'comment-add) 1)
(make-local-variable 'parse-sexp-ignore-comments)
(setq parse-sexp-ignore-comments t)