summaryrefslogtreecommitdiff
path: root/lisp/pcmpl-x.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2020-09-02 02:34:43 +0200
committerStefan Kangas <stefan@marxist.se>2020-09-21 20:38:56 +0200
commit600d3f0669742b398d91c421e335fc6680f6fdc0 (patch)
tree9d66e92fe3f82a893fb0cabe649825a4e6e1add3 /lisp/pcmpl-x.el
parent9fff5491c30189c8446cd03fe7d80a13b20d69d3 (diff)
downloademacs-600d3f0669742b398d91c421e335fc6680f6fdc0.tar.gz
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.
Diffstat (limited to 'lisp/pcmpl-x.el')
-rw-r--r--lisp/pcmpl-x.el32
1 files changed, 32 insertions, 0 deletions
diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el
index 5244ada5231..6e96a67b7b2 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