emacs-diffs
[Top][All Lists]
Advanced

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

master 600d3f0 1/2: Move pcomplete/bcc32 from eshell to pcmpl-x (Bug#105


From: Stefan Kangas
Subject: master 600d3f0 1/2: Move pcomplete/bcc32 from eshell to pcmpl-x (Bug#10585)
Date: Mon, 21 Sep 2020 14:47:03 -0400 (EDT)

branch: master
commit 600d3f0669742b398d91c421e335fc6680f6fdc0
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefan@marxist.se>

    Move pcomplete/bcc32 from eshell to pcmpl-x (Bug#10585)
    
    * lisp/eshell/em-xtra.el (pcomplete/bcc32, pcomplete/bcc): Move
    from here...
    * lisp/pcmpl-x.el (pcomplete/bcc32, pcomplete/bcc): ...to here.
---
 lisp/eshell/em-xtra.el | 30 ------------------------------
 lisp/pcmpl-x.el        | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 30 deletions(-)

diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el
index d55986c..3c038ed 100644
--- a/lisp/eshell/em-xtra.el
+++ b/lisp/eshell/em-xtra.el
@@ -94,36 +94,6 @@ naturally accessible within Emacs."
 (defalias 'eshell/ff 'find-name-dired)
 (defalias 'eshell/gf 'find-grep-dired)
 
-(defun pcomplete/bcc32 ()
-  "Completion function for Borland's C++ compiler."
-  (let ((cur (pcomplete-arg 0)))
-    (cond
-     ((string-match "\\`-w\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
-      (pcomplete-here
-       '("ali" "amb" "amp" "asc" "asm" "aus" "bbf" "bei" "big" "ccc"
-        "cln" "cod" "com" "cpt" "csu" "def" "dig" "dpu" "dsz" "dup"
-        "eas" "eff" "ext" "hch" "hid" "ias" "ibc" "ifr" "ill" "nil"
-        "lin" "lvc" "mcs" "mes" "mpc" "mpd" "msg" "nak" "ncf" "nci"
-        "ncl" "nfd" "ngu" "nin" "nma" "nmu" "nod" "nop" "npp" "nsf"
-        "nst" "ntd" "nto" "nvf" "obi" "obs" "ofp" "osh" "ovf" "par"
-        "pch" "pck" "pia" "pin" "pow" "prc" "pre" "pro" "rch" "ret"
-        "rng" "rpt" "rvl" "sig" "spa" "stl" "stu" "stv" "sus" "tai"
-        "tes" "thr" "ucp" "use" "voi" "zdi") (match-string 2 cur)))
-     ((string-match "\\`-[LIn]\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
-      (pcomplete-here (pcomplete-dirs) (match-string 2 cur)))
-     ((string-match "\\`-[Ee]\\(.*\\)\\'" cur)
-      (pcomplete-here (pcomplete-dirs-or-entries "\\.[Ee][Xx][Ee]\\'")
-                     (match-string 1 cur)))
-     ((string-match "\\`-o\\(.*\\)\\'" cur)
-      (pcomplete-here (pcomplete-dirs-or-entries "\\.[Oo][Bb][Jj]\\'")
-                     (match-string 1 cur)))
-     (t
-      (pcomplete-opt "3456ABCDEHIKLMNOPRSTUVXabcdefgijklnoptuvwxyz"))))
-  (while (pcomplete-here
-         (pcomplete-dirs-or-entries "\\.[iCc]\\([Pp][Pp]\\)?\\'"))))
-
-(defalias 'pcomplete/bcc 'pcomplete/bcc32)
-
 (provide 'em-xtra)
 
 ;; Local Variables:
diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el
index 5244ada..6e96a67 100644
--- a/lisp/pcmpl-x.el
+++ b/lisp/pcmpl-x.el
@@ -286,5 +286,37 @@ long options."
                                     (pcmpl-x-ag-options))))
       (pcomplete-here* (pcomplete-dirs-or-entries)))))
 
+;;;###autoload
+(defun pcomplete/bcc32 ()
+  "Completion function for Borland's C++ compiler."
+  (let ((cur (pcomplete-arg 0)))
+    (cond
+     ((string-match "\\`-w\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
+      (pcomplete-here
+       '("ali" "amb" "amp" "asc" "asm" "aus" "bbf" "bei" "big" "ccc"
+         "cln" "cod" "com" "cpt" "csu" "def" "dig" "dpu" "dsz" "dup"
+         "eas" "eff" "ext" "hch" "hid" "ias" "ibc" "ifr" "ill" "nil"
+         "lin" "lvc" "mcs" "mes" "mpc" "mpd" "msg" "nak" "ncf" "nci"
+         "ncl" "nfd" "ngu" "nin" "nma" "nmu" "nod" "nop" "npp" "nsf"
+         "nst" "ntd" "nto" "nvf" "obi" "obs" "ofp" "osh" "ovf" "par"
+         "pch" "pck" "pia" "pin" "pow" "prc" "pre" "pro" "rch" "ret"
+         "rng" "rpt" "rvl" "sig" "spa" "stl" "stu" "stv" "sus" "tai"
+         "tes" "thr" "ucp" "use" "voi" "zdi") (match-string 2 cur)))
+     ((string-match "\\`-[LIn]\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
+      (pcomplete-here (pcomplete-dirs) (match-string 2 cur)))
+     ((string-match "\\`-[Ee]\\(.*\\)\\'" cur)
+      (pcomplete-here (pcomplete-dirs-or-entries "\\.[Ee][Xx][Ee]\\'")
+                      (match-string 1 cur)))
+     ((string-match "\\`-o\\(.*\\)\\'" cur)
+      (pcomplete-here (pcomplete-dirs-or-entries "\\.[Oo][Bb][Jj]\\'")
+                      (match-string 1 cur)))
+     (t
+      (pcomplete-opt "3456ABCDEHIKLMNOPRSTUVXabcdefgijklnoptuvwxyz"))))
+  (while (pcomplete-here
+          (pcomplete-dirs-or-entries "\\.[iCc]\\([Pp][Pp]\\)?\\'"))))
+
+;;;###autoload
+(defalias 'pcomplete/bcc 'pcomplete/bcc32)
+
 (provide 'pcmpl-x)
 ;;; pcmpl-x.el ends here



reply via email to

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