Commit graph

92 commits

Author SHA1 Message Date
Stefan Monnier
41bb375cc7 Fixes: debbugs:19250
* lisp/minibuffer.el (completion-table-dynamic): Add arg `switch-buffer'

and change default to stay in the minibuffer when called from
the minibuffer.
(lazy-completion-table): Use this new argument to preserve the
old behavior.

* lisp/progmodes/elisp-mode.el (elisp--local-variables): Don't burp on
incorrect lexical elements (bug#19250).
2014-12-03 13:42:20 -05:00
Stefan Monnier
7fe2ae6720 * lisp/progmodes/octave.el (inferior-octave-mode):
Set comint-input-ring-size to a number.

Fixes: debbugs:17912
2014-07-03 21:35:23 -04:00
Leo Liu
2e611da66e Don't break emacs <= 24.3 just yet
* progmodes/octave.el (completion-table-with-cache): Define if not
available.
(octave-goto-function-definition)
(octave-sync-function-file-names)
(octave-find-definition-default-filename): Backquote upattern for
compatibility.
2014-04-12 12:07:53 +08:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Leo Liu
9b335362d0 Re-implement the feature of showing eldoc info after editing.
* emacs-lisp/eldoc.el (eldoc-post-insert-mode): Remove.
(eldoc-edit-message-commands): New function.
(eldoc-print-after-edit): New variable.
(eldoc-pre-command-refresh-echo-area): Emit message only by
eldoc-message-commands.
(eldoc-mode): Restrict eldoc-message-commands to editing commands
if eldoc-print-after-edit is set. 

* progmodes/octave.el (octave-mode-menu): Adapt to change in
eldoc.

Fixes: debbugs:16346
2014-01-12 12:00:03 +08:00
Chong Yidong
cc33cac98a * progmodes/octave.el (octave-mode-menu): Don't assume eldoc is loaded. 2014-01-10 18:35:36 +08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Glenn Morris
bb0980751e Add missing custom :versions, plus small fixes
* emacs-lisp/smie.el (smie-config): Add type, version, initialize.

* bookmark.el (bookmark-bmenu-use-header-line):
* doc-view.el (doc-view-scale-internally):
* pcmpl-x.el (pcmpl-x-tlmgr-program, pcmpl-x-ack-program):
* register.el (register-preview-delay):
* net/shr.el (shr-bullet):
* progmodes/cfengine.el (cfengine-cf-promises)
(cfengine-parameters-indent):
* progmodes/octave.el (inferior-octave-error-regexp-alist):
* textmodes/reftex-vars.el (reftex-label-regexps):
* vc/log-edit.el (log-edit-setup-add-author): Add version.

* cedet/ede/linux.el (project-linux-build-directory-default)
(project-linux-architecture-default): Fix custom types.  Add version.

* gnus/gnus-icalendar.el (gnus-icalendar-org, gnus-icalendar):
* gnus/gnus-sum.el (gnus-subthread-sort-functions): Add version.
* gnus/gnus-sync.el (gnus-sync-file-encrypt-to): Add type and version.
2013-12-27 18:16:05 -08:00
Rüdiger Sonderfeld
51d971b429 octave-mode: Link to manual.
* lisp/progmodes/octave.el (octave): Add link to manual and octave
  homepage.
  (octave-mode-menu): Link to octave-mode manual.
2013-12-20 02:50:46 +01:00
Rüdiger Sonderfeld
ed4bc201f5 Import `octave-mode' manual from GNU Octave.
The manual was written by Kurt Hornik.  He agreed to assign the
copyright for it to the FSF.  I have updated and modified the manual.

* doc/misc/octave-mode.texi: Imported from GNU Octave
  (doc/interpreter/emacs.txi).
* doc/misc/Makefile.in: Add octave-mode.texi.
* lisp/progmodes/octave.el (octave-mode, inferior-octave-mode): Link
  to info manual and show keybindings and set `:group' keyword.
2013-12-11 14:50:46 +01:00
Leo Liu
b2856a6f7c * progmodes/octave.el (inferior-octave-prompt): Use shy groups.
(inferior-octave-startup): Always use "octave> " for prompt.
(octave-goto-function-definition)
(octave-sync-function-file-names)
(octave-find-definition-default-filename): Remove redundant backquotes.
2013-12-06 12:26:17 +08:00
Dmitry Gutov
16588fadd0 Add caching variant of `completion-table-dynamic'
* lisp/minibuffer.el (completion-table-with-cache): New function.

* lisp/progmodes/octave.el (inferior-octave-completion-table): Turn
back into function, use `completion-table-with-cache'.  Update all
references.

Fixes: debbugs:11906
2013-12-06 02:48:52 +02:00
Leo Liu
0518b057fe * subr.el (process-live-p): Return nil for non-process.
* progmodes/sh-script.el (sh-shell-process):
* progmodes/octave.el (inferior-octave-process-live-p):
* progmodes/gdb-mi.el (gdb-delchar-or-quit)
(gdb-inferior-io-sentinel):
* emacs-lock.el (emacs-lock-live-process-p): All uses changed.

Fixes: debbugs:16023
2013-12-02 15:13:01 +08:00
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