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: Yuan Fu
Subject: Re: Extend gdb to filter registers
Date: Wed, 16 Oct 2019 23:08:41 -0400

Juri Linkov <address@hidden> writes:

>> 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))

Fixed.


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

Fixed as Stefan suggested.

> 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.

Fixed.

>> +                             (goto-char 1)
>
> (goto-char (point-min))

I’m worried that narrowing will cause problems. Is it adviced to always
use ‘point-min’?

Thanks.

Yuan



reply via email to

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