GNU bug report logs - #6829
M-; doesn't comment lines in Octave mode

Previous Next

Package: emacs;

Reported by: Steve Chapel <steven.chapel <at> gmail.com>

Date: Mon, 9 Aug 2010 02:54:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6829 in the body.
You can then email your comments to 6829 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6829; Package emacs. (Mon, 09 Aug 2010 02:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Chapel <steven.chapel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 Aug 2010 02:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steve Chapel <steven.chapel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: M-; doesn't comment lines in Octave mode
Date: Sun, 08 Aug 2010 22:08:41 -0400
 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.


In GNU Emacs 23.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.20.1)
 of 2010-05-13 on x86-07.phx2.fedoraproject.org
configured using `configure  '--build=x86_64-redhat-linux-gnu' 
'--host=x86_64-re
dhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' 
'--prefix=/u
sr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' 
'--sysconfdir
=/etc' '--datadir=/usr/share' '--includedir=/usr/include' 
'--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var' 
'--sharedstatedir=/var/lib' '
--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' 
'--with-gif'
'--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' 
'--with-xpm'
 '--with-x-toolkit=gtk' 'build_alias=x86_64-redhat-linux-gnu' 
'host_alias=x86_64
-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SO
URCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 
-mtune=gene
ric''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 1 ; 2 4 0 1 ; 0 c ESC x r e p o TAB r t TAB
RET

Recent messages:
("emacs")
Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el 
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el 
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el 
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el 
(source)..
.done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message idna sendmail regexp-opt ecomplete rfc822
mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode
easymenu view tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Thu, 12 Aug 2010 13:10:04 GMT) Full text and rfc822 format available.

Notification sent to Steve Chapel <steven.chapel <at> gmail.com>:
bug acknowledged by developer. (Thu, 12 Aug 2010 13:10:04 GMT) Full text and rfc822 format available.

Message #10 received at 6829-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Steve Chapel <steven.chapel <at> gmail.com>
Subject: Re: bug#6829: M-; doesn't comment lines in Octave mode
Date: Thu, 12 Aug 2010 12:49:57 +0200
>  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)





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Sep 2010 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.