From 017882c8db21b530216a4abd918c7abeb91beb96 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Sat, 22 Oct 2022 08:57:05 -0500 Subject: [PATCH] Stuff --- config-min.org | 2 +- lisp/switch-tabs.el | 11 +++++++++++ lisp/ti-config/libraries | 2 +- lisp/ti-config/work-asm-config.el | 24 +++++++++++++++++++++--- lisp/ti-config/work-config.el | 2 ++ 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/config-min.org b/config-min.org index bfefef3..3ad5413 100644 --- a/config-min.org +++ b/config-min.org @@ -480,7 +480,7 @@ "docs/dir" "docs/*.info" "docs/*.texi" "docs/*.texinfo" (:exclude ".dir-locals.el" "lisp/.dir-locals.el")))) - (quelpa 'cider :repo "pestctrl/cider" :branch "consecutive-overlays" :fetcher fetcher)) + (quelpa `(cider :repo "pestctrl/cider" :branch "consecutive-overlays" :fetcher ,fetcher))) (autoload 'cider--make-result-overlay "cider-overlays") (defun endless/eval-overlay (value point) diff --git a/lisp/switch-tabs.el b/lisp/switch-tabs.el index 99d8c99..324a3f2 100644 --- a/lisp/switch-tabs.el +++ b/lisp/switch-tabs.el @@ -105,6 +105,16 @@ (switch-or-create-tab temp-name) (tab-bar-rename-tab switch-tab))) +(defvar my/scratch-tab-number 0) + +(defun my/tab-bar-clone () + (interactive) + (let ((wc (current-window-configuration))) + (tab-bar-new-tab) + (tab-bar-rename-tab (format "*scratch-%d*" my/scratch-tab-number)) + (incf my/scratch-tab-number) + (set-window-configuration wc))) + (defun tab-bar-jump () (interactive) (let ((char (read-char "[e]macs-devel [s]cratch [o]rg"))) @@ -126,6 +136,7 @@ (define-key *tab-map* (kbd "h") (lambda () (interactive) (tab-bar-move-tab -1))) (define-key *tab-map* (kbd "l") (lambda () (interactive) (tab-bar-move-tab 1))) +(define-key *tab-map* (kbd "c") #'my/tab-bar-clone) (define-key *tab-map* (kbd "n") #'tab-bar-switch-to-next-tab) (define-key *tab-map* (kbd "s") #'my/tab-bar-swap-tabs) (define-key *tab-map* (kbd "p") #'tab-bar-switch-to-prev-tab) diff --git a/lisp/ti-config/libraries b/lisp/ti-config/libraries index d47b833..17e2fb8 160000 --- a/lisp/ti-config/libraries +++ b/lisp/ti-config/libraries @@ -1 +1 @@ -Subproject commit d47b833b654a21c2f58ccf01653dc21ca1bbfdbe +Subproject commit 17e2fb8442675bd9a3d03159231416dbc5ea7318 diff --git a/lisp/ti-config/work-asm-config.el b/lisp/ti-config/work-asm-config.el index 2305786..24429ab 100644 --- a/lisp/ti-config/work-asm-config.el +++ b/lisp/ti-config/work-asm-config.el @@ -73,14 +73,15 @@ (setq asm-font-lock-keywords `((,(rx line-start (group (>= 2 (any "0-9A-f"))) " " (group (+ (or (syntax word) (syntax symbol)))) symbol-end ":") (1 font-lock-warning-face) (2 font-lock-function-name-face)) - (,(rx line-start (group (>= 2 (any "0-9A-f"))) ":" (+ space) (group (+ (and (= 4 (any "0-9A-f")) (+ space))))) + (,(rx line-start (group (>= 2 (any "0-9A-f"))) ":" (* space) (group (+ " " (and (= 4 (any "0-9A-f")))))) (1 font-lock-warning-face) (2 font-lock-constant-face)) (,(rx line-start (* space) (* (+ (any "0-9A-f")) (+ (or ":" space))) (+ space) (optional "||" (+ space)) (group (+ (or (syntax word) (syntax symbol) ".")))) (1 font-lock-keyword-face)) (,(rx line-start (group (+ (or "." (syntax word) (syntax symbol)))) ":") (1 font-lock-function-name-face)) (,(rx "ADDR1") . font-lock-type-face) - (,(rx (or "TA" "TDM" "M" "A" "D") - (or (+ digit) ".GT" ".LT" ".EQ" ".HI") + (,(rx symbol-start + (or "TA" "TDM" "M" "A" "D") + (or (+ digit) ".GT" ".LT" ".EQ" ".HI" ".NEQ" ".MAP") (optional (or ".NZ" ".Z")) symbol-end) . font-lock-variable-name-face) @@ -98,5 +99,22 @@ (replace-regexp (rx (group (or alphanumeric ")")) "," (group (or alphanumeric "#" "*"))) "\\1, \\2"))) +(defun asm-narrow-to-function () + (interactive) + (let ((r (rx line-start (= 8 (any "0-9a-f")) " <" (not "$"))) + start end) + (save-excursion + (next-line) + (re-search-backward r) + (beginning-of-line) + (setq start (point)) + + (next-line) + (re-search-forward r) + (previous-line) + (beginning-of-line) + (setq end (point))) + (narrow-to-region start end))) + (provide 'work-asm-config) ;;; work-asm-config.el ends here diff --git a/lisp/ti-config/work-config.el b/lisp/ti-config/work-config.el index 5f4f2df..66fae97 100644 --- a/lisp/ti-config/work-config.el +++ b/lisp/ti-config/work-config.el @@ -31,10 +31,12 @@ (require 'ti-build-tool) (require 'ti-debug-compile) (require 'ti-tools-backup) +(require 'argo-fastsim-dump-mode) (add-to-list 'auto-mode-alist '("\\.map$" . ti-linker-map-mode)) (add-to-list 'auto-mode-alist '("\\.cdis$" . asm-mode)) (add-to-list 'auto-mode-alist '("\\.cmd$" . conf-mode)) +(add-to-list 'auto-mode-alist '("\\.fsdump$" . argo-fastsim-dump-mode)) ;; (setq url-proxy-services '(("http" . "http://webproxy.ext.ti.com:80") ;; ("https" . "http://webproxy.ext.ti.com:80")))