aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-05-29 20:27:46 -0700
committerGlenn Morris2013-05-29 20:27:46 -0700
commit2082faa6de65cf1594ec6e3a6622d45a2fc4ef97 (patch)
treef7faa5897d5958fccea3bd1ddc881f9e9c48e466
parent8d48f3f9618520f2f98656b2172343d9395ec5d2 (diff)
downloademacs-2082faa6de65cf1594ec6e3a6622d45a2fc4ef97.tar.gz
emacs-2082faa6de65cf1594ec6e3a6622d45a2fc4ef97.zip
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.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/eshell/em-cmpl.el12
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 66e8c227d1e..81ec34951b2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12013-05-30 Glenn Morris <rgm@gnu.org> 12013-05-30 Glenn Morris <rgm@gnu.org>
2 2
3 * eshell/em-cmpl.el (eshell-complete-lisp-symbol): New function.
4 (eshell-cmpl-initialize, eshell-complete-parse-arguments):
5 Replace obsolete lisp-complete-symbol with eshell-complete-lisp-symbol.
6
3 * image.el (image-animated-p): Tweak definition. 7 * image.el (image-animated-p): Tweak definition.
4 8
5 * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh. 9 * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh.
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."
243 243
244;;; Functions: 244;;; Functions:
245 245
246(defun eshell-complete-lisp-symbol ()
247 "Try to complete the text around point as a Lisp symbol."
248 (interactive)
249 (let ((completion-at-point-functions '(lisp-completion-at-point)))
250 (completion-at-point)))
251
246(defun eshell-cmpl-initialize () 252(defun eshell-cmpl-initialize ()
247 "Initialize the completions module." 253 "Initialize the completions module."
248 (set (make-local-variable 'pcomplete-command-completion-function) 254 (set (make-local-variable 'pcomplete-command-completion-function)
@@ -288,8 +294,8 @@ to writing a completion function."
288 (set (make-local-variable 'pcomplete-arg-quote-list) 294 (set (make-local-variable 'pcomplete-arg-quote-list)
289 eshell-special-chars-outside-quoting))) nil t) 295 eshell-special-chars-outside-quoting))) nil t)
290 (add-hook 'pcomplete-quote-arg-hook 'eshell-quote-backslash nil t) 296 (add-hook 'pcomplete-quote-arg-hook 'eshell-quote-backslash nil t)
291 (define-key eshell-mode-map [(meta tab)] 'lisp-complete-symbol) 297 (define-key eshell-mode-map [(meta tab)] 'eshell-complete-lisp-symbol)
292 (define-key eshell-mode-map [(meta control ?i)] 'lisp-complete-symbol) 298 (define-key eshell-mode-map [(meta control ?i)] 'eshell-complete-lisp-symbol)
293 (define-key eshell-command-map [(meta ?h)] 'eshell-completion-help) 299 (define-key eshell-command-map [(meta ?h)] 'eshell-completion-help)
294 (define-key eshell-command-map [tab] 'pcomplete-expand-and-complete) 300 (define-key eshell-command-map [tab] 'pcomplete-expand-and-complete)
295 (define-key eshell-command-map [(control ?i)] 301 (define-key eshell-command-map [(control ?i)]
@@ -347,7 +353,7 @@ to writing a completion function."
347 (setq begin (1+ (cadr delim)) 353 (setq begin (1+ (cadr delim))
348 args (eshell-parse-arguments begin end))) 354 args (eshell-parse-arguments begin end)))
349 ((eq (car delim) ?\() 355 ((eq (car delim) ?\()
350 (lisp-complete-symbol) 356 (eshell-complete-lisp-symbol)
351 (throw 'pcompleted t)) 357 (throw 'pcompleted t))
352 (t 358 (t
353 (insert-and-inherit "\t") 359 (insert-and-inherit "\t")