Fix position in empty buffers in checkdoc-file-comments-engine
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Don't give invalid positions on empty buffers (bug#39987).
This commit is contained in:
parent
5f650422e4
commit
0b80935d37
1 changed files with 3 additions and 1 deletions
|
@ -2362,7 +2362,9 @@ Code:, and others referenced in the style guide."
|
|||
(checkdoc-create-error
|
||||
(format "The footer should be: (provide '%s)\\n;;; %s%s ends here"
|
||||
fn fn fe)
|
||||
(1- (point-max)) (point-max)))))
|
||||
;; The buffer may be empty.
|
||||
(max (point-min) (1- (point-max)))
|
||||
(point-max)))))
|
||||
err))
|
||||
;; The below checks will not return errors if the user says NO
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue