hcl-emacs / hcl-mode

Emacs major mode of HCL(Hashicorp Configuration Language)
GNU General Public License v3.0
27 stars 9 forks source link

Handle missing argument in `hcl-end-of-defun` #2

Closed simenheg closed 4 years ago

simenheg commented 4 years ago

Passing count to hcl-end-of-defun is optional, but not doing so would result in an error. For instance, calling mark-defun fails with the error "end-of-defun: Wrong type argument: number-or-marker-p, nil".

Setting the default value to 1 avoids this problem, similar to what is done in hcl-beginning-of-defun.