From: Dave Love Date: Wed, 26 Jan 2000 17:15:13 +0000 (+0000) Subject: (checkdoc-interactive-loop): Don't lose on a function with an empty X-Git-Tag: emacs-pretest-21.0.90~5249 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8693181b0be3f0652b95109f019840a52b836c9;p=emacs.git (checkdoc-interactive-loop): Don't lose on a function with an empty body. --- diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 62d4566124d..e687ce7dd74 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -613,17 +613,17 @@ style." (checkdoc-overlay-put cdo 'face 'highlight) ;; Make sure the whole doc string is visible if possible. (sit-for 0) - (if (not (pos-visible-in-window-p - (save-excursion (forward-sexp 1) (point)) - (selected-window))) - (if (looking-at "\"") - (let ((l (count-lines (point) - (save-excursion - (forward-sexp 1) (point))))) - (if (> l (window-height)) - (recenter 1) - (recenter (/ (- (window-height) l) 2)))) - (recenter))) + (if (and (looking-at "\"") + (not (pos-visible-in-window-p + (save-excursion (forward-sexp 1) (point)) + (selected-window)))) + (let ((l (count-lines (point) + (save-excursion + (forward-sexp 1) (point))))) + (if (> l (window-height)) + (recenter 1) + (recenter (/ (- (window-height) l) 2)))) + (recenter)) (message "%s (C-h,%se,n,p,q)" (checkdoc-error-text (car (car err-list))) (if (checkdoc-error-unfixable (car (car err-list)))