bug#7060: 23.2; emacs does not recognize the "end" keyword as a block-de
From:
Manjul Apratim
Subject:
bug#7060: 23.2; emacs does not recognize the "end" keyword as a block-delimiter in octave-mode
Date:
Fri, 17 Sep 2010 17:31:33 -0400
Message-ID: <878w3083wr.fsf@chaar.i-did-not-set--mail-host-address--so-tickle-me> --text follows this line--
emacs does not recognize the "end" keyword as a block-delimiter in octave-mode. Upon inspecting the file octave-mod.el, I see the following line before
the variable "octave-end-keywords":
";; FIXME: only use specific "end" tokens here to avoid confusion when "end" ;; is used in indexing (the real fix is much more complex)."
I could not ascertain what the fix was, but I tried manually appending the "end" keyword in the "octave-end-keywords" list as well as the "octave-block-match-alist" environment, and I still could not get the
"end" keyword to be recognized. I did not understand why this was so because upon doing a find for "endif" on the file, one sees that "endif" occurs exactly thrice - once for a short-cut, and once each in the
above-mentioned environments, and putting the "end" keyword on the same footing as "endif" would be naively expected to work (also "endwhile" and "endfor"). I have the following in the my .emacs file:
Specifically, I want the "end" keyword to indent properly because I have to write matlab-compatible code - the University server I submit jobs on has matlab installed on it and the sysadmin is reluctant to install
octave there. I can obtain matlab from my University for free, but I refuse to do so and I would rather continue to work in octave. Similarly, I would rather not use 'matlab-mode' and stick to 'octave-mode' instead.
I have come across certain previous versions of octave-mod.el, and they seem to contain the "end" keyword alongwith the other octave-end-keywords. I tried to replace my original octave-mod.el file with one of those old files - specifically, one at (disdainfully on
an apple site, but no immediate alternatives were available): opensource.apple.com/source/emacs/emacs-41/emacs/lisp/progmodes/octave-mod.el
but that did not help either, and though all the other keywords still behaved the same, the "end" keyword was still not recognized.
I also apologize for not sending the email directly from emacs, since I did not have my smtp settings
configured at this time.
Sincerely,
Manjul Apratim
In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-09-01 on rutherfordium, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
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.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t
Major mode: Octave
Minor modes in effect: show-paren-mode: t
cua-mode: t 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 font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t
auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t
Recent input: <next> <next> <next> <next> <next> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <next> <next> <prior> <prior> <prior> <prior> <prior>
<prior> <help-echo> <down-mouse-1> x <mouse-1> <down-mouse-1> <mouse-movement> x <drag-mouse-1> <down-mouse-1> x <mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1>
x <double-mouse-1> <down-mouse-1> x <mouse-1> <down-mouse-1> <mouse-1> C-x M-x <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> M-x <help-echo> r e p o r t - e m a c s -
b u g <return>
Recent messages: Loading debian-ispell... Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done Loading debian-ispell...done Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done Loading /etc/emacs/site-start.d/50octave3.2-emacsen.el (source)...done Loading cua-base...done Loading paren...done For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set