[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31061] 'end' keyword not recognized by emacs
From: |
Manjul Apratim |
Subject: |
[Octave-bug-tracker] [bug #31061] 'end' keyword not recognized by emacs as block delimiter in octave-mode |
Date: |
Fri, 17 Sep 2010 20:04:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10 |
URL:
<http://savannah.gnu.org/bugs/?31061>
Summary: 'end' keyword not recognized by emacs as block
delimiter in octave-mode
Project: GNU Octave
Submitted by: manzdagratiano
Submitted on: Fri 17 Sep 2010 08:04:08 PM GMT
Category: Configuration and Build System
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name: Manjul Apratim
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.3
Operating System: GNU/Linux
_______________________________________________________
Details:
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 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:
;; octave bindings
(autoload 'octave-mode "octave-mod" nil t)
(setq auto-mode-alist
(cons '("\\.m$" . octave-mode) auto-mode-alist))
(add-hook 'octave-mode-hook
(lambda ()
(abbrev-mode 1)
(auto-fill-mode 1)
(if (eq window-system 'x)
(font-lock-mode 1))))
(defun RET-behaves-as-LFD ()
(let ((x (key-binding "\C-j")))
(local-set-key "\C-m" x)))
(add-hook 'octave-mode-hook 'RET-behaves-as-LFD)
(setq octave-auto-indent t)
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 have noticed an older version of octave-mod.el on the website:
opensource.apple.com/source/emacs/emacs-41/emacs/lisp/progmodes/octave-mod.el
which I am also attaching here, in which the "end" keyword is explicitly
present in the octave-end-keywords list. Substituting this file for mine own,
however, did not work for me.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 17 Sep 2010 08:04:08 PM GMT Name: octave-mod.el Size: 100kB By:
manzdagratiano
octave-mod.el file from
opensource.apple.com/source/emacs/emacs-41/emacs/lisp/progmodes/
<http://savannah.gnu.org/bugs/download.php?file_id=21480>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31061>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31061] 'end' keyword not recognized by emacs as block delimiter in octave-mode,
Manjul Apratim <=