summaryrefslogtreecommitdiff
path: root/lisp/progmodes/octave-inf.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-08-07 14:58:44 +0000
committerMiles Bader <miles@gnu.org>2000-08-07 14:58:44 +0000
commit502166d288cfe6982a6386fda20ce1ed862f860a (patch)
tree879b1afa872e68b41c4330d0cd35a13a2b988619 /lisp/progmodes/octave-inf.el
parent69e773247b4fac5a7430f8446fe280b36850fb7a (diff)
downloademacs-502166d288cfe6982a6386fda20ce1ed862f860a.tar.gz
(inferior-octave-complete): Use comint-line-beginning-position.
Diffstat (limited to 'lisp/progmodes/octave-inf.el')
-rw-r--r--lisp/progmodes/octave-inf.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index aa3e8a2c134..0dd6bf99eb9 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -243,11 +243,10 @@ This is implemented using the Octave command `completion_matches' which
is NOT available with versions of Octave prior to 2.0."
(interactive)
(let* ((end (point))
- (command (save-excursion
- (skip-syntax-backward "w_")
- (and (looking-at comint-prompt-regexp)
- (goto-char (match-end 0)))
- (buffer-substring-no-properties (point) end)))
+ (command
+ (save-excursion
+ (skip-syntax-backward "w_" (comint-line-beginning-position))
+ (buffer-substring-no-properties (point) end)))
(proc (get-buffer-process inferior-octave-buffer))
(filter (process-filter proc)))
(cond (inferior-octave-complete-impossible