Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optional renamimg of compilation buffer #3

Merged
merged 5 commits into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fpga-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ BUF-NAME determines the name of the compilation buffer."
`(define-compilation-mode ,name ,desc ,docstring
(setq-local compilation-error-regexp-alist (mapcar #'car ,compile-re))
(setq-local compilation-error-regexp-alist-alist ,compile-re)
(rename-buffer ,buf-name)
(when ,buf-name (rename-buffer ,buf-name))
(setq truncate-lines t)
(goto-char (point-max))))

Expand All @@ -166,7 +166,7 @@ COMP-MODE is the name of the compilation derived mode created by macro
(declare (indent 1) (debug 1))
`(defun ,name (command)
,docstring
(when (get-buffer ,buf)
(when (and ,buf (get-buffer ,buf))
(if (y-or-n-p (format "Buffer %s is in use, kill its process and start new compilation?" ,buf))
(kill-buffer ,buf)
(user-error "Aborted")))
Expand Down Expand Up @@ -231,7 +231,7 @@ FONT-LOCK-KWDS determine syntax highlighting for the shell mode."
:global nil
(setq-local compilation-error-regexp-alist (mapcar #'car ,compile-re))
(setq-local compilation-error-regexp-alist-alist ,compile-re)
(rename-buffer ,buf)
(when ,buf (rename-buffer ,buf))
(setq truncate-lines t)
(goto-char (point-max))
(setq-local comint-dynamic-complete-functions '(,capf-fn)))
Expand Down
Loading