emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114252: * eshell/em-cmpl.el: Undo accidental part o


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r114252: * eshell/em-cmpl.el: Undo accidental part of last commit.
Date: Thu, 12 Sep 2013 20:38:37 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114252
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2013-09-12 16:38:35 -0400
message:
  * eshell/em-cmpl.el: Undo accidental part of last commit.
modified:
  lisp/eshell/em-cmpl.el         emcmpl.el-20091113204419-o5vbwnq5f7feedwu-1854
=== modified file 'lisp/eshell/em-cmpl.el'
--- a/lisp/eshell/em-cmpl.el    2013-09-12 20:15:53 +0000
+++ b/lisp/eshell/em-cmpl.el    2013-09-12 20:38:35 +0000
@@ -297,16 +297,19 @@
   (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)]
     'pcomplete-expand-and-complete)
   (define-key eshell-command-map [space] 'pcomplete-expand)
   (define-key eshell-command-map [? ] 'pcomplete-expand)
-  (define-key eshell-mode-map [(control ?i)] 'pcomplete)
+  (define-key eshell-mode-map [tab] 'eshell-pcomplete)
+  (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete)
   (add-hook 'completion-at-point-functions
             #'pcomplete-completions-at-point nil t)
   ;; jww (1999-10-19): Will this work on anything but X?
-  (define-key eshell-mode-map (if (featurep 'xemacs) [iso-left-tab] [backtab])
-    'pcomplete-reverse)
+  (if (featurep 'xemacs)
+      (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
+    (define-key eshell-mode-map [backtab] 'pcomplete-reverse))
   (define-key eshell-mode-map [(meta ??)] 'pcomplete-list))
 
 (defun eshell-completion-command-name ()
@@ -455,7 +458,16 @@
                        (all-completions filename obarray 'functionp))
                   completions)))))))
 
-(define-obsolete-function-alias 'eshell-pcomplete 'completion-at-point)
+(defun eshell-pcomplete (&optional interactively)
+  "Eshell wrapper for `pcomplete'."
+  (interactive "p")
+  ;; Pretend to be pcomplete so that cycling works (bug#13293).
+  (setq this-command 'pcomplete)
+  (condition-case nil
+      (if interactively
+         (call-interactively 'pcomplete)
+       (pcomplete))
+    (text-read-only (completion-at-point)))) ; Workaround for bug#12838.
 
 (provide 'em-cmpl)
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]