From ad6c1be9230ac8ed517a51778b586055edb952c3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 18 Feb 2015 11:04:15 -0500 Subject: * lisp/emacs-lisp/checkdoc.el (checkdoc-show-diagnostics): Don't make bogus assumptions about window ordering. --- lisp/emacs-lisp/checkdoc.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lisp/emacs-lisp/checkdoc.el') diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 47b6e5f81de..288e25e6060 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2619,14 +2619,15 @@ function called to create the messages." (defun checkdoc-show-diagnostics () "Display the checkdoc diagnostic buffer in a temporary window." (if checkdoc-pending-errors - (let ((b (get-buffer checkdoc-diagnostic-buffer))) - (if b (progn (pop-to-buffer b) - (goto-char (point-max)) - (re-search-backward "\C-l" nil t) - (beginning-of-line) - (forward-line 1) - (recenter 0))) - (other-window -1) + (let* ((b (get-buffer checkdoc-diagnostic-buffer)) + (win (if b (display-buffer b)))) + (when win + (with-selected-window win + (goto-char (point-max)) + (re-search-backward "\C-l" nil t) + (beginning-of-line) + (forward-line 1) + (recenter 0))) (setq checkdoc-pending-errors nil) nil))) -- cgit v1.2.3 From eeb515715d50e55477b6bc9c5a64fbb57dfaec94 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 25 Mar 2015 17:48:15 +0000 Subject: emacs-lisp/checkdoc.el: Don't complain about args starting with _. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/checkdoc.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/checkdoc.el') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e74733015c9..2d150ba3dd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-03-25 Artur Malabarba + + * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): + Don't complain about args starting with _. + 2015-03-25 Stefan Monnier * international/mule-cmds.el (mule--ucs-names-annotation): New func. diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 288e25e6060..777fed082d9 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1663,14 +1663,15 @@ function,command,variable,option or symbol." ms1)))))) ;; Addendum: Make sure they appear in the doc in the same ;; order that they are found in the arg list. - (let ((args (cdr (cdr (cdr (cdr fp))))) + (let ((args (nthcdr 4 fp)) (last-pos 0) (found 1) (order (and (nth 3 fp) (car (nth 3 fp)))) (nocheck (append '("&optional" "&rest") (nth 3 fp))) (inopts nil)) (while (and args found (> found last-pos)) - (if (member (car args) nocheck) + (if (or (member (car args) nocheck) + (string-match "\\`_" (car args))) (setq args (cdr args) inopts t) (setq last-pos found -- cgit v1.2.3