mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 12:21:20 +00:00
Renames
This commit is contained in:
parent
2a0f9fef64
commit
26c05d08c4
9 changed files with 20 additions and 24 deletions
|
|
@ -158,19 +158,7 @@
|
||||||
(t (completing-read (format "Which %s? " prompt)
|
(t (completing-read (format "Which %s? " prompt)
|
||||||
collection nil nil initial-input)))))
|
collection nil nil initial-input)))))
|
||||||
|
|
||||||
(defun lls/prompt-tool (tool-regexp &optional directories)
|
(defun comp-dev/prompt-tool (tool-regexp &optional directories)
|
||||||
(let (;;(vertico-sort-function nil)
|
|
||||||
)
|
|
||||||
(my/completing-read tool-regexp
|
|
||||||
(lls/get-tool tool-regexp
|
|
||||||
(or (and (eq 'string (type-of directories))
|
|
||||||
(list directories))
|
|
||||||
directories))
|
|
||||||
(awhen (ti/current-tools-directory)
|
|
||||||
(concat (file-name-nondirectory it)
|
|
||||||
" ")))))
|
|
||||||
|
|
||||||
(defun lls/get-tool (tool-regexp &optional directories)
|
|
||||||
(cl-mapcan #'(lambda (dir)
|
(cl-mapcan #'(lambda (dir)
|
||||||
(when (file-exists-p dir)
|
(when (file-exists-p dir)
|
||||||
(when (string-match-p "/sim/sds11.*" dir)
|
(when (string-match-p "/sim/sds11.*" dir)
|
||||||
|
|
@ -178,3 +166,11 @@
|
||||||
(directory-files dir t tool-regexp)))
|
(directory-files dir t tool-regexp)))
|
||||||
(or directories
|
(or directories
|
||||||
(comp-dev/get-bin-dirs (comp-dev/get-config)))))
|
(comp-dev/get-bin-dirs (comp-dev/get-config)))))
|
||||||
|
|
||||||
|
(defun comp-dev/prompt-tool (tool-regexp &optional directories)
|
||||||
|
(let (;;(vertico-sort-function nil)
|
||||||
|
)
|
||||||
|
(my/completing-read tool-regexp
|
||||||
|
(comp-dev/prompt-tool tool-regexp
|
||||||
|
(or (and (eq 'string (type-of directories))
|
||||||
|
(list directories)))))))
|
||||||
|
|
|
||||||
|
|
@ -37,14 +37,14 @@
|
||||||
(list
|
(list
|
||||||
(string-join
|
(string-join
|
||||||
(list
|
(list
|
||||||
(lls/prompt-tool "clang$")
|
(comp-dev/prompt-tool "clang$")
|
||||||
file
|
file
|
||||||
"-target c29 -c -o"
|
"-target c29 -c -o"
|
||||||
temp-file)
|
temp-file)
|
||||||
" ")
|
" ")
|
||||||
(string-join
|
(string-join
|
||||||
(list
|
(list
|
||||||
(lls/prompt-tool "objdump$")
|
(comp-dev/prompt-tool "objdump$")
|
||||||
"-d"
|
"-d"
|
||||||
temp-file)
|
temp-file)
|
||||||
" "))
|
" "))
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
ll/c-file-action-map))
|
ll/c-file-action-map))
|
||||||
|
|
||||||
(defun ll/clang-output-disassemble-command (file)
|
(defun ll/clang-output-disassemble-command (file)
|
||||||
(let ((compiler (lls/prompt-tool "clang$"))
|
(let ((compiler (comp-dev/prompt-tool "clang$"))
|
||||||
(tmp-file (make-temp-file (file-name-sans-extension (file-name-nondirectory file)))))
|
(tmp-file (make-temp-file (file-name-sans-extension (file-name-nondirectory file)))))
|
||||||
(string-join
|
(string-join
|
||||||
(list (lls/get-clang-command-fun :compiler compiler
|
(list (lls/get-clang-command-fun :compiler compiler
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
(let ((end (aml/get-map-prop
|
(let ((end (aml/get-map-prop
|
||||||
(ll/get-c-action-map)
|
(ll/get-c-action-map)
|
||||||
action :end-state))
|
action :end-state))
|
||||||
(compiler (lls/prompt-tool (comp-dev/tool-name (comp-dev/get-config) 'compiler))))
|
(compiler (comp-dev/prompt-tool (comp-dev/tool-name (comp-dev/get-config) 'compiler))))
|
||||||
(string-join
|
(string-join
|
||||||
(list
|
(list
|
||||||
(when (y-or-n-p "Would you like to `rr record`? ")
|
(when (y-or-n-p "Would you like to `rr record`? ")
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
(defun ll/build-llc-command (file action &optional output pass)
|
(defun ll/build-llc-command (file action &optional output pass)
|
||||||
(lls/get-llc-command-fun :file file :action action :output output :pass pass
|
(lls/get-llc-command-fun :file file :action action :output output :pass pass
|
||||||
:llc (lls/prompt-tool "llc$")))
|
:llc (comp-dev/prompt-tool "llc$")))
|
||||||
|
|
||||||
(defun ll/ll-file-diff-action (file action) )
|
(defun ll/ll-file-diff-action (file action) )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
(defun ll/act-on-llvm-dump-file (fname)
|
(defun ll/act-on-llvm-dump-file (fname)
|
||||||
(let* ((action (aml/read-action-map ll/dump-file-action-map))
|
(let* ((action (aml/read-action-map ll/dump-file-action-map))
|
||||||
(command-flags (ll/dump-extract-command-flags (ll/dump-to-sh-file fname)))
|
(command-flags (ll/dump-extract-command-flags (ll/dump-to-sh-file fname)))
|
||||||
(clang (lls/prompt-tool "clang$")))
|
(clang (comp-dev/prompt-tool "clang$")))
|
||||||
(compilation-start
|
(compilation-start
|
||||||
(concat
|
(concat
|
||||||
(when (y-or-n-p "Would you like to `rr record`? ")
|
(when (y-or-n-p "Would you like to `rr record`? ")
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
(string-join it " ")))
|
(string-join it " ")))
|
||||||
|
|
||||||
(defun ll-tblgen/gen-command (file flags output-file build-dir)
|
(defun ll-tblgen/gen-command (file flags output-file build-dir)
|
||||||
(let ((bin (car (lls/get-tool "llvm-tblgen$" (list (expand-file-name "bin" build-dir))))))
|
(let ((bin (car (comp-dev/prompt-tool "llvm-tblgen$" (list (expand-file-name "bin" build-dir))))))
|
||||||
(format "%s %s %s %s"
|
(format "%s %s %s %s"
|
||||||
bin
|
bin
|
||||||
file
|
file
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
(defun ll/build-lit-command (file action)
|
(defun ll/build-lit-command (file action)
|
||||||
(format "%s %s %s"
|
(format "%s %s %s"
|
||||||
(lls/prompt-tool "llvm-lit")
|
(comp-dev/prompt-tool "llvm-lit")
|
||||||
(pcase action
|
(pcase action
|
||||||
('verbose "-v")
|
('verbose "-v")
|
||||||
('all "-a")
|
('all "-a")
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
(resolved
|
(resolved
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(or (gethash tool lookups)
|
(or (gethash tool lookups)
|
||||||
(aprog1 (lls/prompt-tool (concat tool "$"))
|
(aprog1 (comp-dev/prompt-tool (concat tool "$"))
|
||||||
(puthash tool it lookups))))))
|
(puthash tool it lookups))))))
|
||||||
(replace-match resolved nil nil res 1))))
|
(replace-match resolved nil nil res 1))))
|
||||||
it)
|
it)
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
|
|
||||||
(defun lls/lldb (binary)
|
(defun lls/lldb (binary)
|
||||||
(interactive
|
(interactive
|
||||||
(list (lls/prompt-tool (rx (or "clang" "llc") line-end))))
|
(list (comp-dev/prompt-tool (rx (or "clang" "llc") line-end))))
|
||||||
(realgud--lldb
|
(realgud--lldb
|
||||||
(format "lldb %s"
|
(format "lldb %s"
|
||||||
binary)))
|
binary)))
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((buf (current-buffer))
|
(let* ((buf (current-buffer))
|
||||||
(fname (buffer-file-name buf))
|
(fname (buffer-file-name buf))
|
||||||
(clang (lls/prompt-tool "clang$"))
|
(clang (comp-dev/prompt-tool "clang$"))
|
||||||
(command
|
(command
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(cond ((or compilation-minor-mode
|
(cond ((or compilation-minor-mode
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue