emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/check-declare 43f30a3: check-declare.el (check-dec


From: Oleh Krehel
Subject: [Emacs-diffs] scratch/check-declare 43f30a3: check-declare.el (check-declare-files): Fix order
Date: Wed, 18 Feb 2015 09:04:23 +0000

branch: scratch/check-declare
commit 43f30a3a89561bf076c32fe7896dccafc443c4ec
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    check-declare.el (check-declare-files): Fix order
    
    * lisp/emacs-lisp/check-declare.el (check-declare-files): Make the
      order of the errors that same as in the file. Add code to ensure
      that `first-error' will work properly.
---
 lisp/emacs-lisp/check-declare.el |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index eef2e84..c263972 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -295,16 +295,20 @@ Return a list of any errors found."
     (dolist (e (check-declare-sort alist))
       (if (setq err (check-declare-verify (car e) (cdr e)))
           (setq errlist (cons (cons (car e) err) errlist))))
+    (setq errlist (nreverse errlist))
     (if (get-buffer check-declare-warning-buffer)
         (kill-buffer check-declare-warning-buffer))
     (with-current-buffer (get-buffer-create check-declare-warning-buffer)
       (unless (derived-mode-p 'compilation-mode)
-        (compilation-mode)))
+        (compilation-mode))
+      (let ((inhibit-read-only t))
+        (insert "\f\n"))
+      (compilation-forget-errors))
     ;; Sort back again so that errors are ordered by the files
     ;; containing the declare-function statements.
     (dolist (e (check-declare-sort errlist))
-        (dolist (f (cdr e))
-          (check-declare-warn (car e) (cadr f) (car f) (nth 2 f))))
+      (dolist (f (cdr e))
+        (check-declare-warn (car e) (cadr f) (car f) (nth 2 f))))
     errlist))
 
 ;;;###autoload



reply via email to

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