Skip to content
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