[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d3d50a9: Allow checkdoc to be called in batch
From: |
Oleh Krehel |
Subject: |
[Emacs-diffs] master d3d50a9: Allow checkdoc to be called in batch |
Date: |
Mon, 18 May 2015 08:17:19 +0000 |
branch: master
commit d3d50a9c99ef42a270127fe0f5a9e435eb760079
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Allow checkdoc to be called in batch
* lisp/emacs-lisp/checkdoc.el (checkdoc-error): When `noninteractive'
is non-nil, echo the error with `warn'.
How it can be used in -batch:
(with-current-buffer (find-file "checkdoc.el")
(checkdoc-current-buffer t))
---
lisp/emacs-lisp/checkdoc.el | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 777fed0..b3ef44a 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2613,9 +2613,12 @@ function called to create the messages."
(count-lines (point-min) (or point (point-min))))
": " msg)))
(with-current-buffer (get-buffer checkdoc-diagnostic-buffer)
- (goto-char (point-max))
- (let ((inhibit-read-only t))
- (apply #'insert text)))))
+ (let ((inhibit-read-only t)
+ (pt (point-max)))
+ (goto-char pt)
+ (apply #'insert text)
+ (when noninteractive
+ (warn (buffer-substring pt (point-max))))))))
(defun checkdoc-show-diagnostics ()
"Display the checkdoc diagnostic buffer in a temporary window."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master d3d50a9: Allow checkdoc to be called in batch,
Oleh Krehel <=