aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2020-09-02 02:34:43 +0200
committerStefan Kangas2020-09-21 20:38:56 +0200
commit600d3f0669742b398d91c421e335fc6680f6fdc0 (patch)
tree9d66e92fe3f82a893fb0cabe649825a4e6e1add3
parent9fff5491c30189c8446cd03fe7d80a13b20d69d3 (diff)
downloademacs-600d3f0669742b398d91c421e335fc6680f6fdc0.tar.gz
emacs-600d3f0669742b398d91c421e335fc6680f6fdc0.zip
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.
-rw-r--r--lisp/eshell/em-xtra.el30
-rw-r--r--lisp/pcmpl-x.el32
2 files changed, 32 insertions, 30 deletions
diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el
index d55986c49b8..3c038edfd18 100644
--- a/lisp/eshell/em-xtra.el
+++ b/lisp/eshell/em-xtra.el
@@ -94,36 +94,6 @@ naturally accessible within Emacs."
94(defalias 'eshell/ff 'find-name-dired) 94(defalias 'eshell/ff 'find-name-dired)
95(defalias 'eshell/gf 'find-grep-dired) 95(defalias 'eshell/gf 'find-grep-dired)
96 96
97(defun pcomplete/bcc32 ()
98 "Completion function for Borland's C++ compiler."
99 (let ((cur (pcomplete-arg 0)))
100 (cond
101 ((string-match "\\`-w\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
102 (pcomplete-here
103 '("ali" "amb" "amp" "asc" "asm" "aus" "bbf" "bei" "big" "ccc"
104 "cln" "cod" "com" "cpt" "csu" "def" "dig" "dpu" "dsz" "dup"
105 "eas" "eff" "ext" "hch" "hid" "ias" "ibc" "ifr" "ill" "nil"
106 "lin" "lvc" "mcs" "mes" "mpc" "mpd" "msg" "nak" "ncf" "nci"
107 "ncl" "nfd" "ngu" "nin" "nma" "nmu" "nod" "nop" "npp" "nsf"
108 "nst" "ntd" "nto" "nvf" "obi" "obs" "ofp" "osh" "ovf" "par"
109 "pch" "pck" "pia" "pin" "pow" "prc" "pre" "pro" "rch" "ret"
110 "rng" "rpt" "rvl" "sig" "spa" "stl" "stu" "stv" "sus" "tai"
111 "tes" "thr" "ucp" "use" "voi" "zdi") (match-string 2 cur)))
112 ((string-match "\\`-[LIn]\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
113 (pcomplete-here (pcomplete-dirs) (match-string 2 cur)))
114 ((string-match "\\`-[Ee]\\(.*\\)\\'" cur)
115 (pcomplete-here (pcomplete-dirs-or-entries "\\.[Ee][Xx][Ee]\\'")
116 (match-string 1 cur)))
117 ((string-match "\\`-o\\(.*\\)\\'" cur)
118 (pcomplete-here (pcomplete-dirs-or-entries "\\.[Oo][Bb][Jj]\\'")
119 (match-string 1 cur)))
120 (t
121 (pcomplete-opt "3456ABCDEHIKLMNOPRSTUVXabcdefgijklnoptuvwxyz"))))
122 (while (pcomplete-here
123 (pcomplete-dirs-or-entries "\\.[iCc]\\([Pp][Pp]\\)?\\'"))))
124
125(defalias 'pcomplete/bcc 'pcomplete/bcc32)
126
127(provide 'em-xtra) 97(provide 'em-xtra)
128 98
129;; Local Variables: 99;; Local Variables:
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."
286 (pcmpl-x-ag-options)))) 286 (pcmpl-x-ag-options))))
287 (pcomplete-here* (pcomplete-dirs-or-entries))))) 287 (pcomplete-here* (pcomplete-dirs-or-entries)))))
288 288
289;;;###autoload
290(defun pcomplete/bcc32 ()
291 "Completion function for Borland's C++ compiler."
292 (let ((cur (pcomplete-arg 0)))
293 (cond
294 ((string-match "\\`-w\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
295 (pcomplete-here
296 '("ali" "amb" "amp" "asc" "asm" "aus" "bbf" "bei" "big" "ccc"
297 "cln" "cod" "com" "cpt" "csu" "def" "dig" "dpu" "dsz" "dup"
298 "eas" "eff" "ext" "hch" "hid" "ias" "ibc" "ifr" "ill" "nil"
299 "lin" "lvc" "mcs" "mes" "mpc" "mpd" "msg" "nak" "ncf" "nci"
300 "ncl" "nfd" "ngu" "nin" "nma" "nmu" "nod" "nop" "npp" "nsf"
301 "nst" "ntd" "nto" "nvf" "obi" "obs" "ofp" "osh" "ovf" "par"
302 "pch" "pck" "pia" "pin" "pow" "prc" "pre" "pro" "rch" "ret"
303 "rng" "rpt" "rvl" "sig" "spa" "stl" "stu" "stv" "sus" "tai"
304 "tes" "thr" "ucp" "use" "voi" "zdi") (match-string 2 cur)))
305 ((string-match "\\`-[LIn]\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
306 (pcomplete-here (pcomplete-dirs) (match-string 2 cur)))
307 ((string-match "\\`-[Ee]\\(.*\\)\\'" cur)
308 (pcomplete-here (pcomplete-dirs-or-entries "\\.[Ee][Xx][Ee]\\'")
309 (match-string 1 cur)))
310 ((string-match "\\`-o\\(.*\\)\\'" cur)
311 (pcomplete-here (pcomplete-dirs-or-entries "\\.[Oo][Bb][Jj]\\'")
312 (match-string 1 cur)))
313 (t
314 (pcomplete-opt "3456ABCDEHIKLMNOPRSTUVXabcdefgijklnoptuvwxyz"))))
315 (while (pcomplete-here
316 (pcomplete-dirs-or-entries "\\.[iCc]\\([Pp][Pp]\\)?\\'"))))
317
318;;;###autoload
319(defalias 'pcomplete/bcc 'pcomplete/bcc32)
320
289(provide 'pcmpl-x) 321(provide 'pcmpl-x)
290;;; pcmpl-x.el ends here 322;;; pcmpl-x.el ends here