summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-cmpl.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-05-29 20:27:46 -0700
committerGlenn Morris <rgm@gnu.org>2013-05-29 20:27:46 -0700
commit2082faa6de65cf1594ec6e3a6622d45a2fc4ef97 (patch)
treef7faa5897d5958fccea3bd1ddc881f9e9c48e466 /lisp/eshell/em-cmpl.el
parent8d48f3f9618520f2f98656b2172343d9395ec5d2 (diff)
downloademacs-2082faa6de65cf1594ec6e3a6622d45a2fc4ef97.tar.gz
In Eshell, replace obsolete lisp-complete-symbol
* eshell/em-cmpl.el (eshell-complete-lisp-symbol): New function. (eshell-cmpl-initialize, eshell-complete-parse-arguments): Replace obsolete lisp-complete-symbol with eshell-complete-lisp-symbol.
Diffstat (limited to 'lisp/eshell/em-cmpl.el')
-rw-r--r--lisp/eshell/em-cmpl.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 426db3232ed..4b952e0ee39 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -243,6 +243,12 @@ to writing a completion function."
;;; Functions:
+(defun eshell-complete-lisp-symbol ()
+ "Try to complete the text around point as a Lisp symbol."
+ (interactive)
+ (let ((completion-at-point-functions '(lisp-completion-at-point)))
+ (completion-at-point)))
+
(defun eshell-cmpl-initialize ()
"Initialize the completions module."
(set (make-local-variable 'pcomplete-command-completion-function)
@@ -288,8 +294,8 @@ to writing a completion function."
(set (make-local-variable 'pcomplete-arg-quote-list)
eshell-special-chars-outside-quoting))) nil t)
(add-hook 'pcomplete-quote-arg-hook 'eshell-quote-backslash nil t)
- (define-key eshell-mode-map [(meta tab)] 'lisp-complete-symbol)
- (define-key eshell-mode-map [(meta control ?i)] 'lisp-complete-symbol)
+ (define-key eshell-mode-map [(meta tab)] 'eshell-complete-lisp-symbol)
+ (define-key eshell-mode-map [(meta control ?i)] 'eshell-complete-lisp-symbol)
(define-key eshell-command-map [(meta ?h)] 'eshell-completion-help)
(define-key eshell-command-map [tab] 'pcomplete-expand-and-complete)
(define-key eshell-command-map [(control ?i)]
@@ -347,7 +353,7 @@ to writing a completion function."
(setq begin (1+ (cadr delim))
args (eshell-parse-arguments begin end)))
((eq (car delim) ?\()
- (lisp-complete-symbol)
+ (eshell-complete-lisp-symbol)
(throw 'pcompleted t))
(t
(insert-and-inherit "\t")