Commit graph

129 commits

Author SHA1 Message Date
Leo Liu
f71c50d026 * progmodes/octave.el (inferior-octave-completion-table): No
longer a function and all uses changed.  Use cache to speed up
completion due to bug#11906.
(octave-beginning-of-defun): Re-write to be more general.
2013-05-10 14:26:42 +08:00
Leo Liu
455851dd0c * progmodes/octave.el (inferior-octave-completion-at-point):
Restore the broken file completion. 
(inferior-octave-startup): Fix incorrect highlighting for the
first prompt.

Fixes: debbugs:14300
2013-05-09 08:52:49 +08:00
Leo Liu
150194c32f * progmodes/octave.el (octave-smie-forward-token): Fix typo. 2013-05-07 12:53:31 +08:00
Stefan Monnier
ceb57e5997 * lisp/progmodes/octave.el (octave-smie-forward-token): Be more careful
about implicit semi-colons.

Fixes: debbugs:14218
2013-05-07 00:05:43 -04:00
Leo Liu
203a557223 * progmodes/octave.el (octave-syntax-propertize-function): Change
\'s syntax to escape when inside double-quoted strings. 
(octave-font-lock-keywords): Use octave-operator-regexp.
(octave-completion-at-point): Renamed from
octave-completion-at-point-function.
(inferior-octave-directory-tracker): Robustify.
(octave-text-functions): Remove and fix its uses.  No such things
any more.

Fixes: debbugs:14332
2013-05-07 07:46:07 +08:00
Stefan Monnier
1e2c18dfbd * lisp/progmodes/octave.el (octave-texinfo-font-lock-keywords): Remove.
(octave-font-lock-texinfo-comment): Use texinfo-font-lock-keywords with
some tweaks, instead.
2013-05-05 22:29:42 -04:00
Leo Liu
02502a5fd2 * progmodes/octave.el (octave-font-lock-keywords)
(octave-font-lock-texinfo-comment): Adjust for the byte-compiler.
(inferior-octave-send-list-and-digest): Improve error message.
(octave-mode, inferior-octave-mode): Use setq-local.
(octave-help): Set info-lookup-mode.
2013-05-05 23:29:51 +08:00
Leo Liu
c129b51f4b * progmodes/octave.el (inferior-octave-strip-ctrl-g)
(inferior-octave-output-filter): Remove.
(octave-send-region, inferior-octave-startup): Fix callers.
(inferior-octave-mode-map): Don't use comint-dynamic-complete.
(octave-binary-file-extensions): New user variable.
(octave-find-definition): Confirm if opening binary files.
(octave-help-file): Use octave-find-definition to get the binary
confirmation.
(octave-help): Adjust for octave-help-file change.
2013-05-05 12:49:27 +08:00
Leo Liu
d74a158186 * progmodes/octave.el (user-error): Alias to error if not defined. 2013-05-03 15:52:17 +08:00
Leo Liu
d4d0f9b31a * progmodes/octave.el (octave-completing-read)
(octave-goto-function-definition): New helpers.
(octave-help-buffer): New user variable.
(octave-help-file, octave-help-function): New button types.
(octave-help): New command and bind it to C-h ;.
(octave-find-definition): New command and bind it to M-.
2013-05-03 15:22:26 +08:00
Leo Liu
b54f978b83 * progmodes/octave.el (octave-font-lock-keywords): Do not
dehighlight 'end' in comments or strings.
2013-05-03 12:47:08 +08:00
Leo Liu
271350180c * progmodes/octave.el (octave-mode-syntax-table): Correct syntax
for \. 
(octave-font-lock-keywords): Include [ and {.

Fixes: debbugs:14332
2013-05-03 07:03:00 +08:00
Leo Liu
0d634d3a3c * progmodes/octave.el (inferior-octave-startup-file): Change default.
(inferior-octave): Remove calling comint-mode and return the buffer.
(inferior-octave-startup): Cosmetic changes.
2013-05-03 05:34:53 +08:00
Leo Liu
b4c8295e81 * progmodes/octave.el (octave-syntax-propertize-function): Include
the case when ' is at line beginning.

Fixes: debbugs:14336
2013-05-03 05:27:16 +08:00
Leo Liu
2640d52e4e * progmodes/octave.el: Compatible with older emacs-24 releases. 2013-05-02 01:25:03 +08:00
Leo Liu
d8ef28b19d * progmodes/octave.el (inferior-octave-has-built-in-variables):
Remove.  Buil-in variables were removed from Octave in 2007.
(inferior-octave-startup): Fix uses.
(comint-line-beginning-position): Remove compatibility code for
emacs 21.
2013-05-02 00:42:18 +08:00
Leo Liu
9b92c13baa * progmodes/octave.el (octave-abbrev-table): Remove abbrev
definitions.  Use completion-at-point to insert keywords.
(octave-abbrev-start): Remove.
(inferior-octave-mode, octave-mode): Use :abbrev-table instead.
2013-05-01 14:13:20 +08:00
Leo Liu
b12d33d7e4 * progmodes/octave.el (inferior-octave-prompt-read-only): Fix last
change.
2013-05-01 00:27:36 +08:00
Rüdiger Sonderfeld
5147fc1773 * progmodes/octave.el (inferior-octave-prompt-read-only): New user
variable.
2013-04-30 23:20:46 +08:00
Leo Liu
5b78d7fcc7 * progmodes/octave.el (octave-variables): Remove. No builtin
variables any more.  All converted to functions.
(octave-font-lock-keywords, octave-completion-at-point-function):
Fix uses.
(octave-font-lock-texinfo-comment): New user variable.
(octave-texinfo-font-lock-keywords): New variable for texinfo
comment block.
(octave-function-comment-block): New face.
(octave-font-lock-texinfo-comment): New function.
(octave-mode): Font lock texinfo comment block.
2013-04-30 22:23:03 +08:00
Leo Liu
38d8527bab * progmodes/octave.el (octave-font-lock-keywords): Handle 'end' in
indexing expression.
(octave-continuation-string): Do not use \.
(inferior-octave-complete-impossible): Remove.
(inferior-octave-completion-table)
(inferior-octave-completion-at-point): Remove its uses.
(inferior-octave-startup): completion_matches was introduced to
Octave in 1996 so safe to assume it.
(octave-function-file-comment): Improve to follow how Octave does it.
(octave-update-function-file-comment): Tweak.
2013-04-30 04:09:18 +08:00
Leo Liu
2ec12cb0f0 * progmodes/octave.el (inferior-octave-startup-hook): Obsolete.
(inferior-octave-startup): Remove inferior-octave-startup-hook.
(octave-function-file-comment): Fix typo.
(octave-sync-function-file-names): Use read-char-choice.
2013-04-29 12:37:36 +08:00
Leo Liu
b7260dd49c * files.el (basic-save-buffer): Don't let errors in
before-save-hook prevent saving buffer.

* progmodes/octave.el (octave-function-file-p)
(octave-skip-comment-forward, octave-function-file-comment)
(octave-update-function-file-comment): New functions.
(octave-mode-map): Bind C-c ; to
octave-update-function-file-comment.
(octave-mode-menu): Add octave-update-function-file-comment.
(octave-mode, inferior-octave-mode): Fix doc-string.
(octave-insert-defun): Conform to Octave's coding convention.

Fixes: debbugs:14285
2013-04-28 01:07:01 +08:00
Leo Liu
ff7210d55b * progmodes/octave.el (octave-sync-function-file-names): Fix last
change.
2013-04-27 01:11:04 +08:00
Leo Liu
e55d3b0408 * progmodes/octave.el (octave-sync-function-file-names): New function.
(octave-mode): Use it in before-save-hook.
2013-04-27 00:44:38 +08:00
Stefan Monnier
e53052d3bf * lisp/progmodes/octave.el (octave-smie-forward-token): Properly skip
\n and comment, even if it's not an implicit ;.

Fixes: debbugs:14218
2013-04-26 10:34:26 -04:00
Leo Liu
070ccca42d * progmodes/octave.el (octave-submit-bug-report): Obsolete.
(octave-mode, inferior-octave-mode): Use setq-local.
(octave-not-in-string-or-comment-p): Renamed to
octave-in-string-or-comment-p.
(octave-in-comment-p, octave-in-string-p)
(octave-in-string-or-comment-p): Replace defsubst with defun.
2013-04-26 12:16:37 +08:00
Leo Liu
584ea27747 * progmodes/octave.el (octave-completion-at-point-function): Make
use of inferior octave process.
(octave-initialize-completions): Remove.
(inferior-octave-completion-table): New function.
(inferior-octave-completion-at-point): Use it.
(octave-completion-alist): Remove.
2013-04-26 00:23:56 +08:00
Leo Liu
be64c05d81 Merge octave-mod.el and octave-inf.el into octave.el with some
cleanups.

* progmodes/octave.el: New file renamed from octave-mod.el.
* progmodes/octave-inf.el: Merged into octave.el.
* progmodes/octave-mod.el: Renamed to octave.el.
2013-04-25 22:51:08 +08:00
Renamed from lisp/progmodes/octave-mod.el (Browse further)