]> code.delx.au - gnu-emacs/commitdiff
In Eshell, replace obsolete lisp-complete-symbol
authorGlenn Morris <rgm@gnu.org>
Thu, 30 May 2013 03:27:46 +0000 (20:27 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 30 May 2013 03:27:46 +0000 (20:27 -0700)
* 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.

lisp/ChangeLog
lisp/eshell/em-cmpl.el

index 66e8c227d1e116a84d3afe714f152ec0ca34c9dc..81ec34951b229c20efd9325f27bb923f2ee68852 100644 (file)
@@ -1,5 +1,9 @@
 2013-05-30  Glenn Morris  <rgm@gnu.org>
 
+       * 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.
+
        * image.el (image-animated-p): Tweak definition.
 
        * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh.
index 426db3232ed1f96df2ab414d1065e2731a62d7c5..4b952e0ee394142d38e13714dccea423935c3c25 100644 (file)
@@ -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")