unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7060: 23.2; emacs does not recognize the "end" keyword as a block-delimiter in octave-mode
@ 2010-09-17 21:31 Manjul Apratim
  2010-09-18  0:42 ` Stefan Monnier
  2010-09-18 19:32 ` Manjul Apratim
  0 siblings, 2 replies; 3+ messages in thread
From: Manjul Apratim @ 2010-09-17 21:31 UTC (permalink / raw)
  To: 7060

[-- Attachment #1: Type: text/plain, Size: 7414 bytes --]

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:

;; 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 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

Load-path shadows:
/usr/share/emacs/23.2/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/23.2/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/23.2/lisp/textmodes/ispell
/usr/share/emacs/23.2/site-lisp/octave3.2-emacsen/octave-inf hides
/usr/share/emacs/23.2/lisp/progmodes/octave-inf
/usr/share/emacs/23.2/site-lisp/octave3.2-emacsen/octave-mod hides
/usr/share/emacs/23.2/lisp/progmodes/octave-mod

Features:
(shadow sort mail-extr message 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 easymenu octave-mod paren
cua-base cus-start cus-load 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)

[-- Attachment #2: Type: text/html, Size: 9265 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-18 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 21:31 bug#7060: 23.2; emacs does not recognize the "end" keyword as a block-delimiter in octave-mode Manjul Apratim
2010-09-18  0:42 ` Stefan Monnier
2010-09-18 19:32 ` Manjul Apratim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).