ada-mode-users
[Top][All Lists]
Advanced

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

Re: [Ada-mode-users] [patch] Allow C-u C-c C-r to retain the previous cr


From: Stephen Leake
Subject: Re: [Ada-mode-users] [patch] Allow C-u C-c C-r to retain the previous cross references in the compilation buffer
Date: Fri, 30 Sep 2016 11:31:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Ludovic Brenta <address@hidden> writes:

> C-c C-r always deletes the contents of the buffer containing
> cross-references before launching gnat find.  With this patch,
> it is possible to retain the old information with a prefix argument:
> C-u C-c C-r.

I'd rather have this feature available uniformly on all xref commands.

> +(require 'cl)

We should use cl-lib, to keep the global namespace clean.

>        (dirs (when (ada-prj-get 'obj_dir)
>                (concat "-aO" (mapconcat 'identity (ada-prj-get 'obj_dir) 
> ":"))))
> -         (project-file (when (ada-prj-current-file)
> -                         (concat "-p" (ada-prj-current-file))))

This code is not in 5.2; you apparently have a local patch?

> +        (if append
> +            (flet ((erase-buffer nil (goto-char (point-max))))

'flet' should be 'cl-flet'.

This seems like a horrible hack.

I gather the purpose of this is to save a list of references, while
generating a new list. Another way to do that is to rename the
*gnat-run* buffer after running the first search; did you try that?

-- 
-- Stephe



reply via email to

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