]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/checkdoc.el (checkdoc-show-diagnostics): Don't make bogus
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 18 Feb 2015 16:04:15 +0000 (11:04 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 18 Feb 2015 16:04:15 +0000 (11:04 -0500)
assumptions about window ordering.

etc/NEWS
lisp/ChangeLog
lisp/emacs-lisp/checkdoc.el

index 0295245d120d1a8d62aeb229621bc9c26e1a7354..f359f9168b292629df78a83e9393e9b227f0df75 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -235,6 +235,7 @@ If you need your objects to be named, do it by inheriting from `eieio-named'.
 *** The <class> variables are declared obsolete.
 *** The <initarg> variables are declared obsolete.
 *** defgeneric and defmethod are declared obsolete.
+*** `constructor' is now an obsolete alias for `make-instance'.
 
 ** ido
 *** New command `ido-bury-buffer-at-head' bound to C-S-b
index 704ec34606cd7998c02f3d8af1a6b6a3f5c2716e..f68315084715f564b4b46fad9e2c69287983424d 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/checkdoc.el (checkdoc-show-diagnostics): Don't make bogus
+       assumptions about window ordering.
+
 2015-02-16  Kelly Dean  <kelly@prtime.org>
 
        * lisp/files.el (insert-file-contents-literally): Fix docstring typo.
index 47b6e5f81deb4d7ec25b33f8cb39fa0e36f31494..288e25e60605955682e453465b4771abbe6b13b3 100644 (file)
@@ -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)))