emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extend gdb to filter registers


From: Juri Linkov
Subject: Re: Extend gdb to filter registers
Date: Tue, 15 Oct 2019 21:10:44 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> Here is another patch that allows a user to save and restore window
> configurations. It seems to work for me and I welcome you to try it out.

Thanks, some additional remarks:

>  (require 'cl-lib)
> +(require 'pcase)

Usually macro packages such as 'cl-lib' and 'pcase' are loaded with
(eval-when-compile (require 'pcase))

> +    (when (or (derived-mode-p 'gdb-parent-mode)
> +              (derived-mode-p 'gdb-inferior-io-mode)) t)))

Font-lock highlights the final 't' with red color and font-lock-warning-face.
And indeed this could be simplified to:

    (or (derived-mode-p 'gdb-parent-mode)
        (derived-mode-p 'gdb-inferior-io-mode))

> +        (kill-buffer buffer))
> +      (kill-buffer placeholder))))
> [...]
> +    (progn ; don't leak buffer
>        [...]
> +      (kill-buffer config-buffer)
> +      (kill-buffer placeholder))))

Usually temporary buffers are cleaned in the end of unwind-protect,
to ensure temporary buffer cleaning even in case of errors.

> +                             (goto-char 1)

(goto-char (point-min))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]