summaryrefslogtreecommitdiff
path: root/lisp/progmodes/octave-inf.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-06-20 12:02:31 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-06-20 12:02:31 -0400
commitbcd70d976f1035f84f55fa6969b9c0c419b7cc06 (patch)
tree50dc843ae8030ef911c788a795f3b14d689045a7 /lisp/progmodes/octave-inf.el
parentaebf69c8b3dc592ea315c187feb5f69b884a850e (diff)
downloademacs-bcd70d976f1035f84f55fa6969b9c0c419b7cc06.tar.gz
emacs-bcd70d976f1035f84f55fa6969b9c0c419b7cc06.tar.bz2
emacs-bcd70d976f1035f84f55fa6969b9c0c419b7cc06.zip
Use completion-at-point rather than completion-in-region.
* lisp/wid-edit.el: Use lexical scoping and move towards completion-at-point. (widget-complete): Use new :completion-function property. (widget-completions-at-point): New function. (default): Use :completion-function instead of :complete. (widget-default-completions): Rename from widget-default-complete, rewrite. (widget-string-complete, widget-file-complete, widget-color-complete): Remove functions. (file, symbol, function, variable, coding-system, color): * lisp/international/mule-cmds.el (default-input-method, charset) (language-info-custom-alist): * lisp/cus-edit.el (face): Use new property :completions. * lisp/progmodes/pascal.el (pascal-completions-at-point): New function. (pascal-mode): Use it. (pascal-mode-map): Use completion-at-point. (pascal-toggle-completions): Make obsolete. (pascal-complete-word, pascal-show-completions): * lisp/progmodes/octave-mod.el (octave-complete-symbol): Redefine as obsolete alias. * lisp/progmodes/octave-inf.el (inferior-octave-completion-at-point): Signal absence of completion info for old Octave, (inferior-octave-complete): Redefine as obsolete alias. * lisp/progmodes/meta-mode.el: Use lexical-binding and completion-at-point. (meta-completions-at-point): Rename from meta-complete-symbol and adapt it for use on completion-at-point-functions. (meta-common-mode): Use it. (meta-looking-at-backward, meta-match-buffer): Remove. (meta-complete-symbol): Redefine as obsolete alias. (meta-common-mode-map): Use completion-at-point. * lisp/progmodes/make-mode.el: Use lexical-binding and completion-at-point. (makefile-mode-map): Use completion-at-point. (makefile-completions-at-point): Rename from makefile-complete and adapt it for use on completion-at-point-functions. (makefile-mode): Use it. (makefile-complete): Redefine as obsolete alias.
Diffstat (limited to 'lisp/progmodes/octave-inf.el')
-rw-r--r--lisp/progmodes/octave-inf.el23
1 files changed, 8 insertions, 15 deletions
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 803a542563c..cb64b2436c6 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -267,8 +267,12 @@ startup file, `~/.emacs-octave'."
(save-excursion
(skip-syntax-backward "w_" (comint-line-beginning-position))
(point))))
- (cond (inferior-octave-complete-impossible nil)
- ((eq start end) nil)
+ (cond ((eq start end) nil)
+ (inferior-octave-complete-impossible
+ (message (concat
+ "Your Octave does not have `completion_matches'. "
+ "Please upgrade to version 2.X."))
+ nil)
(t
(list
start end
@@ -279,19 +283,8 @@ startup file, `~/.emacs-octave'."
(sort (delete-dups inferior-octave-output-list)
'string-lessp))))))))
-(defun inferior-octave-complete ()
- "Perform completion on the Octave symbol preceding point.
-This is implemented using the Octave command `completion_matches' which
-is NOT available with versions of Octave prior to 2.0."
- (interactive)
- (if inferior-octave-complete-impossible
- (error (concat
- "Your Octave does not have `completion_matches'. "
- "Please upgrade to version 2.X."))
- (let ((data (inferior-octave-completion-at-point)))
- (if (null data)
- (message "Cannot complete an empty string")
- (apply #'completion-in-region data)))))
+(define-obsolete-function-alias 'inferior-octave-complete
+ 'completion-at-point "24.1")
(defun inferior-octave-dynamic-list-input-ring ()
"List the buffer's input history in a help buffer."