Commit graph

129 commits

Author SHA1 Message Date
Leo Liu
965bb23acf * progmodes/octave.el (inferior-octave-startup): Spit out error
message.
2013-11-22 22:17:48 +08:00
Leo Liu
2cc18f9382 * progmodes/octave.el (octave-kill-process): Don't ask twice
Fixes: debbugs:10564
2013-11-22 17:50:41 +08:00
Leo Liu
8c09f64b76 * progmodes/octave.el (octave-help-mode): Adapt to change to
help-mode-finish to use derived-mode-p on 2013-09-17.
(inferior-octave-prompt): Also match octave-gui.
2013-11-22 16:09:40 +08:00
Leo Liu
7a7567d2be * progmodes/octave.el (octave-operator-regexp): Exclude newline.
Fixes: debbugs:15076
2013-11-22 10:32:35 +08:00
Leo Liu
724bc26587 * progmodes/octave.el (inferior-octave-process-live-p): New helper.
(inferior-octave-startup, inferior-octave-check-process)
(inferior-octave-track-window-width-change)
(octave-completion-at-point, octave-eldoc-function): Use it.
(octave-kill-process): Provide confirmation.

Fixes: debbugs:10564
2013-11-22 10:02:42 +08:00
Leo Liu
38637ccae6 * progmodes/octave.el (octave-mode, inferior-octave-mode): Fix
obsolete variable comment-use-global-state.
2013-11-22 01:33:30 +08:00
Rüdiger Sonderfeld
06e752b48f * progmodes/octave.el (octave-mode-map, octave-mode-menu): Add
`octave-source-file'.
(octave-source-file): New function.

Fixes: debbugs:15935
2013-11-22 01:18:25 +08:00
Leo Liu
3eb91f7bf7 Small fix to last change 2013-10-25 08:52:26 +08:00
Rüdiger Sonderfeld
6408a65db5 * progmodes/octave.el (octave-lookfor): Handle empty lookfor
result.  Ask user to retry using '-all' flag.

Fixes: debbugs:15701
2013-10-25 08:49:33 +08:00
Leo Liu
6f6ab820c8 * progmodes/octave.el (octave-send-region): Call
compilation-forget-errors.
2013-10-05 10:45:24 +08:00
Leo Liu
939fb29cd9 * progmodes/octave.el (inferior-octave-mode): Call
compilation-forget-errors.
2013-10-04 23:11:13 +08:00
Leo Liu
1dab32a392 * progmodes/octave.el (inferior-octave-error-regexp-alist)
(inferior-octave-compilation-font-lock-keywords): New variables.
(compilation-error-regexp-alist)
(compilation-mode-font-lock-keywords): Defvar to pacify compiler.
(inferior-octave-mode): Use compilation-shell-minor-mode.
2013-10-04 17:45:25 +08:00
Rüdiger Sonderfeld
481a8e0f45 * progmodes/octave.el (inferior-octave-startup-file): Prefer
~/.emacs.d/init_octave.m.
2013-09-30 09:13:19 +08:00
Leo Liu
4d2e94d172 * progmodes/octave.el (inferior-octave-completion-table)
(inferior-octave-completion-at-point): Minor tweaks.
2013-09-28 11:15:56 +08:00
Rüdiger Sonderfeld
7e138a6216 * lisp/progmodes/octave.el (octave-mode-map): Bind octave-send-buffer.
(octave-mode-menu): Add octave-send-buffer.
(octave-send-buffer): New function.
2013-09-28 10:41:48 +08:00
Rüdiger Sonderfeld
5af5ed0865 * lisp/progmodes/octave.el (octave-mode-map): Add key binding for
octave-lookfor.
(octave-mode-menu): Add octave-lookfor.
(inferior-octave-mode-map, octave-help-mode-map): Bind C-ha to
octave-lookfor.
(octave-lookfor): New function.
2013-09-28 10:30:37 +08:00
Glenn Morris
30b626e980 * lisp/progmodes/octave.el (help-button-action): Declare. 2013-09-11 22:43:23 -07:00
Leo Liu
62efb35e42 * progmodes/octave.el (octave-mode): Backward compatibility fix. 2013-06-21 14:45:37 +08:00
Leo Liu
ad5281251b * progmodes/octave.el (octave-help): Fix regexp. 2013-06-19 10:02:30 +08:00
Leo Liu
cbb3eb522d Fix last change to octave.el 2013-06-12 10:58:03 +08:00
Leo Liu
daabf15ad8 * progmodes/octave.el (inferior-octave-startup)
(inferior-octave-completion-table)
(inferior-octave-track-window-width-change)
(octave-eldoc-function-signatures, octave-help)
(octave-find-definition): Use single quoted strings.
(inferior-octave-startup-args): Change default value.
(inferior-octave-startup): Do not hard code "-i" and
"--no-line-editing".
(inferior-octave-resync-dirs): Add optional arg NOERROR.
(inferior-octave-directory-tracker): Use it.
(octave-goto-function-definition): Robustify.
(octave-help): Support highlighting operators in 'See also'.
(octave-find-definition): Find subfunctions only in Octave mode.
2013-06-12 10:37:38 +08:00
Leo Liu
fda741250b * progmodes/octave.el (octave-add-log-current-defun): New function.
(octave-mode): Set add-log-current-defun-function.
(octave-goto-function-definition): Do not move point if not found.
(octave-find-definition): Enhance to try subfunctions first.
2013-06-08 21:35:55 +08:00
Leo Liu
ce8209d4fe * progmodes/octave.el (octave-function-header-regexp): Fix.
(octave-help-mode-finish-hook, octave-help-mode-finish):
Remove.  Just use temp-buffer-show-hook.

Fixes: debbugs:14570
2013-06-07 21:00:47 +08:00
Leo Liu
a175bf337a * newcomment.el (comment-search-backward): Revert last change.
* emacs-lisp/smie.el (smie--matching-block-data): Minor simplification.

* progmodes/octave.el (octave-mode): Set comment-use-global-state
to t.  (Bug#14303)

Fixes: debbugs:14434 debbugs:14303
2013-06-07 19:48:28 +08:00
Leo Liu
976cb06628 Re-implement smie matching block highlight using show-paren-data-function.
* emacs-lisp/smie.el (smie-matching-block-highlight)
(smie--highlight-matching-block-overlay)
(smie--highlight-matching-block-lastpos)
(smie-highlight-matching-block)
(smie-highlight-matching-block-mode): Remove.
(smie--matching-block-data-cache): New variable.
(smie--matching-block-data): New function.
(smie-setup): Use smie--matching-block-data for
show-paren-data-function.

* progmodes/octave.el (octave-mode-menu): Fix.
(octave-find-definition): Skip garbage lines.

Fixes: debbugs:14395
2013-06-05 15:40:02 +08:00
Leo Liu
c75c93c7ed * progmodes/octave.el (octave-mode-syntax-table): Give `.'
punctuation syntax.
(inferior-octave-minimal-columns)
(inferior-octave-last-column-width): New variables.
(inferior-octave-track-window-width-change): New function.
(inferior-octave-mode): Adjust column width so that Octave output,
for example from 'ls', can fit into the window nicely.
2013-06-01 11:38:36 +08:00
Leo Liu
f236dd8432 * lisp/emacs-lisp/smie.el (smie-highlight-matching-block): Always turn
off the highlight first.

* lisp/progmodes/octave.el (octave-indent-comment): Tweak regexps.
(octave-help): Small simplification.

* test/indent/octave.m: Tweak.
2013-05-29 14:50:48 +08:00
Leo Liu
837fd9af07 * progmodes/octave.el (inferior-octave-directory-tracker-resync):
New variable.
(inferior-octave-directory-tracker): Automatically re-sync
default-directory.
(octave-help): Improve handling of 'See also'.
2013-05-27 13:08:04 +08:00
Stefan Monnier
650cff3d87 * lisp/emacs-lisp/smie.el (smie-auto-fill): Rework to be more robust.
(smie-setup): Use add-function to set it.

* lisp/progmodes/octave.el (octave-smie-rules): Return nil rather than
0 after a semi-colon; it works better for smie-auto-fill.
(octave--indent-new-comment-line): New function.
(octave-indent-new-comment-line): Use it (indirectly).
(octave-mode): Don't disable smie-auto-fill.  Use add-function to
modify comment-line-break-function.
2013-05-24 15:37:55 -04:00
Leo Liu
85d090a95c * progmodes/octave.el (inferior-octave-startup): Fix bug#14433. 2013-05-22 23:28:42 +08:00
Leo Liu
3ac7cff4f4 Minor fix to last change 2013-05-22 07:19:03 +08:00
Leo Liu
ee44b62a9c * progmodes/octave.el (octave-mode-menu): Update and re-organize
menu items.
(octave-mode): Tweak fill-nobreak-predicate.
(inferior-octave-startup): Check process to avoid infinite loop.
(inferior-octave): Pop to buffer first to show abornmal process
exit information.
2013-05-22 07:05:16 +08:00
Leo Liu
9cc3e83f9d Simplify auto fill in Octave mode and some small improvements 2013-05-21 17:43:14 +08:00
Leo Liu
b4da2cbb0d Use octave-help-mode for the Octave Help buffer 2013-05-21 06:52:40 +08:00
Leo Liu
f6f87d33da Teach inferior-octave-startup to handle Octave > 3.7 2013-05-18 11:17:35 +08:00
Leo Liu
5e80b74f7a * progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR
instead.
(octave-source-directories): Don't check process.
(octave-source-directories, octave-find-definition): Doc fix.
2013-05-18 09:17:50 +08:00
Leo Liu
42caeb895d * newcomment.el (comment-search-backward): Stricter in finding
comment start. 

* progmodes/octave.el (octave-comment-start): Remove the SPC char.
(octave-comment-start-skip): Properly anchored.

Fixes: debbugs:14303
2013-05-18 06:46:10 +08:00
Leo Liu
c7a8fcacf9 * subr.el (delete-consecutive-dups): New function.
* ido.el (ido-set-matches-1): Use it.
* progmodes/octave.el (inferior-octave-completion-table): Use it.
* ido.el (ido-remove-consecutive-dups): Remove.
2013-05-17 10:43:41 +08:00
Leo Liu
2d4bf34b5b * progmodes/octave.el (octave-indent-defun): Mark obsolete.
(octave-mode-menu, octave-mode-map): Remove its uses.
2013-05-16 16:52:02 +08:00
Leo Liu
e3772e9833 * progmodes/octave.el (octave-goto-function-definition): Improve
and fix callers.
2013-05-15 16:17:22 +08:00
Leo Liu
6073d8f44a * progmodes/octave.el (octave-font-lock-texinfo-comment):
Fix invalid search bound error: wrong side of point.
2013-05-14 18:11:56 +08:00
Leo Liu
4d25fd7e52 * progmodes/octave.el (octave-font-lock-keywords): Fix error
during redisplay.
(octave-goto-function-definition, octave-find-definition): Minor tweaks.
2013-05-14 13:19:29 +08:00
Leo Liu
b0e069c2ac * progmodes/octave.el (octave-indent-comment): Fix indentation for %!.
(octave-comment-start-skip): Include %!.
(octave-mode): Set comment-start-skip to octave-comment-start-skip.
2013-05-13 15:24:22 +08:00
Leo Liu
f5a9432fa6 * progmodes/octave.el (octave-mode-map): Bind octave-indent-defun to
C-c C-q instead of C-M-q.
2013-05-13 09:36:42 +08:00
Leo Liu
2aeb3a1dba * progmodes/octave.el (octave-indent-comment): Fix the indentation
of ### or %%%.
2013-05-13 08:07:18 +08:00
Leo Liu
30ea8374a7 * progmodes/octave.el (inferior-octave-startup): Store the value
of __octave_srcdir__ for octave-source-directories.
(inferior-octave-check-process): New function refactored out of
inferior-octave-send-list-and-digest.
(octave-source-directories)
(octave-find-definition-filename-function): New variables.
(octave-source-directories)
(octave-find-definition-default-filename): New functions.
(octave-find-definition): Improve to find functions implemented in C++.
2013-05-12 12:10:40 +08:00
Leo Liu
c8730c3abe * progmodes/octave.el (octave-indent-comment): Improve.
(octave-eldoc-message-style, octave-eldoc-cache): New variables.
(octave-eldoc-function-signatures, octave-eldoc-function): New
functions.
(octave-mode, inferior-octave-mode): Add eldoc support.
2013-05-11 21:22:06 +08:00
Leo Liu
6980b0cabf * progmodes/octave.el (octave-begin-keywords, octave-end-keywords)
(octave-reserved-words, octave-smie-bnf-table)
(octave-smie-rules): Add new keywords from Octave 3.6.4.
2013-05-11 15:39:59 +08:00
Leo Liu
9dbdb67ed9 * progmodes/octave.el (octave-indent-comment): New function.
(octave-mode): Use it in smie-indent-functions.

Fixes: debbugs:14350
2013-05-11 14:20:10 +08:00
Leo Liu
083fe0d743 * progmodes/octave.el (octave-beginning-of-line)
(octave-end-of-line): Check before using up-list because it jumps
out of more syntactic contructs since moving to smie.
2013-05-11 11:50:34 +08:00